{"version":3,"file":"IClosedLiftWidgetLoader.D6fZGb8K.mjs","names":[],"sources":["https:/framerusercontent.com/modules/JLgkSliFjiIVrGy4ktaw/dBXHgf3U25SBkIwMpv0K/IClosedLiftWidgetLoader.js"],"sourcesContent":["// User request: Create a Framer code component named IClosed Lift Widget Loader (not an override) that loads the iClosed Lift widget on mount from https://app.iclosed.io/assets/widget.js with data-cta-widget=\"V0seWCrfxi4F\", appends to document.body, runs once per browser session, is SSR-safe, tolerates mounting after initial page load, returns an invisible 1×1 element that cannot affect page layout or intercept clicks, does not use an iframe or alter widget placement, and remains self-contained with no configuration controls.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls}from\"framer\";const WIDGET_SRC=\"https://app.iclosed.io/assets/widget.js\";const WIDGET_ATTR=\"data-cta-widget\";const WIDGET_ID=\"V0seWCrfxi4F\";const SESSION_KEY=\"iclosedLiftWidgetLoaded\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function IClosedLiftWidgetLoader(_props){useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\"){return;}const selector=`script[src=\"${WIDGET_SRC}\"][${WIDGET_ATTR}=\"${WIDGET_ID}\"]`;const existingScript=document.querySelector(selector);if(existingScript){try{window.sessionStorage.setItem(SESSION_KEY,\"1\");}catch(_error){// Ignore storage restrictions.\n}return;}let alreadyLoadedThisSession=false;try{alreadyLoadedThisSession=window.sessionStorage.getItem(SESSION_KEY)===\"1\";}catch(_error){// Ignore storage restrictions and proceed with DOM check fallback.\n}if(alreadyLoadedThisSession)return;const script=document.createElement(\"script\");script.src=WIDGET_SRC;script.async=true;script.setAttribute(WIDGET_ATTR,WIDGET_ID);document.body.appendChild(script);try{window.sessionStorage.setItem(SESSION_KEY,\"1\");}catch(_error){// Ignore storage restrictions.\n}},[]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",width:1,height:1,opacity:0,pointerEvents:\"none\",overflow:\"hidden\"},\"aria-hidden\":\"true\"});}addPropertyControls(IClosedLiftWidgetLoader,{});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IClosedLiftWidgetLoader\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IClosedLiftWidgetLoader.map"],"mappings":"iLAIG,SAAwB,EAAwB,EAAO,CAGnD,OAHoD,MAAc,CAAC,GAAU,IAAS,QAAa,OAAO,SAAW,IAAa,OAAQ,IAAM,EAAS,eAAe,EAAW,KAAK,EAAY,IAAI,EAAU,IAA0D,GAAjC,SAAS,cAAc,CAA0B,EAAE,CAAC,GAAG,CAAC,EAAO,eAAe,QAAQ,EAAY,GAAG,CAAE,MAAc,CACvW,CAAC,MAAO,CAAC,IAAI,EAAyB,GAAM,GAAG,CAAC,EAAyB,EAAO,eAAe,QAAQ,CAAW,IAAI,GAAI,MAAc,CACxI,CAAC,GAAG,EAAyB,OAAO,IAAM,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,IAAI,EAAW,EAAO,MAAM,GAAK,EAAO,aAAa,EAAY,CAAS,EAAE,SAAS,KAAK,YAAY,CAAM,EAAE,GAAG,CAAC,EAAO,eAAe,QAAQ,EAAY,GAAG,CAAE,MAAc,CACxQ,CAAC,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,OAAO,SAAS,QAAQ,EAAE,cAAc,MAAM,CAAC,CAAE,6BANlH,IAA6B,IAAwC,EAAO,EAAW,0CAAgD,EAAY,kBAAwB,EAAU,eAAqB,EAAY,0BAMnG,EAAoB,EAAwB,CAAC,CAAC"}