{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/ewmGpZ6VziilHKRKNutD/kNwQZlaNGINViHgsGFoE/Password_protection.js"],
  "sourcesContent": ["/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function PasswordProtectedScreen(props){// Skip rendering in Framer editor\nconst isFramerEditor=()=>{if(typeof window===\"undefined\")return false;// Check for Framer's editor environment\nif(window.FramerDesignTimeModeEnabled!==undefined)return true;if(window.Framer&&window.Framer.CurrentContext&&window.Framer.CurrentContext.isDesignTime)return true;if(window.document&&window.document.documentElement.hasAttribute(\"data-framer-preview-mode\"))return false;// Check URL patterns that indicate we're in editor\nconst url=window.location.href;return url.includes(\"framer.com\")&&(url.includes(\"/editor\")||url.includes(\"/projects\")||!url.includes(\"/preview\"));};// Don't render in editor mode\nif(isFramerEditor()){return null;}const{password,hint,overlayType=\"color\",overlayColor=\"#ffffff\",overlayImage,inputBackground=\"#ffffff\",inputTextColor=\"#000000\",inputBorderColor=\"#dddddd\",buttonBackground=\"#000000\",buttonTextColor=\"#ffffff\",errorTextColor=\"#ff0000\"}=props;const[inputValue,setInputValue]=useState(\"\");const[isAuthenticated,setIsAuthenticated]=useState(false);const[error,setError]=useState(\"\");const handlePasswordSubmit=useCallback(()=>{if(inputValue===password){setIsAuthenticated(true);}else{setError(\"Incorrect password. Please try again.\");setInputValue(\"\");}},[inputValue,password]);const handleKeyPress=useCallback(e=>{if(e.key===\"Enter\")handlePasswordSubmit();},[handlePasswordSubmit]);const getOverlayStyle=()=>{return overlayType===\"image\"&&overlayImage?{backgroundImage:`url(${overlayImage})`,backgroundSize:\"cover\"}:{backgroundColor:overlayColor};};// Completely hide everything after authentication\nif(isAuthenticated)return null;return /*#__PURE__*/_jsx(motion.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.3},style:{position:\"fixed\",top:0,left:0,right:0,bottom:0,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:\"20px\",zIndex:9999,...getOverlayStyle()},children:/*#__PURE__*/_jsxs(motion.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.1},style:{maxWidth:\"400px\",width:\"100%\",textAlign:\"center\",backgroundColor:overlayType===\"image\"?\"rgba(255,255,255,0.8)\":\"transparent\",padding:\"32px\",borderRadius:\"16px\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{marginBottom:\"8px\",color:overlayType===\"image\"?\"#000000\":\"inherit\"},children:\"Enter Password\"}),hint&&/*#__PURE__*/_jsxs(\"p\",{style:{opacity:.7,marginBottom:\"24px\",color:overlayType===\"image\"?\"#000000\":\"inherit\"},children:[\"Hint: \",hint]}),/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:inputValue,onChange:e=>setInputValue(e.target.value),onKeyPress:handleKeyPress,style:{padding:\"12px 16px\",borderRadius:\"8px\",border:`1px solid ${inputBorderColor}`,fontSize:\"16px\",width:\"100%\",marginBottom:\"16px\",backgroundColor:inputBackground,color:inputTextColor},placeholder:\"Enter password\",autoFocus:true}),error&&/*#__PURE__*/_jsx(motion.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},style:{color:errorTextColor,margin:\"8px 0 16px\"},children:error}),/*#__PURE__*/_jsx(motion.button,{whileHover:{scale:1.03},whileTap:{scale:.98},onClick:handlePasswordSubmit,style:{padding:\"12px 24px\",borderRadius:\"8px\",border:\"none\",backgroundColor:buttonBackground,color:buttonTextColor,fontSize:\"16px\",cursor:\"pointer\",width:\"100%\",fontWeight:\"500\"},children:\"Continue\"})]})});}PasswordProtectedScreen.defaultProps={password:\"secret123\",hint:\"\",overlayType:\"color\",overlayColor:\"#ffffff\",inputBackground:\"#ffffff\",inputTextColor:\"#000000\",inputBorderColor:\"#dddddd\",buttonBackground:\"#000000\",buttonTextColor:\"#ffffff\",errorTextColor:\"#ff0000\"};addPropertyControls(PasswordProtectedScreen,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"secret123\"},hint:{type:ControlType.String,title:\"Hint\",defaultValue:\"\"},overlayType:{type:ControlType.Enum,title:\"Overlay Type\",options:[\"color\",\"image\"],optionTitles:[\"Color\",\"Image\"],defaultValue:\"color\"},overlayColor:{type:ControlType.Color,title:\"Overlay Color\",defaultValue:\"#ffffff\",hidden:props=>props.overlayType!==\"color\"},overlayImage:{type:ControlType.Image,title:\"Overlay Image\",hidden:props=>props.overlayType!==\"image\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordProtectedScreen\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Password_protection.map"],
  "mappings": "4MAAAA,IAGyM,SAARC,EAAyCC,EAAM,CAIhP,IAHqB,IAAI,CAAC,GAAG,OAAO,OAAS,IAAY,MAAO,GACF,GAA3D,OAAO,8BAA8B,QAAyB,OAAO,QAAQ,OAAO,OAAO,gBAAgB,OAAO,OAAO,eAAe,aAAa,MAAO,GAAK,GAAG,OAAO,UAAU,OAAO,SAAS,gBAAgB,aAAa,0BAA0B,EAAE,MAAO,GACxQ,IAAMC,EAAI,OAAO,SAAS,KAAK,OAAOA,EAAI,SAAS,YAAY,IAAIA,EAAI,SAAS,SAAS,GAAGA,EAAI,SAAS,WAAW,GAAG,CAACA,EAAI,SAAS,UAAU,EAAG,GAChI,EAAG,OAAO,KAAM,GAAK,CAAC,SAAAC,EAAS,KAAAC,EAAK,YAAAC,EAAY,QAAQ,aAAAC,EAAa,UAAU,aAAAC,EAAa,gBAAAC,EAAgB,UAAU,eAAAC,EAAe,UAAU,iBAAAC,EAAiB,UAAU,iBAAAC,EAAiB,UAAU,gBAAAC,EAAgB,UAAU,eAAAC,EAAe,SAAS,EAAEZ,EAAW,CAACa,EAAWC,CAAa,EA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E,aAAa,CAAC,QAAQ,OAAO,EAAE,aAAa,OAAO,EAAE,aAAa,CAAC,KAAKA,EAAY,MAAM,MAAM,gBAAgB,aAAa,UAAU,OAAO3B,GAAOA,EAAM,cAAc,OAAO,EAAE,aAAa,CAAC,KAAK2B,EAAY,MAAM,MAAM,gBAAgB,OAAO3B,GAAOA,EAAM,cAAc,OAAO,CAAC,CAAC",
  "names": ["init_ssg_sandbox_shims", "PasswordProtectedScreen", "props", "url", "password", "hint", "overlayType", "overlayColor", "overlayImage", "inputBackground", "inputTextColor", "inputBorderColor", "buttonBackground", "buttonTextColor", "errorTextColor", "inputValue", "setInputValue", "ye", "isAuthenticated", "setIsAuthenticated", "error", "setError", "handlePasswordSubmit", "te", "handleKeyPress", "getOverlayStyle", "p", "motion", "addPropertyControls", "ControlType"]
}
