{"version":3,"file":"Examples.sn11OPlv.mjs","names":["useState","useRef","useState","useCallback"],"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/lJU30lJHk1yGtNCf2Y9S/iHzFUuDT5VKhFhrwanpi/Examples.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,jsxs as _jsxs}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useRef,useState}from\"react\";import{useIsStaticRenderer}from\"framer\";// @ts-ignore\nimport{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// @ts-ignore\nimport{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()});}});});}export function withHideWhenCollectionEmpty(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const localRef=useRef(null);const isStatic=useIsStaticRenderer();const[isVisible,setIsVisible]=useState(true);const setMergedRef=useCallback(node=>{localRef.current=node;if(typeof ref===\"function\")ref(node);else if(ref&&typeof ref===\"object\")ref.current=node;},[ref]);const evaluateVisibility=useCallback(()=>{if(isStatic)return;const root=localRef.current;if(!root||typeof window===\"undefined\")return;const findNamedElement=(scope,name)=>{const selectors=[`[data-framer-name=\"${name}\"]`,`[data-name=\"${name}\"]`,`[aria-label=\"${name}\"]`];for(const selector of selectors){const found=scope.querySelector(selector);if(found)return found;}return null;};const list=findNamedElement(root,\"Article FAQ List\");if(!list)return;const faqItems=list.querySelectorAll('[data-framer-name=\"FAQ Answer\"], [data-name=\"FAQ Answer\"], [aria-label=\"FAQ Answer\"]');const hasItems=faqItems.length>0;const emptyState=findNamedElement(root,\"Empty State\");const emptyStateVisible=!!emptyState&&emptyState.isConnected&&window.getComputedStyle(emptyState).display!==\"none\"&&window.getComputedStyle(emptyState).visibility!==\"hidden\";const nextVisible=hasItems||!emptyStateVisible;setIsVisible(prev=>{if(prev===nextVisible)return prev;startTransition(()=>setIsVisible(nextVisible));return prev;});},[isStatic]);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;evaluateVisibility();const rafId=window.requestAnimationFrame(evaluateVisibility);const timeoutId=window.setTimeout(evaluateVisibility,120);const root=localRef.current;if(!root)return;const observer=new MutationObserver(()=>evaluateVisibility());observer.observe(root,{childList:true,subtree:true,attributes:true,attributeFilter:[\"style\",\"class\",\"data-framer-name\",\"data-name\",\"aria-label\"]});const onRouteChange=()=>evaluateVisibility();window.addEventListener(\"popstate\",onRouteChange);window.addEventListener(\"hashchange\",onRouteChange);return()=>{window.cancelAnimationFrame(rafId);window.clearTimeout(timeoutId);observer.disconnect();window.removeEventListener(\"popstate\",onRouteChange);window.removeEventListener(\"hashchange\",onRouteChange);};},[evaluateVisibility,isStatic]);if(isStatic){return /*#__PURE__*/_jsx(Component,{ref:setMergedRef,...props});}return /*#__PURE__*/_jsx(Component,{ref:setMergedRef,...props,style:{...props.style,display:isVisible?props.style?.display:\"none\"}});});}export function withWorkflowAuditDownloadStyle(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const scopeClassName=\"workflow-audit-download-override\";return /*#__PURE__*/_jsxs(\"div\",{className:scopeClassName,style:{display:\"contents\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    .${scopeClassName} a,\n                    .${scopeClassName} button,\n                    .${scopeClassName} [role=\"button\"] {\n                        background: var(--token-434d732f-9cf3-4a3b-91cf-9ddcd2fb414e) !important;\n                        color: #FFFFFF !important;\n                        border-radius: 2px !important;\n                        padding: 15px 24px !important;\n                        gap: 0 !important;\n                        font-family: \"IBM Plex Mono\", monospace !important;\n                        font-size: 12px !important;\n                        font-weight: 600 !important;\n                        letter-spacing: 1.2px !important;\n                        line-height: 1.2 !important;\n                        text-decoration: none !important;\n                    }\n\n                    @media (min-width: 810px) {\n                        .${scopeClassName} a,\n                        .${scopeClassName} button,\n                        .${scopeClassName} [role=\"button\"] {\n                            width: fit-content !important;\n                        }\n                    }\n\n                    @media (max-width: 809.98px) {\n                        .${scopeClassName} a,\n                        .${scopeClassName} button,\n                        .${scopeClassName} [role=\"button\"] {\n                            padding: 12px 16px !important;\n                            font-size: 10px !important;\n                            font-weight: 600 !important;\n                            letter-spacing: 0.5px !important;\n                            line-height: 1.2 !important;\n                        }\n                    }\n                `}),/*#__PURE__*/_jsx(Component,{ref:ref,...props})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHideWhenCollectionEmpty\":{\"type\":\"reactHoc\",\"name\":\"withHideWhenCollectionEmpty\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withWorkflowAuditDownloadStyle\":{\"type\":\"reactHoc\",\"name\":\"withWorkflowAuditDownloadStyle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"2OAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,CAAC,CAAC,EACjD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,CAAQ,CAAC,CAAE,EACjI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,CAAM,CAAC,EAAE,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,CAAU,GAAG,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GAAG,CAAQ,CAAC,EAAE,EACjJ,EAAa,QAAQ,GAAQ,EAAO,CAAU,CAAC,CAAE,EACjD,SAAS,GAAU,CACnB,GAAK,CAAC,EAAM,GA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