{"version":3,"file":"HelpTopicNavigation.DxdBNXvI.mjs","names":["React.useRef","__esmMin","init_npm_react_18_3_1","de","init_jsx_runtime","J","c","ce","remember","link","event","u","slug","labels","withHelpGuideOrigin","Component","props","back","ref","value","root","a","prefix","node","forwarded","withHelpTopicBack","withHelpTopicCrumb","init_HelpTopicNavigation","\"automations\"","\"troubleshooting\""],"sources":["https:/framerusercontent.com/modules/DDXTNNsecOG1Al9xq9vA/LeRNuC1MPLbd0YEIsMxG/HelpTopicNavigation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";const labels={\"getting-started\":\"Getting started\",\"meetings-recording\":\"Meetings & recording\",\"transcripts-recaps\":\"Transcripts & recaps\",\"calendar-integrations\":\"Calendar & integrations\",\"account-plans\":\"Account & plans\",\"automations\":\"Automations\",\"troubleshooting\":\"Troubleshooting\"};function remember(event){const link=event.target?.closest?.(\"a[href]\");if(!link)return;const u=new URL(link.href,location.href);const slug=location.pathname.split(\"/\").filter(Boolean);if(slug.length!==3||slug[0]!==\"help\"||slug[1]!==\"topics\"||!labels[slug[2]]||!u.pathname.startsWith(\"/help/\")||u.pathname.startsWith(\"/help/topics/\"))return;try{sessionStorage.setItem(\"tapquence.help.origin\",JSON.stringify({topic:location.pathname,title:labels[slug[2]],guide:u.pathname,at:Date.now()}));}catch{}}export function withHelpGuideOrigin(Component){return function GuideOrigin(props){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",minWidth:0},onClickCapture:remember,onPointerDownCapture:remember,children:/*#__PURE__*/_jsx(Component,{...props})});};}function back(Component,prefix){return /*#__PURE__*/React.forwardRef(function TopicBack(props,forwarded){const ref=React.useRef(null);React.useEffect(()=>{try{const value=JSON.parse(sessionStorage.getItem(\"tapquence.help.origin\")||\"null\");if(!value||value.guide!==location.pathname||Date.now()-value.at>18e5||!/^\\/help\\/topics\\/[a-z-]+$/.test(value.topic))return;const root=ref.current;const a=root?.matches(\"a\")?root:root?.querySelector(\"a\");if(a){a.setAttribute(\"href\",value.topic);if(a.textContent!==prefix+value.title)a.textContent=prefix+value.title;}}catch{}});return /*#__PURE__*/_jsx(Component,{...props,ref:node=>{ref.current=node;if(typeof forwarded===\"function\")forwarded(node);else if(forwarded)forwarded.current=node;}});});}export function withHelpTopicBack(Component){return back(Component,\"← \");}export function withHelpTopicCrumb(Component){return back(Component,\"\");}\nexport const __FramerMetadata__ = {\"exports\":{\"withHelpGuideOrigin\":{\"type\":\"reactHoc\",\"name\":\"withHelpGuideOrigin\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHelpTopicBack\":{\"type\":\"reactHoc\",\"name\":\"withHelpTopicBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHelpTopicCrumb\":{\"type\":\"reactHoc\",\"name\":\"withHelpTopicCrumb\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HelpTopicNavigation.map"],"mappings":"A,gIAAsW,SAASQ,EAAS,EAAM,CAAC,IAAMC,EAAKC,EAAM,QAAQ,UAAU,SAAS,EAAE,GAAG,CAACD,EAAK,OAAO,IAAME,EAAE,IAAI,IAAIF,EAAK,KAAK,SAAS,IAAI,EAAQG,EAAK,SAAS,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,EAAE,GAAGA,EAAK,SAAS,GAAGA,EAAK,KAAK,QAAQA,EAAK,KAAK,UAAWC,EAAOD,EAAK,KAAMD,EAAE,SAAS,WAAW,QAAQ,GAAG,GAAE,SAAS,WAAW,eAAe,EAAS,GAAG,CAAC,eAAe,QAAQ,wBAAwB,KAAK,UAAU,CAAC,MAAM,SAAS,SAAS,MAAME,EAAOD,EAAK,IAAI,MAAMD,EAAE,SAAS,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,CAAC,CAAC,SAAgBG,EAAoB,EAAU,CAAC,OAAO,SAAqB,EAAM,CAAC,MAAoB,gBAAK,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