{"version":3,"file":"Examples.C3p376PZ.mjs","names":["useState","useRef","useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/7Tk1VMTVjQR5fke9sVsG/jQGD9oxveka1m1K1x78t/Examples.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef,startTransition,useCallback,useEffect,useRef,useState}from\"react\";// Learn more: https://www.framer.com/developers/overrides/\nconst randomColor=()=>{const next=Math.floor(Math.random()*16777215);return`#${next.toString(16).padStart(6,\"0\")}`;};export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[background,setBackground]=useState(\"#0099FF\");return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background},onClick:()=>{startTransition(()=>setBackground(randomColor()));}});});}export function ShrinkOnScroll(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isShrunk,setIsShrunk]=useState(false);const[reduceMotion,setReduceMotion]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const mediaQuery=window.matchMedia(\"(prefers-reduced-motion: reduce)\");startTransition(()=>setReduceMotion(mediaQuery.matches));const onMediaChange=()=>{startTransition(()=>setReduceMotion(mediaQuery.matches));};if(mediaQuery.addEventListener){mediaQuery.addEventListener(\"change\",onMediaChange);}else{mediaQuery.addListener(onMediaChange);}let ticking=false;const shrinkThreshold=24;const onScroll=()=>{if(ticking)return;ticking=true;window.requestAnimationFrame(()=>{const nextIsShrunk=window.scrollY>shrinkThreshold;startTransition(()=>{setIsShrunk(prev=>prev===nextIsShrunk?prev:nextIsShrunk);});ticking=false;});};onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",onScroll);if(mediaQuery.removeEventListener){mediaQuery.removeEventListener(\"change\",onMediaChange);}else{mediaQuery.removeListener(onMediaChange);}};},[]);const navScale=reduceMotion?1:isShrunk?.9:1;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{...props.animate||{},scale:navScale},transition:reduceMotion?{duration:0}:{duration:.24,ease:[.22,1,.36,1]},style:{...props.style,position:\"fixed\",top:0,left:props.style?.left??0,right:props.style?.right??0,transformOrigin:\"top center\",willChange:\"transform\",zIndex:props.style?.zIndex??1e3}});});}export function withSeminarWebhookFeedback(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isPending,setIsPending]=useState(false);const[modalType,setModalType]=useState(null);const redirectTimerRef=useRef(null);const closeModal=useCallback(()=>{startTransition(()=>setModalType(null));},[]);const goHome=useCallback(()=>{if(typeof window!==\"undefined\"){window.location.assign(\"/\");}},[]);useEffect(()=>{if(modalType!==\"success\")return;if(typeof window!==\"undefined\"){redirectTimerRef.current=window.setTimeout(()=>{goHome();},5e3);}return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[goHome,modalType]);useEffect(()=>{return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[]);const handleSubmit=useCallback(async event=>{event.preventDefault();if(isPending)return;const formElement=event.currentTarget;if(!formElement.checkValidity()){formElement.reportValidity();return;}const formData=new FormData(formElement);const payload={};for(const[key,value]of formData.entries()){payload[key]=typeof value===\"string\"?value:value.name;}startTransition(()=>{setIsPending(true);setModalType(null);});try{const response=await fetch(\"https://hook.us2.make.com/ubl8e12pyja585cznxoua52nep8xq7z1\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});if(!response.ok)throw new Error(\"Request failed\");startTransition(()=>{setModalType(\"success\");setIsPending(false);});}catch(error){startTransition(()=>{setModalType(\"error\");setIsPending(false);});}},[isPending]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onSubmit:handleSubmit,\"aria-busy\":isPending}),modalType?/*#__PURE__*/_jsx(\"div\",{role:\"presentation\",style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0,0,0,0.72)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:20,zIndex:9999},children:/*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-labelledby\":\"seminar-webhook-feedback-title\",style:{width:\"100%\",maxWidth:480,backgroundColor:\"#1B1B1B\",border:\"1px solid #2D2D2D\",borderRadius:6,padding:24,color:\"#F5F5F5\",fontFamily:\"'Rajdhani', 'Teko', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",textAlign:\"center\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"h2\",{id:\"seminar-webhook-feedback-title\",style:{margin:0,fontSize:30,lineHeight:1.1,letterSpacing:\"-0.01em\"},children:modalType===\"success\"?\"Reserva confirmada\":\"Tuvimos dificultades\"}),modalType===\"success\"?/*#__PURE__*/_jsx(\"p\",{style:{margin:\"12px 0 20px\",lineHeight:1.35},children:\"Tu inscripci\\xf3n al seminario fue recibida correctamente. En unos segundos te llevamos al inicio.\"}):/*#__PURE__*/_jsxs(\"p\",{style:{margin:\"12px 0 20px\",lineHeight:1.35},children:[\"No pudimos completar tu inscripci\\xf3n. Por favor, contactanos por\",\" \",/*#__PURE__*/_jsx(\"a\",{href:\"https://wa.me/5491160476162?text=Hola!%20Quiero%20inscribirme%20al%20curso%20de%20GSD%20Repro%20Injection\",target:\"_blank\",rel:\"noreferrer\",style:{color:\"#FF3B30\",fontWeight:700},children:\"WhatsApp\"}),\" \",\"para ayudarte.\"]}),modalType===\"success\"?/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:goHome,style:{border:\"none\",backgroundColor:\"#D32F2F\",color:\"#FFFFFF\",padding:\"12px 16px\",borderRadius:4,cursor:\"pointer\",font:\"inherit\",fontWeight:700},children:\"Ir al inicio ahora\"}):/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:closeModal,style:{border:\"none\",backgroundColor:\"#D32F2F\",color:\"#FFFFFF\",padding:\"12px 16px\",borderRadius:4,cursor:\"pointer\",font:\"inherit\",fontWeight:700},children:\"Cerrar\"})]})}):null]});});}export function withSeminarSubmitFeedback(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[isPending,setIsPending]=useState(false);const[modalType,setModalType]=useState(null);const redirectTimerRef=useRef(null);const closeModal=useCallback(()=>{startTransition(()=>setModalType(null));},[]);const goHome=useCallback(()=>{if(typeof window!==\"undefined\"){window.location.assign(\"/\");}},[]);useEffect(()=>{if(modalType!==\"success\")return;if(typeof window!==\"undefined\"){redirectTimerRef.current=window.setTimeout(()=>{goHome();},5e3);}return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[goHome,modalType]);useEffect(()=>{return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[]);const handleClick=useCallback(async event=>{event.preventDefault();event.stopPropagation();if(isPending)return;const triggerElement=event.currentTarget;const formElement=triggerElement?.closest(\"form\");if(!formElement)return;if(!formElement.checkValidity()){formElement.reportValidity();return;}const formData=new FormData(formElement);const payload={};for(const[key,value]of formData.entries()){payload[key]=typeof value===\"string\"?value:value.name;}startTransition(()=>{setIsPending(true);setModalType(null);});try{await fetch(\"https://hook.us2.make.com/ubl8e12pyja585cznxoua52nep8xq7z1\",{method:\"POST\",mode:\"no-cors\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});startTransition(()=>{setModalType(\"success\");setIsPending(false);});}catch(error){startTransition(()=>{setModalType(\"error\");setIsPending(false);});}},[isPending]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick,disabled:isPending||props.disabled,\"aria-disabled\":isPending||props.disabled,style:{...props.style,cursor:isPending?\"not-allowed\":props.style?.cursor,opacity:isPending?.8:props.style?.opacity}}),modalType?/*#__PURE__*/_jsx(\"div\",{role:\"presentation\",style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0,0,0,0.72)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:20,zIndex:9999},children:/*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-labelledby\":\"seminar-submit-feedback-title\",style:{width:\"100%\",maxWidth:480,backgroundColor:\"#1B1B1B\",border:\"1px solid #2D2D2D\",borderRadius:6,padding:24,color:\"#F5F5F5\",fontFamily:\"'Rajdhani', 'Teko', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",textAlign:\"center\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"h2\",{id:\"seminar-submit-feedback-title\",style:{margin:0,fontSize:30,lineHeight:1.1,letterSpacing:\"-0.01em\"},children:modalType===\"success\"?\"Reserva confirmada\":\"Tuvimos dificultades\"}),modalType===\"success\"?/*#__PURE__*/_jsx(\"p\",{style:{margin:\"12px 0 20px\",lineHeight:1.35},children:\"Tu inscripci\\xf3n al seminario fue enviada correctamente. En unos segundos te llevamos al inicio.\"}):/*#__PURE__*/_jsxs(\"p\",{style:{margin:\"12px 0 20px\",lineHeight:1.35},children:[\"No pudimos completar tu inscripci\\xf3n. Por favor, contactanos por\",\" \",/*#__PURE__*/_jsx(\"a\",{href:\"https://wa.me/5491160476162?text=Hola!%20Quiero%20inscribirme%20al%20curso%20de%20GSD%20Repro%20Injection\",target:\"_blank\",rel:\"noreferrer\",style:{color:\"#FF3B30\",fontWeight:700},children:\"WhatsApp\"}),\" \",\"para ayudarte.\"]}),modalType===\"success\"?/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:goHome,style:{border:\"none\",backgroundColor:\"#D32F2F\",color:\"#FFFFFF\",padding:\"12px 16px\",borderRadius:4,cursor:\"pointer\",font:\"inherit\",fontWeight:700},children:\"Ir al inicio ahora\"}):/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:closeModal,style:{border:\"none\",backgroundColor:\"#D32F2F\",color:\"#FFFFFF\",padding:\"12px 16px\",borderRadius:4,cursor:\"pointer\",font:\"inherit\",fontWeight:700},children:\"Cerrar\"})]})}):null]});});}export function withSeminarNativeFeedback(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[showSuccessModal,setShowSuccessModal]=useState(false);const redirectTimerRef=useRef(null);const goHome=useCallback(()=>{if(typeof window!==\"undefined\"){window.location.assign(\"/\");}},[]);useEffect(()=>{if(!showSuccessModal)return;if(typeof window!==\"undefined\"){redirectTimerRef.current=window.setTimeout(()=>{goHome();},5e3);}return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[goHome,showSuccessModal]);useEffect(()=>{return()=>{if(redirectTimerRef.current!==null&&typeof window!==\"undefined\"){window.clearTimeout(redirectTimerRef.current);redirectTimerRef.current=null;}};},[]);const handleClick=useCallback(event=>{if(props.onClick){props.onClick(event);}const triggerElement=event.currentTarget;const formElement=triggerElement?.closest(\"form\");if(!formElement)return;if(!formElement.checkValidity())return;startTransition(()=>{setShowSuccessModal(true);});},[props]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick}),showSuccessModal?/*#__PURE__*/_jsx(\"div\",{role:\"presentation\",style:{position:\"fixed\",inset:0,backgroundColor:\"rgba(0,0,0,0.72)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:20,zIndex:9999},children:/*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-labelledby\":\"seminar-native-feedback-title\",style:{width:\"100%\",maxWidth:480,backgroundColor:\"#1B1B1B\",border:\"1px solid #2D2D2D\",borderRadius:6,padding:24,color:\"#F5F5F5\",fontFamily:\"'Rajdhani', 'Teko', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",textAlign:\"center\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"h2\",{id:\"seminar-native-feedback-title\",style:{margin:0,fontSize:30,lineHeight:1.1,letterSpacing:\"-0.01em\"},children:\"Reserva confirmada\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:\"12px 0 20px\",lineHeight:1.35},children:\"Tu inscripci\\xf3n al seminario fue enviada correctamente. En unos segundos te llevamos al inicio.\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:goHome,style:{border:\"none\",backgroundColor:\"#D32F2F\",color:\"#FFFFFF\",padding:\"12px 16px\",borderRadius:4,cursor:\"pointer\",font:\"inherit\",fontWeight:700},children:\"Ir al inicio ahora\"})]})}):null]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSeminarWebhookFeedback\":{\"type\":\"reactHoc\",\"name\":\"withSeminarWebhookFeedback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSeminarNativeFeedback\":{\"type\":\"reactHoc\",\"name\":\"withSeminarNativeFeedback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSeminarSubmitFeedback\":{\"type\":\"reactHoc\",\"name\":\"withSeminarSubmitFeedback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShrinkOnScroll\":{\"type\":\"reactHoc\",\"name\":\"ShrinkOnScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__Framer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