{"version":3,"file":"ProfessionTest.fkzzTAjd.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Yhl5GfoaCLyVYMxt9u1F/lQi7hEQhnz0JFuzhtjeT/ProfessionTest.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export default function CareerTestForm(){const[isVisible,setIsVisible]=useState(false);const[hasShownForm,setHasShownForm]=useState(false);const[isMobile,setIsMobile]=useState(false);const[scrollDepth,setScrollDepth]=useState(0);const[timeOnPage,setTimeOnPage]=useState(0);useEffect(()=>{const checkMobile=()=>{const mobile=window.innerWidth<=768;setIsMobile(mobile);};checkMobile();window.addEventListener(\"resize\",checkMobile);// Track time on page\nconst pageTimer=setInterval(()=>{setTimeOnPage(prev=>prev+1);},1e3);let inactivityTimer=null;let exitIntentShown=false;const handleInactivity=()=>{// Only show after user has been on page for at least 30 seconds\nif(!hasShownForm&&timeOnPage>=30){showExitForm();}};const resetInactivityTimer=()=>{if(inactivityTimer){clearTimeout(inactivityTimer);}// Increased inactivity timers\ninactivityTimer=setTimeout(handleInactivity,isMobile?12e4:3e4// Mobile: 2 min, Desktop: 30 sec\n);};const handleInteraction=()=>{resetInactivityTimer();};const handleScroll=()=>{const windowHeight=window.innerHeight;const documentHeight=document.documentElement.scrollHeight-windowHeight;const scrolled=window.scrollY;const newScrollDepth=scrolled/documentHeight*100;setScrollDepth(newScrollDepth);// Increased scroll threshold and added time requirement\nif(isMobile&&newScrollDepth>85&&!hasShownForm&&timeOnPage>=45){showExitForm();}handleInteraction();};const handleMouseMove=e=>{// Only trigger exit intent once and after minimum time on page\nif(!isMobile&&e.clientY<10&&!exitIntentShown&&!hasShownForm&&timeOnPage>=20){exitIntentShown=true;showExitForm();}handleInteraction();};const handleTouchStart=()=>{handleInteraction();};const showExitForm=()=>{if(!hasShownForm){setIsVisible(true);setHasShownForm(true);}};document.addEventListener(\"mousemove\",handleMouseMove);document.addEventListener(\"touchstart\",handleTouchStart);document.addEventListener(\"scroll\",handleScroll);resetInactivityTimer();return()=>{window.removeEventListener(\"resize\",checkMobile);document.removeEventListener(\"mousemove\",handleMouseMove);document.removeEventListener(\"touchstart\",handleTouchStart);document.removeEventListener(\"scroll\",handleScroll);if(inactivityTimer)clearTimeout(inactivityTimer);clearInterval(pageTimer);};},[hasShownForm,isMobile,timeOnPage]);const handleClose=()=>{setIsVisible(false);};const handleTestStart=()=>{window.location.href=\"https://test.nfactorial.school?utm_source=website-popup&utm_medium=&utm_campaign=\";};if(!isVisible)return null;return /*#__PURE__*/_jsxs(\"div\",{className:\"overlay\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"modal\",children:[/*#__PURE__*/_jsx(\"button\",{onClick:handleClose,className:\"close-button\",children:\"\\xd7\"}),/*#__PURE__*/_jsxs(\"h2\",{className:\"heading\",children:[\"Человек меняет свою\",/*#__PURE__*/_jsx(\"span\",{className:\"highlight\",children:\"профессию 7 раз\"}),\" за жизнь\"]}),/*#__PURE__*/_jsx(\"p\",{className:\"paragraph\",children:\"Пройдите тест прямо сейчас и узнайте какая профессия вам подойдет больше всего\"}),/*#__PURE__*/_jsxs(\"ul\",{className:\"benefits-list\",children:[/*#__PURE__*/_jsx(\"li\",{className:\"benefit-item\",children:\"✓ Бесплатная карьерная консультация\"}),/*#__PURE__*/_jsx(\"li\",{className:\"benefit-item\",children:\"✓ Моментальный результат\"}),/*#__PURE__*/_jsx(\"li\",{className:\"benefit-item\",children:\"✓ Персональные рекомендации по развитию\"})]}),/*#__PURE__*/_jsx(\"button\",{onClick:handleTestStart,className:\"submit-button\",children:\"Пройти тест бесплатно\"}),/*#__PURE__*/_jsx(\"p\",{className:\"guarantee\",children:\"5 минут • 100% конфиденциально • Мгновенный результат\"})]}),/*#__PURE__*/_jsx(\"style\",{jsx:true,children:`\n                .overlay {\n                    position: fixed;\n                    top: 0;\n                    left: 0;\n                    right: 0;\n                    bottom: 0;\n                    background-color: rgba(0, 0, 0, 0.5);\n                    display: flex;\n                    justify-content: center;\n                    align-items: center;\n                    z-index: 1000;\n                    padding: 20px;\n                }\n\n                .modal {\n                    background-color: white;\n                    padding: 40px 30px;\n                    border-radius: 12px;\n                    width: 100%;\n                    max-width: 500px;\n                    position: relative;\n                    animation: slideIn 0.3s ease-out;\n                    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n                }\n\n                @keyframes slideIn {\n                    from {\n                        transform: translateY(20px);\n                        opacity: 0;\n                    }\n                    to {\n                        transform: translateY(0);\n                        opacity: 1;\n                    }\n                }\n\n                .close-button {\n                    position: absolute;\n                    right: 15px;\n                    top: 15px;\n                    border: none;\n                    background: none;\n                    font-size: 24px;\n                    cursor: pointer;\n                    color: #666;\n                    padding: 5px;\n                    width: 40px;\n                    height: 40px;\n                    display: flex;\n                    align-items: center;\n                    justify-content: center;\n                    transition: color 0.3s ease;\n                }\n\n                .close-button:hover {\n                    color: #333;\n                }\n\n                .heading {\n                    margin-bottom: 40px;\n                    color: #000;\n                    font-size: clamp(24px, 5vw, 36px);\n                    font-family: Inter, sans-serif;\n                    font-weight: bold;\n                    letter-spacing: -0.04em;\n                    line-height: 1.2;\n                    text-align: center;\n                }\n\n                .highlight {\n                    color: #ff4757;\n                    display: block;\n                }\n\n                .paragraph {\n                    margin-bottom: 30px;\n                    color: #333;\n                    font-size: clamp(14px, 4vw, 16px);\n                    font-family: Inter, sans-serif;\n                    letter-spacing: -0.05em;\n                    line-height: 1.4;\n                    text-align: center;\n                }\n\n                .benefits-list {\n                    list-style: none;\n                    padding: 0;\n                    margin: 30px 0;\n                }\n\n                .benefit-item {\n                    font-size: clamp(16px, 4vw, 18px);\n                    font-family: Inter, sans-serif;\n                    color: #333;\n                    margin-bottom: 12px;\n                    display: flex;\n                    align-items: center;\n                    padding-left: 8px;\n                }\n\n                .submit-button {\n                    width: 100%;\n                    padding: clamp(15px, 4vw, 20px);\n                    background-color: #ff4757;\n                    color: white;\n                    border: none;\n                    border-radius: 8px;\n                    cursor: pointer;\n                    font-size: clamp(16px, 4vw, 20px);\n                    font-weight: bold;\n                    font-family: Inter, sans-serif;\n                    transition: transform 0.2s ease, background-color 0.3s ease;\n                    margin-bottom: 20px;\n                }\n\n                .submit-button:hover {\n                    background-color: #ff6b81;\n                    transform: scale(1.02);\n                }\n\n                .submit-button:active {\n                    transform: scale(0.98);\n                }\n\n                .guarantee {\n                    font-size: clamp(12px, 3.5vw, 14px);\n                    color: #666;\n                    text-align: center;\n                    font-family: Inter, sans-serif;\n                    margin: 0;\n                }\n\n                @media (max-width: 768px) {\n                    .modal {\n                        padding: 30px 20px;\n                    }\n\n                    .benefits-list {\n                        margin: 20px 0;\n                    }\n\n                    .benefit-item {\n                        margin-bottom: 10px;\n                    }\n                }\n\n                @media (max-width: 480px) {\n                    .overlay {\n                        padding: 15px;\n                    }\n\n                    .heading {\n                        margin-bottom: 24px;\n                        font-size: 24px;\n                    }\n                    .paragraph{\n                        font-size: 16px;\n                    }\n                }\n            `})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CareerTestForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProfessionTest.map"],"mappings":"kNAA+F,SAAwB,GAAgB,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAa,GAAiBA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAY,GAAgBA,EAAS,EAAE,CAAM,CAAC,EAAW,GAAeA,EAAS,EAAE,CAM8nB,OAN7nB,MAAc,CAAC,IAAM,MAAgB,CAAC,IAAM,EAAO,EAAO,YAAY,IAAI,EAAY,EAAO,EAAG,GAAa,CAAC,EAAO,iBAAiB,SAAS,EAAY,CAC3gB,IAAM,EAAU,gBAAgB,CAAC,EAAc,GAAM,EAAK,EAAE,EAAG,IAAI,CAAK,EAAgB,KAAS,EAAgB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