{"version":3,"file":"CouponModule.CEfSpGTE.mjs","names":["createContext","forwardRef","useCallback","containerStyle","useContext","forwardRef","forwardRef","containerStyle","forwardRef","containerStyle","containerStyleByLayout","forwardRef","forwardRef","initialState","COUPON_CONTROLS","sortCouponsByDiscountValueAscending","useMemo","useRef","useState","useCallback","useState","useState","useMemo","useRef","Fragment","COUPON_CONTROLS"],"sources":["https:/asset.29cm.co.kr/contents/framer/utils/object.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.constants.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Description.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Divider.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Button.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Summary.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Title.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/index.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchCouponsDownloadStatus.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/component-id.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/segment.js","https:/asset.29cm.co.kr/contents/framer/components/modules/query-store/query.store.js","https:/asset.29cm.co.kr/contents/framer/components/modules/module-store/module.store.js","https:/asset.29cm.co.kr/contents/framer/components/modules/hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/types.js","https:/asset.29cm.co.kr/contents/framer/utils/hideParentElement.js","https:/asset.29cm.co.kr/contents/framer/utils/spacing.js","https:/asset.29cm.co.kr/contents/framer/components/modules/utils/key.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/helpers.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.types.js","https:/asset.29cm.co.kr/contents/framer/components/modules/controls.js","https:/asset.29cm.co.kr/contents/framer/apis/collection/CollectionApiService.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.js","https:/asset.29cm.co.kr/contents/framer/hooks/useVisibilityAwareInterval.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RandomDiscountValue/RandomDiscountValue.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.validate.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/LinkedCouponModule/LinkedCouponModule.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon-notices.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.controls.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js","https:/framerusercontent.com/modules/v2w1uRsZPJslVNIRLCeW/PgjboXO18lboOdhFrAoz/CouponModule.js"],"sourcesContent":["const pick = (obj, keys) => {\n  const picked = {};\n  keys.forEach((key) => {\n    picked[key] = obj[key];\n  });\n  return picked;\n};\nconst isObject = (object) => {\n  return typeof object === \"object\" && object !== null && !Array.isArray(object);\n};\nexport {\n  isObject,\n  pick\n};\n","const variantByType = {\n  neutral: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  },\n  accent: {\n    // NOTE(임규민): 기본 key color, 외부에서 커스터마이즈가 가능한 값입니다.\n    background: {\n      light: \"#ff4800\",\n      dark: \"#ff4800\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    tertiary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    border: \"rgba(255, 255, 255, 0.5)\"\n  },\n  disabled: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  }\n};\nconst variantByStatus = {\n  upcoming: variantByType.neutral,\n  downloadable: variantByType.accent,\n  downloaded: variantByType.neutral,\n  expired: variantByType.disabled,\n  disabled: variantByType.disabled,\n  issuanceLimitedReached: variantByType.disabled\n};\nexport {\n  variantByStatus,\n  variantByType\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef, useCallback } from \"react\";\nimport { isObject } from \"../../../utils/object.js\";\nimport { Skeleton } from \"../Skeleton/Skeleton.js\";\nimport { variantByStatus } from \"./Root.constants.js\";\nconst CouponContext = createContext(null);\nconst Root = forwardRef(({\n  children,\n  style,\n  theme = \"light\",\n  loading = false,\n  status = \"downloadable\",\n  layout = \"detail\",\n  backgroundColor: _backgroundColor,\n  ...rest\n}, ref) => {\n  const variant = variantByStatus[status];\n  const backgroundColor = status === \"downloadable\" ? _backgroundColor ?? variant.background : variant.background;\n  const getBackground = useCallback(() => {\n    if (!isObject(backgroundColor)) {\n      return backgroundColor;\n    }\n    if (\"stops\" in backgroundColor) {\n      return getLinearGradient(backgroundColor);\n    }\n    return backgroundColor[theme];\n  }, [backgroundColor, theme]);\n  return /* @__PURE__ */ jsx(CouponContext.Provider, { value: {\n    status,\n    variant,\n    layout\n  }, children: /* @__PURE__ */ jsx(\"div\", { ref, style: {\n    ...containerStyle,\n    ...style\n  }, ...rest, children: loading ? /* @__PURE__ */ jsx(Skeleton, { style: {\n    ...skeletonStyle,\n    ...skeletonStyleByTheme[theme],\n    ...skeletonStyleByLayout[layout]\n  } }) : /* @__PURE__ */ jsx(\"div\", { style: {\n    ...wrapperStyle,\n    background: getBackground(),\n    ...wrapperStyleByLayout[layout],\n    ...layout === \"compact\" ? compactWrapperStyleByStatus[status] : {}\n  }, children }) }) });\n});\nconst getLinearGradient = (linearGradient) => {\n  const {\n    stops,\n    degree\n  } = linearGradient;\n  const gradient = [...stops].sort((x, y) => x.offsetPercent - y.offsetPercent).map((stop) => `${stop.color} ${stop.offsetPercent}%`).join(\", \");\n  return `linear-gradient(${degree}deg, ${gradient})`;\n};\nconst containerStyle = {\n  width: \"100%\"\n};\nconst wrapperStyle = {\n  position: \"relative\",\n  width: \"100%\",\n  display: \"flex\",\n  borderRadius: 4,\n  overflow: \"hidden\"\n};\nconst wrapperStyleByLayout = {\n  compact: {\n    height: 46,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"6\" height=\"14\" viewBox=\"0 0 6 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.00017 7C6.00017 10.866 2.86617 14 0.000163798 14C1.24598e-06 9.18 0.000163798 4.822 0.000163798 0C2.86617 0 6.00017 3.134 6.00017 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"6\" height=\"14\" viewBox=\"0 0 6 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.00017 7C6.00017 10.866 2.86617 14 0.000163798 14C1.24598e-06 9.18 0.000163798 4.822 0.000163798 0C2.86617 0 6.00017 3.134 6.00017 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"6px 14px, auto\",\n    maskSize: \"6px 14px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  },\n  detail: {\n    height: 76,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"16\" viewBox=\"0 0 8 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.00022 8C8.00022 12.4183 4.4185 16 0.000218398 16C1.66131e-06 10.4911 0.000218398 5.52413 0.000218398 0C4.4185 0 8.00022 3.58172 8.00022 8Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"16\" viewBox=\"0 0 8 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.00022 8C8.00022 12.4183 4.4185 16 0.000218398 16C1.66131e-06 10.4911 0.000218398 5.52413 0.000218398 0C4.4185 0 8.00022 3.58172 8.00022 8Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"8px 16px, auto\",\n    maskSize: \"8px 16px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  }\n};\nconst compactWrapperStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nconst skeletonStyle = {\n  width: \"100%\",\n  borderRadius: 4\n};\nconst skeletonStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nconst skeletonStyleByLayout = {\n  compact: {\n    height: 46\n  },\n  detail: {\n    height: 76\n  }\n};\nexport {\n  CouponContext,\n  Root\n};\n","import { useContext } from \"react\";\nimport { CouponContext } from \"./Root.js\";\nconst useCouponContext = () => {\n  const context = useContext(CouponContext);\n  if (!context) {\n    throw new Error(\"useCouponContext should be used with in Root\");\n  }\n  return context;\n};\nexport {\n  useCouponContext\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.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 { useTheme } from \"../../../hooks/useTheme.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 { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Description = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...typography(12, 400),\n    color: variant.tertiary[theme],\n    ...style\n  }, children });\n});\nexport {\n  Description\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.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 { useTheme } from \"../../../hooks/useTheme.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 { useCouponContext } from \"./Root.hooks.js\";\nconst Divider = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const theme = useTheme();\n  const {\n    layout\n  } = useCouponContext();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByTheme[theme],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  borderLeftWidth: \"1px\",\n  borderLeftStyle: \"dashed\",\n  opacity: 0.2\n};\nconst containerStyleByTheme = {\n  light: {\n    borderColor: \"#000\"\n  },\n  dark: {\n    borderColor: \"#fff\"\n  }\n};\nexport {\n  Divider\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.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 { useTheme } from \"../../../hooks/useTheme.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 { typography } from \"../../../styles/typography.js\";\nimport { playHaptic } from \"../../../utils/playHaptic.js\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Button = forwardRef(({\n  style,\n  onClick,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    status,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  const {\n    icon,\n    text\n  } = contentByStatus[status];\n  const shouldRenderIcon = layout === \"detail\" || status === \"downloadable\" || status === \"downloaded\";\n  const getIconSize = () => {\n    if (layout === \"detail\") {\n      return 24;\n    }\n    if (layout === \"compact\") {\n      return 14;\n    }\n    return 16;\n  };\n  const getIconType = () => {\n    if (layout === \"compact\" && icon === \"download\") {\n      return \"downloadSlim\";\n    }\n    return icon;\n  };\n  const handleClick = (e) => {\n    if (status === \"upcoming\" || status === \"expired\") {\n      return;\n    }\n    playHaptic(\"rigid\");\n    onClick == null ? void 0 : onClick(e);\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style,\n    ...containerStyleByStatus[status]\n  }, onClick: handleClick, children: [\n    shouldRenderIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(), weight: layout === \"detail\" ? \"light\" : \"regular\", size: getIconSize(), color: variant.secondary[theme] }) : null,\n    /* @__PURE__ */ jsx(\"div\", { style: {\n      ...typography(12, layout === \"compact\" ? 500 : 400),\n      color: variant.secondary[theme]\n    }, children: text })\n  ] });\n});\nconst contentByStatus = {\n  upcoming: {\n    icon: \"clock\",\n    text: \"발행예정\"\n  },\n  downloadable: {\n    icon: \"download\",\n    text: \"쿠폰받기\"\n  },\n  downloaded: {\n    icon: \"check\",\n    text: \"받기완료\"\n  },\n  expired: {\n    icon: \"close\",\n    text: \"기간만료\"\n  },\n  disabled: {\n    icon: \"close\",\n    text: \"사용불가\"\n  },\n  issuanceLimitedReached: {\n    icon: \"close\",\n    text: \"받기마감\"\n  }\n};\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  gap: 4\n};\nconst containerStyleByLayout = {\n  compact: {\n    paddingRight: 16,\n    flexShrink: 0\n  },\n  detail: {\n    aspectRatio: \"1 / 1\",\n    flexDirection: \"column\"\n  }\n};\nconst containerStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nexport {\n  Button\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Summary = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    layout\n  } = useCouponContext();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  flex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  gap: 2\n};\nconst containerStyleByLayout = {\n  compact: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    gap: 12,\n    padding: \"0px 0px 0px 16px\"\n  },\n  detail: {\n    padding: \"0px 8px 0px 26px\"\n  }\n};\nexport {\n  Summary\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } 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 \"../../../config/index.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.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 { useTheme } from \"../../../hooks/useTheme.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 { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Title = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...styleByLayout[layout],\n    color: variant.primary[theme],\n    ...style\n  }, children });\n});\nconst styleByLayout = {\n  compact: {\n    flex: \"1 0 0\",\n    overflow: \"hidden\",\n    textOverflow: \"ellipsis\",\n    whiteSpace: \"nowrap\",\n    ...typography(14, 500)\n  },\n  detail: {\n    ...typography(15, 700)\n  }\n};\nexport {\n  Title\n};\n","import { Description } from \"./Description.js\";\nimport { Divider } from \"./Divider.js\";\nimport { Root } from \"./Root.js\";\nimport { Button } from \"./Button.js\";\nimport { Summary } from \"./Summary.js\";\nimport { Title } from \"./Title.js\";\nconst Coupon = {\n  Root,\n  Summary,\n  Title,\n  Description,\n  Divider,\n  Button\n};\nexport {\n  Coupon\n};\n","import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst COUPONS_DOWNLOAD_STATUS_FETCHER_KEY = \"@coupon/coupons-download-status\";\nconst useFetchCouponsDownloadStatus = (couponIds, userNo, enabled = true) => {\n  const canFetch = couponIds.length > 0 && Boolean(userNo) && enabled;\n  const {\n    isLoading,\n    data,\n    ...rest\n  } = useSWR(canFetch ? [COUPONS_DOWNLOAD_STATUS_FETCHER_KEY, ...couponIds] : null, () => couponApi.getCouponsDownloadStatus(couponIds, Number(userNo)), {\n    revalidateIfStale: true\n  });\n  return {\n    isLoading: isLoading || !canFetch,\n    statuses: data ?? [],\n    ...rest\n  };\n};\nexport {\n  useFetchCouponsDownloadStatus\n};\n","import { ControlType } from \"framer\";\nconst COUPON_LAYOUT_RESPONSIVE = \"responsive\";\nvar CouponColorType = /* @__PURE__ */ ((CouponColorType2) => {\n  CouponColorType2[\"DEFAULT\"] = \"default\";\n  CouponColorType2[\"SOLID\"] = \"solid\";\n  CouponColorType2[\"GRADIENT\"] = \"gradient\";\n  return CouponColorType2;\n})(CouponColorType || {});\nconst COUPON_CONTROLS = {\n  couponLayout: {\n    type: ControlType.Enum,\n    title: \"쿠폰 레이아웃\",\n    options: [\"detail\", \"compact\", COUPON_LAYOUT_RESPONSIVE],\n    optionTitles: [\"기본\", \"컴팩트\", \"반응형\"],\n    defaultValue: \"detail\"\n  },\n  backgroundColor: {\n    type: ControlType.Object,\n    title: \"쿠폰 배경색\",\n    controls: {\n      colorType: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        optionTitles: [\"기본\", \"단색\", \"그라디언트\"],\n        options: [\n          \"default\",\n          \"solid\",\n          \"gradient\"\n          /* GRADIENT */\n        ]\n      },\n      color: {\n        type: ControlType.Color,\n        title: \"단색\",\n        optional: true,\n        hidden: ({\n          colorType\n        }) => colorType !== \"solid\"\n        /* SOLID */\n      },\n      gradient: {\n        type: ControlType.Object,\n        title: \"그라디언트\",\n        controls: {\n          stops: {\n            type: ControlType.Array,\n            title: \"색상 및 정지점들\",\n            control: {\n              type: ControlType.Object,\n              title: \"색상 및 정지점\",\n              controls: {\n                color: {\n                  type: ControlType.Color,\n                  title: \"색상\",\n                  optional: true\n                },\n                offsetPercent: {\n                  type: ControlType.Number,\n                  title: \"정지점\",\n                  unit: \"%\",\n                  min: 0,\n                  max: 100,\n                  defaultValue: 0,\n                  step: 1,\n                  displayStepper: true\n                }\n              }\n            }\n          },\n          degree: {\n            type: ControlType.Number,\n            title: \"각도\",\n            unit: \"deg\",\n            defaultValue: 0,\n            step: 1,\n            displayStepper: true\n          }\n        },\n        hidden: ({\n          colorType\n        }) => colorType !== \"gradient\"\n        /* GRADIENT */\n      }\n    }\n  }\n};\nconst COUPON_THEME_TYPE = {\n  DEFAULT: \"default\",\n  LIGHT: \"light\",\n  DARK: \"dark\"\n};\nconst COUPON_THEME_CONTROLS = {\n  couponTheme: {\n    type: ControlType.Enum,\n    title: \"쿠폰 테마\",\n    description: \"쿠폰 영역에 별도 테마를 적용합니다. 기본은 섹션 테마를 따릅니다.\",\n    options: [COUPON_THEME_TYPE.DEFAULT, COUPON_THEME_TYPE.LIGHT, COUPON_THEME_TYPE.DARK],\n    optionTitles: [\"기본 (테마 동일)\", \"Light\", \"Dark\"],\n    defaultValue: COUPON_THEME_TYPE.DEFAULT\n  }\n};\nconst resolveCouponTheme = (couponTheme) => couponTheme === COUPON_THEME_TYPE.DEFAULT ? void 0 : couponTheme;\nconst resolveCouponLayout = (couponLayout, breakpoint) => {\n  if (!couponLayout || couponLayout === COUPON_LAYOUT_RESPONSIVE) {\n    return breakpoint === \"mobile\" ? \"compact\" : \"detail\";\n  }\n  return couponLayout;\n};\nconst toBackgroundColor = (backgroundColor) => {\n  const {\n    colorType,\n    color,\n    gradient\n  } = backgroundColor;\n  const backgroundColorByType = {\n    [\n      \"default\"\n      /* DEFAULT */\n    ]: void 0,\n    [\n      \"solid\"\n      /* SOLID */\n    ]: color,\n    [\n      \"gradient\"\n      /* GRADIENT */\n    ]: gradient\n  };\n  return backgroundColorByType[colorType];\n};\nexport {\n  COUPON_CONTROLS,\n  COUPON_LAYOUT_RESPONSIVE,\n  COUPON_THEME_CONTROLS,\n  COUPON_THEME_TYPE,\n  CouponColorType,\n  resolveCouponLayout,\n  resolveCouponTheme,\n  toBackgroundColor\n};\n","import { ControlType } from \"framer\";\nconst COMPONENT_ID_PROPS = {\n  componentId: {\n    type: ControlType.String,\n    title: \"컴포넌트 ID\",\n    description: \"이벤트 수집 시에 모듈을 구분하기 위한 값\\nex. 29welcoming\",\n    defaultValue: \"\"\n  }\n};\nexport {\n  COMPONENT_ID_PROPS\n};\n","import { ControlType } from \"framer\";\nconst SEGMENT_CONTROLS = {\n  segment: {\n    title: \"세그먼트\",\n    type: ControlType.Array,\n    description: \"설정한 세그먼트 조건에 따라 노출/미노출이 됩니다.\",\n    control: {\n      type: ControlType.Object,\n      controls: {\n        type: {\n          type: ControlType.Enum,\n          title: \"타입\",\n          options: [\"login\", \"guest\", \"newBuyer\", \"categoryNewBuyerProduct\", \"categoryNewBuyerCoupon\", \"gender\"],\n          optionTitles: [\"로그인\", \"미로그인\", \"생애 첫구매\", \"카테고리 첫구매 상품\", \"카테고리 첫구매 쿠폰\", \"성별\"],\n          defaultValue: \"\"\n        },\n        groupId: {\n          hidden: ({\n            type\n          }) => type !== \"categoryNewBuyerProduct\",\n          type: ControlType.String,\n          title: \"그룹 ID\",\n          defaultValue: \"\"\n        },\n        couponId: {\n          hidden: ({\n            type\n          }) => type !== \"categoryNewBuyerCoupon\",\n          type: ControlType.String,\n          title: \"쿠폰 ID\",\n          defaultValue: \"\"\n        },\n        gender: {\n          hidden: ({\n            type\n          }) => type !== \"gender\",\n          type: ControlType.Enum,\n          title: \"성별\",\n          description: \"선택한 성별의 유저에게만 노출됩니다. 미로그인 유저에게는 항상 노출됩니다.\",\n          options: [\"M\", \"F\"],\n          optionTitles: [\"남성\", \"여성\"],\n          defaultValue: \"F\"\n        }\n      }\n    }\n  }\n};\nexport {\n  SEGMENT_CONTROLS\n};\n","import { create } from \"../../../node_modules/zustand/esm/index.js\";\nconst initialState = {\n  queries: {}\n};\nconst useQueryStore = create((set) => ({\n  ...initialState,\n  dispatchSetQuery: (key, query) => set((prev) => ({\n    queries: {\n      ...prev.queries,\n      [key]: query\n    }\n  }))\n}));\nexport {\n  useQueryStore\n};\n","import { create } from \"../../../node_modules/zustand/esm/index.js\";\nimport { subscribeWithSelector } from \"../../../node_modules/zustand/esm/middleware.js\";\nconst initialState = {\n  rootModules: {}\n};\nconst useModuleStore = create(subscribeWithSelector((set) => ({\n  ...initialState,\n  dispatchSetRootModule: (key, module) => set((prev) => ({\n    rootModules: {\n      ...prev.rootModules,\n      [key]: module\n    }\n  }))\n})));\nexport {\n  useModuleStore\n};\n","import { useEffect } from \"react\";\nimport { useComponentId } from \"../systems/curations/EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../systems/curations/EventTrackingProvider/EventTrackingProvider.js\";\nimport { useTrackSnowplowEvent } from \"../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useModuleStore } from \"./module-store/module.store.js\";\nimport { shallow as shallow$1 } from \"../../node_modules/zustand/esm/shallow.js\";\nimport { useSegment } from \"../@shared/providers/SegmentProvider/SegmentProvider.js\";\nconst useRootComponentId = (query) => {\n  const componentId = useComponentId();\n  const root = useModuleStore((state) => state.rootModules[(query == null ? void 0 : query.rootOutput) ?? \"\"], shallow$1);\n  return (root == null ? void 0 : root.componentId) || componentId;\n};\nconst useSetRootModule = (query, output) => {\n  const componentId = useComponentId();\n  const segment = useSegment();\n  const dispatchSetRootModule = useModuleStore((state) => state.dispatchSetRootModule);\n  const {\n    isRoot = false\n  } = query ?? {};\n  useEffect(() => {\n    if (!isRoot) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetRootModule(output, {\n      componentId,\n      segment: segment.segments\n    });\n  }, [isRoot, output, componentId, segment]);\n};\nconst useTrackClickButtonEvent = (query) => {\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const componentId = useRootComponentId(query);\n  const trackClickButtonEvent = ({\n    type,\n    layoutPosition = -1,\n    name = \"\"\n  }) => {\n    trackSnowplowEvent(\"click_button\", {\n      // TODO(임규민): section_name, position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: layoutPosition,\n      button_id: type,\n      button_name: name\n    });\n  };\n  return trackClickButtonEvent;\n};\nconst useTrackImpressionContentEvent = () => {\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const componentId = useComponentId();\n  const trackImpressionContentEvent = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      // TODO(임규민): section_name, position, layout_position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1\n    });\n  };\n  return trackImpressionContentEvent;\n};\nexport {\n  useRootComponentId,\n  useSetRootModule,\n  useTrackClickButtonEvent,\n  useTrackImpressionContentEvent\n};\n","var QueryType = /* @__PURE__ */ ((QueryType2) => {\n  QueryType2[\"Product\"] = \"product\";\n  QueryType2[\"KeywordCollection\"] = \"keyword-collection\";\n  QueryType2[\"KeywordCollections\"] = \"keyword-collections\";\n  QueryType2[\"BrandCuration\"] = \"brand-curation\";\n  QueryType2[\"Recommendation\"] = \"recommendation\";\n  QueryType2[\"Ranking\"] = \"ranking\";\n  QueryType2[\"CouponCollection\"] = \"coupon-collection\";\n  QueryType2[\"RaffleGroup\"] = \"raffle-group\";\n  QueryType2[\"Coupon\"] = \"coupon\";\n  QueryType2[\"Preuser\"] = \"preuser\";\n  QueryType2[\"CustomCategory\"] = \"custom-category\";\n  QueryType2[\"Moloco\"] = \"moloco\";\n  return QueryType2;\n})(QueryType || {});\nvar RankingType = /* @__PURE__ */ ((RankingType2) => {\n  RankingType2[\"Popularity\"] = \"POPULARITY\";\n  RankingType2[\"Trending\"] = \"TRENDING\";\n  return RankingType2;\n})(RankingType || {});\nvar PopularityPeriodType = /* @__PURE__ */ ((PopularityPeriodType2) => {\n  PopularityPeriodType2[\"Realtime\"] = \"REALTIME\";\n  PopularityPeriodType2[\"Hourly\"] = \"HOURLY\";\n  PopularityPeriodType2[\"Daily\"] = \"DAILY\";\n  return PopularityPeriodType2;\n})(PopularityPeriodType || {});\nvar TrendingPeriodType = /* @__PURE__ */ ((TrendingPeriodType2) => {\n  TrendingPeriodType2[\"Hourly\"] = \"HOURLY\";\n  return TrendingPeriodType2;\n})(TrendingPeriodType || {});\nvar CategoryType = /* @__PURE__ */ ((CategoryType2) => {\n  CategoryType2[CategoryType2[\"Large\"] = 0] = \"Large\";\n  CategoryType2[CategoryType2[\"Middle\"] = 1] = \"Middle\";\n  return CategoryType2;\n})(CategoryType || {});\nexport {\n  CategoryType,\n  PopularityPeriodType,\n  QueryType,\n  RankingType,\n  TrendingPeriodType\n};\n","const hideClosestParentByFramerName = (currentElement, framerName, isVisible) => {\n  if (!currentElement) {\n    return null;\n  }\n  const targetName = framerName || \"segmentWrapper\";\n  const parentElement = currentElement.closest(`[data-framer-name=\"${targetName}\"]`);\n  if (parentElement) {\n    parentElement.style.display = isVisible ? parentElement.style.display === \"none\" ? \"\" : parentElement.style.display : \"none\";\n  }\n  return parentElement;\n};\nexport {\n  hideClosestParentByFramerName\n};\n","const getPaddingStyle = (value) => {\n  return value.isMixed ? `${value.paddingTop}px ${value.paddingRight}px ${value.paddingBottom}px ${value.paddingLeft}px` : `${value.padding}px`;\n};\nconst getPadding = (value) => {\n  return {\n    top: value.isMixed ? value.paddingTop : value.padding,\n    right: value.isMixed ? value.paddingRight : value.padding,\n    bottom: value.isMixed ? value.paddingBottom : value.padding,\n    left: value.isMixed ? value.paddingLeft : value.padding\n  };\n};\nexport {\n  getPadding,\n  getPaddingStyle\n};\n","import { QueryType } from \"../types.js\";\nconst createKey = (query) => {\n  var _a;\n  return ((_a = query == null ? void 0 : query.keys) == null ? void 0 : _a.join(\"-\")) ?? void 0;\n};\nconst MOLOCO_SHARED_KEY = \"moloco-shared\";\nconst getMolocoCacheQuery = (query) => {\n  if (query.type !== QueryType.Moloco) {\n    return query;\n  }\n  const molocoQuery = query;\n  return {\n    type: molocoQuery.type,\n    tagId: molocoQuery.tagId,\n    inventoryId: molocoQuery.inventoryId,\n    pageId: molocoQuery.pageId\n    // facetName은 의도적으로 제외\n    // 이유: 모든 탭 데이터가 이미 API에서 반환되므로\n    //       탭마다 다른 cache를 만들 필요가 없음\n  };\n};\nconst createMolocoKey = (query) => {\n  return [MOLOCO_SHARED_KEY, getMolocoCacheQuery(query)];\n};\nexport {\n  createKey,\n  createMolocoKey,\n  getMolocoCacheQuery\n};\n","import { ControlType } from \"framer\";\nimport { entries } from \"../../utils/entries.js\";\nconst combineObjectPropertyControls = (...controls) => {\n  return controls.flatMap(entries).reduce((prev, curr) => {\n    const [key, incoming] = curr;\n    const copied = {\n      ...prev\n    };\n    const existing = copied[key] ?? {};\n    if (existing.type === ControlType.Enum && incoming.type === ControlType.Enum) {\n      copied[key] = mergeEnumControlDescription(existing, incoming);\n      return prev = copied;\n    }\n    return prev = {\n      ...prev,\n      [key]: incoming\n    };\n  }, {});\n};\nconst mergeEnumControlDescription = (existing, incoming) => {\n  return {\n    ...existing,\n    options: [...existing.options, ...incoming.options],\n    optionTitles: [...existing.optionTitles ?? [], ...incoming.optionTitles ?? []]\n  };\n};\nexport {\n  combineObjectPropertyControls\n};\n","var CouponModuleInputType = /* @__PURE__ */ ((CouponModuleInputType2) => {\n  CouponModuleInputType2[CouponModuleInputType2[\"Linked\"] = 0] = \"Linked\";\n  CouponModuleInputType2[CouponModuleInputType2[\"Manual\"] = 1] = \"Manual\";\n  CouponModuleInputType2[CouponModuleInputType2[\"Auto\"] = 2] = \"Auto\";\n  return CouponModuleInputType2;\n})(CouponModuleInputType || {});\nvar CouponUpdateType = /* @__PURE__ */ ((CouponUpdateType2) => {\n  CouponUpdateType2[CouponUpdateType2[\"NORMAL\"] = 0] = \"NORMAL\";\n  CouponUpdateType2[CouponUpdateType2[\"DAILY\"] = 1] = \"DAILY\";\n  return CouponUpdateType2;\n})(CouponUpdateType || {});\nexport {\n  CouponModuleInputType,\n  CouponUpdateType\n};\n","import { ControlType } from \"framer\";\nimport { CouponType } from \"../../types/models/coupon.js\";\nimport { CouponUpdateType } from \"./CouponModule/CouponModule.types.js\";\nimport { QueryType, RankingType, PopularityPeriodType, TrendingPeriodType, CategoryType } from \"./types.js\";\nconst PRODUCT_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Product],\n    optionTitles: [\"상품\"]\n  },\n  productIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Product,\n    type: ControlType.String,\n    title: \"상품 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst KEYWORD_COLLECTION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.KeywordCollection],\n    optionTitles: [\"키워드 컬렉션\"]\n  },\n  keywordCollectionId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.KeywordCollection,\n    type: ControlType.String,\n    title: \"키워드 컬렉션 ID\",\n    description: \"단수만 입력\",\n    defaultValue: \"\"\n  }\n};\nconst KEYWORD_COLLECTIONS_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.KeywordCollections],\n    optionTitles: [\"다중 키워드 컬렉션\"]\n  },\n  keywordCollectionIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.KeywordCollections,\n    type: ControlType.String,\n    title: \"키워드 컬렉션 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"11628,11629,11630\"\n  }\n};\nconst BRAND_CURATION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.BrandCuration],\n    optionTitles: [\"브랜드 큐레이션\"]\n  },\n  brandGroupIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.String,\n    title: \"브랜드 그룹 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  },\n  brandSize: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.Number,\n    title: \"개수\",\n    description: \"최대 500개, 미입력 시 최대 개수로 노출\",\n    unit: \"개\",\n    defaultValue: 20,\n    min: 0,\n    displayStepper: true\n  },\n  brandCurationTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst RECOMMENDATION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Recommendation],\n    optionTitles: [\"개인화 추천\"]\n  },\n  recommendationTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Recommendation,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst RANKING_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Ranking],\n    optionTitles: [\"랭킹\"]\n  },\n  rankingType: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.Enum,\n    title: \"랭킹 유형\",\n    options: [RankingType.Popularity, RankingType.Trending],\n    optionTitles: [\"인기\", \"급상승\"]\n  },\n  popularityPeriodType: {\n    hidden: ({\n      type,\n      rankingType\n    }) => type !== QueryType.Ranking || rankingType !== RankingType.Popularity,\n    type: ControlType.Enum,\n    title: \"기간\",\n    options: [PopularityPeriodType.Realtime, PopularityPeriodType.Hourly, PopularityPeriodType.Daily],\n    optionTitles: [\"실시간\", \"시간별\", \"일별\"]\n  },\n  trendingPeriodType: {\n    hidden: ({\n      type,\n      rankingType\n    }) => type !== QueryType.Ranking || rankingType !== RankingType.Trending,\n    type: ControlType.Enum,\n    title: \"기간\",\n    options: [TrendingPeriodType.Hourly],\n    optionTitles: [\"시간별\"]\n  },\n  rankingTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  },\n  categoryType: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.Enum,\n    title: \"카테고리 유형\",\n    options: [CategoryType.Large, CategoryType.Middle],\n    optionTitles: [\"대카테고리\", \"중카테고리\"],\n    defaultValue: CategoryType.Large\n  },\n  excludeLargeCategoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    title: \"제외 대카테고리 ID\",\n    type: ControlType.String,\n    description: \"패싯에서 제외 시킬 대카테고리 ID 입력\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"268100100,269100100,272100100,273100100\"\n  },\n  excludeMiddleCategoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.String,\n    title: \"제외 중카테고리 ID\",\n    description: \"패싯에서 제외 시킬 중카테고리 ID 입력\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"268103100,268106100,268104100,268117100\"\n  }\n};\nconst COUPON_COLLECTION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.CouponCollection],\n    optionTitles: [\"타임 세일 브랜드\"]\n  },\n  brandSaleGroupId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.CouponCollection,\n    type: ControlType.String,\n    title: \"타임 세일 브랜드 ID\",\n    description: \"단수만 입력\",\n    defaultValue: \"\"\n  }\n};\nconst RAFFLE_GROUP_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.RaffleGroup],\n    optionTitles: [\"래플 그룹\"]\n  },\n  raffleGroupId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.RaffleGroup,\n    type: ControlType.String,\n    title: \"래플 그룹 ID\"\n  }\n};\nconst COUPON_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Coupon],\n    optionTitles: [\"쿠폰\"]\n  },\n  couponType: {\n    type: ControlType.Enum,\n    title: \"쿠폰 유형\",\n    description: \"랜덤 쿠폰은 쿠폰 번호 없이 당일에 발급 가능한 쿠폰이 발급됩니다.\",\n    options: [CouponType.NORMAL, CouponType.LIMITED, CouponType.RANDOM],\n    optionTitles: [\"일반\", \"선착순\", \"랜덤\"]\n  },\n  couponUpdateType: {\n    hidden: (props) => props.couponType === CouponType.RANDOM,\n    type: ControlType.Enum,\n    title: \"쿠폰 갱신 유형\",\n    options: [CouponUpdateType.NORMAL, CouponUpdateType.DAILY],\n    optionTitles: [\"고정\", \"일자별\"]\n  },\n  couponIds: {\n    hidden: (props) => props.couponType !== CouponType.RANDOM && props.couponUpdateType !== CouponUpdateType.NORMAL,\n    type: ControlType.String,\n    title: \"쿠폰 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\\n랜덤 쿠폰은 유의사항 문구 자동생성을 위해 첫 회차에 해당하는 쿠폰번호 목록을 입력해 주세요.\"\n  },\n  dailyCouponOptions: {\n    hidden: (props) => props.couponType === CouponType.RANDOM || props.couponUpdateType !== CouponUpdateType.DAILY,\n    type: ControlType.Array,\n    title: \"갱신 일자\",\n    control: {\n      type: ControlType.Object,\n      controls: {\n        dailyCouponIds: {\n          type: ControlType.Array,\n          title: \"쿠폰 번호 목록\",\n          description: \"일자별 쿠폰 번호 목록을 입력합니다.\\n하나의 쿠폰 번호 목록당 하나의 날짜에 연결됩니다.\",\n          control: {\n            type: ControlType.String,\n            title: \"쿠폰 번호 목록\"\n          }\n        },\n        updateSchedule: {\n          type: ControlType.Object,\n          title: \"갱신 기간\",\n          controls: {\n            startAt: {\n              type: ControlType.Date,\n              title: \"시작일\"\n            },\n            endAt: {\n              type: ControlType.Date,\n              title: \"종료일\"\n            }\n          }\n        },\n        updateAt: {\n          type: ControlType.Object,\n          title: \"갱신 주기\",\n          description: \"ex) 10시 0분 0초 입력 -> 매일 오전 10시에 쿠폰번호 갱신\",\n          controls: {\n            hours: {\n              type: ControlType.Number,\n              title: \"시\",\n              defaultValue: 0,\n              min: 0,\n              max: 23,\n              unit: \"시\",\n              step: 1,\n              displayStepper: true\n            },\n            minutes: {\n              type: ControlType.Number,\n              title: \"분\",\n              defaultValue: 0,\n              min: 0,\n              max: 59,\n              unit: \"분\",\n              step: 1,\n              displayStepper: true\n            },\n            seconds: {\n              type: ControlType.Number,\n              title: \"초\",\n              defaultValue: 0,\n              min: 0,\n              max: 59,\n              unit: \"초\",\n              step: 1,\n              displayStepper: true\n            }\n          }\n        }\n      }\n    }\n  }\n};\nconst PREUSER_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Preuser],\n    optionTitles: [\"체험단\"]\n  },\n  preuserIds: {\n    type: ControlType.String,\n    hidden: ({\n      type\n    }) => type !== QueryType.Preuser,\n    title: \"체험단 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst QUERY_CONTROL = {\n  type: ControlType.Object,\n  title: \"질의\",\n  controls: {}\n};\nconst CUSTOM_CATEGORY_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"질의 유형\",\n    options: [QueryType.CustomCategory],\n    optionTitles: [\"카테고리\"]\n  },\n  categoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.CustomCategory,\n    type: ControlType.String,\n    title: \"카테고리 ID\",\n    description: \"복수개의 카테고리를 mix 하여 커스텀 카테고리 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst MOLOCO_CONTROL = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Moloco],\n    optionTitles: [\"몰로코\"]\n  },\n  tagId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"태그 ID\"\n  },\n  inventoryId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"인벤토리 ID\",\n    description: \"몰로코와 협의된 값 ex) campaign_29week\"\n  },\n  pageId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"페이지 ID\",\n    description: \"해당 모듈이 노출될 이구위크 페이지 이름, 임의값으로 정해서 전달주시면 됩니다. *페이지당 1개의 고유 pageId 필요\"\n  },\n  categories: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.Array,\n    title: \"카테고리\",\n    description: \"카테고리를 입력하면 기존 몰로코 데이터에서 해당 카테고리 데이터만 노출됩니다\",\n    control: {\n      type: ControlType.Object,\n      controls: {\n        categoryId: {\n          type: ControlType.String,\n          title: \"카테고리 ID\"\n        },\n        categoryName: {\n          type: ControlType.String,\n          title: \"카테고리 이름\"\n        }\n      }\n    }\n  }\n};\nexport {\n  BRAND_CURATION_CONTROLS,\n  COUPON_COLLECTION_CONTROLS,\n  COUPON_CONTROLS,\n  CUSTOM_CATEGORY_CONTROLS,\n  KEYWORD_COLLECTIONS_CONTROLS,\n  KEYWORD_COLLECTION_CONTROLS,\n  MOLOCO_CONTROL,\n  PREUSER_CONTROLS,\n  PRODUCT_CONTROLS,\n  QUERY_CONTROL,\n  RAFFLE_GROUP_CONTROLS,\n  RANKING_CONTROLS,\n  RECOMMENDATION_CONTROLS\n};\n","import { APIService } from \"../APIService.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { environments, env } from \"../../config/index.js\";\nconst DEFAULT_COLLECTION_PRODUCTS_SIZE = 20;\nclass CollectionApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getCollection(collectionId, needShuffle, isDevMode) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/collections/${collectionId}/product-group-preview?productShuffleEnabled=${String(needShuffle)}`);\n  }\n  async getCollections(collectionIds) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v4/collections`, {\n      collectionIds: collectionIds.join(\",\")\n    });\n  }\n  async getCollectionProducts({\n    collectionId,\n    productGroupId,\n    sort,\n    isDevMode\n  }) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/proxy/content-api/api/v5/keyword-collections/${collectionId}/product-groups/${productGroupId}/products`, {\n      sort,\n      page: 0,\n      size: DEFAULT_COLLECTION_PRODUCTS_SIZE\n    }).then((data) => formatProducts(data.data.resultList));\n  }\n}\nconst formatProducts = (products) => products.map((product) => {\n  var _a;\n  return {\n    frontBrand: {\n      frontBrandId: product.frontBrand.id,\n      nameKor: product.frontBrand.nameKor,\n      nameEng: product.frontBrand.nameEng\n    },\n    productId: product.productId,\n    productName: product.productName,\n    subjectDescriptions: product.subjectDescriptions,\n    imageUrl: product.imageUrl,\n    consumerPrice: product.consumerPrice,\n    lastSalePrice: product.lastSalePrice,\n    lastSalePercent: product.lastSalePercent,\n    heartCount: product.heartCount,\n    heartOn: product.heartOn,\n    reviewCount: product.reviewCount,\n    reviewAveragePoint: product.reviewAveragePoint,\n    isCoupon: product.saleInfo.coupon,\n    isFreeShipping: product.freeShipping,\n    isNew: product.newProperty,\n    isSoldOut: product.soldOut,\n    frontCategories: (_a = product.frontCategories) == null ? void 0 : _a.map((category) => ({\n      largeCategoryCode: category.largeCode ?? 0,\n      largeCategoryName: category.largeName ?? \"\",\n      mediumCategoryCode: category.mediumCode ?? 0,\n      mediumCategoryName: category.mediumName ?? \"\",\n      smallCategoryCode: category.smallCode ?? 0,\n      smallCategoryName: category.smallName ?? \"\"\n    }))\n  };\n});\nconst collectionApi = new CollectionApiService();\nexport {\n  collectionApi\n};\n","const formatToCoupon = (coupon) => {\n  if (!coupon) {\n    return void 0;\n  }\n  return {\n    ...coupon,\n    id: coupon.couponId\n  };\n};\nexport {\n  formatToCoupon\n};\n","import { QueryType } from \"../types.js\";\nimport useSWR from \"../../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../../apis/coupon/CouponApiService.js\";\nimport { formatToCoupon } from \"./CouponModule.utils.js\";\nconst COUPONS_FETCHER_KEY = \"@coupon/coupons\";\nconst useCouponsQuery = ({\n  query,\n  couponIds,\n  enabled = true\n}) => {\n  const canFetch = couponIds.length > 0 && enabled && query !== void 0;\n  const {\n    data\n  } = useSWR(canFetch ? [COUPONS_FETCHER_KEY, couponIds] : null, () => queryCoupons(couponIds, query));\n  return {\n    coupons: (data == null ? void 0 : data.coupons) ?? []\n  };\n};\nconst fetchCoupons = async (couponIds) => {\n  const {\n    data\n  } = await couponApi.getCoupons(couponIds);\n  return {\n    coupons: data\n  };\n};\nconst fetchCouponCollectionCoupon = (query) => {\n  const coupon = formatToCoupon(query.coupon);\n  return {\n    coupons: coupon ? [coupon] : []\n  };\n};\nconst fetchKeywordCollectionCoupon = async (query) => {\n  if (!query.couponId) {\n    return {\n      coupons: []\n    };\n  }\n  const {\n    data\n  } = await couponApi.getCoupons([query.couponId]);\n  return {\n    coupons: data\n  };\n};\nconst queryCoupons = (couponIds, query) => {\n  if (query === void 0) {\n    return {\n      coupons: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return fetchCoupons(couponIds);\n    case QueryType.CouponCollection:\n      return fetchCouponCollectionCoupon(query);\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCoupon(query);\n    default:\n      return {\n        coupons: []\n      };\n  }\n};\nexport {\n  useCouponsQuery\n};\n","import { CouponType, DiscountType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { deduplicate } from \"../../../../utils/deduplicate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { parseISO } from \"../../../../node_modules/date-fns/parseISO.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nconst DATE_FORMAT = \"yyyy.MM.dd HH:mm\";\nconst HOURS_IN_DAY = 24;\nconst getCouponNotices = (couponType, coupons) => {\n  const coupon = head(coupons);\n  if (!coupon) {\n    return [];\n  }\n  const formattedAvailablePeriod = formatAvailablePeriod(coupon);\n  const formattedMaxDiscountPrice = formatMaxDiscountPrice(couponType, sortCouponsByDiscountValueAscending(coupons));\n  const maxIssueCountNotice = createMaxIssueCountNotice(coupon.personMaxIssueCount);\n  if (couponType === CouponType.RANDOM) {\n    return getRandomCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice);\n  }\n  if (coupon.discountType === DiscountType.FIXED_RATE) {\n    return getRateCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n  }\n  return getAmountCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n};\nconst createMaxIssueCountNotice = (maxIssueCount) => {\n  if (!maxIssueCount) {\n    return \"\";\n  }\n  const hasMaxIssueCount = maxIssueCount > 0;\n  if (!hasMaxIssueCount) {\n    return \"쿠폰은 이벤트 기간 중복 발급 가능합니다.\";\n  }\n  return `쿠폰은 이벤트 기간 동안 하나의 ID 당 ${maxIssueCount}회 발급 및 사용 가능합니다.`;\n};\nconst formatMaxDiscountPrice = (couponType, coupons) => {\n  const hasMaxDiscountPrice = coupons.some((coupon2) => coupon2.maxDiscountPrice > 0);\n  if (!hasMaxDiscountPrice) {\n    return \"제한 없음\";\n  }\n  const [coupon] = coupons;\n  if (couponType === CouponType.RANDOM) {\n    return formatRandomCouponMaxDiscountPrice(coupons);\n  }\n  if (coupon.discountType === DiscountType.FIXED_PRICE) {\n    return formatAmountCouponMaxDiscountPrice(coupons);\n  }\n  return formatRateCouponMaxDiscountPrice(coupons);\n};\nconst formatRateCouponMaxDiscountPrice = (coupons) => {\n  return `${composeWithUnit(getMaxDiscountPrice(coupons), \"원\")}`;\n};\nconst formatAmountCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByMinPayAmount(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      maxDiscountPrice,\n      minPayAmount\n    } = curr;\n    acc.push(`${composeWithUnit(minPayAmount, \"원\")} 이상 구매 시 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatRandomCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByDiscountValue(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      discountType,\n      discountValue,\n      maxDiscountPrice\n    } = curr;\n    acc.push(`${composeWithUnitByType(discountType, discountValue)} 쿠폰 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatAvailablePeriod = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.DAY) {\n    return `쿠폰 발급 후 ${coupon.couponUseAfterDay * HOURS_IN_DAY}시간 이내`;\n  }\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    const availableStartAt = parseISO(coupon.couponUseStartAt);\n    const availableEndAt = parseISO(coupon.couponUseEndAt);\n    return `${format(availableStartAt, DATE_FORMAT)} - ${format(availableEndAt, DATE_FORMAT)}`;\n  }\n  return \"없음\";\n};\nconst uniquifyCouponsByDiscountValue = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.discountValue === y.discountValue && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst uniquifyCouponsByMinPayAmount = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.minPayAmount === y.minPayAmount && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst getMaxDiscountPrice = (coupons) => {\n  return Math.max(...coupons.map((coupon) => coupon.maxDiscountPrice));\n};\nconst RANDOM_COUPON_PERIOD_CUTOFF = new Date(2026, 1, 18, 10, 0, 0);\nconst getRandomCouponUseablePeriod = (now = /* @__PURE__ */ new Date()) => {\n  if (now >= RANDOM_COUPON_PERIOD_CUTOFF) {\n    return \"발급일 기준 당일 23:59 까지\";\n  }\n  return \"발급일 기준 익일 09:59 까지\";\n};\nconst getRandomCouponNotices = (_availablePeriod, maxDiscountPrice) => [`쿠폰 사용 기간 : ${getRandomCouponUseablePeriod()}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `쿠폰을 사용한 이력이 있는 경우 쿠폰은 보이지 않습니다.`, `쿠폰 소멸, 발급 중단, 사용 완료된 쿠폰은 구매 취소 시 별도 재발급이 불가합니다.`, `브랜드 정책에 따라 일부 상품 쿠폰 적용이 불가할 수 있습니다.`];\nconst getRateCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\nconst getAmountCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => {\n  return [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\n};\nconst composeWithUnitByType = (discountType, discountValue) => {\n  switch (discountType) {\n    case DiscountType.FIXED_RATE:\n      return composeWithUnit(discountValue, \"%\");\n    case DiscountType.FIXED_PRICE:\n      return composeWithUnit(discountValue, \"원\");\n  }\n};\nconst composeWithUnit = (discountValue, unit) => {\n  return `${discountValue.toLocaleString(\"ko-KR\")}${unit}`;\n};\nexport {\n  composeWithUnit,\n  composeWithUnitByType,\n  getCouponNotices,\n  getRandomCouponUseablePeriod\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { FoldableList } from \"../../../@shared/FoldableList/index.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 \"../../../../config/index.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.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 { useTheme } from \"../../../../hooks/useTheme.js\";\nimport \"../../../@shared/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 { typography } from \"../../../../styles/typography.js\";\nimport { getCouponNotices } from \"./NoticesElement.utils.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst NoticesElement = ({\n  couponType,\n  coupons,\n  mainNotices,\n  hasAdditionalNotices,\n  additionalNotices\n}) => {\n  const theme = useTheme();\n  const uniqueMainNotices = [...new Set(mainNotices)];\n  const mergedAdditionalNotices = useMemo(() => [...getCouponNotices(couponType, coupons), ...additionalNotices], [couponType, coupons, additionalNotices]);\n  const uniqueAdditionalNotices = [...new Set(mergedAdditionalNotices)];\n  const hasMainNotices = mainNotices.length > 0;\n  const hasNotices = hasMainNotices || hasAdditionalNotices;\n  if (!hasNotices) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { style: noticesLayout, children: [\n    hasMainNotices ? /* @__PURE__ */ jsx(\"div\", { style: mainNoticesStyle, children: uniqueMainNotices.map((notice) => /* @__PURE__ */ jsxs(\"div\", { style: {\n      ...typography(12, 400),\n      ...mainNoticeStyleByTheme[theme]\n    }, children: [\n      \"*\",\n      notice\n    ] }, notice)) }) : null,\n    hasAdditionalNotices ? /* @__PURE__ */ jsxs(FoldableList.Root, { theme, children: [\n      /* @__PURE__ */ jsx(FoldableList.Trigger, { style: {\n        gap: 2\n      }, textStyle: typography(12, 700), icons: {\n        initial: \"chevronDown\",\n        active: \"chevronUp\",\n        size: 12\n      }, children: \"유의사항\" }),\n      /* @__PURE__ */ jsx(FoldableList.Content, { children: filterMap(uniqueAdditionalNotices, (notice) => notice !== \"\", (notice) => /* @__PURE__ */ jsx(FoldableList.Item, { children: notice }, notice)) })\n    ] }) : null\n  ] });\n};\nconst noticesLayout = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: \"12px\",\n  marginTop: \"8px\"\n};\nconst mainNoticesStyle = {\n  width: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\"\n};\nconst mainNoticeStyleByTheme = {\n  light: {\n    color: \"#474747\"\n  },\n  dark: {\n    color: \"#a0a0a0\"\n  }\n};\nexport {\n  NoticesElement\n};\n","import { useRef, useState, useEffect, useCallback } from \"react\";\nconst useVisibilityAwareInterval = (callback, delay) => {\n  const savedCallback = useRef(callback);\n  const intervalIdRef = useRef(null);\n  const [isVisible, setIsVisible] = useState(false);\n  useEffect(() => {\n    savedCallback.current = callback;\n  }, [callback]);\n  const startInterval = useCallback(() => {\n    if (intervalIdRef.current !== null || delay === null) {\n      return;\n    }\n    intervalIdRef.current = setInterval(() => {\n      savedCallback.current();\n    }, delay);\n  }, [delay]);\n  const stopInterval = useCallback(() => {\n    if (intervalIdRef.current !== null) {\n      clearInterval(intervalIdRef.current);\n      intervalIdRef.current = null;\n    }\n  }, []);\n  useEffect(() => {\n    const handleVisibilityChange = () => {\n      setIsVisible(document.visibilityState === \"visible\");\n    };\n    document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n    return () => {\n      document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n    };\n  }, []);\n  useEffect(() => {\n    if (delay === null) {\n      stopInterval();\n      return;\n    }\n    if (isVisible) {\n      startInterval();\n    } else {\n      stopInterval();\n    }\n    return () => {\n      stopInterval();\n    };\n  }, [isVisible, delay, startInterval, stopInterval]);\n  useEffect(() => {\n    setIsVisible(document.visibilityState === \"visible\");\n  }, []);\n};\nexport {\n  useVisibilityAwareInterval\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { DiscountType } from \"../../../types/models/coupon.js\";\nimport \"../Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../Expandable/Expandable.js\";\nimport \"../FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../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 \"../../../apis/taste-sharing/TasteSharingApiService.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 \"../ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport \"../../../constants/snowplow/snowplowSchema.js\";\nimport \"../Products/Products.js\";\nimport \"../ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport { RollingNumber } from \"../RollingNumber/RollingNumber.js\";\nimport \"../TabBar/TabBar.js\";\nimport \"../TimeProgressBar/TimeProgressBar.js\";\nimport \"../ViewportContainer/ViewportContainer.js\";\nimport \"../TabBarV2/TabBarV2.js\";\nimport \"../TabBarV3/TabBarV3.js\";\nimport { useVisibilityAwareInterval } from \"../../../hooks/useVisibilityAwareInterval.js\";\nconst RandomDiscountValue = ({\n  discountType,\n  discountValues\n}) => {\n  const [index, setIndex] = useState(0);\n  useVisibilityAwareInterval(() => {\n    setIndex((prev) => (prev + 1) % discountValues.length);\n  }, 800);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\"\n  }, children: [\n    /* @__PURE__ */ jsx(RollingNumber, { value: discountValues[index] ?? 0 }),\n    discountType === DiscountType.FIXED_RATE ? \"%\" : \"원\"\n  ] });\n};\nexport {\n  RandomDiscountValue\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { Countdown } from \"../../../systems/Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"react\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../systems/Expandable/Expandable.js\";\nimport \"../../../systems/FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../../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 \"../../../../apis/taste-sharing/TasteSharingApiService.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 { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../systems/ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport \"../../../../constants/snowplow/snowplowSchema.js\";\nimport \"../../../systems/Products/Products.js\";\nimport \"../../../systems/ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../../../systems/ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport \"../../../systems/RollingNumber/RollingNumber.js\";\nimport \"../../../systems/TabBar/TabBar.js\";\nimport \"../../../systems/TimeProgressBar/TimeProgressBar.js\";\nimport \"../../../systems/ViewportContainer/ViewportContainer.js\";\nimport \"../../../systems/TabBarV2/TabBarV2.js\";\nimport \"../../../systems/TabBarV3/TabBarV3.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nimport { DiscountType, KindType, CouponType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { RandomDiscountValue } from \"../../../systems/RandomDiscountValue/RandomDiscountValue.js\";\nimport { QueryType } from \"../../types.js\";\nimport { isAbove } from \"../../../../utils/date.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { isBefore } from \"../../../../node_modules/date-fns/isBefore.js\";\nimport { isAfter } from \"../../../../node_modules/date-fns/isAfter.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nimport { isWithinInterval } from \"../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { differenceInCalendarDays } from \"../../../../node_modules/date-fns/differenceInCalendarDays.js\";\nimport { ko } from \"../../../../node_modules/date-fns/locale/ko.js\";\nconst getCouponUseEndAt = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    return createKRTimeZoneDate(coupon.couponUseEndAt);\n  }\n  return void 0;\n};\nconst getCouponStatus = (coupon, logged, query, statuses) => {\n  var _a;\n  if (!coupon) {\n    return \"downloadable\";\n  }\n  if (isCanvas()) {\n    return \"downloadable\";\n  }\n  if (query.type === QueryType.Coupon && query.couponType === CouponType.RANDOM) {\n    return \"downloadable\";\n  }\n  const now = createKRTimeZoneDate();\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  const isUpcoming = isBefore(now, issueStartAt);\n  const isEnd = isAfter(now, issueEndAt);\n  const isExpired = useEndAt !== void 0 && isAfter(now, useEndAt);\n  if (isUpcoming) {\n    return \"upcoming\";\n  }\n  if (isExpired || isEnd) {\n    return \"expired\";\n  }\n  if (!logged) {\n    return \"downloadable\";\n  }\n  const status = (_a = statuses.find((_status) => _status.couponId === coupon.id)) == null ? void 0 : _a.couponDownloadStatus;\n  switch (status) {\n    case \"NOT_ISSUED\":\n      return \"upcoming\";\n    case \"DOWNLOADABLE\":\n      return \"downloadable\";\n    case \"ISSUANCE_LIMIT_REACHED\":\n      return \"issuanceLimitedReached\";\n    case \"EXPIRED\":\n      return \"expired\";\n    case \"DOWNLOADED\":\n      return \"downloaded\";\n    case \"DISABLED\":\n      return \"disabled\";\n    default:\n      return \"downloadable\";\n  }\n};\nconst getCouponFallbackDescription = (coupons) => {\n  const discountValues = coupons.map((coupon) => coupon.discountValue);\n  const {\n    discountType = DiscountType.FIXED_RATE,\n    couponKindType = KindType.CART\n  } = head(coupons) ?? {};\n  const minDiscountValue = Math.min(...discountValues).toLocaleString(\"ko-KR\");\n  const maxDiscountValue = Math.max(...discountValues).toLocaleString(\"ko-KR\");\n  const unit = unitByDiscountType[discountType];\n  return `${minDiscountValue}${unit}~${maxDiscountValue}${unit} ${textByCouponKindType[couponKindType]} 쿠폰 랜덤 지급`;\n};\nconst unitByDiscountType = {\n  [DiscountType.FIXED_RATE]: \"%\",\n  [DiscountType.FIXED_PRICE]: \"원\"\n};\nconst textByCouponKindType = {\n  [KindType.CART]: \"장바구니\",\n  [KindType.PRODUCT]: \"상품\"\n};\nconst getUpcomingText = (issueStartAt) => {\n  const hour = format(issueStartAt, \"H\", {\n    locale: ko\n  });\n  const minute = format(issueStartAt, \"m\", {\n    locale: ko\n  });\n  const timeText = minute === \"0\" ? `${hour}시` : `${hour}시 ${minute}분`;\n  return `${format(issueStartAt, \"M월 d일(EEE)\", {\n    locale: ko\n  })} ${timeText} 발행 예정`;\n};\nconst getDescriptionByStatus = (coupon) => {\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  return {\n    upcoming: getUpcomingText(issueStartAt),\n    downloadable: /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(issueEndAt, \"yyyy-MM-dd\"), targetTimeString: format(issueEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }),\n    downloaded: useEndAt ? /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(useEndAt, \"yyyy-MM-dd\"), targetTimeString: format(useEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }) : null,\n    expired: \"쿠폰 사용 기간이 종료되었어요\",\n    disabled: \"사용할 수 없는 쿠폰입니다\",\n    issuanceLimitedReached: \"쿠폰이 모두 소진되었어요\"\n  };\n};\nconst descriptionStyle = {\n  display: \"flex\",\n  alignItems: \"center\",\n  gap: 3,\n  color: \"inherit\"\n};\nconst markAsDownloaded = (statuses, couponIds) => {\n  return statuses.map((status) => ({\n    ...status,\n    couponDownloadStatus: status.couponDownloadStatus === \"DOWNLOADABLE\" && couponIds.includes(status.couponId) ? \"DOWNLOADED\" : status.couponDownloadStatus\n  }));\n};\nconst getCouponCollectionCouponName = (query) => {\n  var _a, _b;\n  const personMaxIssueCount = (_a = query.coupon) == null ? void 0 : _a.personMaxIssueCount;\n  const issueCount = personMaxIssueCount && personMaxIssueCount > 1 ? ` ${personMaxIssueCount}장` : \"\";\n  return `${(_b = query.coupon) == null ? void 0 : _b.couponName}${issueCount}`;\n};\nconst getRandomCouponName = (coupons) => {\n  var _a;\n  const sortByDiscountValue = sortCouponsByDiscountValueAscending(coupons);\n  const couponDiscountValues = sortByDiscountValue.map((coupon) => coupon.discountValue);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\",\n    gap: 6\n  }, children: [\n    /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(RandomDiscountValue, { discountType: ((_a = head(coupons)) == null ? void 0 : _a.discountType) ?? DiscountType.FIXED_RATE, discountValues: couponDiscountValues }) }),\n    /* @__PURE__ */ jsx(\"span\", { children: \"쿠폰\" })\n  ] });\n};\nconst getGeneralCouponName = (coupons) => {\n  if (coupons.length === 1) {\n    const firstCoupon = coupons[0];\n    const personMaxIssueCount = firstCoupon.personMaxIssueCount;\n    const issueCount = personMaxIssueCount && personMaxIssueCount > 1 ? ` ${personMaxIssueCount}장` : \"\";\n    return getCouponNameByDiscountType(firstCoupon) + issueCount;\n  }\n  const isAllFixedRateCoupon = coupons.every((coupon) => coupon.discountType === DiscountType.FIXED_RATE);\n  const maxDiscountValue = Math.max(...coupons.map((coupon) => coupon.discountValue), 0).toLocaleString(\"ko-KR\");\n  if (isAllFixedRateCoupon) {\n    return `${maxDiscountValue}% 쿠폰 외 ${coupons.length - 1}장`;\n  }\n  return `${maxDiscountValue}원 쿠폰 외 ${coupons.length - 1}장`;\n};\nconst getCouponNameByCouponType = (coupons, query) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponName(coupons);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponName(coupons);\n  }\n};\nconst getCouponName = (coupons, query) => {\n  if (coupons.length === 0) {\n    return \"\";\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponName(query);\n    case QueryType.KeywordCollection:\n      return getGeneralCouponName(coupons);\n    case QueryType.Coupon:\n      return getCouponNameByCouponType(coupons, query);\n  }\n};\nconst getCouponNameByDiscountType = (coupon) => {\n  if (!coupon) {\n    return \"\";\n  }\n  const {\n    discountType,\n    discountValue\n  } = coupon;\n  const postfix = discountType === DiscountType.FIXED_PRICE ? \"원 쿠폰\" : \"% 쿠폰\";\n  return discountValue.toLocaleString(\"ko-KR\") + postfix;\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst findCurrentSchedule = (schedule) => {\n  const now = createKRTimeZoneDate();\n  const scheduleIndex = schedule.findIndex((item, index) => {\n    const {\n      shouldUpdateAt\n    } = item;\n    const next = schedule[index + 1];\n    const hasNext = next !== void 0;\n    const isFirst = index === 0 && isAbove(shouldUpdateAt, now);\n    const isWithin = hasNext && isWithinInterval(now, {\n      start: shouldUpdateAt,\n      end: next.shouldUpdateAt\n    });\n    const isLast = !hasNext && isAbove(now, shouldUpdateAt);\n    return isFirst || isWithin || isLast;\n  });\n  return schedule[scheduleIndex];\n};\nconst toSchedule = (options) => sortScheduleAscending(toCouponSchedule(options));\nconst sortScheduleAscending = (schedule) => {\n  return [...schedule].sort((x, y) => x.shouldUpdateAt.getTime() - y.shouldUpdateAt.getTime());\n};\nconst toCouponSchedule = (options) => {\n  return options.flatMap((option) => {\n    const {\n      dailyCouponIds,\n      updateSchedule,\n      updateAt\n    } = option;\n    const {\n      startAt,\n      endAt\n    } = updateSchedule;\n    if (!startAt || !endAt) {\n      return [];\n    }\n    const diff = differenceInCalendarDays(endAt, startAt);\n    return Array.from({\n      length: diff + 1\n    }, (_, index) => {\n      const {\n        hours,\n        minutes,\n        seconds\n      } = updateAt;\n      const date = createKRTimeZoneDate(startAt);\n      date.setDate(date.getDate() + index);\n      date.setHours(hours, minutes, seconds);\n      return {\n        shouldUpdateAt: date,\n        couponIdList: dailyCouponIds[index]\n      };\n    });\n  });\n};\nexport {\n  findCurrentSchedule,\n  getCouponFallbackDescription,\n  getCouponName,\n  getCouponStatus,\n  getDescriptionByStatus,\n  markAsDownloaded,\n  toSchedule\n};\n","import { toCouponNos } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { shallowUnique } from \"../../../../utils/unique.js\";\nimport { useState, useEffect } from \"react\";\nimport { useVisibilityAwareInterval } from \"../../../../hooks/useVisibilityAwareInterval.js\";\nimport { QueryType } from \"../../types.js\";\nimport { findCurrentSchedule, toSchedule } from \"./CouponElement.utils.js\";\nconst MS_IN_SECOND = 1e3;\nconst DEFAULT_COUPON_ITEM_ENTRY = {\n  couponIds: [],\n  updateType: CouponUpdateType.NORMAL,\n  couponType: CouponType.NORMAL\n};\nconst useCouponIds = ({\n  query\n}) => {\n  const [couponItemEntry, setCouponItemEntry] = useState(getCouponItemEntry({\n    query\n  }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  useVisibilityAwareInterval(() => {\n    if (couponItemEntry.updateType === CouponUpdateType.NORMAL) {\n      return;\n    }\n    const currentSchedule = findCurrentSchedule(couponItemEntry.schedules ?? []);\n    setCouponItemEntry((prev) => ({\n      ...prev,\n      couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\"))\n    }));\n  }, MS_IN_SECOND);\n  useEffect(() => {\n    setCouponItemEntry(getCouponItemEntry({\n      query\n    }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  }, [query]);\n  return {\n    couponIds: couponItemEntry.couponIds,\n    couponType: couponItemEntry.couponType\n  };\n};\nconst getCouponCollectionCouponItemEntry = ({\n  coupon\n}) => {\n  return {\n    couponIds: coupon ? [coupon.couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getKeywordCollectionCouponItemEntry = ({\n  couponId\n}) => {\n  return {\n    couponIds: couponId ? [couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getRandomCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\"\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: CouponUpdateType.NORMAL,\n    couponType\n  };\n};\nconst getNormalCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\",\n    couponUpdateType\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: couponUpdateType,\n    couponType\n  };\n};\nconst getDailyCouponItemEntry = (query) => {\n  const {\n    couponType,\n    dailyCouponOptions = [],\n    couponUpdateType\n  } = query;\n  const schedules = toSchedule(dailyCouponOptions);\n  const currentSchedule = findCurrentSchedule(schedules);\n  return {\n    couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\")),\n    updateType: couponUpdateType,\n    couponType,\n    schedules\n  };\n};\nconst getGeneralCouponItemEntry = (query) => {\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.NORMAL:\n      return getNormalCouponItemEntry(query);\n    case CouponUpdateType.DAILY:\n      return getDailyCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntryByCouponType = (query) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponItemEntry(query);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntry = ({\n  query\n}) => {\n  if (query === void 0) {\n    return null;\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponItemEntry(query);\n    case QueryType.KeywordCollection:\n      return getKeywordCollectionCouponItemEntry(query);\n    case QueryType.Coupon:\n      return getCouponItemEntryByCouponType(query);\n    default:\n      return null;\n  }\n};\nexport {\n  useCouponIds\n};\n","import { CouponType } from \"../../../../types/models/coupon.js\";\nimport { QueryType } from \"../../types.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { toSchedule } from \"./CouponElement.utils.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst validateCoupon = ({\n  query,\n  enabled\n}) => {\n  if (!enabled) {\n    return {\n      isValid: true\n    };\n  }\n  return validateCouponByQuery(query);\n};\nconst validateDailyUpdateCoupon = (query) => {\n  const schedule = toSchedule(query.dailyCouponOptions ?? []);\n  const isValid = schedule.every(({\n    couponIdList\n  }) => couponIdList !== void 0);\n  const errorMessage = isValid ? void 0 : `[관리자용 메시지] 일자별 쿠폰이 모두 입력되어 있는지 확인해주세요.\n${filterMap(schedule, ({\n    couponIdList\n  }) => couponIdList === void 0, ({\n    shouldUpdateAt\n  }) => {\n    return `[${shouldUpdateAt.toLocaleDateString()}] 쿠폰이 없습니다.`;\n  }).join(\"\\n\")}`;\n  return {\n    isValid,\n    errorMessage\n  };\n};\nconst validateCouponQuery = (query) => {\n  if (query.couponType === CouponType.RANDOM) {\n    return {\n      isValid: true\n    };\n  }\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.DAILY:\n      return validateDailyUpdateCoupon(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nconst validateCouponByQuery = (query) => {\n  if (query === void 0) {\n    return {\n      isValid: false,\n      errorMessage: \"쿠폰 쿼리가 없습니다.\"\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return validateCouponQuery(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nexport {\n  validateCoupon\n};\n","import { jsx, jsxs, Fragment } from \"react/jsx-runtime\";\nimport { useMemo, useRef, useEffect } from \"react\";\nimport { Coupon } from \"../../../@shared/Coupon/index.js\";\nimport { EventTrigger } from \"../../../@shared/EventTrigger/index.js\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport { useRootComponentId, useSetRootModule } from \"../../hooks.js\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { QueryType } from \"../../types.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\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 { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\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 \"../../../../config/index.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.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 \"../../../../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 { useTheme } from \"../../../../hooks/useTheme.js\";\nimport { useBreakpoint } from \"../../../../hooks/useBreakpoint.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 { useFetchCouponsDownloadStatus } from \"../../../../hooks/fetchers/useFetchCouponsDownloadStatus.js\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useDownloadCoupons } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { resolveCouponLayout, toBackgroundColor } from \"../../../../libs/property-controls/coupon.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { hideClosestParentByFramerName } from \"../../../../utils/hideParentElement.js\";\nimport { getPaddingStyle } from \"../../../../utils/spacing.js\";\nimport { useCouponsQuery } from \"../CouponModule.hooks.js\";\nimport { NoticesElement } from \"../NoticesElement/NoticesElement.js\";\nimport { useCouponIds } from \"./CouponElement.hooks.js\";\nimport { getCouponName, getCouponStatus, getCouponFallbackDescription, getDescriptionByStatus, markAsDownloaded } from \"./CouponElement.utils.js\";\nimport { validateCoupon } from \"./CouponElement.validate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nconst CouponElement = ({\n  loading = false,\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    logged,\n    userNo\n  } = useCurrentUser();\n  const breakpoint = useBreakpoint();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const dispatchSetQuery = useQueryStore((state) => state.dispatchSetQuery);\n  const theme = useTheme();\n  const {\n    isInView\n  } = useIntersectionContext();\n  const query = useMemo(() => attachAdditionalQuery(_query, output), [_query, output]);\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const rootRef = useRef(null);\n  const componentId = useRootComponentId(query);\n  const {\n    couponIds,\n    couponType\n  } = useCouponIds({\n    query\n  });\n  const isFramer = isCanvas();\n  const {\n    isValid,\n    errorMessage\n  } = validateCoupon({\n    query,\n    enabled: isFramer\n  });\n  const {\n    coupons\n  } = useCouponsQuery({\n    query,\n    couponIds,\n    enabled: isInView && canFetchBySegment\n  });\n  const headCoupon = head(coupons);\n  const hasCoupon = headCoupon !== void 0;\n  const isRandomCoupon = (query == null ? void 0 : query.type) === QueryType.Coupon && (query == null ? void 0 : query.couponType) === CouponType.RANDOM;\n  const enabledFetchCouponDownloadStatus = isInView && !isRandomCoupon && canFetchBySegment;\n  const {\n    statuses,\n    isLoading,\n    mutate\n  } = useFetchCouponsDownloadStatus(couponIds, userNo, enabledFetchCouponDownloadStatus);\n  const handleCouponDownloadSuccess = () => {\n    if (!headCoupon) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: `coupondown_${headCoupon.id}`,\n      button_name: headCoupon.couponName,\n      layout_position: -1\n    });\n  };\n  const {\n    validate,\n    download\n  } = useDownloadCoupons(couponType, headCoupon == null ? void 0 : headCoupon.discountType, handleCouponDownloadSuccess);\n  const shouldRender = query && hasCoupon && (!loading || !isLoading || !logged);\n  const paddingStyle = getPaddingStyle(layout);\n  useEffect(() => {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    if (!query) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetQuery(output, query);\n  }, [output, query]);\n  useSetRootModule(query, output);\n  const shouldRenderError = !isValid && isFramer;\n  useEffect(() => {\n    if (rootRef.current) {\n      hideClosestParentByFramerName(rootRef.current, \"카테고리첫구매쿠폰\", isVisible);\n    }\n  }, [isVisible]);\n  if (!isVisible) {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    return /* @__PURE__ */ jsx(\"div\", { ref: rootRef });\n  }\n  if (!shouldRender) {\n    return /* @__PURE__ */ jsxs(Fragment, { children: [\n      /* @__PURE__ */ jsx(Coupon.Root, { ref: rootRef, style: {\n        padding: paddingStyle\n      }, loading: true, theme }),\n      shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n    ] });\n  }\n  const downloadCount = Math.max(headCoupon.personMaxIssueCount ?? 1, 1);\n  const downloadCoupon = async () => {\n    await download(couponIds, downloadCount, true);\n    return markAsDownloaded(statuses, couponIds);\n  };\n  const handleClick = () => {\n    if (!validate()) {\n      return;\n    }\n    mutate(downloadCoupon(), {\n      optimisticData: markAsDownloaded(statuses, couponIds),\n      rollbackOnError: true,\n      populateCache: true,\n      revalidate: true\n    });\n  };\n  const handleImpression = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      layout_id: `coupondown_${headCoupon.id}`\n    });\n  };\n  const couponName = getCouponName(coupons, query);\n  const status = getCouponStatus(headCoupon, logged, query, statuses);\n  const description = isRandomCoupon ? getCouponFallbackDescription(coupons) : getDescriptionByStatus(headCoupon)[status];\n  const {\n    backgroundColor,\n    ...rest\n  } = layout;\n  const resolvedCouponLayout = resolveCouponLayout(layout.couponLayout, breakpoint);\n  return /* @__PURE__ */ jsxs(EventTrigger.Root, { ref: rootRef, style: {\n    padding: paddingStyle\n  }, types: [\"impression\"], onImpression: handleImpression, children: [\n    /* @__PURE__ */ jsxs(Coupon.Root, { theme, backgroundColor: toBackgroundColor(backgroundColor), status, layout: resolvedCouponLayout, children: [\n      /* @__PURE__ */ jsxs(Coupon.Summary, { children: [\n        /* @__PURE__ */ jsx(Coupon.Title, { children: couponName }),\n        /* @__PURE__ */ jsx(Coupon.Description, { children: description })\n      ] }),\n      /* @__PURE__ */ jsx(Coupon.Divider, {}),\n      /* @__PURE__ */ jsx(EventTrigger.Target, { style: {\n        aspectRatio: resolvedCouponLayout === \"detail\" ? \"1 / 1\" : void 0\n      }, children: /* @__PURE__ */ jsx(Coupon.Button, { onClick: handleClick }) })\n    ] }),\n    /* @__PURE__ */ jsx(NoticesElement, { couponType, coupons, ...rest }),\n    shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n  ] });\n};\nconst errorMessageStyle = {\n  background: \"white\",\n  border: \"0.7px solid #00000066\",\n  borderRadius: \"2px\",\n  padding: \"8px\",\n  whiteSpace: \"pre-line\"\n};\nconst attachAdditionalQuery = (query, output) => {\n  return query ? {\n    ...query,\n    isRoot: query.rootOutput === void 0,\n    rootOutput: query.rootOutput || output\n  } : void 0;\n};\nexport {\n  CouponElement\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nimport { createKey } from \"../../utils/key.js\";\nconst LinkedCouponModule = ({\n  value,\n  output,\n  layout\n}) => {\n  const query = useQueryStore((state) => state.queries[value]);\n  return /* @__PURE__ */ jsx(CouponElement, { query, output, layout }, createKey(query));\n};\nexport {\n  LinkedCouponModule\n};\n","import { ControlType } from \"framer\";\nconst COUPON_NOTICES_CONTROLS = {\n  mainNotices: {\n    type: ControlType.Array,\n    title: \"메인 유의사항\",\n    description: \"상시 노출되는 유의사항으로, 최대 두 줄 입력이 가능합니다.\",\n    control: {\n      type: ControlType.String\n    },\n    maxCount: 2\n  },\n  hasAdditionalNotices: {\n    type: ControlType.Boolean,\n    title: \"추가 유의사항 노출\",\n    enabledTitle: \"노출\",\n    disabledTitle: \"미노출\",\n    defaultValue: false\n  },\n  additionalNotices: {\n    hidden: ({\n      hasAdditionalNotices\n    }) => hasAdditionalNotices === false,\n    type: ControlType.Array,\n    title: \"추가 유의사항\",\n    description: \"더보기 클릭 시 노출되는 추가 유의사항입니다.\",\n    control: {\n      type: ControlType.String\n    }\n  }\n};\nexport {\n  COUPON_NOTICES_CONTROLS\n};\n","import { combineObjectPropertyControls } from \"../../../libs/property-controls/helpers.js\";\nimport { QUERY_CONTROL, COUPON_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS, KEYWORD_COLLECTION_CONTROLS } from \"../controls.js\";\nconst MANUAL_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(COUPON_CONTROLS)\n};\nconst AUTO_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(KEYWORD_COLLECTION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS)\n};\nexport {\n  AUTO_COUPON_MODULE_QUERY,\n  MANUAL_COUPON_MODULE_QUERY\n};\n","import useSWR from \"../../../../node_modules/swr/core/dist/index.js\";\nimport { collectionApi } from \"../../../../apis/collection/CollectionApiService.js\";\nimport { keywordCollectionApi } from \"../../../../apis/keyword-collections/KeywordCollectionApiService.js\";\nimport { QueryType } from \"../../types.js\";\nimport { orderByDateAsc, getCurrentScheduleIndex } from \"../../../../utils/date.js\";\nimport { splitToNumberArray } from \"../../../../utils/splitToNumberArray.js\";\nconst COUPON_ID_FETCHER_KEY = \"coupon-module/coupon-id\";\nconst useCouponIdQuery = (options) => {\n  const {\n    enabled: _enabled = true,\n    query\n  } = options;\n  const enabled = _enabled && query !== void 0;\n  const {\n    data,\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [COUPON_ID_FETCHER_KEY, query] : null, () => queryCouponId(query));\n  return {\n    isLoading: isLoading || !enabled,\n    query: data,\n    ...rest\n  };\n};\nconst fetchKeywordCollectionCouponId = async (query) => {\n  if (!query.keywordCollectionId) {\n    return query;\n  }\n  const {\n    data\n  } = await keywordCollectionApi.getKeywordCollection(Number(query.keywordCollectionId));\n  const {\n    title,\n    description,\n    displayEndAt,\n    productGroups,\n    couponId\n  } = data;\n  const [firstProductGroup] = productGroups;\n  return {\n    ...query,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups,\n    selectedProductGroup: {\n      id: firstProductGroup.productGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst fetchKeywordCollectionsCouponId = async (query) => {\n  if (!query.keywordCollectionIds) {\n    return query;\n  }\n  const {\n    data\n  } = await collectionApi.getCollections(splitToNumberArray(query.keywordCollectionIds));\n  const collections = orderByDateAsc(data, (x) => x.displayStartAt);\n  const currentIndex = getCurrentScheduleIndex(collections, (current) => current.displayStartAt, (_, next) => next == null ? void 0 : next.displayStartAt);\n  const collection = collections[currentIndex ?? 0];\n  if (!collection) {\n    return query;\n  }\n  const {\n    collectionId,\n    title,\n    description,\n    displayEndAt,\n    productGroupList,\n    couponId\n  } = collection;\n  const [firstProductGroup] = productGroupList;\n  return {\n    type: QueryType.KeywordCollection,\n    keywordCollectionId: `${collectionId}`,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups: productGroupList.map((group) => ({\n      productGroupId: group.collectionProductGroupId,\n      title: group.title,\n      sort: group.sort\n    })),\n    selectedProductGroup: {\n      id: firstProductGroup.collectionProductGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst queryCouponId = (query) => {\n  if (!query) {\n    return;\n  }\n  switch (query.type) {\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCouponId(query);\n    case QueryType.KeywordCollections:\n      return fetchKeywordCollectionsCouponId(query);\n    default:\n      return query;\n  }\n};\nexport {\n  useCouponIdQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useCouponIdQuery } from \"./AutoCouponModule.hooks.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nconst AutoCouponModule = ({\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const {\n    isLoading,\n    query\n  } = useCouponIdQuery({\n    query: _query,\n    enabled: isInView && canFetchBySegment\n  });\n  return /* @__PURE__ */ jsx(CouponElement, { loading: isLoading, query, output, layout });\n};\nexport {\n  AutoCouponModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { COUPON_CONTROLS } from \"../../../libs/property-controls/coupon.js\";\nimport { THEME_CONTROLS } from \"../../../libs/property-controls/theme.js\";\nimport { SEGMENT_CONTROLS } from \"../../../libs/property-controls/segment.js\";\nimport { CouponModuleInputType } from \"./CouponModule.types.js\";\nimport { LinkedCouponModule } from \"./LinkedCouponModule/LinkedCouponModule.js\";\nimport { COUPON_NOTICES_CONTROLS } from \"../../../libs/property-controls/coupon-notices.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { SectionLayout } from \"../../systems/curations/SectionLayout/SectionLayout.js\";\nimport { MANUAL_COUPON_MODULE_QUERY, AUTO_COUPON_MODULE_QUERY } from \"./CouponModule.controls.js\";\nimport { AutoCouponModule } from \"./AutoCouponModule/AutoCouponModule.js\";\nimport { CouponElement } from \"./CouponElement/CouponElement.js\";\nconst CouponModuleInner = ({\n  input,\n  output,\n  layout\n}) => {\n  switch (input.type) {\n    case CouponModuleInputType.Linked:\n      return /* @__PURE__ */ jsx(LinkedCouponModule, { value: input.value, output, layout });\n    case CouponModuleInputType.Auto:\n      return /* @__PURE__ */ jsx(AutoCouponModule, { query: input.autoQuery, output, layout });\n    case CouponModuleInputType.Manual:\n      return /* @__PURE__ */ jsx(CouponElement, { query: input.query, output, layout });\n    default:\n      return null;\n  }\n};\nconst CouponModule = ({\n  theme,\n  componentId,\n  segment,\n  ...rest\n}) => {\n  return /* @__PURE__ */ jsx(SectionLayout, { componentId, theme, segment, children: /* @__PURE__ */ jsx(CouponModuleInner, { ...rest }) });\n};\naddPropertyControls(CouponModule, {\n  ...THEME_CONTROLS,\n  ...SEGMENT_CONTROLS,\n  componentId: {\n    hidden: ({\n      input\n    }) => (input == null ? void 0 : input.type) === CouponModuleInputType.Linked,\n    ...COMPONENT_ID_PROPS.componentId\n  },\n  input: {\n    type: ControlType.Object,\n    title: \"입력 값\",\n    controls: {\n      type: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        options: [CouponModuleInputType.Manual, CouponModuleInputType.Linked, CouponModuleInputType.Auto],\n        optionTitles: [\"수동\", \"연결\", \"자동\"],\n        defaultValue: CouponModuleInputType.Manual\n      },\n      value: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Linked,\n        type: ControlType.String,\n        title: \"출력 값\",\n        defaultValue: \"\"\n      },\n      query: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Manual,\n        ...MANUAL_COUPON_MODULE_QUERY\n      },\n      autoQuery: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Auto,\n        ...AUTO_COUPON_MODULE_QUERY\n      }\n    }\n  },\n  output: {\n    type: ControlType.String,\n    title: \"출력 값\",\n    defaultValue: \"\"\n  },\n  layout: {\n    type: ControlType.Object,\n    title: \"레이아웃\",\n    controls: {\n      ...COUPON_CONTROLS,\n      ...COUPON_NOTICES_CONTROLS,\n      padding: {\n        type: ControlType.FusedNumber,\n        title: \"패딩\",\n        defaultValue: 0,\n        toggleKey: \"isMixed\",\n        toggleTitles: [\"All\", \"Individual\"],\n        valueKeys: [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n        valueLabels: [\"T\", \"R\", \"B\", \"L\"],\n        min: 0\n      }\n    }\n  }\n});\nexport {\n  CouponModule\n};\n","import{CouponModule}from\"https://asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js\";CouponModule.displayName=\"[조립형]Coupon\";export default CouponModule;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CouponModule\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CouponModule.map"],"mappings":"s8CAOM,GAAY,GACT,OAAO,GAAW,YAAY,GAAmB,CAAC,MAAM,QAAQ,EAAO,oBCR1E,EAAgB,CACpB,QAAS,CACP,WAAY,CACV,MAAO,UACP,KAAM,UACP,CACD,QAAS,CACP,MAAO,OACP,KAAM,OACP,CACD,UAAW,CACT,MAAO,UACP,KAAM,UACP,CACD,SAAU,CACR,MAAO,qBACP,KAAM,2BACP,CACD,OAAQ,4BACT,CACD,OAAQ,CAEN,WAAY,CACV,MAAO,UACP,KAAM,UACP,CACD,QAAS,CACP,MAAO,OACP,KAAM,OACP,CACD,UAAW,CACT,MAAO,OACP,KAAM,OACP,CACD,SAAU,CACR,MAAO,OACP,KAAM,OACP,CACD,OAAQ,2BACT,CACD,SAAU,CACR,WAAY,CACV,MAAO,UACP,KAAM,UACP,CACD,QAAS,CACP,MAAO,UACP,KAAM,UACP,CACD,UAAW,CACT,MAAO,UACP,KAAM,UACP,CACD,SAAU,CACR,MAAO,qBACP,KAAM,2BACP,CACD,OAAQ,4BACT,CACF,CACK,GAAkB,CACtB,SAAU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