Interactive interface for browsing global, full-resolution satellite imagery
#563 Adjust CSS and remove npm library files
Taylor Gunnoe8ed4fec6e257
diff --git a/.gitignore b/.gitignoreindex a8ce158c7..3e9ed26c3 100644--- a/.gitignore+++ b/.gitignore@@ -1,7 +1,7 @@/build/dist/node_modules-/web/ext/node_modules+/web/ext/node_modules/*python*.pyc.projectdiff --git a/web/css/wv.layers.modal.css b/web/css/wv.layers.modal.cssindex 1ab9dc3f0..b2aee6fda 100644--- a/web/css/wv.layers.modal.css+++ b/web/css/wv.layers.modal.css@@ -308,16 +308,19 @@padding-top: 5px;}#layers-all .layers-all-layer {- padding: .5em .5em .5em .7em;- box-sizing: border-box;+ padding: 0 0 .5em .7em;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;-o-box-sizing: border-box;+ box-sizing: border-box;+ border:0;+ position:relative;}-#selected-category .ui-accordion-header,-#layers-all .layers-all-layer {+#selected-category .ui-accordion-header {border:0;+ position:relative;+ margin-top: 5px;}#layers-all .layers-all-title-wrap {@@ -327,13 +330,6 @@padding-top: 0.5em;}-#layers-all .layers-all-layer,-#selected-category .ui-accordion-header {- position: relative;- border: 0;- margin-top: 5px;-}-#layers-all .layers-all-layer,#selected-category .ui-accordion-header,#selected-category .ui-state-focus {diff --git a/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.js b/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.jsdeleted file mode 100644index 54ad1c7d6..000000000--- a/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.js+++ /dev/null@@ -1,3558 +0,0 @@-/*!- * Isotope PACKAGED v3.0.4- *- * Licensed GPLv3 for open source use- * or Isotope Commercial License for commercial use- *- * http://isotope.metafizzy.co- * Copyright 2017 Metafizzy- */--/**- * Bridget makes jQuery widgets- * v2.0.1- * MIT license- */--/* jshint browser: true, strict: true, undef: true, unused: true */--( function( window, factory ) {- // universal module definition- /*jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {- return factory( window, jQuery );- });- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- window,- require('jquery')- );- } else {- // browser global- window.jQueryBridget = factory(- window,- window.jQuery- );- }--}( window, function factory( window, jQuery ) {-'use strict';--// ----- utils ----- //--var arraySlice = Array.prototype.slice;--// helper function for logging errors-// $.error breaks jQuery chaining-var console = window.console;-var logError = typeof console == 'undefined' ? function() {} :- function( message ) {- console.error( message );- };--// ----- jQueryBridget ----- //--function jQueryBridget( namespace, PluginClass, $ ) {- $ = $ || jQuery || window.jQuery;- if ( !$ ) {- return;- }-- // add option method -> $().plugin('option', {...})- if ( !PluginClass.prototype.option ) {- // option setter- PluginClass.prototype.option = function( opts ) {- // bail out if not an object- if ( !$.isPlainObject( opts ) ){- return;- }- this.options = $.extend( true, this.options, opts );- };- }-- // make jQuery plugin- $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {- if ( typeof arg0 == 'string' ) {- // method call $().plugin( 'methodName', { options } )- // shift arguments by 1- var args = arraySlice.call( arguments, 1 );- return methodCall( this, arg0, args );- }- // just $().plugin({ options })- plainCall( this, arg0 );- return this;- };-- // $().plugin('methodName')- function methodCall( $elems, methodName, args ) {- var returnValue;- var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';-- $elems.each( function( i, elem ) {- // get instance- var instance = $.data( elem, namespace );- if ( !instance ) {- logError( namespace + ' not initialized. Cannot call methods, i.e. ' +- pluginMethodStr );- return;- }-- var method = instance[ methodName ];- if ( !method || methodName.charAt(0) == '_' ) {- logError( pluginMethodStr + ' is not a valid method' );- return;- }-- // apply method, get return value- var value = method.apply( instance, args );- // set return value if value is returned, use only first value- returnValue = returnValue === undefined ? value : returnValue;- });-- return returnValue !== undefined ? returnValue : $elems;- }-- function plainCall( $elems, options ) {- $elems.each( function( i, elem ) {- var instance = $.data( elem, namespace );- if ( instance ) {- // set options & init- instance.option( options );- instance._init();- } else {- // initialize new instance- instance = new PluginClass( elem, options );- $.data( elem, namespace, instance );- }- });- }-- updateJQuery( $ );--}--// ----- updateJQuery ----- //--// set $.bridget for v1 backwards compatibility-function updateJQuery( $ ) {- if ( !$ || ( $ && $.bridget ) ) {- return;- }- $.bridget = jQueryBridget;-}--updateJQuery( jQuery || window.jQuery );--// ----- ----- //--return jQueryBridget;--}));--/**- * EvEmitter v1.0.3- * Lil' event emitter- * MIT License- */--/* jshint unused: true, undef: true, strict: true */--( function( global, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module, window */- if ( typeof define == 'function' && define.amd ) {- // AMD - RequireJS- define( 'ev-emitter/ev-emitter',factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS - Browserify, Webpack- module.exports = factory();- } else {- // Browser globals- global.EvEmitter = factory();- }--}( typeof window != 'undefined' ? window : this, function() {----function EvEmitter() {}--var proto = EvEmitter.prototype;--proto.on = function( eventName, listener ) {- if ( !eventName || !listener ) {- return;- }- // set events hash- var events = this._events = this._events || {};- // set listeners array- var listeners = events[ eventName ] = events[ eventName ] || [];- // only add once- if ( listeners.indexOf( listener ) == -1 ) {- listeners.push( listener );- }-- return this;-};--proto.once = function( eventName, listener ) {- if ( !eventName || !listener ) {- return;- }- // add event- this.on( eventName, listener );- // set once flag- // set onceEvents hash- var onceEvents = this._onceEvents = this._onceEvents || {};- // set onceListeners object- var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};- // set flag- onceListeners[ listener ] = true;-- return this;-};--proto.off = function( eventName, listener ) {- var listeners = this._events && this._events[ eventName ];- if ( !listeners || !listeners.length ) {- return;- }- var index = listeners.indexOf( listener );- if ( index != -1 ) {- listeners.splice( index, 1 );- }-- return this;-};--proto.emitEvent = function( eventName, args ) {- var listeners = this._events && this._events[ eventName ];- if ( !listeners || !listeners.length ) {- return;- }- var i = 0;- var listener = listeners[i];- args = args || [];- // once stuff- var onceListeners = this._onceEvents && this._onceEvents[ eventName ];-- while ( listener ) {- var isOnce = onceListeners && onceListeners[ listener ];- if ( isOnce ) {- // remove listener- // remove before trigger to prevent recursion- this.off( eventName, listener );- // unset once flag- delete onceListeners[ listener ];- }- // trigger listener- listener.apply( this, args );- // get next listener- i += isOnce ? 0 : 1;- listener = listeners[i];- }-- return this;-};--return EvEmitter;--}));--/*!- * getSize v2.0.2- * measure size of elements- * MIT license- */--/*jshint browser: true, strict: true, undef: true, unused: true */-/*global define: false, module: false, console: false */--( function( window, factory ) {- 'use strict';-- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'get-size/get-size',[],function() {- return factory();- });- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory();- } else {- // browser global- window.getSize = factory();- }--})( window, function factory() {-'use strict';--// -------------------------- helpers -------------------------- //--// get a number from a string, not a percentage-function getStyleSize( value ) {- var num = parseFloat( value );- // not a percent like '100%', and a number- var isValid = value.indexOf('%') == -1 && !isNaN( num );- return isValid && num;-}--function noop() {}--var logError = typeof console == 'undefined' ? noop :- function( message ) {- console.error( message );- };--// -------------------------- measurements -------------------------- //--var measurements = [- 'paddingLeft',- 'paddingRight',- 'paddingTop',- 'paddingBottom',- 'marginLeft',- 'marginRight',- 'marginTop',- 'marginBottom',- 'borderLeftWidth',- 'borderRightWidth',- 'borderTopWidth',- 'borderBottomWidth'-];--var measurementsLength = measurements.length;--function getZeroSize() {- var size = {- width: 0,- height: 0,- innerWidth: 0,- innerHeight: 0,- outerWidth: 0,- outerHeight: 0- };- for ( var i=0; i < measurementsLength; i++ ) {- var measurement = measurements[i];- size[ measurement ] = 0;- }- return size;-}--// -------------------------- getStyle -------------------------- //--/**- * getStyle, get style of element, check for Firefox bug- * https://bugzilla.mozilla.org/show_bug.cgi?id=548397- */-function getStyle( elem ) {- var style = getComputedStyle( elem );- if ( !style ) {- logError( 'Style returned ' + style +- '. Are you running this code in a hidden iframe on Firefox? ' +- 'See http://bit.ly/getsizebug1' );- }- return style;-}--// -------------------------- setup -------------------------- //--var isSetup = false;--var isBoxSizeOuter;--/**- * setup- * check isBoxSizerOuter- * do on first getSize() rather than on page load for Firefox bug- */-function setup() {- // setup once- if ( isSetup ) {- return;- }- isSetup = true;-- // -------------------------- box sizing -------------------------- //-- /**- * WebKit measures the outer-width on style.width on border-box elems- * IE & Firefox<29 measures the inner-width- */- var div = document.createElement('div');- div.style.width = '200px';- div.style.padding = '1px 2px 3px 4px';- div.style.borderStyle = 'solid';- div.style.borderWidth = '1px 2px 3px 4px';- div.style.boxSizing = 'border-box';-- var body = document.body || document.documentElement;- body.appendChild( div );- var style = getStyle( div );-- getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200;- body.removeChild( div );--}--// -------------------------- getSize -------------------------- //--function getSize( elem ) {- setup();-- // use querySeletor if elem is string- if ( typeof elem == 'string' ) {- elem = document.querySelector( elem );- }-- // do not proceed on non-objects- if ( !elem || typeof elem != 'object' || !elem.nodeType ) {- return;- }-- var style = getStyle( elem );-- // if hidden, everything is 0- if ( style.display == 'none' ) {- return getZeroSize();- }-- var size = {};- size.width = elem.offsetWidth;- size.height = elem.offsetHeight;-- var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';-- // get all measurements- for ( var i=0; i < measurementsLength; i++ ) {- var measurement = measurements[i];- var value = style[ measurement ];- var num = parseFloat( value );- // any 'auto', 'medium' value will be 0- size[ measurement ] = !isNaN( num ) ? num : 0;- }-- var paddingWidth = size.paddingLeft + size.paddingRight;- var paddingHeight = size.paddingTop + size.paddingBottom;- var marginWidth = size.marginLeft + size.marginRight;- var marginHeight = size.marginTop + size.marginBottom;- var borderWidth = size.borderLeftWidth + size.borderRightWidth;- var borderHeight = size.borderTopWidth + size.borderBottomWidth;-- var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;-- // overwrite width and height if we can get it from style- var styleWidth = getStyleSize( style.width );- if ( styleWidth !== false ) {- size.width = styleWidth +- // add padding and border unless it's already including it- ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );- }-- var styleHeight = getStyleSize( style.height );- if ( styleHeight !== false ) {- size.height = styleHeight +- // add padding and border unless it's already including it- ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );- }-- size.innerWidth = size.width - ( paddingWidth + borderWidth );- size.innerHeight = size.height - ( paddingHeight + borderHeight );-- size.outerWidth = size.width + marginWidth;- size.outerHeight = size.height + marginHeight;-- return size;-}--return getSize;--});--/**- * matchesSelector v2.0.2- * matchesSelector( element, '.selector' )- * MIT license- */--/*jshint browser: true, strict: true, undef: true, unused: true */--( function( window, factory ) {- /*global define: false, module: false */- 'use strict';- // universal module definition- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'desandro-matches-selector/matches-selector',factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory();- } else {- // browser global- window.matchesSelector = factory();- }--}( window, function factory() {- 'use strict';-- var matchesMethod = ( function() {- var ElemProto = window.Element.prototype;- // check for the standard method name first- if ( ElemProto.matches ) {- return 'matches';- }- // check un-prefixed- if ( ElemProto.matchesSelector ) {- return 'matchesSelector';- }- // check vendor prefixes- var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];-- for ( var i=0; i < prefixes.length; i++ ) {- var prefix = prefixes[i];- var method = prefix + 'MatchesSelector';- if ( ElemProto[ method ] ) {- return method;- }- }- })();-- return function matchesSelector( elem, selector ) {- return elem[ matchesMethod ]( selector );- };--}));--/**- * Fizzy UI utils v2.0.5- * MIT license- */--/*jshint browser: true, undef: true, unused: true, strict: true */--( function( window, factory ) {- // universal module definition- /*jshint strict: false */ /*globals define, module, require */-- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'fizzy-ui-utils/utils',[- 'desandro-matches-selector/matches-selector'- ], function( matchesSelector ) {- return factory( window, matchesSelector );- });- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- window,- require('desandro-matches-selector')- );- } else {- // browser global- window.fizzyUIUtils = factory(- window,- window.matchesSelector- );- }--}( window, function factory( window, matchesSelector ) {----var utils = {};--// ----- extend ----- //--// extends objects-utils.extend = function( a, b ) {- for ( var prop in b ) {- a[ prop ] = b[ prop ];- }- return a;-};--// ----- modulo ----- //--utils.modulo = function( num, div ) {- return ( ( num % div ) + div ) % div;-};--// ----- makeArray ----- //--// turn element or nodeList into an array-utils.makeArray = function( obj ) {- var ary = [];- if ( Array.isArray( obj ) ) {- // use object if already an array- ary = obj;- } else if ( obj && typeof obj == 'object' &&- typeof obj.length == 'number' ) {- // convert nodeList to array- for ( var i=0; i < obj.length; i++ ) {- ary.push( obj[i] );- }- } else {- // array of single index- ary.push( obj );- }- return ary;-};--// ----- removeFrom ----- //--utils.removeFrom = function( ary, obj ) {- var index = ary.indexOf( obj );- if ( index != -1 ) {- ary.splice( index, 1 );- }-};--// ----- getParent ----- //--utils.getParent = function( elem, selector ) {- while ( elem.parentNode && elem != document.body ) {- elem = elem.parentNode;- if ( matchesSelector( elem, selector ) ) {- return elem;- }- }-};--// ----- getQueryElement ----- //--// use element as selector string-utils.getQueryElement = function( elem ) {- if ( typeof elem == 'string' ) {- return document.querySelector( elem );- }- return elem;-};--// ----- handleEvent ----- //--// enable .ontype to trigger from .addEventListener( elem, 'type' )-utils.handleEvent = function( event ) {- var method = 'on' + event.type;- if ( this[ method ] ) {- this[ method ]( event );- }-};--// ----- filterFindElements ----- //--utils.filterFindElements = function( elems, selector ) {- // make array of elems- elems = utils.makeArray( elems );- var ffElems = [];-- elems.forEach( function( elem ) {- // check that elem is an actual element- if ( !( elem instanceof HTMLElement ) ) {- return;- }- // add elem if no selector- if ( !selector ) {- ffElems.push( elem );- return;- }- // filter & find items if we have a selector- // filter- if ( matchesSelector( elem, selector ) ) {- ffElems.push( elem );- }- // find children- var childElems = elem.querySelectorAll( selector );- // concat childElems to filterFound array- for ( var i=0; i < childElems.length; i++ ) {- ffElems.push( childElems[i] );- }- });-- return ffElems;-};--// ----- debounceMethod ----- //--utils.debounceMethod = function( _class, methodName, threshold ) {- // original method- var method = _class.prototype[ methodName ];- var timeoutName = methodName + 'Timeout';-- _class.prototype[ methodName ] = function() {- var timeout = this[ timeoutName ];- if ( timeout ) {- clearTimeout( timeout );- }- var args = arguments;-- var _this = this;- this[ timeoutName ] = setTimeout( function() {- method.apply( _this, args );- delete _this[ timeoutName ];- }, threshold || 100 );- };-};--// ----- docReady ----- //--utils.docReady = function( callback ) {- var readyState = document.readyState;- if ( readyState == 'complete' || readyState == 'interactive' ) {- // do async to allow for other scripts to run. metafizzy/flickity#441- setTimeout( callback );- } else {- document.addEventListener( 'DOMContentLoaded', callback );- }-};--// ----- htmlInit ----- //--// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/-utils.toDashed = function( str ) {- return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {- return $1 + '-' + $2;- }).toLowerCase();-};--var console = window.console;-/**- * allow user to initialize classes via [data-namespace] or .js-namespace class- * htmlInit( Widget, 'widgetName' )- * options are parsed from data-namespace-options- */-utils.htmlInit = function( WidgetClass, namespace ) {- utils.docReady( function() {- var dashedNamespace = utils.toDashed( namespace );- var dataAttr = 'data-' + dashedNamespace;- var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );- var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );- var elems = utils.makeArray( dataAttrElems )- .concat( utils.makeArray( jsDashElems ) );- var dataOptionsAttr = dataAttr + '-options';- var jQuery = window.jQuery;-- elems.forEach( function( elem ) {- var attr = elem.getAttribute( dataAttr ) ||- elem.getAttribute( dataOptionsAttr );- var options;- try {- options = attr && JSON.parse( attr );- } catch ( error ) {- // log error, do not initialize- if ( console ) {- console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +- ': ' + error );- }- return;- }- // initialize- var instance = new WidgetClass( elem, options );- // make available via $().data('namespace')- if ( jQuery ) {- jQuery.data( elem, namespace, instance );- }- });-- });-};--// ----- ----- //--return utils;--}));--/**- * Outlayer Item- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD - RequireJS- define( 'outlayer/item',[- 'ev-emitter/ev-emitter',- 'get-size/get-size'- ],- factory- );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS - Browserify, Webpack- module.exports = factory(- require('ev-emitter'),- require('get-size')- );- } else {- // browser global- window.Outlayer = {};- window.Outlayer.Item = factory(- window.EvEmitter,- window.getSize- );- }--}( window, function factory( EvEmitter, getSize ) {-'use strict';--// ----- helpers ----- //--function isEmptyObj( obj ) {- for ( var prop in obj ) {- return false;- }- prop = null;- return true;-}--// -------------------------- CSS3 support -------------------------- //---var docElemStyle = document.documentElement.style;--var transitionProperty = typeof docElemStyle.transition == 'string' ?- 'transition' : 'WebkitTransition';-var transformProperty = typeof docElemStyle.transform == 'string' ?- 'transform' : 'WebkitTransform';--var transitionEndEvent = {- WebkitTransition: 'webkitTransitionEnd',- transition: 'transitionend'-}[ transitionProperty ];--// cache all vendor properties that could have vendor prefix-var vendorProperties = {- transform: transformProperty,- transition: transitionProperty,- transitionDuration: transitionProperty + 'Duration',- transitionProperty: transitionProperty + 'Property',- transitionDelay: transitionProperty + 'Delay'-};--// -------------------------- Item -------------------------- //--function Item( element, layout ) {- if ( !element ) {- return;- }-- this.element = element;- // parent layout class, i.e. Masonry, Isotope, or Packery- this.layout = layout;- this.position = {- x: 0,- y: 0- };-- this._create();-}--// inherit EvEmitter-var proto = Item.prototype = Object.create( EvEmitter.prototype );-proto.constructor = Item;--proto._create = function() {- // transition objects- this._transn = {- ingProperties: {},- clean: {},- onEnd: {}- };-- this.css({- position: 'absolute'- });-};--// trigger specified handler for event type-proto.handleEvent = function( event ) {- var method = 'on' + event.type;- if ( this[ method ] ) {- this[ method ]( event );- }-};--proto.getSize = function() {- this.size = getSize( this.element );-};--/**- * apply CSS styles to element- * @param {Object} style- */-proto.css = function( style ) {- var elemStyle = this.element.style;-- for ( var prop in style ) {- // use vendor property if available- var supportedProp = vendorProperties[ prop ] || prop;- elemStyle[ supportedProp ] = style[ prop ];- }-};-- // measure position, and sets it-proto.getPosition = function() {- var style = getComputedStyle( this.element );- var isOriginLeft = this.layout._getOption('originLeft');- var isOriginTop = this.layout._getOption('originTop');- var xValue = style[ isOriginLeft ? 'left' : 'right' ];- var yValue = style[ isOriginTop ? 'top' : 'bottom' ];- // convert percent to pixels- var layoutSize = this.layout.size;- var x = xValue.indexOf('%') != -1 ?- ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 );- var y = yValue.indexOf('%') != -1 ?- ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 );-- // clean up 'auto' or other non-integer values- x = isNaN( x ) ? 0 : x;- y = isNaN( y ) ? 0 : y;- // remove padding from measurement- x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;- y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;-- this.position.x = x;- this.position.y = y;-};--// set settled position, apply padding-proto.layoutPosition = function() {- var layoutSize = this.layout.size;- var style = {};- var isOriginLeft = this.layout._getOption('originLeft');- var isOriginTop = this.layout._getOption('originTop');-- // x- var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';- var xProperty = isOriginLeft ? 'left' : 'right';- var xResetProperty = isOriginLeft ? 'right' : 'left';-- var x = this.position.x + layoutSize[ xPadding ];- // set in percentage or pixels- style[ xProperty ] = this.getXValue( x );- // reset other property- style[ xResetProperty ] = '';-- // y- var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';- var yProperty = isOriginTop ? 'top' : 'bottom';- var yResetProperty = isOriginTop ? 'bottom' : 'top';-- var y = this.position.y + layoutSize[ yPadding ];- // set in percentage or pixels- style[ yProperty ] = this.getYValue( y );- // reset other property- style[ yResetProperty ] = '';-- this.css( style );- this.emitEvent( 'layout', [ this ] );-};--proto.getXValue = function( x ) {- var isHorizontal = this.layout._getOption('horizontal');- return this.layout.options.percentPosition && !isHorizontal ?- ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';-};--proto.getYValue = function( y ) {- var isHorizontal = this.layout._getOption('horizontal');- return this.layout.options.percentPosition && isHorizontal ?- ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';-};--proto._transitionTo = function( x, y ) {- this.getPosition();- // get current x & y from top/left- var curX = this.position.x;- var curY = this.position.y;-- var compareX = parseInt( x, 10 );- var compareY = parseInt( y, 10 );- var didNotMove = compareX === this.position.x && compareY === this.position.y;-- // save end position- this.setPosition( x, y );-- // if did not move and not transitioning, just go to layout- if ( didNotMove && !this.isTransitioning ) {- this.layoutPosition();- return;- }-- var transX = x - curX;- var transY = y - curY;- var transitionStyle = {};- transitionStyle.transform = this.getTranslate( transX, transY );-- this.transition({- to: transitionStyle,- onTransitionEnd: {- transform: this.layoutPosition- },- isCleaning: true- });-};--proto.getTranslate = function( x, y ) {- // flip cooridinates if origin on right or bottom- var isOriginLeft = this.layout._getOption('originLeft');- var isOriginTop = this.layout._getOption('originTop');- x = isOriginLeft ? x : -x;- y = isOriginTop ? y : -y;- return 'translate3d(' + x + 'px, ' + y + 'px, 0)';-};--// non transition + transform support-proto.goTo = function( x, y ) {- this.setPosition( x, y );- this.layoutPosition();-};--proto.moveTo = proto._transitionTo;--proto.setPosition = function( x, y ) {- this.position.x = parseInt( x, 10 );- this.position.y = parseInt( y, 10 );-};--// ----- transition ----- //--/**- * @param {Object} style - CSS- * @param {Function} onTransitionEnd- */--// non transition, just trigger callback-proto._nonTransition = function( args ) {- this.css( args.to );- if ( args.isCleaning ) {- this._removeStyles( args.to );- }- for ( var prop in args.onTransitionEnd ) {- args.onTransitionEnd[ prop ].call( this );- }-};--/**- * proper transition- * @param {Object} args - arguments- * @param {Object} to - style to transition to- * @param {Object} from - style to start transition from- * @param {Boolean} isCleaning - removes transition styles after transition- * @param {Function} onTransitionEnd - callback- */-proto.transition = function( args ) {- // redirect to nonTransition if no transition duration- if ( !parseFloat( this.layout.options.transitionDuration ) ) {- this._nonTransition( args );- return;- }-- var _transition = this._transn;- // keep track of onTransitionEnd callback by css property- for ( var prop in args.onTransitionEnd ) {- _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];- }- // keep track of properties that are transitioning- for ( prop in args.to ) {- _transition.ingProperties[ prop ] = true;- // keep track of properties to clean up when transition is done- if ( args.isCleaning ) {- _transition.clean[ prop ] = true;- }- }-- // set from styles- if ( args.from ) {- this.css( args.from );- // force redraw. http://blog.alexmaccaw.com/css-transitions- var h = this.element.offsetHeight;- // hack for JSHint to hush about unused var- h = null;- }- // enable transition- this.enableTransition( args.to );- // set styles that are transitioning- this.css( args.to );-- this.isTransitioning = true;--};--// dash before all cap letters, including first for-// WebkitTransform => -webkit-transform-function toDashedAll( str ) {- return str.replace( /([A-Z])/g, function( $1 ) {- return '-' + $1.toLowerCase();- });-}--var transitionProps = 'opacity,' + toDashedAll( transformProperty );--proto.enableTransition = function(/* style */) {- // HACK changing transitionProperty during a transition- // will cause transition to jump- if ( this.isTransitioning ) {- return;- }-- // make `transition: foo, bar, baz` from style object- // HACK un-comment this when enableTransition can work- // while a transition is happening- // var transitionValues = [];- // for ( var prop in style ) {- // // dash-ify camelCased properties like WebkitTransition- // prop = vendorProperties[ prop ] || prop;- // transitionValues.push( toDashedAll( prop ) );- // }- // munge number to millisecond, to match stagger- var duration = this.layout.options.transitionDuration;- duration = typeof duration == 'number' ? duration + 'ms' : duration;- // enable transition styles- this.css({- transitionProperty: transitionProps,- transitionDuration: duration,- transitionDelay: this.staggerDelay || 0- });- // listen for transition end event- this.element.addEventListener( transitionEndEvent, this, false );-};--// ----- events ----- //--proto.onwebkitTransitionEnd = function( event ) {- this.ontransitionend( event );-};--proto.onotransitionend = function( event ) {- this.ontransitionend( event );-};--// properties that I munge to make my life easier-var dashedVendorProperties = {- '-webkit-transform': 'transform'-};--proto.ontransitionend = function( event ) {- // disregard bubbled events from children- if ( event.target !== this.element ) {- return;- }- var _transition = this._transn;- // get property name of transitioned property, convert to prefix-free- var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;-- // remove property that has completed transitioning- delete _transition.ingProperties[ propertyName ];- // check if any properties are still transitioning- if ( isEmptyObj( _transition.ingProperties ) ) {- // all properties have completed transitioning- this.disableTransition();- }- // clean style- if ( propertyName in _transition.clean ) {- // clean up style- this.element.style[ event.propertyName ] = '';- delete _transition.clean[ propertyName ];- }- // trigger onTransitionEnd callback- if ( propertyName in _transition.onEnd ) {- var onTransitionEnd = _transition.onEnd[ propertyName ];- onTransitionEnd.call( this );- delete _transition.onEnd[ propertyName ];- }-- this.emitEvent( 'transitionEnd', [ this ] );-};--proto.disableTransition = function() {- this.removeTransitionStyles();- this.element.removeEventListener( transitionEndEvent, this, false );- this.isTransitioning = false;-};--/**- * removes style property from element- * @param {Object} style-**/-proto._removeStyles = function( style ) {- // clean up transition styles- var cleanStyle = {};- for ( var prop in style ) {- cleanStyle[ prop ] = '';- }- this.css( cleanStyle );-};--var cleanTransitionStyle = {- transitionProperty: '',- transitionDuration: '',- transitionDelay: ''-};--proto.removeTransitionStyles = function() {- // remove transition- this.css( cleanTransitionStyle );-};--// ----- stagger ----- //--proto.stagger = function( delay ) {- delay = isNaN( delay ) ? 0 : delay;- this.staggerDelay = delay + 'ms';-};--// ----- show/hide/remove ----- //--// remove element from DOM-proto.removeElem = function() {- this.element.parentNode.removeChild( this.element );- // remove display: none- this.css({ display: '' });- this.emitEvent( 'remove', [ this ] );-};--proto.remove = function() {- // just remove element if no transition support or no transition- if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {- this.removeElem();- return;- }-- // start transition- this.once( 'transitionEnd', function() {- this.removeElem();- });- this.hide();-};--proto.reveal = function() {- delete this.isHidden;- // remove display: none- this.css({ display: '' });-- var options = this.layout.options;-- var onTransitionEnd = {};- var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');- onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;-- this.transition({- from: options.hiddenStyle,- to: options.visibleStyle,- isCleaning: true,- onTransitionEnd: onTransitionEnd- });-};--proto.onRevealTransitionEnd = function() {- // check if still visible- // during transition, item may have been hidden- if ( !this.isHidden ) {- this.emitEvent('reveal');- }-};--/**- * get style property use for hide/reveal transition end- * @param {String} styleProperty - hiddenStyle/visibleStyle- * @returns {String}- */-proto.getHideRevealTransitionEndProperty = function( styleProperty ) {- var optionStyle = this.layout.options[ styleProperty ];- // use opacity- if ( optionStyle.opacity ) {- return 'opacity';- }- // get first property- for ( var prop in optionStyle ) {- return prop;- }-};--proto.hide = function() {- // set flag- this.isHidden = true;- // remove display: none- this.css({ display: '' });-- var options = this.layout.options;-- var onTransitionEnd = {};- var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');- onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;-- this.transition({- from: options.visibleStyle,- to: options.hiddenStyle,- // keep hidden stuff hidden- isCleaning: true,- onTransitionEnd: onTransitionEnd- });-};--proto.onHideTransitionEnd = function() {- // check if still hidden- // during transition, item may have been un-hidden- if ( this.isHidden ) {- this.css({ display: 'none' });- this.emitEvent('hide');- }-};--proto.destroy = function() {- this.css({- position: '',- left: '',- right: '',- top: '',- bottom: '',- transition: '',- transform: ''- });-};--return Item;--}));--/*!- * Outlayer v2.1.0- * the brains and guts of a layout library- * MIT license- */--( function( window, factory ) {- 'use strict';- // universal module definition- /* jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD - RequireJS- define( 'outlayer/outlayer',[- 'ev-emitter/ev-emitter',- 'get-size/get-size',- 'fizzy-ui-utils/utils',- './item'- ],- function( EvEmitter, getSize, utils, Item ) {- return factory( window, EvEmitter, getSize, utils, Item);- }- );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS - Browserify, Webpack- module.exports = factory(- window,- require('ev-emitter'),- require('get-size'),- require('fizzy-ui-utils'),- require('./item')- );- } else {- // browser global- window.Outlayer = factory(- window,- window.EvEmitter,- window.getSize,- window.fizzyUIUtils,- window.Outlayer.Item- );- }--}( window, function factory( window, EvEmitter, getSize, utils, Item ) {-'use strict';--// ----- vars ----- //--var console = window.console;-var jQuery = window.jQuery;-var noop = function() {};--// -------------------------- Outlayer -------------------------- //--// globally unique identifiers-var GUID = 0;-// internal store of all Outlayer intances-var instances = {};---/**- * @param {Element, String} element- * @param {Object} options- * @constructor- */-function Outlayer( element, options ) {- var queryElement = utils.getQueryElement( element );- if ( !queryElement ) {- if ( console ) {- console.error( 'Bad element for ' + this.constructor.namespace +- ': ' + ( queryElement || element ) );- }- return;- }- this.element = queryElement;- // add jQuery- if ( jQuery ) {- this.$element = jQuery( this.element );- }-- // options- this.options = utils.extend( {}, this.constructor.defaults );- this.option( options );-- // add id for Outlayer.getFromElement- var id = ++GUID;- this.element.outlayerGUID = id; // expando- instances[ id ] = this; // associate via id-- // kick it off- this._create();-- var isInitLayout = this._getOption('initLayout');- if ( isInitLayout ) {- this.layout();- }-}--// settings are for internal use only-Outlayer.namespace = 'outlayer';-Outlayer.Item = Item;--// default options-Outlayer.defaults = {- containerStyle: {- position: 'relative'- },- initLayout: true,- originLeft: true,- originTop: true,- resize: true,- resizeContainer: true,- // item options- transitionDuration: '0.4s',- hiddenStyle: {- opacity: 0,- transform: 'scale(0.001)'- },- visibleStyle: {- opacity: 1,- transform: 'scale(1)'- }-};--var proto = Outlayer.prototype;-// inherit EvEmitter-utils.extend( proto, EvEmitter.prototype );--/**- * set options- * @param {Object} opts- */-proto.option = function( opts ) {- utils.extend( this.options, opts );-};--/**- * get backwards compatible option value, check old name- */-proto._getOption = function( option ) {- var oldOption = this.constructor.compatOptions[ option ];- return oldOption && this.options[ oldOption ] !== undefined ?- this.options[ oldOption ] : this.options[ option ];-};--Outlayer.compatOptions = {- // currentName: oldName- initLayout: 'isInitLayout',- horizontal: 'isHorizontal',- layoutInstant: 'isLayoutInstant',- originLeft: 'isOriginLeft',- originTop: 'isOriginTop',- resize: 'isResizeBound',- resizeContainer: 'isResizingContainer'-};--proto._create = function() {- // get items from children- this.reloadItems();- // elements that affect layout, but are not laid out- this.stamps = [];- this.stamp( this.options.stamp );- // set container style- utils.extend( this.element.style, this.options.containerStyle );-- // bind resize method- var canBindResize = this._getOption('resize');- if ( canBindResize ) {- this.bindResize();- }-};--// goes through all children again and gets bricks in proper order-proto.reloadItems = function() {- // collection of item elements- this.items = this._itemize( this.element.children );-};---/**- * turn elements into Outlayer.Items to be used in layout- * @param {Array or NodeList or HTMLElement} elems- * @returns {Array} items - collection of new Outlayer Items- */-proto._itemize = function( elems ) {-- var itemElems = this._filterFindItemElements( elems );- var Item = this.constructor.Item;-- // create new Outlayer Items for collection- var items = [];- for ( var i=0; i < itemElems.length; i++ ) {- var elem = itemElems[i];- var item = new Item( elem, this );- items.push( item );- }-- return items;-};--/**- * get item elements to be used in layout- * @param {Array or NodeList or HTMLElement} elems- * @returns {Array} items - item elements- */-proto._filterFindItemElements = function( elems ) {- return utils.filterFindElements( elems, this.options.itemSelector );-};--/**- * getter method for getting item elements- * @returns {Array} elems - collection of item elements- */-proto.getItemElements = function() {- return this.items.map( function( item ) {- return item.element;- });-};--// ----- init & layout ----- //--/**- * lays out all items- */-proto.layout = function() {- this._resetLayout();- this._manageStamps();-- // don't animate first layout- var layoutInstant = this._getOption('layoutInstant');- var isInstant = layoutInstant !== undefined ?- layoutInstant : !this._isLayoutInited;- this.layoutItems( this.items, isInstant );-- // flag for initalized- this._isLayoutInited = true;-};--// _init is alias for layout-proto._init = proto.layout;--/**- * logic before any new layout- */-proto._resetLayout = function() {- this.getSize();-};---proto.getSize = function() {- this.size = getSize( this.element );-};--/**- * get measurement from option, for columnWidth, rowHeight, gutter- * if option is String -> get element from selector string, & get size of element- * if option is Element -> get size of element- * else use option as a number- *- * @param {String} measurement- * @param {String} size - width or height- * @private- */-proto._getMeasurement = function( measurement, size ) {- var option = this.options[ measurement ];- var elem;- if ( !option ) {- // default to 0- this[ measurement ] = 0;- } else {- // use option as an element- if ( typeof option == 'string' ) {- elem = this.element.querySelector( option );- } else if ( option instanceof HTMLElement ) {- elem = option;- }- // use size of element, if element- this[ measurement ] = elem ? getSize( elem )[ size ] : option;- }-};--/**- * layout a collection of item elements- * @api public- */-proto.layoutItems = function( items, isInstant ) {- items = this._getItemsForLayout( items );-- this._layoutItems( items, isInstant );-- this._postLayout();-};--/**- * get the items to be laid out- * you may want to skip over some items- * @param {Array} items- * @returns {Array} items- */-proto._getItemsForLayout = function( items ) {- return items.filter( function( item ) {- return !item.isIgnored;- });-};--/**- * layout items- * @param {Array} items- * @param {Boolean} isInstant- */-proto._layoutItems = function( items, isInstant ) {- this._emitCompleteOnItems( 'layout', items );-- if ( !items || !items.length ) {- // no items, emit event with empty array- return;- }-- var queue = [];-- items.forEach( function( item ) {- // get x/y object from method- var position = this._getItemLayoutPosition( item );- // enqueue- position.item = item;- position.isInstant = isInstant || item.isLayoutInstant;- queue.push( position );- }, this );-- this._processLayoutQueue( queue );-};--/**- * get item layout position- * @param {Outlayer.Item} item- * @returns {Object} x and y position- */-proto._getItemLayoutPosition = function( /* item */ ) {- return {- x: 0,- y: 0- };-};--/**- * iterate over array and position each item- * Reason being - separating this logic prevents 'layout invalidation'- * thx @paul_irish- * @param {Array} queue- */-proto._processLayoutQueue = function( queue ) {- this.updateStagger();- queue.forEach( function( obj, i ) {- this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );- }, this );-};--// set stagger from option in milliseconds number-proto.updateStagger = function() {- var stagger = this.options.stagger;- if ( stagger === null || stagger === undefined ) {- this.stagger = 0;- return;- }- this.stagger = getMilliseconds( stagger );- return this.stagger;-};--/**- * Sets position of item in DOM- * @param {Outlayer.Item} item- * @param {Number} x - horizontal position- * @param {Number} y - vertical position- * @param {Boolean} isInstant - disables transitions- */-proto._positionItem = function( item, x, y, isInstant, i ) {- if ( isInstant ) {- // if not transition, just set CSS- item.goTo( x, y );- } else {- item.stagger( i * this.stagger );- item.moveTo( x, y );- }-};--/**- * Any logic you want to do after each layout,- * i.e. size the container- */-proto._postLayout = function() {- this.resizeContainer();-};--proto.resizeContainer = function() {- var isResizingContainer = this._getOption('resizeContainer');- if ( !isResizingContainer ) {- return;- }- var size = this._getContainerSize();- if ( size ) {- this._setContainerMeasure( size.width, true );- this._setContainerMeasure( size.height, false );- }-};--/**- * Sets width or height of container if returned- * @returns {Object} size- * @param {Number} width- * @param {Number} height- */-proto._getContainerSize = noop;--/**- * @param {Number} measure - size of width or height- * @param {Boolean} isWidth- */-proto._setContainerMeasure = function( measure, isWidth ) {- if ( measure === undefined ) {- return;- }-- var elemSize = this.size;- // add padding and border width if border box- if ( elemSize.isBorderBox ) {- measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +- elemSize.borderLeftWidth + elemSize.borderRightWidth :- elemSize.paddingBottom + elemSize.paddingTop +- elemSize.borderTopWidth + elemSize.borderBottomWidth;- }-- measure = Math.max( measure, 0 );- this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';-};--/**- * emit eventComplete on a collection of items events- * @param {String} eventName- * @param {Array} items - Outlayer.Items- */-proto._emitCompleteOnItems = function( eventName, items ) {- var _this = this;- function onComplete() {- _this.dispatchEvent( eventName + 'Complete', null, [ items ] );- }-- var count = items.length;- if ( !items || !count ) {- onComplete();- return;- }-- var doneCount = 0;- function tick() {- doneCount++;- if ( doneCount == count ) {- onComplete();- }- }-- // bind callback- items.forEach( function( item ) {- item.once( eventName, tick );- });-};--/**- * emits events via EvEmitter and jQuery events- * @param {String} type - name of event- * @param {Event} event - original event- * @param {Array} args - extra arguments- */-proto.dispatchEvent = function( type, event, args ) {- // add original event to arguments- var emitArgs = event ? [ event ].concat( args ) : args;- this.emitEvent( type, emitArgs );-- if ( jQuery ) {- // set this.$element- this.$element = this.$element || jQuery( this.element );- if ( event ) {- // create jQuery event- var $event = jQuery.Event( event );- $event.type = type;- this.$element.trigger( $event, args );- } else {- // just trigger with type if no event available- this.$element.trigger( type, args );- }- }-};--// -------------------------- ignore & stamps -------------------------- //---/**- * keep item in collection, but do not lay it out- * ignored items do not get skipped in layout- * @param {Element} elem- */-proto.ignore = function( elem ) {- var item = this.getItem( elem );- if ( item ) {- item.isIgnored = true;- }-};--/**- * return item to layout collection- * @param {Element} elem- */-proto.unignore = function( elem ) {- var item = this.getItem( elem );- if ( item ) {- delete item.isIgnored;- }-};--/**- * adds elements to stamps- * @param {NodeList, Array, Element, or String} elems- */-proto.stamp = function( elems ) {- elems = this._find( elems );- if ( !elems ) {- return;- }-- this.stamps = this.stamps.concat( elems );- // ignore- elems.forEach( this.ignore, this );-};--/**- * removes elements to stamps- * @param {NodeList, Array, or Element} elems- */-proto.unstamp = function( elems ) {- elems = this._find( elems );- if ( !elems ){- return;- }-- elems.forEach( function( elem ) {- // filter out removed stamp elements- utils.removeFrom( this.stamps, elem );- this.unignore( elem );- }, this );-};--/**- * finds child elements- * @param {NodeList, Array, Element, or String} elems- * @returns {Array} elems- */-proto._find = function( elems ) {- if ( !elems ) {- return;- }- // if string, use argument as selector string- if ( typeof elems == 'string' ) {- elems = this.element.querySelectorAll( elems );- }- elems = utils.makeArray( elems );- return elems;-};--proto._manageStamps = function() {- if ( !this.stamps || !this.stamps.length ) {- return;- }-- this._getBoundingRect();-- this.stamps.forEach( this._manageStamp, this );-};--// update boundingLeft / Top-proto._getBoundingRect = function() {- // get bounding rect for container element- var boundingRect = this.element.getBoundingClientRect();- var size = this.size;- this._boundingRect = {- left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,- top: boundingRect.top + size.paddingTop + size.borderTopWidth,- right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),- bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )- };-};--/**- * @param {Element} stamp-**/-proto._manageStamp = noop;--/**- * get x/y position of element relative to container element- * @param {Element} elem- * @returns {Object} offset - has left, top, right, bottom- */-proto._getElementOffset = function( elem ) {- var boundingRect = elem.getBoundingClientRect();- var thisRect = this._boundingRect;- var size = getSize( elem );- var offset = {- left: boundingRect.left - thisRect.left - size.marginLeft,- top: boundingRect.top - thisRect.top - size.marginTop,- right: thisRect.right - boundingRect.right - size.marginRight,- bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom- };- return offset;-};--// -------------------------- resize -------------------------- //--// enable event handlers for listeners-// i.e. resize -> onresize-proto.handleEvent = utils.handleEvent;--/**- * Bind layout to window resizing- */-proto.bindResize = function() {- window.addEventListener( 'resize', this );- this.isResizeBound = true;-};--/**- * Unbind layout to window resizing- */-proto.unbindResize = function() {- window.removeEventListener( 'resize', this );- this.isResizeBound = false;-};--proto.onresize = function() {- this.resize();-};--utils.debounceMethod( Outlayer, 'onresize', 100 );--proto.resize = function() {- // don't trigger if size did not change- // or if resize was unbound. See #9- if ( !this.isResizeBound || !this.needsResizeLayout() ) {- return;- }-- this.layout();-};--/**- * check if layout is needed post layout- * @returns Boolean- */-proto.needsResizeLayout = function() {- var size = getSize( this.element );- // check that this.size and size are there- // IE8 triggers resize on body size change, so they might not be- var hasSizes = this.size && size;- return hasSizes && size.innerWidth !== this.size.innerWidth;-};--// -------------------------- methods -------------------------- //--/**- * add items to Outlayer instance- * @param {Array or NodeList or Element} elems- * @returns {Array} items - Outlayer.Items-**/-proto.addItems = function( elems ) {- var items = this._itemize( elems );- // add items to collection- if ( items.length ) {- this.items = this.items.concat( items );- }- return items;-};--/**- * Layout newly-appended item elements- * @param {Array or NodeList or Element} elems- */-proto.appended = function( elems ) {- var items = this.addItems( elems );- if ( !items.length ) {- return;- }- // layout and reveal just the new items- this.layoutItems( items, true );- this.reveal( items );-};--/**- * Layout prepended elements- * @param {Array or NodeList or Element} elems- */-proto.prepended = function( elems ) {- var items = this._itemize( elems );- if ( !items.length ) {- return;- }- // add items to beginning of collection- var previousItems = this.items.slice(0);- this.items = items.concat( previousItems );- // start new layout- this._resetLayout();- this._manageStamps();- // layout new stuff without transition- this.layoutItems( items, true );- this.reveal( items );- // layout previous items- this.layoutItems( previousItems );-};--/**- * reveal a collection of items- * @param {Array of Outlayer.Items} items- */-proto.reveal = function( items ) {- this._emitCompleteOnItems( 'reveal', items );- if ( !items || !items.length ) {- return;- }- var stagger = this.updateStagger();- items.forEach( function( item, i ) {- item.stagger( i * stagger );- item.reveal();- });-};--/**- * hide a collection of items- * @param {Array of Outlayer.Items} items- */-proto.hide = function( items ) {- this._emitCompleteOnItems( 'hide', items );- if ( !items || !items.length ) {- return;- }- var stagger = this.updateStagger();- items.forEach( function( item, i ) {- item.stagger( i * stagger );- item.hide();- });-};--/**- * reveal item elements- * @param {Array}, {Element}, {NodeList} items- */-proto.revealItemElements = function( elems ) {- var items = this.getItems( elems );- this.reveal( items );-};--/**- * hide item elements- * @param {Array}, {Element}, {NodeList} items- */-proto.hideItemElements = function( elems ) {- var items = this.getItems( elems );- this.hide( items );-};--/**- * get Outlayer.Item, given an Element- * @param {Element} elem- * @param {Function} callback- * @returns {Outlayer.Item} item- */-proto.getItem = function( elem ) {- // loop through items to get the one that matches- for ( var i=0; i < this.items.length; i++ ) {- var item = this.items[i];- if ( item.element == elem ) {- // return item- return item;- }- }-};--/**- * get collection of Outlayer.Items, given Elements- * @param {Array} elems- * @returns {Array} items - Outlayer.Items- */-proto.getItems = function( elems ) {- elems = utils.makeArray( elems );- var items = [];- elems.forEach( function( elem ) {- var item = this.getItem( elem );- if ( item ) {- items.push( item );- }- }, this );-- return items;-};--/**- * remove element(s) from instance and DOM- * @param {Array or NodeList or Element} elems- */-proto.remove = function( elems ) {- var removeItems = this.getItems( elems );-- this._emitCompleteOnItems( 'remove', removeItems );-- // bail if no items to remove- if ( !removeItems || !removeItems.length ) {- return;- }-- removeItems.forEach( function( item ) {- item.remove();- // remove item from collection- utils.removeFrom( this.items, item );- }, this );-};--// ----- destroy ----- //--// remove and disable Outlayer instance-proto.destroy = function() {- // clean up dynamic styles- var style = this.element.style;- style.height = '';- style.position = '';- style.width = '';- // destroy items- this.items.forEach( function( item ) {- item.destroy();- });-- this.unbindResize();-- var id = this.element.outlayerGUID;- delete instances[ id ]; // remove reference to instance by id- delete this.element.outlayerGUID;- // remove data for jQuery- if ( jQuery ) {- jQuery.removeData( this.element, this.constructor.namespace );- }--};--// -------------------------- data -------------------------- //--/**- * get Outlayer instance from element- * @param {Element} elem- * @returns {Outlayer}- */-Outlayer.data = function( elem ) {- elem = utils.getQueryElement( elem );- var id = elem && elem.outlayerGUID;- return id && instances[ id ];-};---// -------------------------- create Outlayer class -------------------------- //--/**- * create a layout class- * @param {String} namespace- */-Outlayer.create = function( namespace, options ) {- // sub-class Outlayer- var Layout = subclass( Outlayer );- // apply new options and compatOptions- Layout.defaults = utils.extend( {}, Outlayer.defaults );- utils.extend( Layout.defaults, options );- Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );-- Layout.namespace = namespace;-- Layout.data = Outlayer.data;-- // sub-class Item- Layout.Item = subclass( Item );-- // -------------------------- declarative -------------------------- //-- utils.htmlInit( Layout, namespace );-- // -------------------------- jQuery bridge -------------------------- //-- // make into jQuery plugin- if ( jQuery && jQuery.bridget ) {- jQuery.bridget( namespace, Layout );- }-- return Layout;-};--function subclass( Parent ) {- function SubClass() {- Parent.apply( this, arguments );- }-- SubClass.prototype = Object.create( Parent.prototype );- SubClass.prototype.constructor = SubClass;-- return SubClass;-}--// ----- helpers ----- //--// how many milliseconds are in each unit-var msUnits = {- ms: 1,- s: 1000-};--// munge time-like parameter into millisecond number-// '0.4s' -> 40-function getMilliseconds( time ) {- if ( typeof time == 'number' ) {- return time;- }- var matches = time.match( /(^\d*\.?\d*)(\w*)/ );- var num = matches && matches[1];- var unit = matches && matches[2];- if ( !num.length ) {- return 0;- }- num = parseFloat( num );- var mult = msUnits[ unit ] || 1;- return num * mult;-}--// ----- fin ----- //--// back in global-Outlayer.Item = Item;--return Outlayer;--}));--/**- * Isotope Item-**/--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'isotope/js/item',[- 'outlayer/outlayer'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('outlayer')- );- } else {- // browser global- window.Isotope = window.Isotope || {};- window.Isotope.Item = factory(- window.Outlayer- );- }--}( window, function factory( Outlayer ) {-'use strict';--// -------------------------- Item -------------------------- //--// sub-class Outlayer Item-function Item() {- Outlayer.Item.apply( this, arguments );-}--var proto = Item.prototype = Object.create( Outlayer.Item.prototype );--var _create = proto._create;-proto._create = function() {- // assign id, used for original-order sorting- this.id = this.layout.itemGUID++;- _create.call( this );- this.sortData = {};-};--proto.updateSortData = function() {- if ( this.isIgnored ) {- return;- }- // default sorters- this.sortData.id = this.id;- // for backward compatibility- this.sortData['original-order'] = this.id;- this.sortData.random = Math.random();- // go thru getSortData obj and apply the sorters- var getSortData = this.layout.options.getSortData;- var sorters = this.layout._sorters;- for ( var key in getSortData ) {- var sorter = sorters[ key ];- this.sortData[ key ] = sorter( this.element, this );- }-};--var _destroy = proto.destroy;-proto.destroy = function() {- // call super- _destroy.apply( this, arguments );- // reset display, #741- this.css({- display: ''- });-};--return Item;--}));--/**- * Isotope LayoutMode- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'isotope/js/layout-mode',[- 'get-size/get-size',- 'outlayer/outlayer'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('get-size'),- require('outlayer')- );- } else {- // browser global- window.Isotope = window.Isotope || {};- window.Isotope.LayoutMode = factory(- window.getSize,- window.Outlayer- );- }--}( window, function factory( getSize, Outlayer ) {- 'use strict';-- // layout mode class- function LayoutMode( isotope ) {- this.isotope = isotope;- // link properties- if ( isotope ) {- this.options = isotope.options[ this.namespace ];- this.element = isotope.element;- this.items = isotope.filteredItems;- this.size = isotope.size;- }- }-- var proto = LayoutMode.prototype;-- /**- * some methods should just defer to default Outlayer method- * and reference the Isotope instance as `this`- **/- var facadeMethods = [- '_resetLayout',- '_getItemLayoutPosition',- '_manageStamp',- '_getContainerSize',- '_getElementOffset',- 'needsResizeLayout',- '_getOption'- ];-- facadeMethods.forEach( function( methodName ) {- proto[ methodName ] = function() {- return Outlayer.prototype[ methodName ].apply( this.isotope, arguments );- };- });-- // ----- ----- //-- // for horizontal layout modes, check vertical size- proto.needsVerticalResizeLayout = function() {- // don't trigger if size did not change- var size = getSize( this.isotope.element );- // check that this.size and size are there- // IE8 triggers resize on body size change, so they might not be- var hasSizes = this.isotope.size && size;- return hasSizes && size.innerHeight != this.isotope.size.innerHeight;- };-- // ----- measurements ----- //-- proto._getMeasurement = function() {- this.isotope._getMeasurement.apply( this, arguments );- };-- proto.getColumnWidth = function() {- this.getSegmentSize( 'column', 'Width' );- };-- proto.getRowHeight = function() {- this.getSegmentSize( 'row', 'Height' );- };-- /**- * get columnWidth or rowHeight- * segment: 'column' or 'row'- * size 'Width' or 'Height'- **/- proto.getSegmentSize = function( segment, size ) {- var segmentName = segment + size;- var outerSize = 'outer' + size;- // columnWidth / outerWidth // rowHeight / outerHeight- this._getMeasurement( segmentName, outerSize );- // got rowHeight or columnWidth, we can chill- if ( this[ segmentName ] ) {- return;- }- // fall back to item of first element- var firstItemSize = this.getFirstItemSize();- this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] ||- // or size of container- this.isotope.size[ 'inner' + size ];- };-- proto.getFirstItemSize = function() {- var firstItem = this.isotope.filteredItems[0];- return firstItem && firstItem.element && getSize( firstItem.element );- };-- // ----- methods that should reference isotope ----- //-- proto.layout = function() {- this.isotope.layout.apply( this.isotope, arguments );- };-- proto.getSize = function() {- this.isotope.getSize();- this.size = this.isotope.size;- };-- // -------------------------- create -------------------------- //-- LayoutMode.modes = {};-- LayoutMode.create = function( namespace, options ) {-- function Mode() {- LayoutMode.apply( this, arguments );- }-- Mode.prototype = Object.create( proto );- Mode.prototype.constructor = Mode;-- // default options- if ( options ) {- Mode.options = options;- }-- Mode.prototype.namespace = namespace;- // register in Isotope- LayoutMode.modes[ namespace ] = Mode;-- return Mode;- };-- return LayoutMode;--}));--/*!- * Masonry v4.2.0- * Cascading grid layout library- * http://masonry.desandro.com- * MIT License- * by David DeSandro- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'masonry/masonry',[- 'outlayer/outlayer',- 'get-size/get-size'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('outlayer'),- require('get-size')- );- } else {- // browser global- window.Masonry = factory(- window.Outlayer,- window.getSize- );- }--}( window, function factory( Outlayer, getSize ) {----// -------------------------- masonryDefinition -------------------------- //-- // create an Outlayer layout class- var Masonry = Outlayer.create('masonry');- // isFitWidth -> fitWidth- Masonry.compatOptions.fitWidth = 'isFitWidth';-- var proto = Masonry.prototype;-- proto._resetLayout = function() {- this.getSize();- this._getMeasurement( 'columnWidth', 'outerWidth' );- this._getMeasurement( 'gutter', 'outerWidth' );- this.measureColumns();-- // reset column Y- this.colYs = [];- for ( var i=0; i < this.cols; i++ ) {- this.colYs.push( 0 );- }-- this.maxY = 0;- this.horizontalColIndex = 0;- };-- proto.measureColumns = function() {- this.getContainerWidth();- // if columnWidth is 0, default to outerWidth of first item- if ( !this.columnWidth ) {- var firstItem = this.items[0];- var firstItemElem = firstItem && firstItem.element;- // columnWidth fall back to item of first element- this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||- // if first elem has no width, default to size of container- this.containerWidth;- }-- var columnWidth = this.columnWidth += this.gutter;-- // calculate columns- var containerWidth = this.containerWidth + this.gutter;- var cols = containerWidth / columnWidth;- // fix rounding errors, typically with gutters- var excess = columnWidth - containerWidth % columnWidth;- // if overshoot is less than a pixel, round up, otherwise floor it- var mathMethod = excess && excess < 1 ? 'round' : 'floor';- cols = Math[ mathMethod ]( cols );- this.cols = Math.max( cols, 1 );- };-- proto.getContainerWidth = function() {- // container is parent if fit width- var isFitWidth = this._getOption('fitWidth');- var container = isFitWidth ? this.element.parentNode : this.element;- // check that this.size and size are there- // IE8 triggers resize on body size change, so they might not be- var size = getSize( container );- this.containerWidth = size && size.innerWidth;- };-- proto._getItemLayoutPosition = function( item ) {- item.getSize();- // how many columns does this brick span- var remainder = item.size.outerWidth % this.columnWidth;- var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';- // round if off by 1 pixel, otherwise use ceil- var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );- colSpan = Math.min( colSpan, this.cols );- // use horizontal or top column position- var colPosMethod = this.options.horizontalOrder ?- '_getHorizontalColPosition' : '_getTopColPosition';- var colPosition = this[ colPosMethod ]( colSpan, item );- // position the brick- var position = {- x: this.columnWidth * colPosition.col,- y: colPosition.y- };- // apply setHeight to necessary columns- var setHeight = colPosition.y + item.size.outerHeight;- var setMax = colSpan + colPosition.col;- for ( var i = colPosition.col; i < setMax; i++ ) {- this.colYs[i] = setHeight;- }-- return position;- };-- proto._getTopColPosition = function( colSpan ) {- var colGroup = this._getTopColGroup( colSpan );- // get the minimum Y value from the columns- var minimumY = Math.min.apply( Math, colGroup );-- return {- col: colGroup.indexOf( minimumY ),- y: minimumY,- };- };-- /**- * @param {Number} colSpan - number of columns the element spans- * @returns {Array} colGroup- */- proto._getTopColGroup = function( colSpan ) {- if ( colSpan < 2 ) {- // if brick spans only one column, use all the column Ys- return this.colYs;- }-- var colGroup = [];- // how many different places could this brick fit horizontally- var groupCount = this.cols + 1 - colSpan;- // for each group potential horizontal position- for ( var i = 0; i < groupCount; i++ ) {- colGroup[i] = this._getColGroupY( i, colSpan );- }- return colGroup;- };-- proto._getColGroupY = function( col, colSpan ) {- if ( colSpan < 2 ) {- return this.colYs[ col ];- }- // make an array of colY values for that one group- var groupColYs = this.colYs.slice( col, col + colSpan );- // and get the max value of the array- return Math.max.apply( Math, groupColYs );- };-- // get column position based on horizontal index. #873- proto._getHorizontalColPosition = function( colSpan, item ) {- var col = this.horizontalColIndex % this.cols;- var isOver = colSpan > 1 && col + colSpan > this.cols;- // shift to next row if item can't fit on current row- col = isOver ? 0 : col;- // don't let zero-size items take up space- var hasSize = item.size.outerWidth && item.size.outerHeight;- this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;-- return {- col: col,- y: this._getColGroupY( col, colSpan ),- };- };-- proto._manageStamp = function( stamp ) {- var stampSize = getSize( stamp );- var offset = this._getElementOffset( stamp );- // get the columns that this stamp affects- var isOriginLeft = this._getOption('originLeft');- var firstX = isOriginLeft ? offset.left : offset.right;- var lastX = firstX + stampSize.outerWidth;- var firstCol = Math.floor( firstX / this.columnWidth );- firstCol = Math.max( 0, firstCol );- var lastCol = Math.floor( lastX / this.columnWidth );- // lastCol should not go over if multiple of columnWidth #425- lastCol -= lastX % this.columnWidth ? 0 : 1;- lastCol = Math.min( this.cols - 1, lastCol );- // set colYs to bottom of the stamp-- var isOriginTop = this._getOption('originTop');- var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +- stampSize.outerHeight;- for ( var i = firstCol; i <= lastCol; i++ ) {- this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );- }- };-- proto._getContainerSize = function() {- this.maxY = Math.max.apply( Math, this.colYs );- var size = {- height: this.maxY- };-- if ( this._getOption('fitWidth') ) {- size.width = this._getContainerFitWidth();- }-- return size;- };-- proto._getContainerFitWidth = function() {- var unusedCols = 0;- // count unused columns- var i = this.cols;- while ( --i ) {- if ( this.colYs[i] !== 0 ) {- break;- }- unusedCols++;- }- // fit container to columns that have been used- return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;- };-- proto.needsResizeLayout = function() {- var previousWidth = this.containerWidth;- this.getContainerWidth();- return previousWidth != this.containerWidth;- };-- return Masonry;--}));--/*!- * Masonry layout mode- * sub-classes Masonry- * http://masonry.desandro.com- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'isotope/js/layout-modes/masonry',[- '../layout-mode',- 'masonry/masonry'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('../layout-mode'),- require('masonry-layout')- );- } else {- // browser global- factory(- window.Isotope.LayoutMode,- window.Masonry- );- }--}( window, function factory( LayoutMode, Masonry ) {-'use strict';--// -------------------------- masonryDefinition -------------------------- //-- // create an Outlayer layout class- var MasonryMode = LayoutMode.create('masonry');-- var proto = MasonryMode.prototype;-- var keepModeMethods = {- _getElementOffset: true,- layout: true,- _getMeasurement: true- };-- // inherit Masonry prototype- for ( var method in Masonry.prototype ) {- // do not inherit mode methods- if ( !keepModeMethods[ method ] ) {- proto[ method ] = Masonry.prototype[ method ];- }- }-- var measureColumns = proto.measureColumns;- proto.measureColumns = function() {- // set items, used if measuring first item- this.items = this.isotope.filteredItems;- measureColumns.call( this );- };-- // point to mode options for fitWidth- var _getOption = proto._getOption;- proto._getOption = function( option ) {- if ( option == 'fitWidth' ) {- return this.options.isFitWidth !== undefined ?- this.options.isFitWidth : this.options.fitWidth;- }- return _getOption.apply( this.isotope, arguments );- };-- return MasonryMode;--}));--/**- * fitRows layout mode- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'isotope/js/layout-modes/fit-rows',[- '../layout-mode'- ],- factory );- } else if ( typeof exports == 'object' ) {- // CommonJS- module.exports = factory(- require('../layout-mode')- );- } else {- // browser global- factory(- window.Isotope.LayoutMode- );- }--}( window, function factory( LayoutMode ) {-'use strict';--var FitRows = LayoutMode.create('fitRows');--var proto = FitRows.prototype;--proto._resetLayout = function() {- this.x = 0;- this.y = 0;- this.maxY = 0;- this._getMeasurement( 'gutter', 'outerWidth' );-};--proto._getItemLayoutPosition = function( item ) {- item.getSize();-- var itemWidth = item.size.outerWidth + this.gutter;- // if this element cannot fit in the current row- var containerWidth = this.isotope.size.innerWidth + this.gutter;- if ( this.x !== 0 && itemWidth + this.x > containerWidth ) {- this.x = 0;- this.y = this.maxY;- }-- var position = {- x: this.x,- y: this.y- };-- this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );- this.x += itemWidth;-- return position;-};--proto._getContainerSize = function() {- return { height: this.maxY };-};--return FitRows;--}));--/**- * vertical layout mode- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'isotope/js/layout-modes/vertical',[- '../layout-mode'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('../layout-mode')- );- } else {- // browser global- factory(- window.Isotope.LayoutMode- );- }--}( window, function factory( LayoutMode ) {-'use strict';--var Vertical = LayoutMode.create( 'vertical', {- horizontalAlignment: 0-});--var proto = Vertical.prototype;--proto._resetLayout = function() {- this.y = 0;-};--proto._getItemLayoutPosition = function( item ) {- item.getSize();- var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) *- this.options.horizontalAlignment;- var y = this.y;- this.y += item.size.outerHeight;- return { x: x, y: y };-};--proto._getContainerSize = function() {- return { height: this.y };-};--return Vertical;--}));--/*!- * Isotope v3.0.4- *- * Licensed GPLv3 for open source use- * or Isotope Commercial License for commercial use- *- * http://isotope.metafizzy.co- * Copyright 2017 Metafizzy- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /*globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( [- 'outlayer/outlayer',- 'get-size/get-size',- 'desandro-matches-selector/matches-selector',- 'fizzy-ui-utils/utils',- 'isotope/js/item',- 'isotope/js/layout-mode',- // include default layout modes- 'isotope/js/layout-modes/masonry',- 'isotope/js/layout-modes/fit-rows',- 'isotope/js/layout-modes/vertical'- ],- function( Outlayer, getSize, matchesSelector, utils, Item, LayoutMode ) {- return factory( window, Outlayer, getSize, matchesSelector, utils, Item, LayoutMode );- });- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- window,- require('outlayer'),- require('get-size'),- require('desandro-matches-selector'),- require('fizzy-ui-utils'),- require('isotope/js/item'),- require('isotope/js/layout-mode'),- // include default layout modes- require('isotope/js/layout-modes/masonry'),- require('isotope/js/layout-modes/fit-rows'),- require('isotope/js/layout-modes/vertical')- );- } else {- // browser global- window.Isotope = factory(- window,- window.Outlayer,- window.getSize,- window.matchesSelector,- window.fizzyUIUtils,- window.Isotope.Item,- window.Isotope.LayoutMode- );- }--}( window, function factory( window, Outlayer, getSize, matchesSelector, utils,- Item, LayoutMode ) {----// -------------------------- vars -------------------------- //--var jQuery = window.jQuery;--// -------------------------- helpers -------------------------- //--var trim = String.prototype.trim ?- function( str ) {- return str.trim();- } :- function( str ) {- return str.replace( /^\s+|\s+$/g, '' );- };--// -------------------------- isotopeDefinition -------------------------- //-- // create an Outlayer layout class- var Isotope = Outlayer.create( 'isotope', {- layoutMode: 'masonry',- isJQueryFiltering: true,- sortAscending: true- });-- Isotope.Item = Item;- Isotope.LayoutMode = LayoutMode;-- var proto = Isotope.prototype;-- proto._create = function() {- this.itemGUID = 0;- // functions that sort items- this._sorters = {};- this._getSorters();- // call super- Outlayer.prototype._create.call( this );-- // create layout modes- this.modes = {};- // start filteredItems with all items- this.filteredItems = this.items;- // keep of track of sortBys- this.sortHistory = [ 'original-order' ];- // create from registered layout modes- for ( var name in LayoutMode.modes ) {- this._initLayoutMode( name );- }- };-- proto.reloadItems = function() {- // reset item ID counter- this.itemGUID = 0;- // call super- Outlayer.prototype.reloadItems.call( this );- };-- proto._itemize = function() {- var items = Outlayer.prototype._itemize.apply( this, arguments );- // assign ID for original-order- for ( var i=0; i < items.length; i++ ) {- var item = items[i];- item.id = this.itemGUID++;- }- this._updateItemsSortData( items );- return items;- };--- // -------------------------- layout -------------------------- //-- proto._initLayoutMode = function( name ) {- var Mode = LayoutMode.modes[ name ];- // set mode options- // HACK extend initial options, back-fill in default options- var initialOpts = this.options[ name ] || {};- this.options[ name ] = Mode.options ?- utils.extend( Mode.options, initialOpts ) : initialOpts;- // init layout mode instance- this.modes[ name ] = new Mode( this );- };--- proto.layout = function() {- // if first time doing layout, do all magic- if ( !this._isLayoutInited && this._getOption('initLayout') ) {- this.arrange();- return;- }- this._layout();- };-- // private method to be used in layout() & magic()- proto._layout = function() {- // don't animate first layout- var isInstant = this._getIsInstant();- // layout flow- this._resetLayout();- this._manageStamps();- this.layoutItems( this.filteredItems, isInstant );-- // flag for initalized- this._isLayoutInited = true;- };-- // filter + sort + layout- proto.arrange = function( opts ) {- // set any options pass- this.option( opts );- this._getIsInstant();- // filter, sort, and layout-- // filter- var filtered = this._filter( this.items );- this.filteredItems = filtered.matches;-- this._bindArrangeComplete();-- if ( this._isInstant ) {- this._noTransition( this._hideReveal, [ filtered ] );- } else {- this._hideReveal( filtered );- }-- this._sort();- this._layout();- };- // alias to _init for main plugin method- proto._init = proto.arrange;-- proto._hideReveal = function( filtered ) {- this.reveal( filtered.needReveal );- this.hide( filtered.needHide );- };-- // HACK- // Don't animate/transition first layout- // Or don't animate/transition other layouts- proto._getIsInstant = function() {- var isLayoutInstant = this._getOption('layoutInstant');- var isInstant = isLayoutInstant !== undefined ? isLayoutInstant :- !this._isLayoutInited;- this._isInstant = isInstant;- return isInstant;- };-- // listen for layoutComplete, hideComplete and revealComplete- // to trigger arrangeComplete- proto._bindArrangeComplete = function() {- // listen for 3 events to trigger arrangeComplete- var isLayoutComplete, isHideComplete, isRevealComplete;- var _this = this;- function arrangeParallelCallback() {- if ( isLayoutComplete && isHideComplete && isRevealComplete ) {- _this.dispatchEvent( 'arrangeComplete', null, [ _this.filteredItems ] );- }- }- this.once( 'layoutComplete', function() {- isLayoutComplete = true;- arrangeParallelCallback();- });- this.once( 'hideComplete', function() {- isHideComplete = true;- arrangeParallelCallback();- });- this.once( 'revealComplete', function() {- isRevealComplete = true;- arrangeParallelCallback();- });- };-- // -------------------------- filter -------------------------- //-- proto._filter = function( items ) {- var filter = this.options.filter;- filter = filter || '*';- var matches = [];- var hiddenMatched = [];- var visibleUnmatched = [];-- var test = this._getFilterTest( filter );-- // test each item- for ( var i=0; i < items.length; i++ ) {- var item = items[i];- if ( item.isIgnored ) {- continue;- }- // add item to either matched or unmatched group- var isMatched = test( item );- // item.isFilterMatched = isMatched;- // add to matches if its a match- if ( isMatched ) {- matches.push( item );- }- // add to additional group if item needs to be hidden or revealed- if ( isMatched && item.isHidden ) {- hiddenMatched.push( item );- } else if ( !isMatched && !item.isHidden ) {- visibleUnmatched.push( item );- }- }-- // return collections of items to be manipulated- return {- matches: matches,- needReveal: hiddenMatched,- needHide: visibleUnmatched- };- };-- // get a jQuery, function, or a matchesSelector test given the filter- proto._getFilterTest = function( filter ) {- if ( jQuery && this.options.isJQueryFiltering ) {- // use jQuery- return function( item ) {- return jQuery( item.element ).is( filter );- };- }- if ( typeof filter == 'function' ) {- // use filter as function- return function( item ) {- return filter( item.element );- };- }- // default, use filter as selector string- return function( item ) {- return matchesSelector( item.element, filter );- };- };-- // -------------------------- sorting -------------------------- //-- /**- * @params {Array} elems- * @public- */- proto.updateSortData = function( elems ) {- // get items- var items;- if ( elems ) {- elems = utils.makeArray( elems );- items = this.getItems( elems );- } else {- // update all items if no elems provided- items = this.items;- }-- this._getSorters();- this._updateItemsSortData( items );- };-- proto._getSorters = function() {- var getSortData = this.options.getSortData;- for ( var key in getSortData ) {- var sorter = getSortData[ key ];- this._sorters[ key ] = mungeSorter( sorter );- }- };-- /**- * @params {Array} items - of Isotope.Items- * @private- */- proto._updateItemsSortData = function( items ) {- // do not update if no items- var len = items && items.length;-- for ( var i=0; len && i < len; i++ ) {- var item = items[i];- item.updateSortData();- }- };-- // ----- munge sorter ----- //-- // encapsulate this, as we just need mungeSorter- // other functions in here are just for munging- var mungeSorter = ( function() {- // add a magic layer to sorters for convienent shorthands- // `.foo-bar` will use the text of .foo-bar querySelector- // `[foo-bar]` will use attribute- // you can also add parser- // `.foo-bar parseInt` will parse that as a number- function mungeSorter( sorter ) {- // if not a string, return function or whatever it is- if ( typeof sorter != 'string' ) {- return sorter;- }- // parse the sorter string- var args = trim( sorter ).split(' ');- var query = args[0];- // check if query looks like [an-attribute]- var attrMatch = query.match( /^\[(.+)\]$/ );- var attr = attrMatch && attrMatch[1];- var getValue = getValueGetter( attr, query );- // use second argument as a parser- var parser = Isotope.sortDataParsers[ args[1] ];- // parse the value, if there was a parser- sorter = parser ? function( elem ) {- return elem && parser( getValue( elem ) );- } :- // otherwise just return value- function( elem ) {- return elem && getValue( elem );- };-- return sorter;- }-- // get an attribute getter, or get text of the querySelector- function getValueGetter( attr, query ) {- // if query looks like [foo-bar], get attribute- if ( attr ) {- return function getAttribute( elem ) {- return elem.getAttribute( attr );- };- }-- // otherwise, assume its a querySelector, and get its text- return function getChildText( elem ) {- var child = elem.querySelector( query );- return child && child.textContent;- };- }-- return mungeSorter;- })();-- // parsers used in getSortData shortcut strings- Isotope.sortDataParsers = {- 'parseInt': function( val ) {- return parseInt( val, 10 );- },- 'parseFloat': function( val ) {- return parseFloat( val );- }- };-- // ----- sort method ----- //-- // sort filteredItem order- proto._sort = function() {- if ( !this.options.sortBy ) {- return;- }- // keep track of sortBy History- var sortBys = utils.makeArray( this.options.sortBy );- if ( !this._getIsSameSortBy( sortBys ) ) {- // concat all sortBy and sortHistory, add to front, oldest goes in last- this.sortHistory = sortBys.concat( this.sortHistory );- }- // sort magic- var itemSorter = getItemSorter( this.sortHistory, this.options.sortAscending );- this.filteredItems.sort( itemSorter );- };-- // check if sortBys is same as start of sortHistory- proto._getIsSameSortBy = function( sortBys ) {- for ( var i=0; i < sortBys.length; i++ ) {- if ( sortBys[i] != this.sortHistory[i] ) {- return false;- }- }- return true;- };-- // returns a function used for sorting- function getItemSorter( sortBys, sortAsc ) {- return function sorter( itemA, itemB ) {- // cycle through all sortKeys- for ( var i = 0; i < sortBys.length; i++ ) {- var sortBy = sortBys[i];- var a = itemA.sortData[ sortBy ];- var b = itemB.sortData[ sortBy ];- if ( a > b || a < b ) {- // if sortAsc is an object, use the value given the sortBy key- var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;- var direction = isAscending ? 1 : -1;- return ( a > b ? 1 : -1 ) * direction;- }- }- return 0;- };- }-- // -------------------------- methods -------------------------- //-- // get layout mode- proto._mode = function() {- var layoutMode = this.options.layoutMode;- var mode = this.modes[ layoutMode ];- if ( !mode ) {- // TODO console.error- throw new Error( 'No layout mode: ' + layoutMode );- }- // HACK sync mode's options- // any options set after init for layout mode need to be synced- mode.options = this.options[ layoutMode ];- return mode;- };-- proto._resetLayout = function() {- // trigger original reset layout- Outlayer.prototype._resetLayout.call( this );- this._mode()._resetLayout();- };-- proto._getItemLayoutPosition = function( item ) {- return this._mode()._getItemLayoutPosition( item );- };-- proto._manageStamp = function( stamp ) {- this._mode()._manageStamp( stamp );- };-- proto._getContainerSize = function() {- return this._mode()._getContainerSize();- };-- proto.needsResizeLayout = function() {- return this._mode().needsResizeLayout();- };-- // -------------------------- adding & removing -------------------------- //-- // HEADS UP overwrites default Outlayer appended- proto.appended = function( elems ) {- var items = this.addItems( elems );- if ( !items.length ) {- return;- }- // filter, layout, reveal new items- var filteredItems = this._filterRevealAdded( items );- // add to filteredItems- this.filteredItems = this.filteredItems.concat( filteredItems );- };-- // HEADS UP overwrites default Outlayer prepended- proto.prepended = function( elems ) {- var items = this._itemize( elems );- if ( !items.length ) {- return;- }- // start new layout- this._resetLayout();- this._manageStamps();- // filter, layout, reveal new items- var filteredItems = this._filterRevealAdded( items );- // layout previous items- this.layoutItems( this.filteredItems );- // add to items and filteredItems- this.filteredItems = filteredItems.concat( this.filteredItems );- this.items = items.concat( this.items );- };-- proto._filterRevealAdded = function( items ) {- var filtered = this._filter( items );- this.hide( filtered.needHide );- // reveal all new items- this.reveal( filtered.matches );- // layout new items, no transition- this.layoutItems( filtered.matches, true );- return filtered.matches;- };-- /**- * Filter, sort, and layout newly-appended item elements- * @param {Array or NodeList or Element} elems- */- proto.insert = function( elems ) {- var items = this.addItems( elems );- if ( !items.length ) {- return;- }- // append item elements- var i, item;- var len = items.length;- for ( i=0; i < len; i++ ) {- item = items[i];- this.element.appendChild( item.element );- }- // filter new stuff- var filteredInsertItems = this._filter( items ).matches;- // set flag- for ( i=0; i < len; i++ ) {- items[i].isLayoutInstant = true;- }- this.arrange();- // reset flag- for ( i=0; i < len; i++ ) {- delete items[i].isLayoutInstant;- }- this.reveal( filteredInsertItems );- };-- var _remove = proto.remove;- proto.remove = function( elems ) {- elems = utils.makeArray( elems );- var removeItems = this.getItems( elems );- // do regular thing- _remove.call( this, elems );- // bail if no items to remove- var len = removeItems && removeItems.length;- // remove elems from filteredItems- for ( var i=0; len && i < len; i++ ) {- var item = removeItems[i];- // remove item from collection- utils.removeFrom( this.filteredItems, item );- }- };-- proto.shuffle = function() {- // update random sortData- for ( var i=0; i < this.items.length; i++ ) {- var item = this.items[i];- item.sortData.random = Math.random();- }- this.options.sortBy = 'random';- this._sort();- this._layout();- };-- /**- * trigger fn without transition- * kind of hacky to have this in the first place- * @param {Function} fn- * @param {Array} args- * @returns ret- * @private- */- proto._noTransition = function( fn, args ) {- // save transitionDuration before disabling- var transitionDuration = this.options.transitionDuration;- // disable transition- this.options.transitionDuration = 0;- // do it- var returnValue = fn.apply( this, args );- // re-enable transition for reveal- this.options.transitionDuration = transitionDuration;- return returnValue;- };-- // ----- helper methods ----- //-- /**- * getter method for getting filtered item elements- * @returns {Array} elems - collection of item elements- */- proto.getFilteredItemElements = function() {- return this.filteredItems.map( function( item ) {- return item.element;- });- };-- // ----- ----- //-- return Isotope;--}));-diff --git a/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.min.js b/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.min.jsdeleted file mode 100644index be520aff5..000000000--- a/web/ext/node_modules/isotope-layout/dist/isotope.pkgd.min.js+++ /dev/null@@ -1,12 +0,0 @@-/*!- * Isotope PACKAGED v3.0.4- *- * Licensed GPLv3 for open source use- * or Isotope Commercial License for commercial use- *- * http://isotope.metafizzy.co- * Copyright 2017 Metafizzy- */--!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=0,n=i[o];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];n;){var r=s&&s[n];r&&(this.off(t,n),delete s[n]),n.apply(this,e),o+=r?0:1,n=i[o]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);s.isBoxSizeOuter=r=200==t(n.width),i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(o&&o.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,n,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=this.layout.size,r=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),a=n.indexOf("%")!=-1?parseFloat(n)/100*s.height:parseInt(n,10);r=isNaN(r)?0:r,a=isNaN(a)?0:a,r-=e?s.paddingLeft:s.paddingRight,a-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=a},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),s=parseInt(e,10),r=n===this.position.x&&s===this.position.y;if(this.setPosition(t,e),r&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,u=e-o,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){-var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});\ No newline at end of filediff --git a/web/ext/node_modules/isotope-packery/packery-mode.pkgd.js b/web/ext/node_modules/isotope-packery/packery-mode.pkgd.jsdeleted file mode 100644index d89fed87c..000000000--- a/web/ext/node_modules/isotope-packery/packery-mode.pkgd.js+++ /dev/null@@ -1,1239 +0,0 @@-/*!- * Packery layout mode PACKAGED v2.0.0- * sub-classes Packery- */--/**- * Rect- * low-level utility class for basic geometry- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'packery/js/rect',factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory();- } else {- // browser global- window.Packery = window.Packery || {};- window.Packery.Rect = factory();- }--}( window, function factory() {---// -------------------------- Rect -------------------------- //--function Rect( props ) {- // extend properties from defaults- for ( var prop in Rect.defaults ) {- this[ prop ] = Rect.defaults[ prop ];- }-- for ( prop in props ) {- this[ prop ] = props[ prop ];- }--}--Rect.defaults = {- x: 0,- y: 0,- width: 0,- height: 0-};--var proto = Rect.prototype;--/**- * Determines whether or not this rectangle wholly encloses another rectangle or point.- * @param {Rect} rect- * @returns {Boolean}-**/-proto.contains = function( rect ) {- // points don't have width or height- var otherWidth = rect.width || 0;- var otherHeight = rect.height || 0;- return this.x <= rect.x &&- this.y <= rect.y &&- this.x + this.width >= rect.x + otherWidth &&- this.y + this.height >= rect.y + otherHeight;-};--/**- * Determines whether or not the rectangle intersects with another.- * @param {Rect} rect- * @returns {Boolean}-**/-proto.overlaps = function( rect ) {- var thisRight = this.x + this.width;- var thisBottom = this.y + this.height;- var rectRight = rect.x + rect.width;- var rectBottom = rect.y + rect.height;-- // http://stackoverflow.com/a/306332- return this.x < rectRight &&- thisRight > rect.x &&- this.y < rectBottom &&- thisBottom > rect.y;-};--/**- * @param {Rect} rect - the overlapping rect- * @returns {Array} freeRects - rects representing the area around the rect-**/-proto.getMaximalFreeRects = function( rect ) {-- // if no intersection, return false- if ( !this.overlaps( rect ) ) {- return false;- }-- var freeRects = [];- var freeRect;-- var thisRight = this.x + this.width;- var thisBottom = this.y + this.height;- var rectRight = rect.x + rect.width;- var rectBottom = rect.y + rect.height;-- // top- if ( this.y < rect.y ) {- freeRect = new Rect({- x: this.x,- y: this.y,- width: this.width,- height: rect.y - this.y- });- freeRects.push( freeRect );- }-- // right- if ( thisRight > rectRight ) {- freeRect = new Rect({- x: rectRight,- y: this.y,- width: thisRight - rectRight,- height: this.height- });- freeRects.push( freeRect );- }-- // bottom- if ( thisBottom > rectBottom ) {- freeRect = new Rect({- x: this.x,- y: rectBottom,- width: this.width,- height: thisBottom - rectBottom- });- freeRects.push( freeRect );- }-- // left- if ( this.x < rect.x ) {- freeRect = new Rect({- x: this.x,- y: this.y,- width: rect.x - this.x,- height: this.height- });- freeRects.push( freeRect );- }-- return freeRects;-};--proto.canFit = function( rect ) {- return this.width >= rect.width && this.height >= rect.height;-};--return Rect;--}));--/**- * Packer- * bin-packing algorithm- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'packery/js/packer',[ './rect' ], factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('./rect')- );- } else {- // browser global- var Packery = window.Packery = window.Packery || {};- Packery.Packer = factory( Packery.Rect );- }--}( window, function factory( Rect ) {---// -------------------------- Packer -------------------------- //--/**- * @param {Number} width- * @param {Number} height- * @param {String} sortDirection- * topLeft for vertical, leftTop for horizontal- */-function Packer( width, height, sortDirection ) {- this.width = width || 0;- this.height = height || 0;- this.sortDirection = sortDirection || 'downwardLeftToRight';-- this.reset();-}--var proto = Packer.prototype;--proto.reset = function() {- this.spaces = [];-- var initialSpace = new Rect({- x: 0,- y: 0,- width: this.width,- height: this.height- });-- this.spaces.push( initialSpace );- // set sorter- this.sorter = sorters[ this.sortDirection ] || sorters.downwardLeftToRight;-};--// change x and y of rect to fit with in Packer's available spaces-proto.pack = function( rect ) {- for ( var i=0; i < this.spaces.length; i++ ) {- var space = this.spaces[i];- if ( space.canFit( rect ) ) {- this.placeInSpace( rect, space );- break;- }- }-};--proto.columnPack = function( rect ) {- for ( var i=0; i < this.spaces.length; i++ ) {- var space = this.spaces[i];- var canFitInSpaceColumn = space.x <= rect.x &&- space.x + space.width >= rect.x + rect.width &&- space.height >= rect.height - 0.01; // fudge number for rounding error- if ( canFitInSpaceColumn ) {- rect.y = space.y;- this.placed( rect );- break;- }- }-};--proto.rowPack = function( rect ) {- for ( var i=0; i < this.spaces.length; i++ ) {- var space = this.spaces[i];- var canFitInSpaceRow = space.y <= rect.y &&- space.y + space.height >= rect.y + rect.height &&- space.width >= rect.width - 0.01; // fudge number for rounding error- if ( canFitInSpaceRow ) {- rect.x = space.x;- this.placed( rect );- break;- }- }-};--proto.placeInSpace = function( rect, space ) {- // place rect in space- rect.x = space.x;- rect.y = space.y;-- this.placed( rect );-};--// update spaces with placed rect-proto.placed = function( rect ) {- // update spaces- var revisedSpaces = [];- for ( var i=0; i < this.spaces.length; i++ ) {- var space = this.spaces[i];- var newSpaces = space.getMaximalFreeRects( rect );- // add either the original space or the new spaces to the revised spaces- if ( newSpaces ) {- revisedSpaces.push.apply( revisedSpaces, newSpaces );- } else {- revisedSpaces.push( space );- }- }-- this.spaces = revisedSpaces;-- this.mergeSortSpaces();-};--proto.mergeSortSpaces = function() {- // remove redundant spaces- Packer.mergeRects( this.spaces );- this.spaces.sort( this.sorter );-};--// add a space back-proto.addSpace = function( rect ) {- this.spaces.push( rect );- this.mergeSortSpaces();-};--// -------------------------- utility functions -------------------------- //--/**- * Remove redundant rectangle from array of rectangles- * @param {Array} rects: an array of Rects- * @returns {Array} rects: an array of Rects-**/-Packer.mergeRects = function( rects ) {- var i = 0;- var rect = rects[i];-- rectLoop:- while ( rect ) {- var j = 0;- var compareRect = rects[ i + j ];-- while ( compareRect ) {- if ( compareRect == rect ) {- j++; // next- } else if ( compareRect.contains( rect ) ) {- // remove rect- rects.splice( i, 1 );- rect = rects[i]; // set next rect- continue rectLoop; // bail on compareLoop- } else if ( rect.contains( compareRect ) ) {- // remove compareRect- rects.splice( i + j, 1 );- } else {- j++;- }- compareRect = rects[ i + j ]; // set next compareRect- }- i++;- rect = rects[i];- }-- return rects;-};---// -------------------------- sorters -------------------------- //--// functions for sorting rects in order-var sorters = {- // top down, then left to right- downwardLeftToRight: function( a, b ) {- return a.y - b.y || a.x - b.x;- },- // left to right, then top down- rightwardTopToBottom: function( a, b ) {- return a.x - b.x || a.y - b.y;- }-};---// -------------------------- -------------------------- //--return Packer;--}));--/**- * Packery Item Element-**/--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'packery/js/item',[- 'outlayer/outlayer',- './rect'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('outlayer'),- require('./rect')- );- } else {- // browser global- window.Packery.Item = factory(- window.Outlayer,- window.Packery.Rect- );- }--}( window, function factory( Outlayer, Rect ) {---// -------------------------- Item -------------------------- //--var docElemStyle = document.documentElement.style;--var transformProperty = typeof docElemStyle.transform == 'string' ?- 'transform' : 'WebkitTransform';--// sub-class Item-var Item = function PackeryItem() {- Outlayer.Item.apply( this, arguments );-};--var proto = Item.prototype = Object.create( Outlayer.Item.prototype );--var __create = proto._create;-proto._create = function() {- // call default _create logic- __create.call( this );- this.rect = new Rect();-};--var _moveTo = proto.moveTo;-proto.moveTo = function( x, y ) {- // don't shift 1px while dragging- var dx = Math.abs( this.position.x - x );- var dy = Math.abs( this.position.y - y );-- var canHackGoTo = this.layout.dragItemCount && !this.isPlacing &&- !this.isTransitioning && dx < 1 && dy < 1;- if ( canHackGoTo ) {- this.goTo( x, y );- return;- }- _moveTo.apply( this, arguments );-};--// -------------------------- placing -------------------------- //--proto.enablePlacing = function() {- this.removeTransitionStyles();- // remove transform property from transition- if ( this.isTransitioning && transformProperty ) {- this.element.style[ transformProperty ] = 'none';- }- this.isTransitioning = false;- this.getSize();- this.layout._setRectSize( this.element, this.rect );- this.isPlacing = true;-};--proto.disablePlacing = function() {- this.isPlacing = false;-};--// ----- ----- //--// remove element from DOM-proto.removeElem = function() {- this.element.parentNode.removeChild( this.element );- // add space back to packer- this.layout.packer.addSpace( this.rect );- this.emitEvent( 'remove', [ this ] );-};--// ----- dropPlaceholder ----- //--proto.showDropPlaceholder = function() {- var dropPlaceholder = this.dropPlaceholder;- if ( !dropPlaceholder ) {- // create dropPlaceholder- dropPlaceholder = this.dropPlaceholder = document.createElement('div');- dropPlaceholder.className = 'packery-drop-placeholder';- dropPlaceholder.style.position = 'absolute';- }-- dropPlaceholder.style.width = this.size.width + 'px';- dropPlaceholder.style.height = this.size.height + 'px';- this.positionDropPlaceholder();- this.layout.element.appendChild( dropPlaceholder );-};--proto.positionDropPlaceholder = function() {- this.dropPlaceholder.style[ transformProperty ] = 'translate(' +- this.rect.x + 'px, ' + this.rect.y + 'px)';-};--proto.hideDropPlaceholder = function() {- this.layout.element.removeChild( this.dropPlaceholder );-};--// ----- ----- //--return Item;--}));--/*!- * Packery v2.0.0- * Gapless, draggable grid layouts- *- * Licensed GPLv3 for open source use- * or Packery Commercial License for commercial use- *- * http://packery.metafizzy.co- * Copyright 2016 Metafizzy- */--( function( window, factory ) {- // universal module definition- /* jshint strict: false */ /* globals define, module, require */- if ( typeof define == 'function' && define.amd ) {- // AMD- define( 'packery/js/packery',[- 'get-size/get-size',- 'outlayer/outlayer',- './rect',- './packer',- './item'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('get-size'),- require('outlayer'),- require('./rect'),- require('./packer'),- require('./item')- );- } else {- // browser global- window.Packery = factory(- window.getSize,- window.Outlayer,- window.Packery.Rect,- window.Packery.Packer,- window.Packery.Item- );- }--}( window, function factory( getSize, Outlayer, Rect, Packer, Item ) {---// ----- Rect ----- //--// allow for pixel rounding errors IE8-IE11 & Firefox; #227-Rect.prototype.canFit = function( rect ) {- return this.width >= rect.width - 1 && this.height >= rect.height - 1;-};--// -------------------------- Packery -------------------------- //--// create an Outlayer layout class-var Packery = Outlayer.create('packery');-Packery.Item = Item;--var proto = Packery.prototype;--proto._create = function() {- // call super- Outlayer.prototype._create.call( this );-- // initial properties- this.packer = new Packer();- // packer for drop targets- this.shiftPacker = new Packer();- this.isEnabled = true;-- this.dragItemCount = 0;-- // create drag handlers- var _this = this;- this.handleDraggabilly = {- dragStart: function() {- _this.itemDragStart( this.element );- },- dragMove: function() {- _this.itemDragMove( this.element, this.position.x, this.position.y );- },- dragEnd: function() {- _this.itemDragEnd( this.element );- }- };-- this.handleUIDraggable = {- start: function handleUIDraggableStart( event, ui ) {- // HTML5 may trigger dragstart, dismiss HTML5 dragging- if ( !ui ) {- return;- }- _this.itemDragStart( event.currentTarget );- },- drag: function handleUIDraggableDrag( event, ui ) {- if ( !ui ) {- return;- }- _this.itemDragMove( event.currentTarget, ui.position.left, ui.position.top );- },- stop: function handleUIDraggableStop( event, ui ) {- if ( !ui ) {- return;- }- _this.itemDragEnd( event.currentTarget );- }- };--};---// ----- init & layout ----- //--/**- * logic before any new layout- */-proto._resetLayout = function() {- this.getSize();-- this._getMeasurements();-- // reset packer- var width, height, sortDirection;- // packer settings, if horizontal or vertical- if ( this._getOption('horizontal') ) {- width = Infinity;- height = this.size.innerHeight + this.gutter;- sortDirection = 'rightwardTopToBottom';- } else {- width = this.size.innerWidth + this.gutter;- height = Infinity;- sortDirection = 'downwardLeftToRight';- }-- this.packer.width = this.shiftPacker.width = width;- this.packer.height = this.shiftPacker.height = height;- this.packer.sortDirection = this.shiftPacker.sortDirection = sortDirection;-- this.packer.reset();-- // layout- this.maxY = 0;- this.maxX = 0;-};--/**- * update columnWidth, rowHeight, & gutter- * @private- */-proto._getMeasurements = function() {- this._getMeasurement( 'columnWidth', 'width' );- this._getMeasurement( 'rowHeight', 'height' );- this._getMeasurement( 'gutter', 'width' );-};--proto._getItemLayoutPosition = function( item ) {- this._setRectSize( item.element, item.rect );- if ( this.isShifting || this.dragItemCount > 0 ) {- var packMethod = this._getPackMethod();- this.packer[ packMethod ]( item.rect );- } else {- this.packer.pack( item.rect );- }-- this._setMaxXY( item.rect );- return item.rect;-};--proto.shiftLayout = function() {- this.isShifting = true;- this.layout();- delete this.isShifting;-};--proto._getPackMethod = function() {- return this._getOption('horizontal') ? 'rowPack' : 'columnPack';-};---/**- * set max X and Y value, for size of container- * @param {Packery.Rect} rect- * @private- */-proto._setMaxXY = function( rect ) {- this.maxX = Math.max( rect.x + rect.width, this.maxX );- this.maxY = Math.max( rect.y + rect.height, this.maxY );-};--/**- * set the width and height of a rect, applying columnWidth and rowHeight- * @param {Element} elem- * @param {Packery.Rect} rect- */-proto._setRectSize = function( elem, rect ) {- var size = getSize( elem );- var w = size.outerWidth;- var h = size.outerHeight;- // size for columnWidth and rowHeight, if available- // only check if size is non-zero, #177- if ( w || h ) {- w = this._applyGridGutter( w, this.columnWidth );- h = this._applyGridGutter( h, this.rowHeight );- }- // rect must fit in packer- rect.width = Math.min( w, this.packer.width );- rect.height = Math.min( h, this.packer.height );-};--/**- * fits item to columnWidth/rowHeight and adds gutter- * @param {Number} measurement - item width or height- * @param {Number} gridSize - columnWidth or rowHeight- * @returns measurement- */-proto._applyGridGutter = function( measurement, gridSize ) {- // just add gutter if no gridSize- if ( !gridSize ) {- return measurement + this.gutter;- }- gridSize += this.gutter;- // fit item to columnWidth/rowHeight- var remainder = measurement % gridSize;- var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';- measurement = Math[ mathMethod ]( measurement / gridSize ) * gridSize;- return measurement;-};--proto._getContainerSize = function() {- if ( this._getOption('horizontal') ) {- return {- width: this.maxX - this.gutter- };- } else {- return {- height: this.maxY - this.gutter- };- }-};---// -------------------------- stamp -------------------------- //--/**- * makes space for element- * @param {Element} elem- */-proto._manageStamp = function( elem ) {-- var item = this.getItem( elem );- var rect;- if ( item && item.isPlacing ) {- rect = item.rect;- } else {- var offset = this._getElementOffset( elem );- rect = new Rect({- x: this._getOption('originLeft') ? offset.left : offset.right,- y: this._getOption('originTop') ? offset.top : offset.bottom- });- }-- this._setRectSize( elem, rect );- // save its space in the packer- this.packer.placed( rect );- this._setMaxXY( rect );-};--// -------------------------- methods -------------------------- //--function verticalSorter( a, b ) {- return a.position.y - b.position.y || a.position.x - b.position.x;-}--function horizontalSorter( a, b ) {- return a.position.x - b.position.x || a.position.y - b.position.y;-}--proto.sortItemsByPosition = function() {- var sorter = this._getOption('horizontal') ? horizontalSorter : verticalSorter;- this.items.sort( sorter );-};--/**- * Fit item element in its current position- * Packery will position elements around it- * useful for expanding elements- *- * @param {Element} elem- * @param {Number} x - horizontal destination position, optional- * @param {Number} y - vertical destination position, optional- */-proto.fit = function( elem, x, y ) {- var item = this.getItem( elem );- if ( !item ) {- return;- }-- // stamp item to get it out of layout- this.stamp( item.element );- // set placing flag- item.enablePlacing();- this.updateShiftTargets( item );- // fall back to current position for fitting- x = x === undefined ? item.rect.x: x;- y = y === undefined ? item.rect.y: y;- // position it best at its destination- this.shift( item, x, y );- this._bindFitEvents( item );- item.moveTo( item.rect.x, item.rect.y );- // layout everything else- this.shiftLayout();- // return back to regularly scheduled programming- this.unstamp( item.element );- this.sortItemsByPosition();- item.disablePlacing();-};--/**- * emit event when item is fit and other items are laid out- * @param {Packery.Item} item- * @private- */-proto._bindFitEvents = function( item ) {- var _this = this;- var ticks = 0;- function onLayout() {- ticks++;- if ( ticks != 2 ) {- return;- }- _this.dispatchEvent( 'fitComplete', null, [ item ] );- }- // when item is laid out- item.once( 'layout', onLayout );- // when all items are laid out- this.once( 'layoutComplete', onLayout );-};--// -------------------------- resize -------------------------- //--// debounced, layout on resize-proto.resize = function() {- // don't trigger if size did not change- // or if resize was unbound. See #285, outlayer#9- if ( !this.isResizeBound || !this.needsResizeLayout() ) {- return;- }-- if ( this.options.shiftPercentResize ) {- this.resizeShiftPercentLayout();- } else {- this.layout();- }-};--/**- * check if layout is needed post layout- * @returns Boolean- */-proto.needsResizeLayout = function() {- var size = getSize( this.element );- var innerSize = this._getOption('horizontal') ? 'innerHeight' : 'innerWidth';- return size[ innerSize ] != this.size[ innerSize ];-};--proto.resizeShiftPercentLayout = function() {- var items = this._getItemsForLayout( this.items );-- var isHorizontal = this._getOption('horizontal');- var coord = isHorizontal ? 'y' : 'x';- var measure = isHorizontal ? 'height' : 'width';- var segmentName = isHorizontal ? 'rowHeight' : 'columnWidth';- var innerSize = isHorizontal ? 'innerHeight' : 'innerWidth';-- // proportional re-align items- var previousSegment = this[ segmentName ];- previousSegment = previousSegment && previousSegment + this.gutter;-- if ( previousSegment ) {- this._getMeasurements();- var currentSegment = this[ segmentName ] + this.gutter;- items.forEach( function( item ) {- var seg = Math.round( item.rect[ coord ] / previousSegment );- item.rect[ coord ] = seg * currentSegment;- });- } else {- var currentSize = getSize( this.element )[ innerSize ] + this.gutter;- var previousSize = this.packer[ measure ];- items.forEach( function( item ) {- item.rect[ coord ] = ( item.rect[ coord ] / previousSize ) * currentSize;- });- }-- this.shiftLayout();-};--// -------------------------- drag -------------------------- //--/**- * handle an item drag start event- * @param {Element} elem- */-proto.itemDragStart = function( elem ) {- if ( !this.isEnabled ) {- return;- }- this.stamp( elem );- // this.ignore( elem );- var item = this.getItem( elem );- if ( !item ) {- return;- }-- item.enablePlacing();- item.showDropPlaceholder();- this.dragItemCount++;- this.updateShiftTargets( item );-};--proto.updateShiftTargets = function( dropItem ) {- this.shiftPacker.reset();-- // pack stamps- this._getBoundingRect();- var isOriginLeft = this._getOption('originLeft');- var isOriginTop = this._getOption('originTop');- this.stamps.forEach( function( stamp ) {- // ignore dragged item- var item = this.getItem( stamp );- if ( item && item.isPlacing ) {- return;- }- var offset = this._getElementOffset( stamp );- var rect = new Rect({- x: isOriginLeft ? offset.left : offset.right,- y: isOriginTop ? offset.top : offset.bottom- });- this._setRectSize( stamp, rect );- // save its space in the packer- this.shiftPacker.placed( rect );- }, this );-- // reset shiftTargets- var isHorizontal = this._getOption('horizontal');- var segmentName = isHorizontal ? 'rowHeight' : 'columnWidth';- var measure = isHorizontal ? 'height' : 'width';-- this.shiftTargetKeys = [];- this.shiftTargets = [];- var boundsSize;- var segment = this[ segmentName ];- segment = segment && segment + this.gutter;-- if ( segment ) {- var segmentSpan = Math.ceil( dropItem.rect[ measure ] / segment );- var segs = Math.floor( ( this.shiftPacker[ measure ] + this.gutter ) / segment );- boundsSize = ( segs - segmentSpan ) * segment;- // add targets on top- for ( var i=0; i < segs; i++ ) {- this._addShiftTarget( i * segment, 0, boundsSize );- }- } else {- boundsSize = ( this.shiftPacker[ measure ] + this.gutter ) - dropItem.rect[ measure ];- this._addShiftTarget( 0, 0, boundsSize );- }-- // pack each item to measure where shiftTargets are- var items = this._getItemsForLayout( this.items );- var packMethod = this._getPackMethod();- items.forEach( function( item ) {- var rect = item.rect;- this._setRectSize( item.element, rect );- this.shiftPacker[ packMethod ]( rect );-- // add top left corner- this._addShiftTarget( rect.x, rect.y, boundsSize );- // add bottom left / top right corner- var cornerX = isHorizontal ? rect.x + rect.width : rect.x;- var cornerY = isHorizontal ? rect.y : rect.y + rect.height;- this._addShiftTarget( cornerX, cornerY, boundsSize );-- if ( segment ) {- // add targets for each column on bottom / row on right- var segSpan = Math.round( rect[ measure ] / segment );- for ( var i=1; i < segSpan; i++ ) {- var segX = isHorizontal ? cornerX : rect.x + segment * i;- var segY = isHorizontal ? rect.y + segment * i : cornerY;- this._addShiftTarget( segX, segY, boundsSize );- }- }- }, this );--};--proto._addShiftTarget = function( x, y, boundsSize ) {- var checkCoord = this._getOption('horizontal') ? y : x;- if ( checkCoord !== 0 && checkCoord > boundsSize ) {- return;- }- // create string for a key, easier to keep track of what targets- var key = x + ',' + y;- var hasKey = this.shiftTargetKeys.indexOf( key ) != -1;- if ( hasKey ) {- return;- }- this.shiftTargetKeys.push( key );- this.shiftTargets.push({ x: x, y: y });-};--// -------------------------- drop -------------------------- //--proto.shift = function( item, x, y ) {- var shiftPosition;- var minDistance = Infinity;- var position = { x: x, y: y };- this.shiftTargets.forEach( function( target ) {- var distance = getDistance( target, position );- if ( distance < minDistance ) {- shiftPosition = target;- minDistance = distance;- }- });- item.rect.x = shiftPosition.x;- item.rect.y = shiftPosition.y;-};--function getDistance( a, b ) {- var dx = b.x - a.x;- var dy = b.y - a.y;- return Math.sqrt( dx * dx + dy * dy );-}--// -------------------------- drag move -------------------------- //--var DRAG_THROTTLE_TIME = 120;--/**- * handle an item drag move event- * @param {Element} elem- * @param {Number} x - horizontal change in position- * @param {Number} y - vertical change in position- */-proto.itemDragMove = function( elem, x, y ) {- var item = this.isEnabled && this.getItem( elem );- if ( !item ) {- return;- }-- x -= this.size.paddingLeft;- y -= this.size.paddingTop;-- var _this = this;- function onDrag() {- _this.shift( item, x, y );- item.positionDropPlaceholder();- _this.layout();- }-- // throttle- var now = new Date();- if ( this._itemDragTime && now - this._itemDragTime < DRAG_THROTTLE_TIME ) {- clearTimeout( this.dragTimeout );- this.dragTimeout = setTimeout( onDrag, DRAG_THROTTLE_TIME );- } else {- onDrag();- this._itemDragTime = now;- }-};--// -------------------------- drag end -------------------------- //--/**- * handle an item drag end event- * @param {Element} elem- */-proto.itemDragEnd = function( elem ) {- var item = this.isEnabled && this.getItem( elem );- if ( !item ) {- return;- }-- clearTimeout( this.dragTimeout );- item.element.classList.add('is-positioning-post-drag');-- var completeCount = 0;- var _this = this;- function onDragEndLayoutComplete() {- completeCount++;- if ( completeCount != 2 ) {- return;- }- // reset drag item- item.element.classList.remove('is-positioning-post-drag');- item.hideDropPlaceholder();- _this.dispatchEvent( 'dragItemPositioned', null, [ item ] );- }-- item.once( 'layout', onDragEndLayoutComplete );- this.once( 'layoutComplete', onDragEndLayoutComplete );- item.moveTo( item.rect.x, item.rect.y );- this.layout();- this.dragItemCount = Math.max( 0, this.dragItemCount - 1 );- this.sortItemsByPosition();- item.disablePlacing();- this.unstamp( item.element );-};--/**- * binds Draggabilly events- * @param {Draggabilly} draggie- */-proto.bindDraggabillyEvents = function( draggie ) {- this._bindDraggabillyEvents( draggie, 'on' );-};--proto.unbindDraggabillyEvents = function( draggie ) {- this._bindDraggabillyEvents( draggie, 'off' );-};--proto._bindDraggabillyEvents = function( draggie, method ) {- var handlers = this.handleDraggabilly;- draggie[ method ]( 'dragStart', handlers.dragStart );- draggie[ method ]( 'dragMove', handlers.dragMove );- draggie[ method ]( 'dragEnd', handlers.dragEnd );-};--/**- * binds jQuery UI Draggable events- * @param {jQuery} $elems- */-proto.bindUIDraggableEvents = function( $elems ) {- this._bindUIDraggableEvents( $elems, 'on' );-};--proto.unbindUIDraggableEvents = function( $elems ) {- this._bindUIDraggableEvents( $elems, 'off' );-};--proto._bindUIDraggableEvents = function( $elems, method ) {- var handlers = this.handleUIDraggable;- $elems- [ method ]( 'dragstart', handlers.start )- [ method ]( 'drag', handlers.drag )- [ method ]( 'dragstop', handlers.stop );-};--// ----- destroy ----- //--var _destroy = proto.destroy;-proto.destroy = function() {- _destroy.apply( this, arguments );- // disable flag; prevent drag events from triggering. #72- this.isEnabled = false;-};--// ----- ----- //--Packery.Rect = Rect;-Packery.Packer = Packer;--return Packery;--}));--/*!- * Packery layout mode v2.0.0- * sub-classes Packery- */--/*jshint browser: true, strict: true, undef: true, unused: true */--( function( window, factory ) {-- // universal module definition- if ( typeof define == 'function' && define.amd ) {- // AMD- define( [- 'isotope/js/layout-mode',- 'packery/js/packery'- ],- factory );- } else if ( typeof module == 'object' && module.exports ) {- // CommonJS- module.exports = factory(- require('isotope-layout/js/layout-mode'),- require('packery')- );- } else {- // browser global- factory(- window.Isotope.LayoutMode,- window.Packery- );- }--}( window, function factor( LayoutMode, Packery ) {--- // create an Outlayer layout class- var PackeryMode = LayoutMode.create('packery');- var proto = PackeryMode.prototype;-- var keepModeMethods = {- _getElementOffset: true,- _getMeasurement: true- };-- // inherit Packery prototype- for ( var method in Packery.prototype ) {- // do not inherit mode methods- if ( !keepModeMethods[ method ] ) {- proto[ method ] = Packery.prototype[ method ];- }- }-- // set packer in _resetLayout- var _resetLayout = proto._resetLayout;- proto._resetLayout = function() {- this.packer = this.packer || new Packery.Packer();- this.shiftPacker = this.shiftPacker || new Packery.Packer();- _resetLayout.apply( this, arguments );- };-- var _getItemLayoutPosition = proto._getItemLayoutPosition;- proto._getItemLayoutPosition = function( item ) {- // set packery rect- item.rect = item.rect || new Packery.Rect();- return _getItemLayoutPosition.call( this, item );- };-- // needsResizeLayout for vertical or horizontal- var _needsResizeLayout = proto.needsResizeLayout;- proto.needsResizeLayout = function() {- if ( this._getOption('horizontal') ) {- return this.needsVerticalResizeLayout();- } else {- return _needsResizeLayout.call( this );- }- };-- // point to mode options for horizontal- var _getOption = proto._getOption;- proto._getOption = function( option ) {- if ( option == 'horizontal' ) {- return this.options.isHorizontal !== undefined ?- this.options.isHorizontal : this.options.horizontal;- }- return _getOption.apply( this.isotope, arguments );- };-- return PackeryMode;--}));-diff --git a/web/ext/node_modules/isotope-packery/packery-mode.pkgd.min.js b/web/ext/node_modules/isotope-packery/packery-mode.pkgd.min.jsdeleted file mode 100644index 5129318f8..000000000--- a/web/ext/node_modules/isotope-packery/packery-mode.pkgd.min.js+++ /dev/null@@ -1,6 +0,0 @@-/*!- * Packery layout mode PACKAGED v2.0.0- * sub-classes Packery- */--!function(a,b){"function"==typeof define&&define.amd?define("packery/js/rect",b):"object"==typeof module&&module.exports?module.exports=b():(a.Packery=a.Packery||{},a.Packery.Rect=b())}(window,function(){function a(b){for(var c in a.defaults)this[c]=a.defaults[c];for(c in b)this[c]=b[c]}a.defaults={x:0,y:0,width:0,height:0};var b=a.prototype;return b.contains=function(a){var b=a.width||0,c=a.height||0;return this.x<=a.x&&this.y<=a.y&&this.x+this.width>=a.x+b&&this.y+this.height>=a.y+c},b.overlaps=function(a){var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;return this.x<d&&b>a.x&&this.y<e&&c>a.y},b.getMaximalFreeRects=function(b){if(!this.overlaps(b))return!1;var c,d=[],e=this.x+this.width,f=this.y+this.height,g=b.x+b.width,h=b.y+b.height;return this.y<b.y&&(c=new a({x:this.x,y:this.y,width:this.width,height:b.y-this.y}),d.push(c)),e>g&&(c=new a({x:g,y:this.y,width:e-g,height:this.height}),d.push(c)),f>h&&(c=new a({x:this.x,y:h,width:this.width,height:f-h}),d.push(c)),this.x<b.x&&(c=new a({x:this.x,y:this.y,width:b.x-this.x,height:this.height}),d.push(c)),d},b.canFit=function(a){return this.width>=a.width&&this.height>=a.height},a}),function(a,b){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],b);else if("object"==typeof module&&module.exports)module.exports=b(require("./rect"));else{var c=a.Packery=a.Packery||{};c.Packer=b(c.Rect)}}(window,function(a){function b(a,b,c){this.width=a||0,this.height=b||0,this.sortDirection=c||"downwardLeftToRight",this.reset()}var c=b.prototype;c.reset=function(){this.spaces=[];var b=new a({x:0,y:0,width:this.width,height:this.height});this.spaces.push(b),this.sorter=d[this.sortDirection]||d.downwardLeftToRight},c.pack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b];if(c.canFit(a)){this.placeInSpace(a,c);break}}},c.columnPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.x<=a.x&&c.x+c.width>=a.x+a.width&&c.height>=a.height-.01;if(d){a.y=c.y,this.placed(a);break}}},c.rowPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.y<=a.y&&c.y+c.height>=a.y+a.height&&c.width>=a.width-.01;if(d){a.x=c.x,this.placed(a);break}}},c.placeInSpace=function(a,b){a.x=b.x,a.y=b.y,this.placed(a)},c.placed=function(a){for(var b=[],c=0;c<this.spaces.length;c++){var d=this.spaces[c],e=d.getMaximalFreeRects(a);e?b.push.apply(b,e):b.push(d)}this.spaces=b,this.mergeSortSpaces()},c.mergeSortSpaces=function(){b.mergeRects(this.spaces),this.spaces.sort(this.sorter)},c.addSpace=function(a){this.spaces.push(a),this.mergeSortSpaces()},b.mergeRects=function(a){var b=0,c=a[b];a:for(;c;){for(var d=0,e=a[b+d];e;){if(e==c)d++;else{if(e.contains(c)){a.splice(b,1),c=a[b];continue a}c.contains(e)?a.splice(b+d,1):d++}e=a[b+d]}b++,c=a[b]}return a};var d={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return b}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],b):"object"==typeof module&&module.exports?module.exports=b(require("outlayer"),require("./rect")):a.Packery.Item=b(a.Outlayer,a.Packery.Rect)}(window,function(a,b){var c=document.documentElement.style,d="string"==typeof c.transform?"transform":"WebkitTransform",e=function(){a.Item.apply(this,arguments)},f=e.prototype=Object.create(a.Item.prototype),g=f._create;f._create=function(){g.call(this),this.rect=new b};var h=f.moveTo;return f.moveTo=function(a,b){var c=Math.abs(this.position.x-a),d=Math.abs(this.position.y-b),e=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>c&&1>d;return e?void this.goTo(a,b):void h.apply(this,arguments)},f.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&d&&(this.element.style[d]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},f.disablePlacing=function(){this.isPlacing=!1},f.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},f.showDropPlaceholder=function(){var a=this.dropPlaceholder;a||(a=this.dropPlaceholder=document.createElement("div"),a.className="packery-drop-placeholder",a.style.position="absolute"),a.style.width=this.size.width+"px",a.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(a)},f.positionDropPlaceholder=function(){this.dropPlaceholder.style[d]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},f.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],b):"object"==typeof module&&module.exports?module.exports=b(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):a.Packery=b(a.getSize,a.Outlayer,a.Packery.Rect,a.Packery.Packer,a.Packery.Item)}(window,function(a,b,c,d,e){function f(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function g(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}function h(a,b){var c=b.x-a.x,d=b.y-a.y;return Math.sqrt(c*c+d*d)}c.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var i=b.create("packery");i.Item=e;var j=i.prototype;j._create=function(){b.prototype._create.call(this),this.packer=new d,this.shiftPacker=new d,this.isEnabled=!0,this.dragItemCount=0;var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){a.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(b,c){c&&a.itemDragStart(b.currentTarget)},drag:function(b,c){c&&a.itemDragMove(b.currentTarget,c.position.left,c.position.top)},stop:function(b,c){c&&a.itemDragEnd(b.currentTarget)}}},j._resetLayout=function(){this.getSize(),this._getMeasurements();var a,b,c;this._getOption("horizontal")?(a=1/0,b=this.size.innerHeight+this.gutter,c="rightwardTopToBottom"):(a=this.size.innerWidth+this.gutter,b=1/0,c="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=a,this.packer.height=this.shiftPacker.height=b,this.packer.sortDirection=this.shiftPacker.sortDirection=c,this.packer.reset(),this.maxY=0,this.maxX=0},j._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},j._getItemLayoutPosition=function(a){if(this._setRectSize(a.element,a.rect),this.isShifting||this.dragItemCount>0){var b=this._getPackMethod();this.packer[b](a.rect)}else this.packer.pack(a.rect);return this._setMaxXY(a.rect),a.rect},j.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},j._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},j._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX),this.maxY=Math.max(a.y+a.height,this.maxY)},j._setRectSize=function(b,c){var d=a(b),e=d.outerWidth,f=d.outerHeight;(e||f)&&(e=this._applyGridGutter(e,this.columnWidth),f=this._applyGridGutter(f,this.rowHeight)),c.width=Math.min(e,this.packer.width),c.height=Math.min(f,this.packer.height)},j._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b,d=c&&1>c?"round":"ceil";return a=Math[d](a/b)*b},j._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},j._manageStamp=function(a){var b,d=this.getItem(a);if(d&&d.isPlacing)b=d.rect;else{var e=this._getElementOffset(a);b=new c({x:this._getOption("originLeft")?e.left:e.right,y:this._getOption("originTop")?e.top:e.bottom})}this._setRectSize(a,b),this.packer.placed(b),this._setMaxXY(b)},j.sortItemsByPosition=function(){var a=this._getOption("horizontal")?g:f;this.items.sort(a)},j.fit=function(a,b,c){var d=this.getItem(a);d&&(this.stamp(d.element),d.enablePlacing(),this.updateShiftTargets(d),b=void 0===b?d.rect.x:b,c=void 0===c?d.rect.y:c,this.shift(d,b,c),this._bindFitEvents(d),d.moveTo(d.rect.x,d.rect.y),this.shiftLayout(),this.unstamp(d.element),this.sortItemsByPosition(),d.disablePlacing())},j._bindFitEvents=function(a){function b(){d++,2==d&&c.dispatchEvent("fitComplete",null,[a])}var c=this,d=0;a.once("layout",b),this.once("layoutComplete",b)},j.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},j.needsResizeLayout=function(){var b=a(this.element),c=this._getOption("horizontal")?"innerHeight":"innerWidth";return b[c]!=this.size[c]},j.resizeShiftPercentLayout=function(){var b=this._getItemsForLayout(this.items),c=this._getOption("horizontal"),d=c?"y":"x",e=c?"height":"width",f=c?"rowHeight":"columnWidth",g=c?"innerHeight":"innerWidth",h=this[f];if(h=h&&h+this.gutter){this._getMeasurements();var i=this[f]+this.gutter;b.forEach(function(a){var b=Math.round(a.rect[d]/h);a.rect[d]=b*i})}else{var j=a(this.element)[g]+this.gutter,k=this.packer[e];b.forEach(function(a){a.rect[d]=a.rect[d]/k*j})}this.shiftLayout()},j.itemDragStart=function(a){if(this.isEnabled){this.stamp(a);var b=this.getItem(a);b&&(b.enablePlacing(),b.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(b))}},j.updateShiftTargets=function(a){this.shiftPacker.reset(),this._getBoundingRect();var b=this._getOption("originLeft"),d=this._getOption("originTop");this.stamps.forEach(function(a){var e=this.getItem(a);if(!e||!e.isPlacing){var f=this._getElementOffset(a),g=new c({x:b?f.left:f.right,y:d?f.top:f.bottom});this._setRectSize(a,g),this.shiftPacker.placed(g)}},this);var e=this._getOption("horizontal"),f=e?"rowHeight":"columnWidth",g=e?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var h,i=this[f];if(i=i&&i+this.gutter){var j=Math.ceil(a.rect[g]/i),k=Math.floor((this.shiftPacker[g]+this.gutter)/i);h=(k-j)*i;for(var l=0;k>l;l++)this._addShiftTarget(l*i,0,h)}else h=this.shiftPacker[g]+this.gutter-a.rect[g],this._addShiftTarget(0,0,h);var m=this._getItemsForLayout(this.items),n=this._getPackMethod();m.forEach(function(a){var b=a.rect;this._setRectSize(a.element,b),this.shiftPacker[n](b),this._addShiftTarget(b.x,b.y,h);var c=e?b.x+b.width:b.x,d=e?b.y:b.y+b.height;if(this._addShiftTarget(c,d,h),i)for(var f=Math.round(b[g]/i),j=1;f>j;j++){var k=e?c:b.x+i*j,l=e?b.y+i*j:d;this._addShiftTarget(k,l,h)}},this)},j._addShiftTarget=function(a,b,c){var d=this._getOption("horizontal")?b:a;if(!(0!==d&&d>c)){var e=a+","+b,f=-1!=this.shiftTargetKeys.indexOf(e);f||(this.shiftTargetKeys.push(e),this.shiftTargets.push({x:a,y:b}))}},j.shift=function(a,b,c){var d,e=1/0,f={x:b,y:c};this.shiftTargets.forEach(function(a){var b=h(a,f);e>b&&(d=a,e=b)}),a.rect.x=d.x,a.rect.y=d.y};var k=120;j.itemDragMove=function(a,b,c){function d(){f.shift(e,b,c),e.positionDropPlaceholder(),f.layout()}var e=this.isEnabled&&this.getItem(a);if(e){b-=this.size.paddingLeft,c-=this.size.paddingTop;var f=this,g=new Date;this._itemDragTime&&g-this._itemDragTime<k?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(d,k)):(d(),this._itemDragTime=g)}},j.itemDragEnd=function(a){function b(){d++,2==d&&(c.element.classList.remove("is-positioning-post-drag"),c.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[c]))}var c=this.isEnabled&&this.getItem(a);if(c){clearTimeout(this.dragTimeout),c.element.classList.add("is-positioning-post-drag");var d=0,e=this;c.once("layout",b),this.once("layoutComplete",b),c.moveTo(c.rect.x,c.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),c.disablePlacing(),this.unstamp(c.element)}},j.bindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"on")},j.unbindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"off")},j._bindDraggabillyEvents=function(a,b){var c=this.handleDraggabilly;a[b]("dragStart",c.dragStart),a[b]("dragMove",c.dragMove),a[b]("dragEnd",c.dragEnd)},j.bindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"on")},j.unbindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"off")},j._bindUIDraggableEvents=function(a,b){var c=this.handleUIDraggable;a[b]("dragstart",c.start)[b]("drag",c.drag)[b]("dragstop",c.stop)};var l=j.destroy;return j.destroy=function(){l.apply(this,arguments),this.isEnabled=!1},i.Rect=c,i.Packer=d,i}),function(a,b){"function"==typeof define&&define.amd?define(["isotope/js/layout-mode","packery/js/packery"],b):"object"==typeof module&&module.exports?module.exports=b(require("isotope-layout/js/layout-mode"),require("packery")):b(a.Isotope.LayoutMode,a.Packery)}(window,function(a,b){var c=a.create("packery"),d=c.prototype,e={_getElementOffset:!0,_getMeasurement:!0};for(var f in b.prototype)e[f]||(d[f]=b.prototype[f]);var g=d._resetLayout;d._resetLayout=function(){this.packer=this.packer||new b.Packer,this.shiftPacker=this.shiftPacker||new b.Packer,g.apply(this,arguments)};var h=d._getItemLayoutPosition;d._getItemLayoutPosition=function(a){return a.rect=a.rect||new b.Rect,h.call(this,a)};var i=d.needsResizeLayout;d.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():i.call(this)};var j=d._getOption;return d._getOption=function(a){return"horizontal"==a?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:j.apply(this.isotope,arguments)},c});\ No newline at end of filediff --git a/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.css b/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.cssdeleted file mode 100644index b6645cee1..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.css+++ /dev/null@@ -1,113 +0,0 @@-/* perfect-scrollbar v0.7.1 */-.ps {- -ms-touch-action: auto;- touch-action: auto;- overflow: hidden !important;- -ms-overflow-style: none; }- @supports (-ms-overflow-style: none) {- .ps {- overflow: auto !important; } }- @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {- .ps {- overflow: auto !important; } }- .ps.ps--active-x > .ps__scrollbar-x-rail,- .ps.ps--active-y > .ps__scrollbar-y-rail {- display: block;- background-color: transparent; }- .ps.ps--in-scrolling.ps--x > .ps__scrollbar-x-rail {- background-color: #eee;- opacity: 0.9; }- .ps.ps--in-scrolling.ps--x > .ps__scrollbar-x-rail > .ps__scrollbar-x {- background-color: #999;- height: 11px; }- .ps.ps--in-scrolling.ps--y > .ps__scrollbar-y-rail {- background-color: #eee;- opacity: 0.9; }- .ps.ps--in-scrolling.ps--y > .ps__scrollbar-y-rail > .ps__scrollbar-y {- background-color: #999;- width: 11px; }- .ps > .ps__scrollbar-x-rail {- display: none;- position: absolute;- /* please don't change 'position' */- opacity: 0;- -webkit-transition: background-color .2s linear, opacity .2s linear;- -moz-transition: background-color .2s linear, opacity .2s linear;- -o-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 > .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;- -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;- -o-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;- 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 > .ps__scrollbar-x-rail:hover > .ps__scrollbar-x, .ps > .ps__scrollbar-x-rail:active > .ps__scrollbar-x {- height: 11px; }- .ps > .ps__scrollbar-y-rail {- display: none;- position: absolute;- /* please don't change 'position' */- opacity: 0;- -webkit-transition: background-color .2s linear, opacity .2s linear;- -moz-transition: background-color .2s linear, opacity .2s linear;- -o-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 > .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;- -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;- -o-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;- 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 > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y, .ps > .ps__scrollbar-y-rail:active > .ps__scrollbar-y {- width: 11px; }- .ps:hover.ps--in-scrolling.ps--x > .ps__scrollbar-x-rail {- background-color: #eee;- opacity: 0.9; }- .ps:hover.ps--in-scrolling.ps--x > .ps__scrollbar-x-rail > .ps__scrollbar-x {- background-color: #999;- height: 11px; }- .ps:hover.ps--in-scrolling.ps--y > .ps__scrollbar-y-rail {- background-color: #eee;- opacity: 0.9; }- .ps:hover.ps--in-scrolling.ps--y > .ps__scrollbar-y-rail > .ps__scrollbar-y {- background-color: #999;- width: 11px; }- .ps:hover > .ps__scrollbar-x-rail,- .ps:hover > .ps__scrollbar-y-rail {- opacity: 0.6; }- .ps:hover > .ps__scrollbar-x-rail:hover {- background-color: #eee;- opacity: 0.9; }- .ps:hover > .ps__scrollbar-x-rail:hover > .ps__scrollbar-x {- background-color: #999; }- .ps:hover > .ps__scrollbar-y-rail:hover {- background-color: #eee;- opacity: 0.9; }- .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y {- background-color: #999; }diff --git a/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.min.css b/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.min.cssdeleted file mode 100644index ce45b6127..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.min.css+++ /dev/null@@ -1,2 +0,0 @@-/* perfect-scrollbar v0.7.1 */-.ps{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps{overflow:auto !important}}.ps.ps--active-x>.ps__scrollbar-x-rail,.ps.ps--active-y>.ps__scrollbar-y-rail{display:block;background-color:transparent}.ps.ps--in-scrolling.ps--x>.ps__scrollbar-x-rail{background-color:#eee;opacity:.9}.ps.ps--in-scrolling.ps--x>.ps__scrollbar-x-rail>.ps__scrollbar-x{background-color:#999;height:11px}.ps.ps--in-scrolling.ps--y>.ps__scrollbar-y-rail{background-color:#eee;opacity:.9}.ps.ps--in-scrolling.ps--y>.ps__scrollbar-y-rail>.ps__scrollbar-y{background-color:#999;width:11px}.ps>.ps__scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps>.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;-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;-o-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;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>.ps__scrollbar-x-rail:hover>.ps__scrollbar-x,.ps>.ps__scrollbar-x-rail:active>.ps__scrollbar-x{height:11px}.ps>.ps__scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps>.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;-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;-o-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;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>.ps__scrollbar-y-rail:hover>.ps__scrollbar-y,.ps>.ps__scrollbar-y-rail:active>.ps__scrollbar-y{width:11px}.ps:hover.ps--in-scrolling.ps--x>.ps__scrollbar-x-rail{background-color:#eee;opacity:.9}.ps:hover.ps--in-scrolling.ps--x>.ps__scrollbar-x-rail>.ps__scrollbar-x{background-color:#999;height:11px}.ps:hover.ps--in-scrolling.ps--y>.ps__scrollbar-y-rail{background-color:#eee;opacity:.9}.ps:hover.ps--in-scrolling.ps--y>.ps__scrollbar-y-rail>.ps__scrollbar-y{background-color:#999;width:11px}.ps:hover>.ps__scrollbar-x-rail,.ps:hover>.ps__scrollbar-y-rail{opacity:.6}.ps:hover>.ps__scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps:hover>.ps__scrollbar-x-rail:hover>.ps__scrollbar-x{background-color:#999}.ps:hover>.ps__scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps:hover>.ps__scrollbar-y-rail:hover>.ps__scrollbar-y{background-color:#999}diff --git a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.js b/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.jsdeleted file mode 100644index fa1f79ad8..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.js+++ /dev/null@@ -1,1580 +0,0 @@-/* perfect-scrollbar v0.7.1 */-(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<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){-'use strict';--var ps = require('../main');-var psInstances = require('../plugin/instances');--function mountJQuery(jQuery) {- jQuery.fn.perfectScrollbar = function (settingOrCommand) {- return this.each(function () {- if (typeof settingOrCommand === 'object' ||- typeof settingOrCommand === 'undefined') {- // If it's an object or none, initialize.- var settings = settingOrCommand;-- if (!psInstances.get(this)) {- ps.initialize(this, settings);- }- } else {- // Unless, it may be a command.- var command = settingOrCommand;-- if (command === 'update') {- ps.update(this);- } else if (command === 'destroy') {- ps.destroy(this);- }- }- });- };-}--if (typeof define === 'function' && define.amd) {- // AMD. Register as an anonymous module.- define(['jquery'], mountJQuery);-} else {- var jq = window.jQuery ? window.jQuery : window.$;- if (typeof jq !== 'undefined') {- mountJQuery(jq);- }-}--module.exports = mountJQuery;--},{"../main":7,"../plugin/instances":18}],2:[function(require,module,exports){-'use strict';--function oldAdd(element, className) {- var classes = element.className.split(' ');- if (classes.indexOf(className) < 0) {- classes.push(className);- }- element.className = classes.join(' ');-}--function oldRemove(element, className) {- var classes = element.className.split(' ');- var idx = classes.indexOf(className);- if (idx >= 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 (Array.isArray(obj)) {- 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'));-};--function toggleScrolling(handler) {- return function (element, axis) {- handler(element, 'ps--in-scrolling');- if (typeof axis !== 'undefined') {- handler(element, 'ps--' + axis);- } else {- handler(element, 'ps--x');- handler(element, 'ps--y');- }- };-}--exports.startScrolling = toggleScrolling(cls.add);--exports.stopScrolling = toggleScrolling(cls.remove);--exports.env = {- isWebKit: typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style,- supportsTouch: typeof window !== 'undefined' && (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),- supportsIePointer: typeof window !== 'undefined' && 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,- swipeEasing: 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) {- var style = window.getComputedStyle(child);- var overflow = [- style.overflow,- style.overflowX,- style.overflowY- ].join('');-- if (!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;-- if (i.settings.swipeEasing) {- 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);- } else 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');-- // 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 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 (i.lastTop === undefined) {- i.lastTop = element.scrollTop;- }-- if (i.lastLeft === undefined) {- i.lastLeft = element.scrollLeft;- }-- if (axis === 'top' && value < i.lastTop) {- element.dispatchEvent(createDOMEvent('ps-scroll-up'));- }-- if (axis === 'top' && value > i.lastTop) {- element.dispatchEvent(createDOMEvent('ps-scroll-down'));- }-- if (axis === 'left' && value < i.lastLeft) {- element.dispatchEvent(createDOMEvent('ps-scroll-left'));- }-- if (axis === 'left' && value > i.lastLeft) {- element.dispatchEvent(createDOMEvent('ps-scroll-right'));- }-- if (axis === 'top' && value !== i.lastTop) {- element.scrollTop = i.lastTop = value;- element.dispatchEvent(createDOMEvent('ps-scroll-y'));- }-- if (axis === 'left' && value !== i.lastLeft) {- element.scrollLeft = i.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/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.min.js b/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.min.jsdeleted file mode 100644index e117eed75..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jquery.min.js+++ /dev/null@@ -1,2 +0,0 @@-/* perfect-scrollbar v0.7.1 */-!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<r.length;i++)o(r[i]);return o}({1:[function(t,e,n){"use strict";function r(t){t.fn.perfectScrollbar=function(t){return this.each(function(){if("object"==typeof t||"undefined"==typeof t){var e=t;l.get(this)||o.initialize(this,e)}else{var n=t;"update"===n?o.update(this):"destroy"===n&&o.destroy(this)}})}}var o=t("../main"),l=t("../plugin/instances");if("function"==typeof define&&define.amd)define(["jquery"],r);else{var i=window.jQuery?window.jQuery:window.$;"undefined"!=typeof i&&r(i)}e.exports=r},{"../main":7,"../plugin/instances":18}],2:[function(t,e,n){"use strict";function r(t,e){var n=t.className.split(" ");n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")}function o(t,e){var n=t.className.split(" "),r=n.indexOf(e);r>=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?!0:(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;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],5:[function(t,e,n){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,n){"use strict";function r(t){return function(e,n){t(e,"ps--in-scrolling"),"undefined"!=typeof n?t(e,"ps--"+n):(t(e,"ps--x"),t(e,"ps--y"))}}var o=t("./class"),l=t("./dom"),i=n.toInt=function(t){return parseInt(t,10)||0},s=n.clone=function(t){if(t){if(Array.isArray(t))return t.map(s);if("object"==typeof t){var e={};for(var n in t)e[n]=s(t[n]);return e}return t}return null};n.extend=function(t,e){var n=s(t);for(var r in e)n[r]=s(e[r]);return n},n.isEditable=function(t){return l.matches(t,"input,[contenteditable]")||l.matches(t,"select,[contenteditable]")||l.matches(t,"textarea,[contenteditable]")||l.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=o.list(t),n=0;n<e.length;n++){var r=e[n];0===r.indexOf("ps-")&&o.remove(t,r)}},n.outerWidth=function(t){return i(l.css(t,"width"))+i(l.css(t,"paddingLeft"))+i(l.css(t,"paddingRight"))+i(l.css(t,"borderLeftWidth"))+i(l.css(t,"borderRightWidth"))},n.startScrolling=r(o.add),n.stopScrolling=r(o.remove),n.env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof window&&null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),l=t("./plugin/update");e.exports={initialize:o,update:l,destroy:r}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(t,e,n){"use strict";e.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],9:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances");e.exports=function(t){var e=l.get(t);e&&(e.event.unbindAll(),o.remove(e.scrollbarX),o.remove(e.scrollbarY),o.remove(e.scrollbarXRail),o.remove(e.scrollbarYRail),r.removePsClasses(t),l.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,n){"use strict";function r(t,e){function n(t){return t.getBoundingClientRect()}var r=function(t){t.stopPropagation()};e.event.bind(e.scrollbarY,"click",r),e.event.bind(e.scrollbarYRail,"click",function(r){var o=r.pageY-window.pageYOffset-n(e.scrollbarYRail).top,s=o>e.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);0>o?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);0>o?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&&0>r)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&0>n||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&&0>r)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&0>n||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){var o=window.getComputedStyle(r),l=[o.overflow,o.overflowX,o.overflowY].join("");if(!l.match(/(scroll|auto)/))return!1;var i=r.scrollHeight-r.clientHeight;if(i>0&&!(0===r.scrollTop&&n>0||r.scrollTop===i&&0>n))return!0;var s=r.scrollLeft-r.clientWidth;if(s>0&&!(0===r.scrollLeft&&0>e||r.scrollLeft===s&&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.x<l.left+3?(u.left=-5,o.startScrolling(t,"x")):n.x>l.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.y<l.top+3?(l.top+3-n.y<5?u.top=-5:u.top=-20,o.startScrolling(t,"y")):n.y>l.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(0>r&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(i>s&&(0>n&&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?!0:!(!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,e.settings.swipeEasing&&(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");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.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=r(e,l.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=l.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=r(e,l.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=l.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=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=t("./instances"),o=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&&0>=n&&(t.scrollTop=n=0,t.dispatchEvent(o("ps-y-reach-start"))),"left"===e&&0>=n&&(t.scrollLeft=n=0,t.dispatchEvent(o("ps-x-reach-start")));var l=r.get(t);"top"===e&&n>=l.contentHeight-l.containerHeight&&(n=l.contentHeight-l.containerHeight,n-t.scrollTop<=1?n=t.scrollTop:t.scrollTop=n,t.dispatchEvent(o("ps-y-reach-end"))),"left"===e&&n>=l.contentWidth-l.containerWidth&&(n=l.contentWidth-l.containerWidth,n-t.scrollLeft<=1?n=t.scrollLeft:t.scrollLeft=n,t.dispatchEvent(o("ps-x-reach-end"))),void 0===l.lastTop&&(l.lastTop=t.scrollTop),void 0===l.lastLeft&&(l.lastLeft=t.scrollLeft),"top"===e&&n<l.lastTop&&t.dispatchEvent(o("ps-scroll-up")),"top"===e&&n>l.lastTop&&t.dispatchEvent(o("ps-scroll-down")),"left"===e&&n<l.lastLeft&&t.dispatchEvent(o("ps-scroll-left")),"left"===e&&n>l.lastLeft&&t.dispatchEvent(o("ps-scroll-right")),"top"===e&&n!==l.lastTop&&(t.scrollTop=l.lastTop=n,t.dispatchEvent(o("ps-scroll-y"))),"left"===e&&n!==l.lastLeft&&(t.scrollLeft=l.lastLeft=n,t.dispatchEvent(o("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 filediff --git a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.js b/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.jsdeleted file mode 100644index 00d3bdba4..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.js+++ /dev/null@@ -1,1553 +0,0 @@-/* perfect-scrollbar v0.7.1 */-(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<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){-'use strict';--var ps = require('../main');--if (typeof define === 'function' && define.amd) {- // AMD- define(ps);-} else {- // Add to a global object.- window.PerfectScrollbar = ps;- if (typeof window.Ps === 'undefined') {- window.Ps = ps;- }-}--},{"../main":7}],2:[function(require,module,exports){-'use strict';--function oldAdd(element, className) {- var classes = element.className.split(' ');- if (classes.indexOf(className) < 0) {- classes.push(className);- }- element.className = classes.join(' ');-}--function oldRemove(element, className) {- var classes = element.className.split(' ');- var idx = classes.indexOf(className);- if (idx >= 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 (Array.isArray(obj)) {- 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'));-};--function toggleScrolling(handler) {- return function (element, axis) {- handler(element, 'ps--in-scrolling');- if (typeof axis !== 'undefined') {- handler(element, 'ps--' + axis);- } else {- handler(element, 'ps--x');- handler(element, 'ps--y');- }- };-}--exports.startScrolling = toggleScrolling(cls.add);--exports.stopScrolling = toggleScrolling(cls.remove);--exports.env = {- isWebKit: typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style,- supportsTouch: typeof window !== 'undefined' && (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch),- supportsIePointer: typeof window !== 'undefined' && 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,- swipeEasing: 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) {- var style = window.getComputedStyle(child);- var overflow = [- style.overflow,- style.overflowX,- style.overflowY- ].join('');-- if (!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;-- if (i.settings.swipeEasing) {- 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);- } else 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');-- // 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 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 (i.lastTop === undefined) {- i.lastTop = element.scrollTop;- }-- if (i.lastLeft === undefined) {- i.lastLeft = element.scrollLeft;- }-- if (axis === 'top' && value < i.lastTop) {- element.dispatchEvent(createDOMEvent('ps-scroll-up'));- }-- if (axis === 'top' && value > i.lastTop) {- element.dispatchEvent(createDOMEvent('ps-scroll-down'));- }-- if (axis === 'left' && value < i.lastLeft) {- element.dispatchEvent(createDOMEvent('ps-scroll-left'));- }-- if (axis === 'left' && value > i.lastLeft) {- element.dispatchEvent(createDOMEvent('ps-scroll-right'));- }-- if (axis === 'top' && value !== i.lastTop) {- element.scrollTop = i.lastTop = value;- element.dispatchEvent(createDOMEvent('ps-scroll-y'));- }-- if (axis === 'left' && value !== i.lastLeft) {- element.scrollLeft = i.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/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.min.js b/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.min.jsdeleted file mode 100644index aebee5169..000000000--- a/web/ext/node_modules/perfect-scrollbar/dist/js/perfect-scrollbar.min.js+++ /dev/null@@ -1,2 +0,0 @@-/* perfect-scrollbar v0.7.1 */-!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<r.length;i++)o(r[i]);return o}({1:[function(t,e,n){"use strict";var r=t("../main");"function"==typeof define&&define.amd?define(r):(window.PerfectScrollbar=r,"undefined"==typeof window.Ps&&(window.Ps=r))},{"../main":7}],2:[function(t,e,n){"use strict";function r(t,e){var n=t.className.split(" ");n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")}function o(t,e){var n=t.className.split(" "),r=n.indexOf(e);r>=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?!0:(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;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],5:[function(t,e,n){"use strict";e.exports=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}}()},{}],6:[function(t,e,n){"use strict";function r(t){return function(e,n){t(e,"ps--in-scrolling"),"undefined"!=typeof n?t(e,"ps--"+n):(t(e,"ps--x"),t(e,"ps--y"))}}var o=t("./class"),l=t("./dom"),i=n.toInt=function(t){return parseInt(t,10)||0},s=n.clone=function(t){if(t){if(Array.isArray(t))return t.map(s);if("object"==typeof t){var e={};for(var n in t)e[n]=s(t[n]);return e}return t}return null};n.extend=function(t,e){var n=s(t);for(var r in e)n[r]=s(e[r]);return n},n.isEditable=function(t){return l.matches(t,"input,[contenteditable]")||l.matches(t,"select,[contenteditable]")||l.matches(t,"textarea,[contenteditable]")||l.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=o.list(t),n=0;n<e.length;n++){var r=e[n];0===r.indexOf("ps-")&&o.remove(t,r)}},n.outerWidth=function(t){return i(l.css(t,"width"))+i(l.css(t,"paddingLeft"))+i(l.css(t,"paddingRight"))+i(l.css(t,"borderLeftWidth"))+i(l.css(t,"borderRightWidth"))},n.startScrolling=r(o.add),n.stopScrolling=r(o.remove),n.env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof window&&null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),l=t("./plugin/update");e.exports={initialize:o,update:l,destroy:r}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":21}],8:[function(t,e,n){"use strict";e.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],9:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances");e.exports=function(t){var e=l.get(t);e&&(e.event.unbindAll(),o.remove(e.scrollbarX),o.remove(e.scrollbarY),o.remove(e.scrollbarXRail),o.remove(e.scrollbarYRail),r.removePsClasses(t),l.remove(t))}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(t,e,n){"use strict";function r(t,e){function n(t){return t.getBoundingClientRect()}var r=function(t){t.stopPropagation()};e.event.bind(e.scrollbarY,"click",r),e.event.bind(e.scrollbarYRail,"click",function(r){var o=r.pageY-window.pageYOffset-n(e.scrollbarYRail).top,s=o>e.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);0>o?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);0>o?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&&0>r)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&0>n||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&&0>r)return!e.settings.wheelPropagation}var l=t.scrollLeft;if(0===r){if(!e.scrollbarXActive)return!1;if(0===l&&0>n||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){var o=window.getComputedStyle(r),l=[o.overflow,o.overflowX,o.overflowY].join("");if(!l.match(/(scroll|auto)/))return!1;var i=r.scrollHeight-r.clientHeight;if(i>0&&!(0===r.scrollTop&&n>0||r.scrollTop===i&&0>n))return!0;var s=r.scrollLeft-r.clientWidth;if(s>0&&!(0===r.scrollLeft&&0>e||r.scrollLeft===s&&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.x<l.left+3?(u.left=-5,o.startScrolling(t,"x")):n.x>l.right-3?(u.left=5,o.startScrolling(t,"x")):u.left=0,n.y<l.top+3?(l.top+3-n.y<5?u.top=-5:u.top=-20,o.startScrolling(t,"y")):n.y>l.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(0>r&&o===e.contentHeight-e.containerHeight||r>0&&0===o)return!e.settings.swipePropagation}else if(i>s&&(0>n&&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?!0:!(!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,e.settings.swipeEasing&&(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");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.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=r(e,l.toInt(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=l.toInt((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=r(e,l.toInt(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=l.toInt(t.scrollTop*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=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=t("./instances"),o=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&&0>=n&&(t.scrollTop=n=0,t.dispatchEvent(o("ps-y-reach-start"))),"left"===e&&0>=n&&(t.scrollLeft=n=0,t.dispatchEvent(o("ps-x-reach-start")));var l=r.get(t);"top"===e&&n>=l.contentHeight-l.containerHeight&&(n=l.contentHeight-l.containerHeight,n-t.scrollTop<=1?n=t.scrollTop:t.scrollTop=n,t.dispatchEvent(o("ps-y-reach-end"))),"left"===e&&n>=l.contentWidth-l.containerWidth&&(n=l.contentWidth-l.containerWidth,n-t.scrollLeft<=1?n=t.scrollLeft:t.scrollLeft=n,t.dispatchEvent(o("ps-x-reach-end"))),void 0===l.lastTop&&(l.lastTop=t.scrollTop),void 0===l.lastLeft&&(l.lastLeft=t.scrollLeft),"top"===e&&n<l.lastTop&&t.dispatchEvent(o("ps-scroll-up")),"top"===e&&n>l.lastTop&&t.dispatchEvent(o("ps-scroll-down")),"left"===e&&n<l.lastLeft&&t.dispatchEvent(o("ps-scroll-left")),"left"===e&&n>l.lastLeft&&t.dispatchEvent(o("ps-scroll-right")),"top"===e&&n!==l.lastTop&&(t.scrollTop=l.lastTop=n,t.dispatchEvent(o("ps-scroll-y"))),"left"===e&&n!==l.lastLeft&&(t.scrollLeft=l.lastLeft=n,t.dispatchEvent(o("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 filediff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.jsindex f67bcdab0..33dc8385e 100644--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@ -215,7 +215,7 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {}};- var drawDefaultPage = function( e ) {+ var drawDefaultPage = function() {removeSearch();drawModal();redoScrollbar();@@ -863,7 +863,7 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {var $closeButton = $('<div />', {'id': 'layers-modal-close'- }).click( function( e ) {+ }).click( function() {$( self.selector ).dialog( "close" );}).append('<i></i>');diff --git a/web/js/layers/wv.layers.search.js b/web/js/layers/wv.layers.search.jsdeleted file mode 100644index aef06e5d3..000000000--- a/web/js/layers/wv.layers.search.js+++ /dev/null@@ -1,121 +0,0 @@-/*- * NASA Worldview- *- * This code was originally developed at NASA/Goddard Space Flight Center for- * the Earth Science Data and Information System (ESDIS) project.- *- * Copyright (C) 2013-2017 United States Government as represented by the- * Administrator of the National Aeronautics and Space Administration.- * All Rights Reserved.- */--/**- * @module wv.layers- */-var wv = wv || {};-wv.layers = wv.layers || {};--/**- * @class wv.layers.search- */-wv.layers.search = wv.layers.search || function(models, ui, config) {-- var init = function(){-- };-- var filterAreaOfInterest = function(layerId) {- if ( !config.aoi ) {- return false;- }- var aoi = $(self.selector + "select").val();- if ( aoi === "All" ) {- return false;- }- return $.inArray(layerId, config.aoi[aoi].baselayers) < 0 &&- $.inArray(layerId, config.aoi[aoi].overlays) < 0;- };-- //Similar name to another var above- var filterProjections = function(layer) {- return !layer.projections[models.proj.selected.id];- };-- var filterSearch = function(layer, terms) {- var search = $(self.selector + "search").val();- if ( search === "" ) {- return false;- }- var filtered = false;- var names = models.layers.getTitles(layer.id);- $.each(terms, function(index, term) {- filtered = !names.title.toLowerCase().contains(term) &&- !names.subtitle.toLowerCase().contains(term) &&- !names.tags.toLowerCase().contains(term) &&- !config.layers[layer.id].id.toLowerCase().contains(term);-- if ( filtered ) {- return false;- }- });- return filtered;- };-- var runSearch = _.throttle( function() {- var search = searchTerms();-- $.each(config.layers, function(layerId, layer) {-- var fproj = filterProjections(layer);- var fterms = filterSearch(layer, search);-- var filtered = fproj || fterms;-- visible[layer.id] = !filtered;-- var display = filtered ? "none": "block";- var selector = "#flat-layer-list li[data-layer='" +- wv.util.jqueryEscape(layerId) + "']";- $(selector).css("display", display);- });-- redoScrollbar();- }, 250, { trailing: true });-- var filter = function( e ) {-- if( $( '#layers-search-input' ).val().length !== 0 ) {- searchBool = true;- }- else{- searchBool = false;-- if (models.proj.selected.id === 'geographic' && config.categories){- $allLayers.hide();- $categories.show().isotope();- $nav.show();- }- else{- drawAllLayers();- }- removeSearch();- }- // Ran on every keystroke in search- if( searchBool ) {- if( ( $allLayers.css('display') === 'none' ) ||- ( $breadcrumb.css('display') === 'none') ) {- drawAllLayers();- }- runSearch();- }- //Opening state for non-geographic projections- else if( ( searchBool === false ) &&- ( models.proj.selected.id !== 'geographic' ) ) {- runSearch();- }- };--- init();- return self;-};