{"version":3,"file":"Random_Count.DY2xrAYQ.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ss6gKSJc8PZHm0jynO9o/lvjRouZGTM2TWPlnPocP/Random_Count.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition,useRef}from\"react\";import{useInView}from\"framer-motion\";export const withFakeViewCount400=Component=>{return props=>{const[viewCount,setViewCount]=useState(400)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,413),420)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*500+1e3)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};export const withFakeViewCount5000=Component=>{return props=>{const[viewCount,setViewCount]=useState(5143)// Initial view count\n;const ref=useRef();const inView=useInView(ref);useEffect(()=>{if(!inView)return;const updateViewCount=()=>{startTransition(()=>setViewCount(prev=>{const change=Math.floor(Math.random()*3)-1// Randomly -1, 0, or +1\n    ;const newCount=prev+change;return Math.min(Math.max(newCount,5e3),5200)// Clamp to range 400–415\n    ;}));};const interval=setInterval(updateViewCount,Math.random()*100+500)// Update every 3-6 seconds\n;return()=>clearInterval(interval)// Cleanup on unmount\n;},[inView]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,text:viewCount.toString()});};};\nexport const __FramerMetadata__ = {\"exports\":{\"withFakeViewCount400\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount400\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFakeViewCount5000\":{\"type\":\"reactHoc\",\"name\":\"withFakeViewCount5000\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sour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