1(function(){ 2/** 3 * jQuery FocusPoint; version: 1.1.3 4 * Author: http://jonathonmenz.com 5 * Source: https://github.com/jonom/jquery-focuspoint 6 * Copyright (c) 2014 J. Menz; MIT License 7 * @preserve 8 */ 9(function(t){const n={reCalcOnWindowResize:!0,throttleDuration:17},i=function(t){const n=t.find("img").attr("src");t.data("imageSrc",n),o(n,((n,i)=>{t.data({imageW:i.width,imageH:i.height}),c(t)}))};var o=function(n,i){t("<img />").one("load",(function(){i(null,{width:this.width,height:this.height})})).attr("src",n)};const e=function(t,n){let i=!1;return function(){const o=Array.prototype.slice.call(arguments,0);if(i)return!1;i=!0,setTimeout((()=>{i=!1,t(...o)}),n)}},a=function(t,n,i,o,e){const a=Math.floor(n/2),c=(o+1)/2,r=Math.floor(i/t);let s=Math.floor(c*r);e&&(s=r-s);let f=s-a;const u=r-s,h=n-a;return u<h&&(f-=h-u),f<0&&(f=0),-100*f/n+"%"};var c=function(t){const n=t.data("imageW"),o=t.data("imageH"),e=t.data("imageSrc");if(!n&&!o&&!e)return i(t);const c=t.width(),r=t.height(),s=parseFloat(t.data("focusX")),f=parseFloat(t.data("focusY")),u=t.find("img").first();let h=0,d=0;if(!(c>0&&r>0&&n>0&&o>0))return!1;const l=n/c,w=o/r;u.css({"max-width":"","max-height":""}),n>c&&o>r&&u.css(l>w?"max-height":"max-width","100%"),l>w?h=a(w,c,n,s):l<w&&(d=a(l,r,o,f,!0)),u.css({top:d,left:h})};const r=t(window),s=function(t,n){const i=n.throttleDuration?e((()=>{c(t)}),n.throttleDuration):function(){c(t)};let o=!1;return c(t),{adjustFocus(){return c(t)},windowOn(){if(!o)return r.on("resize",i),o=!0},windowOff(){if(o)return r.off("resize",i),o=!1,!0}}};t.fn.focusPoint=function(i){if("string"===typeof i)return this.each((function(){const n=t(this);n.data("focusPoint")[i]()}));const o=t.extend({},n,i);return this.each((function(){const n=t(this),i=s(n,o);n.data("focusPoint")&&n.data("focusPoint").windowOff(),n.data("focusPoint",i),o.reCalcOnWindowResize&&i.windowOn()}))},t.fn.adjustFocus=function(){return this.each((function(){c(t(this))}))}})(jQuery)})(); 10//# sourceMappingURL=jsfocuspoint.js.map
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.