Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/addon/scroll/simplescrollbars.min.js
(function(i){typeof exports=="object"&&typeof module=="object"?i(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(i){"use strict";function d(t,o,n){this.orientation=o,this.scroll=n,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=t+"-"+o,this.inner=this.node.appendChild(document.createElement("div"));var e=this;i.on(this.inner,"mousedown",function(h){if(h.which!=1)return;i.e_preventDefault(h);var l=e.orientation=="horizontal"?"pageX":"pageY",r=h[l],v=e.pos;function f(){i.off(document,"mousemove",p),i.off(document,"mouseup",f)}function p(u){if(u.which!=1)return f();e.moveTo(v+(u[l]-r)*(e.total/e.size))}i.on(document,"mousemove",p),i.on(document,"mouseup",f)}),i.on(this.node,"click",function(h){i.e_preventDefault(h);var l=e.inner.getBoundingClientRect(),r;e.orientation=="horizontal"?r=h.clientX<l.left?-1:h.clientX>l.right?1:0:r=h.clientY<l.top?-1:h.clientY>l.bottom?1:0,e.moveTo(e.pos+r*e.screen)});function s(h){var l=i.wheelEventPixels(h)[e.orientation=="horizontal"?"x":"y"],r=e.pos;e.moveTo(e.pos+l),e.pos!=r&&i.e_preventDefault(h)}i.on(this.node,"mousewheel",s),i.on(this.node,"DOMMouseScroll",s)}d.prototype.setPos=function(t,o){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!o&&t==this.pos?!1:(this.pos=t,this.inner.style[this.orientation=="horizontal"?"left":"top"]=t*(this.size/this.total)+"px",!0)},d.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)};var a=10;d.prototype.update=function(t,o,n){var e=this.screen!=o||this.total!=t||this.size!=n;e&&(this.screen=o,this.total=t,this.size=n);var s=this.screen*(this.size/this.total);s<a&&(this.size-=a-s,s=a),this.inner.style[this.orientation=="horizontal"?"width":"height"]=s+"px",this.setPos(this.pos,e)};function c(t,o,n){this.addClass=t,this.horiz=new d(t,"horizontal",n),o(this.horiz.node),this.vert=new d(t,"vertical",n),o(this.vert.node),this.width=null}c.prototype.update=function(t){if(this.width==null){var o=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;o&&(this.width=parseInt(o.height))}var n=this.width||0,e=t.scrollWidth>t.clientWidth+1,s=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=s?"block":"none",this.horiz.node.style.display=e?"block":"none",s&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(e?n:0)),this.vert.node.style.bottom=e?n+"px":"0"),e&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(s?n:0)-t.barLeft),this.horiz.node.style.right=s?n+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:s?n:0,bottom:e?n:0}},c.prototype.setScrollTop=function(t){this.vert.setPos(t)},c.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},c.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},i.scrollbarModel.simple=function(t,o){return new c("CodeMirror-simplescroll",t,o)},i.scrollbarModel.overlay=function(t,o){return new c("CodeMirror-overlayscroll",t,o)}});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!