{"version":3,"file":"shared-lib.Cv93elaI.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/FuQkxgInZ90tIgrC8xhk/GLimo8FdQJltfk9wes74/FlickerText.js","https:/framerusercontent.com/modules/p12wAXjXX5gldIhGaH3l/CI2GE92ksRCEnct3cVUS/siteMetadata.js"],"sourcesContent":["// Interactive text flicker animation effect with fill/stroke transitions and neon aesthetic\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useRef,useMemo}from\"react\";import{motion,useInView}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Text Flicker Animation\n *\n * Interactive text animation with flickering fill/stroke transitions and neon effects.\n * Each character animates individually with customizable timing and patterns.\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function FlickerText(props){const{text=\"FLICKER TEXT\",textColor=\"#FFFFFF\",backgroundColor=\"#000000\",font,animationSpeed=1,animationPattern=\"sequential\",repeatBehavior=\"loop\",showBackground=true,autoPlay=true}=props;const[isPlaying,setIsPlaying]=useState(autoPlay);const[animationKey,setAnimationKey]=useState(0);const containerRef=useRef(null);const isInView=useInView(containerRef,{once:false});const isStatic=useIsStaticRenderer();// Split text into characters for individual animation\nconst characters=useMemo(()=>{return text.split(\"\").map((char,index)=>({char:char===\" \"?\"\\xa0\":char,index,id:`${char}-${index}`}));},[text]);// Animation timing calculations\nconst baseDelay=.1/animationSpeed;const flickerDuration=.3/animationSpeed;const totalDuration=characters.length*baseDelay+flickerDuration;// Generate animation delays based on pattern\nconst getAnimationDelay=index=>{switch(animationPattern){case\"sequential\":return index*baseDelay;case\"random\":return Math.random()*(totalDuration*.7);case\"sync\":return 0;default:return index*baseDelay;}};// Character animation variants\nconst characterVariants={initial:{opacity:1,color:textColor},flicker:index=>({opacity:[1,0,1,0,1,0,1],transition:{duration:flickerDuration,delay:getAnimationDelay(index),ease:\"easeInOut\",repeat:repeatBehavior===\"loop\"?Infinity:0,repeatDelay:repeatBehavior===\"loop\"?totalDuration:0}})};const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:showBackground?backgroundColor:\"transparent\",overflow:\"hidden\",...isFixedWidth?{}:{minWidth:\"max-content\"},...isFixedHeight?{}:{minHeight:\"max-content\"},padding:\"0\"},children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",justifyContent:\"center\",alignItems:\"center\",gap:\"0\",...font},children:characters.map((character,index)=>/*#__PURE__*/_jsx(motion.span,{custom:index,variants:characterVariants,initial:\"initial\",animate:isPlaying&&!isStatic?\"flicker\":\"initial\",style:{display:\"inline-block\",fontSize:\"inherit\",fontWeight:\"inherit\",fontFamily:\"inherit\",lineHeight:\"inherit\",letterSpacing:\"inherit\",whiteSpace:\"pre\"},children:character.char},`${character.id}-${animationKey}`))})});}addPropertyControls(FlickerText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"FLICKER TEXT\",displayTextArea:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"48px\",variant:\"Bold\",letterSpacing:\"0.05em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},animationSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:.1,max:5,step:.1,unit:\"x\"},animationPattern:{type:ControlType.Enum,title:\"Pattern\",options:[\"sequential\",\"random\",\"sync\"],optionTitles:[\"Sequential\",\"Random\",\"Sync\"],defaultValue:\"sequential\",displaySegmentedControl:true},repeatBehavior:{type:ControlType.Enum,title:\"Repeat\",options:[\"once\",\"loop\",\"trigger\"],optionTitles:[\"Once\",\"Loop\",\"Trigger\"],defaultValue:\"loop\",displaySegmentedControl:true},showBackground:{type:ControlType.Boolean,title:\"Background\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},autoPlay:{type:ControlType.Boolean,title:\"Auto Play\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FlickerText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"600\",\"framerIntrinsicHeight\":\"200\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FlickerText.map","// Generated by Framer (747ab96)\nexport default function metadata(params,activeLocale){return{description:\"An interactive archive exploring the world’s obsession with matcha, reframed as a controlled commodity moving through an underground system.\",favicon:\"https://framerusercontent.com/assets/ervhDVvkqsShieU3sElsNu1wxtE.jpg\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/Q4awC1x2dQ1lfqkli5cYQyBA0h0.jpg\",title:\"Matcha Cartel\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"mPAYG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,eAAe,YAAU,UAAU,kBAAgB,UAAU,OAAK,iBAAe,EAAE,mBAAiB,aAAa,iBAAe,OAAO,iBAAe,GAAK,WAAS,IAAM,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAS,CAAM,CAAC,EAAa,GAAiBA,EAAS,EAA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