{"version":3,"file":"useIdentityVerificationModal.Nxf2fRVc.mjs","names":["Default","Default$1","Fragment","useState","DIALOG_ID","useMemo","Fragment"],"sources":["https:/asset.29cm.co.kr/contents/framer/types/agreement.js","https:/asset.29cm.co.kr/contents/framer/apis/APIService.types.js","https:/asset.29cm.co.kr/contents/framer/apis/raffle/RaffleApiService.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useLazyFetchRaffleGroup.js","https:/asset.29cm.co.kr/contents/framer/apis/raffle/RaffleApiService.types.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/bottom-sheets/TwoButtonBottomSheetContent/TwoButtonBottomSheetContent.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/AgreementCheckList/AgreementCheckList.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/AgreementCheckList/AgreementCheckList.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/bottom-sheets/AgreementsBottomSheet/AgreementsBottomSheet.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/bottom-sheets/AgreementsBottomSheet/AgreementsBottomSheet.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AgreementsDialog/AgreementsDialog.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/AgreementsDialog/AgreementsDialog.hooks.js","https:/asset.29cm.co.kr/contents/framer/utils/agreementMapper.js","https:/asset.29cm.co.kr/contents/framer/hooks/useAgreementsModal.js","https:/asset.29cm.co.kr/contents/framer/utils/raffle/raffleAgreementUtils.js","https:/asset.29cm.co.kr/contents/framer/hooks/useIsCallJsPayloadUnSupported.js","https:/asset.29cm.co.kr/contents/framer/hooks/useSubscribeIdentityVerification.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/bottom-sheets/IdentityVerificationBottomSheet/IdentityVerificationBottomSheet.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/bottom-sheets/IdentityVerificationBottomSheet/IdentityVerificationBottomSheet.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/IdentityVerificationDialog/IdentityVerificationDialog.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/dialogs/IdentityVerificationDialog/IdentityVerificationDialog.hooks.js","https:/asset.29cm.co.kr/contents/framer/utils/openPopup.js","https:/asset.29cm.co.kr/contents/framer/utils/openIdentifyVerificationPopup.js","https:/asset.29cm.co.kr/contents/framer/hooks/useIdentityVerificationModal.js"],"sourcesContent":["var AgreementType = /* @__PURE__ */ ((AgreementType2) => {\n  AgreementType2[\"PersonalInformation\"] = \"PERSONAL_INFORMATION_AGREEMENT\";\n  AgreementType2[\"Privacy\"] = \"PRIVACY_AGREEMENT\";\n  AgreementType2[\"Advertising\"] = \"ADVERTISING_AGREEMENT\";\n  return AgreementType2;\n})(AgreementType || {});\nexport {\n  AgreementType\n};\n","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n  __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n  return value;\n};\nclass APIError extends Error {\n  constructor(message, errorCode, data) {\n    super(message);\n    /** 서버에서 반환한 에러 코드 (예: 'COMMON_INVALID_PARAMETER') */\n    __publicField(this, \"errorCode\");\n    /** 서버 응답의 전체 데이터 */\n    __publicField(this, \"data\");\n    this.name = \"APIError\";\n    this.errorCode = errorCode;\n    this.data = data;\n  }\n}\nexport {\n  APIError\n};\n","import { APIService } from \"../APIService.js\";\nimport { AgreementType } from \"../../types/agreement.js\";\nimport { env } from \"../../config/index.js\";\nimport { APIError } from \"../APIService.types.js\";\nimport { GENERAL_ERROR } from \"../../constants/error.js\";\nconst reservedErrorMessages = [\"RAFFLE_CERTIFICATION_FAILED\"];\nconst throwFailError = (response) => {\n  const isFailError = response.result === \"FAIL\" || response.data === null;\n  const isReservedErrorMessage = response.errorCode !== null && reservedErrorMessages.includes(response.errorCode);\n  if (isFailError && isReservedErrorMessage) {\n    throw new Error(response.message ?? GENERAL_ERROR);\n  }\n  if (isFailError) {\n    throw new Error(GENERAL_ERROR);\n  }\n};\nclass RaffleApiService extends APIService {\n  constructor() {\n    super();\n    this.setBaseUrl(env.api.content);\n    this.setMiddleware(throwFailError);\n  }\n  async getRaffleGroup(raffleGroupId) {\n    return this.get(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}`);\n  }\n  async getRaffleDisplayInformation(raffleGroupId, raffleId) {\n    return this.get(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/display-information`, void 0, {\n      credentials: \"include\"\n    });\n  }\n  async getRaffleNotificationApplicable(raffleGroupId, raffleId) {\n    return this.get(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/notification-applicable`, void 0, {\n      credentials: \"include\"\n    });\n  }\n  async getRaffleApplicable(raffleGroupId, raffleId) {\n    return this.get(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/raffle-applicable`, void 0, {\n      credentials: \"include\"\n    });\n  }\n  async getInfiniteEntryRaffleApplicable(raffleGroupId) {\n    return this.get(`/api/v5/raffle-groups/${raffleGroupId}/raffle-applicable`, void 0, {\n      credentials: \"include\"\n    });\n  }\n  async postRaffleGroupAgreementsAgree({\n    raffleGroupId,\n    raffleId,\n    agreementTypes\n  }) {\n    const agreements = agreementTypes.filter((agreementType) => this.isDefinedRaffleAgreementType(agreementType));\n    return this.post(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/agreements/agree`, {\n      agreements\n    }, {\n      credentials: \"include\"\n    });\n  }\n  isDefinedRaffleAgreementType(value) {\n    return [AgreementType.Advertising, AgreementType.Privacy, AgreementType.PersonalInformation].includes(value);\n  }\n  async getRaffleGroupAgreementStatus(raffleGroupId, actionType = \"SHARE\") {\n    return this.get(`/api/v5/raffle-groups/${raffleGroupId}/agreements`, {\n      actionType\n    }, {\n      credentials: \"include\"\n    });\n  }\n  async postRaffleGroupAgreements({\n    raffleGroupId,\n    agreementTypes\n  }) {\n    const agreements = agreementTypes.filter((agreementType) => this.isDefinedRaffleAgreementType(agreementType));\n    return this.post(`/api/v5/raffle-groups/${raffleGroupId}/agreements/agree`, {\n      agreements\n    }, {\n      credentials: \"include\"\n    });\n  }\n  async postRaffleApply(raffleGroupId, raffleId) {\n    return this.post(`/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/raffle-apply`, void 0, {\n      credentials: \"include\"\n    });\n  }\n  /**\n   * 래플 응모 API (세밀한 에러 처리용)\n   *\n   * @description\n   * 특정 에러 코드별 처리가 필요한 경우 사용하세요.\n   * fetch로 직접 요청하여 APIService middleware를 우회합니다.\n   *\n   * @throws {APIError} COMMON_INVALID_PARAMETER 에러 시 서버 메시지, 기타 에러 시 기본 메시지\n   *\n   * @example\n   * ```typescript\n   * try {\n   *   await raffleApi.fetchRaffleApply(raffleGroupId, raffleId);\n   * } catch (error) {\n   *   if (error instanceof APIError && error.errorCode === 'COMMON_INVALID_PARAMETER') {\n   *     alert(error.message); // 서버 메시지 그대로\n   *   }\n   * }\n   * ```\n   */\n  async fetchRaffleApply(raffleGroupId, raffleId) {\n    const url = `${env.api.content}/api/v4/framers/proxy/content-api/api/v5/raffle-groups/${raffleGroupId}/raffles/${raffleId}/raffle-apply`;\n    const response = await fetch(url, {\n      method: \"POST\",\n      credentials: \"include\",\n      headers: {\n        \"Content-Type\": \"application/json\"\n      }\n    });\n    const data = await response.json();\n    if (!response.ok) {\n      throw new APIError(data.message ?? GENERAL_ERROR, data.errorCode, data);\n    }\n    return data;\n  }\n  async postRaffleGroupShareCallback(raffleGroupId, rewardKey) {\n    return this.post(`/api/v5/raffle-groups/${raffleGroupId}/shares/${rewardKey}/callback`, void 0, {\n      credentials: \"include\"\n    });\n  }\n}\nconst raffleApi = new RaffleApiService();\nexport {\n  raffleApi\n};\n","import { raffleApi } from \"../../apis/raffle/RaffleApiService.js\";\nimport { useLazySWR } from \"../swr/useLazySWR.js\";\nconst raffleGroupFetcherKey = \"raffle-group\";\nconst useLazyFetchRaffleGroup = (raffleGroupId) => {\n  const enabled = Boolean(raffleGroupId);\n  const {\n    data,\n    isLoading,\n    fetch,\n    mutate\n  } = useLazySWR(enabled ? [raffleGroupFetcherKey, raffleGroupId] : null, () => raffleApi.getRaffleGroup(raffleGroupId));\n  const isPending = isLoading || !enabled;\n  return {\n    raffleGroup: data == null ? void 0 : data.data,\n    isPending,\n    fetch,\n    mutate\n  };\n};\nexport {\n  useLazyFetchRaffleGroup\n};\n","var RaffleAgreementRequirement = /* @__PURE__ */ ((RaffleAgreementRequirement2) => {\n  RaffleAgreementRequirement2[\"Required\"] = \"REQUIRED\";\n  RaffleAgreementRequirement2[\"Optional\"] = \"OPTIONAL\";\n  return RaffleAgreementRequirement2;\n})(RaffleAgreementRequirement || {});\nexport {\n  RaffleAgreementRequirement\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { Button as Default } from \"../../Button/Button.js\";\nimport { TextButton as Default$1 } from \"../../TextButton/TextButton.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nconst TwoButtonBottomSheetContent = ({\n  title,\n  description,\n  primaryButtonText,\n  secondaryButtonText,\n  primaryButtonDisabled = false,\n  secondaryButtonDisabled = false,\n  content,\n  onPrimaryButtonClick,\n  onSecondaryButtonClick\n}) => {\n  const containerStyle = {\n    ...baseContainerStyle,\n    ...{\n      gap: content !== void 0 ? 12 : 20\n    }\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { style: containerStyle, children: [\n    /* @__PURE__ */ jsxs(\"div\", { style: textWrapperStyle, children: [\n      title && /* @__PURE__ */ jsx(\"h1\", { style: titleStyle, children: title }),\n      description && /* @__PURE__ */ jsx(\"p\", { style: descriptionStyle, children: description })\n    ] }),\n    content,\n    /* @__PURE__ */ jsxs(\"div\", { style: buttonWrapperStyle, children: [\n      primaryButtonText && /* @__PURE__ */ jsx(Default, { type: \"button\", variant: \"primary\", size: \"large\", onClick: onPrimaryButtonClick, disabled: primaryButtonDisabled, children: primaryButtonText }),\n      secondaryButtonText && /* @__PURE__ */ jsx(Default$1, { type: \"button\", variant: \"secondary\", size: \"small\", onClick: onSecondaryButtonClick, disabled: secondaryButtonDisabled, children: secondaryButtonText })\n    ] })\n  ] });\n};\nconst baseContainerStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  padding: \"0px 20px 34px\"\n};\nconst textWrapperStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: 12\n};\nconst titleStyle = {\n  /* title-l-bold */\n  ...typography(24, 700, 1.36),\n  whiteSpace: \"pre-wrap\"\n};\nconst descriptionStyle = {\n  /* text-xxl */\n  ...typography(15, 400, 1.5),\n  whiteSpace: \"pre-wrap\"\n};\nconst buttonWrapperStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: 10\n};\nexport {\n  TwoButtonBottomSheetContent\n};\n","import { jsxs, Fragment, jsx } from \"react/jsx-runtime\";\nimport { Checkbox } from \"../checkbox/Checkbox.js\";\nimport { createIsomorphicLink } from \"../../../utils/createIsomorphicLink.js\";\nimport { TextButton as Default } from \"../TextButton/TextButton.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 \"../../../config/index.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.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 { useIsMobileDevice } from \"../../../hooks/useIsMobileDevice.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nconst AgreementCheckList = ({\n  agreements,\n  displayAgreeAllCheckBox\n}) => {\n  const isMobile = useIsMobileDevice();\n  const isAllAgreementsChecked = agreements.every((agreement) => agreement.checked);\n  const handleAgreeAllChange = (checked) => {\n    agreements.forEach((agreement) => {\n      var _a;\n      (_a = agreement.onChange) == null ? void 0 : _a.call(agreement, checked);\n    });\n  };\n  const agreeAllSectionStyle = {\n    ...{\n      \"--check-list-agree-all-padding-bottom\": isMobile ? \"9px\" : \"6px\"\n    },\n    ...baseAgreeAllSectionStyle\n  };\n  const agreeAllLabelStyle = {\n    ...isMobile ? typography(16, 400, 1) : typography(18, 500, 1.36)\n  };\n  const listStyle = {\n    ...{\n      \"--check-list-padding-top\": isMobile ? \"5px\" : \"0\",\n      \"--check-list-padding-bottom\": isMobile ? \"9px\" : \"0\"\n    },\n    ...baseListStyle\n  };\n  return /* @__PURE__ */ jsxs(Fragment, { children: [\n    displayAgreeAllCheckBox ? /* @__PURE__ */ jsx(\"div\", { style: agreeAllSectionStyle, children: /* @__PURE__ */ jsx(Checkbox, { checked: isAllAgreementsChecked, onChange: handleAgreeAllChange, size: isMobile ? \"small\" : \"medium\", children: /* @__PURE__ */ jsx(\"span\", { style: agreeAllLabelStyle, children: \"전체 동의하기\" }) }) }) : null,\n    /* @__PURE__ */ jsx(\"ul\", { style: listStyle, children: agreements.map((agreement) => {\n      return /* @__PURE__ */ jsxs(\"li\", { style: rowStyle, children: [\n        /* @__PURE__ */ jsx(Checkbox, { checked: agreement.checked, onChange: agreement.onChange, size: isMobile ? \"small\" : \"medium\", children: agreement.label }),\n        agreement.detailLink && /* @__PURE__ */ jsx(\"a\", { href: createIsomorphicLink(agreement.detailLink), target: \"_blank\", rel: \"noreferrer\", style: detailLinkStyle, children: /* @__PURE__ */ jsx(Default, { type: \"button\", size: isMobile ? \"xSmall\" : \"small\", variant: \"secondary\", isUnderlined: true, children: \"자세히\" }) })\n      ] }, agreement.type);\n    }) })\n  ] });\n};\nconst baseAgreeAllSectionStyle = {\n  display: \"flex\",\n  justifyContent: \"flex-start\",\n  alignItems: \"center\",\n  paddingBottom: \"var(--check-list-agree-all-padding-bottom)\",\n  borderBottom: \"1px solid #5d5d5d29\",\n  width: \"100%\"\n};\nconst baseListStyle = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  paddingTop: \"var(--check-list-padding-top)\",\n  paddingBottom: \"var(--check-list-padding-bottom)\",\n  width: \"100%\"\n};\nconst rowStyle = {\n  display: \"flex\",\n  justifyContent: \"space-between\",\n  alignItems: \"center\",\n  alignSelf: \"stretch\",\n  gap: 6\n};\nconst detailLinkStyle = {\n  minWidth: \"max-content\"\n};\nexport {\n  AgreementCheckList\n};\n","import { useState } from \"react\";\nconst useAgreementCheckListControl = (agreements) => {\n  const [agreementsState, setAgreementsState] = useState({});\n  const reshapedAgreements = agreements.map((agreement) => ({\n    ...agreement,\n    checked: agreementsState[agreement.type] || false,\n    onChange: (checked) => {\n      setAgreementsState((prev) => ({\n        ...prev,\n        [agreement.type]: checked\n      }));\n    }\n  }));\n  const isAllRequiredAgreementsChecked = reshapedAgreements.filter((agreement) => agreement.isRequired).every((agreement) => agreement.checked);\n  return {\n    agreementsState,\n    agreements: reshapedAgreements,\n    isAllRequiredAgreementsChecked\n  };\n};\nexport {\n  useAgreementCheckListControl\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { TwoButtonBottomSheetContent } from \"../TwoButtonBottomSheetContent/TwoButtonBottomSheetContent.js\";\nimport { AgreementCheckList } from \"../../AgreementCheckList/AgreementCheckList.js\";\nimport { useAgreementCheckListControl } from \"../../AgreementCheckList/AgreementCheckList.hooks.js\";\nimport { useEffect } from \"react\";\nconst AgreementsBottomSheet = ({\n  agreements = [],\n  displayAgreeAllCheckBox,\n  onAgree,\n  onView,\n  ...bottomSheetContentParams\n}) => {\n  useEffect(() => {\n    onView == null ? void 0 : onView();\n  }, []);\n  const {\n    agreements: agreementList,\n    isAllRequiredAgreementsChecked,\n    agreementsState\n  } = useAgreementCheckListControl(agreements);\n  const handlePrimaryButtonClick = () => {\n    onAgree == null ? void 0 : onAgree(agreementsState);\n  };\n  return /* @__PURE__ */ jsx(TwoButtonBottomSheetContent, { ...bottomSheetContentParams, onPrimaryButtonClick: handlePrimaryButtonClick, primaryButtonDisabled: !isAllRequiredAgreementsChecked, content: /* @__PURE__ */ jsx(AgreementCheckList, { agreements: agreementList, displayAgreeAllCheckBox }) });\n};\nexport {\n  AgreementsBottomSheet\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useBottomSheet } from \"../../../../hooks/useBottomSheet.js\";\nimport { AgreementsBottomSheet } from \"./AgreementsBottomSheet.js\";\nconst useAgreementsBottomSheet = () => {\n  const bottomSheet = useBottomSheet();\n  const show = ({\n    onClose,\n    ...props\n  }) => {\n    bottomSheet.show({\n      content: /* @__PURE__ */ jsx(AgreementsBottomSheet, { ...props }),\n      detent: \"content-height\",\n      onClose\n    });\n  };\n  return {\n    show,\n    hide: bottomSheet.hide\n  };\n};\nexport {\n  useAgreementsBottomSheet\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { AgreementCheckList } from \"../../AgreementCheckList/AgreementCheckList.js\";\nimport { useAgreementCheckListControl } from \"../../AgreementCheckList/AgreementCheckList.hooks.js\";\nimport { useEffect } from \"react\";\nimport { Dialog as L } from \"../../../../node_modules/@29cm/ruler-ui/dist/components/Dialog/Dialog.js\";\nconst AgreementsDialog = ({\n  params\n}) => {\n  useEffect(() => {\n    var _a;\n    (_a = params.onView) == null ? void 0 : _a.call(params);\n  }, []);\n  const {\n    agreements: agreementList,\n    isAllRequiredAgreementsChecked,\n    agreementsState\n  } = useAgreementCheckListControl(params.agreements ?? []);\n  return /* @__PURE__ */ jsx(L, { open: true, title: params.title ?? \"\", description: params.description, primaryAction: {\n    label: params.primaryButtonText || \"동의\",\n    disabled: !isAllRequiredAgreementsChecked,\n    onClick: () => {\n      var _a;\n      (_a = params.onAgree) == null ? void 0 : _a.call(params, agreementsState);\n    }\n  }, secondaryAction: {\n    label: params.secondaryButtonText || \"취소\",\n    onClick: () => {\n      var _a;\n      (_a = params.onSecondaryButtonClick) == null ? void 0 : _a.call(params);\n    }\n  }, onOpenChange: (open) => {\n    var _a;\n    if (!open) {\n      (_a = params.onClose) == null ? void 0 : _a.call(params);\n    }\n  }, children: /* @__PURE__ */ jsx(AgreementCheckList, { agreements: agreementList, displayAgreeAllCheckBox: params.displayAgreeAllCheckBox }) });\n};\nexport {\n  AgreementsDialog\n};\n","import { AgreementsDialog } from \"./AgreementsDialog.js\";\nimport \"react/jsx-runtime\";\nimport \"react\";\nimport { ui } from \"../../../../containers/UIContainer/ui.js\";\nconst DIALOG_ID = \"agreements-dialog-id\";\nconst useAgreementsDialog = () => {\n  const show = (params) => {\n    ui.showComponent(AgreementsDialog, {\n      params\n    }, {\n      id: DIALOG_ID\n    });\n  };\n  const hide = () => {\n    ui.hide(DIALOG_ID);\n  };\n  return {\n    show,\n    hide\n  };\n};\nexport {\n  useAgreementsDialog\n};\n","const mapTypesToString = (mapping, values) => {\n  if (!mapping || !(values == null ? void 0 : values.length)) {\n    return \"\";\n  }\n  return values.map(({\n    type\n  }) => type && mapping[type]).filter(Boolean).join(\",\");\n};\nexport {\n  mapTypesToString\n};\n","import { useAgreementsBottomSheet } from \"../components/@shared/bottom-sheets/AgreementsBottomSheet/AgreementsBottomSheet.hooks.js\";\nimport { useAgreementsDialog } from \"../components/@shared/dialogs/AgreementsDialog/AgreementsDialog.hooks.js\";\nimport { useIsMobileDevice } from \"./useIsMobileDevice.js\";\nimport { AgreementType } from \"../types/agreement.js\";\nimport { useTrackSnowplowEvent } from \"./snowplow/useTrackSnowplowEvent.js\";\nimport { mapTypesToString } from \"../utils/agreementMapper.js\";\nconst AGREEMENT_TYPE_MAP = {\n  [AgreementType.PersonalInformation]: \"personal_agree\",\n  [AgreementType.Privacy]: \"mkt_agree\",\n  [AgreementType.Advertising]: \"ad_agree\"\n};\nconst SECONDARY_BUTTON_TEXT = \"다음에 하기\";\nconst SECTION_NAME = \"InfoAgree\";\nconst useAgreementsModal = () => {\n  const {\n    show: showAgreementsBottomSheet,\n    hide: hideAgreementsBottomSheet\n  } = useAgreementsBottomSheet();\n  const {\n    show: showAgreementsDialog,\n    hide: hideAgreementsDialog\n  } = useAgreementsDialog();\n  const isMobileDevice = useIsMobileDevice();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const show = ({\n    enableTracking = true,\n    sectionName,\n    sectionTitle,\n    ...params\n  }) => {\n    const refinedSectionName = sectionName || SECTION_NAME;\n    const refinedSectionTitle = sectionTitle || SECTION_NAME;\n    const handleView = () => {\n      if (enableTracking) {\n        trackSnowplowEvent(\"impression_popup\", {\n          section_name: refinedSectionName,\n          section_title: refinedSectionTitle,\n          popup_id: \"info_agree\",\n          popup_type: isMobileDevice ? \"bottomsheet\" : \"dialog\"\n        });\n      }\n    };\n    const handleAgree = async (state) => {\n      var _a, _b, _c;\n      if (enableTracking) {\n        const agreedAgreements = ((_a = params.agreements) == null ? void 0 : _a.filter((agreement) => state[agreement.type])) || [];\n        trackSnowplowEvent(\"click_button\", {\n          button_id: \"info_agree_confirm\",\n          button_name: params.primaryButtonText ?? \"\",\n          section_name: refinedSectionName,\n          section_title: refinedSectionTitle,\n          position: -1,\n          option_name: mapTypesToString(AGREEMENT_TYPE_MAP, agreedAgreements)\n        });\n      }\n      try {\n        await ((_b = params.onSuccess) == null ? void 0 : _b.call(params, state));\n      } catch (error) {\n        (_c = params.onError) == null ? void 0 : _c.call(params, error);\n      }\n    };\n    const handleCancelButtonClick = () => {\n      var _a;\n      if (enableTracking) {\n        trackSnowplowEvent(\"click_button\", {\n          button_id: \"cancel\",\n          button_name: SECONDARY_BUTTON_TEXT,\n          section_name: refinedSectionName,\n          section_title: refinedSectionTitle,\n          position: -1\n        });\n      }\n      (_a = params.onCancel) == null ? void 0 : _a.call(params);\n    };\n    const commonProps = {\n      title: params.title,\n      description: params.description,\n      primaryButtonText: params.primaryButtonText,\n      secondaryButtonText: SECONDARY_BUTTON_TEXT,\n      onView: handleView,\n      onAgree: handleAgree,\n      agreements: params.agreements,\n      displayAgreeAllCheckBox: params.displayAgreeAllCheckBox\n    };\n    const handleCancel = () => {\n      var _a;\n      (_a = params.onCancel) == null ? void 0 : _a.call(params);\n    };\n    if (isMobileDevice) {\n      showAgreementsBottomSheet({\n        ...commonProps,\n        onSecondaryButtonClick: () => {\n          handleCancelButtonClick();\n          hideAgreementsBottomSheet();\n        },\n        onClose: handleCancel\n      });\n      return;\n    }\n    showAgreementsDialog({\n      ...commonProps,\n      onSecondaryButtonClick: () => {\n        handleCancelButtonClick();\n        hideAgreementsDialog();\n      },\n      onClose: () => {\n        handleCancel();\n        hideAgreementsDialog();\n      }\n    });\n  };\n  const hide = () => {\n    if (isMobileDevice) {\n      hideAgreementsBottomSheet();\n      return;\n    }\n    hideAgreementsDialog();\n  };\n  return {\n    show,\n    hide\n  };\n};\nexport {\n  useAgreementsModal\n};\n","import \"../../apis/raffle/RaffleApiService.js\";\nimport { RaffleAgreementRequirement } from \"../../apis/raffle/RaffleApiService.types.js\";\nimport { AgreementType } from \"../../types/agreement.js\";\nconst isAllRequiredAgreed = (agreements) => {\n  const requiredAgreements = agreements.filter((agreement) => agreement.agreementRequirement === RaffleAgreementRequirement.Required);\n  return requiredAgreements.every((agreement) => agreement.isAgreed);\n};\nconst hasUnagreedRequired = (agreements) => {\n  return agreements.some((agreement) => !agreement.isAgreed && agreement.agreementRequirement === RaffleAgreementRequirement.Required);\n};\nconst RAFFLE_AGREEMENT_TYPE_LIST = [AgreementType.Advertising, AgreementType.PersonalInformation, AgreementType.Privacy];\nconst shouldDisplayAgreeAllCheckbox = (agreements) => {\n  return agreements.length === RAFFLE_AGREEMENT_TYPE_LIST.length;\n};\nexport {\n  hasUnagreedRequired,\n  isAllRequiredAgreed,\n  shouldDisplayAgreeAllCheckbox\n};\n","import { useMemo } from \"react\";\nimport { useTargetAppVersion } from \"./useTargetAppVersion.js\";\nimport { isTabView } from \"../utils/custom-tab/isTabView.js\";\nconst useIsCallJsPayloadUnSupported = () => {\n  const {\n    isTargetAppVersion\n  } = useTargetAppVersion({\n    maxIosVersion: 1273\n    // iOS 6.88.0 (1274) 부터 수정 완료\n  });\n  const isCallJsPayloadUnsupported = useMemo(() => isTargetAppVersion && isTabView(), [isTargetAppVersion]);\n  return isCallJsPayloadUnsupported;\n};\nexport {\n  useIsCallJsPayloadUnSupported\n};\n","import \"./stores/content/content.store.js\";\nimport { isServer } from \"../utils/context.js\";\nimport \"../utils/event-properties/source.js\";\nimport \"framer\";\nimport { useEffect } from \"react\";\nimport { useDialog } from \"./useDialog.js\";\nimport { env } from \"../config/index.js\";\nimport { useIsCallJsPayloadUnSupported } from \"./useIsCallJsPayloadUnSupported.js\";\nconst useSubscribeIdentityVerification = ({\n  onSuccess,\n  onFail\n}) => {\n  const dialog = useDialog();\n  const callback = async (identityVerificationToken) => {\n    if (!identityVerificationToken) {\n      dialog.show({\n        content: \"본인인증 key가 존재하지 않습니다\",\n        id: \"identity-verification-error\"\n      });\n      onFail == null ? void 0 : onFail();\n      return;\n    }\n    await onSuccess(identityVerificationToken);\n  };\n  useReceiveMessageInApp(callback);\n  useReceiveMessageInWeb(callback);\n};\nconst IDENTITY_VERIFICATION_IN_APP_KEY = \"identityVerificationComplete\";\nconst IDENTITY_VERIFICATION_IN_WEB_KEY = \"identity-verification\";\nconst useReceiveMessageInApp = (callback) => {\n  const isCallJsPayloadUnsupported = useIsCallJsPayloadUnSupported();\n  useEffect(() => {\n    if (isCallJsPayloadUnsupported) {\n      return;\n    }\n    assignIdentityVerificationCallback(callback);\n    return () => {\n      clearIdentityVerificationCallback();\n    };\n  }, [isCallJsPayloadUnsupported]);\n};\nconst useReceiveMessageInWeb = (callback) => {\n  const handleCallback = (e) => {\n    if (e.data.type !== IDENTITY_VERIFICATION_IN_WEB_KEY) {\n      return;\n    }\n    if (env.workspace.auth !== e.origin) {\n      return;\n    }\n    callback(e.data.payload);\n  };\n  useEffect(() => {\n    window.addEventListener(\"message\", handleCallback, false);\n    return () => {\n      window.removeEventListener(\"message\", handleCallback, false);\n    };\n  }, []);\n};\nconst assignIdentityVerificationCallback = (callback) => {\n  if (isServer()) {\n    return;\n  }\n  window[IDENTITY_VERIFICATION_IN_APP_KEY] = callback;\n};\nconst clearIdentityVerificationCallback = () => {\n  if (isServer()) {\n    return;\n  }\n  delete window[IDENTITY_VERIFICATION_IN_APP_KEY];\n};\nexport {\n  useSubscribeIdentityVerification\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useSubscribeIdentityVerification } from \"../../../../hooks/useSubscribeIdentityVerification.js\";\nimport { TwoButtonBottomSheetContent } from \"../TwoButtonBottomSheetContent/TwoButtonBottomSheetContent.js\";\nimport { useAnalytics } from \"../../../../hooks/analytics/useAnalytics.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport { useEffect } from \"react\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/preuser/PreuserApiService.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 \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"framer\";\nconst IdentityVerificationBottomSheet = ({\n  onVerified,\n  onFail,\n  ...bottomSheetContentParams\n}) => {\n  const {\n    trackAmplitude\n  } = useAnalytics();\n  useEffect(() => {\n    trackAmplitude(\"view_bottomsheet\", {\n      bottomsheet_type: \"connecting_information\"\n    });\n  }, []);\n  const handleSuccess = (token) => {\n    trackAmplitude(\"connecting_information_success\");\n    onVerified(token);\n  };\n  useSubscribeIdentityVerification({\n    onSuccess: handleSuccess,\n    onFail\n  });\n  return /* @__PURE__ */ jsx(TwoButtonBottomSheetContent, { ...bottomSheetContentParams });\n};\nexport {\n  IdentityVerificationBottomSheet\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useBottomSheet } from \"../../../../hooks/useBottomSheet.js\";\nimport { IdentityVerificationBottomSheet } from \"./IdentityVerificationBottomSheet.js\";\nconst useIdentityVerificationBottomSheet = () => {\n  const bottomSheet = useBottomSheet();\n  const show = (props) => {\n    bottomSheet.show({\n      content: /* @__PURE__ */ jsx(IdentityVerificationBottomSheet, { ...props }),\n      detent: \"content-height\"\n    });\n  };\n  return {\n    show,\n    hide: bottomSheet.hide\n  };\n};\nexport {\n  useIdentityVerificationBottomSheet\n};\n","import { jsx, Fragment } from \"react/jsx-runtime\";\nimport { useSubscribeIdentityVerification } from \"../../../../hooks/useSubscribeIdentityVerification.js\";\nconst IdentityVerificationDialog = ({\n  onVerified,\n  onFail\n}) => {\n  useSubscribeIdentityVerification({\n    onSuccess: onVerified,\n    onFail\n  });\n  return /* @__PURE__ */ jsx(Fragment, {});\n};\nexport {\n  IdentityVerificationDialog\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { IdentityVerificationDialog } from \"./IdentityVerificationDialog.js\";\nimport \"react\";\nimport { ui } from \"../../../../containers/UIContainer/ui.js\";\nconst DIALOG_ID = \"identity-verification-dialog-id\";\nconst DEFAULT_MESSAGES = {\n  TITLE: \"본인인증을 진행해 주세요\",\n  DESCRIPTION: \"정확한 알림을 위해 본인 명의의 연락처가 필요해요.\\n인증은 처음 한 번만 받고 있어요.\",\n  PRIMARY_BUTTON_LABEL: \"본인인증 하기\",\n  SECONDARY_BUTTON_LABEL: \"다음에 하기\"\n};\nconst useIdentityVerificationDialog = () => {\n  const show = (params) => {\n    ui.showDialog({\n      title: params.title ?? DEFAULT_MESSAGES.TITLE,\n      description: params.description ?? DEFAULT_MESSAGES.DESCRIPTION,\n      primaryAction: {\n        label: params.primaryButtonText ?? DEFAULT_MESSAGES.PRIMARY_BUTTON_LABEL,\n        onClick: params.onPrimaryButtonClick\n      },\n      secondaryAction: {\n        label: params.secondaryButtonText ?? DEFAULT_MESSAGES.SECONDARY_BUTTON_LABEL,\n        onClick: params.onSecondaryButtonClick\n      },\n      children: /* @__PURE__ */ jsx(IdentityVerificationDialog, { onVerified: params.onVerified, onFail: params.onFail })\n    }, {\n      id: DIALOG_ID,\n      onClose: params.onClose\n    });\n  };\n  const hide = () => {\n    ui.hide(DIALOG_ID);\n  };\n  return {\n    show,\n    hide\n  };\n};\nexport {\n  useIdentityVerificationDialog\n};\n","import { isWebview } from \"./device.js\";\nimport { sendAppSchemeMessage } from \"./sendAppSchemeMessage.js\";\nconst POPUP_OPTIONS = \"width=500, height=550, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no\";\nconst openPopup = (url, popupName, popupOptions) => {\n  var _a;\n  if (isWebview()) {\n    sendAppSchemeMessage(\"weblink_popup\", `url=${encodeURIComponent(url)}`);\n    return;\n  }\n  (_a = window.open(url, popupName, popupOptions ?? POPUP_OPTIONS)) == null ? void 0 : _a.focus();\n};\nexport {\n  openPopup\n};\n","import { env } from \"../config/index.js\";\nimport { openPopup } from \"./openPopup.js\";\nconst openIdentityVerificationPopup = (mode) => {\n  const baseUrl = `${env.workspace.auth}/identity-verification/form`;\n  const queryParams = new URLSearchParams();\n  if (mode !== void 0) {\n    queryParams.set(\"mode\", mode);\n  }\n  const queryString = queryParams.toString();\n  const identityVerificationFormUrl = queryString ? `${baseUrl}?${queryString}` : baseUrl;\n  openPopup(identityVerificationFormUrl, \"identity-verification-form\");\n};\nexport {\n  openIdentityVerificationPopup\n};\n","import { useIdentityVerificationBottomSheet } from \"../components/@shared/bottom-sheets/IdentityVerificationBottomSheet/IdentityVerificationBottomSheet.hooks.js\";\nimport { useIdentityVerificationDialog } from \"../components/@shared/dialogs/IdentityVerificationDialog/IdentityVerificationDialog.hooks.js\";\nimport { useIsMobileDevice } from \"./useIsMobileDevice.js\";\nimport \"../config/index.js\";\nimport { userApi } from \"../apis/user/UserApiService.js\";\nimport \"../apis/preuser/PreuserApiService.js\";\nimport { openIdentityVerificationPopup } from \"../utils/openIdentifyVerificationPopup.js\";\nimport { postMessage } from \"../utils/postMessage.js\";\nimport { useCurrentUser } from \"./useCurrentUser.js\";\nimport { useTrackClickComponentEvent } from \"./events/useTrackClickComponentEvent.js\";\nimport { useIsCallJsPayloadUnSupported } from \"./useIsCallJsPayloadUnSupported.js\";\nconst useIdentityVerificationModal = () => {\n  const {\n    show: showIdentityVerificationBottomSheet,\n    hide: hideIdentityVerificationBottomSheet\n  } = useIdentityVerificationBottomSheet();\n  const {\n    show: showIdentityVerificationDialog,\n    hide: hideIdentityVerificationDialog\n  } = useIdentityVerificationDialog();\n  const isMobileDevice = useIsMobileDevice();\n  const isCallJsPayloadUnSupported = useIsCallJsPayloadUnSupported();\n  const {\n    name\n  } = useCurrentUser();\n  const {\n    trackClickComponentEvent\n  } = useTrackClickComponentEvent();\n  const show = ({\n    onSuccess,\n    onFail\n  }) => {\n    const handleVerified = createIdentityVerificationSuccessHandler({\n      onSuccess,\n      onFail,\n      name\n    });\n    const commonParams = {\n      title: \"본인인증을 진행해 주세요\",\n      description: \"정확한 알림을 위해 본인 명의의 연락처가 필요해요.\\n인증은 처음 한 번만 받고 있어요.\",\n      primaryButtonText: \"본인인증 하기\",\n      secondaryButtonText: \"다음에 하기\",\n      onPrimaryButtonClick: openIdentityVerificationPopup,\n      onVerified: handleVerified,\n      onFail\n    };\n    if (isMobileDevice) {\n      showIdentityVerificationBottomSheet({\n        ...commonParams,\n        onPrimaryButtonClick: () => {\n          trackClickComponentEvent(\"confirm-identity-verification\");\n          if (isCallJsPayloadUnSupported) {\n            openIdentityVerificationPopup(\"DIRECT_UPDATE\");\n            hideIdentityVerificationBottomSheet();\n          } else {\n            openIdentityVerificationPopup();\n          }\n        },\n        onSecondaryButtonClick: () => {\n          trackClickComponentEvent(\"cancel-identity-verification\");\n          hide();\n        }\n      });\n      return;\n    }\n    showIdentityVerificationDialog({\n      ...commonParams,\n      onPrimaryButtonClick: openIdentityVerificationPopup,\n      onSecondaryButtonClick: hideIdentityVerificationDialog,\n      onClose: hideIdentityVerificationDialog\n    });\n  };\n  const hide = () => {\n    if (isMobileDevice) {\n      hideIdentityVerificationBottomSheet();\n      return;\n    }\n    hideIdentityVerificationDialog();\n  };\n  return {\n    show,\n    hide\n  };\n};\nconst createIdentityVerificationSuccessHandler = (params) => async (identityVerificationToken) => {\n  var _a, _b;\n  try {\n    const {\n      result,\n      errorCode,\n      message\n    } = await userApi.postIdentifyInfo({\n      identityVerificationToken,\n      type: \"UNKNOWN_CI_VERIFICATION\"\n    });\n    if (result === \"SUCCESS\") {\n      postMessage(\"amplitudeBypassUserProperty\", {\n        key: \"has_ci\",\n        value: \"true\"\n      });\n      (_a = params.onSuccess) == null ? void 0 : _a.call(params);\n      return;\n    }\n    if (errorCode === \"AGE_RESTRICTION\") {\n      throw new Error(\"개인정보 보호를 위해 만 14세 미만 아동은 서비스 이용이 불가능합니다\");\n    }\n    if (errorCode === \"INVALID_USER_PERSONAL_AUTH_INFO\") {\n      throw new Error(`가입 명의(${params.name})와 동일한 명의로 본인 인증을 하셔야 합니다.\n동일 명의임에도 문제가 발생했다면, customer@29cm.co.kr 또는 1660-2929으로 문의해 주세요.`);\n    }\n    throw Error(message ?? \"사용자 정보 업데이트 중 알 수 없는 에러가 발생했습니다.\");\n  } catch (error) {\n    (_b = params.onFail) == null ? void 0 : _b.call(params, error);\n  }\n};\nexport {\n  useIdentityVerificationModal\n};\n"],"mappings":"u/BAAI,GAAkC,IACpC,EAAe,oBAAyB,iCACxC,EAAe,QAAa,oBAC5B,EAAe,YAAiB,wBACzB,IACN,GAAiB,EAAE,CAAC,yBCLnB,GAAY,OAAO,eACnB,IAAmB,EAAK,EAAK,IAAU,KAAO,EAAM,GAAU,EAAK,EAAK,CAAE,WAAY,GAAM,aAAc,GAAM,SAAU,GAAM,QAAO,CAAC,CAAG,EAAI,GAAO,EACtJ,GAAiB,EAAK,EAAK,KAC7B,GAAgB,EAAK,OAAO,GAAQ,SAAsB,EAAX,EAAM,GAAU,EAAM,CAC9D,GAEH,EAAN,cAAuB,KAAM,CAC3B,YAAY,EAAS,EAAW,EAAM,CACpC,MAAM,EAAQ,CAEd,EAAc,KAAM,YAAY,CAEhC,EAAc,KAAM,OAAO,CAC3B,KAAK,KAAO,WACZ,KAAK,UAAY,EACjB,KAAK,KAAO,+BCf8B,IACW,IACb,KACM,KACO,CACnD,GAAwB,CAAC,8BAA8B,CACvD,GAAkB,GAAa,CACnC,IAAM,EAAc,EAAS,SAAW,QAAU,EAAS,OAAS,KAC9D,EAAyB,EAAS,YAAc,MAAQ,GAAsB,SAAS,EAAS,UAAU,CAChH,GAAI,GAAe,EACjB,MAAU,MAAM,EAA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