{"version":3,"file":"HideElement.BadR44BO.mjs","names":["useState","__esmMin","navigator","init_npm_react_18_3_1","window","_e","init_jsx_runtime","J","ce","init_ssg_sandbox_shims","withHideOnSpecificUA","isVisible","setIsVisible","overrideStyle","Component","props","init_HideElement"],"sources":["https:/framerusercontent.com/modules/1vhpaFbMtHGT62ryM2F1/Jm4yeb3vtJuTQNennbFi/HideElement.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,forwardRef}from\"react\";// Learn more: https://www.framer.com/developers/overrides/\nexport function withHideOnSpecificUA(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isVisible,setIsVisible]=useState(true);useEffect(()=>{if(typeof window!==\"undefined\"){const currentUA=navigator.userAgent||navigator.vendor;// --- 在这里修改为你需要匹配的具体 UA 值 ---\nconst targetUA=\"mutual\";if(currentUA.includes(targetUA)){setIsVisible(false);}}},[]);// 核心修复：动态生成需要覆盖的样式对象\n// 如果可见，返回空对象 {}，绝不破坏 Framer 的原生布局（如 Flex/Grid）\nconst overrideStyle=isVisible?{}:{// 方式一：隐藏且【不占据】空间（类似直接移除）\ndisplay:\"none\"};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,...overrideStyle}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHideOnSpecificUA\":{\"type\":\"reactHoc\",\"name\":\"withHideOnSpecificUA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HideElement.map"],"mappings":"A,gJACA,SAAgBU,EAAqB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAM,CAAC,GAAK,CAACC,EAAUC,GAAcZ,EAAS,EAAI,EAAEQ,MAAc,CAAWJ,IAAS,SAA6BF,EAAU,WAAWA,EAAU,OAAA,CACnM,SAAS,QAAQ,GAAGU,EAAa,EAAK,CAAI,EAAE,CAAC,CAAC,EAEnF,IAAMC,EAAcF,EAAU,CAAC,EAAE,CACjC,QAAQ,MAAM,EAAE,MAAoB,gBAAKG,EAAU,CAAK,MAAI,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,GAAGF,CAAa,CAAC,CAAC,CAAE,CAAC,CAAE,C"}