{"version":3,"file":"LoadingScreen_1.dcuC1CWj.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/pzGfS5vHd3iOcCq76bXl/BicLq5s47grlScaxKESU/LoadingScreen_1.js"],"sourcesContent":["// Loading screen with text animation from bottom, stays for 2 seconds, then exits upward\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LoadingScreen(props){const{text=\"Loading...\",textColor=\"#000000\",backgroundColor=\"#FFFFFF\",font,animationDuration=.8,stayDuration=2,onComplete,showLogo=false,logoImage={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Logo\"},logoSize=48,logoSpacing=16}=props;const[phase,setPhase]=useState(\"entering\");const isStatic=useIsStaticRenderer();// Split text into words\nconst words=text.split(\" \");// Calculate total characters for timing\nconst totalCharacters=text.replace(/ /g,\"\").length;useEffect(()=>{if(isStatic)return;// Fix: If text is empty, skip animation and complete immediately\nif(!text||totalCharacters===0){startTransition(()=>setPhase(\"complete\"));onComplete?.();return;}const enterDuration=totalCharacters*150+animationDuration*1e3;const stayTimeout=setTimeout(()=>{startTransition(()=>setPhase(\"staying\"));},enterDuration);const exitTimeout=setTimeout(()=>{startTransition(()=>setPhase(\"exiting\"));},enterDuration+stayDuration*1e3);const completeTimeout=setTimeout(()=>{startTransition(()=>setPhase(\"complete\"));onComplete?.();},enterDuration+stayDuration*1e3+words.length*300+animationDuration*1e3);return()=>{clearTimeout(stayTimeout);clearTimeout(exitTimeout);clearTimeout(completeTimeout);};},[totalCharacters,words.length,animationDuration,stayDuration,onComplete,isStatic,text]);// Function to get font style for specific characters in AIRMAN\nconst getCharacterStyle=(word,charIndex)=>{const letterSpacing=props.letterSpacing||\"0.08em\";if(word===\"AIRMAN\"){// A should be bold italic, IR bold, M italic, A italic, N italic\n// R, M, A, N get -5px letter spacing\nif(charIndex===0)return{fontWeight:\"bold\",fontStyle:\"italic\",letterSpacing}// A\n;if(charIndex===1)return{fontWeight:\"bold\",fontStyle:\"normal\",letterSpacing}// I\n;if(charIndex===2)return{fontWeight:\"bold\",fontStyle:\"normal\",letterSpacing:\"-5px\"}// R\n;if(charIndex===3)return{fontWeight:\"normal\",fontStyle:\"italic\",letterSpacing:\"-5px\"}// M\n;if(charIndex===4)return{fontWeight:\"normal\",fontStyle:\"italic\",letterSpacing:\"-5px\"}// A\n;if(charIndex===5)return{fontWeight:\"normal\",fontStyle:\"italic\",letterSpacing:\"-5px\",paddingRight:16}// N\n;}return{fontWeight:\"normal\",fontStyle:\"normal\",letterSpacing};};if(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",color:textColor,...font},children:[showLogo&&/*#__PURE__*/_jsx(\"img\",{src:logoImage.src,alt:logoImage.alt,style:{width:logoSize,height:logoSize,marginRight:logoSpacing,objectFit:\"contain\"}}),words.map((word,wordIndex)=>/*#__PURE__*/_jsx(\"span\",{style:{marginRight:wordIndex<words.length-1?\"0.3em\":\"0\",color:textColor},children:word===\"AIRMAN\"?word.split(\"\").map((char,charIndex)=>/*#__PURE__*/_jsx(\"span\",{style:{...getCharacterStyle(word,charIndex),color:textColor},children:char},charIndex)):word},wordIndex))]})});}return /*#__PURE__*/_jsx(AnimatePresence,{children:phase!==\"complete\"&&/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",overflow:\"hidden\"},initial:{opacity:1},animate:{opacity:1},children:/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",flexWrap:\"wrap\",gap:\"0.3em\",width:\"100%\",maxWidth:480,minWidth:0,wordBreak:\"break-word\"},children:[showLogo&&/*#__PURE__*/_jsx(motion.img,{src:logoImage.src,alt:logoImage.alt,style:{width:logoSize,height:logoSize,marginRight:logoSpacing,objectFit:\"contain\"},initial:{y:\"100vh\",opacity:0,filter:\"blur(8px)\"},animate:phase===\"entering\"?{y:0,opacity:1,filter:\"blur(0px)\"}:phase===\"staying\"?{y:0,opacity:1,filter:\"blur(0px)\"}:{y:\"-100vh\",opacity:0,filter:\"blur(8px)\"},transition:{duration:animationDuration*1.2,delay:phase===\"entering\"?0:phase===\"exiting\"?0:0,ease:phase===\"exiting\"?[.55,.06,.68,.19]:[.25,.46,.45,.94]}}),words.map((word,wordIndex)=>{let characterOffset=0;for(let i=0;i<wordIndex;i++){characterOffset+=words[i].length;}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\"},children:phase===\"entering\"?// During entering: animate letters individually\nword.split(\"\").map((char,charIndex)=>/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\",color:textColor,...font,...getCharacterStyle(word,charIndex)},initial:{y:\"100vh\",opacity:0,filter:\"blur(8px)\"},animate:{y:0,opacity:1,filter:\"blur(0px)\"},transition:{duration:animationDuration*1.2,delay:(characterOffset+charIndex)*.15,ease:[.25,.46,.45,.94]},children:char},charIndex)):// During staying and exiting: show as complete word\n/*#__PURE__*/_jsx(motion.span,{style:{color:textColor,...font},initial:phase===\"staying\"?{y:0,opacity:1,filter:\"blur(0px)\"}:{y:0,opacity:1,filter:\"blur(0px)\"},animate:phase===\"staying\"?{y:0,opacity:1,filter:\"blur(0px)\"}:{y:\"-100vh\",opacity:0,filter:\"blur(8px)\"},transition:{duration:animationDuration*1.2,delay:phase===\"exiting\"?wordIndex*.3:0,ease:phase===\"exiting\"?[.55,.06,.68,.19]:[.25,.46,.45,.94]},children:word===\"AIRMAN\"?word.split(\"\").map((char,charIndex)=>/*#__PURE__*/_jsx(\"span\",{style:{...getCharacterStyle(word,charIndex),color:textColor},children:char},charIndex)):word})},wordIndex);})]})})});}addPropertyControls(LoadingScreen,{showLogo:{type:ControlType.Boolean,title:\"Show Logo\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},logoImage:{type:ControlType.ResponsiveImage,title:\"Logo Image\",hidden:({showLogo})=>!showLogo},logoSize:{type:ControlType.Number,title:\"Logo Size\",defaultValue:48,min:16,max:128,step:4,unit:\"px\",hidden:({showLogo})=>!showLogo},logoSpacing:{type:ControlType.Number,title:\"Logo Spacing\",defaultValue:16,min:0,max:48,step:2,unit:\"px\",hidden:({showLogo})=>!showLogo},text:{type:ControlType.String,title:\"Loading Text\",defaultValue:\"Loading...\",displayTextArea:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#FFFFFF\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"48px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\",displayFontSize:true},animationDuration:{type:ControlType.Number,title:\"Animation Speed\",defaultValue:.8,min:.1,max:2,step:.1,unit:\"s\"},stayDuration:{type:ControlType.Number,title:\"Stay Duration\",defaultValue:2,min:.5,max:10,step:.5,unit:\"s\"},letterSpacing:{type:ControlType.String,title:\"Letter Spacing\",defaultValue:\"0.08em\",placeholder:\"e.g. 0.08em\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LoadingScreen\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LoadingScreen_1.map"],"mappings":"+PAIG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,O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