{"version":3,"file":"RaffleButton.-7fP_OhF.mjs","names":["useState","useMemo","TITLE","SECTION_NAME","useMemo","useState","useRef","createContext","useState","useMemo","useContext","useMemo","useCallback","useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","oe","pe","de","window","p","B","ne","init_jsx_runtime","init_npm_react_dom_18_3_1","ce","_e","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_CaDWdxiz","ControlType","init_useAnalytics","init_SubscriptionApiService","init_BreakpointProvider","init_content_store","COMPONENT_ID_PROPS","entries","init_differenceInMilliseconds","useRequestUserAgreementBottomSheet","useCurrentUser","init_js_cookie","addDays","init_Dialog_module_css","init_cookies","init_DialogContainer_emitter","init_EventTrackingProvider_hooks","init_Button","init_dist$1","init_agreement","GENERAL_ERROR","init_EventTrackingProvider","init_RaffleApiService","init_dist","useComponentId","init_useWithLogin","init_ThemeProvider","init_TextButton","init_dist$2","useSWR","SWRErrorBoundary","useWithLogin","init_toast_store","isContentOrigin","init_IntersectionProvider_hooks","init_useTrackSnowplowEvent","env","init_addDays","init_bottom_sheet_store","useIntersectionContext","useTrackSnowplowEvent","init_UserApiService","init_SWRErrorBoundary","init_useDialog","init_global_layout_store","init_Dialog","init_IntersectionProvider","parseISO","differenceInMilliseconds","init_useRequestUserAgreementBottomSheet","init_useCurrentUser","Cookies","useEffectOnce","init_error","init_useTrackViewComponentEvent","raffleApi","useSWRMutation","Default","useTrackViewComponentEvent","AgreementType","init_snowplow","useInterval","init_useInterval","init_PreuserApiService","Intersection","init_esm","init_OneBrandDaysApiService","init_useCheckOne","BUTTON_THEME_CONTROLS","init_useCreateOneLink","init_useFeatureFlag","init_SectionLayout","init_BrandMixApiService","init_AuthApiService","alertDialog","ui","useLazySWR","init_source","init_typography","useAnalytics","init_AlertDialogContainer","toDate","AppCompatBottomSheet","init_redirectLogin","init_index_esm2017","QRCodeSVG","init_index_esm","init_createUTCDate","init_TasteSharingApiService","BUTTON_SIZE_CONTROLS","init_location","subscriptionApi","init_config","init_useIsWebview","init_WebAmplitudeService","init_device","useIsMobileDevice","init_CategoryFirstOrderApiService","createKRTimeZoneDate","useCheckOne","init_index","BUTTON_VARIANT_CONTROLS","init_useIsMobileDevice","init_FramerApiService","init_AppCompatBottomSheet","BUTTON_FILL_CONTROLS","SectionLayout","authApi","init_button","typography","useIsWebview","init_HighlightProductsApiService","init_ui","init_Icon","init_useLazySWR","isWebview","init_Intersection","getCurrentHref","init_component_id","init_entries","init_useEffectOnce","M","init_parseISO","useCreateOneLink","init_getCurrentHref","useDialog","init_dialog_store","BROADCAST_CHANNELS","useBroadcastChannel","useMssOneConnect","init_broadcast_channels","init_useBroadcastChannel","init_useMSSOneConnect","RaffleAgreementRequirement","trackRaffleClickBraze","init_useLazyFetchRaffleGroup","init_RaffleApiService_types","useIdentityVerificationModal","init_raffleAgreementUtils","useLazyFetchRaffleGroup","shouldDisplayAgreeAllCheckbox","init_useIdentityVerificationModal","init_trackRaffleClickBraze","init_AgreementCheckList_hooks","init_AgreementCheckList","mapTypesToString","useAgreementsModal","useAgreementCheckListControl","init_agreementMapper","AgreementCheckList","init_useAgreementsModal","raffleDisplayInformationFetcherKey","useLazyFetchRaffleDisplayInformation","init_useLazyFetchRaffleDisplayInformation","enabled","raffleGroupId","raffleId","isPending","isLoading","data","useFetchRaffleData","init_useFetchRaffleData","fetchRaffleGroup","isRaffleGroupPending","fetchRaffleDisplayInformation","isRaffleDisplayInformationPending","revalidateDisplayInformation","shouldFetchDisplayInformation","RaffleStatus","init_RaffleButton_types","\"Pending\"","\"InProgress\"","\"Finished\"","\"Unknown\"","RaffleStatus2","MS_IN_SECOND","getRaffleStatus","getRaffleInterval","useRaffleStatus","init_useRaffleStatus","remaining","duration","status","setStatus","raffle","currentTime","raffleEndTime","newStatus","useCreateRaffleAction","reshapeRaffleAgreements","getAgreedAgreementTypes","init_useCreateRaffleAction","rest","dialog","showIdentityVerificationModal","hideIdentityVerificationModal","showAgreementsModal","hideAgreementsModal","withRaffleAction","args","handleCallback","callback","actionType","handleNotification","handleApplication","error","handleError","subscribe","onSubscribe","checkAgreementsAndShowModal","raffleApply","isRaffleApplyMutating","arg","apply","onApply","createSubscriptionAgreementsParams","hasRequiredAgreements","agreement","agreementInformation","handleAgreementsModal","RAFFLE_AGREEMENT_TYPE_LIST","raffleAgree","isRaffleAgreeMutating","params","displayAgreeAllCheckBox","agreements","agreedAgreementTypes","state","handleOSNotification","onSuccess","requestUserAgreementBottomSheet","errorMessage","trackViewComponentEvent","key","value","acc","AppQRCodeDialogContent","descriptionStyle","appQRCodeContainerStyle","appQRCodeWrapperStyle","init_AppQRCodeDialog","oneLink","DIALOG_ID","useAppQRCodeDialog","init_AppQRCodeDialog_hooks","isMobile","shouldRenderAlertDialog","href","webviewNavOptions","show","handleConfirm","onConfirm","hide","useTrackRaffleActionEvent","init_useTrackRaffleEvent","trackSnowplowEvent","trackAmplitude","componentId","buttonName","DIALOG_MESSAGES","useRaffleActions","getAppQRCodeDialogTitle","getAppQRCodeDialogDescription","init_useRaffleActions","withLogin","withRaffleNotification","withRaffleApplication","showAppQRCodeDialog","handleDialogConfirm","trackClickCompeteButton","isPendingStatus","handleSuccess","raffleHandler","trackClickRaffleButton","buttonText","getCurrentRaffle","reshapeRaffleButtonProps","fallbackRaffleButtonText","getRaffleButtonText","getRaffleButtonTextByStatus","isRaffleButtonDisabled","getRaffleButtonIconProps","init_RaffleButton_utils","raffles","disabled","iconProps","props","displayInformation","IMAGE","containerStyle","imageStyle","NudgeModalContent","init_RaffleMssOneNudgeModalContent","endOfDay","_date","date","init_endOfDay","RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY","COOKIE_OPTIONS","MSS_ONE_NUDGE_DISMISSED_DAYS","hideRaffleMssOneNudgeFor7Days","isRaffleMssOneNudgeHidden","init_raffleMssOneNudgeVisibility","cookies","hideUntil","hiddenUntil","hideUntilDate","TITLE$1","DESCRIPTION","PRIMARY_ACTION_LABEL","SECONDARY_ACTION_LABEL","TERTIARY_ACTION_LABEL","SECTION_NAME$1","useMssOneNudgeModal","init_useMssOneNudgeModal","init_RaffleModalProvider","isMobileDevice","useRaffleModalContext","isConnecting","open","accountState","onOpenChange","isOpen","updateAccountState","handleMssOneResult","result","originalRaffleHandler","storedRaffleId","mssOneConnect","mssOneConnectResult","newUrl","elementRef","handleRedirectToMssOneConnect","currentUrl","baseUrl","redirectBaseUrl","successUrl","failureUrl","redirectToMssOneConnect","handleIntegrateAndApply","RaffleMssOneNudgeModal","init_RaffleMssOneNudgeModal","modalContent","actions","useRaffleData","init_useRaffleData","oneLoginData","res","raffleApplicableData","useRaffleAgreements","init_useRaffleAgreements","hasAgreements","richAgreements","agreementTypes","useConnectedModalState","init_useConnectedModalState","modalState","setModalState","isApplying","setIsApplying","hasExecutedDirectApply","onRaffleComplete","resetState","handleRaffleApplication","TITLE","COMPLETED_TITLE","AGREEMENT_TYPE_MAP","useMssOneConnectedModal","init_useMssOneConnectedModal","init_RaffleMssOneConnectedModal","handleAgreementAndRaffle","agreementsState","agreed","type","submitAgreements","getTitle","getDescription","agreedAgreements","SECTION_NAME","isAllRequiredAgreementsChecked","handleComplete","completedContainerStyle","qrContainerStyle","qrCodeWrapperStyle","ConnectedModalContent","connectedDetailStyle","subDescriptionStyle","ConnectedDetail","init_RaffleMssOneConnectedModalContent","renderConnectedStep","title","renderCompletedStep","RaffleMssOneConnectedModal","shouldShowModal","RaffleModalContext","initialAccountState","RaffleModalProvider","setAccountState","prev","updates","contextValue","children","context","RaffleButtonWithAccountIntegration","init_RaffleButtonWithAccountIntegration","handleRaffleClick","enableAccountIntegration","onCheckOne","RaffleButtonInner","RedoButton","RaffleButton","init_RaffleButton","isInView","logged","currentRaffle","raffleGroup","buttonProps","button","handleImpression","buttonRef","handleClick","retry","RaffleButton_default","init_RaffleButton$1"],"sources":["https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useLazyFetchRaffleDisplayInformation.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useFetchRaffleData.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.types.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useRaffleStatus.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useCreateRaffleAction.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useTrackRaffleEvent.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/hooks/useRaffleActions.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModalContent.js","https:/asset.29cm.co.kr/contents/framer/node_modules/date-fns/endOfDay.js","https:/asset.29cm.co.kr/contents/framer/utils/raffle/raffleMssOneNudgeVisibility.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/useMssOneNudgeModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useRaffleData.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useRaffleAgreements.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/hooks/useConnectedModalState.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/useMssOneConnectedModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModalContent.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModal.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/providers/RaffleModalProvider.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/components/RaffleButtonWithAccountIntegration.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.js","https:/framerusercontent.com/modules/OcBddWDWXlGS4T3Q4Wnl/2foFwHDTq9SF2tB5eSAx/RaffleButton.js"],"sourcesContent":["import { raffleApi } from \"../../apis/raffle/RaffleApiService.js\";\nimport { useLazySWR } from \"../swr/useLazySWR.js\";\nconst raffleDisplayInformationFetcherKey = \"raffle-display-information\";\nconst useLazyFetchRaffleDisplayInformation = (raffleGroupId, raffleId) => {\n  const enabled = Boolean(raffleGroupId) && Boolean(raffleId);\n  const {\n    data,\n    isLoading,\n    fetch,\n    mutate\n  } = useLazySWR(enabled ? [raffleDisplayInformationFetcherKey, raffleGroupId, raffleId] : null, () => raffleApi.getRaffleDisplayInformation(raffleGroupId, raffleId));\n  const isPending = isLoading || !enabled;\n  return {\n    displayInformation: data == null ? void 0 : data.data,\n    isPending,\n    fetch,\n    mutate\n  };\n};\nexport {\n  useLazyFetchRaffleDisplayInformation\n};\n","import { useLazyFetchRaffleGroup } from \"../../../../hooks/fetchers/useLazyFetchRaffleGroup.js\";\nimport { useLazyFetchRaffleDisplayInformation } from \"../../../../hooks/fetchers/useLazyFetchRaffleDisplayInformation.js\";\nimport { useEffect } from \"react\";\nconst useFetchRaffleData = ({\n  raffleGroupId,\n  raffleId,\n  enabled,\n  shouldFetchDisplayInformation\n}) => {\n  const {\n    raffleGroup,\n    fetch: fetchRaffleGroup,\n    isPending: isRaffleGroupPending\n  } = useLazyFetchRaffleGroup(raffleGroupId);\n  const {\n    displayInformation,\n    fetch: fetchRaffleDisplayInformation,\n    isPending: isRaffleDisplayInformationPending,\n    mutate: revalidateDisplayInformation\n  } = useLazyFetchRaffleDisplayInformation(raffleGroupId, raffleId);\n  useEffect(() => {\n    if (enabled) {\n      fetchRaffleGroup();\n      if (shouldFetchDisplayInformation) {\n        fetchRaffleDisplayInformation();\n      }\n    }\n  }, [enabled, shouldFetchDisplayInformation]);\n  const isPending = isRaffleGroupPending || shouldFetchDisplayInformation && isRaffleDisplayInformationPending;\n  return {\n    raffleGroup,\n    displayInformation,\n    isPending,\n    revalidateDisplayInformation\n  };\n};\nexport {\n  useFetchRaffleData\n};\n","var RaffleStatus = /* @__PURE__ */ ((RaffleStatus2) => {\n  RaffleStatus2[RaffleStatus2[\"Pending\"] = 0] = \"Pending\";\n  RaffleStatus2[RaffleStatus2[\"InProgress\"] = 1] = \"InProgress\";\n  RaffleStatus2[RaffleStatus2[\"Finished\"] = 2] = \"Finished\";\n  RaffleStatus2[RaffleStatus2[\"Unknown\"] = 3] = \"Unknown\";\n  return RaffleStatus2;\n})(RaffleStatus || {});\nexport {\n  RaffleStatus\n};\n","import { useState, useEffect, useMemo } from \"react\";\nimport { RaffleStatus } from \"../RaffleButton.types.js\";\nimport { differenceInMilliseconds } from \"../../../../node_modules/date-fns/differenceInMilliseconds.js\";\nimport { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport useInterval from \"../../../../node_modules/react-use/esm/useInterval.js\";\nimport { parseISO } from \"../../../../node_modules/date-fns/parseISO.js\";\nconst MS_IN_SECOND = 1e3;\nconst getRaffleStatus = (remaining, duration) => {\n  switch (true) {\n    case remaining < MS_IN_SECOND:\n      return RaffleStatus.Finished;\n    case remaining - duration < MS_IN_SECOND:\n      return RaffleStatus.InProgress;\n    default:\n      return RaffleStatus.Pending;\n  }\n};\nconst getRaffleInterval = (status) => {\n  switch (status) {\n    case RaffleStatus.Finished:\n      return null;\n    case RaffleStatus.Unknown:\n      return MS_IN_SECOND / 2;\n    default:\n      return MS_IN_SECOND;\n  }\n};\nconst useRaffleStatus = (raffle) => {\n  const [status, setStatus] = useState(RaffleStatus.Unknown);\n  useEffect(() => {\n    setStatus(RaffleStatus.Unknown);\n  }, [raffle]);\n  const duration = useMemo(() => raffle ? differenceInMilliseconds(parseISO(raffle.applyEndedAt), parseISO(raffle.applyStartedAt)) : 0, [raffle]);\n  const intervalCallback = () => {\n    if (!raffle) {\n      return;\n    }\n    const currentTime = createKRTimeZoneDate();\n    const raffleEndTime = parseISO(raffle.applyEndedAt);\n    const remaining = differenceInMilliseconds(raffleEndTime, currentTime);\n    const newStatus = getRaffleStatus(remaining, duration);\n    setStatus(newStatus);\n  };\n  useInterval(intervalCallback, getRaffleInterval(status));\n  return status;\n};\nexport {\n  useRaffleStatus\n};\n","import { raffleApi } from \"../../../../apis/raffle/RaffleApiService.js\";\nimport { RaffleAgreementRequirement } from \"../../../../apis/raffle/RaffleApiService.types.js\";\nimport { isWebview } from \"../../../../utils/device.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../apis/framer/FramerApiService.js\";\nimport { GENERAL_ERROR } from \"../../../../constants/error.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport useSWRMutation from \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport { useDialog } from \"../../../../hooks/useDialog.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"framer-motion\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"react/jsx-runtime\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { subscriptionApi } from \"../../../../apis/subscription/SubscriptionApiService.js\";\nimport { useAgreementsModal } from \"../../../../hooks/useAgreementsModal.js\";\nimport { useRequestUserAgreementBottomSheet } from \"../../../../hooks/useRequestUserAgreementBottomSheet.js\";\nimport { AgreementType } from \"../../../../types/agreement.js\";\nimport { useIdentityVerificationModal } from \"../../../../hooks/useIdentityVerificationModal.js\";\nimport { entries } from \"../../../../utils/entries.js\";\nimport { useTrackViewComponentEvent } from \"../../../../hooks/events/useTrackViewComponentEvent.js\";\nconst useCreateRaffleAction = ({\n  raffleGroupId,\n  raffleId,\n  actionType,\n  ...rest\n}) => {\n  const dialog = useDialog();\n  const {\n    show: showIdentityVerificationModal,\n    hide: hideIdentityVerificationModal\n  } = useIdentityVerificationModal();\n  const {\n    show: showAgreementsModal,\n    hide: hideAgreementsModal\n  } = useAgreementsModal();\n  const {\n    requestUserAgreementBottomSheet\n  } = useRequestUserAgreementBottomSheet();\n  const {\n    trackViewComponentEvent\n  } = useTrackViewComponentEvent();\n  const withRaffleAction = (callback) => async (...args) => {\n    const handleCallback = () => {\n      callback(...args);\n    };\n    try {\n      if (actionType === \"notification\") {\n        const {\n          data\n        } = await raffleApi.getRaffleNotificationApplicable(raffleGroupId, raffleId);\n        handleNotification(data, handleCallback);\n      } else if (actionType === \"application\") {\n        const {\n          data\n        } = await raffleApi.getRaffleApplicable(raffleGroupId, raffleId);\n        handleApplication(data, handleCallback);\n      }\n    } catch (error) {\n      handleError(error);\n    }\n  };\n  const handleNotification = async (data, onSubscribe) => {\n    const subscribe = async () => {\n      try {\n        if (rest.eventKey) {\n          await subscriptionApi.subscribe([rest.eventKey]);\n        }\n        onSubscribe();\n      } catch (error) {\n        handleError(error);\n      }\n    };\n    const isAllAgreed = await checkAgreementsAndShowModal({\n      title: \"이벤트 알림을 받으려면 동의해주세요\",\n      description: \"이벤트에 대한 알림을 받으려면 마케팅 목적의 개인정보 수집 및 이용 동의가 필요해요.\",\n      primaryButtonText: \"동의 후 알림받기\",\n      agreementInformation: data.agreementInformation,\n      onSuccess: () => {\n        subscribe();\n      }\n    });\n    if (isAllAgreed) {\n      subscribe();\n    }\n  };\n  const {\n    trigger: raffleApply,\n    isMutating: isRaffleApplyMutating\n  } = useSWRMutation(\"raffle-apply\", (_, {\n    arg\n  }) => raffleApi.postRaffleApply(arg.raffleGroupId, arg.raffleId));\n  const handleApplication = async (data, onApply) => {\n    const apply = async () => {\n      if (isRaffleApplyMutating) {\n        return;\n      }\n      try {\n        await raffleApply({\n          raffleGroupId,\n          raffleId\n        });\n        onApply();\n      } catch (error) {\n        handleError(error);\n      }\n    };\n    const createSubscriptionAgreementsParams = () => {\n      var _a;\n      const hasRequiredAgreements = (_a = data.agreementInformation) == null ? void 0 : _a.some((agreement) => !agreement.isAgreed && agreement.agreementRequirement === RaffleAgreementRequirement.Required);\n      return {\n        title: data.popupTitle,\n        description: data.popupDescription,\n        primaryButtonText: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n        agreementInformation: data.agreementInformation,\n        onSuccess: () => {\n          apply();\n        }\n      };\n    };\n    if (data.hasCi === false) {\n      showIdentityVerificationModal({\n        onSuccess: async () => {\n          hideIdentityVerificationModal();\n          const isAllAgreed2 = await checkAgreementsAndShowModal(createSubscriptionAgreementsParams());\n          if (isAllAgreed2) {\n            apply();\n          }\n        },\n        onFail: handleError\n      });\n      return;\n    }\n    const isAllAgreed = await checkAgreementsAndShowModal(createSubscriptionAgreementsParams());\n    if (isAllAgreed) {\n      apply();\n    }\n  };\n  const checkAgreementsAndShowModal = async ({\n    title,\n    description,\n    primaryButtonText,\n    agreementInformation,\n    onSuccess\n  }) => {\n    const isAllAgreed = agreementInformation.every((agreement) => agreement.isAgreed);\n    if (!isAllAgreed) {\n      handleAgreementsModal({\n        title,\n        description,\n        primaryButtonText,\n        agreements: reshapeRaffleAgreements(agreementInformation),\n        onSuccess\n      });\n      return false;\n    }\n    return true;\n  };\n  const RAFFLE_AGREEMENT_TYPE_LIST = [AgreementType.Advertising, AgreementType.PersonalInformation, AgreementType.Privacy];\n  const {\n    trigger: raffleAgree,\n    isMutating: isRaffleAgreeMutating\n  } = useSWRMutation(\"raffle-agree\", (_, {\n    arg\n  }) => raffleApi.postRaffleGroupAgreementsAgree({\n    raffleGroupId: arg.raffleGroupId,\n    raffleId: arg.raffleId,\n    agreementTypes: arg.agreementTypes\n  }));\n  const handleAgreementsModal = ({\n    agreements = [],\n    onSuccess,\n    ...params\n  }) => {\n    const displayAgreeAllCheckBox = agreements.length === RAFFLE_AGREEMENT_TYPE_LIST.length;\n    showAgreementsModal({\n      ...params,\n      agreements,\n      displayAgreeAllCheckBox,\n      onSuccess: async (state) => {\n        const agreedAgreementTypes = getAgreedAgreementTypes(state);\n        if (agreedAgreementTypes.length > 0) {\n          if (isRaffleAgreeMutating) {\n            return;\n          }\n          await raffleAgree({\n            raffleGroupId,\n            raffleId,\n            agreementTypes: agreedAgreementTypes\n          });\n        }\n        hideAgreementsModal();\n        handleOSNotification(onSuccess);\n      },\n      onError: handleError\n    });\n  };\n  const handleOSNotification = (callback) => {\n    if (isWebview()) {\n      requestUserAgreementBottomSheet({\n        type: \"CONTENT_DETAIL_PAGE\",\n        onConfirm: callback,\n        onCancel: callback\n      });\n      return;\n    }\n    callback == null ? void 0 : callback();\n  };\n  const handleError = (error) => {\n    let errorMessage = GENERAL_ERROR;\n    if (error instanceof Error) {\n      errorMessage = error.message;\n    }\n    trackViewComponentEvent(\"raffle-alert-dialog\", {\n      message: errorMessage\n    });\n    dialog.show({\n      content: errorMessage\n    });\n  };\n  return withRaffleAction;\n};\nconst reshapeRaffleAgreements = (agreements) => agreements.filter((agreement) => !agreement.isAgreed).map((agreement) => ({\n  type: agreement.agreementType,\n  label: agreement.label,\n  isRequired: agreement.agreementRequirement === RaffleAgreementRequirement.Required,\n  detailLink: agreement.linkUrl\n}));\nconst getAgreedAgreementTypes = (state) => {\n  return entries(state).reduce((acc, [key, value]) => {\n    if (value) {\n      acc.push(key);\n    }\n    return acc;\n  }, []);\n};\nexport {\n  useCreateRaffleAction\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { QRCodeSVG } from \"../../../../node_modules/qrcode.react/lib/esm/index.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nconst AppQRCodeDialogContent = ({\n  oneLink\n}) => {\n  return /* @__PURE__ */ jsxs(\"div\", { style: appQRCodeContainerStyle, children: [\n    /* @__PURE__ */ jsx(\"div\", { style: appQRCodeWrapperStyle, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: oneLink, size: 150, bgColor: \"#ffffff\", fgColor: \"#000000\", includeMargin: false }) }),\n    /* @__PURE__ */ jsxs(\"p\", { style: descriptionStyle, children: [\n      \"앱 설치하면 더 정확한 소식을 받을 수 있어요.\",\n      /* @__PURE__ */ jsx(\"br\", {}),\n      \"카메라 앱을 열어 QR 코드를 비춰보세요.\"\n    ] })\n  ] });\n};\nconst descriptionStyle = {\n  /* text-l-medium */\n  ...typography(14, 500, 1.4),\n  textAlign: \"center\"\n};\nconst appQRCodeContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  gap: 12,\n  paddingTop: 36,\n  paddingBottom: 16,\n  minWidth: 420,\n  borderRadius: 8,\n  backgroundColor: \"#000000\",\n  color: \"#ffffff\"\n};\nconst appQRCodeWrapperStyle = {\n  padding: 4,\n  borderRadius: 8,\n  backgroundColor: \"#ffffff\"\n};\nexport {\n  AppQRCodeDialogContent\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useCreateOneLink } from \"../../../../hooks/useCreateOneLink.js\";\nimport { useIsMobileDevice } from \"../../../../hooks/useIsMobileDevice.js\";\nimport { getCurrentHref } from \"../../../../utils/getCurrentHref.js\";\nimport { AppQRCodeDialogContent } from \"./AppQRCodeDialog.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport { alertDialog } from \"../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useIsWebview } from \"../../../../hooks/useIsWebview.js\";\nimport { ui } from \"../../../../containers/UIContainer/ui.js\";\nconst DIALOG_ID = \"app-qr-code-dialog-id\";\nconst useAppQRCodeDialog = ({\n  webviewNavOptions,\n  href\n} = {}) => {\n  const isMobile = useIsMobileDevice();\n  const isWebview = useIsWebview();\n  const shouldRenderAlertDialog = isMobile || isWebview;\n  const {\n    oneLink\n  } = useCreateOneLink(href ?? getCurrentHref({\n    removeQueryParams: true\n  }), webviewNavOptions);\n  const show = ({\n    title,\n    description,\n    onConfirm\n  }) => {\n    const handleConfirm = () => {\n      onConfirm == null ? void 0 : onConfirm();\n      hide();\n    };\n    if (shouldRenderAlertDialog) {\n      alertDialog.show({\n        id: DIALOG_ID,\n        title,\n        description,\n        primaryAction: {\n          label: \"확인\",\n          onClick: handleConfirm\n        }\n      });\n      return;\n    }\n    ui.showDialog({\n      title,\n      description,\n      children: /* @__PURE__ */ jsx(AppQRCodeDialogContent, { oneLink }),\n      primaryAction: {\n        label: \"확인\",\n        onClick: handleConfirm\n      }\n    }, {\n      id: DIALOG_ID\n    });\n  };\n  const hide = () => {\n    if (shouldRenderAlertDialog) {\n      alertDialog.hide(DIALOG_ID);\n      return;\n    }\n    ui.hide(DIALOG_ID);\n  };\n  return {\n    show,\n    hide\n  };\n};\nexport {\n  useAppQRCodeDialog\n};\n","import { useAnalytics } from \"../../../../hooks/analytics/useAnalytics.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"react\";\nimport \"../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"framer\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { trackRaffleClickBraze } from \"../../../../utils/analytics/braze/trackRaffleClickBraze.js\";\nconst useTrackRaffleActionEvent = () => {\n  const {\n    trackAmplitude\n  } = useAnalytics();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const trackClickCompeteButton = (raffleId) => {\n    trackAmplitude(\"click_button\", {\n      button_type: \"raffle\",\n      button_type_detail: raffleId\n    });\n  };\n  const trackClickRaffleButton = ({\n    buttonName,\n    componentId,\n    raffleId\n  }) => {\n    trackSnowplowEvent(\"click_button\", {\n      // TODO(한지원): section_name, position, layout_position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      button_id: `raffle_${raffleId}`,\n      button_name: buttonName\n    });\n    trackRaffleClickBraze(raffleId, buttonName);\n  };\n  return {\n    trackClickCompeteButton,\n    trackClickRaffleButton\n  };\n};\nexport {\n  useTrackRaffleActionEvent\n};\n","import { RaffleStatus } from \"../RaffleButton.types.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useWithLogin } from \"../../../../hooks/useWithLogin.js\";\nimport { useCreateRaffleAction } from \"./useCreateRaffleAction.js\";\nimport { useAppQRCodeDialog } from \"../../../@shared/dialogs/AppQRCodeDialog/AppQRCodeDialog.hooks.js\";\nimport { useTrackRaffleActionEvent } from \"./useTrackRaffleEvent.js\";\nconst DIALOG_MESSAGES = {\n  TITLE: {\n    UPCOMING: \"이벤트가 시작되면 알려드릴게요\",\n    COMPLETED: \"이벤트 참여가 완료되었어요\"\n  },\n  DESCRIPTION: {\n    UPCOMING: \"회원정보에 입력된 정보로 안내드려요.\",\n    COMPLETED: \"당첨 시 회원 정보에 입력된 연락처로 안내드려요.\"\n  }\n};\nconst useRaffleActions = ({\n  raffleGroupId,\n  raffleId,\n  raffle,\n  status,\n  onSuccess\n}) => {\n  const withLogin = useWithLogin();\n  const withRaffleNotification = useCreateRaffleAction({\n    raffleGroupId,\n    raffleId,\n    actionType: \"notification\",\n    eventKey: (raffle == null ? void 0 : raffle.notificationKey) ?? void 0\n  });\n  const withRaffleApplication = useCreateRaffleAction({\n    raffleGroupId,\n    raffleId,\n    actionType: \"application\"\n  });\n  const {\n    show: showAppQRCodeDialog\n  } = useAppQRCodeDialog();\n  const {\n    trackClickCompeteButton,\n    trackClickRaffleButton\n  } = useTrackRaffleActionEvent();\n  const handleDialogConfirm = () => {\n    trackClickCompeteButton(raffleId);\n  };\n  const isPendingStatus = status === RaffleStatus.Pending;\n  const handleSuccess = () => {\n    onSuccess();\n    showAppQRCodeDialog({\n      title: getAppQRCodeDialogTitle(status),\n      description: getAppQRCodeDialogDescription(status),\n      onConfirm: handleDialogConfirm\n    });\n  };\n  const raffleHandler = isPendingStatus ? withRaffleNotification : withRaffleApplication;\n  const handleClick = ({\n    componentId,\n    buttonText\n  }) => () => {\n    if (status === RaffleStatus.Unknown || status === RaffleStatus.Finished) {\n      return;\n    }\n    trackClickRaffleButton({\n      buttonName: buttonText,\n      componentId,\n      raffleId\n    });\n    withLogin(raffleHandler(handleSuccess))();\n  };\n  return {\n    handleClick\n  };\n};\nconst getAppQRCodeDialogTitle = (status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return DIALOG_MESSAGES.TITLE.UPCOMING;\n    default:\n      return DIALOG_MESSAGES.TITLE.COMPLETED;\n  }\n};\nconst getAppQRCodeDialogDescription = (status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return DIALOG_MESSAGES.DESCRIPTION.UPCOMING;\n    default:\n      return DIALOG_MESSAGES.DESCRIPTION.COMPLETED;\n  }\n};\nexport {\n  useRaffleActions\n};\n","import { RaffleStatus } from \"./RaffleButton.types.js\";\nconst getCurrentRaffle = (raffles, raffleId) => raffles.find((raffle) => `${raffle.raffleId}` === raffleId);\nconst reshapeRaffleButtonProps = ({\n  props,\n  raffle,\n  status,\n  displayInformation\n}) => {\n  const buttonText = getRaffleButtonText({\n    raffle,\n    status,\n    displayInformation\n  });\n  const disabled = isRaffleButtonDisabled({\n    raffle,\n    status,\n    displayInformation\n  });\n  const iconProps = getRaffleButtonIconProps({\n    raffle,\n    status,\n    disabled\n  });\n  if (!disabled) {\n    return {\n      buttonText,\n      disabled,\n      ...props,\n      ...iconProps\n    };\n  }\n  return {\n    buttonText,\n    disabled,\n    ...props,\n    ...iconProps,\n    variant: \"disabled\"\n  };\n};\nconst fallbackRaffleButtonText = \" \";\nconst getRaffleButtonText = ({\n  status,\n  raffle,\n  displayInformation\n}) => {\n  if (!raffle) {\n    return fallbackRaffleButtonText;\n  }\n  switch (true) {\n    case (status === RaffleStatus.Pending && (displayInformation == null ? void 0 : displayInformation.isNotificationApplied)):\n      return \"사전 알림 신청 완료\";\n    case (status === RaffleStatus.InProgress && (displayInformation == null ? void 0 : displayInformation.isRaffleApplied)):\n      return \"이벤트 참여 완료\";\n    default:\n      return getRaffleButtonTextByStatus(raffle, status);\n  }\n};\nconst getRaffleButtonTextByStatus = (raffle, status) => {\n  switch (status) {\n    case RaffleStatus.Pending:\n      return raffle.pendingButtonText;\n    case RaffleStatus.InProgress:\n      return raffle.inProgressButtonText;\n    case RaffleStatus.Finished:\n      return raffle.finishedButtonText;\n    default:\n      return fallbackRaffleButtonText;\n  }\n};\nconst isRaffleButtonDisabled = ({\n  status,\n  raffle,\n  displayInformation\n}) => {\n  switch (true) {\n    case status === RaffleStatus.Finished:\n    case (status === RaffleStatus.Pending && (raffle == null ? void 0 : raffle.isNotificationAvailable) === false):\n    case (status === RaffleStatus.Pending && (displayInformation == null ? void 0 : displayInformation.isNotificationApplied) === true):\n    case (status === RaffleStatus.InProgress && (displayInformation == null ? void 0 : displayInformation.isRaffleApplied) === true):\n      return true;\n    default:\n      return false;\n  }\n};\nconst getRaffleButtonIconProps = ({\n  status,\n  raffle,\n  disabled\n}) => {\n  switch (true) {\n    case (status === RaffleStatus.Pending && (raffle == null ? void 0 : raffle.isNotificationAvailable) === false):\n      return {\n        prefixIcon: \"lock\"\n      };\n    case (status === RaffleStatus.Pending && !disabled):\n      return {\n        prefixIcon: \"bell\"\n      };\n    default:\n      return {};\n  }\n};\nexport {\n  getCurrentRaffle,\n  getRaffleButtonText,\n  isRaffleButtonDisabled,\n  reshapeRaffleButtonProps\n};\n","import { jsx } from \"react/jsx-runtime\";\nconst IMAGE = \"https://img.29cm.co.kr/cms/202510/11f0a89fd0241fa2a918a574503622b1.png?format=webp\";\nconst containerStyle = {\n  width: \"100%\",\n  background: \"#E5E4E6\",\n  display: \"flex\",\n  justifyContent: \"center\"\n};\nconst imageStyle = {\n  width: 335,\n  height: 200\n};\nconst NudgeModalContent = () => /* @__PURE__ */ jsx(\"div\", { style: containerStyle, children: /* @__PURE__ */ jsx(\"img\", { style: imageStyle, src: IMAGE, alt: \"29CM와 무신사 계정 통합 안내\" }) });\nexport {\n  NudgeModalContent\n};\n","import { toDate } from \"./toDate.js\";\nfunction endOfDay(date) {\n  const _date = toDate(date);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\nexport {\n  endOfDay as default,\n  endOfDay\n};\n","import { Cookies } from \"../cookies.js\";\nimport { endOfDay } from \"../../node_modules/date-fns/endOfDay.js\";\nimport { addDays } from \"../../node_modules/date-fns/addDays.js\";\nconst RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY = \"raffle_mss_one_nudge_hidden\";\nconst COOKIE_OPTIONS = {\n  domain: \".29cm.co.kr\",\n  path: \"/\",\n  secure: true\n};\nconst MSS_ONE_NUDGE_DISMISSED_DAYS = 7;\nconst hideRaffleMssOneNudgeFor7Days = () => {\n  const cookies = new Cookies();\n  const hideUntil = endOfDay(addDays(/* @__PURE__ */ new Date(), MSS_ONE_NUDGE_DISMISSED_DAYS));\n  cookies.set(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, hideUntil.toISOString(), {\n    ...COOKIE_OPTIONS,\n    expires: hideUntil\n  });\n};\nconst isRaffleMssOneNudgeHidden = () => {\n  const cookies = new Cookies();\n  const hiddenUntil = cookies.get(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY);\n  if (!hiddenUntil) {\n    return false;\n  }\n  try {\n    const hideUntilDate = new Date(hiddenUntil);\n    const now = /* @__PURE__ */ new Date();\n    if (now < hideUntilDate) {\n      return true;\n    }\n    cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n    return false;\n  } catch {\n    cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n    return false;\n  }\n};\nconst clearRaffleMSSOneNudgeHidden = () => {\n  const cookies = new Cookies();\n  cookies.remove(RAFFLE_MSS_ONE_NUDGE_HIDE_COOKIE_KEY, COOKIE_OPTIONS);\n};\nexport {\n  clearRaffleMSSOneNudgeHidden,\n  hideRaffleMssOneNudgeFor7Days,\n  isRaffleMssOneNudgeHidden\n};\n","import { isWebview } from \"../../../../../utils/device.js\";\nimport { useEffect } from \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../apis/framer/FramerApiService.js\";\nimport { env } from \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { useEffectOnce } from \"../../../../../hooks/react/useEffectOnce.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { hideRaffleMssOneNudgeFor7Days } from \"../../../../../utils/raffle/raffleMssOneNudgeVisibility.js\";\nimport { useBroadcastChannel } from \"../../../../../hooks/useBroadcastChannel.js\";\nimport { BROADCAST_CHANNELS } from \"../../../../../constants/broadcast-channels.js\";\nimport \"../../../../../hooks/amplitude-variant/WebAmplitudeService.js\";\nimport { useMssOneConnect } from \"../../../../../hooks/mss-one/useMSSOneConnect.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nconst TITLE = \"29CM와 무신사 계정을 통합하면\\n래플 당첨 확률이 올라가요\";\nconst DESCRIPTION = \"통합하면 로그인부터 무신사 머니까지,\\n하나의 계정으로 더 간편하게 이용할 수 있어요.\";\nconst PRIMARY_ACTION_LABEL = \"통합하고 응모하기\";\nconst SECONDARY_ACTION_LABEL = \"건너뛰고 응모하기\";\nconst TERTIARY_ACTION_LABEL = \"7일간 보지 않기\";\nconst SECTION_NAME = \"RaffleMssOneNudgeModal\";\nconst useMssOneNudgeModal = () => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    raffleId,\n    elementRef,\n    originalRaffleHandler,\n    updateAccountState,\n    accountState\n  } = useRaffleModalContext();\n  const {\n    redirectToMssOneConnect,\n    isPending: isConnecting\n  } = useMssOneConnect();\n  const open = accountState.showNudgeModal;\n  const onOpenChange = (isOpen) => {\n    if (!isOpen && isConnecting) {\n      return;\n    }\n    updateAccountState({\n      showNudgeModal: isOpen\n    });\n  };\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  useEffect(() => {\n    if (!open) {\n      return;\n    }\n    trackSnowplowEvent(\"impression_popup\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      popup_id: \"integrated_account\",\n      popup_type: isMobileDevice ? \"bottomsheet\" : \"dialog\",\n      layout_id: `raffle_${raffleId}`\n    });\n  }, [open]);\n  const handleMssOneResult = (result) => {\n    sessionStorage.removeItem(\"pendingRaffleId\");\n    if (result === \"success\") {\n      updateAccountState({\n        showConnectedModal: true\n      });\n    } else if (result === \"failure\") {\n      originalRaffleHandler();\n    }\n  };\n  useBroadcastChannel(BROADCAST_CHANNELS.contentUniversalBroadcast, ({\n    mssOneConnect\n  }) => {\n    const storedRaffleId = sessionStorage.getItem(\"pendingRaffleId\");\n    if (mssOneConnect && storedRaffleId === raffleId) {\n      handleMssOneResult(mssOneConnect);\n    }\n  });\n  useEffectOnce(() => {\n    const urlParams = new URLSearchParams(window.location.search);\n    const mssOneConnectResult = urlParams.get(\"mssOneConnect\");\n    const storedRaffleId = sessionStorage.getItem(\"pendingRaffleId\");\n    if (mssOneConnectResult && storedRaffleId === raffleId) {\n      const newUrl = new URL(window.location.href);\n      newUrl.searchParams.delete(\"mssOneConnect\");\n      window.history.replaceState({}, \"\", newUrl.toString());\n      if (elementRef.current) {\n        elementRef.current.scrollIntoView({\n          behavior: \"instant\",\n          block: \"center\",\n          inline: \"nearest\"\n        });\n      }\n      handleMssOneResult(mssOneConnectResult);\n    }\n  });\n  const handleRedirectToMssOneConnect = () => {\n    sessionStorage.setItem(\"pendingRaffleId\", raffleId);\n    const currentUrl = new URL(window.location.href);\n    const baseUrl = `${currentUrl.origin}${currentUrl.pathname}`;\n    const redirectBaseUrl = isWebview() ? `${env.workspace.content}/embed/broadcast` : baseUrl;\n    const successUrl = `${redirectBaseUrl}?mssOneConnect=success`;\n    const failureUrl = `${redirectBaseUrl}?mssOneConnect=failure`;\n    return redirectToMssOneConnect(successUrl, failureUrl);\n  };\n  const handleIntegrateAndApply = async () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"connect_one_member\",\n      button_name: PRIMARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    await handleRedirectToMssOneConnect();\n    updateAccountState({\n      showNudgeModal: false\n    });\n  };\n  const handleSkipAndApply = () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"apply_raffle\",\n      button_name: SECONDARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    originalRaffleHandler();\n    onOpenChange(false);\n  };\n  const handleHideFor7Days = () => {\n    if (isConnecting) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: SECTION_NAME,\n      section_title: TITLE,\n      position: -1,\n      button_id: \"dismiss_for_7d\",\n      button_name: TERTIARY_ACTION_LABEL,\n      layout_id: `raffle_${raffleId}`\n    });\n    hideRaffleMssOneNudgeFor7Days();\n    originalRaffleHandler();\n    onOpenChange(false);\n  };\n  return {\n    open,\n    onOpenChange,\n    isMobileDevice,\n    modalContent: {\n      title: TITLE,\n      description: DESCRIPTION\n    },\n    actions: {\n      primary: {\n        label: PRIMARY_ACTION_LABEL,\n        onClick: () => void handleIntegrateAndApply(),\n        pending: isConnecting\n      },\n      secondary: {\n        label: SECONDARY_ACTION_LABEL,\n        onClick: handleSkipAndApply,\n        disabled: isConnecting\n      },\n      tertiary: {\n        label: TERTIARY_ACTION_LABEL,\n        onClick: handleHideFor7Days\n      }\n    }\n  };\n};\nexport {\n  useMssOneNudgeModal\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { Dialog as M } from \"../../../../../node_modules/@29cm/ruler-ui/dist/components/Dialog/Dialog.js\";\nimport { AppCompatBottomSheet } from \"../../../../../containers/UIContainer/AppCompatBottomSheet.js\";\nimport { NudgeModalContent } from \"./RaffleMssOneNudgeModalContent.js\";\nimport { useMssOneNudgeModal } from \"./useMssOneNudgeModal.js\";\nconst RaffleMssOneNudgeModal = () => {\n  const {\n    open,\n    onOpenChange,\n    isMobileDevice,\n    modalContent,\n    actions\n  } = useMssOneNudgeModal();\n  if (isMobileDevice) {\n    return /* @__PURE__ */ jsx(AppCompatBottomSheet, { open, onOpenChange, title: modalContent.title, description: modalContent.description, primaryAction: actions.primary, secondaryAction: actions.secondary, tertiaryAction: actions.tertiary, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      padding: \"0 20px 16px\"\n    }, children: /* @__PURE__ */ jsx(NudgeModalContent, {}) }) });\n  }\n  return /* @__PURE__ */ jsx(M, { open, onOpenChange, title: modalContent.title, description: modalContent.description, primaryAction: actions.primary, secondaryAction: actions.secondary, tertiaryAction: actions.tertiary, children: /* @__PURE__ */ jsx(NudgeModalContent, {}) });\n};\nexport {\n  RaffleMssOneNudgeModal\n};\n","import useSWR from \"../../../../../../node_modules/swr/core/dist/index.js\";\nimport { authApi } from \"../../../../../../apis/auth/AuthApiService.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nconst useRaffleData = () => {\n  const {\n    raffleId,\n    raffleGroupId,\n    accountState\n  } = useRaffleModalContext();\n  const open = accountState.showConnectedModal;\n  const {\n    data: oneLoginData,\n    isLoading\n  } = useSWR(open ? \"mss-connected\" : null, () => authApi.getOneLoginNoticeData().then((res) => res.data || void 0));\n  const {\n    data: raffleApplicableData\n  } = useSWR(open ? \"raffle-applicable\" : null, () => raffleApi.getRaffleApplicable(raffleGroupId, raffleId).then((res) => res.data));\n  return {\n    oneLoginData,\n    isLoading,\n    raffleApplicableData\n  };\n};\nexport {\n  useRaffleData\n};\n","import { useMemo } from \"react\";\nimport useSWRMutation from \"../../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { RaffleAgreementRequirement } from \"../../../../../../apis/raffle/RaffleApiService.types.js\";\nimport \"react/jsx-runtime\";\nimport \"../../../../../../node_modules/styled-jsx/dist/index/index.js\";\nimport \"../../../../../@shared/TextButton/TextButton.js\";\nimport \"../../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../../../config/index.js\";\nimport \"../../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../../../utils/redirectLogin.js\";\nimport \"../../../../../../utils/event-properties/source.js\";\nimport { useAgreementCheckListControl } from \"../../../../../@shared/AgreementCheckList/AgreementCheckList.hooks.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nconst useRaffleAgreements = (raffleApplicableData) => {\n  const {\n    raffleId,\n    raffleGroupId\n  } = useRaffleModalContext();\n  const agreements = useMemo(() => {\n    var _a, _b;\n    return ((_b = (_a = raffleApplicableData == null ? void 0 : raffleApplicableData.agreementInformation) == null ? void 0 : _a.filter((agreement) => !agreement.isAgreed)) == null ? void 0 : _b.map((agreement) => ({\n      type: agreement.agreementType,\n      label: agreement.label,\n      detailLink: agreement.linkUrl,\n      isRequired: agreement.agreementRequirement === RaffleAgreementRequirement.Required\n    }))) || [];\n  }, [raffleApplicableData]);\n  const hasAgreements = agreements.length > 0;\n  const hasRequiredAgreements = agreements.some((agreement) => agreement.isRequired);\n  const {\n    agreementsState,\n    agreements: richAgreements,\n    isAllRequiredAgreementsChecked\n  } = useAgreementCheckListControl(agreements);\n  const {\n    trigger: raffleAgree,\n    isMutating: isRaffleAgreeMutating\n  } = useSWRMutation(\"raffle-agree\", (_, {\n    arg\n  }) => raffleApi.postRaffleGroupAgreementsAgree({\n    raffleGroupId: arg.raffleGroupId,\n    raffleId: arg.raffleId,\n    agreementTypes: arg.agreementTypes\n  }));\n  const submitAgreements = async (agreementTypes) => {\n    if (agreementTypes.length > 0) {\n      await raffleAgree({\n        raffleGroupId,\n        raffleId,\n        agreementTypes\n      });\n    }\n  };\n  return {\n    agreements: richAgreements,\n    agreementsState,\n    hasAgreements,\n    hasRequiredAgreements,\n    isAllRequiredAgreementsChecked,\n    isRaffleAgreeMutating,\n    submitAgreements\n  };\n};\nexport {\n  useRaffleAgreements\n};\n","import { useState, useRef, useEffect } from \"react\";\nimport useSWRMutation from \"../../../../../../node_modules/swr/mutation/dist/index.js\";\nimport { raffleApi } from \"../../../../../../apis/raffle/RaffleApiService.js\";\nimport { useRaffleModalContext } from \"../../../providers/RaffleModalProvider.js\";\nimport { alertDialog } from \"../../../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nconst useConnectedModalState = (raffleApplicableData, hasAgreements) => {\n  const {\n    raffleId,\n    raffleGroupId,\n    accountState,\n    updateAccountState,\n    revalidateDisplayInformation\n  } = useRaffleModalContext();\n  const [modalState, setModalState] = useState(\"connected\");\n  const [isApplying, setIsApplying] = useState(false);\n  const hasExecutedDirectApply = useRef(false);\n  const open = accountState.showConnectedModal;\n  const onOpenChange = (isOpen) => updateAccountState({\n    showConnectedModal: isOpen\n  });\n  const onRaffleComplete = () => updateAccountState({\n    showConnectedModal: false\n  });\n  const {\n    trigger: raffleApply,\n    isMutating: isRaffleApplyMutating\n  } = useSWRMutation(\"raffle-apply\", (_, {\n    arg\n  }) => raffleApi.postRaffleApply(arg.raffleGroupId, arg.raffleId));\n  const resetState = () => {\n    hasExecutedDirectApply.current = false;\n    setModalState(\"connected\");\n  };\n  useEffect(() => {\n    if (open) {\n      hasExecutedDirectApply.current = false;\n    }\n  }, [open]);\n  const handleRaffleApplication = async () => {\n    if (!raffleId || isRaffleApplyMutating) {\n      return;\n    }\n    try {\n      await raffleApply({\n        raffleGroupId,\n        raffleId\n      });\n      revalidateDisplayInformation();\n      setModalState(\"completed\");\n    } catch (error) {\n      alertDialog.show({\n        title: \"응모 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.\",\n        description: \"\",\n        primaryAction: {\n          label: \"확인\"\n        }\n      });\n      onOpenChange(false);\n    } finally {\n      setIsApplying(false);\n    }\n  };\n  const handleComplete = () => {\n    onRaffleComplete();\n    onOpenChange(false);\n    resetState();\n  };\n  useEffect(() => {\n    if (raffleApplicableData && !hasAgreements && modalState === \"connected\" && !hasExecutedDirectApply.current) {\n      hasExecutedDirectApply.current = true;\n      handleRaffleApplication();\n    }\n  }, [raffleApplicableData, hasAgreements, modalState]);\n  const shouldShowModal = () => {\n    if (modalState === \"completed\") {\n      return true;\n    }\n    if (modalState === \"connected\" && raffleApplicableData && hasAgreements) {\n      return true;\n    }\n    return false;\n  };\n  return {\n    open,\n    modalState,\n    shouldShowModal: shouldShowModal(),\n    onOpenChange,\n    // 내부 상태 관리용\n    isApplying,\n    setIsApplying,\n    handleComplete\n  };\n};\nexport {\n  useConnectedModalState\n};\n","import \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport { alertDialog } from \"../../../../../containers/AlertDialogContainer/AlertDialogContainer.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { useRaffleData } from \"./hooks/useRaffleData.js\";\nimport { useRaffleAgreements } from \"./hooks/useRaffleAgreements.js\";\nimport { useConnectedModalState } from \"./hooks/useConnectedModalState.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { mapTypesToString } from \"../../../../../utils/agreementMapper.js\";\nimport { AgreementType } from \"../../../../../types/agreement.js\";\nimport { SECTION_NAME } from \"./RaffleMssOneConnectedModal.js\";\nconst TITLE = \"계정 통합 완료!\\n래플 응모를 완료하려면 동의가 필요해요.\";\nconst COMPLETED_TITLE = \"계정 통합과 이벤트 참여가\\n모두 완료되었어요\";\nconst AGREEMENT_TYPE_MAP = {\n  [AgreementType.PersonalInformation]: \"personal_agree\",\n  [AgreementType.Privacy]: \"mkt_agree\",\n  [AgreementType.Advertising]: \"ad_agree\"\n};\nconst useMssOneConnectedModal = () => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    raffleId,\n    originalRaffleHandler\n  } = useRaffleModalContext();\n  const {\n    raffleApplicableData\n  } = useRaffleData();\n  const {\n    agreements,\n    agreementsState,\n    hasAgreements,\n    hasRequiredAgreements,\n    isAllRequiredAgreementsChecked,\n    isRaffleAgreeMutating,\n    submitAgreements\n  } = useRaffleAgreements(raffleApplicableData);\n  const {\n    open,\n    modalState,\n    shouldShowModal,\n    onOpenChange,\n    isApplying,\n    setIsApplying,\n    handleComplete\n  } = useConnectedModalState(raffleApplicableData, hasAgreements);\n  const handleAgreementAndRaffle = async () => {\n    if (!raffleId || isRaffleAgreeMutating || isApplying) {\n      return;\n    }\n    setIsApplying(true);\n    try {\n      const agreedAgreementTypes = Object.entries(agreementsState).filter(([, agreed]) => agreed).map(([type]) => type);\n      await submitAgreements(agreedAgreementTypes);\n      originalRaffleHandler();\n      onOpenChange(false);\n    } catch (error) {\n      alertDialog.show({\n        title: \"동의 처리 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.\",\n        description: \"\",\n        primaryAction: {\n          label: \"확인\"\n        }\n      });\n    } finally {\n      setIsApplying(false);\n    }\n  };\n  const getTitle = () => {\n    switch (modalState) {\n      case \"completed\":\n        return COMPLETED_TITLE;\n      default:\n        return TITLE;\n    }\n  };\n  const getDescription = () => {\n    switch (modalState) {\n      case \"completed\":\n        return \"당첨 시 회원 정보에 입력된 연락처로 안내드려요.\";\n      default:\n        return \"\";\n    }\n  };\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const getPrimaryAction = () => {\n    if (modalState === \"connected\") {\n      return {\n        label: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n        onClick: () => {\n          const agreedAgreements = agreements.filter((agreement) => agreementsState[agreement.type]);\n          trackSnowplowEvent(\"click_button\", {\n            section_name: SECTION_NAME,\n            section_title: getTitle(),\n            position: -1,\n            button_id: \"info_agree_confirm\",\n            button_name: hasRequiredAgreements ? \"동의 후 응모하기\" : \"응모하기\",\n            layout_id: `raffle_${raffleId}`,\n            option_name: mapTypesToString(AGREEMENT_TYPE_MAP, agreedAgreements)\n          });\n          handleAgreementAndRaffle();\n        },\n        pending: isApplying,\n        disabled: hasRequiredAgreements && !isAllRequiredAgreementsChecked\n      };\n    }\n    if (modalState === \"completed\") {\n      return {\n        label: \"확인\",\n        onClick: handleComplete\n      };\n    }\n    return void 0;\n  };\n  const getSecondaryAction = () => {\n    if (modalState === \"connected\") {\n      return {\n        label: \"다음에 응모하기\",\n        onClick: () => {\n          trackSnowplowEvent(\"click_button\", {\n            section_name: SECTION_NAME,\n            section_title: getTitle(),\n            position: -1,\n            button_id: \"cancel\",\n            button_name: \"다음에 응모하기\",\n            layout_id: `raffle_${raffleId}`\n          });\n          onOpenChange(false);\n        }\n      };\n    }\n    return void 0;\n  };\n  return {\n    // 모달 표시 제어\n    open,\n    shouldShowModal,\n    onOpenChange,\n    // UI 렌더링\n    isMobileDevice,\n    modalState,\n    title: getTitle(),\n    description: getDescription(),\n    primaryAction: getPrimaryAction(),\n    secondaryAction: getSecondaryAction(),\n    // 컨텐츠 렌더링용 데이터\n    agreements,\n    hasAgreements\n  };\n};\nexport {\n  useMssOneConnectedModal\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { QRCodeSVG } from \"../../../../../node_modules/qrcode.react/lib/esm/index.js\";\nimport \"react\";\nimport \"framer\";\nimport { typography } from \"../../../../../styles/typography.js\";\nimport { AgreementCheckList } from \"../../../../@shared/AgreementCheckList/AgreementCheckList.js\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../apis/user/UserApiService.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../hooks/useFeatureFlag.js\";\nimport { useIsMobileDevice } from \"../../../../../hooks/useIsMobileDevice.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useCreateOneLink } from \"../../../../../hooks/useCreateOneLink.js\";\nimport { getCurrentHref } from \"../../../../../utils/getCurrentHref.js\";\nimport { useRaffleData } from \"./hooks/useRaffleData.js\";\nimport { shouldDisplayAgreeAllCheckbox } from \"../../../../../utils/raffle/raffleAgreementUtils.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useRaffleModalContext } from \"../../providers/RaffleModalProvider.js\";\nimport { Intersection } from \"../../../../@shared/Intersection/Intersection.js\";\nimport \"../../../../@shared/Icon/Icon.js\";\nimport { SECTION_NAME } from \"./RaffleMssOneConnectedModal.js\";\nconst completedContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: 16\n};\nconst qrContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  gap: 12,\n  paddingTop: 36,\n  paddingBottom: 16,\n  minWidth: 420,\n  borderRadius: 8,\n  backgroundColor: \"#000000\",\n  color: \"#ffffff\"\n};\nconst qrCodeWrapperStyle = {\n  padding: 4,\n  borderRadius: 8,\n  backgroundColor: \"#ffffff\"\n};\nconst ConnectedModalContent = ({\n  modalState,\n  title,\n  agreements,\n  hasAgreements\n}) => {\n  const isMobileDevice = useIsMobileDevice();\n  const {\n    oneLoginData,\n    isLoading\n  } = useRaffleData();\n  const {\n    oneLink\n  } = useCreateOneLink(getCurrentHref({\n    removeQueryParams: true\n  }));\n  const {\n    raffleId\n  } = useRaffleModalContext();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const renderConnectedStep = () => /* @__PURE__ */ jsxs(\"div\", { children: [\n    /* @__PURE__ */ jsx(ConnectedDetail, { data: oneLoginData, isLoading }),\n    hasAgreements && /* @__PURE__ */ jsx(Intersection, { onView: () => {\n      trackSnowplowEvent(\"impression_popup\", {\n        section_name: SECTION_NAME,\n        section_title: title,\n        popup_id: \"info_agree\",\n        popup_type: isMobileDevice ? \"bottomsheet\" : \"dialog\",\n        layout_id: `raffle_${raffleId}`\n      });\n    }, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      marginTop: \"20px\"\n    }, children: /* @__PURE__ */ jsx(AgreementCheckList, { agreements, displayAgreeAllCheckBox: shouldDisplayAgreeAllCheckbox(agreements) }) }) })\n  ] });\n  const renderCompletedStep = () => /* @__PURE__ */ jsxs(\"div\", { style: {\n    ...completedContainerStyle,\n    ...isMobileDevice && {\n      padding: \"0 20px 12px\"\n    }\n  }, children: [\n    /* @__PURE__ */ jsx(ConnectedDetail, { data: oneLoginData, isLoading }),\n    !isMobileDevice && /* @__PURE__ */ jsxs(\"div\", { style: qrContainerStyle, children: [\n      /* @__PURE__ */ jsx(\"div\", { style: qrCodeWrapperStyle, children: /* @__PURE__ */ jsx(QRCodeSVG, { value: oneLink, size: 150, bgColor: \"#ffffff\", fgColor: \"#000000\", includeMargin: false }) }),\n      /* @__PURE__ */ jsxs(\"p\", { style: {\n        ...typography(14),\n        textAlign: \"center\"\n      }, children: [\n        \"앱 설치하면 더 정확한 소식을 받을 수 있어요.\",\n        /* @__PURE__ */ jsx(\"br\", {}),\n        \"카메라 앱을 열어 QR 코드를 비춰보세요.\"\n      ] })\n    ] })\n  ] });\n  switch (modalState) {\n    case \"connected\":\n      return renderConnectedStep();\n    case \"completed\":\n      return renderCompletedStep();\n    default:\n      return null;\n  }\n};\nconst connectedDetailStyle = {\n  background: \"#F5F5F5\",\n  padding: 12,\n  borderRadius: 4\n};\nconst subDescriptionStyle = {\n  ...typography(14, 400),\n  color: \"#666666\"\n};\nconst ConnectedDetail = ({\n  data,\n  isLoading\n}) => {\n  if (isLoading) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { style: connectedDetailStyle, children: [\n    (data == null ? void 0 : data.boxDescription) && /* @__PURE__ */ jsxs(\"p\", { style: typography(14, 400), children: [\n      data.boxTitle && `${data.boxTitle}: `,\n      data.boxDescription\n    ] }),\n    (data == null ? void 0 : data.boxSubDescription) && /* @__PURE__ */ jsx(\"p\", { style: subDescriptionStyle, children: data.boxSubDescription })\n  ] });\n};\nexport {\n  ConnectedModalContent\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { Dialog as M } from \"../../../../../node_modules/@29cm/ruler-ui/dist/components/Dialog/Dialog.js\";\nimport { AppCompatBottomSheet } from \"../../../../../containers/UIContainer/AppCompatBottomSheet.js\";\nimport { useMssOneConnectedModal } from \"./useMssOneConnectedModal.js\";\nimport { ConnectedModalContent } from \"./RaffleMssOneConnectedModalContent.js\";\nconst SECTION_NAME = \"RaffleMssOneConnectedModal\";\nconst RaffleMssOneConnectedModal = () => {\n  const {\n    open,\n    shouldShowModal,\n    isMobileDevice,\n    title,\n    description,\n    primaryAction,\n    secondaryAction,\n    // 컨텐츠 렌더링을 위한 데이터\n    modalState,\n    onOpenChange,\n    agreements,\n    hasAgreements\n  } = useMssOneConnectedModal();\n  if (!shouldShowModal) {\n    return null;\n  }\n  if (isMobileDevice) {\n    return /* @__PURE__ */ jsx(AppCompatBottomSheet, { open, onOpenChange, title, description, primaryAction, secondaryAction, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      padding: modalState === \"connected\" ? \"0 20px 12px\" : \"0\"\n    }, children: /* @__PURE__ */ jsx(ConnectedModalContent, { modalState, title, agreements, hasAgreements }) }) });\n  }\n  return /* @__PURE__ */ jsx(M, { open, onOpenChange, title, description, primaryAction, secondaryAction, children: /* @__PURE__ */ jsx(ConnectedModalContent, { modalState, title, agreements, hasAgreements }) });\n};\nexport {\n  RaffleMssOneConnectedModal,\n  SECTION_NAME\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { createContext, useState, useMemo, useContext } from \"react\";\nimport { RaffleMssOneNudgeModal } from \"../modals/RaffleMssOneNudgeModal/RaffleMssOneNudgeModal.js\";\nimport { RaffleMssOneConnectedModal } from \"../modals/RaffleMssOneConnectedModal/RaffleMssOneConnectedModal.js\";\nconst RaffleModalContext = createContext(null);\nconst initialAccountState = {\n  isConnected: false,\n  isLoading: false,\n  showNudgeModal: false,\n  showConnectedModal: false\n};\nconst RaffleModalProvider = ({\n  children,\n  raffleId,\n  raffleGroupId,\n  originalRaffleHandler,\n  elementRef,\n  revalidateDisplayInformation\n}) => {\n  const [accountState, setAccountState] = useState(initialAccountState);\n  const updateAccountState = (updates) => {\n    setAccountState((prev) => ({\n      ...prev,\n      ...updates\n    }));\n  };\n  const contextValue = useMemo(() => ({\n    raffleId,\n    raffleGroupId,\n    accountState,\n    updateAccountState,\n    originalRaffleHandler,\n    revalidateDisplayInformation,\n    elementRef\n  }), [raffleId, raffleGroupId, accountState, originalRaffleHandler, revalidateDisplayInformation, elementRef]);\n  return /* @__PURE__ */ jsxs(RaffleModalContext.Provider, { value: contextValue, children: [\n    children,\n    /* @__PURE__ */ jsx(RaffleMssOneNudgeModal, {}),\n    /* @__PURE__ */ jsx(RaffleMssOneConnectedModal, {})\n  ] });\n};\nconst useRaffleModalContext = () => {\n  const context = useContext(RaffleModalContext);\n  if (!context) {\n    throw new Error(\"useRaffleModalContext must be used within a RaffleModalProvider\");\n  }\n  return context;\n};\nexport {\n  RaffleModalProvider,\n  useRaffleModalContext\n};\n","import { isRaffleMssOneNudgeHidden } from \"../../../../utils/raffle/raffleMssOneNudgeVisibility.js\";\nimport { useRaffleModalContext } from \"../providers/RaffleModalProvider.js\";\nimport { useCheckOne } from \"../../../../hooks/mss-one/useCheckOne.js\";\nimport \"react\";\nimport \"../../../../config/index.js\";\nimport \"../../../../hooks/amplitude-variant/WebAmplitudeService.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../apis/framer/FramerApiService.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react/jsx-runtime\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport { useWithLogin } from \"../../../../hooks/useWithLogin.js\";\nconst RaffleButtonWithAccountIntegration = ({\n  enableAccountIntegration,\n  children\n}) => {\n  const {\n    onCheckOne\n  } = useCheckOne();\n  const {\n    accountState,\n    updateAccountState,\n    originalRaffleHandler\n  } = useRaffleModalContext();\n  const withLogin = useWithLogin();\n  const handleRaffleClick = withLogin(async () => {\n    if (!enableAccountIntegration) {\n      originalRaffleHandler();\n      return;\n    }\n    updateAccountState({\n      isLoading: true\n    });\n    try {\n      const isOne = await onCheckOne();\n      if (isOne) {\n        originalRaffleHandler();\n      } else {\n        if (isRaffleMssOneNudgeHidden()) {\n          originalRaffleHandler();\n          return;\n        }\n        updateAccountState({\n          showNudgeModal: true,\n          isConnected: false\n        });\n      }\n    } catch (error) {\n      originalRaffleHandler();\n    } finally {\n      updateAccountState({\n        isLoading: false\n      });\n    }\n  });\n  return children({\n    onClick: () => {\n      handleRaffleClick();\n    },\n    isLoading: accountState.isLoading\n  });\n};\nexport {\n  RaffleButtonWithAccountIntegration\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { useMemo, useCallback, useEffect, useRef } from \"react\";\nimport \"../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport { useCurrentUser } from \"../../../hooks/useCurrentUser.js\";\nimport { isContentOrigin } from \"../../../utils/location.js\";\nimport \"../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../apis/framer/FramerApiService.js\";\nimport \"../../../config/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../hooks/stores/content/content.store.js\";\nimport \"../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../hooks/stores/toast/toast.store.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { SWRErrorBoundary } from \"../../@shared/SWRErrorBoundary/SWRErrorBoundary.js\";\nimport { Button as Default } from \"../../@shared/Button/Button.js\";\nimport \"../curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useFetchRaffleData } from \"./hooks/useFetchRaffleData.js\";\nimport { useRaffleStatus } from \"./hooks/useRaffleStatus.js\";\nimport { useRaffleActions } from \"./hooks/useRaffleActions.js\";\nimport { getCurrentRaffle, reshapeRaffleButtonProps } from \"./RaffleButton.utils.js\";\nimport { RaffleStatus } from \"./RaffleButton.types.js\";\nimport { BUTTON_VARIANT_CONTROLS, BUTTON_THEME_CONTROLS, BUTTON_SIZE_CONTROLS, BUTTON_FILL_CONTROLS } from \"../../../libs/property-controls/button.js\";\nimport { SectionLayout } from \"../curations/SectionLayout/SectionLayout.js\";\nimport { useComponentId } from \"../curations/EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../curations/EventTrackingProvider/EventTrackingProvider.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { useTrackSnowplowEvent } from \"../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { RaffleModalProvider } from \"./providers/RaffleModalProvider.js\";\nimport { RaffleButtonWithAccountIntegration } from \"./components/RaffleButtonWithAccountIntegration.js\";\nconst RaffleButtonInner = ({\n  raffleGroupId,\n  raffleId,\n  button\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    logged\n  } = useCurrentUser();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const {\n    raffleGroup,\n    displayInformation,\n    isPending,\n    revalidateDisplayInformation\n  } = useFetchRaffleData({\n    raffleGroupId,\n    raffleId,\n    enabled: isInView,\n    shouldFetchDisplayInformation: logged && isContentOrigin()\n  });\n  const currentRaffle = useMemo(() => getCurrentRaffle((raffleGroup == null ? void 0 : raffleGroup.raffleList) ?? [], raffleId), [raffleGroup, raffleId]);\n  const status = useRaffleStatus(currentRaffle);\n  const {\n    buttonText,\n    disabled,\n    ...buttonProps\n  } = reshapeRaffleButtonProps({\n    status,\n    props: button,\n    raffle: currentRaffle,\n    displayInformation\n  });\n  const componentId = useComponentId();\n  const handleImpression = useCallback(() => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      layout_id: `raffle_${raffleId}`\n    });\n  }, [componentId, raffleId, trackSnowplowEvent]);\n  const {\n    handleClick\n  } = useRaffleActions({\n    raffleGroupId,\n    raffleId,\n    raffle: currentRaffle,\n    status,\n    onSuccess: () => {\n      revalidateDisplayInformation();\n    }\n  });\n  useEffect(() => {\n    if (!isInView) {\n      return;\n    }\n    handleImpression();\n  }, [handleImpression, isInView]);\n  const buttonRef = useRef(null);\n  const enableAccountIntegration = status === RaffleStatus.InProgress;\n  return /* @__PURE__ */ jsx(RaffleModalProvider, { raffleGroupId, raffleId, originalRaffleHandler: handleClick({\n    componentId,\n    buttonText\n  }), elementRef: buttonRef, revalidateDisplayInformation, children: /* @__PURE__ */ jsx(RaffleButtonWithAccountIntegration, { enableAccountIntegration, children: ({\n    onClick,\n    isLoading\n  }) => /* @__PURE__ */ jsx(Default, { ...buttonProps, onClick, pending: isPending || status === RaffleStatus.Unknown || isLoading, disabled, ref: buttonRef, children: buttonText }) }) });\n};\nconst RedoButton = ({\n  button,\n  onClick\n}) => {\n  return /* @__PURE__ */ jsx(Default, { ...button, onClick, prefixIcon: \"redo\", children: \"새로고침\" });\n};\nconst RaffleButton = ({\n  componentId,\n  ...props\n}) => {\n  return /* @__PURE__ */ jsx(SectionLayout, { componentId, intersectionOptions: {\n    margin: \"700px 200px\"\n  }, children: /* @__PURE__ */ jsx(SWRErrorBoundary, { fallback: (retry) => /* @__PURE__ */ jsx(RedoButton, { button: props.button, onClick: retry }), children: /* @__PURE__ */ jsx(RaffleButtonInner, { ...props }) }) });\n};\naddPropertyControls(RaffleButton, {\n  raffleGroupId: {\n    type: ControlType.String,\n    title: \"래플 그룹 ID\",\n    placeholder: \"래플 그룹 ID\"\n  },\n  raffleId: {\n    type: ControlType.String,\n    title: \"래플 ID\",\n    placeholder: \"래플 ID\"\n  },\n  ...COMPONENT_ID_PROPS,\n  button: {\n    type: ControlType.Object,\n    title: \"버튼 옵션\",\n    controls: {\n      ...BUTTON_VARIANT_CONTROLS,\n      ...BUTTON_THEME_CONTROLS,\n      ...BUTTON_SIZE_CONTROLS,\n      ...BUTTON_FILL_CONTROLS\n    }\n  }\n});\nexport {\n  RaffleButton\n};\n","/** local */// import { RaffleButton } from \"https://localhost:4173/components/systems/RaffleButton/RaffleButton.js\"\n/** dev */// import { RaffleButton } from \"https://asset.29cm.co.kr/contents/framer/dev/components/systems/RaffleButton/RaffleButton.js\"\n/** production */import{RaffleButton}from\"https://asset.29cm.co.kr/contents/framer/components/systems/RaffleButton/RaffleButton.js\";/**\n * @framerDisableUnlink\n */export default RaffleButton;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RaffleButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RaffleButton.map"],"ignoreList":[11],"mappings":"A,2wDAEM,GAAqC,6BACrC,IAAwC,EAAe,IAAa,CACxE,IAAMwL,EAAU,EAAQC,GAAkB,EAAQC,EAC5C,CACJ,OACA,YACA,QACA,UACEhF,GAAW8E,EAAU,CAACH,GAAoCI,EAAeC,CAAQ,EAAI,SAAYrG,EAAU,4BAA4BoG,EAAeC,CAAQ,CAAC,EAC7JC,EAAYC,GAAa,CAACJ,EAChC,MAAO,CACL,mBAAoBK,GAA6B,KACjD,YACA,QACA,QACF,CACF,C,4DCfM,IAAsB,CAC1B,gBACA,WACA,UACA,mCACI,CACJ,GAAM,CACJ,cACA,MAAOG,EACP,UAAWC,GACTxB,GAAwBgB,CAAa,EACnC,CACJ,qBACA,MAAOS,EACP,UAAWC,EACX,OAAQC,GACNd,GAAqCG,EAAeC,CAAQ,EAUhE,OATAhK,MAAgB,CACV8J,IACFQ,EAAiB,EACbK,GACFH,EAA8B,EAGpC,EAAG,CAACV,EAASa,CAA6B,CAAC,EAEpC,CACL,cACA,qBACA,UAJgBJ,GAAwBI,GAAiCF,EAKzE,8BACF,CACF,C,6CCnCI,EAA+B,iBAAE,IACnC,EAAc,EAAcK,QAAa,GAAK,UAC9C,EAAc,EAAcC,WAAgB,GAAK,aACjD,EAAc,EAAcC,SAAc,GAAK,WAC/C,EAAc,EAAcC,QAAa,GAAK,UACvCC,GACT,CAAGN,GAAgB,CAAC,CAAC,C,oFCAf,GAAe,IACf,IAAmB,EAAW,IAAa,CAC/C,OAAQ,GAAR,CACE,KAAKY,EAAYL,GACf,OAAOP,EAAa,SACtB,KAAKY,EAAYC,EAAWN,GAC1B,OAAOP,EAAa,WACtB,QACE,OAAOA,EAAa,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