{"version":3,"file":"Highlight.Dc-RBlCA.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/G3tXFrRvp5vyF6CMD0Hk/LlGzBusLduvE7TxPPdur/Highlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function withHighlightColor1(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");console.log(\"handle\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(99, 99, 241, 1);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(90deg, var(--highlight) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s;\ncolor: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function withHighlightColor2(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(0, 179, 110, 1);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(90deg, var(--highlight) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s;\ncolor: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}export function withHighlightColor3(Component){return props=>{const[isVisible,setIsVisible]=useState(false);useEffect(()=>{const elements=document.querySelectorAll(`.${props.className} [style*=\"--framer-text-decoration\"]`);// Now, let's add a parent <mark> tag to the selected elements\nelements.forEach(element=>{element.style.removeProperty(\"--framer-text-decoration\");const markElement=document.createElement(\"mark\");const spanElement=document.createElement(\"span\");// Wrap the element with mark\nelement.parentNode.insertBefore(markElement,element);markElement.appendChild(element);// Wrap the content of the element with span\nwhile(element.firstChild){spanElement.appendChild(element.firstChild);}element.appendChild(spanElement);setIsVisible(true);});const handle=entries=>{entries.forEach(entry=>{const highlightedValue=entry.target.style.getPropertyValue(\"--highlighted\");if(!highlightedValue||parseInt(highlightedValue)===0){entry.target.style.setProperty(\"--highlighted\",entry.isIntersecting?\"1\":\"0\");}});};const observer=new IntersectionObserver(handle,{threshold:1});elements.forEach(M=>observer.observe(M));},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n.${props.className} mark {\n--highlighted: 0;\n--highlight: rgba(140, 0, 255, 0.5);\nbackground: transparent;\n}\n\n.${props.className} mark span {\nbackground: linear-gradient(120deg, var(--highlight) 50%, transparent 50%) 110% 0 / 200% 100% no-repeat;\nbackground-position: calc((1 - var(--highlighted)) * 110%) 0;\ntransition: background-position 1s;\ncolor: white;\n}\n`}),/*#__PURE__*/_jsx(Component,{...props,style:!isVisible?{opacity:0}:{}})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHighlightColor2\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor3\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHighlightColor1\":{\"type\":\"reactHoc\",\"name\":\"withHighlightColor1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Highlight.map"],"mappings":"iLAAqH,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAG0S,OAHzS,MAAc,CAAC,IAAM,EAAS,SAAS,iBAAiB,IAAI,EAAM,UAAU,sCAAsC,CACnV,EAAS,QAAQ,GAAS,CAAC,EAAQ,MAAM,eAAe,2BAA2B,CAAC,IAAM,EAAY,SAAS,cAAc,OAAO,CAAO,EAAY,SAAS,cAAc,OAAO,CAErL,IADA,EAAQ,WAAW,aAAa,EAAY,EAAQ,CAAC,EAAY,YAAY,EAAQ,CAC/E,EAAQ,YAAY,EAAY,YAAY,EAAQ,WAAW,CAAE,EAAQ,YAAY,EAAY,CAAC,EAAa,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