{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/pN68XLsbqIaxjxLo9nM1/P9J8ByVyF7UdgQV0N2is/GlitchImg.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export function GlitchImg({img,backgroundSize,backgroundPositionX,backgroundPositionY}){const imageUrl=img instanceof File?URL.createObjectURL(img):img;useEffect(()=>{const styles=`\n            .glitch {\n                position: relative;\n                overflow: hidden;\n            }\n            .glitch__layers {\n                position: absolute;\n                z-index: 2;\n                left: 0;\n                right: 0;\n                top: 0;\n                bottom: 0;\n            }\n            .glitch__layer {\n                position: absolute;\n                left: 0;\n                right: 0;\n                top: 0;\n                bottom: 0;\n                background-repeat: no-repeat;\n            }\n            .glitch__layer:nth-child(1) {\n                transform: translateX(-5%);\n                animation: glitch-anim-1 2s infinite linear alternate;\n            }\n            .glitch__layer:nth-child(2) {\n                transform: translateX(3%) translateY(3%);\n                animation: glitch-anim-2 2.3s -.8s infinite linear alternate;\n            }\n            .glitch__layer:nth-child(3) {\n                transform: translateX(5%);\n                animation: glitch-anim-flash 1s infinite linear;\n            }\n            @keyframes glitch-anim-1 {\n                0% { clip-path: polygon(0 0%, 100% 0%, 100% 5%, 0 5%); }\n                100% { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); }\n            }\n            @keyframes glitch-anim-2 {\n                0% { clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%); }\n                100% { clip-path: polygon(0 11%, 100% 11%, 100% 15%, 0 15%); }\n            }\n            @keyframes glitch-anim-flash {\n                0% { opacity: .2; }\n                100% { opacity: 0; }\n            }\n        `;const styleSheet=document.createElement(\"style\");styleSheet.type=\"text/css\";styleSheet.innerText=styles;document.head.appendChild(styleSheet);},[]);return /*#__PURE__*/_jsxs(\"div\",{className:\"glitch\",children:[/*#__PURE__*/_jsx(\"img\",{src:imageUrl,alt:\"\",style:{opacity:1}}),/*#__PURE__*/_jsx(\"div\",{className:\"glitch__layers\",children:[...Array(3)].map((_,index)=>/*#__PURE__*/_jsx(\"div\",{className:\"glitch__layer\",style:{backgroundImage:`url(${imageUrl})`,backgroundSize:backgroundSize||\"cover\",backgroundPosition:`${backgroundPositionX||\"center\"} ${backgroundPositionY||\"center\"}`}},index))})]});}addPropertyControls(GlitchImg,{img:{type:ControlType.File,title:\"Image File\",allowedFileTypes:[\"jpg\",\"jpeg\",\"png\",\"gif\"]},backgroundSize:{type:ControlType.Enum,title:\"Background Size\",options:[\"cover\",\"contain\",\"auto\"],optionTitles:[\"Cover\",\"Contain\",\"Auto\"],defaultValue:\"cover\"},backgroundPositionX:{type:ControlType.Enum,title:\"Position X\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\"},backgroundPositionY:{type:ControlType.Enum,title:\"Position Y\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"center\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"GlitchImg\":{\"type\":\"reactComponent\",\"name\":\"GlitchImg\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlitchImg.map"],
  "mappings": "uGAGU,SAASA,EAAU,CAAC,IAAAC,EAAI,eAAAC,EAAe,oBAAAC,EAAoB,oBAAAC,CAAmB,EAAE,CAAC,IAAMC,EAASJ,aAAe,KAAK,IAAI,gBAAgBA,CAAG,EAAEA,EAAI,OAAAK,EAAU,IAAI,CAAC,IAAMC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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