{"version":3,"file":"InteractionAccessibility.BOoKFAJQ.mjs","names":["React.useRef","React.useId","React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/3Zd69pFIB7IKiDjjESZj/nv1XAEEiklLPV5vYfYCV/InteractionAccessibility.js"],"sourcesContent":["import*as React from\"react\";const accessibilityStyleId=\"kairo-interaction-accessibility-styles\";function ensureAccessibilityStyles(){if(typeof document===\"undefined\")return;if(document.getElementById(accessibilityStyleId))return;const style=document.createElement(\"style\");style.id=accessibilityStyleId;style.textContent=`\n        [data-kairo-faq-trigger=\"true\"] {\n            appearance: none;\n            -webkit-appearance: none;\n            border: 0;\n            background: transparent;\n            color: inherit;\n            font: inherit;\n            text-align: inherit;\n        }\n        [data-kairo-faq-trigger=\"true\"]:focus-visible,\n        [data-kairo-carousel-button=\"true\"]:focus-visible {\n            outline: 2px solid currentColor !important;\n            outline-offset: 3px;\n        }\n    `;document.head.appendChild(style);}function assignRef(ref,value){if(typeof ref===\"function\"){ref(value);}else if(ref&&typeof ref===\"object\"){ref.current=value;}}export function withAccessibleFAQItem(Component){return /*#__PURE__*/React.forwardRef(function AccessibleFAQItem(props,forwardedRef){const rootRef=React.useRef(null);const rawId=React.useId();const itemId=React.useMemo(()=>`kairo-faq-${rawId.replace(/[^a-zA-Z0-9_-]/g,\"\")}`,[rawId]);const setRef=React.useCallback(value=>{rootRef.current=value;assignRef(forwardedRef,value);},[forwardedRef]);const syncAttributes=React.useCallback(()=>{const root=rootRef.current;if(!root)return;const instanceContainer=root.parentElement;if(instanceContainer instanceof HTMLElement&&instanceContainer.tabIndex>=0){instanceContainer.setAttribute(\"tabindex\",\"-1\");instanceContainer.setAttribute(\"role\",\"presentation\");}const button=root.querySelector(\"button\");if(!(button instanceof HTMLElement))return;button.setAttribute(\"type\",\"button\");button.setAttribute(\"data-kairo-faq-trigger\",\"true\");const questionHeading=button.querySelector(\"h1, h2, h3, h4, h5, h6\");if(questionHeading instanceof HTMLElement){questionHeading.setAttribute(\"aria-level\",\"3\");}const answers=Array.from(root.querySelectorAll('[data-framer-name=\"Answer\"]'));const answer=answers[answers.length-1];if(answer instanceof HTMLElement){const answerId=`${itemId}-panel`;answer.id=answerId;button.setAttribute(\"aria-controls\",answerId);const answerStyle=window.getComputedStyle(answer);const isExpanded=answerStyle.display!==\"none\"&&answerStyle.visibility!==\"hidden\"&&answerStyle.opacity!==\"0\";button.setAttribute(\"aria-expanded\",isExpanded?\"true\":\"false\");}else{button.setAttribute(\"aria-expanded\",\"false\");}},[itemId]);React.useEffect(()=>{if(typeof window===\"undefined\"||typeof MutationObserver===\"undefined\")return;ensureAccessibilityStyles();syncAttributes();const root=rootRef.current;if(!root)return;const observer=new MutationObserver(syncAttributes);observer.observe(root,{childList:true,subtree:true});const frame=window.requestAnimationFrame(syncAttributes);return()=>{observer.disconnect();window.cancelAnimationFrame(frame);};},[syncAttributes]);return /*#__PURE__*/React.createElement(Component,{...props,ref:setRef,role:\"presentation\",tabIndex:-1,\"data-kairo-faq-item\":itemId});});}function carouselButtonProps(props,label){return{...props,type:\"button\",\"aria-label\":label,title:label,\"data-kairo-carousel-button\":\"true\"};}export function withNextTestimonialButton(Component){return /*#__PURE__*/React.forwardRef(function NextTestimonialButton(props,ref){React.useEffect(()=>{ensureAccessibilityStyles();},[]);return /*#__PURE__*/React.createElement(Component,{...carouselButtonProps(props,\"Next testimonial\"),ref});});}export function withPreviousTestimonialButton(Component){return /*#__PURE__*/React.forwardRef(function PreviousTestimonialButton(props,ref){React.useEffect(()=>{ensureAccessibilityStyles();},[]);return /*#__PURE__*/React.createElement(Component,{...carouselButtonProps(props,\"Previous testimonial\"),ref});});}export function withTestimonialStatus(Component){return /*#__PURE__*/React.forwardRef(function TestimonialStatus(props,ref){return /*#__PURE__*/React.createElement(Component,{...props,ref,role:\"status\",\"aria-live\":\"polite\",\"aria-atomic\":\"true\"});});}// Gives the embedded cookie control the same clear accessible name as its visible label.\nexport function withAccessibleCookieTrigger(Component){return /*#__PURE__*/React.forwardRef(function AccessibleCookieTrigger(props,forwardedRef){const rootRef=React.useRef(null);const setRef=React.useCallback(value=>{rootRef.current=value;assignRef(forwardedRef,value);},[forwardedRef]);const syncLabel=React.useCallback(()=>{const root=rootRef.current;if(!root)return;if(root.getAttribute(\"aria-label\")===\"Cookie Trigger\"){root.setAttribute(\"aria-label\",\"Cookie settings\");}const candidates=Array.from(root.querySelectorAll('[aria-label=\"Cookie Trigger\"], button'));const trigger=candidates.find(element=>/cookie/i.test(element.textContent||element.getAttribute(\"aria-label\")||\"\"));trigger?.setAttribute(\"aria-label\",\"Cookie settings\");},[]);React.useEffect(()=>{if(typeof window===\"undefined\")return;syncLabel();const frame=window.requestAnimationFrame(syncLabel);const shortRetry=window.setTimeout(syncLabel,250);const lateRetry=window.setTimeout(syncLabel,1e3);return()=>{window.cancelAnimationFrame(frame);window.clearTimeout(shortRetry);window.clearTimeout(lateRetry);};},[syncLabel]);return /*#__PURE__*/React.createElement(Component,{...props,ref:setRef,title:\"Cookie settings\",\"aria-label\":\"Cookie settings\"});});}// Adds a descriptive title to Framer Embed iframes without changing playback.\nexport function withAccessibleTestimonialEmbed(Component){return /*#__PURE__*/React.forwardRef(function AccessibleTestimonialEmbed(props,forwardedRef){const rootRef=React.useRef(null);const setRef=React.useCallback(value=>{rootRef.current=value;assignRef(forwardedRef,value);},[forwardedRef]);const syncTitle=React.useCallback(()=>{const root=rootRef.current;if(!root)return;const frames=[];if(typeof HTMLIFrameElement!==\"undefined\"&&root instanceof HTMLIFrameElement){frames.push(root);}root.querySelectorAll(\"iframe\").forEach(frame=>frames.push(frame));frames.forEach(frame=>{frame.title=\"Kairo client testimonial video\";});},[]);React.useEffect(()=>{if(typeof window===\"undefined\")return;syncTitle();const frame=window.requestAnimationFrame(syncTitle);const shortRetry=window.setTimeout(syncTitle,250);const lateRetry=window.setTimeout(syncTitle,1e3);return()=>{window.cancelAnimationFrame(frame);window.clearTimeout(shortRetry);window.clearTimeout(lateRetry);};},[syncTitle]);return /*#__PURE__*/React.createElement(Component,{...props,ref:setRef,title:\"Kairo client testimonial video\",\"aria-label\":\"Kairo client testimonial video\"});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAccessibleFAQItem\":{\"type\":\"reactHoc\",\"name\":\"withAccessibleFAQItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNextTestimonialButton\":{\"type\":\"reactHoc\",\"name\":\"withNextTestimonialButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAccessibleCookieTrigger\":{\"type\":\"reactHoc\",\"name\":\"withAccessibleCookieTrigger\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPreviousTestimonialButton\":{\"type\":\"reactHoc\",\"name\":\"withPreviousTestimonialButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTestimonialStatus\":{\"type\":\"reactHoc\",\"name\":\"withTestimonialStatus\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAccessibleTestimonialEmbed\":{\"type\":\"reactHoc\",\"name\":\"withAccessibleTestimonialEmbed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InteractionAccessibility.map"],"mappings":"4JAAgG,SAAS,GAA2B,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,eAAe,CAAoB,EAAE,OAAO,IAAM,EAAM,SAAS,cAAc,OAAO,EAAE,EAAM,GAAG,EAAqB,EAAM,YAAY;;;;;;;;;;;;;;;MAe3T,SAAS,KAAK,YAAY,CAAK,CAAE,CAAC,SAAS,EAAU,EAAI,EAAM,CAAI,OAAO,GAAM,WAAY,EAAI,CAAK,EAAW,GAAK,OAAO,GAAM,WAAU,EAAI,QAAQ,EAAO,CAAC,SAAgB,EAAsB,EAAU,CAAC,OAAoB,EAAiB,SAA2B,EAAM,EAAa,CAAC,IAAM,EAAQA,EAAa,IAAI,EAAQ,EAAMC,EAAY,EAAQ,EAAOC,MAAkB,aAAa,EAAM,QAAQ,kBAAkB,EAAE,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