{
  "version": 3,
  "sources": ["ssg:https://asset.29cm.co.kr/contents/framer/components/modules/module-store/module.store.js", "ssg:https://asset.29cm.co.kr/contents/framer/components/modules/hooks.js"],
  "sourcesContent": ["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\";\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 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    });\n  }, [isRoot, output, componentId]);\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(\uC784\uADDC\uBBFC): section_name, position \uD504\uB85C\uD37C\uD2F0\uC5D0 \uD560\uB2F9\uD55C \uC57D\uC18D\uB41C \uC784\uC758 \uAC12 \uC218\uC815\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(\uC784\uADDC\uBBFC): section_name, position, layout_position \uD504\uB85C\uD37C\uD2F0\uC5D0 \uD560\uB2F9\uD55C \uC57D\uC18D\uB41C \uC784\uC758 \uAC12 \uC218\uC815\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"],
  "mappings": "iHAEA,IAAMA,EAAe,CACnB,YAAa,CAAC,CAChB,EACMC,EAAiBC,EAAOC,EAAuBC,IAAS,CAC5D,GAAGJ,EACH,sBAAuB,CAACK,EAAKC,IAAWF,EAAKG,IAAU,CACrD,YAAa,CACX,GAAGA,EAAK,YACR,CAACF,CAAG,EAAGC,CACT,CACF,EAAE,CACJ,EAAE,CAAC,ECPH,IAAME,EAAsBC,GAAU,CACpC,IAAMC,EAAcC,EAAe,EAC7BC,EAAOC,EAAgBC,GAAUA,EAAM,YAAsCL,GAAM,YAAe,EAAE,EAAGM,CAAS,EACtH,OAAgCH,GAAK,aAAgBF,CACvD,EACMM,EAAmB,CAACP,EAAOQ,IAAW,CAC1C,IAAMP,EAAcC,EAAe,EAC7BO,EAAwBL,EAAgBC,GAAUA,EAAM,qBAAqB,EAC7E,CACJ,OAAAK,EAAS,EACX,EAAIV,GAAS,CAAC,EACdW,EAAU,IAAM,CACTD,GAGAF,GAGLC,EAAsBD,EAAQ,CAC5B,YAAAP,CACF,CAAC,CACH,EAAG,CAACS,EAAQF,EAAQP,CAAW,CAAC,CAClC,EACMW,EAA4BZ,GAAU,CAC1C,IAAMa,EAAqBC,EAAsB,EAC3Cb,EAAcF,EAAmBC,CAAK,EAgB5C,MAf8B,CAAC,CAC7B,KAAAe,EACA,eAAAC,EAAiB,GACjB,KAAAC,EAAO,EACT,IAAM,CACJJ,EAAmB,eAAgB,CAEjC,aAAcZ,EACd,cAAeA,EACf,SAAU,GACV,gBAAiBe,EACjB,UAAWD,EACX,YAAaE,CACf,CAAC,CACH,CAEF,EACMC,EAAiC,IAAM,CAC3C,IAAML,EAAqBC,EAAsB,EAC3Cb,EAAcC,EAAe,EAUnC,MAToC,IAAM,CACxCW,EAAmB,qBAAsB,CAEvC,aAAcZ,EACd,cAAeA,EACf,SAAU,GACV,gBAAiB,EACnB,CAAC,CACH,CAEF",
  "names": ["initialState", "useModuleStore", "create", "subscribeWithSelector", "set", "key", "module", "prev", "useRootComponentId", "query", "componentId", "useComponentId", "root", "useModuleStore", "state", "shallow$1", "useSetRootModule", "output", "dispatchSetRootModule", "isRoot", "ue", "useTrackClickButtonEvent", "trackSnowplowEvent", "useTrackSnowplowEvent", "type", "layoutPosition", "name", "useTrackImpressionContentEvent"]
}
