{"version":3,"file":"Text_Highlight.DAUYjIi1.mjs","names":["useId","useRef","useState","useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/6TDmap5Nc1xxFH4dsFYq/rXVvVUpM0fSiZ2SaBpeH/Text_Highlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect,useId,useRef,useState}from\"react\";import{RenderTarget}from\"framer\";// The text is always visible. Highlighting is a progressive enhancement: a\n// translation without a decorated span must still render its entire heading.\nfunction withHighlight(Component,color){const foreground=color===\"#20233A\"?\"#FFFFFF\":\"#20233A\";return /*#__PURE__*/forwardRef(function Highlight(props,ref){const uniqueId=useId().replace(/[^a-zA-Z0-9_-]/g,\"\");const className=`rw-highlight-${uniqueId}`;const root=useRef(null);const[highlighted,setHighlighted]=useState(false);const isCanvas=RenderTarget.current()===RenderTarget.canvas;const setRef=useCallback(element=>{root.current=element;if(typeof ref===\"function\")ref(element);else if(ref)ref.current=element;},[ref]);useEffect(()=>{if(typeof window===\"undefined\"||isCanvas)return;const element=root.current;const reducedMotion=window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches;if(!element||reducedMotion||!(\"IntersectionObserver\"in window)){setHighlighted(true);return;}const observer=new IntersectionObserver(entries=>{if(entries.some(entry=>entry.isIntersecting)){setHighlighted(true);observer.disconnect();}},{threshold:.1});observer.observe(element);return()=>observer.disconnect();},[isCanvas]);// Style the native span directly. React retains ownership of the rich\n// text, so locale changes never encounter inserted wrappers or removed\n// nodes. Preserve the existing teal/orange/navy treatment and timing.\n// Keep inherited text contrast until the background reveal completes.\nreturn /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${className} span[style*=\"--framer-text-decoration\"] {\n    --framer-text-decoration: none !important;\n    display: inline-block;\n    padding: 0 0.15em;\n    border-radius: 3px;\n    background: linear-gradient(120deg, ${color} 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\n    background-position: ${highlighted||isCanvas?\"0\":\"110%\"} 0;\n    transition: background-position 0.55s cubic-bezier(0.4, 0, 0.2, 1), color 0s 0.55s;\n    color: ${highlighted||isCanvas?foreground:\"inherit\"};\n    -webkit-text-fill-color: currentColor;\n}\n@media (prefers-reduced-motion: reduce) {\n    .${className} span[style*=\"--framer-text-decoration\"] {\n        background-position: 0 0;\n        color: ${foreground};\n        transition: none;\n    }\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,ref:setRef,className:[props.className,className].filter(Boolean).join(\" \"),style:props.style})]});});}export function withHighlightColor1(Component){return withHighlight(Component,\"#4eb3a9\");}export function withHighlightColor2(Component){return withHighlight(Component,\"#FF784B\");}export function withHighlightColor3(Component){return withHighlight(Component,\"#20233A\");}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightColor1\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor2\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor3\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Highlight.map"],"mappings":"kOAEA,SAAS,EAAc,EAAU,EAAM,CAAC,IAAM,EAAW,IAAQ,UAAU,UAAU,UAAU,OAAoB,EAAW,SAAmB,EAAM,EAAI,CAAsD,IAAM,EAAU,gBAAtDA,EAAM,CAAC,CAAC,QAAQ,kBAAkB,EAA2C,IAAU,EAAKC,EAAO,IAAI,EAAO,CAAC,EAAY,GAAgBC,EAAS,EAAK,EAAQ,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAOC,EAAY,GAAS,CAAC,EAAK,QAAQ,EAAW,OAAO,GAAM,WAAW,EAAI,CAAO,EAAU,IAAI,EAAI,QAAQ,EAAQ,EAAE,CAAC,C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