{"version":3,"file":"shared-lib.1fBLL-Sq.mjs","names":["React.useState","React.useCallback","React.useMemo"],"sources":["https:/framerusercontent.com/modules/55jEp47VlZBqeFU1LjCK/lO1pDcuick5son4GrL5R/SiteCookieConsent.js","https:/framerusercontent.com/modules/2xoc4Z2m99Qa4a7lcKV6/lvhYAFlecgyzr8Kf0Y7k/siteMetadata.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";const STORAGE_KEY=\"site_cookie_consent_choice\";// A Framer instance can carry an explicit empty string for a String control,\n// which beats defaultValue — so the container id always resolves through this.\nconst GTM_ID_FALLBACK=\"GTM-PBCWGP6V\";function ensureConsentInit(){if(typeof window===\"undefined\")return;if(!window.dataLayer)window.dataLayer=[];if(!window.gtag){// Canonical Google form: push the `arguments` object, not a rest array.\nwindow.gtag=function gtag(){window.dataLayer?.push(arguments);};}if(!window.__sccConsentInitialized){// Consent Mode v2 — ad_user_data and ad_personalization are REQUIRED\n// alongside the v1 signals for Google Ads in the UK/EEA.\nwindow.gtag(\"consent\",\"default\",{analytics_storage:\"denied\",ad_storage:\"denied\",ad_user_data:\"denied\",ad_personalization:\"denied\"});window.__sccConsentInitialized=true;}}function loadGTM(id){if(typeof document===\"undefined\"||typeof window===\"undefined\")return;if(!id)return;if(window.__sccGtmLoaded===id)return;if(document.getElementById(`gtm-script-${id}`)){window.__sccGtmLoaded=id;return;}const script=document.createElement(\"script\");script.id=`gtm-script-${id}`;script.async=true;script.src=`https://www.googletagmanager.com/gtm.js?id=${id}`;document.head.appendChild(script);window.__sccGtmLoaded=id;}function applyConsent(choice){if(typeof window===\"undefined\")return;ensureConsentInit();const granted=choice===\"accepted\";const v=granted?\"granted\":\"denied\";window.gtag?.(\"consent\",\"update\",{analytics_storage:v,ad_storage:v,ad_user_data:v,ad_personalization:v});}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function SiteCookieConsent(props){const{gtmId,message,acceptLabel,rejectLabel,surfaceColor,textColor,borderColor,primaryButtonColor,primaryButtonTextColor,secondaryButtonColor,secondaryButtonTextColor,cornerRadius,maxWidth,style}=props;const[visible,setVisible]=React.useState(false);const container=String(gtmId||\"\").trim()||GTM_ID_FALLBACK;React.useEffect(()=>{if(typeof window===\"undefined\")return;ensureConsentInit();const saved=window.localStorage.getItem(STORAGE_KEY);if(saved===\"accepted\"||saved===\"rejected\"){applyConsent(saved);React.startTransition(()=>setVisible(false));}else{React.startTransition(()=>setVisible(true));}loadGTM(container);},[container]);const handleChoice=React.useCallback(choice=>{if(typeof window===\"undefined\")return;window.localStorage.setItem(STORAGE_KEY,choice);applyConsent(choice);React.startTransition(()=>setVisible(false));},[]);const containerStyle=React.useMemo(()=>({position:\"fixed\",left:16,right:16,bottom:16,zIndex:2147483e3,display:\"flex\",justifyContent:\"center\",pointerEvents:\"none\"}),[]);const bannerStyle=React.useMemo(()=>({width:\"100%\",maxWidth,background:surfaceColor,color:textColor,border:`1px solid ${borderColor}`,borderRadius:cornerRadius,boxShadow:\"0 6px 22px rgba(10, 26, 47, 0.12)\",padding:\"12px 14px\",display:\"flex\",gap:10,alignItems:\"center\",justifyContent:\"space-between\",flexWrap:\"wrap\",pointerEvents:\"auto\"}),[borderColor,cornerRadius,maxWidth,surfaceColor,textColor]);const buttonBase=React.useMemo(()=>({border:\"none\",borderRadius:Math.max(8,Math.round(cornerRadius*.45)),padding:\"9px 14px\",fontSize:14,lineHeight:1.1,cursor:\"pointer\",fontWeight:600}),[cornerRadius]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:0,pointerEvents:\"none\",...style},children:visible&&/*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(\"section\",{role:\"dialog\",\"aria-modal\":\"false\",\"aria-label\":\"Cookie consent preferences\",style:bannerStyle,children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontSize:14,lineHeight:1.45,flex:\"1 1 260px\"},children:message}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:8,marginLeft:\"auto\",flex:\"0 0 auto\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>handleChoice(\"rejected\"),style:{...buttonBase,background:secondaryButtonColor,color:secondaryButtonTextColor,border:`1px solid ${borderColor}`},children:rejectLabel}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>handleChoice(\"accepted\"),style:{...buttonBase,background:primaryButtonColor,color:primaryButtonTextColor},children:acceptLabel})]})]})})});}addPropertyControls(SiteCookieConsent,{gtmId:{type:ControlType.String,title:\"GTM Container\",defaultValue:\"GTM-PBCWGP6V\",placeholder:\"GTM-XXXXXXX\",description:\"Google Tag Manager container loaded after Consent Mode defaults are set to denied. Leave blank to use GTM-PBCWGP6V.\"},message:{type:ControlType.String,title:\"Message\",defaultValue:\"We use cookies to measure site performance and improve your experience. You can accept or reject analytics and advertising cookies.\",displayTextArea:true},acceptLabel:{type:ControlType.String,title:\"Accept Label\",defaultValue:\"Accept\"},rejectLabel:{type:ControlType.String,title:\"Reject Label\",defaultValue:\"Reject\"},surfaceColor:{type:ControlType.Color,title:\"Surface\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#EEEEEE\"},primaryButtonColor:{type:ControlType.Color,title:\"Primary BG\",defaultValue:\"#0A1A2F\"},primaryButtonTextColor:{type:ControlType.Color,title:\"Primary Text\",defaultValue:\"#FFFFFF\"},secondaryButtonColor:{type:ControlType.Color,title:\"Secondary BG\",defaultValue:\"#F5F5F5\"},secondaryButtonTextColor:{type:ControlType.Color,title:\"Secondary Text\",defaultValue:\"#000000\"},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:40,step:1},maxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:900,min:280,max:1600,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SiteCookieConsent\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SiteCookieConsent.map","// Generated by Framer (c9b3949)\nexport default function metadata(params,activeLocale){return{description:\"Edinburgh Travel Clinic in the heart of Edinburgh delivers an exceptional high-rated service delivering travel vaccines including: Yellow-Fever, Typhoid, Hep-A/B, and many more for destinations like Thailand, Asia, Africa, and anywhere else you can go. \",favicon:\"https://framerusercontent.com/assets/EnAsqPCSiokr2LyX9zOz8WH79Nw.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/mzwbzW8TLp87oDzxDiooZPCyI.png\",title:\"Travel Clinic Edinburgh | Edinburgh 5 Star Rated Travel Clinic | Appt's Open Today\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"iNAEqC,SAAS,GAAmB,CAAW,IAAS,SAAmB,AAAqB,EAAO,YAAU,CAAC,EAAE,AACjJ,EAAO,OAAK,UAAe,CAAC,EAAO,WAAW,KAAK,SAAS,CAAE,EAAG,AAEmE,EAAO,2BAA3I,EAAO,KAAK,UAAU,UAAU,CAAC,kBAAkB,SAAS,WAAW,SAAS,aAAa,SAAS,mBAAmB,QAAQ,CAAC,EAAiC,IAAM,CAAC,SAAS,EAAQ,EAAG,CAAoF,GAAhF,OAAO,SAAW,KAAoB,IAAS,QAAsB,CAAC,GAAa,EAAO,iBAAiB,EAAG,OAAO,GAAG,SAAS,eAAe,cAAc,GAAI,EAAE,CAAC,EAAO,eAAe,E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