{"version":3,"file":"FilterUseCases.BcBdgFNr.mjs","names":["React.useRef","React.useCallback"],"sources":["https:/framerusercontent.com/modules/VA2cGgkgZvNjSGYa8rlh/dMLfOoI9Qme0QUV9cnIk/gyGu8Wgx9.js","https:/framerusercontent.com/modules/gYHUJoPFU0EMkWxdh9xn/waH8eWclAHMVBraWCHGW/FilterUseCases.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 12.5 11 L 11.71 11 L 11.43 10.73 C 12.41 9.59 13 8.11 13 6.5 C 13 2.91 10.09 0 6.5 0 C 2.91 0 0 2.91 0 6.5 C 0 10.09 2.91 13 6.5 13 C 8.11 13 9.59 12.41 10.73 11.43 L 11 11.71 L 11 12.5 L 16 17.49 L 17.49 16 Z M 6.5 11 C 4.01 11 2 8.99 2 6.5 C 2 4.01 4.01 2 6.5 2 C 8.99 2 11 4.01 11 6.5 C 11 8.99 8.99 11 6.5 11 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"17.49002px\" id=\"DlOXoKtG6\" transform=\"translate(3.255 3.255)\" width=\"17.490000000000002px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,K5AAorpEW:fill??props.K5AAorpEW??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,K5AAorpEW,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-GtMBL\",className),layoutId:layoutId,ref:ref,style:{\"--esondr\":K5AAorpEW,...style}});});const css=[`.framer-GtMBL { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--esondr); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"K5AAorpEW\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Search\",\"color\":{\"type\":\"variable\",\"value\":\"esondr\"},\"set\":{\"localId\":\"vectorSet/DnLsXE00W\",\"id\":\"DnLsXE00W\",\"moduleId\":\"JIScivAkNLgXrcOUxHXD\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-GtMBL\");Icon.displayName=\"Search\";export default Icon;addPropertyControls(Icon,{K5AAorpEW:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"K5AAorpEW\\\":\\\"fill\\\"}\",\"framerVector\":\"{\\\"name\\\":\\\"Search\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"esondr\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/DnLsXE00W\\\",\\\"id\\\":\\\"DnLsXE00W\\\",\\\"moduleId\\\":\\\"JIScivAkNLgXrcOUxHXD\\\"}}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"24\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";function normalize(s){return s.toLowerCase().normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g,\"\")// remove accents\n.trim();}function matchesCard(card,q){if(!q)return true;const text=normalize(card.textContent||\"\");return text.includes(q);}/**\n * Attach to your INPUT component.\n * It will filter all elements with aria-label=\"use-case-card\"\n * by hiding those that don't include the typed text.\n */export function withUseCaseCardFilter(Component){return props=>{const rafRef=React.useRef(null);const runFilter=React.useCallback(raw=>{const q=normalize(raw);// Cancel any pending run (keeps it smooth while typing)\nif(rafRef.current)cancelAnimationFrame(rafRef.current);rafRef.current=requestAnimationFrame(()=>{const cards=Array.from(document.querySelectorAll(`[aria-label=\"use-case-card\"]`));for(const card of cards){const show=matchesCard(card,q);card.style.display=show?\"\":\"none\";}});},[]);React.useEffect(()=>{// initial run (in case input has a defaultValue/value)\nconst initial=typeof props.value===\"string\"?props.value:typeof props.defaultValue===\"string\"?props.defaultValue:\"\";runFilter(initial);return()=>{if(rafRef.current)cancelAnimationFrame(rafRef.current);};},[])// eslint-disable-line react-hooks/exhaustive-deps\n;return /*#__PURE__*/_jsx(Component,{...props,onChange:e=>{props.onChange?.(e);const v=e?.target?.value??\"\";runFilter(String(v));},onInput:e=>{// some Framer inputs fire onInput more reliably than onChange\nprops.onInput?.(e);const v=e?.target?.value??\"\";runFilter(String(v));}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withUseCaseCardFilter\":{\"type\":\"reactHoc\",\"name\":\"withUseCaseCardFilter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FilterUseCases.map"],"mappings":"oRAC2C,IAAsE,IAA4B,CAAoC,EAAK,8qBAAsrB,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO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