{"version":3,"file":"Examples_1.Cj1P4ipe.mjs","names":["useStore","useState","useState","useMemo"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/n5f6mndUvsWUSLqn2an9/dgHioLRfnSYURlYZlAD5/Examples_1.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useEffect,useMemo,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}function updateCopyrightText(text,year){const yearString=String(year);const symbolYearRegex=/(©\\s*)(\\d{4})/g;if(symbolYearRegex.test(text)){return text.replace(symbolYearRegex,`$1${yearString}`);}const symbolRegex=/(©)(?!\\s*\\d{4})/g;if(symbolRegex.test(text)){return text.replace(symbolRegex,`\\xa9 ${yearString}`);}const trimmed=text.trimEnd();return`${trimmed} \\xa9 ${yearString}`;}export function withCurrentYear(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[currentYear,setCurrentYear]=useState(()=>new Date().getFullYear());useEffect(()=>{if(typeof window!==\"undefined\"){const browserYear=new Date().getFullYear();startTransition(()=>setCurrentYear(browserYear));}},[]);const updatedChildren=useMemo(()=>{if(typeof props.children===\"string\"){return updateCopyrightText(props.children,currentYear);}return props.children;},[props.children,currentYear]);const updatedText=useMemo(()=>{if(typeof props.text===\"string\"){return updateCopyrightText(props.text,currentYear);}return props.text;},[props.text,currentYear]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,children:updatedChildren,text:updatedText});});}const projectCatalog={munster:{desktopLabel:\"Munster Gaa\",mobileLabel:\"munster gaa - mobile\"},winahouse:{desktopLabel:\"Winahouse\",mobileLabel:\"Winahouse - mobile\"},kenya:{desktopLabel:\"Kenya\",mobileLabel:\"Kenya - mobile\"},dams:{desktopLabel:\"Dams\",mobileLabel:\"Dams - moible\"},dunraven:{desktopLabel:\"Dunraven\",mobileLabel:\"dunraven - mobile\"},femfuelz:{desktopLabel:\"FemFuelz\",mobileLabel:\"FemFuelz - mobile\"},irishGuideDogs:{desktopLabel:\"Irish guide dogs\",mobileLabel:\"Irish guide dogs - mobile\"},blueToGold:{desktopLabel:\"Blue to gold\",mobileLabel:\"BLUE TO GOLD - MOBILE\"},multiSelect:{desktopLabel:\"Multi select\",mobileLabel:\"Multi select - mobile\"}};const recommendationRules=[{test:path=>path===\"/case-studies/munster-gaa\"||path.startsWith(\"/case-studies/munster-gaa-folder/\"),current:\"munster\",candidates:[\"blueToGold\",\"irishGuideDogs\",\"winahouse\",\"kenya\"]},{test:path=>path===\"/case-studies/bluetogold\",current:\"blueToGold\",candidates:[\"munster\",\"winahouse\",\"kenya\"]},{test:path=>path===\"/case-studies/winahouse\",current:\"winahouse\",candidates:[\"munster\",\"blueToGold\",\"kenya\"]},{test:path=>path===\"/case-studies/-hmv-x-irish-guide-dogs\",current:\"irishGuideDogs\",candidates:[\"blueToGold\",\"munster\",\"winahouse\"]},{test:path=>path===\"/case-studies/kenya\",current:\"kenya\",candidates:[\"dams\",\"dunraven\",\"munster\"]},{test:path=>path===\"/case-studies/dams\",current:\"dams\",candidates:[\"kenya\",\"dunraven\",\"femfuelz\"]},{test:path=>path===\"/case-studies/dunraven\",current:\"dunraven\",candidates:[\"kenya\",\"dams\",\"winahouse\"]},{test:path=>path===\"/case-studies/femfuelz\"||path===\"/case-studies/sigmoid\",current:\"femfuelz\",candidates:[\"dams\",\"kenya\",\"munster\"]},{test:path=>path===\"/case-studies/coolmore\"||path===\"/case-studies/tus\",candidates:[\"winahouse\",\"munster\",\"blueToGold\"]}];function resolveRule(pathname){return recommendationRules.find(rule=>rule.test(pathname))??{test:()=>true,candidates:[\"munster\",\"winahouse\"]};}function labelForProject(project,isMobile){const entry=projectCatalog[project];return isMobile?entry.mobileLabel:entry.desktopLabel;}export function withRelevantProjects(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[pathname,setPathname]=useState(\"\");useEffect(()=>{if(typeof window!==\"undefined\"){const nextPath=window.location?.pathname??\"\";startTransition(()=>setPathname(nextPath));}},[]);const isMobileVariant=useMemo(()=>{const variantValue=typeof props.variant===\"string\"?props.variant:\"\";const normalized=variantValue.toLowerCase();return normalized.includes(\"mobile\")||normalized.includes(\"variant 2\");},[props.variant]);const recommendations=useMemo(()=>{const rule=resolveRule(pathname);const selected=[];for(const candidate of rule.candidates){if(rule.current&&candidate===rule.current)continue;if(!selected.includes(candidate))selected.push(candidate);if(selected.length===2)break;}if(selected.length<2){for(const fallback of[\"munster\",\"winahouse\"]){if(rule.current&&fallback===rule.current)continue;if(!selected.includes(fallback))selected.push(fallback);if(selected.length===2)break;}}const first=labelForProject(selected[0]??\"munster\",isMobileVariant);const second=labelForProject(selected[1]??\"winahouse\",isMobileVariant);return{first,second};},[pathname,isMobileVariant]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,project1:recommendations.first,project2:recommendations.second,$control__project1:recommendations.first,$control__project2:recommendations.second});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withRelevantProjects\":{\"type\":\"reactHoc\",\"name\":\"withRelevantProjects\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCurrentYear\":{\"type\":\"reactHoc\",\"name\":\"withCurrentYear\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples_1.map"],"mappings":"qNAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,CAAC,CAClD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS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