{"version":3,"file":"DotLottie.CkJsX2dE.mjs","names":["_jsx","useRef","useState","useEffect","React.useState","React.useEffect","__toESM","__esmMin","ce","init_npm_react_18_3_1","init_jsx_runtime","c","de","_e","addPropertyControls","RenderTarget","ControlType","init_framer_BWzg2IRg","DotLottie","props","OptimizationFriendly","LottiePlayer","isCanvas","lottieInstanceRef","shouldPlay","src","placeholderUrl","isReady","setIsReady","lastVariant","loading","loaded","isLoading","setLoading","m","init_DotLottie"],"sources":["https:/framerusercontent.com/modules/jfK7C7JmdHGaVBsvt1V7/G0lF2a2mezep3QZSQZwm/DotLottie.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useRef,useState}from\"react\";const placeholderUrl=\"https://lottie.host/d826e0a7-b7e8-4072-8afe-c943ed2dd2ca/DpX3m5yT5Z.lottie\";/**\n * DOT LOTTIE\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */ export default function DotLottie(props){return /*#__PURE__*/ _jsx(OptimizationFriendly,{loading:/*#__PURE__*/ _jsx(\"div\",{}),loaded:/*#__PURE__*/ _jsx(LottiePlayer,{...props})});};function LottiePlayer(props){/* Checks */ const isCanvas=RenderTarget.current()===RenderTarget.canvas;const lottieInstanceRef=useRef(null);const shouldPlay=isCanvas||props.hover===true||props.autoplay===false?null:true;/* File or URL */ let src;switch(props.srcType){case\"url\":src=props.srcUrl;break;case\"file\":src=props.srcFile;break;default:src=placeholderUrl;break;}/* Progress */ const[isReady,setIsReady]=useState(false);/* For canvas states */ useEffect(()=>{if(!lottieInstanceRef.current)return;lottieInstanceRef.current.addEventListener(\"ready\",()=>setIsReady(true));},[]);useEffect(()=>{if(!lottieInstanceRef.current)return;lottieInstanceRef.current.seek(`${props.progress}%`);},[isReady,props.progress]);const lastVariant=useRef();/* For component variant support */ useEffect(()=>{if(isCanvas)return;if(lastVariant.current!==props.autoplay){if(!lottieInstanceRef.current)return;if(props.autoplay===true){lottieInstanceRef.current.play();}if(props.autoplay===false){lottieInstanceRef.current.pause();}}lastVariant.current=props.autoplay;},[props.autoplay]);return(// @ts-ignore\n/*#__PURE__*/ _jsx(\"dotlottie-player\",{src:src,ref:lottieInstanceRef,autoplay:shouldPlay,loop:props.loop?true:null,hover:props.hover?true:null,controls:props.controls?true:null,background:props.background?props.background:null,speed:props.speed,direction:props.direction,style:{...props.style,width:\"100%\",height:\"100%\"}},src));}DotLottie.defaultProps={srcUrl:placeholderUrl,autoplay:true,background:\"#05F\",controls:false,direction:1,hover:false,loop:true,speed:1};DotLottie.displayName=\"Dot Lottie\";addPropertyControls(DotLottie,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[\"url\",\"file\"],optionTitles:[\"URL\",\"File\"]},srcUrl:{type:ControlType.String,title:\"Link\",placeholder:\"../example.lottie\",hidden:props=>props.srcType===\"file\"},srcFile:{type:ControlType.File,title:\"File\",allowedFileTypes:[\"lottie\",\"json\"],hidden:props=>props.srcType===\"url\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true},background:{type:ControlType.Color,title:\"Backdrop\",defaultValue:\"#05F\"},controls:{type:ControlType.Boolean,title:\"Controls\"},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"1\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",options:[\"1\",\"-1\"],optionTitles:[\"Normal\",\"Reverse\"]},hover:{type:ControlType.Boolean,title:\"Hover Play\"},loop:{type:ControlType.Boolean,title:\"Loop\"},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:1,min:1,max:10,unit:\"x\",step:.5,displayStepper:true},progress:{type:ControlType.Number,title:\"Progress\",defaultValue:0,min:0,max:100,step:1,description:\"This component is made for Lottie files. [Learn more here](https://dotlottie.io/).\"}});/* For SSG */ function OptimizationFriendly({loading,loaded}){const[isLoading,setLoading]=React.useState(true);// We can't load web-components in ssg on the server,\n// so we defer rendering until we hit the client.\nReact.useEffect(()=>{import(\"https://unpkg.com/@dotlottie/player-component@1.3.2/dist/dotlottie-player.js\").then(()=>{setLoading(false);});},[]);return isLoading?loading:loaded;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DotLottie\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DotLottie.map"],"mappings":"A,uMASI,SAAwBkB,EAAUC,EAAM,CAAC,MAAqBnB,gBAAKoB,EAAqB,CAAC,QAAsBpB,gBAAK,MAAM,CAAC,CAAC,EAAE,OAAqBA,gBAAKqB,EAAa,CAAC,GAAGF,CAAK,CAAC,CAAC,CAAC,CAAE,CAAE,SAASE,EAAaF,EAAM,CAAc,IAAMG,EAASP,EAAa,QAAQ,IAAIA,EAAa,OAAaQ,EAAkBtB,EAAO,IAAI,EAAQuB,EAAWF,GAAUH,EAAM,QAAQ,IAAMA,EAAM,WAAW,GAAM,KAAK,GAA2BM,EAAI,OAAON,EAAM,QAAb,CAAsB,IAAI,MAAMM,EAAIN,EAAM,OAAO,MAAM,IAAI,OAAOM,EAAIN,EAAM,QAAQ,MAAM,QAAQM,EAAIC,CAAqB,CAAgB,GAAK,CAACC,EAAQC,GAAY1B,EAAS,EAAK,EAA0BC,MAAc,CAAKoB,EAAkB,SAAeA,EAAkB,QAAQ,iBAAiB,YAAYK,EAAW,EAAI,CAAC,CAAE,EAAE,CAAC,CAAC,EAAEzB,MAAc,CAAKoB,EAAkB,SAAeA,EAAkB,QAAQ,KAAK,GAAGJ,EAAM,SAAS,EAAE,CAAE,EAAE,CA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