{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/1CE8ldgRkfciGRQ9YcDL/2NXiTG0gxdqZ8mqyEH72/Counter_1_3.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React,{useState,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";const NumberCounterStyles={display:\"flex\",justifyContent:\"left\",alignItems:\"center\"};export function UncodeCounter(props){const{startNumber,endNumber,speed,loop,loopPause,decimalSeparator,fontSize,font,fontColor,alignItems,hoverScale,prefix,suffix}=props;const[count,setCount]=useState(startNumber);const[isVisible,setIsVisible]=useState(false);const[isPaused,setIsPaused]=useState(false)// Novo estado para controle de pausa\n;const ref=React.useRef(null);useEffect(()=>{const observer=new IntersectionObserver(entries=>{const entry=entries[0];setIsVisible(entry.isIntersecting);});if(ref.current){observer.observe(ref.current);}return()=>{if(ref.current){observer.unobserve(ref.current);}};},[]);useEffect(()=>{if(isVisible&&startNumber!==endNumber){let intervalId;if(!isPaused){intervalId=setInterval(()=>{if(count<endNumber){setCount(prevCount=>prevCount+1);}else if(loop){setIsPaused(true)// Pausar o loop\n;setTimeout(()=>{setIsPaused(false)// Retomar ap\u00F3s o tempo de pausa\n;setCount(startNumber);},loopPause)// Pausa antes de reiniciar o loop\n;}},speed);}return()=>{clearInterval(intervalId);};}},[count,startNumber,endNumber,loop,isVisible,isPaused,loopPause]);const formatCount=number=>{if(decimalSeparator===\"comma\"){return number.toLocaleString(\"en-US\");}else if(decimalSeparator===\"period\"){return number.toLocaleString(\"en-US\").replace(/,/g,\".\");}else{return number.toFixed(0);}};return /*#__PURE__*/_jsxs(motion.div,{ref:ref,style:{...NumberCounterStyles,alignItems:alignItems,fontSize:`${fontSize}px`,fontFamily:font.fontFamily,fontWeight:font.fontWeight,color:fontColor},whileHover:{scale:hoverScale},children:[/*#__PURE__*/_jsx(\"span\",{style:{marginRight:`${prefix.gap}px`,color:prefix.color,fontSize:`${prefix.fontSize}px`,alignSelf:prefix.alignSelf,fontWeight:prefix.fontWeight},children:prefix.text}),/*#__PURE__*/_jsx(\"span\",{children:formatCount(count)}),/*#__PURE__*/_jsx(\"span\",{style:{marginLeft:`${suffix.gap}px`,color:suffix.color,fontSize:`${suffix.fontSize}px`,alignSelf:suffix.alignSelf,fontWeight:suffix.fontWeight},children:suffix.text})]});}UncodeCounter.defaultProps={startNumber:0,endNumber:10,speed:100,loop:false,loopPause:1e3,decimalSeparator:\"comma\",fontSize:16,font:{fontFamily:\"Arial\",fontWeight:400,systemFont:true},fontColor:\"#707070\",alignItems:\"center\",hoverScale:1,// Configura\u00E7\u00F5es padr\u00F5es de prefixo e sufixo\nprefix:{text:\"+\",color:\"#000000\",fontSize:18,alignSelf:\"center\",gap:8,fontWeight:\"normal\"},suffix:{text:\"-\",color:\"#000000\",fontSize:18,alignSelf:\"center\",gap:8,fontWeight:\"normal\"}};addPropertyControls(UncodeCounter,{startNumber:{type:ControlType.Number,title:\"Start Number / N\\xfamero Inicial\",defaultValue:0,displayStepper:true,description:\"The starting number of the counter / O n\\xfamero inicial do contador\"},endNumber:{type:ControlType.Number,title:\"End Number / N\\xfamero Final\",defaultValue:10,displayStepper:true,description:\"The ending number of the counter / O n\\xfamero final do contador\"},speed:{type:ControlType.Number,title:\"Speed (ms) / Velocidade (ms)\",defaultValue:100,min:0,max:1e3,step:10,description:\"Speed of the counter in milliseconds / Velocidade do contador em milissegundos\"},loop:{type:ControlType.Boolean,title:\"Loop Animation / Anima\\xe7\\xe3o em Loop\",defaultValue:false,enabledTitle:\"On / Ligado\",disabledTitle:\"Off / Desligado\",description:\"Whether the counter loops when it reaches the end / Se o contador deve repetir ao final\"},loopPause:{type:ControlType.Number,title:\"Loop Pause (ms) / Pausa no Loop (ms)\",defaultValue:1e3,min:100,max:1e4,step:100,description:\"Pause duration before the counter restarts when looping / Dura\\xe7\\xe3o da pausa antes de reiniciar o loop\"},// Configura\u00E7\u00F5es de Prefixo e Sufixo agrupadas\nprefix:{type:ControlType.Object,title:\"Prefix / Prefixo\",controls:{text:{type:ControlType.String,title:\"Text / Texto\",defaultValue:\"+\",description:\"Text displayed before the number / Texto exibido antes do n\\xfamero\"},color:{type:ControlType.Color,title:\"Color / Cor\",defaultValue:\"#000000\",description:\"Choose the color of the prefix / Escolha a cor do prefixo\"},fontSize:{type:ControlType.Number,title:\"Font Size / Tamanho da Fonte\",min:8,max:200,step:1,defaultValue:18,description:\"Adjust the size of the prefix font / Ajuste o tamanho da fonte do prefixo\"},alignSelf:{type:ControlType.Enum,title:\"Align / Alinhamento\",defaultValue:\"center\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Top / Superior\",\"Center / Centro\",\"Bottom / Inferior\"],description:\"Align the prefix relative to the counter / Alinhe o prefixo em rela\\xe7\\xe3o ao contador\"},fontWeight:{type:ControlType.Enum,title:\"Font Weight / Peso da Fonte\",defaultValue:\"normal\",options:[\"normal\",\"bold\",\"lighter\",\"bolder\"],optionTitles:[\"Normal\",\"Bold\",\"Lighter\",\"Bolder\"],description:\"Adjust the font weight of the prefix / Ajuste o peso da fonte do prefixo\"},gap:{type:ControlType.Number,title:\"Gap / Espa\\xe7o\",defaultValue:8,min:0,description:\"Set the space between the prefix and the number / Defina o espa\\xe7o entre o prefixo e o n\\xfamero\"}}},suffix:{type:ControlType.Object,title:\"Suffix / Sufixo\",controls:{text:{type:ControlType.String,title:\"Text / Texto\",defaultValue:\"-\",description:\"Text displayed after the number / Texto exibido ap\\xf3s o n\\xfamero\"},color:{type:ControlType.Color,title:\"Color / Cor\",defaultValue:\"#000000\",description:\"Choose the color of the suffix / Escolha a cor do sufixo\"},fontSize:{type:ControlType.Number,title:\"Font Size / Tamanho da Fonte\",min:8,max:200,step:1,defaultValue:18,description:\"Adjust the size of the suffix font / Ajuste o tamanho da fonte do sufixo\"},alignSelf:{type:ControlType.Enum,title:\"Align / Alinhamento\",defaultValue:\"center\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Top / Superior\",\"Center / Centro\",\"Bottom / Inferior\"],description:\"Align the suffix relative to the counter / Alinhe o sufixo em rela\\xe7\\xe3o ao contador\"},fontWeight:{type:ControlType.Enum,title:\"Font Weight / Peso da Fonte\",defaultValue:\"normal\",options:[\"normal\",\"bold\",\"lighter\",\"bolder\"],optionTitles:[\"Normal\",\"Bold\",\"Lighter\",\"Bolder\"],description:\"Adjust the font weight of the suffix / Ajuste o peso da fonte do sufixo\"},gap:{type:ControlType.Number,title:\"Gap / Espa\\xe7o\",defaultValue:8,min:0,description:\"Set the space between the suffix and the number / Defina o espa\\xe7o entre o sufixo e o n\\xfamero\"}}},// Configura\u00E7\u00F5es adicionais\ndecimalSeparator:{type:ControlType.Enum,title:\"Decimal Separator / Separador Decimal\",defaultValue:\"comma\",options:[\"comma\",\"period\",\"none\"],optionTitles:[\"Comma (1,000) / V\\xedrgula (1,000)\",\"Period (1.000) / Ponto (1.000)\",\"None / Nenhum\"],description:\"Choose how decimals are displayed / Escolha como os decimais s\\xe3o exibidos\"},font:{title:\"Font / Fonte\",type:ControlType.Font,defaultValue:{fontFamily:\"Arial\",fontWeight:400,systemFont:true},description:\"Choose the font family and weight / Escolha a fam\\xedlia e o peso da fonte\"},fontSize:{title:\"Font Size / Tamanho da Fonte\",type:ControlType.Number,min:8,max:200,step:1,description:\"Adjust the size of the font / Ajuste o tamanho da fonte\"},fontColor:{type:ControlType.Color,title:\"Font Color / Cor da Fonte\",defaultValue:\"#707070\",description:\"Select the font color / Escolha a cor da fonte\"},alignItems:{type:ControlType.Enum,title:\"Align Items / Alinhamento dos Itens\",defaultValue:\"center\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Top / Superior\",\"Center / Centro\",\"Bottom / Inferior\"],description:\"Set the alignment of the counter / Defina o alinhamento do contador\"},codeBy:{type:ControlType.String,title:\" \",placeholder:\"Autor:\",readOnly:true,description:\"Este componente foi criado por UncodeStack e @omatusaelhorch.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"UncodeCounter\":{\"type\":\"reactComponent\",\"name\":\"UncodeCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Counter_1_3.map"],
  "mappings": "0FAA4L,IAAMA,EAAoB,CAAC,QAAQ,OAAO,eAAe,OAAO,WAAW,QAAQ,EAAS,SAASC,EAAcC,EAAM,CAAC,GAAK,CAAC,YAAAC,EAAY,UAAAC,EAAU,MAAAC,EAAM,KAAAC,EAAK,UAAAC,EAAU,iBAAAC,EAAiB,SAAAC,EAAS,KAAAC,EAAK,UAAAC,EAAU,WAAAC,EAAW,WAAAC,EAAW,OAAAC,EAAO,OAAAC,CAAM,EAAEb,EAAW,CAACc,EAAMC,CAAQ,EAAEC,EAASf,CAAW,EAAO,CAACgB,EAAUC,CAAY,EAAEF,EAAS,EAAK,EAAO,CAACG,EAASC,CAAW,EAAEJ,EAAS,EAAK,EACxjBK,EAAIC,EAAM,OAAO,IAAI,EAAEC,EAAU,IAAI,CAAC,IAAMC,EAAS,IAAI,qBAAqBC,GAAS,CAAC,IAAMC,EAAMD,EAAQ,CAAC,EAAEP,EAAaQ,EAAM,cAAc,CAAE,CAAC,EAAE,OAAGL,EAAI,SAASG,EAAS,QAAQH,EAAI,OAAO,EAAS,IAAI,CAAIA,EAAI,SAASG,EAAS,UAAUH,EAAI,OAAO,CAAG,CAAE,EAAE,CAAC,CAAC,EAAEE,EAAU,IAAI,CAAC,GAAGN,GAAWhB,IAAcC,EAAU,CAAC,IAAIyB,EAAW,OAAIR,IAAUQ,EAAW,YAAY,IAAI,CAAIb,EAAMZ,EAAWa,EAASa,GAAWA,EAAU,CAAC,EAAWxB,IAAMgB,EAAY,EAAI,EACjd,WAAW,IAAI,CAACA,EAAY,EAAK,EACjCL,EAASd,CAAW,CAAE,EAAEI,CAAS,EAChC,EAAEF,CAAK,GAAS,IAAI,CAAC,cAAcwB,CAAU,CAAE,CA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,IAAI,KAAK,EAAE,YAAY,yDAAyD,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,MAAM,4BAA4B,aAAa,UAAU,YAAY,gDAAgD,EAAE,WAAW,CAAC,KAAKA,EAAY,KAAK,MAAM,sCAAsC,aAAa,SAAS,QAAQ,CAAC,aAAa,SAAS,UAAU,EAAE,aAAa,CAAC,iBAAiB,kBAAkB,mBAAmB,EAAE,YAAY,qEAAqE,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,IAAI,YAAY,SAAS,SAAS,GAAK,YAAY,+DAA+D,CAAC,CAAC",
  "names": ["NumberCounterStyles", "UncodeCounter", "props", "startNumber", "endNumber", "speed", "loop", "loopPause", "decimalSeparator", "fontSize", "font", "fontColor", "alignItems", "hoverScale", "prefix", "suffix", "count", "setCount", "ye", "isVisible", "setIsVisible", "isPaused", "setIsPaused", "ref", "e", "ue", "observer", "entries", "entry", "intervalId", "prevCount", "formatCount", "number", "u", "motion", "p", "addPropertyControls", "ControlType"]
}
