Plugin Directory

Changeset 3384798


Ignore:
Timestamp:
10/26/2025 05:29:45 PM (4 months ago)
Author:
codejitsu
Message:

Update to version 1.8.5

Location:
workzen-connector/trunk/assets
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • workzen-connector/trunk/assets/floating-buttons.css

    r3384724 r3384798  
    202202    position: absolute;
    203203    right: 75px;
     204    top: 50%;
    204205    background: rgba(0, 0, 0, 0.85);
    205206    color: white;
     
    211212    opacity: 0;
    212213    pointer-events: none;
    213     transform: translateX(10px);
     214    transform: translateY(-50%) translateX(10px);
    214215    transition: all 0.3s ease;
    215216    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
     
    219220    right: auto;
    220221    left: 75px;
    221     transform: translateX(-10px);
     222    transform: translateY(-50%) translateX(-10px);
    222223}
    223224
    224225.wzc-floating-container.expanded .wzc-action-btn:hover::before {
    225226    opacity: 1;
    226     transform: translateX(0);
     227    transform: translateY(-50%) translateX(0);
    227228}
    228229
    229230.wzc-floating-container.expanded.position-left .wzc-action-btn:hover::before {
    230     transform: translateX(0);
     231    transform: translateY(-50%) translateX(0);
    231232}
    232233
     
    638639    }
    639640}
     641
     642/* =====================================================
     643   Button Animations
     644   ===================================================== */
     645
     646/* Animation Classes */
     647.wzc-main-toggle.wzc-animate-pulse {
     648    animation: wzc-pulse var(--wzc-animation-duration, 1s) ease-in-out;
     649}
     650
     651.wzc-main-toggle.wzc-animate-bounce {
     652    animation: wzc-bounce var(--wzc-animation-duration, 1s) ease-in-out;
     653}
     654
     655.wzc-main-toggle.wzc-animate-shake {
     656    animation: wzc-shake var(--wzc-animation-duration, 1s) ease-in-out;
     657}
     658
     659.wzc-main-toggle.wzc-animate-swing {
     660    animation: wzc-swing var(--wzc-animation-duration, 1s) ease-in-out;
     661}
     662
     663.wzc-main-toggle.wzc-animate-wobble {
     664    animation: wzc-wobble var(--wzc-animation-duration, 1s) ease-in-out;
     665}
     666
     667.wzc-main-toggle.wzc-animate-spin {
     668    animation: wzc-spin var(--wzc-animation-duration, 1s) ease-in-out;
     669}
     670
     671.wzc-main-toggle.wzc-animate-jello {
     672    animation: wzc-jello var(--wzc-animation-duration, 1s) ease-in-out;
     673}
     674
     675.wzc-main-toggle.wzc-animate-tada {
     676    animation: wzc-tada var(--wzc-animation-duration, 1s) ease-in-out;
     677}
     678
     679/* Keyframe Animations */
     680@keyframes wzc-pulse {
     681    0%, 100% {
     682        transform: scale(1);
     683    }
     684    50% {
     685        transform: scale(1.15);
     686    }
     687}
     688
     689@keyframes wzc-bounce {
     690    0%, 20%, 50%, 80%, 100% {
     691        transform: translateY(0);
     692    }
     693    40% {
     694        transform: translateY(-15px);
     695    }
     696    60% {
     697        transform: translateY(-8px);
     698    }
     699}
     700
     701@keyframes wzc-shake {
     702    0%, 100% {
     703        transform: translateX(0);
     704    }
     705    10%, 30%, 50%, 70%, 90% {
     706        transform: translateX(-5px);
     707    }
     708    20%, 40%, 60%, 80% {
     709        transform: translateX(5px);
     710    }
     711}
     712
     713@keyframes wzc-swing {
     714    0% {
     715        transform: rotate(0deg);
     716    }
     717    20% {
     718        transform: rotate(15deg);
     719    }
     720    40% {
     721        transform: rotate(-10deg);
     722    }
     723    60% {
     724        transform: rotate(5deg);
     725    }
     726    80% {
     727        transform: rotate(-2deg);
     728    }
     729    100% {
     730        transform: rotate(0deg);
     731    }
     732}
     733
     734@keyframes wzc-wobble {
     735    0%, 100% {
     736        transform: translateX(0) rotate(0deg);
     737    }
     738    15% {
     739        transform: translateX(-8px) rotate(-5deg);
     740    }
     741    30% {
     742        transform: translateX(7px) rotate(3deg);
     743    }
     744    45% {
     745        transform: translateX(-6px) rotate(-3deg);
     746    }
     747    60% {
     748        transform: translateX(5px) rotate(2deg);
     749    }
     750    75% {
     751        transform: translateX(-3px) rotate(-1deg);
     752    }
     753}
     754
     755@keyframes wzc-spin {
     756    0% {
     757        transform: rotate(0deg);
     758    }
     759    100% {
     760        transform: rotate(360deg);
     761    }
     762}
     763
     764@keyframes wzc-jello {
     765    0%, 100% {
     766        transform: skewX(0deg) skewY(0deg);
     767    }
     768    11.1% {
     769        transform: skewX(-12.5deg) skewY(-12.5deg);
     770    }
     771    22.2% {
     772        transform: skewX(6.25deg) skewY(6.25deg);
     773    }
     774    33.3% {
     775        transform: skewX(-3.125deg) skewY(-3.125deg);
     776    }
     777    44.4% {
     778        transform: skewX(1.5625deg) skewY(1.5625deg);
     779    }
     780    55.5% {
     781        transform: skewX(-0.78125deg) skewY(-0.78125deg);
     782    }
     783    66.6% {
     784        transform: skewX(0.390625deg) skewY(0.390625deg);
     785    }
     786    77.7% {
     787        transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
     788    }
     789    88.8% {
     790        transform: skewX(0.09765625deg) skewY(0.09765625deg);
     791    }
     792}
     793
     794@keyframes wzc-tada {
     795    0%, 100% {
     796        transform: scale(1) rotate(0);
     797    }
     798    10%, 20% {
     799        transform: scale(0.95) rotate(-3deg);
     800    }
     801    30%, 50%, 70%, 90% {
     802        transform: scale(1.05) rotate(3deg);
     803    }
     804    40%, 60%, 80% {
     805        transform: scale(1.05) rotate(-3deg);
     806    }
     807}
  • workzen-connector/trunk/assets/floating-buttons.js

    r3384724 r3384798  
    134134        });
    135135
     136        // Auto-popup functionality
     137        initAutoPopup();
     138
     139        // Button animations
     140        initButtonAnimations();
     141
    136142        // Functions
    137143        function openMenu() {
     
    176182                    message.remove();
    177183                }
     184
     185                // Set auto-popup dismissal flag when modal is manually closed
     186                setAutoPopupDismissal();
    178187            }
    179188        }
     
    234243                    form.reset();
    235244
     245                    // Set auto-popup dismissal flag on successful submission
     246                    setAutoPopupDismissal();
     247
    236248                    // Close modal after 2 seconds
    237249                    setTimeout(function() {
     
    270282            return re.test(email);
    271283        }
     284
     285        // Auto-popup functions
     286        function initAutoPopup() {
     287            // Check if auto-popup is enabled
     288            if (!wzcFloating.auto_popup_enabled || wzcFloating.auto_popup_enabled === '0') {
     289                return;
     290            }
     291
     292            // Check if modal overlay exists
     293            if (!modalOverlay) {
     294                return;
     295            }
     296
     297            // Check if we should show the popup
     298            if (!shouldShowAutoPopup()) {
     299                return;
     300            }
     301
     302            // Get delay in milliseconds (convert from seconds)
     303            const delay = parseInt(wzcFloating.auto_popup_delay) * 1000 || 30000;
     304
     305            // Set timeout to show the popup
     306            setTimeout(function() {
     307                // Double check modal isn't already open
     308                if (!modalOverlay.classList.contains('active')) {
     309                    openModal();
     310                }
     311            }, delay);
     312        }
     313
     314        function shouldShowAutoPopup() {
     315            try {
     316                const dismissedUntil = localStorage.getItem('wzc_auto_popup_dismissed');
     317                if (!dismissedUntil) {
     318                    return true;
     319                }
     320
     321                const dismissedDate = new Date(dismissedUntil);
     322                const now = new Date();
     323
     324                // If current time is past the dismissal expiry, show popup
     325                return now > dismissedDate;
     326            } catch (e) {
     327                // If localStorage is not available, don't show popup
     328                console.warn('localStorage not available:', e);
     329                return false;
     330            }
     331        }
     332
     333        function setAutoPopupDismissal() {
     334            try {
     335                const days = parseInt(wzcFloating.auto_popup_cookie_days) || 7;
     336                const dismissUntil = new Date();
     337                dismissUntil.setDate(dismissUntil.getDate() + days);
     338
     339                localStorage.setItem('wzc_auto_popup_dismissed', dismissUntil.toISOString());
     340            } catch (e) {
     341                console.warn('Failed to set auto-popup dismissal:', e);
     342            }
     343        }
     344
     345        // Button animation functions
     346        let animationIntervalId = null;
     347        let currentAnimationClass = null;
     348
     349        function stopAnimations() {
     350            // Clear any periodic animation interval
     351            if (animationIntervalId) {
     352                clearInterval(animationIntervalId);
     353                animationIntervalId = null;
     354            }
     355
     356            // Remove animation class and reset continuous animation
     357            if (mainToggle && currentAnimationClass) {
     358                mainToggle.classList.remove(currentAnimationClass);
     359                mainToggle.style.removeProperty('animation-iteration-count');
     360                currentAnimationClass = null;
     361            }
     362        }
     363
     364        function initButtonAnimations() {
     365            // Check if animations are enabled
     366            if (!wzcFloating.animation_enabled || wzcFloating.animation_enabled === '0') {
     367                return;
     368            }
     369
     370            // Check if main toggle exists
     371            if (!mainToggle) {
     372                return;
     373            }
     374
     375            // Get animation settings
     376            const animationType = wzcFloating.animation_type || 'pulse';
     377            const animationDelay = parseInt(wzcFloating.animation_delay) * 1000 || 5000;
     378            const animationSpeed = wzcFloating.animation_speed || 'normal';
     379            const animationRepeat = wzcFloating.animation_repeat || 'periodic';
     380            const stopOnInteract = wzcFloating.animation_stop_on_interact === '1';
     381
     382            // Set animation duration CSS variable based on speed
     383            const speedMap = {
     384                'slow': '1.5s',
     385                'normal': '1s',
     386                'fast': '0.6s'
     387            };
     388            mainToggle.style.setProperty('--wzc-animation-duration', speedMap[animationSpeed]);
     389
     390            // Start animation after delay
     391            setTimeout(function() {
     392                triggerAnimation(animationType, animationRepeat);
     393            }, animationDelay);
     394
     395            // Stop animations on first interaction if enabled
     396            if (stopOnInteract && mainToggle) {
     397                mainToggle.addEventListener('click', stopAnimations, { once: true });
     398            }
     399        }
     400
     401        function triggerAnimation(type, repeat) {
     402            if (!mainToggle) return;
     403
     404            const animationClass = 'wzc-animate-' + type;
     405            currentAnimationClass = animationClass;
     406
     407            // Function to add and remove animation class
     408            function playAnimation() {
     409                // Don't animate if menu is already expanded
     410                if (container.classList.contains('expanded')) {
     411                    return;
     412                }
     413
     414                mainToggle.classList.add(animationClass);
     415
     416                // Remove animation class after it completes
     417                setTimeout(function() {
     418                    mainToggle.classList.remove(animationClass);
     419                }, 1500); // Max animation duration
     420            }
     421
     422            // Play animation immediately
     423            playAnimation();
     424
     425            // Set up repeat behavior
     426            if (repeat === 'periodic') {
     427                // Repeat every 10 seconds
     428                animationIntervalId = setInterval(function() {
     429                    playAnimation();
     430                }, 10000);
     431            } else if (repeat === 'continuous') {
     432                // Add animation class and make it loop
     433                mainToggle.style.setProperty('animation-iteration-count', 'infinite');
     434                mainToggle.classList.add(animationClass);
     435            }
     436            // If repeat === 'once', do nothing (already played once)
     437        }
    272438    }
    273439})();
  • workzen-connector/trunk/assets/floating-buttons.min.css

    r3384724 r3384798  
    1 .wzc-floating-container{position:fixed;bottom:30px;right:30px;z-index:9999;display:flex;flex-direction:column;align-items:center;gap:0}.wzc-floating-container.position-left{right:auto;left:30px}.wzc-main-toggle{width:var(--wzc-button-size,64px);height:var(--wzc-button-size,64px);min-width:var(--wzc-button-size,64px);min-height:var(--wzc-button-size,64px);max-width:var(--wzc-button-size,64px);max-height:var(--wzc-button-size,64px);border-radius:50%!important;background:linear-gradient(135deg,var(--wzc-button-color,#667eea) 0,var(--wzc-button-color-dark,#764ba2) 100%);border:none!important;outline:0!important;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.1);transition:all .3s cubic-bezier(.4, 0, .2, 1);position:relative;z-index:10;order:2;overflow:hidden;flex-shrink:0}.wzc-main-toggle:hover{transform:scale(1.1);box-shadow:0 8px 24px rgba(0,0,0,.2),0 4px 8px rgba(0,0,0,.15)}.wzc-main-toggle:active{transform:scale(.95);box-shadow:0 2px 8px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.1)}.wzc-main-toggle:focus{outline:0!important;border:none!important}.wzc-toggle-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:transform .3s ease;display:flex;align-items:center;justify-content:center;width:var(--wzc-icon-size,32px);height:var(--wzc-icon-size,32px)}.wzc-toggle-icon svg{width:100%;height:100%;display:block;color:#fff}.wzc-main-toggle.active .wzc-toggle-icon{transform:translate(-50%,-50%) rotate(180deg)}.wzc-action-buttons{display:flex;flex-direction:column;align-items:center;gap:16px;order:1;margin-bottom:16px;max-height:0;overflow:visible;transition:all .4s cubic-bezier(.4, 0, .2, 1)}.wzc-floating-container.expanded .wzc-action-buttons{max-height:300px}.wzc-action-btn{width:var(--wzc-action-button-size,57px);height:var(--wzc-action-button-size,57px);min-width:var(--wzc-action-button-size,57px);min-height:var(--wzc-action-button-size,57px);max-width:var(--wzc-action-button-size,57px);max-height:var(--wzc-action-button-size,57px);border-radius:50%!important;border:none!important;outline:0!important;background:#fff!important;cursor:pointer;display:flex;align-items:center;justify-content:center;position:relative;opacity:0;transform:scale(0) translateY(20px);transition:all .3s cubic-bezier(.68, -.55, .265, 1.55);box-shadow:0 4px 12px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.1);text-decoration:none;overflow:visible;flex-shrink:0}.wzc-floating-container.expanded .wzc-action-btn{opacity:1;transform:scale(1) translateY(0)}.wzc-floating-container.expanded .wzc-action-btn:first-child{transition-delay:50ms}.wzc-floating-container.expanded .wzc-action-btn:nth-child(2){transition-delay:0.1s}.wzc-floating-container.expanded .wzc-action-btn:nth-child(3){transition-delay:0.15s}.wzc-action-btn:hover{transform:scale(1.15) translateY(0);box-shadow:0 8px 24px rgba(0,0,0,.2),0 4px 8px rgba(0,0,0,.15)}.wzc-action-btn:active{transform:scale(.95) translateY(0);box-shadow:0 2px 8px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.1)}.wzc-action-btn:focus{outline:0!important;border:none!important}.wzc-action-btn svg{width:24px;height:24px;display:block}.wzc-action-btn.call svg,.wzc-action-btn.whatsapp svg{color:#25d366!important;fill:currentColor!important}.wzc-action-btn.contact svg{color:#4facfe!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}.wzc-action-btn.booking svg{color:#667eea!important;fill:none!important;stroke:currentColor!important;stroke-width:1.5!important;stroke-linecap:round!important;stroke-linejoin:round!important}.wzc-action-btn::before{content:attr(data-label);position:absolute;right:75px;background:rgba(0,0,0,.85);color:#fff;padding:8px 16px;border-radius:8px;font-size:14px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transform:translateX(10px);transition:all .3s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-floating-container.position-left .wzc-action-btn::before{right:auto;left:75px;transform:translateX(-10px)}.wzc-floating-container.expanded .wzc-action-btn:hover::before{opacity:1;transform:translateX(0)}.wzc-floating-container.expanded.position-left .wzc-action-btn:hover::before{transform:translateX(0)}.wzc-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.3);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:all .3s ease;z-index:9998}.wzc-backdrop.active{opacity:1;visibility:visible}.wzc-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:10000;opacity:0;visibility:hidden;transition:all .3s ease}.wzc-modal-overlay.active{opacity:1;visibility:visible}.wzc-modal{background:#fff;border-radius:24px;padding:0;max-width:624px;width:90%;max-height:90vh;overflow:hidden;position:relative;box-shadow:0 24px 64px rgba(0,0,0,.3);transform:scale(.9) translateY(20px);transition:all .3s cubic-bezier(.4, 0, .2, 1)}.wzc-modal-overlay.active .wzc-modal{transform:scale(1) translateY(0)}.wzc-modal-header{background:#fff;padding:40px 40px 20px 40px;position:relative}.wzc-modal-close{position:absolute;top:24px;right:24px;background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1;padding:0!important}.wzc-modal-close:hover{background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-modal-close:focus{background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-modal-close svg{width:18px;height:18px;stroke:#64748b;stroke-width:2.5;stroke-linecap:round;transition:transform .2s ease}.wzc-modal-close:hover svg{transform:scale(1.2)}.wzc-modal-title{position:relative}.wzc-modal-title h2{margin:0 0 12px 0;font-size:36px;font-weight:900;color:#000;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;letter-spacing:-.5px}.wzc-modal-title p{margin:0;color:#6b7280;font-size:15px;line-height:1.6;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-modal-body{padding:20px 40px 40px 40px}.wzc-form{display:flex;flex-direction:column;gap:16px}.wzc-form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.wzc-form-group{position:relative}.wzc-form-group label{display:none}.wzc-form-group input,.wzc-form-group textarea{width:100%;padding:16px 20px!important;border:1px solid #9ca3af!important;border-radius:12px!important;font-size:15px!important;transition:all .2s ease;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif!important;background:#fff!important;background-color:#fff!important;color:#000!important;outline:0!important;box-shadow:none!important;margin:0!important;max-width:100%}.wzc-form-group input::placeholder,.wzc-form-group textarea::placeholder{color:#6b7280!important;opacity:1!important}.wzc-form-group input:focus,.wzc-form-group textarea:focus{outline:0!important;border-color:#6b7280!important;box-shadow:none!important;background:#fff!important;background-color:#fff!important}.wzc-form-group textarea{resize:vertical;min-height:120px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-submit-btn{width:100%;padding:18px 24px!important;background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important;border-radius:12px!important;font-size:14px!important;font-weight:600!important;cursor:pointer;transition:all .2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif!important;letter-spacing:1px!important;text-transform:uppercase!important;margin-top:8px;text-decoration:none!important}.wzc-submit-btn:hover{background:#1a1a1a!important;background-color:#1a1a1a!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:focus{background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:active{transform:translateY(0);background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:disabled{opacity:.6;cursor:not-allowed;transform:none;background:#000!important;background-color:#000!important;color:#fff!important;border:none!important}.wzc-submit-btn.loading{position:relative;color:transparent!important;background:#000!important;background-color:#000!important;border:none!important}.wzc-submit-btn.loading::after{content:'';position:absolute;width:20px;height:20px;top:50%;left:50%;margin-left:-10px;margin-top:-10px;border:3px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.wzc-form-message{padding:16px 20px;border-radius:12px;margin-bottom:24px;font-size:14px;font-weight:600;display:flex;align-items:center;gap:12px;animation:slideIn .3s ease}@keyframes slideIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.wzc-form-message.success{background:#d1fae5;color:#065f46;border:2px solid #10b981}.wzc-form-message.error{background:#fee2e2;color:#991b1b;border:2px solid #ef4444}.wzc-form-message svg{width:20px;height:20px;flex-shrink:0}@media (max-width:768px){.wzc-floating-container{bottom:20px;right:20px}.wzc-floating-container.position-left{left:20px}.wzc-action-btn{width:var(--wzc-action-button-size,52px);height:var(--wzc-action-button-size,52px)}.wzc-action-btn svg{width:24px;height:24px}.wzc-action-btn::before{display:none}.wzc-modal{width:95%;border-radius:20px}.wzc-modal-header{padding:32px 24px 16px 24px}.wzc-modal-title h2{font-size:28px}.wzc-modal-body{padding:16px 24px 32px 24px}.wzc-form{gap:16px}.wzc-form-row{grid-template-columns:1fr;gap:16px}}@media (max-width:480px){.wzc-action-btn{width:var(--wzc-action-button-size,48px);height:var(--wzc-action-button-size,48px)}.wzc-modal-header{padding:24px 20px 12px 20px}.wzc-modal-title h2{font-size:24px}.wzc-modal-body{padding:12px 20px 24px 20px}}
     1.wzc-floating-container{position:fixed;bottom:30px;right:30px;z-index:9999;display:flex;flex-direction:column;align-items:center;gap:0}.wzc-floating-container.position-left{right:auto;left:30px}.wzc-main-toggle{width:var(--wzc-button-size,64px);height:var(--wzc-button-size,64px);min-width:var(--wzc-button-size,64px);min-height:var(--wzc-button-size,64px);max-width:var(--wzc-button-size,64px);max-height:var(--wzc-button-size,64px);border-radius:50%!important;background:linear-gradient(135deg,var(--wzc-button-color,#667eea) 0,var(--wzc-button-color-dark,#764ba2) 100%);border:none!important;outline:0!important;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.1);transition:all .3s cubic-bezier(.4, 0, .2, 1);position:relative;z-index:10;order:2;overflow:hidden;flex-shrink:0}.wzc-main-toggle:hover{transform:scale(1.1);box-shadow:0 8px 24px rgba(0,0,0,.2),0 4px 8px rgba(0,0,0,.15)}.wzc-main-toggle:active{transform:scale(.95);box-shadow:0 2px 8px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.1)}.wzc-main-toggle:focus{outline:0!important;border:none!important}.wzc-toggle-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:transform .3s ease;display:flex;align-items:center;justify-content:center;width:var(--wzc-icon-size,32px);height:var(--wzc-icon-size,32px)}.wzc-toggle-icon svg{width:100%;height:100%;display:block;color:#fff}.wzc-main-toggle.active .wzc-toggle-icon{transform:translate(-50%,-50%) rotate(180deg)}.wzc-action-buttons{display:flex;flex-direction:column;align-items:center;gap:16px;order:1;margin-bottom:16px;max-height:0;overflow:visible;transition:all .4s cubic-bezier(.4, 0, .2, 1)}.wzc-floating-container.expanded .wzc-action-buttons{max-height:300px}.wzc-action-btn{width:var(--wzc-action-button-size,57px);height:var(--wzc-action-button-size,57px);min-width:var(--wzc-action-button-size,57px);min-height:var(--wzc-action-button-size,57px);max-width:var(--wzc-action-button-size,57px);max-height:var(--wzc-action-button-size,57px);border-radius:50%!important;border:none!important;outline:0!important;background:#fff!important;cursor:pointer;display:flex;align-items:center;justify-content:center;position:relative;opacity:0;transform:scale(0) translateY(20px);transition:all .3s cubic-bezier(.68, -.55, .265, 1.55);box-shadow:0 4px 12px rgba(0,0,0,.15),0 2px 4px rgba(0,0,0,.1);text-decoration:none;overflow:visible;flex-shrink:0}.wzc-floating-container.expanded .wzc-action-btn{opacity:1;transform:scale(1) translateY(0)}.wzc-floating-container.expanded .wzc-action-btn:first-child{transition-delay:50ms}.wzc-floating-container.expanded .wzc-action-btn:nth-child(2){transition-delay:0.1s}.wzc-floating-container.expanded .wzc-action-btn:nth-child(3){transition-delay:0.15s}.wzc-action-btn:hover{transform:scale(1.15) translateY(0);box-shadow:0 8px 24px rgba(0,0,0,.2),0 4px 8px rgba(0,0,0,.15)}.wzc-action-btn:active{transform:scale(.95) translateY(0);box-shadow:0 2px 8px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.1)}.wzc-action-btn:focus{outline:0!important;border:none!important}.wzc-action-btn svg{width:24px;height:24px;display:block}.wzc-action-btn.call svg,.wzc-action-btn.whatsapp svg{color:#25d366!important;fill:currentColor!important}.wzc-action-btn.contact svg{color:#4facfe!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}.wzc-action-btn.booking svg{color:#667eea!important;fill:none!important;stroke:currentColor!important;stroke-width:1.5!important;stroke-linecap:round!important;stroke-linejoin:round!important}.wzc-action-btn::before{content:attr(data-label);position:absolute;right:75px;top:50%;background:rgba(0,0,0,.85);color:#fff;padding:8px 16px;border-radius:8px;font-size:14px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transform:translateY(-50%) translateX(10px);transition:all .3s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-floating-container.position-left .wzc-action-btn::before{right:auto;left:75px;transform:translateY(-50%) translateX(-10px)}.wzc-floating-container.expanded .wzc-action-btn:hover::before{opacity:1;transform:translateY(-50%) translateX(0)}.wzc-floating-container.expanded.position-left .wzc-action-btn:hover::before{transform:translateY(-50%) translateX(0)}.wzc-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.3);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:all .3s ease;z-index:9998}.wzc-backdrop.active{opacity:1;visibility:visible}.wzc-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:10000;opacity:0;visibility:hidden;transition:all .3s ease}.wzc-modal-overlay.active{opacity:1;visibility:visible}.wzc-modal{background:#fff;border-radius:24px;padding:0;max-width:624px;width:90%;max-height:90vh;overflow:hidden;position:relative;box-shadow:0 24px 64px rgba(0,0,0,.3);transform:scale(.9) translateY(20px);transition:all .3s cubic-bezier(.4, 0, .2, 1)}.wzc-modal-overlay.active .wzc-modal{transform:scale(1) translateY(0)}.wzc-modal-header{background:#fff;padding:40px 40px 20px 40px;position:relative}.wzc-modal-close{position:absolute;top:24px;right:24px;background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1;padding:0!important}.wzc-modal-close:hover{background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-modal-close:focus{background:0 0!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-modal-close svg{width:18px;height:18px;stroke:#64748b;stroke-width:2.5;stroke-linecap:round;transition:transform .2s ease}.wzc-modal-close:hover svg{transform:scale(1.2)}.wzc-modal-title{position:relative}.wzc-modal-title h2{margin:0 0 12px 0;font-size:36px;font-weight:900;color:#000;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;letter-spacing:-.5px}.wzc-modal-title p{margin:0;color:#6b7280;font-size:15px;line-height:1.6;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-modal-body{padding:20px 40px 40px 40px}.wzc-form{display:flex;flex-direction:column;gap:16px}.wzc-form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}.wzc-form-group{position:relative}.wzc-form-group label{display:none}.wzc-form-group input,.wzc-form-group textarea{width:100%;padding:16px 20px!important;border:1px solid #9ca3af!important;border-radius:12px!important;font-size:15px!important;transition:all .2s ease;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif!important;background:#fff!important;background-color:#fff!important;color:#000!important;outline:0!important;box-shadow:none!important;margin:0!important;max-width:100%}.wzc-form-group input::placeholder,.wzc-form-group textarea::placeholder{color:#6b7280!important;opacity:1!important}.wzc-form-group input:focus,.wzc-form-group textarea:focus{outline:0!important;border-color:#6b7280!important;box-shadow:none!important;background:#fff!important;background-color:#fff!important}.wzc-form-group textarea{resize:vertical;min-height:120px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif}.wzc-submit-btn{width:100%;padding:18px 24px!important;background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important;border-radius:12px!important;font-size:14px!important;font-weight:600!important;cursor:pointer;transition:all .2s ease;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif!important;letter-spacing:1px!important;text-transform:uppercase!important;margin-top:8px;text-decoration:none!important}.wzc-submit-btn:hover{background:#1a1a1a!important;background-color:#1a1a1a!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:focus{background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:active{transform:translateY(0);background:#000!important;background-color:#000!important;color:#fff!important;border:none!important;outline:0!important;box-shadow:none!important}.wzc-submit-btn:disabled{opacity:.6;cursor:not-allowed;transform:none;background:#000!important;background-color:#000!important;color:#fff!important;border:none!important}.wzc-submit-btn.loading{position:relative;color:transparent!important;background:#000!important;background-color:#000!important;border:none!important}.wzc-submit-btn.loading::after{content:'';position:absolute;width:20px;height:20px;top:50%;left:50%;margin-left:-10px;margin-top:-10px;border:3px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.wzc-form-message{padding:16px 20px;border-radius:12px;margin-bottom:24px;font-size:14px;font-weight:600;display:flex;align-items:center;gap:12px;animation:slideIn .3s ease}@keyframes slideIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.wzc-form-message.success{background:#d1fae5;color:#065f46;border:2px solid #10b981}.wzc-form-message.error{background:#fee2e2;color:#991b1b;border:2px solid #ef4444}.wzc-form-message svg{width:20px;height:20px;flex-shrink:0}@media (max-width:768px){.wzc-floating-container{bottom:20px;right:20px}.wzc-floating-container.position-left{left:20px}.wzc-action-btn{width:var(--wzc-action-button-size,52px);height:var(--wzc-action-button-size,52px)}.wzc-action-btn svg{width:24px;height:24px}.wzc-action-btn::before{display:none}.wzc-modal{width:95%;border-radius:20px}.wzc-modal-header{padding:32px 24px 16px 24px}.wzc-modal-title h2{font-size:28px}.wzc-modal-body{padding:16px 24px 32px 24px}.wzc-form{gap:16px}.wzc-form-row{grid-template-columns:1fr;gap:16px}}@media (max-width:480px){.wzc-action-btn{width:var(--wzc-action-button-size,48px);height:var(--wzc-action-button-size,48px)}.wzc-modal-header{padding:24px 20px 12px 20px}.wzc-modal-title h2{font-size:24px}.wzc-modal-body{padding:12px 20px 24px 20px}}.wzc-main-toggle.wzc-animate-pulse{animation:wzc-pulse var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-bounce{animation:wzc-bounce var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-shake{animation:wzc-shake var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-swing{animation:wzc-swing var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-wobble{animation:wzc-wobble var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-spin{animation:wzc-spin var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-jello{animation:wzc-jello var(--wzc-animation-duration,1s) ease-in-out}.wzc-main-toggle.wzc-animate-tada{animation:wzc-tada var(--wzc-animation-duration,1s) ease-in-out}@keyframes wzc-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.15)}}@keyframes wzc-bounce{0%,100%,20%,50%,80%{transform:translateY(0)}40%{transform:translateY(-15px)}60%{transform:translateY(-8px)}}@keyframes wzc-shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-5px)}20%,40%,60%,80%{transform:translateX(5px)}}@keyframes wzc-swing{0%{transform:rotate(0)}20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-2deg)}100%{transform:rotate(0)}}@keyframes wzc-wobble{0%,100%{transform:translateX(0) rotate(0)}15%{transform:translateX(-8px) rotate(-5deg)}30%{transform:translateX(7px) rotate(3deg)}45%{transform:translateX(-6px) rotate(-3deg)}60%{transform:translateX(5px) rotate(2deg)}75%{transform:translateX(-3px) rotate(-1deg)}}@keyframes wzc-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes wzc-jello{0%,100%{transform:skewX(0) skewY(0)}11.1%{transform:skewX(-12.5deg) skewY(-12.5deg)}22.2%{transform:skewX(6.25deg) skewY(6.25deg)}33.3%{transform:skewX(-3.125deg) skewY(-3.125deg)}44.4%{transform:skewX(1.5625deg) skewY(1.5625deg)}55.5%{transform:skewX(-.78125deg) skewY(-.78125deg)}66.6%{transform:skewX(.390625deg) skewY(.390625deg)}77.7%{transform:skewX(-.1953125deg) skewY(-.1953125deg)}88.8%{transform:skewX(.09765625deg) skewY(.09765625deg)}}@keyframes wzc-tada{0%,100%{transform:scale(1) rotate(0)}10%,20%{transform:scale(.95) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.05) rotate(3deg)}40%,60%,80%{transform:scale(1.05) rotate(-3deg)}}
  • workzen-connector/trunk/assets/floating-buttons.min.js

    r3384724 r3384798  
    1 !function(){"use strict";function e(){const e=document.querySelector(".wzc-floating-container"),t=document.querySelector(".wzc-main-toggle"),o=document.querySelector(".wzc-backdrop"),n=document.querySelector(".wzc-action-btn.contact"),r=document.querySelector(".wzc-contact-modal-overlay"),s=document.querySelector(".wzc-contact-modal-overlay .wzc-modal-close"),i=document.getElementById("wzc-floating-form");if(!e||!t)return;const l={plus:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>',menu:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>',"dots-vertical":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg>',"dots-horizontal":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>',phone:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',message:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',chat:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>',help:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',star:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',heart:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',"chevron-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"/></svg>',"chat-dots":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25Z"/></svg>',x:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>'},c=t.getAttribute("data-icon")||"plus";function a(){e.classList.remove("expanded"),t.classList.remove("active"),o&&o.classList.remove("active")}function d(){if(r){r.classList.remove("active"),document.body.style.overflow="";const e=i.querySelector(".wzc-form-message");e&&e.remove()}}function u(e,t){const o=document.createElement("div");o.className="wzc-form-message "+t;const n="success"===t?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';o.innerHTML=n+"<span>"+e+"</span>",i.insertBefore(o,i.firstChild)}t.addEventListener("click",function(){const n=e.classList.contains("expanded"),r=t.querySelector(".wzc-toggle-icon");n?(r&&l[c]&&setTimeout(function(){r.innerHTML=l[c]},150),a()):(r&&l.x&&setTimeout(function(){r.innerHTML=l.x},150),e.classList.add("expanded"),t.classList.add("active"),o&&o.classList.add("active"))}),o&&o.addEventListener("click",function(){const e=t.querySelector(".wzc-toggle-icon");e&&l[c]&&setTimeout(function(){e.innerHTML=l[c]},150),a()}),n&&n.addEventListener("click",function(e){e.preventDefault();const o=t.querySelector(".wzc-toggle-icon");o&&l[c]&&setTimeout(function(){o.innerHTML=l[c]},150),r&&(r.classList.add("active"),document.body.style.overflow="hidden",setTimeout(function(){const e=i.querySelector('input[type="text"]');e&&e.focus()},300)),a()}),s&&s.addEventListener("click",d),r&&r.addEventListener("click",function(e){e.target===r&&d()}),i&&i.addEventListener("submit",function(e){e.preventDefault();const t=i.querySelector(".wzc-submit-btn"),o=new FormData(i),n=i.querySelector(".wzc-form-message");n&&n.remove();const r=o.get("name"),s=o.get("email"),l=o.get("phone");if(!r||!s||!l)return void u("Please fill in all required fields.","error");if(!function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}(s))return void u("Please enter a valid email address.","error");t.disabled=!0,t.classList.add("loading");const c=t.textContent;t.textContent="Sending...";const a=new FormData;a.append("action","wzconnector_submit_floating_form"),a.append("nonce",wzcFloating.nonce),a.append("name",o.get("name")),a.append("email",o.get("email")),a.append("phone",o.get("phone")),a.append("message",o.get("message")||""),fetch(wzcFloating.ajax_url,{method:"POST",body:a}).then(function(e){return e.json()}).then(function(e){e.success?(u(wzcFloating.thankyou_message,"success"),i.reset(),setTimeout(function(){d()},2e3)):u(e.data.message||"Something went wrong. Please try again.","error")}).catch(function(e){console.error("Form submission error:",e),u("Something went wrong. Please try again.","error")}).finally(function(){t.disabled=!1,t.classList.remove("loading"),t.textContent=c})}),document.addEventListener("keydown",function(o){if("Escape"===o.key)if(r&&r.classList.contains("active"))d();else if(e.classList.contains("expanded")){const e=t.querySelector(".wzc-toggle-icon");e&&l[c]&&setTimeout(function(){e.innerHTML=l[c]},150),a()}})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();
     1!function(){"use strict";function e(){const e=document.querySelector(".wzc-floating-container"),t=document.querySelector(".wzc-main-toggle"),n=document.querySelector(".wzc-backdrop"),o=document.querySelector(".wzc-action-btn.contact"),r=document.querySelector(".wzc-contact-modal-overlay"),i=document.querySelector(".wzc-contact-modal-overlay .wzc-modal-close"),s=document.getElementById("wzc-floating-form");if(!e||!t)return;const a={plus:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>',menu:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>',"dots-vertical":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="5" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="12" cy="19" r="2"/></svg>',"dots-horizontal":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>',phone:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',message:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>',chat:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>',help:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',star:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',heart:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>',settings:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',"chevron-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="18 15 12 9 6 15"/></svg>',"chat-dots":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25Z"/></svg>',x:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>'},c=t.getAttribute("data-icon")||"plus";function l(){e.classList.remove("expanded"),t.classList.remove("active"),n&&n.classList.remove("active")}function u(){r&&(r.classList.add("active"),document.body.style.overflow="hidden",setTimeout(function(){const e=s.querySelector('input[type="text"]');e&&e.focus()},300))}function d(){if(r){r.classList.remove("active"),document.body.style.overflow="";const e=s.querySelector(".wzc-form-message");e&&e.remove(),g()}}function w(e,t){const n=document.createElement("div");n.className="wzc-form-message "+t;const o="success"===t?'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';n.innerHTML=o+"<span>"+e+"</span>",s.insertBefore(n,s.firstChild)}function g(){try{const e=parseInt(wzcFloating.auto_popup_cookie_days)||7,t=new Date;t.setDate(t.getDate()+e),localStorage.setItem("wzc_auto_popup_dismissed",t.toISOString())}catch(e){console.warn("Failed to set auto-popup dismissal:",e)}}t.addEventListener("click",function(){const o=e.classList.contains("expanded"),r=t.querySelector(".wzc-toggle-icon");o?(r&&a[c]&&setTimeout(function(){r.innerHTML=a[c]},150),l()):(r&&a.x&&setTimeout(function(){r.innerHTML=a.x},150),e.classList.add("expanded"),t.classList.add("active"),n&&n.classList.add("active"))}),n&&n.addEventListener("click",function(){const e=t.querySelector(".wzc-toggle-icon");e&&a[c]&&setTimeout(function(){e.innerHTML=a[c]},150),l()}),o&&o.addEventListener("click",function(e){e.preventDefault();const n=t.querySelector(".wzc-toggle-icon");n&&a[c]&&setTimeout(function(){n.innerHTML=a[c]},150),u(),l()}),i&&i.addEventListener("click",d),r&&r.addEventListener("click",function(e){e.target===r&&d()}),s&&s.addEventListener("submit",function(e){e.preventDefault();const t=s.querySelector(".wzc-submit-btn"),n=new FormData(s),o=s.querySelector(".wzc-form-message");o&&o.remove();const r=n.get("name"),i=n.get("email"),a=n.get("phone");if(!r||!i||!a)return void w("Please fill in all required fields.","error");if(!function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}(i))return void w("Please enter a valid email address.","error");t.disabled=!0,t.classList.add("loading");const c=t.textContent;t.textContent="Sending...";const l=new FormData;l.append("action","wzconnector_submit_floating_form"),l.append("nonce",wzcFloating.nonce),l.append("name",n.get("name")),l.append("email",n.get("email")),l.append("phone",n.get("phone")),l.append("message",n.get("message")||""),fetch(wzcFloating.ajax_url,{method:"POST",body:l}).then(function(e){return e.json()}).then(function(e){e.success?(w(wzcFloating.thankyou_message,"success"),s.reset(),g(),setTimeout(function(){d()},2e3)):w(e.data.message||"Something went wrong. Please try again.","error")}).catch(function(e){console.error("Form submission error:",e),w("Something went wrong. Please try again.","error")}).finally(function(){t.disabled=!1,t.classList.remove("loading"),t.textContent=c})}),document.addEventListener("keydown",function(n){if("Escape"===n.key)if(r&&r.classList.contains("active"))d();else if(e.classList.contains("expanded")){const e=t.querySelector(".wzc-toggle-icon");e&&a[c]&&setTimeout(function(){e.innerHTML=a[c]},150),l()}}),function(){if(!wzcFloating.auto_popup_enabled||"0"===wzcFloating.auto_popup_enabled)return;if(!r)return;if(!function(){try{const e=localStorage.getItem("wzc_auto_popup_dismissed");if(!e)return!0;const t=new Date(e);return new Date>t}catch(e){return console.warn("localStorage not available:",e),!1}}())return;const e=1e3*parseInt(wzcFloating.auto_popup_delay)||3e4;setTimeout(function(){r.classList.contains("active")||u()},e)}(),function(){if(!wzcFloating.animation_enabled||"0"===wzcFloating.animation_enabled)return;if(!t)return;const n=wzcFloating.animation_type||"pulse",o=1e3*parseInt(wzcFloating.animation_delay)||5e3,r=wzcFloating.animation_speed||"normal",i=wzcFloating.animation_repeat||"periodic",s="1"===wzcFloating.animation_stop_on_interact;t.style.setProperty("--wzc-animation-duration",{slow:"1.5s",normal:"1s",fast:"0.6s"}[r]),setTimeout(function(){!function(n,o){if(!t)return;const r="wzc-animate-"+n;function i(){e.classList.contains("expanded")||(t.classList.add(r),setTimeout(function(){t.classList.remove(r)},1500))}m=r,i(),"periodic"===o?v=setInterval(function(){i()},1e4):"continuous"===o&&(t.style.setProperty("animation-iteration-count","infinite"),t.classList.add(r))}(n,i)},o),s&&t&&t.addEventListener("click",p,{once:!0})}();let v=null,m=null;function p(){v&&(clearInterval(v),v=null),t&&m&&(t.classList.remove(m),t.style.removeProperty("animation-iteration-count"),m=null)}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();
Note: See TracChangeset for help on using the changeset viewer.