{"version":3,"file":"Vslplayer.CyhjEyYP.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/7oklczbD8YezbkoffGO1/IQCmfi3FxskC8AYP9Gc5/Vslplayer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * VSL PLAYER (SMART LOCK EDITION)\n * - Mudo: Bloqueado totalmente.\n * - Al activar: Se desbloquea por 5 segundos (Ventana de seguridad).\n * - Después de 5s: Se bloquea automáticamente para impedir pausas.\n */export default function VSLPlayer(props){const{videoId,buttonText,borderRadius,scale}=props;// Estado del audio\nconst[audioOn,setAudioOn]=React.useState(false);// Estado del bloqueo (True = Nadie toca el video / False = Se puede tocar)\nconst[isLocked,setIsLocked]=React.useState(true);const handleActivate=()=>{// 1. Activamos el modo sonido\nsetAudioOn(true);// 2. DESBLOQUEAMOS temporalmente (para permitir el Play manual)\nsetIsLocked(false);// 3. PROGRAMAMOS EL RE-BLOQUEO\n// Después de 5 segundos (5000ms), volvemos a poner el escudo.\nsetTimeout(()=>{setIsLocked(true);},5e3);};// URL BASE\nconst baseUrl=`https://www.youtube.com/embed/${videoId}`;const commonParams=`&modestbranding=1&rel=0&disablekb=1&playsinline=1&iv_load_policy=3&fs=0`;// URLs\nconst mutedUrl=`${baseUrl}?autoplay=1&controls=0&mute=1${commonParams}`;const soundUrl=`${baseUrl}?autoplay=1&controls=0&mute=0${commonParams}`;return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:{...videoWrapperStyle,transform:`scale(${scale})`},children:[/*#__PURE__*/_jsx(\"iframe\",{width:\"100%\",height:\"100%\",src:audioOn?soundUrl:mutedUrl,title:\"VSL\",frameBorder:\"0\",allow:\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",style:{width:\"100%\",height:\"100%\",display:\"block\"}},audioOn?\"video-sound\":\"video-muted\"),/*#__PURE__*/_jsx(\"div\",{style:{...blockerStyle,pointerEvents:isLocked?\"auto\":\"none\"}})]}),/*#__PURE__*/_jsx(AnimatePresence,{children:!audioOn&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.5},style:overlayStyle,children:/*#__PURE__*/_jsxs(\"button\",{onClick:handleActivate,style:glassButtonStyle(borderRadius),children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"polygon\",{points:\"11 5 6 9 2 9 2 15 6 15 11 19 11 5\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07\"})]}),/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:700,letterSpacing:\"1px\"},children:buttonText})]})})})]});}// --- ESTILOS ---\nconst containerStyle={width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",backgroundColor:\"#000\"};const videoWrapperStyle={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:0};const blockerStyle={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:5,backgroundColor:\"transparent\"};const overlayStyle={position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:10,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:\"rgba(0,0,0,0.1)\",pointerEvents:\"auto\"};const glassButtonStyle=radius=>({backgroundColor:\"rgba(189, 244, 62, 0.35)\",backdropFilter:\"blur(12px)\",WebkitBackdropFilter:\"blur(12px)\",//border: \"1px solid rgba(255, 100, 100, 0.4)\",\n    boxShadow:\"0 8px 32px 0 rgba(0, 0, 0, 0.3)\",color:\"white\",padding:\"16px 32px\",fontSize:\"16px\",borderRadius:radius,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",gap:\"12px\",outline:\"none\",textShadow:\"0 2px 4px rgba(0,0,0,0.5)\",touchAction:\"manipulation\"});// --- CONTROLES ---\naddPropertyControls(VSLPlayer,{videoId:{type:ControlType.String,title:\"YouTube ID\",defaultValue:\"dQw4w9WgXcQ\"},buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"ENCENDER SONIDO\"},scale:{type:ControlType.Number,title:\"Video Scale\",defaultValue:1.3,min:1,max:2,step:.1},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VSLPlayer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Vslplayer.map"],"mappings":"yOAKG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,UAAQ,aAAW,eAAa,SAAO,EACpF,CAAC,EAAQ,GAAYA,EAAe,GAAM,CAC1C,CAAC,EAAS,GAAaA,EAAe,GAAK,CAAO,MAAmB,CAC1E,EAAW,GAAK,CAChB,EAAY,GAAM,CAElB,eAAe,CAAC,EAAY,GAAK,EAAG,IAAI,EAClC,EAAQ,iCAAiC,IAAgB,EAAa,0EACtE,EAAS,GAAG,EAAQ,+BAA+B,IAAqB,EAAS,GAAG,EAAQ,+BAA+B,IAAe,OAAoB,EAAM,MAAM,CAAC,MAAM,EAAe,SAAS,CAAc,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAkB,UAAU,SAAS,EAAM,GAAG,CAAC,SAAS,CAAc,EAAK,SAAS,CAAC,MAAM,OAAO,OAAO,OAAO,IAAI,EAAQ,EAAS,EAAS,MAAM,MAAM,YAAY,IAAI,MAAM,2FAA2F,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC,EAAQ,cAAc,cAAc,CAAc,EAA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