{"version":3,"file":"LitguideBookingPopup.BZcryYAj.mjs","names":[],"sources":["https:/framerusercontent.com/modules/u22fesjnT5tyq2QWD01O/DRlKKRW47RcspBl1LZro/LitguideBookingPopup.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * Opens the Litguide booking calendar in a modal when any \"Book a demo\"\n * link is clicked, instead of sending the visitor to another page.\n *\n * Catches links to /demo, #lg-demo-form, and anything marked data-book-demo.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LitguideBookingPopup(props){const{calendarUrl=\"https://api.leadconnectorhq.com/widget/booking/i8X1o6SdPpgyDuZzmPX0\",title=\"Book a demo\",subtitle=\"Thirty minutes, with your rubrics on screen.\",enabled=true}=props;useEffect(()=>{if(!enabled)return;if(typeof document===\"undefined\")return;// GoHighLevel's embed script only matters once the booking iframe is on screen,\n// so it loads the first time the popup opens instead of on every page view.\nconst SCRIPT_SRC=\"https://link.msgsndr.com/js/form_embed.js\";const loadEmbed=()=>{if(document.querySelector(`script[src=\"${SCRIPT_SRC}\"]`))return;const s=document.createElement(\"script\");s.src=SCRIPT_SRC;s.async=true;document.body.appendChild(s);};const STYLE_ID=\"lg-booking-modal-styles\";if(!document.getElementById(STYLE_ID)){const st=document.createElement(\"style\");st.id=STYLE_ID;st.textContent=`\n.lg-bk-overlay{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;\n justify-content:center;padding:24px;background:rgba(14,32,45,.58);\n -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);\n animation:lg-bk-fade .22s ease both;font-family:'Noto Sans',sans-serif;}\n.lg-bk-panel{position:relative;display:flex;flex-direction:column;background:#FFFFFF;\n border-radius:26px;overflow:hidden;width:min(940px,100%);height:min(840px,92vh);\n box-shadow:0 30px 90px rgba(7,51,58,.32);animation:lg-bk-rise .26s cubic-bezier(.2,.8,.3,1) both;}\n.lg-bk-head{display:flex;align-items:flex-start;gap:16px;padding:24px 26px 20px;\n border-bottom:1px solid #EEF2F4;background:#FFFFFF;flex:none;}\n.lg-bk-mark{position:relative;width:38px;height:38px;flex:none;margin-top:2px;}\n.lg-bk-mark i{position:absolute;left:6px;top:6px;right:-6px;bottom:-6px;border-radius:12px;background:#4CDFA1;}\n.lg-bk-mark b{position:absolute;inset:0;border-radius:12px;border:1.5px solid #1E3865;background:#FFFFFF;\n display:flex;align-items:center;justify-content:center;}\n.lg-bk-title{font-weight:800;font-size:21px;letter-spacing:-.5px;line-height:1.2;color:#0E202D;margin:0;}\n.lg-bk-sub{font-size:15px;line-height:23px;color:#4A6360;margin:5px 0 0;}\n.lg-bk-close{margin-left:auto;flex:none;width:38px;height:38px;border-radius:999px;cursor:pointer;\n border:1px solid #EEF2F4;background:#FFFFFF;color:#0E202D;font-size:15px;line-height:1;\n display:flex;align-items:center;justify-content:center;transition:background .15s ease,color .15s ease;}\n.lg-bk-close:hover{background:#07333A;color:#FFFFFF;border-color:#07333A;}\n.lg-bk-close:focus-visible{outline:2px solid #07333A;outline-offset:2px;}\n.lg-bk-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;\n -webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:#FBFCFC;}\n.lg-bk-body{touch-action:pan-y;}\n.lg-bk-body iframe{width:100%;min-height:1100px;border:0;display:block;background:#FBFCFC;}\n@keyframes lg-bk-fade{from{opacity:0}to{opacity:1}}\n@keyframes lg-bk-rise{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}\n@media (max-width:640px){\n .lg-bk-overlay{padding:0;align-items:flex-end;}\n .lg-bk-overlay{align-items:stretch;}\n .lg-bk-panel{width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0;}\n .lg-bk-body iframe{min-height:1500px;}\n .lg-bk-head{padding:18px 18px 16px;}\n .lg-bk-title{font-size:19px;}\n .lg-bk-sub{font-size:14px;line-height:21px;}\n}\n@media (prefers-reduced-motion:reduce){\n .lg-bk-overlay,.lg-bk-panel{animation:none;}\n}\n/* Line the accessibility pill up with the Help Scout Beacon (bottom:40px, 60px tall,\n   so its centre sits 70px above the fold). The pill's own CSS lives in Framer's\n   custom code, hence the override here. */\n.lg-a11y-fab{bottom:47px !important;left:40px !important;}\n.lg-ga11y-btn{bottom:50px !important;left:40px !important;}\n/* Phone screens: hide the floating accessibility pill (the footer still links\n   to the accessibility page). Keeps the Beacon as the only floating control. */\n/* Help Scout sets an inline left:14px on its button, which beats any right rule\n   and drops it bottom-left where it clips. Pin it to the right on every page. */\n.BeaconFabButtonFrame.BeaconFabButtonFrame{left:auto !important;right:24px !important;bottom:19px !important;}\n@media (max-width:600px){\n .BeaconFabButtonFrame.BeaconFabButtonFrame{right:14px !important;bottom:11px !important;}\n}\n@media (max-width:820px){\n .lg-ga11y-btn,.lg-a11y-fab{display:none !important;}\n /* A centred flex row that overflows clips its own start edge and cannot be\n    scrolled back to it. Start-align the walkthrough tab strip so every tab\n    is reachable. */\n .lg-stagebar{justify-content:flex-start !important;}\n .lg-stagebar [role=\"tablist\"]{justify-content:flex-start !important;}\n}`;document.head.appendChild(st);}// The walkthrough tab strip scrolls sideways on narrow screens. Keep the\n// selected tab in view, otherwise it can load scrolled past \"Writing\".\nconst keepActiveTabInView=()=>{const bar=document.querySelector(\".lg-stagebar\");if(!bar)return;const active=bar.querySelector('.lg-stagetab[data-on=\"1\"]');if(!active)return;// Scroll the strip itself only. scrollIntoView() would also scroll the\n// page vertically and skip the hero on load.\nconst target=active.offsetLeft-(bar.clientWidth-active.offsetWidth)/2;const max=bar.scrollWidth-bar.clientWidth;const next=Math.max(0,Math.min(target,max));if(Math.abs(bar.scrollLeft-next)>2)bar.scrollLeft=next;};const tabObserver=typeof MutationObserver===\"function\"?new MutationObserver(keepActiveTabInView):null;const startTabWatch=()=>{const bar=document.querySelector(\".lg-stagebar\");if(!bar)return;keepActiveTabInView();if(tabObserver){tabObserver.observe(bar,{attributes:true,subtree:true,attributeFilter:[\"data-on\"]});}};const tabWatchTimer=setTimeout(startTabWatch,600);// lg-spa-top: Framer swaps pages client-side; make every forward\n// navigation start at the top like a fresh load would (back/forward\n// keep the browser's own restoration).\nconst origPush=history.pushState;const pushToTop=function(...args){const r=origPush.apply(this,args);try{document.body.style.position=\"\";document.body.style.top=\"\";document.body.style.overflow=\"\";}catch(e){}requestAnimationFrame(()=>{try{window.scrollTo({top:0,left:0,behavior:\"auto\"});}catch(e){window.scrollTo(0,0);}});return r;};try{history.pushState=pushToTop;}catch(e){}let overlay=null;let lastFocus=null;let lockedY=0;const lockScroll=()=>{lockedY=window.scrollY||window.pageYOffset||0;const b=document.body.style;b.overflow=\"hidden\";// iOS ignores overflow:hidden on body; pinning it is the only lock\n// that stops the page behind the sheet from taking the touch-scroll.\nb.position=\"fixed\";b.top=-lockedY+\"px\";b.left=\"0\";b.right=\"0\";b.width=\"100%\";};const unlockScroll=()=>{const b=document.body.style;b.overflow=\"\";b.position=\"\";b.top=\"\";b.left=\"\";b.right=\"\";b.width=\"\";window.scrollTo(0,lockedY);};const close=()=>{if(!overlay)return;overlay.remove();overlay=null;unlockScroll();document.removeEventListener(\"keydown\",onKey);if(lastFocus&&lastFocus.focus)lastFocus.focus();};const onKey=e=>{if(e.key===\"Escape\")close();};const open=()=>{if(overlay)return;loadEmbed();lastFocus=document.activeElement;overlay=document.createElement(\"div\");overlay.className=\"lg-bk-overlay\";overlay.setAttribute(\"role\",\"dialog\");overlay.setAttribute(\"aria-modal\",\"true\");overlay.setAttribute(\"aria-label\",title);overlay.innerHTML=`\n<div class=\"lg-bk-panel\">\n  <div class=\"lg-bk-head\">\n    <span class=\"lg-bk-mark\" aria-hidden=\"true\"><i></i><b>\n      <svg viewBox=\"0 0 24 24\" width=\"19\" height=\"19\" fill=\"none\" stroke=\"#1E3865\"\n        stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n        <rect x=\"3.6\" y=\"5.2\" width=\"16.8\" height=\"15.2\" rx=\"3\"></rect>\n        <path d=\"M3.6 10h16.8M8.4 3.6v3.2M15.6 3.6v3.2M8.6 14.4l2.2 2.2 4.6-4.6\"></path>\n      </svg></b></span>\n    <div>\n      <p class=\"lg-bk-title\">${title}</p>\n      <p class=\"lg-bk-sub\">${subtitle}</p>\n    </div>\n    <button type=\"button\" class=\"lg-bk-close\" aria-label=\"Close\">&#10005;</button>\n  </div>\n  <div class=\"lg-bk-body\">\n    <iframe src=\"${calendarUrl}\" title=\"Book a demo with Litguide\" loading=\"lazy\"></iframe>\n  </div>\n</div>`;const btn=overlay.querySelector(\".lg-bk-close\");if(btn)btn.addEventListener(\"click\",close);overlay.addEventListener(\"click\",e=>{if(e.target===overlay)close();});document.body.appendChild(overlay);lockScroll();document.addEventListener(\"keydown\",onKey);if(btn&&btn.focus)btn.focus();};const onClick=e=>{if(e.defaultPrevented||e.button!==0)return;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const target=e.target;if(!target||typeof target.closest!==\"function\")return;// Clicking the logo while already on the homepage should take you\n// back to the top rather than reloading the page.\nconst home=target.closest('a[href=\"/\"], a[href=\"./\"]');if(home&&window.location.pathname===\"/\"){e.preventDefault();e.stopPropagation();if(typeof e.stopImmediatePropagation===\"function\"){e.stopImmediatePropagation();}const reduce=typeof window.matchMedia===\"function\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;window.scrollTo({top:0,behavior:reduce?\"auto\":\"smooth\"});return;}const trigger=target.closest('a[href=\"/demo\"], a[href=\"./demo\"], a[href$=\"/demo\"], a[href=\"#lg-demo-form\"], [data-book-demo]');if(!trigger)return;const href=trigger.getAttribute(\"href\")||\"\";if(href.startsWith(\"http\")&&!href.includes(\"litguide.ca\"))return;e.preventDefault();open();};document.addEventListener(\"click\",onClick,true);return()=>{document.removeEventListener(\"click\",onClick,true);clearTimeout(tabWatchTimer);if(tabObserver)tabObserver.disconnect();close();};},[calendarUrl,title,subtitle,enabled]);return /*#__PURE__*/_jsx(\"div\",{style:{width:1,height:1,opacity:0,pointerEvents:\"none\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LitguideBookingPopup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LitguideBookingPopup.map"],"mappings":"gIAQG,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,cAAY,sEAAsE,QAAM,cAAc,WAAS,+CAA+C,UAAQ,IAAM,EA0FiqB,OA1F3pB,MAAc,CAAoB,GAAhB,CAAC,GAAkB,OAAO,SAAW,IAAY,OAElT,IAAM,EAAW,4CAAkD,MAAc,CAAC,GAAG,SAAS,cAAc,eAAe,EAAW,GAAG,EAAE,OAAO,IAAM,EAAE,SAAS,cAAc,QAAQ,EAAE,EAAE,IAAI,EAAW,EAAE,MAAM,GAAK,SAAS,KAAK,YAAY,CAAC,CAAE,EAAQ,EAAS,0BAA0B,GAAG,CAAC,SAAS,eAAe,CAAQ,EAAE,CAAC,IAAM,EAAG,SAAS,cAAc,OAAO,EAAE,EAAG,GAAG,EAAS,EAAG,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2D5Y,SAAS,KAAK,YAAY,CAAE,CAAE,CAEjC,IAAM,MAAwB,CAAC,IAAM,EAAI,SAAS,cAAc,cAAc,EAAE,GAAG,CAAC,EAAI,OAAO,IAAM,EAAO,EAAI,cAAc,2BAA2B,EAAE,GAAG,CAAC,EAAO,OAEtK,IAAM,EAAO,EAAO,YAAY,EAAI,YAAY,EAAO,aAAa,EAAQ,EAAI,EAAI,YAAY,EAAI,YAAkB,EAAK,KAAK,IAAI,EAAE,KAAK,IAAI,EAAO,CAAG,CAAC,EAAK,KAAK,IAAI,EAAI,WAAW,CAAI,EAAE,IAAE,EAAI,WAAW,EAAK,EAAQ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