[Back]
(()=>{"use strict";var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.jQuery;var o=t.n(e);const n=o()(window);function i(t,e,o,n){const i=(n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x),s=(n.x-o.x)*(e.y-o.y)-(n.y-o.y)*(e.x-o.x),r=(e.x-t.x)*(o.y-t.y)-(e.y-t.y)*(o.x-t.x),a=(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x);return i*s<=0&&r*a<=0}o()(document).on("initEvents.vpf",((t,e)=>{if("vpf"!==t.namespace||"fly"!==e.options.itemsStyle)return;const s=`.vpf-uid-${e.uid}`;let r={};n.on(`mousemove${s}`,(t=>{r={x:t.clientX,y:t.clientY}})),e.$item.on(`mouseenter${s} mouseleave${s}`,".vp-portfolio__item",(function(t){const e=o()(this),n=e[0].getBoundingClientRect(),s=e.find(".vp-portfolio__item-overlay"),a="mouseenter"===t.type;let y="0%",f="0%";const l={x:t.clientX,y:t.clientY};let p=i({x:n.left,y:n.top},{x:n.left+n.width,y:n.top},l,r),x=i({x:n.left,y:n.top+n.height},{x:n.left+n.width,y:n.top+n.height},l,r),u=i({x:n.left,y:n.top},{x:n.left,y:n.top+n.height},l,r),c=i({x:n.left+n.width,y:n.top},{x:n.left+n.width,y:n.top+n.height},l,r);if(!(p||x||u||c)){const t=(n.width/2-l.x+n.left)/(n.width/2),e=(n.height/2-l.y+n.top)/(n.height/2);Math.abs(t)>Math.abs(e)?t>0?u=!0:c=!0:e>0?p=!0:x=!0}p?f="-100.1%":x?f="100.1%":u?y="-100.1%":c&&(y="100.1%"),a&&(s.css({transition:"none",transform:`translateX(${y}) translateY(${f}) translateZ(0)`}),s[0].offsetHeight),s.css({transition:".2s transform ease-in-out",transform:`translateX(${a?"0%":y}) translateY(${a?"0%":f}) translateZ(0)`})}))})),o()(document).on("destroyEvents.vpf",((t,e)=>{if("vpf"!==t.namespace||"fly"!==e.options.itemsStyle)return;const o=`.vpf-uid-${e.uid}`;n.off(`mousemove${o}`),e.$item.off(`mouseenter${o} mouseleave${o}`)}))})();