Sindbad~EG File Manager
!function(p,t){var i,o,e,r=!/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent),h=(i=p,o=t,e=r,s.prototype.attach=function(){var t,e,r;this.$elem.wrap(this.$wrapper),this.$cropper.insertAfter(this.$elem),this.$wrapper=this.$elem.parent(),this.$cropper[0].getAttribute("style")||(t=this.$wrapper.width(),e=this.$wrapper.height(),r=Math.abs(t-e),this.$cropper.css("width",Math.min(t,e)),this.$cropper.css("height",Math.min(t,e)),this.$cropper.css("top",t<e?Math.floor(r/2):""),this.$cropper.css("left",e<t?Math.floor(r/2):"")),void 0!==o&&(this.hammertime||(this.hammertime=new o.Manager(this.$cropper[0]),this.hammertime.add(new o.Pan({direction:o.DIRECTION_ALL,treshhold:0})),this.hammertime.on("pan panstart panend",t=>{t.srcEvent.stopPropagation(),t.srcEvent.preventDefault(),"panstart"===t.type?(this.disableDesktopEvents(),this.onTouch(t)):"pan"===t.type?this.onDragOrResize(t):(this.onRelease(t),this.enableDesktopEvents())})),this.enableDesktopEvents())},s.prototype.detach=function(){this.$cropper.detach(),this.$elem.parent().is(this.$wrapper)&&this.$elem.unwrap()},s.prototype.measure=function(){var t=this.$elem,e=this.$wrapper[0],r=this.$cropper.position();return{imageWidth:t.width(),imageHeight:t.height(),wrapperTop:e.scrollTop,wrapperLeft:e.scrollLeft,wrapperWidth:this.$wrapper.width(),wrapperHeight:this.$wrapper.height(),cropperTop:r.top+e.scrollTop,cropperLeft:r.left+e.scrollLeft,cropperWidth:this.$cropper.outerWidth(),cropperHeight:this.$cropper.outerHeight()}},s.prototype.getPointerPosition=function(t,e){var r=this.$cropper.offset();return{top:e-r.top+this.$wnd.scrollTop(),left:t-r.left+this.$wnd.scrollLeft()}},s.prototype.getResizeDirection=function(t){var t=this.getPointerPosition(t.center.x,t.center.y),e=this.measurements,r="";return t.top<25?r+="n":t.top>e.cropperHeight-25&&(r+="s"),t.left<25?r+="w":t.left>e.cropperWidth-25&&(r+="e"),r},s.prototype.getSelection=function(){return{x:this.measurements.cropperLeft,y:this.measurements.cropperTop,width:this.measurements.cropperWidth,height:this.measurements.cropperHeight}},s.prototype.onTouch=function(t){this.released=!1,this.measurements=this.measure(),this.direction=this.getResizeDirection(t)},s.prototype.onDragOrResize=function(t){this.direction?this.onResize(t):this.onDrag(t)},s.prototype.onDrag=function(t){var e=this.measurements,r=t.deltaY,t=t.deltaX;this.released||(t=Math.min(t,e.imageWidth-e.cropperWidth-e.cropperLeft),t=Math.max(t,0-e.cropperLeft),r=Math.min(r,e.imageHeight-e.cropperHeight-e.cropperTop),r=Math.max(r,0-e.cropperTop),this.$cropper.css({webkitTransform:e="translate3d("+t+"px, "+r+"px, 0)",mozTransform:e,transform:e}))},s.prototype.onResize=function(t){var e=this.direction,r=this.measurements,p={};this.released||(e.match(/n/)?(p.top="auto",p.bottom=r.wrapperHeight-r.cropperTop-r.cropperHeight,p.height=r.cropperHeight-t.deltaY):e.match(/s/)&&(p.bottom="auto",p.top=r.cropperTop,p.height=r.cropperHeight+t.deltaY),e.match(/e/)?(p.right="auto",p.left=r.cropperLeft,p.width=r.cropperWidth+t.deltaX):e.match(/w/)&&(p.left="auto",p.right=r.wrapperWidth-r.cropperLeft-r.cropperWidth,p.width=r.cropperWidth-t.deltaX),p.width=p.height=Math.max(p.width||0,p.height||0,64),e.match(/n/)?p.height=Math.min(p.height,r.wrapperHeight-p.bottom):e.match(/s/)?p.height=Math.min(p.height,r.imageHeight-p.top):"auto"!==this.$cropper[0].style.top?p.height=Math.min(p.height,r.imageHeight-parseInt(this.$cropper.css("top"))):p.height=Math.min(p.height,r.wrapperHeight-parseInt(this.$cropper.css("bottom"))),e.match(/e/)?p.width=Math.min(p.width,r.imageWidth-p.left):e.match(/w/)?p.width=Math.min(p.width,r.wrapperWidth-p.right):"auto"!==this.$cropper[0].style.left?p.width=Math.min(p.width,r.imageWidth-parseInt(this.$cropper.css("left"))):p.width=Math.min(p.width,r.wrapperWidth-parseInt(this.$cropper.css("right"))),p.width=p.height=Math.min(p.width,p.height),this.$cropper.css(p))},s.prototype.onRelease=function(t){var e=this.$cropper.position(),r=this.measurements,e={top:Math.max(e.top+r.wrapperTop,0),left:Math.max(e.left+r.wrapperLeft,0),right:"",bottom:"",webkitTransform:"",mozTransform:"",transform:""};this.released=!0,this.$cropper.css(e),this.measurements=this.measure(),this.change(this.getSelection())},s.prototype.destroy=function(){this.detach(),this.$elem=null,this.$wrapper=null,this.$cropper=null,this.$wnd=null,this.hammertime=null},s.prototype.enableDesktopEvents=function(){e&&this.$cropper.on("mousemove.ps-crop",i.proxy(this.onMouseMove,this))},s.prototype.disableDesktopEvents=function(){e&&this.$cropper.off("mousemove.ps-crop")},s.prototype.onMouseMove=function(t){var e=i(t.target).parent().offset(),r=t.pageX-e.left,t=t.pageY-e.top,e="",p=this.measure();t<p.cropperTop-p.wrapperTop+15?e+="n":t>p.cropperTop-p.wrapperTop+p.cropperHeight-15&&(e+="s"),r<p.cropperLeft-p.wrapperLeft+15?e+="w":r>p.cropperLeft-p.wrapperLeft+p.cropperWidth-15&&(e+="e"),this.$cropper.css({cursor:e?e+"-resize":""})},s);function s(t){this.$elem=i(t.elem),this.$wrapper=i('<div class="ps-crop-wrapper" style="max-height:none" />'),this.$cropper=i('<div class="ps-crop-box" />'),this.$wnd=i(window),this.change=t.change||i.noop,this.attach(),this.measurements=this.measure(),this.change(this.getSelection())}ps_crop={init:function(t){var e=p(t.elem),r=e.data("ps-crop");r?r.attach():(r=new h(t),e.data("ps-crop",r))},detach:function(t){(t=(t=p(t)).data("ps-crop"))&&t.detach()},destroy:function(t){var e=(t=p(t)).data("ps-crop");e&&(e.destroy(),t.removeData("ps-crop"))}}}(jQuery||$,window.Hammer,peepso);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists