{"version":3,"file":"Image_Size_Controller.DM04OAIX.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/hoCagWWNP8vB0EULUZRX/nlrACs7zDbfSDXpOI3dS/Image_Size_Controller.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export function withCMSOptimizedLayout(Component){return props=>{const ref=useRef(null);const applyStyles=()=>{if(!ref.current)return;// 1. 이미지 최적화 (가로 사이즈에 맞추어 이미지 자동 확대)\nconst images=ref.current.querySelectorAll(\".framer-image\");images.forEach(img=>{img.style.setProperty(\"display\",\"block\",\"important\");img.style.setProperty(\"width\",\"100%\",\"important\");img.style.setProperty(\"height\",\"auto\",\"important\");});// 2. 텍스트 색상 치환 로직 (3가지 색상 최적화)\nconst textContainers=ref.current.querySelectorAll(\"p, h1, h2, h3, h4, h5, h6, li\");textContainers.forEach(node=>{let html=node.innerHTML;const originalHtml=html;// 규칙 1: ::텍스트:: (#122699 - 진한 파랑)\nhtml=html.replace(/::([\\s\\S]+?)::/g,`<span style=\"color: #122699 !important; --framer-text-color: #122699 !important; font-style: normal !important; font-weight: inherit !important;\">$1</span>`);// 규칙 2: ##텍스트## (#ED3B72 - 분홍색)\nhtml=html.replace(/##([\\s\\S]+?)##/g,`<span style=\"color: #ED3B72 !important; --framer-text-color: #ED3B72 !important; font-style: normal !important; font-weight: inherit !important;\">$1</span>`);// 규칙 3: %%텍스트%% (#2563EB - 밝은 파랑)\nhtml=html.replace(/%%([\\s\\S]+?)%%/g,`<span style=\"color: #2563EB !important; --framer-text-color: #2563EB !important; font-style: normal !important; font-weight: inherit !important;\">$1</span>`);// 실제 변경이 있을 때만 업데이트하여 브라우저 부하 최소화\nif(html!==originalHtml){node.innerHTML=html;}});};useEffect(()=>{applyStyles();// CMS 콘텐츠 로딩 시점 대응을 위한 Observer\nconst observer=new MutationObserver(()=>applyStyles());if(ref.current){observer.observe(ref.current,{childList:true,subtree:true});}return()=>observer.disconnect();},[props.content]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withCMSOptimizedLayout\":{\"type\":\"reactHoc\",\"name\":\"withCMSOptimizedLayout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Image_Size_Controller.map"],"mappings":"yHAA+E,SAAgB,EAAuB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAO,MAAgB,CAAK,EAAI,UACzL,EAAI,QAAQ,iBAAiB,gBAAgB,CAAQ,QAAQ,GAAK,CAAC,EAAI,MAAM,YAAY,UAAU,QAAQ,YAAY,CAAC,EAAI,MAAM,YAAY,QAAQ,OAAO,YAAY,CAAC,EAAI,MAAM,YAAY,SAAS,OAAO,YAAY,EAAG,CACvN,EAAI,QAAQ,iBAAiB,gCAAgC,CAAgB,QAAQ,GAAM,CAAC,IAAI,EAAK,EAAK,UAAgB,EAAa,EAC5J,EAAK,EAAK,QAAQ,kBAAkB,8JAA8J,CAClM,EAAK,EAAK,QAAQ,kBAAkB,8JAA8J,CAClM,EAAK,EAAK,QAAQ,kBAAkB,8JAA8J,CAC/L,IAAO,IAAc,EAAK,UAAU,IAAQ,GACwI,OADrI,MAAc,CAAC,GAAa,CAC9E,IAAM,EAAS,IAAI,qBAAqB,GAAa,CAAC,CAA8E,OAA1E,EAAI,SAAS,EAAS,QAAQ,EAAI,QAAQ,CAAC,UAAU,GAAK,QAAQ,GAAK,CAAC,KAAY,EAAS,YAAY,EAAG,CAAC,EAAM,QAAQ,CAAC,CAAqB,EAAK,MAAM,CAAK,MAAI,MAAM,CAAC,QAAQ,WAAW,CAAC,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,mBAPjQ,IAAoC"}