{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/JA3HCQa0r6TumaXirufN/x4vVNAPJAoWrRAmIQHvZ/Teclas.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";function withKey(Component,key){return props=>{// Initial variant, scale\nconst[variant,setVariant]=useState(\"Variant 1\");const[scale,setScale]=useState(1);// Utiliza useRef para obtener una referencia al componente\nconst componentRef=useRef(null);// Set variant and decrease scale\nconst handleKeyDown=event=>{if(event.key==key){// Verifica si el componente tiene un m\u00E9todo 'click' y lo llama\nif(componentRef.current&&typeof componentRef.current.click===\"function\"){componentRef.current.click();}}};// Set variant back and increase scale\nconst handleKeyUp=event=>{if(event.key===key){setVariant(\"Variant 1\");}};useEffect(()=>{document.addEventListener(\"keydown\",handleKeyDown);document.addEventListener(\"keyup\",handleKeyUp);return()=>{document.removeEventListener(\"keydown\",handleKeyDown);document.removeEventListener(\"keyup\",handleKeyUp);};},[]);// Animation fine-tuned via the transition property\nreturn /*#__PURE__*/_jsx(Component,{...props,ref:componentRef,variant:variant,style:{transform:`scale(${scale})`,transition:\"transform 100ms ease-out\"}});};}export function withShift(Component){return props=>{const[variant,setVariant]=useState(\"Variant 1\");const[scale,setScale]=useState(1);const[shiftPressed,setShiftPressed]=useState(false);const handleKeyPress=event=>{if(event.key===\"Shift\"){setVariant(\"Variant 2\");setScale(.8);setShiftPressed(true);}};const handleKeyRelease=event=>{if(event.key===\"Shift\"){setScale(1);setShiftPressed(false);setTimeout(()=>{setVariant(\"Variant 1\");},100);}};useEffect(()=>{document.addEventListener(\"keydown\",handleKeyPress);document.addEventListener(\"keyup\",handleKeyRelease);return()=>{document.removeEventListener(\"keydown\",handleKeyPress);document.removeEventListener(\"keyup\",handleKeyRelease);};},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant,style:{transform:`scale(${shiftPressed?scale:1})`,transition:`transform 0.1s ease-in-out`}});};}export function withAlt(Component){return props=>{const[variant,setVariant]=useState(\"Variant 1\");const[scale,setScale]=useState(1);const[altPressed,setAltPressed]=useState(false);const handleKeyPress=event=>{if(event.key===\"Alt\"){setVariant(\"Variant 2\");setScale(.8);setAltPressed(true);}};const handleKeyRelease=event=>{if(event.key===\"Alt\"){setScale(1);setAltPressed(false);setTimeout(()=>{setVariant(\"Variant 1\");},100);}};useEffect(()=>{document.addEventListener(\"keydown\",handleKeyPress);document.addEventListener(\"keyup\",handleKeyRelease);return()=>{document.removeEventListener(\"keydown\",handleKeyPress);document.removeEventListener(\"keyup\",handleKeyRelease);};},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant,style:{transform:`scale(${altPressed?scale:1})`,transition:`transform 0.1s ease-in-out`}});};}export function withCmd(Component){return props=>{const[variant,setVariant]=useState(\"Variant 1\");const[scale,setScale]=useState(1);const handleKeyDown=event=>{if(event.metaKey&&event.key===\"Meta\"){setVariant(\"Variant 2\");setScale(1.2);}};const handleKeyUp=event=>{if(event.metaKey&&event.key===\"Meta\"){setVariant(\"Variant 1\");setScale(1);}};useEffect(()=>{document.addEventListener(\"keydown\",handleKeyDown);document.addEventListener(\"keyup\",handleKeyUp);return()=>{document.removeEventListener(\"keydown\",handleKeyDown);document.removeEventListener(\"keyup\",handleKeyUp);};},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant,style:{transform:`scale(${scale})`}});};}export function withCtrl(Component){return props=>{const[variant,setVariant]=useState(\"Variant 1\");const[scale,setScale]=useState(1);const[shiftPressed,setShiftPressed]=useState(false);const handleKeyPress=event=>{if(event.ctrlKey){setVariant(\"Variant 2\");setScale(.8);setShiftPressed(true);}};const handleKeyRelease=event=>{if(event.key==\"Control\"){setScale(1);setShiftPressed(false);setTimeout(()=>{setVariant(\"Variant 1\");},100);}};useEffect(()=>{document.addEventListener(\"keydown\",handleKeyPress);document.addEventListener(\"keyup\",handleKeyRelease);return()=>{document.removeEventListener(\"keydown\",handleKeyPress);document.removeEventListener(\"keyup\",handleKeyRelease);};},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant,style:{transform:`scale(${shiftPressed?scale:1})`,transition:`transform 0.1s ease-in-out`}});};}export function withPageSwipeLeft(Component){return props=>{const componentRef=useRef(null);useEffect(()=>{const handleTouchStart=event=>{startX.current=event.touches[0].clientX;};const handleTouchEnd=event=>{const deltaX=startX.current-event.changedTouches[0].clientX;if(deltaX>50&&componentRef.current){componentRef.current.click();}};document.addEventListener(\"touchstart\",handleTouchStart);document.addEventListener(\"touchend\",handleTouchEnd);return()=>{document.removeEventListener(\"touchstart\",handleTouchStart);document.removeEventListener(\"touchend\",handleTouchEnd);};},[]);const startX=useRef(null);return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};}export function withPageSwipeRight(Component){return props=>{const componentRef=useRef(null);useEffect(()=>{const handleTouchStart=event=>{startX.current=event.touches[0].clientX;};const handleTouchEnd=event=>{const deltaX=event.changedTouches[0].clientX-startX.current;if(deltaX>50&&componentRef.current){componentRef.current.click();}};document.addEventListener(\"touchstart\",handleTouchStart);document.addEventListener(\"touchend\",handleTouchEnd);return()=>{document.removeEventListener(\"touchstart\",handleTouchStart);document.removeEventListener(\"touchend\",handleTouchEnd);};},[]);const startX=useRef(null);return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};}// Letters\nexport const withA=Component=>withKey(Component,\"a\");export const withB=Component=>withKey(Component,\"b\");export const withC=Component=>withKey(Component,\"c\");export const withD=Component=>withKey(Component,\"d\");export const withE=Component=>withKey(Component,\"e\");export const withF=Component=>withKey(Component,\"f\");export const withG=Component=>withKey(Component,\"g\");export const withH=Component=>withKey(Component,\"h\");export const withI=Component=>withKey(Component,\"i\");export const withJ=Component=>withKey(Component,\"j\");export const withK=Component=>withKey(Component,\"k\");export const withL=Component=>withKey(Component,\"l\");export const withM=Component=>withKey(Component,\"m\");export const withN=Component=>withKey(Component,\"n\");export const withO=Component=>withKey(Component,\"o\");export const withP=Component=>withKey(Component,\"p\");export const withQ=Component=>withKey(Component,\"q\");export const withR=Component=>withKey(Component,\"r\");export const withS=Component=>withKey(Component,\"s\");export const withT=Component=>withKey(Component,\"t\");export const withU=Component=>withKey(Component,\"u\");export const withV=Component=>withKey(Component,\"v\");export const withW=Component=>withKey(Component,\"w\");export const withX=Component=>withKey(Component,\"x\");export const withY=Component=>withKey(Component,\"y\");export const withZ=Component=>withKey(Component,\"z\");// Numbers\nexport const with1=Component=>withKey(Component,\"1\");export const with2=Component=>withKey(Component,\"2\");export const with3=Component=>withKey(Component,\"3\");export const with4=Component=>withKey(Component,\"4\");export const with5=Component=>withKey(Component,\"5\");export const with6=Component=>withKey(Component,\"6\");export const with7=Component=>withKey(Component,\"7\");export const with8=Component=>withKey(Component,\"8\");export const with9=Component=>withKey(Component,\"9\");// Arrow keys\nexport const withUpArrow=Component=>withKey(Component,\"ArrowUp\");export const withDownArrow=Component=>withKey(Component,\"ArrowDown\");export const withLeftArrow=Component=>withKey(Component,\"ArrowLeft\");export const withRightArrow=Component=>withKey(Component,\"ArrowRight\");// Special keys\nexport const withEnter=Component=>withKey(Component,\"enter\");export const withCaps=Component=>withKey(Component,\"CapsLock\");\nexport const __FramerMetadata__ = {\"exports\":{\"withM\":{\"type\":\"reactHoc\",\"name\":\"withM\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withE\":{\"type\":\"reactHoc\",\"name\":\"withE\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withC\":{\"type\":\"reactHoc\",\"name\":\"withC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with2\":{\"type\":\"reactHoc\",\"name\":\"with2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with8\":{\"type\":\"reactHoc\",\"name\":\"with8\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withY\":{\"type\":\"reactHoc\",\"name\":\"withY\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withDownArrow\":{\"type\":\"reactHoc\",\"name\":\"withDownArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPageSwipeLeft\":{\"type\":\"reactHoc\",\"name\":\"withPageSwipeLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withR\":{\"type\":\"reactHoc\",\"name\":\"withR\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRightArrow\":{\"type\":\"reactHoc\",\"name\":\"withRightArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with7\":{\"type\":\"reactHoc\",\"name\":\"with7\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withZ\":{\"type\":\"reactHoc\",\"name\":\"withZ\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCaps\":{\"type\":\"reactHoc\",\"name\":\"withCaps\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withV\":{\"type\":\"reactHoc\",\"name\":\"withV\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withL\":{\"type\":\"reactHoc\",\"name\":\"withL\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with4\":{\"type\":\"reactHoc\",\"name\":\"with4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withD\":{\"type\":\"reactHoc\",\"name\":\"withD\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withS\":{\"type\":\"reactHoc\",\"name\":\"withS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withT\":{\"type\":\"reactHoc\",\"name\":\"withT\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withJ\":{\"type\":\"reactHoc\",\"name\":\"withJ\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift\":{\"type\":\"reactHoc\",\"name\":\"withShift\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with9\":{\"type\":\"reactHoc\",\"name\":\"with9\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withF\":{\"type\":\"reactHoc\",\"name\":\"withF\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCtrl\":{\"type\":\"reactHoc\",\"name\":\"withCtrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withX\":{\"type\":\"reactHoc\",\"name\":\"withX\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withK\":{\"type\":\"reactHoc\",\"name\":\"withK\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withH\":{\"type\":\"reactHoc\",\"name\":\"withH\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withA\":{\"type\":\"reactHoc\",\"name\":\"withA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withG\":{\"type\":\"reactHoc\",\"name\":\"withG\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAlt\":{\"type\":\"reactHoc\",\"name\":\"withAlt\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withW\":{\"type\":\"reactHoc\",\"name\":\"withW\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with1\":{\"type\":\"reactHoc\",\"name\":\"with1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withI\":{\"type\":\"reactHoc\",\"name\":\"withI\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUpArrow\":{\"type\":\"reactHoc\",\"name\":\"withUpArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withB\":{\"type\":\"reactHoc\",\"name\":\"withB\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withO\":{\"type\":\"reactHoc\",\"name\":\"withO\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCmd\":{\"type\":\"reactHoc\",\"name\":\"withCmd\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with6\":{\"type\":\"reactHoc\",\"name\":\"with6\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withN\":{\"type\":\"reactHoc\",\"name\":\"withN\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withU\":{\"type\":\"reactHoc\",\"name\":\"withU\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withP\":{\"type\":\"reactHoc\",\"name\":\"withP\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withQ\":{\"type\":\"reactHoc\",\"name\":\"withQ\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with5\":{\"type\":\"reactHoc\",\"name\":\"with5\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPageSwipeRight\":{\"type\":\"reactHoc\",\"name\":\"withPageSwipeRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"with3\":{\"type\":\"reactHoc\",\"name\":\"with3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEnter\":{\"type\":\"reactHoc\",\"name\":\"withEnter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLeftArrow\":{\"type\":\"reactHoc\",\"name\":\"withLeftArrow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Teclas.map"],
  "mappings": "8DAAwF,SAASA,EAAQC,EAAUC,EAAI,CAAC,OAAOC,GAAO,CACtI,GAAK,CAACC,EAAQC,CAAU,EAAEC,EAAS,WAAW,EAAO,CAACC,EAAMC,CAAQ,EAAEF,EAAS,CAAC,EAC1EG,EAAaC,EAAO,IAAI,EACxBC,EAAcC,GAAO,CAAIA,EAAM,KAAKV,GACvCO,EAAa,SAAS,OAAOA,EAAa,QAAQ,OAAQ,YAAYA,EAAa,QAAQ,MAAM,CAAI,EAClGI,EAAYD,GAAO,CAAIA,EAAM,MAAMV,GAAKG,EAAW,WAAW,CAAG,EAAE,OAAAS,EAAU,KAAK,SAAS,iBAAiB,UAAUH,CAAa,EAAE,SAAS,iBAAiB,QAAQE,CAAW,EAAQ,IAAI,CAAC,SAAS,oBAAoB,UAAUF,CAAa,EAAE,SAAS,oBAAoB,QAAQE,CAAW,CAAE,GAAI,CAAC,CAAC,EAC/RE,EAAKd,EAAU,CAAC,GAAGE,EAAM,IAAIM,EAAa,QAAQL,EAAQ,MAAM,CAAC,UAAU,SAASG,KAAS,WAAW,0BAA0B,CAAC,CAAC,CAAE,CAAE,CAAooG,SAASS,EAAkBC,EAAU,CAAC,OAAOC,GAAO,CAAC,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", "key", "props", "variant", "setVariant", "ye", "scale", "setScale", "componentRef", "pe", "handleKeyDown", "event", "handleKeyUp", "ue", "p", "withPageSwipeLeft", "Component", "props", "componentRef", "pe", "ue", "handleTouchStart", "event", "startX", "handleTouchEnd", "p", "withPageSwipeRight", "withLeftArrow", "Component", "withKey", "withRightArrow"]
}
