{"version":3,"file":"Preloader.B2ccUc-D.mjs","names":["React.useState","React.Fragment"],"sources":["https:/framerusercontent.com/modules/gzWMWOz9U65xfaCM7dzF/9MHZfY1mwUjQTvcZWDQO/Preloader.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";export function PreLoader(props){const{duration,backgroundColor,exitAnimation,exitSpeed,connectedFrame}=props;const[isLoading,setIsLoading]=React.useState(true)// Initial loading state\n;const[isVisible,setIsVisible]=React.useState(false)// Initially hidden\n;React.useEffect(()=>{const preloaderShown=localStorage.getItem(\"preloaderShown\");if(preloaderShown){setIsLoading(false)// Stop loading, stay hidden\n;}else{setIsVisible(true)// Show preloader\n;setIsLoading(false)// Done checking localStorage\n;const timer=setTimeout(()=>{setIsVisible(false);},duration*1e3)// Convert seconds to milliseconds\n;return()=>clearTimeout(timer)// Cleanup timer\n;}},[duration]);React.useEffect(()=>{if(!isLoading&&!isVisible){localStorage.setItem(\"preloaderShown\",\"true\");}},[isLoading,isVisible]);// Exit variants including Swipe Up Round and Swipe Down Round\nconst exitVariants={fadeOut:{opacity:0,transition:{duration:exitSpeed}},swipeUp:{y:\"-100vh\",transition:{duration:exitSpeed}},scaleDown:{scale:0,transition:{duration:exitSpeed}},slideLeft:{x:\"-100vw\",transition:{duration:exitSpeed}},slideRight:{x:\"100vw\",transition:{duration:exitSpeed}},rotateOut:{rotate:90,opacity:0,transition:{duration:exitSpeed}},swipeUpRound:{y:\"-100vh\",borderBottomLeftRadius:\"50%\",borderBottomRightRadius:\"50%\",transition:{duration:exitSpeed}},swipeDownRound:{y:\"100vh\",borderTopLeftRadius:\"50%\",borderTopRightRadius:\"50%\",transition:{duration:exitSpeed}}};// Container style for centering content, including connectedFrame\nconst containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",height:\"100%\",position:\"absolute\",top:\"0\",left:\"0\"};return /*#__PURE__*/_jsx(AnimatePresence,{children:!isLoading&&isVisible&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:1},exit:exitVariants[exitAnimation],style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",backgroundColor:backgroundColor,zIndex:9999},children:/*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:connectedFrame?.length>0&&connectedFrame.map((frame,index)=>/*#__PURE__*/_jsx(React.Fragment,{children:frame},index))})})});}addPropertyControls(PreLoader,{duration:{type:ControlType.Number,title:\"Duration\",defaultValue:3,min:1,max:10,unit:\"s\",step:.1,displayStepper:true},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},exitAnimation:{type:ControlType.Enum,title:\"Exit Animation\",options:[\"fadeOut\",\"swipeUp\",\"scaleDown\",\"slideLeft\",\"slideRight\",\"rotateOut\",\"swipeUpRound\",\"swipeDownRound\"],optionTitles:[\"Fade Out\",\"Swipe Up\",\"Scale Down\",\"Slide Left\",\"Slide Right\",\"Rotate Out\",\"Swipe Up Round\",\"Swipe Down Round\"],defaultValue:\"fadeOut\"},exitSpeed:{type:ControlType.Number,title:\"Exit Speed\",defaultValue:.5,min:.1,max:2,unit:\"s\",step:.1,displayStepper:true},connectedFrame:{type:ControlType.Array,title:\"Connect Frame\",propertyControl:{type:ControlType.ComponentInstance}}});\nexport const __FramerMetadata__ = {\"exports\":{\"PreLoader\":{\"type\":\"reactComponent\",\"name\":\"PreLoader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Preloader.map"],"mappings":"iPAA6K,SAAgB,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,kBAAgB,gBAAc,YAAU,kBAAgB,EAAW,CAAC,EAAU,GAAcA,EAAe,EAAI,EACtU,CAAC,EAAU,GAAcA,EAAe,EAAK,EAClD,MAAoB,CAA6D,GAAvC,aAAa,QAAQ,gBAAkC,EAAG,EAA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