{"version":3,"file":"Examples.CHxD_XsR.mjs","names":["useRef","useState","useCallback"],"sources":["https:/framerusercontent.com/modules/GXEMvKTGQPPig6D4YDsG/4vNPuFsCe8Q2Bhbx1Asd/Examples.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useRef,useState}from\"react\";// Learn more: https://www.framer.com/developers/overrides/\nexport function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[background,setBackground]=useState(\"#0099FF\");return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background},onClick:()=>{const nextColor=`hsl(${Math.floor(Math.random()*360)} 100% 50%)`;startTransition(()=>setBackground(nextColor));}});});}export function PortfolioProgressiveReveal(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function PortfolioLoadMorePremiumButton(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,boxSizing:\"border-box\",cursor:\"pointer\"}});});}export function PortfolioSectionLogic(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const sectionRef=useRef(null);const rafRef=useRef(null);const domObserverRef=useRef(null);const filterListenerCleanupRef=useRef(null);const activeFilterRef=useRef(\"Todos\");const[activeFilter,setActiveFilter]=useState(\"Todos\");const FILTER_NAMES=useRef([\"Todos\",\"Tradicional\",\"Candy\",\"Azul\",\"Resid\\xeancias\",\"Lojas\",\"Verde\",\"R\\xfastico\",\"Dourado\",\"Branco\",\"Floresta Encantada\",\"Mundo L\\xfadico\",\"Grandes Cen\\xe1rios\",\"Cria\\xe7\\xf5es Autorais\"]);const normalize=useCallback(value=>{return value.trim().toLowerCase();},[]);const schedule=useCallback(cb=>{if(typeof window===\"undefined\")return;if(rafRef.current!==null)window.cancelAnimationFrame(rafRef.current);rafRef.current=window.requestAnimationFrame(()=>cb());},[]);const findFilterButtons=useCallback(root=>{const normalizedNames=FILTER_NAMES.current.map(normalize);const candidates=Array.from(root.querySelectorAll(\"button, a, [role='button'], div, span\")).filter(el=>el instanceof HTMLElement);return candidates.filter(el=>{const text=normalize(el.textContent||\"\");return normalizedNames.includes(text);});},[normalize]);const styleFilterButtons=useCallback(root=>{const filters=findFilterButtons(root);filters.forEach(button=>{const name=(button.textContent||\"\").trim();const isTodos=normalize(name)===normalize(\"Todos\");const isActive=normalize(activeFilterRef.current)===normalize(name)||isTodos&&normalize(activeFilterRef.current)===normalize(\"Todos\");button.style.background=isActive?\"#5C1212\":\"rgba(253,251,248,0.72)\";button.style.backgroundColor=isActive?\"#5C1212\":\"rgba(253,251,248,0.72)\";button.style.backgroundImage=\"none\";button.style.color=isActive?\"#FFF8ED\":\"#5C1212\";button.style.border=isActive?\"1px solid #C9A24D\":\"1px solid rgba(110,15,26,0.18)\";button.style.opacity=\"1\";button.style.boxShadow=\"none\";const descendants=Array.from(button.querySelectorAll(\"*\")).filter(el=>el instanceof HTMLElement);descendants.forEach(descendant=>{descendant.style.background=\"transparent\";descendant.style.backgroundColor=\"transparent\";descendant.style.backgroundImage=\"none\";descendant.style.border=\"none\";descendant.style.boxShadow=\"none\";descendant.style.opacity=\"1\";descendant.style.pointerEvents=\"none\";descendant.style.color=isActive?\"#FFF8ED\":\"#5C1212\";});});},[findFilterButtons,normalize]);const wireFilters=useCallback(()=>{const root=sectionRef.current;if(!root)return;filterListenerCleanupRef.current?.();const filters=findFilterButtons(root);const cleanups=[];filters.forEach(filter=>{const onClick=()=>{const name=(filter.textContent||\"\").trim()||\"Todos\";const next=normalize(name)===normalize(\"Todos\")?\"Todos\":name;activeFilterRef.current=next;startTransition(()=>setActiveFilter(next));schedule(()=>styleFilterButtons(root));};filter.addEventListener(\"click\",onClick);cleanups.push(()=>filter.removeEventListener(\"click\",onClick));});filterListenerCleanupRef.current=()=>{cleanups.forEach(dispose=>dispose());};},[findFilterButtons,normalize,schedule,styleFilterButtons]);useEffect(()=>{if(typeof window===\"undefined\")return;const root=sectionRef.current;if(!root)return;schedule(()=>styleFilterButtons(root));wireFilters();const onResize=()=>{activeFilterRef.current=activeFilterRef.current||\"Todos\";schedule(()=>styleFilterButtons(root));wireFilters();};window.addEventListener(\"resize\",onResize);domObserverRef.current=new MutationObserver(()=>{schedule(()=>styleFilterButtons(root));wireFilters();});domObserverRef.current.observe(root,{childList:true,subtree:true});return()=>{if(rafRef.current!==null)window.cancelAnimationFrame(rafRef.current);window.removeEventListener(\"resize\",onResize);domObserverRef.current?.disconnect();filterListenerCleanupRef.current?.();};},[schedule,styleFilterButtons,wireFilters]);useEffect(()=>{const root=sectionRef.current;if(!root)return;schedule(()=>styleFilterButtons(root));},[activeFilter,schedule,styleFilterButtons]);const setRefs=useCallback(node=>{sectionRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref&&typeof ref===\"object\"){ref.current=node;}},[ref]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}export function PhoneInputMask(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const formatPhone=useCallback(rawValue=>{const digits=(rawValue||\"\").replace(/\\D/g,\"\").slice(0,11);if(digits.length===0)return\"\";if(digits.length<=2)return`(${digits}`;if(digits.length<=6)return`(${digits.slice(0,2)}) ${digits.slice(2)}`;return`(${digits.slice(0,2)}) ${digits.slice(2,7)}-${digits.slice(7)}`;},[]);const handleChange=useCallback(event=>{const formatted=formatPhone(event?.currentTarget?.value??\"\");if(event?.currentTarget)event.currentTarget.value=formatted;if(event?.target)event.target.value=formatted;props.onChange?.(event);},[formatPhone,props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onChange:handleChange});});}\nexport const __FramerMetadata__ = {\"exports\":{\"PortfolioProgressiveReveal\":{\"type\":\"reactHoc\",\"name\":\"PortfolioProgressiveReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PortfolioSectionLogic\":{\"type\":\"reactHoc\",\"name\":\"PortfolioSectionLogic\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PhoneInputMask\":{\"type\":\"reactHoc\",\"name\":\"PhoneInputMask\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PortfolioLoadMorePremiumButton\":{\"type\":\"reactHoc\",\"name\":\"PortfolioLoadMorePremiumButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"mKACwjC,SAAgB,EAAsB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,EAAWA,EAAO,IAAI,EAAQ,EAAOA,EAAO,IAAI,EAAQ,EAAeA,EAAO,IAAI,EAAQ,EAAyBA,EAAO,IAAI,EAAQ,EAAgBA,EAAO,OAAO,EAAO,CAAC,EAAa,GAAiBC,EAAS,OAAO,EAAQ,EAAaD,EAAO,CAAC,QAAQ,cAAc,QAAQ,OAAO,cAAiB,QAAQ,QAAQ,UAAa,UAAU,SAAS,qBAAqB,eAAkB,mBAAsB,mBAAyB,CAAC,EAAQ,EAAUE,EAAY,GAAe,EAAM,KAAK,CAAC,CAAC,YAAY,EAAI,CAAC,CAAC,EAAQ,EAASA,EAAY,GAAI,CAAW,IAAS,SAAsB,EAAO,UAAU,MAAK,EAAO,qBAAqB,EAAO,OAAO,EAAE,EAAO,QAAQ,EAAO,0BAA0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