{"version":3,"file":"A11yOverrides.Rj23to_F.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/kI4JRmkKqat3liDhsZmB/1lQUzYfzAYyQ8o0FkolO/A11yOverrides.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{createElement,useEffect,useRef,useState}from\"react\";/**\n * Small accessibility overrides that Framer's layer panel cannot express.\n *\n *   withSkipLink         - on the Navigation instance. Renders a \"Skip to\n *                          content\" link that is invisible until it receives\n *                          keyboard focus, then jumps to the page's <main>.\n *   withSearchFaqsLabel  - on the FAQ search input. Gives the <input> an\n *                          aria-label, since the wrapping <label> holds only an\n *                          icon and the placeholder disappears while typing.\n *   withScreenReaderText - on a text layer whose Text Effect splits it into\n *                          one span per letter (screen readers spell it out),\n *                          or on a frame whose lines are separate text layers\n *                          that should read as one sentence. Adds a visually\n *                          hidden copy of the real text in the same tag and\n *                          hides the animated visual from assistive tech.\n */const SKIP_STYLE_ID=\"aha-skip-link-style\";/* Visually hidden until focused (clip pattern, no transition), so the change\n   on focus is immediate and measurable, and the link is never off-screen. */const SKIP_CSS=`\n.aha-skip-link{position:fixed;left:16px;top:16px;z-index:2147483000;padding:14px 20px;border-radius:999px;background:#ffffff;color:#1c1830;font:600 15px/1 Inter,system-ui,-apple-system,sans-serif;letter-spacing:.02em;text-decoration:none;box-shadow:0 4px 24px rgba(0,0,0,.35);clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap;padding:0;margin:0}\n.aha-skip-link:focus,.aha-skip-link:focus-visible{clip:auto;clip-path:none;width:auto;height:auto;overflow:visible;padding:14px 20px;outline:3px solid #1c1830;outline-offset:2px}\ninput[name=\"Search FAQs\"]:focus-visible{outline:2px solid #28223c;outline-offset:2px}\n`;function ensureSkipStyle(){if(typeof document===\"undefined\")return;if(document.getElementById(SKIP_STYLE_ID))return;const style=document.createElement(\"style\");style.id=SKIP_STYLE_ID;style.textContent=SKIP_CSS;document.head.appendChild(style);}/** The first landmark that counts as page content, in order of preference. */function findMain(){if(typeof document===\"undefined\")return null;return document.querySelector(\"main\")??document.querySelector('[role=\"main\"]')??document.getElementById(\"main\");}const SKIP_LINK_ID=\"aha-skip-link\";function skipToMain(event){const main=findMain();if(!main)return;event.preventDefault();if(!main.hasAttribute(\"tabindex\"))main.setAttribute(\"tabindex\",\"-1\");main.focus({preventScroll:true});main.scrollIntoView({block:\"start\"});}/**\n * The Navigation instance sits near the end of the page tree, so a link\n * rendered next to it would be one of the last tab stops. The link is created\n * imperatively and inserted as the first child of <body>, where a keyboard\n * user's first Tab reaches it. One link per document, whichever navigation\n * instance mounts first.\n */export function withSkipLink(Component){return props=>{useEffect(()=>{if(typeof document===\"undefined\")return;ensureSkipStyle();let link=document.getElementById(SKIP_LINK_ID);let created=false;if(!link){link=document.createElement(\"a\");link.id=SKIP_LINK_ID;link.className=\"aha-skip-link\";// Point at the real landmark so the fragment resolves; give\n// the landmark an id when it has none.\nconst main=findMain();if(main&&!main.id)main.id=\"main-content\";link.href=\"#\"+(main?.id||\"main-content\");link.textContent=\"Skip to content\";link.addEventListener(\"click\",skipToMain);document.body.insertBefore(link,document.body.firstChild);created=true;}return()=>{if(created&&link&&link.parentNode){link.removeEventListener(\"click\",skipToMain);link.parentNode.removeChild(link);}};},[]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withSearchFaqsLabel(Component){return props=>{const host=useRef(null);useEffect(()=>{const root=host.current;if(!root)return;const input=root.querySelector(\"input\");if(input&&!input.getAttribute(\"aria-label\")){input.setAttribute(\"aria-label\",\"Search FAQs\");}// Framer removes the input outline and paints its focus border on\n// the wrapper; the ring rule lives in SKIP_CSS.\nensureSkipStyle();},[]);// display: contents keeps the wrapper out of the layout, so the input\n// still sits directly inside Framer's <label>.\nreturn /*#__PURE__*/_jsx(\"div\",{ref:host,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{...props})});};}/* ------------------------------------------------------------------ *\n * Screen-reader copy\n * ------------------------------------------------------------------ *//** Visually hidden, still in the accessibility tree (the classic sr-only). */export const SR_ONLY_STYLE={position:\"absolute\",width:1,height:1,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",border:0};const BLOCK_TAGS=/^(P|H[1-6]|DIV|LI|SECTION|ARTICLE|BLOCKQUOTE)$/;/**\n * The text a sighted reader sees, rebuilt from the DOM: letters split into\n * spans are joined back, <br> and block boundaries become spaces.\n */export function readableText(root){let out=\"\";const walk=node=>{if(node.nodeType===Node.TEXT_NODE){out+=node.textContent??\"\";return;}if(!(node instanceof Element))return;if(node.tagName===\"BR\"){out+=\" \";return;}if(node.getAttribute(\"data-aha-sr\")===\"true\")return;const block=BLOCK_TAGS.test(node.tagName);if(block)out+=\" \";node.childNodes.forEach(walk);if(block)out+=\" \";};walk(root);return out.replace(/\\s+/g,\" \").trim();}/** The tag the copy should use: the first heading inside, else a paragraph. */export function readableTag(root){const heading=root.matches(\"h1,h2,h3,h4,h5,h6\")?root:root.querySelector(\"h1,h2,h3,h4,h5,h6\");return heading?heading.tagName.toLowerCase():\"p\";}export function withScreenReaderText(Component){return props=>{const host=useRef(null);const[copy,setCopy]=useState(null);useEffect(()=>{const root=host.current;if(!root)return;const apply=()=>{let text=\"\";let tag=\"p\";for(const child of Array.from(root.children)){if(child.getAttribute(\"data-aha-sr\")===\"true\")continue;// The visual stays for sighted users; assistive tech reads the copy.\nchild.setAttribute(\"aria-hidden\",\"true\");text+=\" \"+readableText(child);if(tag===\"p\")tag=readableTag(child);}text=text.replace(/\\s+/g,\" \").trim();setCopy(prev=>prev&&prev.text===text&&prev.tag===tag?prev:text?{text,tag}:null);};apply();// Framer re-renders the text when an effect replays; keep the copy current.\nconst observer=new MutationObserver(apply);observer.observe(root,{childList:true,subtree:true,characterData:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsxs(\"div\",{ref:host,style:{display:\"contents\"},children:[copy?/*#__PURE__*/createElement(copy.tag,{\"data-aha-sr\":\"true\",style:SR_ONLY_STYLE},copy.text):null,/*#__PURE__*/_jsx(Component,{...props})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withScreenReaderText\":{\"type\":\"reactHoc\",\"name\":\"withScreenReaderText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SR_ONLY_STYLE\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSkipLink\":{\"type\":\"reactHoc\",\"name\":\"withSkipLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSearchFaqsLabel\":{\"type\":\"reactHoc\",\"name\":\"withSearchFaqsLabel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"readableText\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"readableTag\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./A11yOverrides.map"],"mappings":"8IAoBE,SAAS,GAAiB,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,eAAe,CAAa,EAAE,OAAO,IAAM,EAAM,SAAS,cAAc,OAAO,EAAE,EAAM,GAAG,EAAc,EAAM,YAAY,EAAS,SAAS,KAAK,YAAY,CAAK,CAAE,CAA+E,SAAS,GAAU,CAA8C,OAA1C,OAAO,SAAW,IAAmB,KAAY,SAAS,cAAc,MAAM,GAAG,SAAS,cAAc,eAAe,GAAG,SAAS,eAAe,MAAM,CAAE,CAAoC,SAAS,EAAW,EAAM,CAAC,IAAM,EAAK,EAAS,EAAM,IAAY,EAAM,eAAe,EAAM,EAAK,aAAa,UAAU,GAAE,EAAK,aAAa,WAAW,IAAI,EAAE,EAAK,MAAM,CAAC,cAAc,EAAI,CAAC,EAAE,EAAK,eAAe,CAAC,MAAM,OAAO,CAAC,EAAE,CAMzvB,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAO,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