{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/EAxGbSyDhOleOMfXo5bn/iEbbWrD5hrC3SvrhamMj/Password.js"],
  "sourcesContent": ["/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function PasswordGate(props){const{children,password=\"secret123\",// overlay / modal\noverlayType=\"color\",overlayColor=\"#ffffff\",overlayImage,modalBackground=\"#ffffff\",modalWidth=400,modalPadding=32,modalBorderRadius=16,// copy / styles\ntitleText=\"Enter Password\",titleColor=\"#000000\",inputBackground=\"#ffffff\",inputTextColor=\"#000000\",inputBorderColor=\"#dddddd\",inputBorderRadius=8,buttonBackground=\"#000000\",buttonTextColor=\"#ffffff\",buttonText=\"Continue\",buttonBorderRadius=8,errorTextColor=\"#ff0000\"}=props;const[inputValue,setInputValue]=useState(\"\");const[isUnlocked,setIsUnlocked]=useState(false);const[error,setError]=useState(\"\");/* ---------- helpers ---------- */const getOverlayStyle=()=>overlayType===\"image\"&&overlayImage?{backgroundImage:`url(${overlayImage})`,backgroundSize:\"cover\"}:{backgroundColor:overlayColor};const handleSubmit=()=>{if(inputValue===password){setIsUnlocked(true);}else{setError(\"Incorrect password, please try again.\");}};/* ---------- render ---------- */if(isUnlocked)return /*#__PURE__*/_jsx(_Fragment,{children:children});return /*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",children:/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.35},style:{position:\"fixed\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:20,zIndex:9999,backdropFilter:\"blur(3px)\",pointerEvents:\"all\",...getOverlayStyle()},children:/*#__PURE__*/_jsxs(motion.div,{initial:{y:30,opacity:0},animate:{y:0,opacity:1},transition:{type:\"spring\",stiffness:260,damping:20},style:{width:\"100%\",maxWidth:modalWidth,backgroundColor:modalBackground,padding:modalPadding,borderRadius:modalBorderRadius,boxShadow:\"0 10px 30px rgba(0,0,0,0.15)\",textAlign:\"center\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{marginBottom:20,color:titleColor,fontSize:24,fontWeight:600},children:titleText}),/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:inputValue,onChange:e=>{setInputValue(e.target.value);setError(\"\");},onKeyDown:e=>e.key===\"Enter\"&&handleSubmit(),placeholder:\"Password\",style:{width:\"100%\",padding:\"12px 16px\",marginBottom:16,fontSize:16,borderRadius:inputBorderRadius,border:`1px solid ${inputBorderColor}`,backgroundColor:inputBackground,color:inputTextColor,outline:\"none\",boxSizing:\"border-box\"},autoFocus:true}),error&&/*#__PURE__*/_jsx(\"p\",{style:{color:errorTextColor,margin:\"0 0 16px\",fontSize:14},children:error}),/*#__PURE__*/_jsx(motion.button,{whileHover:{scale:1.03},whileTap:{scale:.97},onClick:handleSubmit,style:{width:\"100%\",padding:\"12px 24px\",border:\"none\",borderRadius:buttonBorderRadius,backgroundColor:buttonBackground,color:buttonTextColor,fontSize:16,fontWeight:500,cursor:\"pointer\",boxShadow:\"0 2px 10px rgba(0,0,0,0.1)\"},children:buttonText})]})})});}/* ---------- default props & controls ---------- */PasswordGate.defaultProps={password:\"secret123\",overlayType:\"color\",overlayColor:\"#ffffff\",modalBackground:\"#ffffff\",modalWidth:400,modalPadding:32,modalBorderRadius:16,titleText:\"Enter Password\",titleColor:\"#000000\",inputBackground:\"#ffffff\",inputTextColor:\"#000000\",inputBorderColor:\"#dddddd\",inputBorderRadius:8,buttonBackground:\"#000000\",buttonTextColor:\"#ffffff\",buttonText:\"Continue\",buttonBorderRadius:8,errorTextColor:\"#ff0000\"};addPropertyControls(PasswordGate,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"secret123\"},overlayType:{type:ControlType.Enum,title:\"Overlay\",options:[\"color\",\"image\"],optionTitles:[\"Color\",\"Image\"],defaultValue:\"color\"},overlayColor:{type:ControlType.Color,title:\"Overlay Color\",hidden:p=>p.overlayType!==\"color\"},overlayImage:{type:ControlType.Image,title:\"Overlay Image\",hidden:p=>p.overlayType!==\"image\"},modalBackground:{type:ControlType.Color,title:\"Modal BG\"},modalWidth:{type:ControlType.Number,title:\"Modal W\",min:200,max:800,unit:\"px\"},modalPadding:{type:ControlType.Number,title:\"Padding\",min:0,max:100,unit:\"px\"},modalBorderRadius:{type:ControlType.Number,title:\"Corners\",min:0,max:50,unit:\"px\"},titleText:{type:ControlType.String,title:\"Title\"},titleColor:{type:ControlType.Color,title:\"Title Color\"},inputBackground:{type:ControlType.Color,title:\"Input BG\"},inputTextColor:{type:ControlType.Color,title:\"Input Text\"},inputBorderColor:{type:ControlType.Color,title:\"Input Border\"},inputBorderRadius:{type:ControlType.Number,title:\"Input Corners\",min:0,max:20},buttonText:{type:ControlType.String,title:\"Button Label\"},buttonBackground:{type:ControlType.Color,title:\"Button BG\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\"},buttonBorderRadius:{type:ControlType.Number,title:\"Button Corners\",min:0,max:20},errorTextColor:{type:ControlType.Color,title:\"Error Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordGate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Password.map"],
  "mappings": "4HAGmO,SAARA,EAA8BC,EAAM,CAAC,GAAK,CAAC,SAAAC,EAAS,SAAAC,EAAS,YACxR,YAAAC,EAAY,QAAQ,aAAAC,EAAa,UAAU,aAAAC,EAAa,gBAAAC,EAAgB,UAAU,WAAAC,EAAW,IAAI,aAAAC,EAAa,GAAG,kBAAAC,EAAkB,GACnI,UAAAC,EAAU,iBAAiB,WAAAC,EAAW,UAAU,gBAAAC,EAAgB,UAAU,eAAAC,EAAe,UAAU,iBAAAC,E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asswordGate", "props", "children", "password", "overlayType", "overlayColor", "overlayImage", "modalBackground", "modalWidth", "modalPadding", "modalBorderRadius", "titleText", "titleColor", "inputBackground", "inputTextColor", "inputBorderColor", "inputBorderRadius", "buttonBackground", "buttonTextColor", "buttonText", "buttonBorderRadius", "errorTextColor", "inputValue", "setInputValue", "ye", "isUnlocked", "setIsUnlocked", "error", "setError", "getOverlayStyle", "handleSubmit", "p", "l", "AnimatePresence", "motion", "u", "e", "addPropertyControls", "ControlType"]
}
