diff --git a/composer.json b/composer.json
index 9f97664754..27ccd5fd1a 100644
--- a/composer.json
+++ b/composer.json
@@ -25,9 +25,10 @@
"michelf/php-markdown": "^1.7",
"fxp/composer-asset-plugin": "~1.3",
"bower-asset/base64": "^1.0",
+ "bower-asset/Chart-js": "^2.7",
+ "bower-asset/perfect-scrollbar": "^0.6",
"npm-asset/jquery": "^2.0",
"npm-asset/jquery-colorbox": "^1.6",
- "bower-asset/Chart-js": "^2.7",
"npm-asset/jquery-datetimepicker": "^2.4.0",
"npm-asset/jgrowl": "^1.4",
"npm-asset/fullcalendar": "^3.0.1"
diff --git a/composer.lock b/composer.lock
index b1c2a2a75b..079c90aff0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "77fbec143bd07b349f7cd5763f982734",
+ "content-hash": "993cfc5f6a545674b2c201fbb502d45a",
"packages": [
{
"name": "bower-asset/Chart-js",
@@ -69,6 +69,37 @@
"description": "Base64 encoding and decoding",
"time": "2017-03-25T21:16:21+00:00"
},
+ {
+ "name": "bower-asset/perfect-scrollbar",
+ "version": "0.6.16",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/utatti/perfect-scrollbar-bower.git",
+ "reference": "3049129e5dbb403295ce8507a461cdd0f200938c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/utatti/perfect-scrollbar-bower/zipball/3049129e5dbb403295ce8507a461cdd0f200938c",
+ "reference": "3049129e5dbb403295ce8507a461cdd0f200938c",
+ "shasum": ""
+ },
+ "type": "bower-asset-library",
+ "extra": {
+ "bower-asset-main": [
+ "css/perfect-scrollbar.css",
+ "js/perfect-scrollbar.js"
+ ],
+ "bower-asset-ignore": [
+ "**/.*",
+ "bower_components"
+ ]
+ },
+ "license": [
+ "MIT"
+ ],
+ "description": "Minimalistic but perfect custom scrollbar plugin",
+ "time": "2017-01-10T01:04:09+00:00"
+ },
{
"name": "ezyang/htmlpurifier",
"version": "v4.7.0",
diff --git a/library/perfect-scrollbar/README.md b/library/perfect-scrollbar/README.md
deleted file mode 100644
index b05f5c2956..0000000000
--- a/library/perfect-scrollbar/README.md
+++ /dev/null
@@ -1,447 +0,0 @@
-# `perfect-scrollbar`
-
-Minimalistic but perfect custom scrollbar plugin
-
-[![Travis CI](https://travis-ci.org/noraesae/perfect-scrollbar.svg?branch=master)](https://travis-ci.org/noraesae/perfect-scrollbar)
-
-If you want information of old versions<0.6.0, please refer to
-[an old documentation](https://github.com/noraesae/perfect-scrollbar/tree/0.5.9).
-
-## Why perfect-scrollbar?
-
-I was once working on a personal project, and trying to find the jQuery
-scrollbar plugin that's *perfect*. But there was no *perfect* one.
-That's why I decided to make one.
-
-perfect-scrollbar is minimalistic but *perfect* (for me, and maybe for most developers)
-scrollbar plugin working with jQuery or vanilla JavaScript as well.
-
-I hope you love it!
-
-## [Demo](http://noraesae.github.com/perfect-scrollbar/)
-
-[It's on the GitHub Pages](http://noraesae.github.com/perfect-scrollbar/).
-
-## What does *perfect* mean?
-
-*perfect* means...
-
-* There should be no css change on any original element.
-* The scrollbar should not affect the original design layout.
-* The design of the scrollbar should be (nearly) fully customizable.
-* If the size of the container or the content changes, the scrollbar
- size and position should be able to change.
-* *New!* It should work with vanilla JavaScript and major tools like
- NPM or Browserify.
-
-## Then perfect-scrollbar is really *perfect*?
-
-* perfect-scrollbar has some requirements, but doesn't change or add
- any style on original elements.
-* perfect-scrollbar is designed not to have width or height. It's fixed
- on the right and bottom side of the container.
-* You can change nearly all css styles of the scrollbar. The scrollbar
- design has no dependency on scripts.
-* perfect-scrollbar supports an 'update' function. Whenever you need
- to update the size or position of the scrollbar, just update.
-* Additionally, perfect-scrollbar uses 'scrollTop' and 'scrollLeft',
- not absolute positioning or something messy.
-* perfect-scrollbar supports RTL perfectly on both WebKit and Gecko based browsers.
-
-It's cool, isn't it?
-
-## Install
-
-#### NPM
-
-The best way to install and use perfect-scrollbar is with NPM.
-It's registered on [npm](https://www.npmjs.com/package/perfect-scrollbar) as `perfect-scrollbar`.
-
-```
-$ npm install perfect-scrollbar
-```
-
-#### Rails
-
-In the case you would like to have perfect-scrollbar in your Rails application, there is the [perfect-scrollbar-rails gem](https://github.com/YourCursus/perfect-scrollbar-rails).
-
-#### Manually
-
-You can download the latest stable version with download links [here](http://noraesae.github.io/perfect-scrollbar/).
-You also can find all releases on [Releases](https://github.com/noraesae/perfect-scrollbar/releases).
-
-#### From sources
-
-If you want to use the development version of the plugin, use the
-source files which are not minified. They're in the `src` directory.
-The development version may be unstable, but some known bugs may
-have been fixed.
-
-```
-$ git clone https://github.com/noraesae/perfect-scrollbar.git
-$ cd perfect-scrollbar/src
-$ npm install
-$ gulp # will lint and build the source code.
-```
-
-#### Bower
-
-There is a Bower package for perfect-scrollbar as well. It is managed
-under the [perfect-scrollbar-bower](https://github.com/noraesae/perfect-scrollbar-bower)
-repository. The plugin is registered as `perfect-scrollbar`.
-
-```
-$ bower install perfect-scrollbar
-```
-
-#### CDNs
-
-* [cdnjs](http://www.cdnjs.com/libraries/jquery.perfect-scrollbar)
-* [JSDelivr](https://www.jsdelivr.com/projects/perfect-scrollbar)
-
-#### JSFiddle
-
-You can fork the following JSFiddles for testing and experimenting purposes:
-
-* [Perfect Scrollbar](https://jsfiddle.net/DanielApt/xv0rrxv3/)
-* [Perfect Scrollbar (jQuery)](https://jsfiddle.net/DanielApt/gbfLazpx/)
-
-## Before using perfect-scrollbar
-
-The following requirements should meet.
-
-* the container must have a 'position' css style.
-* the container must be a normal container element.
- * PS may not work well in `body`, `textarea`, `iframe` or flexbox.
-
-The following requirements are included in the basic CSS, but please
-keep in mind when you'd like to change the CSS files.
-
-* the container must have an 'overflow: hidden' css style.
-* the scrollbar's position must be 'absolute'.
-* the scrollbar-x must have a 'bottom' css style, and the scrollbar-y
- must have a 'right' css style.
-
-Please keep in mind that perfect-scrollbar won't completely emulate native
-scrolls. Scroll hooking is generally considered as bad practice, and
-perfect-scrollbar should be used with care. Unless custom scroll is really needed,
-please consider using native scrolls.
-
-## How to use
-
-First of all, please check if the container element meets the
-requirements.
-
-```html
-
-
-```
-
-I would recommend using the plugin with NPM and CommonJS module system
-like Browserify.
-
-```javascript
-var Ps = require('perfect-scrollbar');
-```
-
-Or you can just load the script file as usual.
-
-```html
-
-```
-
-To initialise the plugin, `Ps.initialize` is used.
-
-```javascript
-var container = document.getElementById('container');
-Ps.initialize(container);
-```
-
-It can be initialised with optional parameters.
-
-```javascript
-Ps.initialize(container, {
- wheelSpeed: 2,
- wheelPropagation: true,
- minScrollbarLength: 20
-});
-```
-
-If the size of your container or content changes, call `update`.
-
-```javascript
-Ps.update(container);
-```
-
-If you want to destroy the scrollbar, use `destroy`.
-
-```javascript
-Ps.destroy(container);
-```
-
-If you want to scroll to somewhere, just use a `scrollTop`
-property and update.
-
-```javascript
-container.scrollTop = 0;
-Ps.update(container);
-```
-
-You can also get information about how to use the plugin
-from code in the `examples` directory of the source tree.
-
-## jQuery
-
-As you may already know, perfect-scrollbar was a jQuery plugin.
-And it *is* as well. There's a jQuery adaptor and the plugin can
-be used in the same way it used to be used before.
-
-I also recommend using NPM and CommonJS here, but it's not mandatory.
-
-```javascript
-var $ = require('jquery');
-require('perfect-scrollbar/jquery')($);
-```
-
-For sure, you can just import a built script.
-
-```html
-
-```
-
-After importing it, you can use the plugin in the usual way.
-
-```javascript
-$('#container').perfectScrollbar(); // Initialize
-$('#container').perfectScrollbar({ ... }); // with options
-$('#container').perfectScrollbar('update'); // Update
-$('#container').perfectScrollbar('destroy'); // Destroy
-```
-
-## RequireJS usage
-
-For RequireJS loader, no need to write shim, simply import two libs:
-
-```javascript
-require.config({
- paths: {
- perfectScrollbarJQuery: '.../perfect-scrollbar.jquery',
- perfectScrollbar: '.../perfect-scrollbar',
- }
- ...
-})
-```
-
-
-and load `perfectScrollbar` in the initialiser of your app:
-
-```javascript
-// for vanilla JS:
-window.Ps = require('perfectScrollbar');
-
-// for jQuery:
-require('perfectScrollbarJQuery');
-```
-
-
-## AngularJS + RequireJS usage
-
-With the require.config settings above, at the beginning of your app module
-definition, you can have following code:
-
-```javascript
-define([
- 'angular',
- 'perfectScrollbar',
- 'perfectScrollbarJquery'
-],
-function (angular) {
- var app = angular.module('myApp', []);
- app.run(function () {
- window.Ps = require('perfectScrollbar');
- require('perfectScrollbarJQuery');
- });
- return app;
-});
-```
-
-And initialise perfectScrollbar in a controller:
-
-```javascript
-// by vanilla JS:
-var container = document.getElementById('imgLoader');
-Ps.initialize(container);
-Ps.update(container);
-
-// or by jQuery:
-var imgLoader = $('#imgLoader')
-imgLoader.perfectScrollbar();
-```
-
-## Optional parameters
-
-perfect-scrollbar supports optional parameters.
-
-### handlers
-It is a list of handlers to use to scroll the element.
-**Default**: `['click-rail', 'drag-scrollbar', 'keyboard', 'wheel', 'touch']`
-**Disabled by default**: `'selection'`
-
-### wheelSpeed
-The scroll speed applied to mousewheel event.
-**Default**: `1`
-
-### wheelPropagation
-If this option is true, when the scroll reaches the end of the side, mousewheel event will be propagated to parent element.
-**Default**: `false`
-
-### swipePropagation
-If this option is true, when the scroll reaches the end of the side, touch scrolling will be propagated to parent element.
-**Default**: `true`
-
-### minScrollbarLength
-When set to an integer value, the thumb part of the scrollbar will not shrink below that number of pixels.
-**Default**: `null`
-
-### maxScrollbarLength
-When set to an integer value, the thumb part of the scrollbar will not expand over that number of pixels.
-**Default**: `null`
-
-### useBothWheelAxes
-When set to true, and only one (vertical or horizontal) scrollbar is visible then both vertical and horizontal scrolling will affect the scrollbar.
-**Default**: `false`
-
-### suppressScrollX
-When set to true, the scroll bar in X axis will not be available, regardless of the content width.
-**Default**: `false`
-
-### suppressScrollY
-When set to true, the scroll bar in Y axis will not be available, regardless of the content height.
-**Default**: `false`
-
-### scrollXMarginOffset
-The number of pixels the content width can surpass the container width without enabling the X axis scroll bar. Allows some "wiggle room" or "offset break", so that X axis scroll bar is not enabled just because of a few pixels.
-**Default**: `0`
-
-### scrollYMarginOffset
-The number of pixels the content height can surpass the container height without enabling the Y axis scroll bar. Allows some "wiggle room" or "offset break", so that Y axis scroll bar is not enabled just because of a few pixels.
-**Default**: `0`
-
-### theme
-A string. It's a class name added to the container element. The class name is prepended with `ps-theme-`. So default theme class name is `ps-theme-default`. In order to create custom themes with scss use `ps-container($theme)` mixin, where `$theme` is a scss map.
-**Default**: `'default'`
-
-**Example 1:**
-
-Add `theme` parameter:
-```javascript
-Ps.initialize(container, {
- theme: 'my-theme-name'
-});
-```
-Create a class name prefixed with `.ps-theme-`. Include `ps-container()` mixin. It's recommended to use `map-merge()` to extend `$ps-theme-default` map with your custom styles.
-```scss
-.ps-theme-my-theme-name {
- @include ps-container(map-merge($ps-theme-default, (
- border-radius: 0,
- scrollbar-x-rail-height: 20px,
- scrollbar-x-height: 20px,
- scrollbar-y-rail-width: 20px,
- scrollbar-y-width: 20px
- )));
-}
-```
-
-**Example 2:**
-
-Alternatively, if you don't want to create your own themes, but only modify the default one, you could simply overwrite `$ps-*` variables with your own values. In this case `theme` parameter is not required when calling `.initialize()` method. Remember do define your own variables before the `theme.scss` file is imported.
-
-
-## Events
-
-perfect-scrollbar dispatches custom events.
-
-### ps-scroll-y
-This event fires when the y-axis is scrolled in either direction.
-
-### ps-scroll-x
-This event fires when the x-axis is scrolled in either direction.
-
-### ps-scroll-up
-This event fires when scrolling upwards.
-
-### ps-scroll-down
-This event fires when scrolling downwards.
-
-### ps-scroll-left
-This event fires when scrolling to the left.
-
-### ps-scroll-right
-This event fires when scrolling to the right.
-
-### ps-y-reach-start
-This event fires when scrolling reaches the start of the y-axis.
-
-### ps-y-reach-end
-This event fires when scrolling reaches the end of the y-axis (useful for infinite scroll).
-
-### ps-x-reach-start
-This event fires when scrolling reaches the start of the x-axis.
-
-### ps-x-reach-end
-This event fires when scrolling reaches the end of the x-axis.
-
-You can listen to these events either with vanilla JavaScript
-```javascript
-document.addEventListener('ps-scroll-x', function () {
- // ...
-})
-```
-or with jQuery
-```javascript
-$(document).on('ps-scroll-x', function () {
- // ...
-})
-```
-
-## Tips
-
-### Scrolling children inside perfect-scrollbar
-
-You can natively scroll children inside `perfect-scrollbar` with the mouse-wheel. Scrolling automatically works if
-the child is a `textarea`. All other elements need to have the `ps-child` class. This is demonstrated in [`/examples/children-native-scroll.html`](examples/children-native-scroll.html)
-
-## IE Support
-
-The plugin is designed to work in modern browsers, including the very latest
-version of IE and Edge. Specifically, it should work in IEs >= IE10. If there
-is any issue in the browsers, please [file it](https://github.com/noraesae/perfect-scrollbar/issues).
-
-**The patches to fix problems in IE<=9 won't be accepted.**
-
-When old IEs should be supported, please fork the project and
-make patches personally.
-
-## Helpdesk
-
-If you have any idea to improve this project or any problem
-using this, please feel free to upload an
-[issue](https://github.com/noraesae/perfect-scrollbar/issues).
-
-For common problems there is a
-[FAQ](https://github.com/noraesae/perfect-scrollbar/wiki/FAQ) wiki page. Please check the page before uploading an issue.
-
-## License
-
-The MIT License (MIT) Copyright (c) 2016 Hyunje Alex Jun and other contributors.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/library/perfect-scrollbar/perfect-scrollbar.css b/library/perfect-scrollbar/perfect-scrollbar.css
deleted file mode 100644
index 735219ce76..0000000000
--- a/library/perfect-scrollbar/perfect-scrollbar.css
+++ /dev/null
@@ -1,113 +0,0 @@
-/* perfect-scrollbar v0.6.15 */
-.ps-container {
- -ms-touch-action: auto;
- touch-action: auto;
- overflow: hidden !important;
- -ms-overflow-style: none; }
- @supports (-ms-overflow-style: none) {
- .ps-container {
- overflow: auto !important; } }
- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
- .ps-container {
- overflow: auto !important; } }
- .ps-container.ps-active-x > .ps-scrollbar-x-rail,
- .ps-container.ps-active-y > .ps-scrollbar-y-rail {
- display: block;
- background-color: transparent; }
- .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x {
- background-color: #999;
- height: 11px; }
- .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y {
- background-color: #999;
- width: 11px; }
- .ps-container > .ps-scrollbar-x-rail {
- display: none;
- position: absolute;
- /* please don't change 'position' */
- opacity: 0;
- -webkit-transition: background-color .2s linear, opacity .2s linear;
- -o-transition: background-color .2s linear, opacity .2s linear;
- -moz-transition: background-color .2s linear, opacity .2s linear;
- transition: background-color .2s linear, opacity .2s linear;
- bottom: 0px;
- /* there must be 'bottom' for ps-scrollbar-x-rail */
- height: 15px; }
- .ps-container > .ps-scrollbar-x-rail > .ps-scrollbar-x {
- position: absolute;
- /* please don't change 'position' */
- background-color: #aaa;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;
- -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;
- -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;
- bottom: 2px;
- /* there must be 'bottom' for ps-scrollbar-x */
- height: 6px; }
- .ps-container > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x, .ps-container > .ps-scrollbar-x-rail:active > .ps-scrollbar-x {
- height: 11px; }
- .ps-container > .ps-scrollbar-y-rail {
- display: none;
- position: absolute;
- /* please don't change 'position' */
- opacity: 0;
- -webkit-transition: background-color .2s linear, opacity .2s linear;
- -o-transition: background-color .2s linear, opacity .2s linear;
- -moz-transition: background-color .2s linear, opacity .2s linear;
- transition: background-color .2s linear, opacity .2s linear;
- right: 0;
- /* there must be 'right' for ps-scrollbar-y-rail */
- width: 15px; }
- .ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y {
- position: absolute;
- /* please don't change 'position' */
- background-color: #aaa;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- -webkit-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;
- -o-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;
- -moz-transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;
- transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;
- right: 2px;
- /* there must be 'right' for ps-scrollbar-y */
- width: 6px; }
- .ps-container > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y, .ps-container > .ps-scrollbar-y-rail:active > .ps-scrollbar-y {
- width: 11px; }
- .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container:hover.ps-in-scrolling.ps-x > .ps-scrollbar-x-rail > .ps-scrollbar-x {
- background-color: #999;
- height: 11px; }
- .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container:hover.ps-in-scrolling.ps-y > .ps-scrollbar-y-rail > .ps-scrollbar-y {
- background-color: #999;
- width: 11px; }
- .ps-container:hover > .ps-scrollbar-x-rail,
- .ps-container:hover > .ps-scrollbar-y-rail {
- opacity: 0.6; }
- .ps-container:hover > .ps-scrollbar-x-rail:hover {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container:hover > .ps-scrollbar-x-rail:hover > .ps-scrollbar-x {
- background-color: #999; }
- .ps-container:hover > .ps-scrollbar-y-rail:hover {
- background-color: #eee;
- opacity: 0.9; }
- .ps-container:hover > .ps-scrollbar-y-rail:hover > .ps-scrollbar-y {
- background-color: #999; }
diff --git a/library/perfect-scrollbar/perfect-scrollbar.jquery.js b/library/perfect-scrollbar/perfect-scrollbar.jquery.js
deleted file mode 100644
index 5872325b73..0000000000
--- a/library/perfect-scrollbar/perfect-scrollbar.jquery.js
+++ /dev/null
@@ -1,1579 +0,0 @@
-/* perfect-scrollbar v0.6.15 */
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0) {
- classes.splice(idx, 1);
- }
- element.className = classes.join(' ');
-}
-
-exports.add = function (element, className) {
- if (element.classList) {
- element.classList.add(className);
- } else {
- oldAdd(element, className);
- }
-};
-
-exports.remove = function (element, className) {
- if (element.classList) {
- element.classList.remove(className);
- } else {
- oldRemove(element, className);
- }
-};
-
-exports.list = function (element) {
- if (element.classList) {
- return Array.prototype.slice.apply(element.classList);
- } else {
- return element.className.split(' ');
- }
-};
-
-},{}],3:[function(require,module,exports){
-'use strict';
-
-var DOM = {};
-
-DOM.e = function (tagName, className) {
- var element = document.createElement(tagName);
- element.className = className;
- return element;
-};
-
-DOM.appendTo = function (child, parent) {
- parent.appendChild(child);
- return child;
-};
-
-function cssGet(element, styleName) {
- return window.getComputedStyle(element)[styleName];
-}
-
-function cssSet(element, styleName, styleValue) {
- if (typeof styleValue === 'number') {
- styleValue = styleValue.toString() + 'px';
- }
- element.style[styleName] = styleValue;
- return element;
-}
-
-function cssMultiSet(element, obj) {
- for (var key in obj) {
- var val = obj[key];
- if (typeof val === 'number') {
- val = val.toString() + 'px';
- }
- element.style[key] = val;
- }
- return element;
-}
-
-DOM.css = function (element, styleNameOrObject, styleValue) {
- if (typeof styleNameOrObject === 'object') {
- // multiple set with object
- return cssMultiSet(element, styleNameOrObject);
- } else {
- if (typeof styleValue === 'undefined') {
- return cssGet(element, styleNameOrObject);
- } else {
- return cssSet(element, styleNameOrObject, styleValue);
- }
- }
-};
-
-DOM.matches = function (element, query) {
- if (typeof element.matches !== 'undefined') {
- return element.matches(query);
- } else {
- if (typeof element.matchesSelector !== 'undefined') {
- return element.matchesSelector(query);
- } else if (typeof element.webkitMatchesSelector !== 'undefined') {
- return element.webkitMatchesSelector(query);
- } else if (typeof element.mozMatchesSelector !== 'undefined') {
- return element.mozMatchesSelector(query);
- } else if (typeof element.msMatchesSelector !== 'undefined') {
- return element.msMatchesSelector(query);
- }
- }
-};
-
-DOM.remove = function (element) {
- if (typeof element.remove !== 'undefined') {
- element.remove();
- } else {
- if (element.parentNode) {
- element.parentNode.removeChild(element);
- }
- }
-};
-
-DOM.queryChildren = function (element, selector) {
- return Array.prototype.filter.call(element.childNodes, function (child) {
- return DOM.matches(child, selector);
- });
-};
-
-module.exports = DOM;
-
-},{}],4:[function(require,module,exports){
-'use strict';
-
-var EventElement = function (element) {
- this.element = element;
- this.events = {};
-};
-
-EventElement.prototype.bind = function (eventName, handler) {
- if (typeof this.events[eventName] === 'undefined') {
- this.events[eventName] = [];
- }
- this.events[eventName].push(handler);
- this.element.addEventListener(eventName, handler, false);
-};
-
-EventElement.prototype.unbind = function (eventName, handler) {
- var isHandlerProvided = (typeof handler !== 'undefined');
- this.events[eventName] = this.events[eventName].filter(function (hdlr) {
- if (isHandlerProvided && hdlr !== handler) {
- return true;
- }
- this.element.removeEventListener(eventName, hdlr, false);
- return false;
- }, this);
-};
-
-EventElement.prototype.unbindAll = function () {
- for (var name in this.events) {
- this.unbind(name);
- }
-};
-
-var EventManager = function () {
- this.eventElements = [];
-};
-
-EventManager.prototype.eventElement = function (element) {
- var ee = this.eventElements.filter(function (eventElement) {
- return eventElement.element === element;
- })[0];
- if (typeof ee === 'undefined') {
- ee = new EventElement(element);
- this.eventElements.push(ee);
- }
- return ee;
-};
-
-EventManager.prototype.bind = function (element, eventName, handler) {
- this.eventElement(element).bind(eventName, handler);
-};
-
-EventManager.prototype.unbind = function (element, eventName, handler) {
- this.eventElement(element).unbind(eventName, handler);
-};
-
-EventManager.prototype.unbindAll = function () {
- for (var i = 0; i < this.eventElements.length; i++) {
- this.eventElements[i].unbindAll();
- }
-};
-
-EventManager.prototype.once = function (element, eventName, handler) {
- var ee = this.eventElement(element);
- var onceHandler = function (e) {
- ee.unbind(eventName, onceHandler);
- handler(e);
- };
- ee.bind(eventName, onceHandler);
-};
-
-module.exports = EventManager;
-
-},{}],5:[function(require,module,exports){
-'use strict';
-
-module.exports = (function () {
- function s4() {
- return Math.floor((1 + Math.random()) * 0x10000)
- .toString(16)
- .substring(1);
- }
- return function () {
- return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
- s4() + '-' + s4() + s4() + s4();
- };
-})();
-
-},{}],6:[function(require,module,exports){
-'use strict';
-
-var cls = require('./class');
-var dom = require('./dom');
-
-var toInt = exports.toInt = function (x) {
- return parseInt(x, 10) || 0;
-};
-
-var clone = exports.clone = function (obj) {
- if (!obj) {
- return null;
- } else if (obj.constructor === Array) {
- return obj.map(clone);
- } else if (typeof obj === 'object') {
- var result = {};
- for (var key in obj) {
- result[key] = clone(obj[key]);
- }
- return result;
- } else {
- return obj;
- }
-};
-
-exports.extend = function (original, source) {
- var result = clone(original);
- for (var key in source) {
- result[key] = clone(source[key]);
- }
- return result;
-};
-
-exports.isEditable = function (el) {
- return dom.matches(el, "input,[contenteditable]") ||
- dom.matches(el, "select,[contenteditable]") ||
- dom.matches(el, "textarea,[contenteditable]") ||
- dom.matches(el, "button,[contenteditable]");
-};
-
-exports.removePsClasses = function (element) {
- var clsList = cls.list(element);
- for (var i = 0; i < clsList.length; i++) {
- var className = clsList[i];
- if (className.indexOf('ps-') === 0) {
- cls.remove(element, className);
- }
- }
-};
-
-exports.outerWidth = function (element) {
- return toInt(dom.css(element, 'width')) +
- toInt(dom.css(element, 'paddingLeft')) +
- toInt(dom.css(element, 'paddingRight')) +
- toInt(dom.css(element, 'borderLeftWidth')) +
- toInt(dom.css(element, 'borderRightWidth'));
-};
-
-exports.startScrolling = function (element, axis) {
- cls.add(element, 'ps-in-scrolling');
- if (typeof axis !== 'undefined') {
- cls.add(element, 'ps-' + axis);
- } else {
- cls.add(element, 'ps-x');
- cls.add(element, 'ps-y');
- }
-};
-
-exports.stopScrolling = function (element, axis) {
- cls.remove(element, 'ps-in-scrolling');
- if (typeof axis !== 'undefined') {
- cls.remove(element, 'ps-' + axis);
- } else {
- cls.remove(element, 'ps-x');
- cls.remove(element, 'ps-y');
- }
-};
-
-exports.env = {
- isWebKit: 'WebkitAppearance' in document.documentElement.style,
- supportsTouch: (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),
- supportsIePointer: window.navigator.msMaxTouchPoints !== null
-};
-
-},{"./class":2,"./dom":3}],7:[function(require,module,exports){
-'use strict';
-
-var destroy = require('./plugin/destroy');
-var initialize = require('./plugin/initialize');
-var update = require('./plugin/update');
-
-module.exports = {
- initialize: initialize,
- update: update,
- destroy: destroy
-};
-
-},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(require,module,exports){
-'use strict';
-
-module.exports = {
- handlers: ['click-rail', 'drag-scrollbar', 'keyboard', 'wheel', 'touch'],
- maxScrollbarLength: null,
- minScrollbarLength: null,
- scrollXMarginOffset: 0,
- scrollYMarginOffset: 0,
- suppressScrollX: false,
- suppressScrollY: false,
- swipePropagation: true,
- useBothWheelAxes: false,
- wheelPropagation: false,
- wheelSpeed: 1,
- theme: 'default'
-};
-
-},{}],9:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- if (!i) {
- return;
- }
-
- i.event.unbindAll();
- dom.remove(i.scrollbarX);
- dom.remove(i.scrollbarY);
- dom.remove(i.scrollbarXRail);
- dom.remove(i.scrollbarYRail);
- _.removePsClasses(element);
-
- instances.remove(element);
-};
-
-},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindClickRailHandler(element, i) {
- function pageOffset(el) {
- return el.getBoundingClientRect();
- }
- var stopPropagation = function (e) { e.stopPropagation(); };
-
- i.event.bind(i.scrollbarY, 'click', stopPropagation);
- i.event.bind(i.scrollbarYRail, 'click', function (e) {
- var positionTop = e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top;
- var direction = positionTop > i.scrollbarYTop ? 1 : -1;
-
- updateScroll(element, 'top', element.scrollTop + direction * i.containerHeight);
- updateGeometry(element);
-
- e.stopPropagation();
- });
-
- i.event.bind(i.scrollbarX, 'click', stopPropagation);
- i.event.bind(i.scrollbarXRail, 'click', function (e) {
- var positionLeft = e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left;
- var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
-
- updateScroll(element, 'left', element.scrollLeft + direction * i.containerWidth);
- updateGeometry(element);
-
- e.stopPropagation();
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindClickRailHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var dom = require('../../lib/dom');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindMouseScrollXHandler(element, i) {
- var currentLeft = null;
- var currentPageX = null;
-
- function updateScrollLeft(deltaX) {
- var newLeft = currentLeft + (deltaX * i.railXRatio);
- var maxLeft = Math.max(0, i.scrollbarXRail.getBoundingClientRect().left) + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth));
-
- if (newLeft < 0) {
- i.scrollbarXLeft = 0;
- } else if (newLeft > maxLeft) {
- i.scrollbarXLeft = maxLeft;
- } else {
- i.scrollbarXLeft = newLeft;
- }
-
- var scrollLeft = _.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;
- updateScroll(element, 'left', scrollLeft);
- }
-
- var mouseMoveHandler = function (e) {
- updateScrollLeft(e.pageX - currentPageX);
- updateGeometry(element);
- e.stopPropagation();
- e.preventDefault();
- };
-
- var mouseUpHandler = function () {
- _.stopScrolling(element, 'x');
- i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- };
-
- i.event.bind(i.scrollbarX, 'mousedown', function (e) {
- currentPageX = e.pageX;
- currentLeft = _.toInt(dom.css(i.scrollbarX, 'left')) * i.railXRatio;
- _.startScrolling(element, 'x');
-
- i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
-
- e.stopPropagation();
- e.preventDefault();
- });
-}
-
-function bindMouseScrollYHandler(element, i) {
- var currentTop = null;
- var currentPageY = null;
-
- function updateScrollTop(deltaY) {
- var newTop = currentTop + (deltaY * i.railYRatio);
- var maxTop = Math.max(0, i.scrollbarYRail.getBoundingClientRect().top) + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight));
-
- if (newTop < 0) {
- i.scrollbarYTop = 0;
- } else if (newTop > maxTop) {
- i.scrollbarYTop = maxTop;
- } else {
- i.scrollbarYTop = newTop;
- }
-
- var scrollTop = _.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));
- updateScroll(element, 'top', scrollTop);
- }
-
- var mouseMoveHandler = function (e) {
- updateScrollTop(e.pageY - currentPageY);
- updateGeometry(element);
- e.stopPropagation();
- e.preventDefault();
- };
-
- var mouseUpHandler = function () {
- _.stopScrolling(element, 'y');
- i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- };
-
- i.event.bind(i.scrollbarY, 'mousedown', function (e) {
- currentPageY = e.pageY;
- currentTop = _.toInt(dom.css(i.scrollbarY, 'top')) * i.railYRatio;
- _.startScrolling(element, 'y');
-
- i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
- i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
-
- e.stopPropagation();
- e.preventDefault();
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindMouseScrollXHandler(element, i);
- bindMouseScrollYHandler(element, i);
-};
-
-},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var dom = require('../../lib/dom');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindKeyboardHandler(element, i) {
- var hovered = false;
- i.event.bind(element, 'mouseenter', function () {
- hovered = true;
- });
- i.event.bind(element, 'mouseleave', function () {
- hovered = false;
- });
-
- var shouldPrevent = false;
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- if (deltaX === 0) {
- if (!i.scrollbarYActive) {
- return false;
- }
- if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {
- return !i.settings.wheelPropagation;
- }
- }
-
- var scrollLeft = element.scrollLeft;
- if (deltaY === 0) {
- if (!i.scrollbarXActive) {
- return false;
- }
- if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {
- return !i.settings.wheelPropagation;
- }
- }
- return true;
- }
-
- i.event.bind(i.ownerDocument, 'keydown', function (e) {
- if ((e.isDefaultPrevented && e.isDefaultPrevented()) || e.defaultPrevented) {
- return;
- }
-
- var focused = dom.matches(i.scrollbarX, ':focus') ||
- dom.matches(i.scrollbarY, ':focus');
-
- if (!hovered && !focused) {
- return;
- }
-
- var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
- if (activeElement) {
- if (activeElement.tagName === 'IFRAME') {
- activeElement = activeElement.contentDocument.activeElement;
- } else {
- // go deeper if element is a webcomponent
- while (activeElement.shadowRoot) {
- activeElement = activeElement.shadowRoot.activeElement;
- }
- }
- if (_.isEditable(activeElement)) {
- return;
- }
- }
-
- var deltaX = 0;
- var deltaY = 0;
-
- switch (e.which) {
- case 37: // left
- if (e.metaKey) {
- deltaX = -i.contentWidth;
- } else if (e.altKey) {
- deltaX = -i.containerWidth;
- } else {
- deltaX = -30;
- }
- break;
- case 38: // up
- if (e.metaKey) {
- deltaY = i.contentHeight;
- } else if (e.altKey) {
- deltaY = i.containerHeight;
- } else {
- deltaY = 30;
- }
- break;
- case 39: // right
- if (e.metaKey) {
- deltaX = i.contentWidth;
- } else if (e.altKey) {
- deltaX = i.containerWidth;
- } else {
- deltaX = 30;
- }
- break;
- case 40: // down
- if (e.metaKey) {
- deltaY = -i.contentHeight;
- } else if (e.altKey) {
- deltaY = -i.containerHeight;
- } else {
- deltaY = -30;
- }
- break;
- case 33: // page up
- deltaY = 90;
- break;
- case 32: // space bar
- if (e.shiftKey) {
- deltaY = 90;
- } else {
- deltaY = -90;
- }
- break;
- case 34: // page down
- deltaY = -90;
- break;
- case 35: // end
- if (e.ctrlKey) {
- deltaY = -i.contentHeight;
- } else {
- deltaY = -i.containerHeight;
- }
- break;
- case 36: // home
- if (e.ctrlKey) {
- deltaY = element.scrollTop;
- } else {
- deltaY = i.containerHeight;
- }
- break;
- default:
- return;
- }
-
- updateScroll(element, 'top', element.scrollTop - deltaY);
- updateScroll(element, 'left', element.scrollLeft + deltaX);
- updateGeometry(element);
-
- shouldPrevent = shouldPreventDefault(deltaX, deltaY);
- if (shouldPrevent) {
- e.preventDefault();
- }
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindKeyboardHandler(element, i);
-};
-
-},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindMouseWheelHandler(element, i) {
- var shouldPrevent = false;
-
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- if (deltaX === 0) {
- if (!i.scrollbarYActive) {
- return false;
- }
- if ((scrollTop === 0 && deltaY > 0) || (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)) {
- return !i.settings.wheelPropagation;
- }
- }
-
- var scrollLeft = element.scrollLeft;
- if (deltaY === 0) {
- if (!i.scrollbarXActive) {
- return false;
- }
- if ((scrollLeft === 0 && deltaX < 0) || (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)) {
- return !i.settings.wheelPropagation;
- }
- }
- return true;
- }
-
- function getDeltaFromEvent(e) {
- var deltaX = e.deltaX;
- var deltaY = -1 * e.deltaY;
-
- if (typeof deltaX === "undefined" || typeof deltaY === "undefined") {
- // OS X Safari
- deltaX = -1 * e.wheelDeltaX / 6;
- deltaY = e.wheelDeltaY / 6;
- }
-
- if (e.deltaMode && e.deltaMode === 1) {
- // Firefox in deltaMode 1: Line scrolling
- deltaX *= 10;
- deltaY *= 10;
- }
-
- if (deltaX !== deltaX && deltaY !== deltaY/* NaN checks */) {
- // IE in some mouse drivers
- deltaX = 0;
- deltaY = e.wheelDelta;
- }
-
- if (e.shiftKey) {
- // reverse axis with shift key
- return [-deltaY, -deltaX];
- }
- return [deltaX, deltaY];
- }
-
- function shouldBeConsumedByChild(deltaX, deltaY) {
- var child = element.querySelector('textarea:hover, select[multiple]:hover, .ps-child:hover');
- if (child) {
- if (!window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) {
- // if not scrollable
- return false;
- }
-
- var maxScrollTop = child.scrollHeight - child.clientHeight;
- if (maxScrollTop > 0) {
- if (!(child.scrollTop === 0 && deltaY > 0) && !(child.scrollTop === maxScrollTop && deltaY < 0)) {
- return true;
- }
- }
- var maxScrollLeft = child.scrollLeft - child.clientWidth;
- if (maxScrollLeft > 0) {
- if (!(child.scrollLeft === 0 && deltaX < 0) && !(child.scrollLeft === maxScrollLeft && deltaX > 0)) {
- return true;
- }
- }
- }
- return false;
- }
-
- function mousewheelHandler(e) {
- var delta = getDeltaFromEvent(e);
-
- var deltaX = delta[0];
- var deltaY = delta[1];
-
- if (shouldBeConsumedByChild(deltaX, deltaY)) {
- return;
- }
-
- shouldPrevent = false;
- if (!i.settings.useBothWheelAxes) {
- // deltaX will only be used for horizontal scrolling and deltaY will
- // only be used for vertical scrolling - this is the default
- updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));
- updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));
- } else if (i.scrollbarYActive && !i.scrollbarXActive) {
- // only vertical scrollbar is active and useBothWheelAxes option is
- // active, so let's scroll vertical bar using both mouse wheel axes
- if (deltaY) {
- updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));
- } else {
- updateScroll(element, 'top', element.scrollTop + (deltaX * i.settings.wheelSpeed));
- }
- shouldPrevent = true;
- } else if (i.scrollbarXActive && !i.scrollbarYActive) {
- // useBothWheelAxes and only horizontal bar is active, so use both
- // wheel axes for horizontal bar
- if (deltaX) {
- updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));
- } else {
- updateScroll(element, 'left', element.scrollLeft - (deltaY * i.settings.wheelSpeed));
- }
- shouldPrevent = true;
- }
-
- updateGeometry(element);
-
- shouldPrevent = (shouldPrevent || shouldPreventDefault(deltaX, deltaY));
- if (shouldPrevent) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
-
- if (typeof window.onwheel !== "undefined") {
- i.event.bind(element, 'wheel', mousewheelHandler);
- } else if (typeof window.onmousewheel !== "undefined") {
- i.event.bind(element, 'mousewheel', mousewheelHandler);
- }
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindMouseWheelHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){
-'use strict';
-
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-
-function bindNativeScrollHandler(element, i) {
- i.event.bind(element, 'scroll', function () {
- updateGeometry(element);
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindNativeScrollHandler(element, i);
-};
-
-},{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindSelectionHandler(element, i) {
- function getRangeNode() {
- var selection = window.getSelection ? window.getSelection() :
- document.getSelection ? document.getSelection() : '';
- if (selection.toString().length === 0) {
- return null;
- } else {
- return selection.getRangeAt(0).commonAncestorContainer;
- }
- }
-
- var scrollingLoop = null;
- var scrollDiff = {top: 0, left: 0};
- function startScrolling() {
- if (!scrollingLoop) {
- scrollingLoop = setInterval(function () {
- if (!instances.get(element)) {
- clearInterval(scrollingLoop);
- return;
- }
-
- updateScroll(element, 'top', element.scrollTop + scrollDiff.top);
- updateScroll(element, 'left', element.scrollLeft + scrollDiff.left);
- updateGeometry(element);
- }, 50); // every .1 sec
- }
- }
- function stopScrolling() {
- if (scrollingLoop) {
- clearInterval(scrollingLoop);
- scrollingLoop = null;
- }
- _.stopScrolling(element);
- }
-
- var isSelected = false;
- i.event.bind(i.ownerDocument, 'selectionchange', function () {
- if (element.contains(getRangeNode())) {
- isSelected = true;
- } else {
- isSelected = false;
- stopScrolling();
- }
- });
- i.event.bind(window, 'mouseup', function () {
- if (isSelected) {
- isSelected = false;
- stopScrolling();
- }
- });
- i.event.bind(window, 'keyup', function () {
- if (isSelected) {
- isSelected = false;
- stopScrolling();
- }
- });
-
- i.event.bind(window, 'mousemove', function (e) {
- if (isSelected) {
- var mousePosition = {x: e.pageX, y: e.pageY};
- var containerGeometry = {
- left: element.offsetLeft,
- right: element.offsetLeft + element.offsetWidth,
- top: element.offsetTop,
- bottom: element.offsetTop + element.offsetHeight
- };
-
- if (mousePosition.x < containerGeometry.left + 3) {
- scrollDiff.left = -5;
- _.startScrolling(element, 'x');
- } else if (mousePosition.x > containerGeometry.right - 3) {
- scrollDiff.left = 5;
- _.startScrolling(element, 'x');
- } else {
- scrollDiff.left = 0;
- }
-
- if (mousePosition.y < containerGeometry.top + 3) {
- if (containerGeometry.top + 3 - mousePosition.y < 5) {
- scrollDiff.top = -5;
- } else {
- scrollDiff.top = -20;
- }
- _.startScrolling(element, 'y');
- } else if (mousePosition.y > containerGeometry.bottom - 3) {
- if (mousePosition.y - containerGeometry.bottom + 3 < 5) {
- scrollDiff.top = 5;
- } else {
- scrollDiff.top = 20;
- }
- _.startScrolling(element, 'y');
- } else {
- scrollDiff.top = 0;
- }
-
- if (scrollDiff.top === 0 && scrollDiff.left === 0) {
- stopScrolling();
- } else {
- startScrolling();
- }
- }
- });
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
- bindSelectionHandler(element, i);
-};
-
-},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
-'use strict';
-
-var _ = require('../../lib/helper');
-var instances = require('../instances');
-var updateGeometry = require('../update-geometry');
-var updateScroll = require('../update-scroll');
-
-function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
- function shouldPreventDefault(deltaX, deltaY) {
- var scrollTop = element.scrollTop;
- var scrollLeft = element.scrollLeft;
- var magnitudeX = Math.abs(deltaX);
- var magnitudeY = Math.abs(deltaY);
-
- if (magnitudeY > magnitudeX) {
- // user is perhaps trying to swipe up/down the page
-
- if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) ||
- ((deltaY > 0) && (scrollTop === 0))) {
- return !i.settings.swipePropagation;
- }
- } else if (magnitudeX > magnitudeY) {
- // user is perhaps trying to swipe left/right across the page
-
- if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) ||
- ((deltaX > 0) && (scrollLeft === 0))) {
- return !i.settings.swipePropagation;
- }
- }
-
- return true;
- }
-
- function applyTouchMove(differenceX, differenceY) {
- updateScroll(element, 'top', element.scrollTop - differenceY);
- updateScroll(element, 'left', element.scrollLeft - differenceX);
-
- updateGeometry(element);
- }
-
- var startOffset = {};
- var startTime = 0;
- var speed = {};
- var easingLoop = null;
- var inGlobalTouch = false;
- var inLocalTouch = false;
-
- function globalTouchStart() {
- inGlobalTouch = true;
- }
- function globalTouchEnd() {
- inGlobalTouch = false;
- }
-
- function getTouch(e) {
- if (e.targetTouches) {
- return e.targetTouches[0];
- } else {
- // Maybe IE pointer
- return e;
- }
- }
- function shouldHandle(e) {
- if (e.targetTouches && e.targetTouches.length === 1) {
- return true;
- }
- if (e.pointerType && e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {
- return true;
- }
- return false;
- }
- function touchStart(e) {
- if (shouldHandle(e)) {
- inLocalTouch = true;
-
- var touch = getTouch(e);
-
- startOffset.pageX = touch.pageX;
- startOffset.pageY = touch.pageY;
-
- startTime = (new Date()).getTime();
-
- if (easingLoop !== null) {
- clearInterval(easingLoop);
- }
-
- e.stopPropagation();
- }
- }
- function touchMove(e) {
- if (!inLocalTouch && i.settings.swipePropagation) {
- touchStart(e);
- }
- if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) {
- var touch = getTouch(e);
-
- var currentOffset = {pageX: touch.pageX, pageY: touch.pageY};
-
- var differenceX = currentOffset.pageX - startOffset.pageX;
- var differenceY = currentOffset.pageY - startOffset.pageY;
-
- applyTouchMove(differenceX, differenceY);
- startOffset = currentOffset;
-
- var currentTime = (new Date()).getTime();
-
- var timeGap = currentTime - startTime;
- if (timeGap > 0) {
- speed.x = differenceX / timeGap;
- speed.y = differenceY / timeGap;
- startTime = currentTime;
- }
-
- if (shouldPreventDefault(differenceX, differenceY)) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
- }
- function touchEnd() {
- if (!inGlobalTouch && inLocalTouch) {
- inLocalTouch = false;
-
- clearInterval(easingLoop);
- easingLoop = setInterval(function () {
- if (!instances.get(element)) {
- clearInterval(easingLoop);
- return;
- }
-
- if (!speed.x && !speed.y) {
- clearInterval(easingLoop);
- return;
- }
-
- if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {
- clearInterval(easingLoop);
- return;
- }
-
- applyTouchMove(speed.x * 30, speed.y * 30);
-
- speed.x *= 0.8;
- speed.y *= 0.8;
- }, 10);
- }
- }
-
- if (supportsTouch) {
- i.event.bind(window, 'touchstart', globalTouchStart);
- i.event.bind(window, 'touchend', globalTouchEnd);
- i.event.bind(element, 'touchstart', touchStart);
- i.event.bind(element, 'touchmove', touchMove);
- i.event.bind(element, 'touchend', touchEnd);
- }
-
- if (supportsIePointer) {
- if (window.PointerEvent) {
- i.event.bind(window, 'pointerdown', globalTouchStart);
- i.event.bind(window, 'pointerup', globalTouchEnd);
- i.event.bind(element, 'pointerdown', touchStart);
- i.event.bind(element, 'pointermove', touchMove);
- i.event.bind(element, 'pointerup', touchEnd);
- } else if (window.MSPointerEvent) {
- i.event.bind(window, 'MSPointerDown', globalTouchStart);
- i.event.bind(window, 'MSPointerUp', globalTouchEnd);
- i.event.bind(element, 'MSPointerDown', touchStart);
- i.event.bind(element, 'MSPointerMove', touchMove);
- i.event.bind(element, 'MSPointerUp', touchEnd);
- }
- }
-}
-
-module.exports = function (element) {
- if (!_.env.supportsTouch && !_.env.supportsIePointer) {
- return;
- }
-
- var i = instances.get(element);
- bindTouchHandler(element, i, _.env.supportsTouch, _.env.supportsIePointer);
-};
-
-},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var instances = require('./instances');
-var updateGeometry = require('./update-geometry');
-
-// Handlers
-var handlers = {
- 'click-rail': require('./handler/click-rail'),
- 'drag-scrollbar': require('./handler/drag-scrollbar'),
- 'keyboard': require('./handler/keyboard'),
- 'wheel': require('./handler/mouse-wheel'),
- 'touch': require('./handler/touch'),
- 'selection': require('./handler/selection')
-};
-var nativeScrollHandler = require('./handler/native-scroll');
-
-module.exports = function (element, userSettings) {
- userSettings = typeof userSettings === 'object' ? userSettings : {};
-
- cls.add(element, 'ps-container');
-
- // Create a plugin instance.
- var i = instances.add(element);
-
- i.settings = _.extend(i.settings, userSettings);
- cls.add(element, 'ps-theme-' + i.settings.theme);
-
- i.settings.handlers.forEach(function (handlerName) {
- handlers[handlerName](element);
- });
-
- nativeScrollHandler(element);
-
- updateGeometry(element);
-};
-
-},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var defaultSettings = require('./default-setting');
-var dom = require('../lib/dom');
-var EventManager = require('../lib/event-manager');
-var guid = require('../lib/guid');
-
-var instances = {};
-
-function Instance(element) {
- var i = this;
-
- i.settings = _.clone(defaultSettings);
- i.containerWidth = null;
- i.containerHeight = null;
- i.contentWidth = null;
- i.contentHeight = null;
-
- i.isRtl = dom.css(element, 'direction') === "rtl";
- i.isNegativeScroll = (function () {
- var originalScrollLeft = element.scrollLeft;
- var result = null;
- element.scrollLeft = -1;
- result = element.scrollLeft < 0;
- element.scrollLeft = originalScrollLeft;
- return result;
- })();
- i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
- i.event = new EventManager();
- i.ownerDocument = element.ownerDocument || document;
-
- function focus() {
- cls.add(element, 'ps-focus');
- }
-
- function blur() {
- cls.remove(element, 'ps-focus');
- }
-
- i.scrollbarXRail = dom.appendTo(dom.e('div', 'ps-scrollbar-x-rail'), element);
- i.scrollbarX = dom.appendTo(dom.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);
- i.scrollbarX.setAttribute('tabindex', 0);
- i.event.bind(i.scrollbarX, 'focus', focus);
- i.event.bind(i.scrollbarX, 'blur', blur);
- i.scrollbarXActive = null;
- i.scrollbarXWidth = null;
- i.scrollbarXLeft = null;
- i.scrollbarXBottom = _.toInt(dom.css(i.scrollbarXRail, 'bottom'));
- i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN
- i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : _.toInt(dom.css(i.scrollbarXRail, 'top'));
- i.railBorderXWidth = _.toInt(dom.css(i.scrollbarXRail, 'borderLeftWidth')) + _.toInt(dom.css(i.scrollbarXRail, 'borderRightWidth'));
- // Set rail to display:block to calculate margins
- dom.css(i.scrollbarXRail, 'display', 'block');
- i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
- dom.css(i.scrollbarXRail, 'display', '');
- i.railXWidth = null;
- i.railXRatio = null;
-
- i.scrollbarYRail = dom.appendTo(dom.e('div', 'ps-scrollbar-y-rail'), element);
- i.scrollbarY = dom.appendTo(dom.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);
- i.scrollbarY.setAttribute('tabindex', 0);
- i.event.bind(i.scrollbarY, 'focus', focus);
- i.event.bind(i.scrollbarY, 'blur', blur);
- i.scrollbarYActive = null;
- i.scrollbarYHeight = null;
- i.scrollbarYTop = null;
- i.scrollbarYRight = _.toInt(dom.css(i.scrollbarYRail, 'right'));
- i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN
- i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : _.toInt(dom.css(i.scrollbarYRail, 'left'));
- i.scrollbarYOuterWidth = i.isRtl ? _.outerWidth(i.scrollbarY) : null;
- i.railBorderYWidth = _.toInt(dom.css(i.scrollbarYRail, 'borderTopWidth')) + _.toInt(dom.css(i.scrollbarYRail, 'borderBottomWidth'));
- dom.css(i.scrollbarYRail, 'display', 'block');
- i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
- dom.css(i.scrollbarYRail, 'display', '');
- i.railYHeight = null;
- i.railYRatio = null;
-}
-
-function getId(element) {
- return element.getAttribute('data-ps-id');
-}
-
-function setId(element, id) {
- element.setAttribute('data-ps-id', id);
-}
-
-function removeId(element) {
- element.removeAttribute('data-ps-id');
-}
-
-exports.add = function (element) {
- var newId = guid();
- setId(element, newId);
- instances[newId] = new Instance(element);
- return instances[newId];
-};
-
-exports.remove = function (element) {
- delete instances[getId(element)];
- removeId(element);
-};
-
-exports.get = function (element) {
- return instances[getId(element)];
-};
-
-},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var cls = require('../lib/class');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-var updateScroll = require('./update-scroll');
-
-function getThumbSize(i, thumbSize) {
- if (i.settings.minScrollbarLength) {
- thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);
- }
- if (i.settings.maxScrollbarLength) {
- thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);
- }
- return thumbSize;
-}
-
-function updateCss(element, i) {
- var xRailOffset = {width: i.railXWidth};
- if (i.isRtl) {
- xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;
- } else {
- xRailOffset.left = element.scrollLeft;
- }
- if (i.isScrollbarXUsingBottom) {
- xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;
- } else {
- xRailOffset.top = i.scrollbarXTop + element.scrollTop;
- }
- dom.css(i.scrollbarXRail, xRailOffset);
-
- var yRailOffset = {top: element.scrollTop, height: i.railYHeight};
- if (i.isScrollbarYUsingRight) {
- if (i.isRtl) {
- yRailOffset.right = i.contentWidth - (i.negativeScrollAdjustment + element.scrollLeft) - i.scrollbarYRight - i.scrollbarYOuterWidth;
- } else {
- yRailOffset.right = i.scrollbarYRight - element.scrollLeft;
- }
- } else {
- if (i.isRtl) {
- yRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth * 2 - i.contentWidth - i.scrollbarYLeft - i.scrollbarYOuterWidth;
- } else {
- yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
- }
- }
- dom.css(i.scrollbarYRail, yRailOffset);
-
- dom.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});
- dom.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});
-}
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- i.containerWidth = element.clientWidth;
- i.containerHeight = element.clientHeight;
- i.contentWidth = element.scrollWidth;
- i.contentHeight = element.scrollHeight;
-
- var existingRails;
- if (!element.contains(i.scrollbarXRail)) {
- existingRails = dom.queryChildren(element, '.ps-scrollbar-x-rail');
- if (existingRails.length > 0) {
- existingRails.forEach(function (rail) {
- dom.remove(rail);
- });
- }
- dom.appendTo(i.scrollbarXRail, element);
- }
- if (!element.contains(i.scrollbarYRail)) {
- existingRails = dom.queryChildren(element, '.ps-scrollbar-y-rail');
- if (existingRails.length > 0) {
- existingRails.forEach(function (rail) {
- dom.remove(rail);
- });
- }
- dom.appendTo(i.scrollbarYRail, element);
- }
-
- if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {
- i.scrollbarXActive = true;
- i.railXWidth = i.containerWidth - i.railXMarginWidth;
- i.railXRatio = i.containerWidth / i.railXWidth;
- i.scrollbarXWidth = getThumbSize(i, _.toInt(i.railXWidth * i.containerWidth / i.contentWidth));
- i.scrollbarXLeft = _.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));
- } else {
- i.scrollbarXActive = false;
- }
-
- if (!i.settings.suppressScrollY && i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight) {
- i.scrollbarYActive = true;
- i.railYHeight = i.containerHeight - i.railYMarginHeight;
- i.railYRatio = i.containerHeight / i.railYHeight;
- i.scrollbarYHeight = getThumbSize(i, _.toInt(i.railYHeight * i.containerHeight / i.contentHeight));
- i.scrollbarYTop = _.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));
- } else {
- i.scrollbarYActive = false;
- }
-
- if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
- i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
- }
- if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
- i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
- }
-
- updateCss(element, i);
-
- if (i.scrollbarXActive) {
- cls.add(element, 'ps-active-x');
- } else {
- cls.remove(element, 'ps-active-x');
- i.scrollbarXWidth = 0;
- i.scrollbarXLeft = 0;
- updateScroll(element, 'left', 0);
- }
- if (i.scrollbarYActive) {
- cls.add(element, 'ps-active-y');
- } else {
- cls.remove(element, 'ps-active-y');
- i.scrollbarYHeight = 0;
- i.scrollbarYTop = 0;
- updateScroll(element, 'top', 0);
- }
-};
-
-},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
-'use strict';
-
-var instances = require('./instances');
-
-var lastTop;
-var lastLeft;
-
-var createDOMEvent = function (name) {
- var event = document.createEvent("Event");
- event.initEvent(name, true, true);
- return event;
-};
-
-module.exports = function (element, axis, value) {
- if (typeof element === 'undefined') {
- throw 'You must provide an element to the update-scroll function';
- }
-
- if (typeof axis === 'undefined') {
- throw 'You must provide an axis to the update-scroll function';
- }
-
- if (typeof value === 'undefined') {
- throw 'You must provide a value to the update-scroll function';
- }
-
- if (axis === 'top' && value <= 0) {
- element.scrollTop = value = 0; // don't allow negative scroll
- element.dispatchEvent(createDOMEvent('ps-y-reach-start'));
- }
-
- if (axis === 'left' && value <= 0) {
- element.scrollLeft = value = 0; // don't allow negative scroll
- element.dispatchEvent(createDOMEvent('ps-x-reach-start'));
- }
-
- var i = instances.get(element);
-
- if (axis === 'top' && value >= i.contentHeight - i.containerHeight) {
- // don't allow scroll past container
- value = i.contentHeight - i.containerHeight;
- if (value - element.scrollTop <= 1) {
- // mitigates rounding errors on non-subpixel scroll values
- value = element.scrollTop;
- } else {
- element.scrollTop = value;
- }
- element.dispatchEvent(createDOMEvent('ps-y-reach-end'));
- }
-
- if (axis === 'left' && value >= i.contentWidth - i.containerWidth) {
- // don't allow scroll past container
- value = i.contentWidth - i.containerWidth;
- if (value - element.scrollLeft <= 1) {
- // mitigates rounding errors on non-subpixel scroll values
- value = element.scrollLeft;
- } else {
- element.scrollLeft = value;
- }
- element.dispatchEvent(createDOMEvent('ps-x-reach-end'));
- }
-
- if (!lastTop) {
- lastTop = element.scrollTop;
- }
-
- if (!lastLeft) {
- lastLeft = element.scrollLeft;
- }
-
- if (axis === 'top' && value < lastTop) {
- element.dispatchEvent(createDOMEvent('ps-scroll-up'));
- }
-
- if (axis === 'top' && value > lastTop) {
- element.dispatchEvent(createDOMEvent('ps-scroll-down'));
- }
-
- if (axis === 'left' && value < lastLeft) {
- element.dispatchEvent(createDOMEvent('ps-scroll-left'));
- }
-
- if (axis === 'left' && value > lastLeft) {
- element.dispatchEvent(createDOMEvent('ps-scroll-right'));
- }
-
- if (axis === 'top') {
- element.scrollTop = lastTop = value;
- element.dispatchEvent(createDOMEvent('ps-scroll-y'));
- }
-
- if (axis === 'left') {
- element.scrollLeft = lastLeft = value;
- element.dispatchEvent(createDOMEvent('ps-scroll-x'));
- }
-
-};
-
-},{"./instances":18}],21:[function(require,module,exports){
-'use strict';
-
-var _ = require('../lib/helper');
-var dom = require('../lib/dom');
-var instances = require('./instances');
-var updateGeometry = require('./update-geometry');
-var updateScroll = require('./update-scroll');
-
-module.exports = function (element) {
- var i = instances.get(element);
-
- if (!i) {
- return;
- }
-
- // Recalcuate negative scrollLeft adjustment
- i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
-
- // Recalculate rail margins
- dom.css(i.scrollbarXRail, 'display', 'block');
- dom.css(i.scrollbarYRail, 'display', 'block');
- i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
- i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
-
- // Hide scrollbars not to affect scrollWidth and scrollHeight
- dom.css(i.scrollbarXRail, 'display', 'none');
- dom.css(i.scrollbarYRail, 'display', 'none');
-
- updateGeometry(element);
-
- // Update top/left scroll to trigger events
- updateScroll(element, 'top', element.scrollTop);
- updateScroll(element, 'left', element.scrollLeft);
-
- dom.css(i.scrollbarXRail, 'display', '');
- dom.css(i.scrollbarYRail, 'display', '');
-};
-
-},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]);
diff --git a/library/perfect-scrollbar/perfect-scrollbar.jquery.min.js b/library/perfect-scrollbar/perfect-scrollbar.jquery.min.js
deleted file mode 100644
index acb198df5a..0000000000
--- a/library/perfect-scrollbar/perfect-scrollbar.jquery.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* perfect-scrollbar v0.6.15 */
-!function t(e,n,r){function o(i,s){if(!n[i]){if(!e[i]){var a="function"==typeof require&&require;if(!s&&a)return a(i,!0);if(l)return l(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[i]={exports:{}};e[i][0].call(u.exports,function(t){var n=e[i][1][t];return o(n?n:t)},u,u.exports,t,e,n,r)}return n[i].exports}for(var l="function"==typeof require&&require,i=0;i=0&&n.splice(r,1),t.className=n.join(" ")}n.add=function(t,e){t.classList?t.classList.add(e):r(t,e)},n.remove=function(t,e){t.classList?t.classList.remove(e):o(t,e)},n.list=function(t){return t.classList?Array.prototype.slice.apply(t.classList):t.className.split(" ")}},{}],3:[function(t,e,n){"use strict";function r(t,e){return window.getComputedStyle(t)[e]}function o(t,e,n){return"number"==typeof n&&(n=n.toString()+"px"),t.style[e]=n,t}function l(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}var i={};i.e=function(t,e){var n=document.createElement(t);return n.className=e,n},i.appendTo=function(t,e){return e.appendChild(t),t},i.css=function(t,e,n){return"object"==typeof e?l(t,e):"undefined"==typeof n?r(t,e):o(t,e,n)},i.matches=function(t,e){return"undefined"!=typeof t.matches?t.matches(e):"undefined"!=typeof t.matchesSelector?t.matchesSelector(e):"undefined"!=typeof t.webkitMatchesSelector?t.webkitMatchesSelector(e):"undefined"!=typeof t.mozMatchesSelector?t.mozMatchesSelector(e):"undefined"!=typeof t.msMatchesSelector?t.msMatchesSelector(e):void 0},i.remove=function(t){"undefined"!=typeof t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},i.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return i.matches(t,e)})},e.exports=i},{}],4:[function(t,e,n){"use strict";var r=function(t){this.element=t,this.events={}};r.prototype.bind=function(t,e){"undefined"==typeof this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(t,e){var n="undefined"!=typeof e;this.events[t]=this.events[t].filter(function(r){return!(!n||r===e)||(this.element.removeEventListener(t,r,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};var o=function(){this.eventElements=[]};o.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return"undefined"==typeof e&&(e=new r(t),this.eventElements.push(e)),e},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;te.scrollbarYTop?1:-1;i(t,"top",t.scrollTop+s*e.containerHeight),l(t),r.stopPropagation()}),e.event.bind(e.scrollbarX,"click",r),e.event.bind(e.scrollbarXRail,"click",function(r){var o=r.pageX-window.pageXOffset-n(e.scrollbarXRail).left,s=o>e.scrollbarXLeft?1:-1;i(t,"left",t.scrollLeft+s*e.containerWidth),l(t),r.stopPropagation()})}var o=t("../instances"),l=t("../update-geometry"),i=t("../update-scroll");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(t,e,n){"use strict";function r(t,e){function n(n){var o=r+n*e.railXRatio,i=Math.max(0,e.scrollbarXRail.getBoundingClientRect().left)+e.railXRatio*(e.railXWidth-e.scrollbarXWidth);o<0?e.scrollbarXLeft=0:o>i?e.scrollbarXLeft=i:e.scrollbarXLeft=o;var s=l.toInt(e.scrollbarXLeft*(e.contentWidth-e.containerWidth)/(e.containerWidth-e.railXRatio*e.scrollbarXWidth))-e.negativeScrollAdjustment;c(t,"left",s)}var r=null,o=null,s=function(e){n(e.pageX-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"x"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarX,"mousedown",function(n){o=n.pageX,r=l.toInt(i.css(e.scrollbarX,"left"))*e.railXRatio,l.startScrolling(t,"x"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}function o(t,e){function n(n){var o=r+n*e.railYRatio,i=Math.max(0,e.scrollbarYRail.getBoundingClientRect().top)+e.railYRatio*(e.railYHeight-e.scrollbarYHeight);o<0?e.scrollbarYTop=0:o>i?e.scrollbarYTop=i:e.scrollbarYTop=o;var s=l.toInt(e.scrollbarYTop*(e.contentHeight-e.containerHeight)/(e.containerHeight-e.railYRatio*e.scrollbarYHeight));c(t,"top",s)}var r=null,o=null,s=function(e){n(e.pageY-o),a(t),e.stopPropagation(),e.preventDefault()},u=function(){l.stopScrolling(t,"y"),e.event.unbind(e.ownerDocument,"mousemove",s)};e.event.bind(e.scrollbarY,"mousedown",function(n){o=n.pageY,r=l.toInt(i.css(e.scrollbarY,"top"))*e.railYRatio,l.startScrolling(t,"y"),e.event.bind(e.ownerDocument,"mousemove",s),e.event.once(e.ownerDocument,"mouseup",u),n.stopPropagation(),n.preventDefault()})}var l=t("../../lib/helper"),i=t("../../lib/dom"),s=t("../instances"),a=t("../update-geometry"),c=t("../update-scroll");e.exports=function(t){var e=s.get(t);r(t,e),o(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&n<0||l>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}var r=!1;e.event.bind(t,"mouseenter",function(){r=!0}),e.event.bind(t,"mouseleave",function(){r=!1});var i=!1;e.event.bind(e.ownerDocument,"keydown",function(c){if(!(c.isDefaultPrevented&&c.isDefaultPrevented()||c.defaultPrevented)){var u=l.matches(e.scrollbarX,":focus")||l.matches(e.scrollbarY,":focus");if(r||u){var d=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(d){if("IFRAME"===d.tagName)d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(o.isEditable(d))return}var p=0,f=0;switch(c.which){case 37:p=c.metaKey?-e.contentWidth:c.altKey?-e.containerWidth:-30;break;case 38:f=c.metaKey?e.contentHeight:c.altKey?e.containerHeight:30;break;case 39:p=c.metaKey?e.contentWidth:c.altKey?e.containerWidth:30;break;case 40:f=c.metaKey?-e.contentHeight:c.altKey?-e.containerHeight:-30;break;case 33:f=90;break;case 32:f=c.shiftKey?90:-90;break;case 34:f=-90;break;case 35:f=c.ctrlKey?-e.contentHeight:-e.containerHeight;break;case 36:f=c.ctrlKey?t.scrollTop:e.containerHeight;break;default:return}a(t,"top",t.scrollTop-f),a(t,"left",t.scrollLeft+p),s(t),i=n(p,f),i&&c.preventDefault()}}})}var o=t("../../lib/helper"),l=t("../../lib/dom"),i=t("../instances"),s=t("../update-geometry"),a=t("../update-scroll");e.exports=function(t){var e=i.get(t);r(t,e)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(t,e,n){"use strict";function r(t,e){function n(n,r){var o=t.scrollTop;if(0===n){if(!e.scrollbarYActive)return!1;if(0===o&&r>0||o>=e.contentHeight-e.containerHeight&&r<0)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&n<0||l>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}function r(t){var e=t.deltaX,n=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!==e&&n!==n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}function o(e,n){var r=t.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(r){if(!window.getComputedStyle(r).overflow.match(/(scroll|auto)/))return!1;var o=r.scrollHeight-r.clientHeight;if(o>0&&!(0===r.scrollTop&&n>0||r.scrollTop===o&&n<0))return!0;var l=r.scrollLeft-r.clientWidth;if(l>0&&!(0===r.scrollLeft&&e<0||r.scrollLeft===l&&e>0))return!0}return!1}function s(s){var c=r(s),u=c[0],d=c[1];o(u,d)||(a=!1,e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(d?i(t,"top",t.scrollTop-d*e.settings.wheelSpeed):i(t,"top",t.scrollTop+u*e.settings.wheelSpeed),a=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(u?i(t,"left",t.scrollLeft+u*e.settings.wheelSpeed):i(t,"left",t.scrollLeft-d*e.settings.wheelSpeed),a=!0):(i(t,"top",t.scrollTop-d*e.settings.wheelSpeed),i(t,"left",t.scrollLeft+u*e.settings.wheelSpeed)),l(t),a=a||n(u,d),a&&(s.stopPropagation(),s.preventDefault()))}var a=!1;"undefined"!=typeof window.onwheel?e.event.bind(t,"wheel",s):"undefined"!=typeof window.onmousewheel&&e.event.bind(t,"mousewheel",s)}var o=t("../instances"),l=t("../update-geometry"),i=t("../update-scroll");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(t,e,n){"use strict";function r(t,e){e.event.bind(t,"scroll",function(){l(t)})}var o=t("../instances"),l=t("../update-geometry");e.exports=function(t){var e=o.get(t);r(t,e)}},{"../instances":18,"../update-geometry":19}],15:[function(t,e,n){"use strict";function r(t,e){function n(){var t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===t.toString().length?null:t.getRangeAt(0).commonAncestorContainer}function r(){c||(c=setInterval(function(){return l.get(t)?(s(t,"top",t.scrollTop+u.top),s(t,"left",t.scrollLeft+u.left),void i(t)):void clearInterval(c)},50))}function a(){c&&(clearInterval(c),c=null),o.stopScrolling(t)}var c=null,u={top:0,left:0},d=!1;e.event.bind(e.ownerDocument,"selectionchange",function(){t.contains(n())?d=!0:(d=!1,a())}),e.event.bind(window,"mouseup",function(){d&&(d=!1,a())}),e.event.bind(window,"keyup",function(){d&&(d=!1,a())}),e.event.bind(window,"mousemove",function(e){if(d){var n={x:e.pageX,y:e.pageY},l={left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight};n.xl.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.yl.bottom-3?(n.y-l.bottom+3<5?u.top=5:u.top=20,o.startScrolling(t,"y")):u.top=0,0===u.top&&0===u.left?a():r()}})}var o=t("../../lib/helper"),l=t("../instances"),i=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){var e=l.get(t);r(t,e)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(t,e,n){"use strict";function r(t,e,n,r){function o(n,r){var o=t.scrollTop,l=t.scrollLeft,i=Math.abs(n),s=Math.abs(r);if(s>i){if(r<0&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(i>s&&(n<0&&l===e.contentWidth-e.containerWidth||n>0&&0===l))return!e.settings.swipePropagation;return!0}function a(e,n){s(t,"top",t.scrollTop-n),s(t,"left",t.scrollLeft-e),i(t)}function c(){w=!0}function u(){w=!1}function d(t){return t.targetTouches?t.targetTouches[0]:t}function p(t){return!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE)}function f(t){if(p(t)){Y=!0;var e=d(t);g.pageX=e.pageX,g.pageY=e.pageY,v=(new Date).getTime(),null!==y&&clearInterval(y),t.stopPropagation()}}function h(t){if(!Y&&e.settings.swipePropagation&&f(t),!w&&Y&&p(t)){var n=d(t),r={pageX:n.pageX,pageY:n.pageY},l=r.pageX-g.pageX,i=r.pageY-g.pageY;a(l,i),g=r;var s=(new Date).getTime(),c=s-v;c>0&&(m.x=l/c,m.y=i/c,v=s),o(l,i)&&(t.stopPropagation(),t.preventDefault())}}function b(){!w&&Y&&(Y=!1,clearInterval(y),y=setInterval(function(){return l.get(t)&&(m.x||m.y)?Math.abs(m.x)<.01&&Math.abs(m.y)<.01?void clearInterval(y):(a(30*m.x,30*m.y),m.x*=.8,void(m.y*=.8)):void clearInterval(y)},10))}var g={},v=0,m={},y=null,w=!1,Y=!1;n&&(e.event.bind(window,"touchstart",c),e.event.bind(window,"touchend",u),e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",b)),r&&(window.PointerEvent?(e.event.bind(window,"pointerdown",c),e.event.bind(window,"pointerup",u),e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",b)):window.MSPointerEvent&&(e.event.bind(window,"MSPointerDown",c),e.event.bind(window,"MSPointerUp",u),e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",b)))}var o=t("../../lib/helper"),l=t("../instances"),i=t("../update-geometry"),s=t("../update-scroll");e.exports=function(t){if(o.env.supportsTouch||o.env.supportsIePointer){var e=l.get(t);r(t,e,o.env.supportsTouch,o.env.supportsIePointer)}}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/class"),l=t("./instances"),i=t("./update-geometry"),s={"click-rail":t("./handler/click-rail"),"drag-scrollbar":t("./handler/drag-scrollbar"),keyboard:t("./handler/keyboard"),wheel:t("./handler/mouse-wheel"),touch:t("./handler/touch"),selection:t("./handler/selection")},a=t("./handler/native-scroll");e.exports=function(t,e){e="object"==typeof e?e:{},o.add(t,"ps-container");var n=l.add(t);n.settings=r.extend(n.settings,e),o.add(t,"ps-theme-"+n.settings.theme),n.settings.handlers.forEach(function(e){s[e](t)}),a(t),i(t)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(t,e,n){"use strict";function r(t){function e(){a.add(t,"ps-focus")}function n(){a.remove(t,"ps-focus")}var r=this;r.settings=s.clone(c),r.containerWidth=null,r.containerHeight=null,r.contentWidth=null,r.contentHeight=null,r.isRtl="rtl"===u.css(t,"direction"),r.isNegativeScroll=function(){var e=t.scrollLeft,n=null;return t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=e,n}(),r.negativeScrollAdjustment=r.isNegativeScroll?t.scrollWidth-t.clientWidth:0,r.event=new d,r.ownerDocument=t.ownerDocument||document,r.scrollbarXRail=u.appendTo(u.e("div","ps-scrollbar-x-rail"),t),r.scrollbarX=u.appendTo(u.e("div","ps-scrollbar-x"),r.scrollbarXRail),r.scrollbarX.setAttribute("tabindex",0),r.event.bind(r.scrollbarX,"focus",e),r.event.bind(r.scrollbarX,"blur",n),r.scrollbarXActive=null,r.scrollbarXWidth=null,r.scrollbarXLeft=null,r.scrollbarXBottom=s.toInt(u.css(r.scrollbarXRail,"bottom")),r.isScrollbarXUsingBottom=r.scrollbarXBottom===r.scrollbarXBottom,r.scrollbarXTop=r.isScrollbarXUsingBottom?null:s.toInt(u.css(r.scrollbarXRail,"top")),r.railBorderXWidth=s.toInt(u.css(r.scrollbarXRail,"borderLeftWidth"))+s.toInt(u.css(r.scrollbarXRail,"borderRightWidth")),u.css(r.scrollbarXRail,"display","block"),r.railXMarginWidth=s.toInt(u.css(r.scrollbarXRail,"marginLeft"))+s.toInt(u.css(r.scrollbarXRail,"marginRight")),u.css(r.scrollbarXRail,"display",""),r.railXWidth=null,r.railXRatio=null,r.scrollbarYRail=u.appendTo(u.e("div","ps-scrollbar-y-rail"),t),r.scrollbarY=u.appendTo(u.e("div","ps-scrollbar-y"),r.scrollbarYRail),r.scrollbarY.setAttribute("tabindex",0),r.event.bind(r.scrollbarY,"focus",e),r.event.bind(r.scrollbarY,"blur",n),r.scrollbarYActive=null,r.scrollbarYHeight=null,r.scrollbarYTop=null,r.scrollbarYRight=s.toInt(u.css(r.scrollbarYRail,"right")),r.isScrollbarYUsingRight=r.scrollbarYRight===r.scrollbarYRight,r.scrollbarYLeft=r.isScrollbarYUsingRight?null:s.toInt(u.css(r.scrollbarYRail,"left")),r.scrollbarYOuterWidth=r.isRtl?s.outerWidth(r.scrollbarY):null,r.railBorderYWidth=s.toInt(u.css(r.scrollbarYRail,"borderTopWidth"))+s.toInt(u.css(r.scrollbarYRail,"borderBottomWidth")),u.css(r.scrollbarYRail,"display","block"),r.railYMarginHeight=s.toInt(u.css(r.scrollbarYRail,"marginTop"))+s.toInt(u.css(r.scrollbarYRail,"marginBottom")),u.css(r.scrollbarYRail,"display",""),r.railYHeight=null,r.railYRatio=null}function o(t){return t.getAttribute("data-ps-id")}function l(t,e){t.setAttribute("data-ps-id",e)}function i(t){t.removeAttribute("data-ps-id")}var s=t("../lib/helper"),a=t("../lib/class"),c=t("./default-setting"),u=t("../lib/dom"),d=t("../lib/event-manager"),p=t("../lib/guid"),f={};n.add=function(t){var e=p();return l(t,e),f[e]=new r(t),f[e]},n.remove=function(t){delete f[o(t)],i(t)},n.get=function(t){return f[o(t)]}},{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(t,e,n){"use strict";function r(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function o(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,s.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,s.css(e.scrollbarYRail,r),s.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),s.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}var l=t("../lib/helper"),i=t("../lib/class"),s=t("../lib/dom"),a=t("./instances"),c=t("./update-scroll");e.exports=function(t){var e=a.get(t);e.containerWidth=t.clientWidth,e.containerHeight=t.clientHeight,e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight;var n;t.contains(e.scrollbarXRail)||(n=s.queryChildren(t,".ps-scrollbar-x-rail"),n.length>0&&n.forEach(function(t){s.remove(t)}),s.appendTo(e.scrollbarXRail,t)),t.contains(e.scrollbarYRail)||(n=s.queryChildren(t,".ps-scrollbar-y-rail"),n.length>0&&n.forEach(function(t){s.remove(t)}),s.appendTo(e.scrollbarYRail,t)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),o(t,e),e.scrollbarXActive?i.add(t,"ps-active-x"):(i.remove(t,"ps-active-x"),e.scrollbarXWidth=0,e.scrollbarXLeft=0,c(t,"left",0)),e.scrollbarYActive?i.add(t,"ps-active-y"):(i.remove(t,"ps-active-y"),e.scrollbarYHeight=0,e.scrollbarYTop=0,c(t,"top",0))}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(t,e,n){"use strict";var r,o,l=t("./instances"),i=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e};e.exports=function(t,e,n){if("undefined"==typeof t)throw"You must provide an element to the update-scroll function";if("undefined"==typeof e)throw"You must provide an axis to the update-scroll function";if("undefined"==typeof n)throw"You must provide a value to the update-scroll function";"top"===e&&n<=0&&(t.scrollTop=n=0,t.dispatchEvent(i("ps-y-reach-start"))),"left"===e&&n<=0&&(t.scrollLeft=n=0,t.dispatchEvent(i("ps-x-reach-start")));var s=l.get(t);"top"===e&&n>=s.contentHeight-s.containerHeight&&(n=s.contentHeight-s.containerHeight,n-t.scrollTop<=1?n=t.scrollTop:t.scrollTop=n,t.dispatchEvent(i("ps-y-reach-end"))),"left"===e&&n>=s.contentWidth-s.containerWidth&&(n=s.contentWidth-s.containerWidth,n-t.scrollLeft<=1?n=t.scrollLeft:t.scrollLeft=n,t.dispatchEvent(i("ps-x-reach-end"))),r||(r=t.scrollTop),o||(o=t.scrollLeft),"top"===e&&nr&&t.dispatchEvent(i("ps-scroll-down")),"left"===e&&no&&t.dispatchEvent(i("ps-scroll-right")),"top"===e&&(t.scrollTop=r=n,t.dispatchEvent(i("ps-scroll-y"))),"left"===e&&(t.scrollLeft=o=n,t.dispatchEvent(i("ps-scroll-x")))}},{"./instances":18}],21:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances"),i=t("./update-geometry"),s=t("./update-scroll");e.exports=function(t){var e=l.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,o.css(e.scrollbarXRail,"display","block"),o.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=r.toInt(o.css(e.scrollbarXRail,"marginLeft"))+r.toInt(o.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=r.toInt(o.css(e.scrollbarYRail,"marginTop"))+r.toInt(o.css(e.scrollbarYRail,"marginBottom")),o.css(e.scrollbarXRail,"display","none"),o.css(e.scrollbarYRail,"display","none"),i(t),s(t,"top",t.scrollTop),s(t,"left",t.scrollLeft),o.css(e.scrollbarXRail,"display",""),o.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]);
\ No newline at end of file
diff --git a/library/perfect-scrollbar/perfect-scrollbar.min.css b/library/perfect-scrollbar/perfect-scrollbar.min.css
deleted file mode 100644
index 3eb93c4ba2..0000000000
--- a/library/perfect-scrollbar/perfect-scrollbar.min.css
+++ /dev/null
@@ -1,2 +0,0 @@
-/* perfect-scrollbar v0.6.15 */
-.ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999}
diff --git a/view/templates/head.tpl b/view/templates/head.tpl
index 4206e535be..85e2be6c23 100644
--- a/view/templates/head.tpl
+++ b/view/templates/head.tpl
@@ -6,7 +6,7 @@
-
+
@@ -42,7 +42,7 @@
-
+
diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl
index c6d0b88b2f..c493beb0f6 100644
--- a/view/theme/frio/templates/head.tpl
+++ b/view/theme/frio/templates/head.tpl
@@ -11,7 +11,7 @@
-
+
@@ -66,7 +66,7 @@
-
+