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,UAAM,CACd,IAAMC,EAAU,CACd,UACA,UACA,YACA,YACA,YACA,aACA,YACA,aACD,CAEGC,EAAe,EAEbC,EAAiB,SAACC,CAAAA,CAAyB,CAG/C,GAAIC,EAFIA,GAAAA,GAEIJ,CAAO,CAACC,EAAa,CAAE,CACjCA,EAAe,EACf,MACF,CAAC,GACe,EACZD,EAAQK,MAAM,GAAKJ,IACrBA,EAAe,EACfH,IAEJ,EAGA,OADAQ,SAASC,gBAAgB,CAAC,QAASL,GAC5B,kBAAMI,SAASE,mBAAmB,CAAC,QAASN,GACrD,EAAG,CAACJ,EAAmB,CACzB","sources":["webpack://_N_E/./src/components/EasterEgg/EasterEgg.tsx","webpack://_N_E/./src/components/EasterEgg/index.ts","webpack://_N_E/../../packages/uikit/src/hooks/useKonamiCheatCode.ts","webpack://_N_E/"],"sourcesContent":["import { useState, useCallback, memo } from 'react'\nimport { FallingBunniesProps, useKonamiCheatCode } from '@pancakeswap/uikit'\nimport dynamic from 'next/dynamic'\n\nconst FallingBunnies = dynamic(\n () => import('@pancakeswap/uikit').then((mod) => mod.FallingBunnies),\n { ssr: false },\n)\n\nconst EasterEgg: React.FC> = (props) => {\n const [show, setShow] = useState(false)\n const startFalling = useCallback(() => setShow(true), [setShow])\n useKonamiCheatCode(startFalling)\n\n if (show) {\n return (\n
setShow(false)}>\n \n
\n )\n }\n return null\n}\n\nexport default memo(EasterEgg)\n","export { default } from './EasterEgg'\n","import { useEffect } from \"react\";\n\nconst useKonamiCheatCode = (matchedCodeHandler: () => void): void => {\n useEffect(() => {\n const pattern = [\n \"ArrowUp\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ];\n\n let currentIndex = 0;\n\n const onKeyUpHandler = (event: KeyboardEvent) => {\n const { key } = event;\n // is key in correct order otherwise reset\n if (key !== pattern[currentIndex]) {\n currentIndex = 0;\n return;\n }\n currentIndex += 1;\n if (pattern.length === currentIndex) {\n currentIndex = 0;\n matchedCodeHandler();\n }\n };\n\n document.addEventListener(\"keyup\", onKeyUpHandler);\n return () => document.removeEventListener(\"keyup\", onKeyUpHandler);\n }, [matchedCodeHandler]);\n};\n\nexport default useKonamiCheatCode;\n"],"names":["FallingBunnies","dynamic","Promise","all","__webpack_require__","e","then","bind","mod","ssr","EasterEgg_EasterEgg","memo","props","useState","show","setShow","startFalling","useCallback","useKonamiCheatCode","jsx_runtime","jsx","div","onAnimationEnd","__webpack_exports__","matchedCodeHandler","useEffect","pattern","currentIndex","onKeyUpHandler","event","key","length","document","addEventListener","removeEventListener"],"sourceRoot":""}