{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/oxc4tWyRzt5zVPtQvUWm/GNnYDFI3Vr4H9gFJwh72/EasterEgg.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */// Function to create the easter egg logic\nfunction EasterEggRedirect(props){// Convert the word sequence string to an array of characters\nconst wordSequence=props.wordSequence.split(\"\");// State to keep track of the typed keys\nconst[typedKeys,setTypedKeys]=React.useState([]);// Event listener to handle keydown\nconst handleKeyDown=e=>{// Convert typed key to lowercase\nconst typedKey=e.key.toLowerCase();// Add the typed key to the array\nconst updatedKeys=[...typedKeys,typedKey];// Ensure the array length doesn't exceed the word sequence length\nif(updatedKeys.length>wordSequence.length){updatedKeys.shift();}// Check if the typed keys match the word sequence\nif(wordSequence.every((key,index)=>key===updatedKeys[index])){// Check if the redirect URL starts with \"https://\"\nlet redirectUrl=props.redirectUrl;if(!redirectUrl.startsWith(\"https://\")){// Add \"https://\" to the beginning of the URL\nredirectUrl=\"https://\"+redirectUrl;}// Open the link in a new tab or the same tab based on the property value\nif(props.openInNewTab){window.open(redirectUrl,\"_blank\");}else{window.location.href=redirectUrl;}}// Update the state with the typed keys\nsetTypedKeys(updatedKeys);};// Effect to add and remove the event listener\nReact.useEffect(()=>{window.addEventListener(\"keydown\",handleKeyDown);return()=>{window.removeEventListener(\"keydown\",handleKeyDown);};},[typedKeys]);// Render a transparent element with pointer events set to none\nreturn /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",pointerEvents:\"none\"}});}EasterEggRedirect.displayName=\"Easter Egg Redirect\";// Add property controls for the word sequence, redirect URL, and open in new tab toggle\naddPropertyControls(EasterEggRedirect,{wordSequence:{title:\"Word\",type:ControlType.String,defaultValue:\"framer\",description:\"Enter one(!) word that will trigger the redirect.\"},redirectUrl:{title:\"URL\",type:ControlType.String,defaultValue:\"framer.university\",description:\"Enter the URL to redirect to when the word is typed.\"},openInNewTab:{title:\"New Tab\",type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Toggle to open the link in a new tab.\\nMore components at [Framer University](https://frameruni.link/cc).\"}});// Export the code component\nexport default EasterEggRedirect;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EasterEggRedirect\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"100\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"100\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EasterEgg.map"],
  "mappings": "gJASA,SAASA,EAAkBC,EAAM,CACjC,IAAMC,EAAaD,EAAM,aAAa,MAAM,EAAE,EACzC,CAACE,EAAUC,CAAY,EAAQC,EAAS,CAAC,CAAC,EACzCC,EAAcC,GAAG,CACvB,IAAMC,EAASD,EAAE,IAAI,YAAY,EAC3BE,EAAY,CAAC,GAAGN,EAAUK,CAAQ,EAExC,GADGC,EAAY,OAAOP,EAAa,QAAQO,EAAY,MAAM,EAC1DP,EAAa,MAAM,CAACQ,EAAIC,IAAQD,IAAMD,EAAYE,CAAK,CAAC,EAAE,CAC7D,IAAIC,EAAYX,EAAM,YAAgBW,EAAY,WAAW,UAAU,IACvEA,EAAY,WAAWA,GACpBX,EAAM,aAAcY,EAAO,KAAKD,EAAY,QAAQ,EAAQC,EAAO,SAAS,KAAKD,EACpFR,EAAaK,CAAW,CAAE,EAC1B,OAAMK,EAAU,KAAKD,EAAO,iBAAiB,UAAUP,CAAa,EAAQ,IAAI,CAACO,EAAO,oBAAoB,UAAUP,CAAa,CAAE,GAAI,CAACH,CAAS,CAAC,EAChI,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,cAAc,MAAM,CAAC,CAAC,CAAE,CAACH,EAAkB,YAAY,sBACzHe,EAAoBf,EAAkB,CAAC,aAAa,CAAC,MAAM,OAAO,KAAKgB,EAAY,OAAO,aAAa,SAAS,YAAY,mDAAmD,EAAE,YAAY,CAAC,MAAM,MAAM,KAAKA,EAAY,OAAO,aAAa,oBAAoB,YAAY,sDAAsD,EAAE,aAAa,CAAC,MAAM,UAAU,KAAKA,EAAY,QAAQ,aAAa,GAAM,aAAa,MAAM,cAAc,KAAK,YAAY;AAAA,mEAA2G,CAAC,CAAC,EAChjB,IAAOC,EAAQjB",
  "names": ["EasterEggRedirect", "props", "wordSequence", "typedKeys", "setTypedKeys", "ye", "handleKeyDown", "e", "typedKey", "updatedKeys", "key", "index", "redirectUrl", "window", "ue", "addPropertyControls", "ControlType", "EasterEgg_default"]
}
