1(function(c){function E(){return c("<div/>")}var x=Math.abs,o=Math.max,n=Math.min,j=Math.round;c.imgAreaSelect=function(k,b){function I(a){return a+J.left-K.left}function L(a){return a+J.top-K.top}function F(a){return a-J.left+K.left}function G(a){return a-J.top+K.top}function O(a){a=za(a)||a;if(a=parseInt(a.pageX,10))return a-K.left}function P(a){a=za(a)||a;if(a=parseInt(a.pageY,10))return a-K.top}function za(a){a=a.originalEvent||{};return a.touches&&a.touches.length?a.touches[0]:false}function C(a){var i= 2a||T;a=a||U;return{x1:j(d.x1*i),y1:j(d.y1*a),x2:j(d.x2*i)-1,y2:j(d.y2*a)-1,width:j(d.x2*i)-j(d.x1*i),height:j(d.y2*a)-j(d.y1*a)}}function ha(a,i,v,aa,V){var Aa=V||T;V=V||U;d={x1:j(a/Aa||0),y1:j(i/V||0),x2:j(++v/Aa||0),y2:j(++aa/V||0)};d.width=d.x2-d.x1;d.height=d.y2-d.y1}function M(){if(ba&&w.width()){J={left:j(w.offset().left),top:j(w.offset().top)};t=w.innerWidth();u=w.innerHeight();J.top+=w.outerHeight()-u>>1;J.left+=w.outerWidth()-t>>1;W=j(b.minWidth/T)||0;X=j(b.minHeight/U)||0;ia=j(n(b.maxWidth/ 3T||16777216,t));ja=j(n(b.maxHeight/U||16777216,u));K=ka==="fixed"?{left:c(document).scrollLeft(),top:c(document).scrollTop()}:/static|^$/.test(Q.css("position"))?{left:0,top:0}:{left:j(Q.offset().left)-Q.scrollLeft(),top:j(Q.offset().top)-Q.scrollTop()};q=I(0);r=L(0);if(d.x2>t||d.y2>u)la()}}function ca(a){if(da){m.css({left:I(d.x1),top:L(d.y1)}).add(Y).width(y=d.width).height(z=d.height);Y.add(A).add(l).css({left:0,top:0});A.add(p).width(o(y-A.outerWidth()+A.innerWidth(),0)).height(o(z-A.outerHeight()+ 4A.innerHeight(),0));p.css({left:q,top:r,width:y,height:z,borderStyle:"solid",borderWidth:d.y1+"px "+(t-d.x2)+"px "+(u-d.y2)+"px "+d.x1+"px"});y-=l.outerWidth();z-=l.outerHeight();switch(l.length){case 8:c(l[4]).css({left:y>>1});c(l[5]).css({left:y,top:z>>1});c(l[6]).css({left:y>>1,top:z});c(l[7]).css({top:z>>1});l.slice(1,3).css({left:y});l.slice(2,4).css({top:z});break;case 4:c(l[4]).css({left:y>>1});c(l[5]).css({left:y,top:z>>1});c(l[6]).css({left:y>>1,top:z});c(l[7]).css({top:z>>1});l.slice(1, 53).css({left:y});l.slice(2,4).css({top:z})}if(a!==false){c.imgAreaSelect.keyPress!==Ba&&c(document).unbind(c.imgAreaSelect.keyPress,c.imgAreaSelect.onKeyPress);if(b.keys)c(document)[c.imgAreaSelect.keyPress](c.imgAreaSelect.onKeyPress=Ba)}}}function ma(a){M();ca(a);e=I(d.x1);f=L(d.y1);g=I(d.x2);h=L(d.y2)}function na(a,i){b.fadeDuration?a.fadeOut(b.fadeDuration,i):a.hide()}function oa(a){return R&&!/^touch/.test(a.type)}function Ca(a){var i=F(O(a))-d.x1;a=G(P(a))-d.y1;s="";if(b.resizable){if(a<=b.resizeMargin)s= 6"n";else if(a>=d.height-b.resizeMargin)s="s";if(i<=b.resizeMargin)s+="w";else if(i>=d.width-b.resizeMargin)s+="e"}m.css("cursor",s?s+"-resize":b.movable?"move":"")}function N(a){if(!oa(a)){if(!pa){M();pa=true;m.one("mouseout",function(){pa=false})}Ca(a)}}function qa(a){R=false;c("body").css("cursor","");if(b.autoHide||d.width*d.height===0)na(m.add(p),function(){c(this).hide()});c(document).off("mousemove touchmove",ra);m.on("mousemove touchmove",N);a&&b.onSelectEnd(k,C())}function Da(a){if(a.type=== 7"mousedown"&&a.which!==1)return false;if(a.type==="touchstart"){R&&qa();R=true;Ca(a)}else M();if(s){e=I(d["x"+(1+/w/.test(s))]);f=L(d["y"+(1+/n/.test(s))]);g=I(d["x"+(1+!/w/.test(s))]);h=L(d["y"+(1+!/n/.test(s))]);sa=g-O(a);ta=h-P(a);c(document).on("mousemove touchmove",ra).one("mouseup touchend",qa);m.off("mousemove touchmove",N)}else if(b.movable){ua=q+d.x1-O(a);va=r+d.y1-P(a);m.off("mousemove touchmove",N);c(document).on("mousemove touchmove",Ea).one("mouseup touchend",function(){R=false;b.onSelectEnd(k, 8C());c(document).off("mousemove touchmove",Ea);m.on("mousemove touchmove",N)})}else w.mousedown(a);return false}function Z(a){if(D)if(a){g=o(q,n(q+t,e+x(h-f)*D*(g>e||-1)));h=j(o(r,n(r+u,f+x(g-e)/D*(h>f||-1))));g=j(g)}else{h=o(r,n(r+u,f+x(g-e)/D*(h>f||-1)));g=j(o(q,n(q+t,e+x(h-f)*D*(g>e||-1))));h=j(h)}}function la(){e=n(e,q+t);f=n(f,r+u);if(x(g-e)<W){g=e-W*(g<e||-1);if(g<q)e=q+W;else if(g>q+t)e=q+t-W}if(x(h-f)<X){h=f-X*(h<f||-1);if(h<r)f=r+X;else if(h>r+u)f=r+u-X}g=o(q,n(g,q+t));h=o(r,n(h,r+u));Z(x(g- 9e)<x(h-f)*D);if(x(g-e)>ia){g=e-ia*(g<e||-1);Z()}if(x(h-f)>ja){h=f-ja*(h<f||-1);Z(true)}d={x1:F(n(e,g)),x2:F(o(e,g)),y1:G(n(f,h)),y2:G(o(f,h)),width:x(g-e),height:x(h-f)}}function wa(){la();ca();b.onSelectChange(k,C())}function ra(a){if(!oa(a)){la();g=/w|e|^$/.test(s)||D?O(a)+sa:I(d.x2);
9h=/n|s|^$/.test(s)||D?P(a)+ta:L(d.y2);wa();return false}}function $(a,i){g=(e=a)+d.width;h=(f=i)+d.height;c.extend(d,{x1:F(e),y1:G(f),x2:F(g),y2:G(h)});ca();b.onSelectChange(k,C())}function Ea(a){if(!oa(a)){e=o(q,n(ua+ 10O(a),q+t-d.width));f=o(r,n(va+P(a),r+u-d.height));$(e,f);a.preventDefault();return false}}function xa(){c(document).off("mousemove touchmove",xa);M();g=e;h=f;wa();s="";p.is(":visible")||m.add(p).hide().fadeIn(b.fadeDuration||0);da=true;c(document).off("mouseup touchend",ea).on("mousemove touchmove",ra).one("mouseup touchend",qa);m.off("mousemove touchmove",N);b.onSelectStart(k,C())}function ea(){c(document).off("mousemove touchmove",xa).off("mouseup touchend",ea);na(m.add(p));ha(F(e),G(f),F(e),G(f)); 11if(!(this instanceof c.imgAreaSelect)){b.onSelectChange(k,C());b.onSelectEnd(k,C())}}function Fa(a){if(a.type==="mousedown"&&a.which!==1||p.is(":animated"))return false;R=a.type==="touchstart";M();ua=e=O(a);va=f=P(a);sa=ta=0;c(document).on({"mousemove touchmove":xa,"mouseup touchend":ea});return false}function Ga(){ma(false)}function Ha(){ba=true;ya(b=c.extend({classPrefix:"imgareaselect",movable:true,parent:"body",resizable:true,resizeMargin:10,onInit:function(){},onSelectStart:function(){},onSelectChange:function(){}, 12onSelectEnd:function(){}},b));if(b.show){da=true;M();ca();m.add(p).hide().fadeIn(b.fadeDuration||0)}setTimeout(function(){b.onInit(k,C())},0)}function ya(a){if(a.parent)(Q=c(a.parent)).append(m).append(p);c.extend(b,a);M();if(a.handles!=null){l.remove();l=c([]);for(S=a.handles?a.handles==="corners"?4:8:0;S--;)l=l.add(E());l.addClass(b.classPrefix+"-handle").css({position:"absolute",fontSize:0,zIndex:H+1||1});parseInt(l.css("width"),10)>=0&&l.width(5).height(5)}T=b.imageWidth/t||1;U=b.imageHeight/ 13u||1;if(a.x1!=null){ha(a.x1,a.y1,a.x2,a.y2);a.show=!a.hide}if(a.keys)b.keys=c.extend({shift:1,ctrl:"resize"},a.keys);p.addClass(b.classPrefix+"-outer");Y.addClass(b.classPrefix+"-selection");m.addClass(b.classPrefix+"-box");for(S=0;S++<4;)c(A[S-1]).addClass(b.classPrefix+"-border"+S);m.append(Y.add(A)).append(l);if(fa){if(ga=(p.css("filter")||"").match(/opacity=(\d+)/))p.css("opacity",ga[1]/100);if(ga=(A.css("filter")||"").match(/opacity=(\d+)/))A.css("opacity",ga[1]/100)}if(a.hide)na(m.add(p));else if(a.show&& 14ba){da=true;m.add(p).fadeIn(b.fadeDuration||0);ma()}D=(Ia=(b.aspectRatio||"").split(/:/))[0]/Ia[1];w.add(p).off("mousedown touchstart",Fa);if(b.disable||b.enable===false){m.off({"mousemove touchmove":N,"mousedown touchstart":Da});c(window).off("resize",Ga)}else{if(b.enable||b.disable===false){if(b.resizable||b.movable)m.on({"mousemove touchmove":N,"mousedown touchstart":Da});c(window).resize(Ga)}b.persistent||w.add(p).on("mousedown touchstart",Fa)}b.enable=b.disable=undefined}var w=c(k),ba,m=E(), 15Y=E(),A=E().add(E()).add(E()).add(E()),p=E(),l=c([]),q,r,J={left:0,top:0},t,u,Q,K={left:0,top:0},H=0,ka="absolute",ua,va,sa,ta,T,U,s,W,X,ia,ja,D,da,e,f,g,h,d={x1:0,y1:0,x2:0,y2:0,width:0,height:0},B=navigator.userAgent,R,Ia,S,ga,y,z,pa,Ba=function(a){var i=b.keys,v,aa=a.keyCode;v=!isNaN(i.alt)&&(a.altKey||a.originalEvent.altKey)?i.alt:!isNaN(i.ctrl)&&a.ctrlKey?i.ctrl:!isNaN(i.shift)&&a.shiftKey?i.shift:!isNaN(i.arrows)?i.arrows:10;if(i.arrows==="resize"||i.shift==="resize"&&a.shiftKey||i.ctrl==="resize"&& 16a.ctrlKey||i.alt==="resize"&&(a.altKey||a.originalEvent.altKey)){switch(aa){case 37:break;case 39:v=-v;a=o(e,g);e=n(e,g);g=o(a+v,e);Z();break;case 38:break;case 40:v=-v;a=o(f,h);f=n(f,h);h=o(a+v,f);Z(true);break;default:return}wa()}else{e=n(e,g);f=n(f,h);switch(aa){case 37:$(o(e-v,q),f);break;case 38:$(e,o(f-v,r));break;case 39:$(e+n(v,t-F(g)),f);break;case 40:$(e,f+n(v,u-G(h)));break;default:return}}return false};this.remove=function(){ya({disable:true});m.add(p).remove()};this.getOptions=function(){return b}; 17this.setOptions=ya;this.getSelection=C;this.setSelection=ha;this.cancelSelection=ea;this.update=ma;var fa=(/msie ([\w.]+)/i.exec(B)||[])[1],Ja=/webkit/i.test(B)&&!/chrome/i.test(B);for(B=w;B.length;){H=o(H,!isNaN(B.css("z-index"))?B.css("z-index"):H);if(!b.parent&&B.css("position")==="fixed")ka="fixed";B=B.parent(":not(body)")}H=b.zIndex||H;c.imgAreaSelect.keyPress=fa||Ja?"keydown":"keypress";m.add(p).hide().css({position:ka,overflow:"hidden",zIndex:H||"0"});m.css({zIndex:H+2||2});Y.add(A).css({position:"absolute", 18fontSize:0});k.complete||k.readyState==="complete"||!w.is("img")?Ha():w.one("load",Ha);if(!ba&&fa&&fa>=7)k.src=k.src};c.fn.imgAreaSelect=function(k){k=k||{};this.each(function(){if(c(this).data("imgAreaSelect"))if(k.remove){c(this).data("imgAreaSelect").remove();c(this).removeData("imgAreaSelect")}else c(this).data("imgAreaSelect").setOptions(k);else if(!k.remove){if(k.enable===undefined&&k.disable===undefined)k.enable=true;c(this).data("imgAreaSelect",new c.imgAreaSelect(this,k))}});if(k.instance)return c(this).data("imgAreaSelect"); 19return this}})(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.