1(function(window, document, $) { 2 3 "use strict"; 4 5 /* cursorPoint */ 6 function cursorPoint1() { 7 8 var cursor1 = document.querySelectorAll('body:not(.elementor-msie) .cursor1'); 9 10 if ( !cursor1.length ) { 11 return; 12 } 13 14 const updateProperties = function(elem, state) { 15 16 elem.style.setProperty('--x', `${ state.x }px`) 17 elem.style.setProperty('--y', `${ state.y }px`) 18 elem.style.setProperty('--width', `${ state.width }px`) 19 elem.style.setProperty('--height', `${ state.height }px`) 20 elem.style.setProperty('--radius', state.radius) 21 elem.style.setProperty('--scale', state.scale) 22 23 }; 24 25 document.querySelectorAll('.cursor1').forEach((cursor) => { 26 let cursorw = $('.cursor1').width(), 27 cursorww = cursorw == 0 ? 15 : cursorw; 28 let onElement 29 30 const createState = (e) => { 31 32 const defaultState = { 33 x: e.clientX, 34 y: e.clientY, 35 width: cursorww, 36 height: cursorww, 37 radius: '100px' 38 } 39 40 const computedState = {} 41 42 if (onElement != null) { 43 const { 44 top, 45 left, 46 width, 47 height 48 } = onElement.getBoundingClientRect() 49 const radius = window.getComputedStyle(onElement).borderTopLeftRadius 50 51 computedState.x = left + width / 2 52 computedState.y = top + height / 2 53 computedState.width = width + 10 54 computedState.height = height + 10 55 computedState.radius = radius 56 } 57 58 return { 59 ...defaultState, 60 ...computedState 61 } 62 63 } 64 65 document.addEventListener('mousemove', (e) => { 66 const state = createState(e) 67 updateProperties(cursor, state) 68 }); 69 70 }); 71 72 } 73 74 75 /* cursorPoint3 */ 76 function cursorPoint2() { 77 var cursor2 = document.querySelectorAll('body:not(.elementor-msie) .cursor2'); 78 if ( !cursor2.length ) { 79 return; 80 } 81 82 const updateProperties = (elem, state) => { 83 84 elem.style.setProperty('--x', `${ state.x }px`) 85 elem.style.setProperty('--y', `${ state.y }px`) 86 elem.style.setProperty('--width', `${ state.width }px`) 87 elem.style.setProperty('--height', `${ state.height }px`) 88 elem.style.setProperty('--radius', state.radius) 89 elem.style.setProperty('--scale', state.scale) 90 91 } 92 93 document.querySelectorAll('.cursor2').forEach((cursor) => { 94 95 let onElement 96 97 const createState = (e) => { 98 99 const defaultState = { 100 x: e.clientX, 101 y: e.clientY, 102 width: 40, 103 height: 40, 104 radius: '100px' 105 } 106 107 const computedState = {} 108 109 if (onElement != null) { 110 const { 111 top, 112 left, 113 width, 114 height 115 } = onElement.getBoundingClientRect() 116 const radius = window.getComputedStyle(onElement).borderTopLeftRadius 117 118 computedState.x = left + width / 2 119 computedState.y = top + height / 2 120 computedState.width = width + 10 121 computedState.height = height + 10 122 computedState.radius = radius 123 } 124 125 return { 126 ...defaultState, 127 ...computedState 128 } 129 130 } 131 132 document.addEventListener('mousemove', (e) => { 133 const state = createState(e) 134 updateProperties(cursor, state) 135 }); 136 137 document.querySelectorAll('a,.swiper-button-next, .swiper-button-prev, .menu-icon, .social .icon, .slick-arrow, .progress-wrap, .portfolio .filter span, .vid-btn .icon').forEach((elem) => { 138 elem.addEventListener('mouseenter', () => onElement = elem) 139 elem.addEventListener('mouseleave', () => onElement = undefined) 140 }); 141 142 }); 143 } 144 145 function cursorPoint3() { 146 if ($(".cursor-type-3").length) { 147 $("body").addClass('has-cursor-type-3'); 148 const e = document.querySelector(".cursor-inner"), 149 t = document.querySelector(".cursor-outer"); 150 let n, i = 0, 151 o = !1; 152 window.onmousemove = function (s) { 153 o || (t.style.transform = "translate(" + s.clientX + "px, " + s.clientY + "px)"), e.style.transform = "translate(" + s.clientX + "px, " + s.clientY + "px)", n = s.clientY, i = s.clientX 154 }, $("body").on("mouseenter", "a, .cursor-pointer", function () { 155 e.classList.add("cursor-hover"), t.classList.add("cursor-hover") 156 }), $("body").on("mouseleave", "a, .cursor-pointer", function () { 157 $(this).is("a") && $(this).closest(".cursor-pointer").length || (e.classList.remove("cursor-hover"), t.classList.remove("cursor-hover")) 158 }), e.style.visibility = "visible", t.style.visibility = "visible" 159 } 160 } 161 162 $(document).ready(function() { 163 var is_ie = $('body'); 164 165 if ( is_ie.hasClass('elementor-msie')) { 166 return; 167 168 } else { 169 170 cursorPoint1(); 171 cursorPoint2(); 172 cursorPoint3(); 173 } 174 175 }); 176 177})(window, document, jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.