materialize-sass 1.0.0.alpha1 → 1.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/materialize-sprockets.js +1 -1
  3. data/assets/javascripts/materialize.js +1162 -1218
  4. data/assets/javascripts/materialize/anime.min.js +417 -0
  5. data/assets/javascripts/materialize/buttons.js +49 -26
  6. data/assets/javascripts/materialize/cards.js +14 -8
  7. data/assets/javascripts/materialize/cash.js +3 -5
  8. data/assets/javascripts/materialize/chips.js +22 -19
  9. data/assets/javascripts/materialize/collapsible.js +53 -17
  10. data/assets/javascripts/materialize/datepicker.js +94 -78
  11. data/assets/javascripts/materialize/dropdown.js +33 -26
  12. data/assets/javascripts/materialize/extras/nouislider.js +1 -1
  13. data/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
  14. data/assets/javascripts/materialize/forms.js +17 -6
  15. data/assets/javascripts/materialize/global.js +17 -15
  16. data/assets/javascripts/materialize/materialbox.js +62 -35
  17. data/assets/javascripts/materialize/modal.js +50 -19
  18. data/assets/javascripts/materialize/range.js +40 -16
  19. data/assets/javascripts/materialize/scrollspy.js +9 -3
  20. data/assets/javascripts/materialize/select.js +62 -38
  21. data/assets/javascripts/materialize/sidenav.js +52 -18
  22. data/assets/javascripts/materialize/slider.js +56 -16
  23. data/assets/javascripts/materialize/tabs.js +35 -23
  24. data/assets/javascripts/materialize/timepicker.js +581 -579
  25. data/assets/javascripts/materialize/toasts.js +11 -7
  26. data/assets/javascripts/materialize/tooltip.js +16 -18
  27. data/assets/stylesheets/materialize.scss +3 -3
  28. data/assets/stylesheets/materialize/components/_buttons.scss +2 -2
  29. data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
  30. data/assets/stylesheets/materialize/components/{_color.scss → _color-variables.scss} +0 -42
  31. data/assets/stylesheets/materialize/components/_datepicker.scss +10 -4
  32. data/assets/stylesheets/materialize/components/_dropdown.scss +5 -0
  33. data/assets/stylesheets/materialize/components/_navbar.scss +3 -3
  34. data/assets/stylesheets/materialize/components/_pulse.scss +1 -1
  35. data/assets/stylesheets/materialize/components/_timepicker.scss +1 -0
  36. data/assets/stylesheets/materialize/components/_variables.scss +0 -1
  37. data/assets/stylesheets/materialize/components/forms/_input-fields.scss +6 -4
  38. data/assets/stylesheets/materialize/components/forms/_range.scss +3 -3
  39. data/assets/stylesheets/materialize/components/forms/_select.scss +7 -7
  40. data/assets/stylesheets/materialize/extras/nouislider.css +1 -1
  41. data/lib/materialize-sass/engine.rb +2 -0
  42. data/lib/materialize-sass/helpers.rb +38 -0
  43. data/lib/materialize-sass/version.rb +1 -1
  44. metadata +6 -5
  45. data/assets/javascripts/materialize/velocity.min.js +0 -782
  46. data/assets/stylesheets/materialize/components/_mixins.scss +0 -5
@@ -2,7 +2,7 @@ var _createClass = function () { function defineProperties(target, props) { for
2
2
 
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
 
5
- (function ($, Vel) {
5
+ (function ($, anim) {
6
6
  'use strict';
7
7
 
8
8
  var _defaults = {
@@ -57,7 +57,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
57
57
  */
58
58
  this.isOpen = false;
59
59
 
60
- this.focusedIndex = null;
60
+ this.focusedIndex = -1;
61
61
  this.filterQuery = [];
62
62
 
63
63
  // Move dropdown-content after dropdown-trigger
@@ -289,7 +289,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
289
289
  }, {
290
290
  key: '_focusFocusedItem',
291
291
  value: function _focusFocusedItem() {
292
- this.dropdownEl.children[this.focusedIndex].focus();
292
+ if (this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length) {
293
+ this.dropdownEl.children[this.focusedIndex].focus();
294
+ }
293
295
  }
294
296
  }, {
295
297
  key: '_getDropdownPosition',
@@ -382,19 +384,24 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
382
384
  this.dropdownEl.style.width = positionInfo.width + 'px';
383
385
  this.dropdownEl.style.transformOrigin = (positionInfo.horizontalAlignment === 'left' ? '0' : '100%') + ' ' + (positionInfo.verticalAlignment === 'top' ? '0' : '100%');
384
386
 
385
- Vel(this.dropdownEl, {
386
- opacity: [1, 'easeOutQuad'],
387
- scaleX: [1, .3],
388
- scaleY: [1, .3] }, {
387
+ anim.remove(this.dropdownEl);
388
+ anim({
389
+ targets: this.dropdownEl,
390
+ opacity: {
391
+ value: [0, 1],
392
+ easing: 'easeOutQuad'
393
+ },
394
+ scaleX: [.3, 1],
395
+ scaleY: [.3, 1],
389
396
  duration: this.options.inDuration,
390
- queue: false,
391
397
  easing: 'easeOutQuint',
392
- complete: function () {
393
- _this2._focusFocusedItem();
398
+ complete: function (anim) {
399
+ _this2.dropdownEl.focus();
394
400
 
395
401
  // onOpenEnd callback
396
402
  if (typeof _this2.options.onOpenEnd === 'function') {
397
- _this2.options.onOpenEnd.call(_this2, _this2.el);
403
+ var elem = anim.animatables[0].target;
404
+ _this2.options.onOpenEnd.call(elem, _this2.el);
398
405
  }
399
406
  }
400
407
  });
@@ -409,18 +416,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
409
416
  value: function _animateOut() {
410
417
  var _this3 = this;
411
418
 
412
- Vel(this.dropdownEl, {
413
- opacity: [0, 'easeOutQuint'],
414
- scaleX: [.3, 1],
415
- scaleY: [.3, 1] }, {
419
+ anim.remove(this.dropdownEl);
420
+ anim({
421
+ targets: this.dropdownEl,
422
+ opacity: {
423
+ value: 0,
424
+ easing: 'easeOutQuint'
425
+ },
426
+ scaleX: .3,
427
+ scaleY: .3,
416
428
  duration: this.options.outDuration,
417
- queue: false,
418
429
  easing: 'easeOutQuint',
419
- complete: function () {
430
+ complete: function (anim) {
420
431
  _this3._resetDropdownStyles();
421
432
 
422
433
  // onCloseEnd callback
423
434
  if (typeof _this3.options.onCloseEnd === 'function') {
435
+ var elem = anim.animatables[0].target;
424
436
  _this3.options.onCloseEnd.call(_this3, _this3.el);
425
437
  }
426
438
  }
@@ -439,20 +451,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
439
451
  }
440
452
  this.isOpen = true;
441
453
 
442
- // Highlight focused item
443
- if (this.focusedIndex === null) {
444
- this.focusedIndex = 0;
445
- }
446
-
447
454
  // onOpenStart callback
448
455
  if (typeof this.options.onOpenStart === 'function') {
449
456
  this.options.onOpenStart.call(this, this.el);
450
457
  }
451
458
 
452
- // Stop any previous animation
453
- Vel(this.dropdownEl, 'stop');
459
+ // Reset styles
454
460
  this._resetDropdownStyles();
455
- Vel.hook(this.dropdownEl, 'display', 'block');
461
+ this.dropdownEl.style.display = 'block';
456
462
 
457
463
  // Set width before calculating positionInfo
458
464
  var idealWidth = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
@@ -474,6 +480,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
474
480
  return;
475
481
  }
476
482
  this.isOpen = false;
483
+ this.focusedIndex = -1;
477
484
 
478
485
  // onCloseStart callback
479
486
  if (typeof this.options.onCloseStart === 'function') {
@@ -527,4 +534,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
527
534
  if (M.jQueryLoaded) {
528
535
  M.initializeJqueryWrapper(Dropdown, 'dropdown', 'M_Dropdown');
529
536
  }
530
- })(cash, M.Vel);
537
+ })(cash, M.anime);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v1.0.0-alpha.1 (http://materializecss.com)
2
+ * Materialize v1.0.0-alpha.2 (http://materializecss.com)
3
3
  * Copyright 2014-2015 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
5
5
  */
@@ -1 +1 @@
1
- !function(){function t(t){return t.split("").reverse().join("")}function e(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(e,n,r,i,o,s,a,u,l,c,f,p){a=p;var d,h=f="";return s&&(p=s(p)),!("number"!=typeof p||!isFinite(p))&&(e&&0===parseFloat(p.toFixed(e))&&(p=0),0>p&&(d=!0,p=Math.abs(p)),e&&(s=Math.pow(10,e),p=(Math.round(p*s)/s).toFixed(e)),-1!==(p=p.toString()).indexOf(".")&&(e=p.split("."),p=e[0],r&&(f=r+e[1])),n&&(p=t(p).match(/.{1,3}/g),p=t(p.join(t(n)))),d&&u&&(h+=u),i&&(h+=i),d&&l&&(h+=l),h=h+p+f,o&&(h+=o),c&&(h=c(h,a)),h)}function r(t,e,n,r,i,o,s,a,u,l,c,f){var p;return t="",c&&(f=c(f)),!(!f||"string"!=typeof f)&&(a&&f.substring(0,a.length)===a&&(f=f.replace(a,""),p=!0),r&&f.substring(0,r.length)===r&&(f=f.replace(r,"")),u&&f.substring(0,u.length)===u&&(f=f.replace(u,""),p=!0),i&&f.slice(-1*i.length)===i&&(f=f.slice(0,-1*i.length)),e&&(f=f.split(e).join("")),n&&(f=f.replace(n,".")),p&&(t+="-"),t=Number((t+f).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t){var n,r,i,o={};for(n=0;n<a.length;n+=1)r=a[n],void 0===(i=t[r])?o[r]="negative"!==r||o.negativeBefore?"mark"===r&&"."!==o.thousand&&".":"-":"decimals"===r?0<i&&8>i&&(o[r]=i):"encoder"===r||"decoder"===r||"edit"===r||"undo"===r?"function"==typeof i&&(o[r]=i):"string"==typeof i&&(o[r]=i);return e(o,"mark","thousand"),e(o,"prefix","negative"),e(o,"prefix","negativeBefore"),o}function o(t,e,n){var r,i=[];for(r=0;r<a.length;r+=1)i.push(t[a[r]]);return i.push(n),e.apply("",i)}function s(t){if(!(this instanceof s))return new s(t);"object"==typeof t&&(t=i(t),this.to=function(e){return o(t,n,e)},this.from=function(e){return o(t,r,e)})}var a="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=s}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t,e){var n=document.createElement("div");return l(n,e),t.appendChild(n),n}function e(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function n(t,e){return Math.round(t/e)*e}function r(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument.documentElement,i=p();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0),e?n.top+i.y-r.clientTop:n.left+i.x-r.clientLeft}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){n>0&&(l(t,e),setTimeout(function(){c(t,e)},n))}function s(t){return Math.max(Math.min(t,100),0)}function a(t){return Array.isArray(t)?t:[t]}function u(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function l(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function c(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function f(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function p(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function d(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function h(t,e){return 100/(e-t)}function m(t,e){return 100*e/(t[1]-t[0])}function g(t,e){return m(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function v(t,e){return e*(t[1]-t[0])/100+t[0]}function b(t,e){for(var n=1;t>=e[n];)n+=1;return n}function w(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=b(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+g([r,i],n)/h(o,s)}function S(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=b(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],v([r,i],(n-o)*h(o,s))}function x(t,e,r,i){if(100===i)return i;var o,s,a=b(i,t);return r?(o=t[a-1],s=t[a],i-o>(s-o)/2?s:o):e[a-1]?t[a-1]+n(i-t[a-1],e[a-1]):i}function y(t,e,n){var r;if("number"==typeof e&&(e=[e]),"[object Array]"!==Object.prototype.toString.call(e))throw new Error("noUiSlider: 'range' contains invalid value.");if(r="min"===t?0:"max"===t?100:parseFloat(t),!i(r)||!i(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");n.xPct.push(r),n.xVal.push(e[0]),r?n.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(n.xSteps[0]=e[1]),n.xHighestCompleteStep.push(0)}function E(t,e,n){if(!e)return!0;n.xSteps[t]=m([n.xVal[t],n.xVal[t+1]],e)/h(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function C(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i<o.length;i++)y(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)E(i,this.xNumSteps[i],this)}function N(t,e){if(!i(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function U(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new C(e,t.snap,t.dir,t.singleStep)}function M(t,e){if(e=a(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function P(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function k(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function O(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function V(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=e}t.connect=r}function A(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function L(t,e){if(!i(e))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function F(t,e){if(!i(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function j(t,e){if(!i(e))throw new Error("noUiSlider: 'padding' option must be numeric.");if(0!==e){if(t.padding=t.spectrum.getMargin(e),!t.padding)throw new Error("noUiSlider: 'padding' option is only supported on linear sliders.");if(t.padding<0)throw new Error("noUiSlider: 'padding' option must be a positive number.");if(t.padding>=50)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function z(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function H(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");L(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function D(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(!0)}else{if(t.tooltips=a(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function T(t,e){if(t.format=e,"function"==typeof e.to&&"function"==typeof e.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function q(t,e){if(void 0!==e&&"string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function R(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix){t.cssClasses={};for(var n in e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n])}else t.cssClasses=e}function B(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function X(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,format:I},n={step:{r:!1,t:N},start:{r:!0,t:M},connect:{r:!0,t:V},direction:{r:!0,t:z},snap:{r:!1,t:P},animate:{r:!1,t:k},animationDuration:{r:!1,t:O},range:{r:!0,t:U},orientation:{r:!1,t:A},margin:{r:!1,t:L},limit:{r:!1,t:F},padding:{r:!1,t:j},behaviour:{r:!0,t:H},format:{r:!1,t:T},tooltips:{r:!1,t:D},cssPrefix:{r:!1,t:q},cssClasses:{r:!1,t:R},useRequestAnimationFrame:{r:!1,t:B}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleTouchArea:"handle-touch-area",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};Object.keys(n).forEach(function(i){if(void 0===t[i]&&void 0===r[i]){if(n[i].r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}n[i].t(e,void 0===t[i]?r[i]:t[i])}),e.pips=t.pips;var i=[["left","top"],["right","bottom"]];return e.style=i[e.dir][e.ort],e.styleOposite=i[e.dir?0:1][e.ort],e}function Y(n,i,u){function h(e,n){var r=t(e,i.cssClasses.origin),o=t(r,i.cssClasses.handle);return t(o,i.cssClasses.handleTouchArea),o.setAttribute("data-handle",n),0===n?l(o,i.cssClasses.handleLower):n===i.handles-1&&l(o,i.cssClasses.handleUpper),r}function m(e,n){return!!n&&t(e,i.cssClasses.connect)}function g(e,n){return!!i.tooltips[n]&&t(e.firstChild,i.cssClasses.tooltip)}function v(t,e,n){if("range"===t||"steps"===t)return tt.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return tt.fromStepping(n?tt.getStep(t):t)}):"values"===t?n?e.map(function(t){return tt.fromStepping(tt.getStep(tt.toStepping(t)))}):e:void 0}function b(t,n,r){function i(t,e){return(t+e).toFixed(7)/1}var o={},s=tt.xVal[0],a=tt.xVal[tt.xVal.length-1],u=!1,l=!1,c=0;return(r=e(r.slice().sort(function(t,e){return t-e})))[0]!==s&&(r.unshift(s),u=!0),r[r.length-1]!==a&&(r.push(a),l=!0),r.forEach(function(e,s){var a,f,p,d,h,m,g,v,b,w=e,S=r[s+1];if("steps"===n&&(a=tt.xNumSteps[s]),a||(a=S-w),!1!==w&&void 0!==S)for(a=Math.max(a,1e-7),f=w;f<=S;f=i(f,a)){for(g=(h=(d=tt.toStepping(f))-c)/t,b=h/(v=Math.round(g)),p=1;p<=v;p+=1)o[(c+p*b).toFixed(5)]=["x",0];m=r.indexOf(f)>-1?1:"steps"===n?2:0,!s&&u&&(m=0),f===S&&l||(o[d.toFixed(5)]=[f,m]),c=d}}),o}function w(t,e,n){function r(t,e){var n=e===i.cssClasses.value,r=n?p:d,o=n?c:f;return e+" "+r[i.ort]+" "+o[t]}function o(t,e,n){return'class="'+r(n[1],e)+'" style="'+i.style+": "+t+'%"'}function s(t,r){r[1]=r[1]&&e?e(r[0],r[1]):r[1],u+="<div "+o(t,i.cssClasses.marker,r)+"></div>",r[1]&&(u+="<div "+o(t,i.cssClasses.value,r)+">"+n.to(r[0])+"</div>")}var a=document.createElement("div"),u="",c=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],f=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],p=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],d=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return l(a,i.cssClasses.pips),l(a,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){s(e,t[e])}),a.innerHTML=u,a}function S(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=b(n,e,v(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return J.appendChild(w(i,r,o))}function x(){var t=I.getBoundingClientRect(),e="offset"+["Width","Height"][i.ort];return 0===i.ort?t.width||I[e]:t.height||I[e]}function y(t,e,n,r){var o=function(e){return!J.hasAttribute("disabled")&&(!f(J,i.cssClasses.tap)&&(!!(e=E(e,r.pageOffset))&&(!(t===G.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[i.ort],void n(e,r))))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!1),s.push([t,o])}),s}function E(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");if(0===t.type.indexOf("MSPointer")&&(s=!0),i){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}return e=e||p(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y),t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}function C(t){var e=100*(t-r(I,i.ort))/x();return i.dir?100-e:e}function N(t){var e=100,n=!1;return _.forEach(function(r,i){if(!r.hasAttribute("disabled")){var o=Math.abs(K[i]-t);o<e&&(n=i,e=o)}}),n}function U(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=F(i,t,i[t]+e,o[n],s[n]);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=D(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){M("update",t),M("slide",t)})}function M(t,e,n){Object.keys(nt).forEach(function(r){var o=r.split(".")[0];t===o&&nt[r].forEach(function(t){t.call($,et.map(i.format.to),e,et.slice(),n||!1,K.slice())})})}function P(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&O(t,e)}function k(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return O(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint);U(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function O(t,e){Z&&(c(Z,i.cssClasses.active),Z=!1),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener)),document.documentElement.noUiListeners.forEach(function(t){document.documentElement.removeEventListener(t[0],t[1])}),c(J,i.cssClasses.drag),H(),e.handleNumbers.forEach(function(t){M("set",t),M("change",t),M("end",t)})}function V(t,e){if(1===e.handleNumbers.length){var n=_[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;l(Z=n.children[0],i.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=y(G.move,document.documentElement,k,{startCalcPoint:t.calcPoint,baseSize:x(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:K.slice()}),o=y(G.end,document.documentElement,O,{handleNumbers:e.handleNumbers}),s=y("mouseout",document.documentElement,P,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(o,s),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,_.length>1&&l(J,i.cssClasses.drag);var a=function(){return!1};document.body.noUiListener=a,document.body.addEventListener("selectstart",a,!1)}e.handleNumbers.forEach(function(t){M("start",t)})}function A(t){t.stopPropagation();var e=C(t.calcPoint),n=N(e);if(!1===n)return!1;i.events.snap||o(J,i.cssClasses.tap,i.animationDuration),D(n,e,!0,!0),H(),M("slide",n,!0),M("set",n,!0),M("change",n,!0),M("update",n,!0),i.events.snap&&V(t,{handleNumbers:[n]})}function L(t){var e=C(t.calcPoint),n=tt.getStep(e),r=tt.fromStepping(n);Object.keys(nt).forEach(function(t){"hover"===t.split(".")[0]&&nt[t].forEach(function(t){t.call($,r)})})}function F(t,e,n,r,o){return _.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e<_.length-1&&(n=Math.min(n,t[e+1]-i.margin))),_.length>1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e<_.length-1&&(n=Math.max(n,t[e+1]-i.limit))),i.padding&&(0===e&&(n=Math.max(n,i.padding)),e===_.length-1&&(n=Math.min(n,100-i.padding))),n=tt.getStep(n),(n=s(n))!==t[e]&&n}function j(t){return t+"%"}function z(t,e){K[t]=e,et[t]=tt.fromStepping(e);var n=function(){_[t].style[i.style]=j(e),T(t),T(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}function H(){Q.forEach(function(t){var e=K[t]>50?-1:1,n=3+(_.length+e*t);_[t].childNodes[0].style.zIndex=n})}function D(t,e,n,r){return!1!==(e=F(K,t,e,n,r))&&(z(t,e),!0)}function T(t){if(W[t]){var e=0,n=100;0!==t&&(e=K[t-1]),t!==W.length-1&&(n=K[t]),W[t].style[i.style]=j(e),W[t].style[i.styleOposite]=j(100-n)}}function q(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=i.format.from(t))||isNaN(t)||D(e,tt.toStepping(t),!1,!1))}function R(t,e){var n=a(t),r=void 0===K[0];e=void 0===e||!!e,n.forEach(q),i.animate&&!r&&o(J,i.cssClasses.tap,i.animationDuration),Q.forEach(function(t){D(t,K[t],!0,!1)}),H(),Q.forEach(function(t){M("update",t),null!==n[t]&&e&&M("set",t)})}function B(){var t=et.map(i.format.to);return 1===t.length?t[0]:t}function Y(t,e){nt[t]=nt[t]||[],nt[t].push(e),"update"===t.split(".")[0]&&_.forEach(function(t,e){M("update",e)})}var I,_,W,$,G=d(),J=n,K=[],Q=[],Z=!1,tt=i.spectrum,et=[],nt={};if(J.noUiSlider)throw new Error("Slider was already initialized.");return function(e){l(e,i.cssClasses.target),0===i.dir?l(e,i.cssClasses.ltr):l(e,i.cssClasses.rtl),0===i.ort?l(e,i.cssClasses.horizontal):l(e,i.cssClasses.vertical),I=t(e,i.cssClasses.base)}(J),function(t,e){_=[],(W=[]).push(m(e,t[0]));for(var n=0;n<i.handles;n++)_.push(h(e,n)),Q[n]=n,W.push(m(e,t[n+1]))}(i.connect,I),$={destroy:function(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&c(J,i.cssClasses[t]);for(;J.firstChild;)J.removeChild(J.firstChild);delete J.noUiSlider},steps:function(){return K.map(function(t,e){var n=tt.getNearbySteps(t),r=et[e],i=n.thisStep.step,o=null;!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=tt.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:Y,off:function(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(nt).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete nt[t]})},get:B,set:R,reset:function(t){R(i.start,t)},__moveHandles:function(t,e,n){U(t,e,K,n)},options:u,updateOptions:function(t,e){var n=B(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=X(u);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),o.spectrum.direction=tt.direction,tt=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,K=[],R(t.start||n,e)},target:J,pips:S},function(t){t.fixed||_.forEach(function(t,e){y(G.start,t.children[0],V,{handleNumbers:[e]})}),t.tap&&y(G.start,I,A,{}),t.hover&&y(G.move,I,L,{hover:!0}),t.drag&&W.forEach(function(e,n){if(!1!==e&&0!==n&&n!==W.length-1){var r=_[n-1],o=_[n],s=[e];l(e,i.cssClasses.draggable),t.fixed&&(s.push(r.children[0]),s.push(o.children[0])),s.forEach(function(t){y(G.start,t,V,{handles:[r,o],handleNumbers:[n-1,n]})})}})}(i.events),R(i.start),i.pips&&S(i.pips),i.tooltips&&function(){var t=_.map(g);Y("update",function(e,n,r){if(t[n]){var o=e[n];!0!==i.tooltips[n]&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML="<span>"+o+"</span>"}})}(),$}C.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider: 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&m(this.xVal,t)},C.prototype.toStepping=function(t){return t=w(this.xVal,this.xPct,t)},C.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},C.prototype.getStep=function(t){return t=x(this.xPct,this.xSteps,this.snap,t)},C.prototype.getNearbySteps=function(t){var e=b(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},C.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},C.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var I={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=Y(t,X(e,t),e);return t.noUiSlider=n,n}}});
1
+ !function(){function t(t){return t.split("").reverse().join("")}function e(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(e,n,r,i,o,s,a,u,l,c,f,p){a=p;var d,h=f="";return s&&(p=s(p)),!("number"!=typeof p||!isFinite(p))&&(e&&0===parseFloat(p.toFixed(e))&&(p=0),0>p&&(d=!0,p=Math.abs(p)),e&&(s=Math.pow(10,e),p=(Math.round(p*s)/s).toFixed(e)),-1!==(p=p.toString()).indexOf(".")&&(e=p.split("."),p=e[0],r&&(f=r+e[1])),n&&(p=t(p).match(/.{1,3}/g),p=t(p.join(t(n)))),d&&u&&(h+=u),i&&(h+=i),d&&l&&(h+=l),h=h+p+f,o&&(h+=o),c&&(h=c(h,a)),h)}function r(t,e,n,r,i,o,s,a,u,l,c,f){var p;return t="",c&&(f=c(f)),!(!f||"string"!=typeof f)&&(a&&f.substring(0,a.length)===a&&(f=f.replace(a,""),p=!0),r&&f.substring(0,r.length)===r&&(f=f.replace(r,"")),u&&f.substring(0,u.length)===u&&(f=f.replace(u,""),p=!0),i&&f.slice(-1*i.length)===i&&(f=f.slice(0,-1*i.length)),e&&(f=f.split(e).join("")),n&&(f=f.replace(n,".")),p&&(t+="-"),t=Number((t+f).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t){var n,r,i,o={};for(n=0;n<a.length;n+=1)r=a[n],i=t[r],void 0===i?o[r]="negative"!==r||o.negativeBefore?"mark"===r&&"."!==o.thousand&&".":"-":"decimals"===r?0<i&&8>i&&(o[r]=i):"encoder"===r||"decoder"===r||"edit"===r||"undo"===r?"function"==typeof i&&(o[r]=i):"string"==typeof i&&(o[r]=i);return e(o,"mark","thousand"),e(o,"prefix","negative"),e(o,"prefix","negativeBefore"),o}function o(t,e,n){var r,i=[];for(r=0;r<a.length;r+=1)i.push(t[a[r]]);return i.push(n),e.apply("",i)}function s(t){if(!(this instanceof s))return new s(t);"object"==typeof t&&(t=i(t),this.to=function(e){return o(t,n,e)},this.from=function(e){return o(t,r,e)})}var a="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=s}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t,e){var n=document.createElement("div");return l(n,e),t.appendChild(n),n}function e(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function n(t,e){return Math.round(t/e)*e}function r(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument.documentElement,i=p();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0),e?n.top+i.y-r.clientTop:n.left+i.x-r.clientLeft}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){n>0&&(l(t,e),setTimeout(function(){c(t,e)},n))}function s(t){return Math.max(Math.min(t,100),0)}function a(t){return Array.isArray(t)?t:[t]}function u(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function l(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function c(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function f(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function p(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function d(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function h(t,e){return 100/(e-t)}function m(t,e){return 100*e/(t[1]-t[0])}function g(t,e){return m(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}function v(t,e){return e*(t[1]-t[0])/100+t[0]}function b(t,e){for(var n=1;t>=e[n];)n+=1;return n}function w(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=b(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+g([r,i],n)/h(o,s)}function S(t,e,n){if(n>=100)return t.slice(-1)[0];var r,i,o,s,a=b(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],v([r,i],(n-o)*h(o,s))}function x(t,e,r,i){if(100===i)return i;var o,s,a=b(i,t);return r?(o=t[a-1],s=t[a],i-o>(s-o)/2?s:o):e[a-1]?t[a-1]+n(i-t[a-1],e[a-1]):i}function y(t,e,n){var r;if("number"==typeof e&&(e=[e]),"[object Array]"!==Object.prototype.toString.call(e))throw new Error("noUiSlider: 'range' contains invalid value.");if(r="min"===t?0:"max"===t?100:parseFloat(t),!i(r)||!i(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");n.xPct.push(r),n.xVal.push(e[0]),r?n.xSteps.push(!isNaN(e[1])&&e[1]):isNaN(e[1])||(n.xSteps[0]=e[1]),n.xHighestCompleteStep.push(0)}function E(t,e,n){if(!e)return!0;n.xSteps[t]=m([n.xVal[t],n.xVal[t+1]],e)/h(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function C(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i<o.length;i++)y(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)E(i,this.xNumSteps[i],this)}function N(t,e){if(!i(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function U(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new C(e,t.snap,t.dir,t.singleStep)}function M(t,e){if(e=a(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function P(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function k(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function O(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function V(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n<t.handles;n++)r.push(e);r.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");r=e}t.connect=r}function A(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function L(t,e){if(!i(e))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==e&&(t.margin=t.spectrum.getMargin(e),!t.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function F(t,e){if(!i(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getMargin(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function j(t,e){if(!i(e))throw new Error("noUiSlider: 'padding' option must be numeric.");if(0!==e){if(t.padding=t.spectrum.getMargin(e),!t.padding)throw new Error("noUiSlider: 'padding' option is only supported on linear sliders.");if(t.padding<0)throw new Error("noUiSlider: 'padding' option must be a positive number.");if(t.padding>=50)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function z(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function H(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");L(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function D(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n<t.handles;n++)t.tooltips.push(!0)}else{if(t.tooltips=a(e),t.tooltips.length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");t.tooltips.forEach(function(t){if("boolean"!=typeof t&&("object"!=typeof t||"function"!=typeof t.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function T(t,e){if(t.format=e,"function"==typeof e.to&&"function"==typeof e.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function q(t,e){if(void 0!==e&&"string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function R(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix){t.cssClasses={};for(var n in e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n])}else t.cssClasses=e}function B(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function X(t){var e={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,format:I},n={step:{r:!1,t:N},start:{r:!0,t:M},connect:{r:!0,t:V},direction:{r:!0,t:z},snap:{r:!1,t:P},animate:{r:!1,t:k},animationDuration:{r:!1,t:O},range:{r:!0,t:U},orientation:{r:!1,t:A},margin:{r:!1,t:L},limit:{r:!1,t:F},padding:{r:!1,t:j},behaviour:{r:!0,t:H},format:{r:!1,t:T},tooltips:{r:!1,t:D},cssPrefix:{r:!1,t:q},cssClasses:{r:!1,t:R},useRequestAnimationFrame:{r:!1,t:B}},r={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleTouchArea:"handle-touch-area",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};Object.keys(n).forEach(function(i){if(void 0===t[i]&&void 0===r[i]){if(n[i].r)throw new Error("noUiSlider: '"+i+"' is required.");return!0}n[i].t(e,void 0===t[i]?r[i]:t[i])}),e.pips=t.pips;var i=[["left","top"],["right","bottom"]];return e.style=i[e.dir][e.ort],e.styleOposite=i[e.dir?0:1][e.ort],e}function Y(n,i,u){function h(e,n){var r=t(e,i.cssClasses.origin),o=t(r,i.cssClasses.handle);return t(o,i.cssClasses.handleTouchArea),o.setAttribute("data-handle",n),0===n?l(o,i.cssClasses.handleLower):n===i.handles-1&&l(o,i.cssClasses.handleUpper),r}function m(e,n){return!!n&&t(e,i.cssClasses.connect)}function g(e,n){return!!i.tooltips[n]&&t(e.firstChild,i.cssClasses.tooltip)}function v(t,e,n){if("range"===t||"steps"===t)return tt.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return tt.fromStepping(n?tt.getStep(t):t)}):"values"===t?n?e.map(function(t){return tt.fromStepping(tt.getStep(tt.toStepping(t)))}):e:void 0}function b(t,n,r){function i(t,e){return(t+e).toFixed(7)/1}var o={},s=tt.xVal[0],a=tt.xVal[tt.xVal.length-1],u=!1,l=!1,c=0;return(r=e(r.slice().sort(function(t,e){return t-e})))[0]!==s&&(r.unshift(s),u=!0),r[r.length-1]!==a&&(r.push(a),l=!0),r.forEach(function(e,s){var a,f,p,d,h,m,g,v,b,w=e,S=r[s+1];if("steps"===n&&(a=tt.xNumSteps[s]),a||(a=S-w),!1!==w&&void 0!==S)for(a=Math.max(a,1e-7),f=w;f<=S;f=i(f,a)){for(g=(h=(d=tt.toStepping(f))-c)/t,b=h/(v=Math.round(g)),p=1;p<=v;p+=1)o[(c+p*b).toFixed(5)]=["x",0];m=r.indexOf(f)>-1?1:"steps"===n?2:0,!s&&u&&(m=0),f===S&&l||(o[d.toFixed(5)]=[f,m]),c=d}}),o}function w(t,e,n){function r(t,e){var n=e===i.cssClasses.value,r=n?p:d,o=n?c:f;return e+" "+r[i.ort]+" "+o[t]}function o(t,e,n){return'class="'+r(n[1],e)+'" style="'+i.style+": "+t+'%"'}function s(t,r){r[1]=r[1]&&e?e(r[0],r[1]):r[1],u+="<div "+o(t,i.cssClasses.marker,r)+"></div>",r[1]&&(u+="<div "+o(t,i.cssClasses.value,r)+">"+n.to(r[0])+"</div>")}var a=document.createElement("div"),u="",c=[i.cssClasses.valueNormal,i.cssClasses.valueLarge,i.cssClasses.valueSub],f=[i.cssClasses.markerNormal,i.cssClasses.markerLarge,i.cssClasses.markerSub],p=[i.cssClasses.valueHorizontal,i.cssClasses.valueVertical],d=[i.cssClasses.markerHorizontal,i.cssClasses.markerVertical];return l(a,i.cssClasses.pips),l(a,0===i.ort?i.cssClasses.pipsHorizontal:i.cssClasses.pipsVertical),Object.keys(t).forEach(function(e){s(e,t[e])}),a.innerHTML=u,a}function S(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=b(n,e,v(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return J.appendChild(w(i,r,o))}function x(){var t=I.getBoundingClientRect(),e="offset"+["Width","Height"][i.ort];return 0===i.ort?t.width||I[e]:t.height||I[e]}function y(t,e,n,r){var o=function(e){return!J.hasAttribute("disabled")&&(!f(J,i.cssClasses.tap)&&(!!(e=E(e,r.pageOffset))&&(!(t===G.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[i.ort],void n(e,r))))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!1),s.push([t,o])}),s}function E(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");if(0===t.type.indexOf("MSPointer")&&(s=!0),i){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}return e=e||p(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y),t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}function C(t){var e=100*(t-r(I,i.ort))/x();return i.dir?100-e:e}function N(t){var e=100,n=!1;return _.forEach(function(r,i){if(!r.hasAttribute("disabled")){var o=Math.abs(K[i]-t);o<e&&(n=i,e=o)}}),n}function U(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=F(i,t,i[t]+e,o[n],s[n]);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=D(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){M("update",t),M("slide",t)})}function M(t,e,n){Object.keys(nt).forEach(function(r){var o=r.split(".")[0];t===o&&nt[r].forEach(function(t){t.call($,et.map(i.format.to),e,et.slice(),n||!1,K.slice())})})}function P(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&O(t,e)}function k(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return O(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint);U(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function O(t,e){Z&&(c(Z,i.cssClasses.active),Z=!1),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener)),document.documentElement.noUiListeners.forEach(function(t){document.documentElement.removeEventListener(t[0],t[1])}),c(J,i.cssClasses.drag),H(),e.handleNumbers.forEach(function(t){M("set",t),M("change",t),M("end",t)})}function V(t,e){if(1===e.handleNumbers.length){var n=_[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;l(Z=n.children[0],i.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=y(G.move,document.documentElement,k,{startCalcPoint:t.calcPoint,baseSize:x(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:K.slice()}),o=y(G.end,document.documentElement,O,{handleNumbers:e.handleNumbers}),s=y("mouseout",document.documentElement,P,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(o,s),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,_.length>1&&l(J,i.cssClasses.drag);var a=function(){return!1};document.body.noUiListener=a,document.body.addEventListener("selectstart",a,!1)}e.handleNumbers.forEach(function(t){M("start",t)})}function A(t){t.stopPropagation();var e=C(t.calcPoint),n=N(e);if(!1===n)return!1;i.events.snap||o(J,i.cssClasses.tap,i.animationDuration),D(n,e,!0,!0),H(),M("slide",n,!0),M("set",n,!0),M("change",n,!0),M("update",n,!0),i.events.snap&&V(t,{handleNumbers:[n]})}function L(t){var e=C(t.calcPoint),n=tt.getStep(e),r=tt.fromStepping(n);Object.keys(nt).forEach(function(t){"hover"===t.split(".")[0]&&nt[t].forEach(function(t){t.call($,r)})})}function F(t,e,n,r,o){return _.length>1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e<_.length-1&&(n=Math.min(n,t[e+1]-i.margin))),_.length>1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e<_.length-1&&(n=Math.max(n,t[e+1]-i.limit))),i.padding&&(0===e&&(n=Math.max(n,i.padding)),e===_.length-1&&(n=Math.min(n,100-i.padding))),n=tt.getStep(n),(n=s(n))!==t[e]&&n}function j(t){return t+"%"}function z(t,e){K[t]=e,et[t]=tt.fromStepping(e);var n=function(){_[t].style[i.style]=j(e),T(t),T(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}function H(){Q.forEach(function(t){var e=K[t]>50?-1:1,n=3+(_.length+e*t);_[t].childNodes[0].style.zIndex=n})}function D(t,e,n,r){return!1!==(e=F(K,t,e,n,r))&&(z(t,e),!0)}function T(t){if(W[t]){var e=0,n=100;0!==t&&(e=K[t-1]),t!==W.length-1&&(n=K[t]),W[t].style[i.style]=j(e),W[t].style[i.styleOposite]=j(100-n)}}function q(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=i.format.from(t))||isNaN(t)||D(e,tt.toStepping(t),!1,!1))}function R(t,e){var n=a(t),r=void 0===K[0];e=void 0===e||!!e,n.forEach(q),i.animate&&!r&&o(J,i.cssClasses.tap,i.animationDuration),Q.forEach(function(t){D(t,K[t],!0,!1)}),H(),Q.forEach(function(t){M("update",t),null!==n[t]&&e&&M("set",t)})}function B(){var t=et.map(i.format.to);return 1===t.length?t[0]:t}function Y(t,e){nt[t]=nt[t]||[],nt[t].push(e),"update"===t.split(".")[0]&&_.forEach(function(t,e){M("update",e)})}var I,_,W,$,G=d(),J=n,K=[],Q=[],Z=!1,tt=i.spectrum,et=[],nt={};if(J.noUiSlider)throw new Error("Slider was already initialized.");return function(e){l(e,i.cssClasses.target),0===i.dir?l(e,i.cssClasses.ltr):l(e,i.cssClasses.rtl),0===i.ort?l(e,i.cssClasses.horizontal):l(e,i.cssClasses.vertical),I=t(e,i.cssClasses.base)}(J),function(t,e){_=[],(W=[]).push(m(e,t[0]));for(var n=0;n<i.handles;n++)_.push(h(e,n)),Q[n]=n,W.push(m(e,t[n+1]))}(i.connect,I),$={destroy:function(){for(var t in i.cssClasses)i.cssClasses.hasOwnProperty(t)&&c(J,i.cssClasses[t]);for(;J.firstChild;)J.removeChild(J.firstChild);delete J.noUiSlider},steps:function(){return K.map(function(t,e){var n=tt.getNearbySteps(t),r=et[e],i=n.thisStep.step,o=null;!1!==i&&r+i>n.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=tt.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:Y,off:function(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(nt).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete nt[t]})},get:B,set:R,reset:function(t){R(i.start,t)},__moveHandles:function(t,e,n){U(t,e,K,n)},options:u,updateOptions:function(t,e){var n=B(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=X(u);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),o.spectrum.direction=tt.direction,tt=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,K=[],R(t.start||n,e)},target:J,pips:S},function(t){t.fixed||_.forEach(function(t,e){y(G.start,t.children[0],V,{handleNumbers:[e]})}),t.tap&&y(G.start,I,A,{}),t.hover&&y(G.move,I,L,{hover:!0}),t.drag&&W.forEach(function(e,n){if(!1!==e&&0!==n&&n!==W.length-1){var r=_[n-1],o=_[n],s=[e];l(e,i.cssClasses.draggable),t.fixed&&(s.push(r.children[0]),s.push(o.children[0])),s.forEach(function(t){y(G.start,t,V,{handles:[r,o],handleNumbers:[n-1,n]})})}})}(i.events),R(i.start),i.pips&&S(i.pips),i.tooltips&&function(){var t=_.map(g);Y("update",function(e,n,r){if(t[n]){var o=e[n];!0!==i.tooltips[n]&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML="<span>"+o+"</span>"}})}(),$}C.prototype.getMargin=function(t){var e=this.xNumSteps[0];if(e&&t/e%1!=0)throw new Error("noUiSlider: 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&m(this.xVal,t)},C.prototype.toStepping=function(t){return t=w(this.xVal,this.xPct,t)},C.prototype.fromStepping=function(t){return S(this.xVal,this.xPct,t)},C.prototype.getStep=function(t){return t=x(this.xPct,this.xSteps,this.snap,t)},C.prototype.getNearbySteps=function(t){var e=b(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},C.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(u);return Math.max.apply(null,t)},C.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var I={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=Y(t,X(e,t),e);return t.noUiSlider=n,n}}});
@@ -50,7 +50,12 @@
50
50
  var fontFamily = $textarea.css('font-family');
51
51
  var fontSize = $textarea.css('font-size');
52
52
  var lineHeight = $textarea.css('line-height');
53
- var padding = $textarea.css('padding');
53
+
54
+ // Firefox can't handle padding shorthand.
55
+ var paddingTop = $textarea.css('padding-top');
56
+ var paddingRight = $textarea.css('padding-right');
57
+ var paddingBottom = $textarea.css('padding-bottom');
58
+ var paddingLeft = $textarea.css('padding-left');
54
59
 
55
60
  if (fontSize) {
56
61
  hiddenDiv.css('font-size', fontSize);
@@ -61,8 +66,17 @@
61
66
  if (lineHeight) {
62
67
  hiddenDiv.css('line-height', lineHeight);
63
68
  }
64
- if (padding) {
65
- hiddenDiv.css('padding', padding);
69
+ if (paddingTop) {
70
+ hiddenDiv.css('padding-top', paddingTop);
71
+ }
72
+ if (paddingRight) {
73
+ hiddenDiv.css('padding-right', paddingRight);
74
+ }
75
+ if (paddingBottom) {
76
+ hiddenDiv.css('padding-bottom', paddingBottom);
77
+ }
78
+ if (paddingLeft) {
79
+ hiddenDiv.css('padding-left', paddingLeft);
66
80
  }
67
81
 
68
82
  // Set original-height, if none
@@ -203,9 +217,6 @@
203
217
  $(document).on('keydown', text_area_selector, function () {
204
218
  M.textareaAutoResize($(this));
205
219
  });
206
- $(document).on('autoresize', text_area_selector, function () {
207
- M.textareaAutoResize($(this));
208
- });
209
220
 
210
221
  // File Input Path
211
222
  $(document).on('change', '.file-field input[type="file"]', function () {
@@ -32,6 +32,23 @@ M.keys = {
32
32
  ARROW_DOWN: 40
33
33
  };
34
34
 
35
+ /**
36
+ * TabPress Keydown handler
37
+ */
38
+ M.tabPressed = false;
39
+ var docHandleKeydown = function (e) {
40
+ if (e.which === M.keys.TAB) {
41
+ M.tabPressed = true;
42
+ }
43
+ };
44
+ var docHandleKeyup = function (e) {
45
+ if (e.which === M.keys.TAB) {
46
+ M.tabPressed = false;
47
+ }
48
+ };
49
+ document.addEventListener('keydown', docHandleKeydown);
50
+ document.addEventListener('keyup', docHandleKeyup);
51
+
35
52
  /**
36
53
  * Initialize jQuery wrapper for plugin
37
54
  * @param {Class} plugin javascript class
@@ -336,18 +353,3 @@ M.throttle = function (func, wait, options) {
336
353
  return result;
337
354
  };
338
355
  };
339
-
340
- // Velocity has conflicts when loaded with jQuery, this will check for it
341
- // First, check if in noConflict mode
342
- var Vel = void 0;
343
- if (M.jQueryLoaded) {
344
- Vel = jQuery.Velocity;
345
- } else {
346
- Vel = Velocity;
347
- }
348
-
349
- if (Vel) {
350
- M.Vel = Vel;
351
- } else {
352
- M.Vel = Velocity;
353
- }
@@ -2,7 +2,7 @@ var _createClass = function () { function defineProperties(target, props) { for
2
2
 
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
 
5
- (function ($, Vel) {
5
+ (function ($, anim) {
6
6
  'use strict';
7
7
 
8
8
  var _defaults = {
@@ -176,31 +176,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
176
176
  value: function _animateImageIn() {
177
177
  var _this = this;
178
178
 
179
- var velocityOptions = {
179
+ var animOptions = {
180
+ targets: this.el,
181
+ height: this.newHeight,
182
+ width: this.newWidth,
183
+ left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
184
+ top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
180
185
  duration: this.options.inDuration,
181
- queue: false,
182
- ease: 'easeOutQuad',
186
+ easing: 'easeOutQuad',
183
187
  complete: function () {
184
188
  _this.doneAnimating = true;
185
189
  }
186
190
  };
187
191
 
188
- var velocityProperties = {
189
- height: this.newHeight,
190
- width: this.newWidth,
191
- left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
192
- top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2
193
- };
194
-
195
192
  if (this.$el.hasClass('responsive-img')) {
196
- velocityProperties.maxWidth = [this.newWidth, this.newWidth];
197
- velocityProperties.width = [velocityProperties.width, this.originalWidth];
193
+ animOptions.maxWidth = this.newWidth;
194
+ animOptions.width = [this.originalWidth, animOptions.width];
198
195
  } else {
199
- velocityProperties.left = [velocityProperties.left, 0];
200
- velocityProperties.top = [velocityProperties.top, 0];
196
+ animOptions.left = [animOptions.left, 0];
197
+ animOptions.top = [animOptions.top, 0];
201
198
  }
202
199
 
203
- Vel(this.el, velocityProperties, velocityOptions);
200
+ anim(animOptions);
204
201
  }
205
202
 
206
203
  /**
@@ -212,10 +209,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
212
209
  value: function _animateImageOut() {
213
210
  var _this2 = this;
214
211
 
215
- var velocityOptions = {
212
+ var animOptions = {
213
+ targets: this.el,
214
+ width: this.originalWidth,
215
+ height: this.originalHeight,
216
+ left: 0,
217
+ top: 0,
216
218
  duration: this.options.outDuration,
217
- queue: false,
218
- ease: 'easeOutQuad',
219
+ easing: 'easeOutQuad',
219
220
  complete: function () {
220
221
  _this2.placeholder.css({
221
222
  height: '',
@@ -239,12 +240,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
239
240
  }
240
241
  };
241
242
 
242
- Vel(this.el, {
243
- width: this.originalWidth,
244
- height: this.originalHeight,
245
- left: 0,
246
- top: 0
247
- }, velocityOptions);
243
+ anim(animOptions);
248
244
  }
249
245
 
250
246
  /**
@@ -316,8 +312,20 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
316
312
  top: -1 * overlayOffset.top + 'px'
317
313
  });
318
314
 
315
+ anim.remove(this.el);
316
+ anim.remove(this.$overlay[0]);
317
+
318
+ if (this.caption !== "") {
319
+ anim.remove(this.$photoCaption[0]);
320
+ }
321
+
319
322
  // Animate Overlay
320
- Vel(this.$overlay[0], { opacity: 1 }, { duration: this.options.inDuration, queue: false, ease: 'easeOutQuad' });
323
+ anim({
324
+ targets: this.$overlay[0],
325
+ opacity: 1,
326
+ duration: this.options.inDuration,
327
+ easing: 'easeOutQuad'
328
+ });
321
329
 
322
330
  // Add and animate caption if it exists
323
331
  if (this.caption !== "") {
@@ -325,7 +333,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
325
333
  this.$photoCaption.text(this.caption);
326
334
  $('body').append(this.$photoCaption);
327
335
  this.$photoCaption.css({ "display": "inline" });
328
- Vel(this.$photoCaption[0], { opacity: 1 }, { duration: this.options.inDuration, queue: false, ease: 'easeOutQuad' });
336
+
337
+ anim({
338
+ targets: this.$photoCaption[0],
339
+ opacity: 1,
340
+ duration: this.options.inDuration,
341
+ easing: 'easeOutQuad'
342
+ });
329
343
  }
330
344
 
331
345
  // Resize Image
@@ -369,10 +383,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
369
383
  this._updateVars();
370
384
  this.doneAnimating = false;
371
385
 
372
- Vel(this.el, 'stop');
373
- Vel(this.$overlay[0], 'stop');
386
+ anim.remove(this.el);
387
+ anim.remove(this.$overlay[0]);
388
+
374
389
  if (this.caption !== "") {
375
- Vel(this.$photoCaption[0], 'stop');
390
+ anim.remove(this.$photoCaption[0]);
376
391
  }
377
392
 
378
393
  // disable exit handlers
@@ -380,18 +395,30 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
380
395
  window.removeEventListener('resize', this._handleWindowResizeBound);
381
396
  window.removeEventListener('keyup', this._handleWindowEscapeBound);
382
397
 
383
- Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuad', complete: function () {
398
+ anim({
399
+ targets: this.$overlay[0],
400
+ opacity: 0,
401
+ duration: this.options.outDuration,
402
+ easing: 'easeOutQuad',
403
+ complete: function () {
384
404
  _this4.overlayActive = false;
385
405
  _this4.$overlay.remove();
386
- } });
406
+ }
407
+ });
387
408
 
388
409
  this._animateImageOut();
389
410
 
390
411
  // Remove Caption + reset css settings on image
391
412
  if (this.caption !== "") {
392
- Vel(this.$photoCaption[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuad', complete: function () {
413
+ anim({
414
+ targets: this.$photoCaption[0],
415
+ opacity: 0,
416
+ duration: this.options.outDuration,
417
+ easing: 'easeOutQuad',
418
+ complete: function () {
393
419
  _this4.$photoCaption.remove();
394
- } });
420
+ }
421
+ });
395
422
  }
396
423
  }
397
424
  }], [{
@@ -429,4 +456,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
429
456
  if (M.jQueryLoaded) {
430
457
  M.initializeJqueryWrapper(Materialbox, 'materialbox', 'M_Materialbox');
431
458
  }
432
- })(cash, M.Vel);
459
+ })(cash, M.anime);
@@ -2,7 +2,7 @@ var _createClass = function () { function defineProperties(target, props) { for
2
2
 
3
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
 
5
- (function ($, Vel) {
5
+ (function ($, anim) {
6
6
  'use strict';
7
7
 
8
8
  var _defaults = {
@@ -196,13 +196,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
196
196
  });
197
197
 
198
198
  // Animate overlay
199
- Vel(this.$overlay[0], { opacity: this.options.opacity }, { duration: this.options.inDuration, queue: false, ease: 'easeOutCubic' });
199
+ anim({
200
+ targets: this.$overlay[0],
201
+ opacity: this.options.opacity,
202
+ duration: this.options.inDuration,
203
+ easing: 'easeOutQuad'
204
+ });
200
205
 
201
206
  // Define modal animation options
202
- var enterVelocityOptions = {
207
+ var enterAnimOptions = {
208
+ targets: this.el,
203
209
  duration: this.options.inDuration,
204
- queue: false,
205
- ease: 'easeOutCubic',
210
+ easing: 'easeOutCubic',
206
211
  // Handle modal ready callback
207
212
  complete: function () {
208
213
  if (typeof _this.options.ready === 'function') {
@@ -213,14 +218,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
213
218
 
214
219
  // Bottom sheet animation
215
220
  if (this.el.classList.contains('bottom-sheet')) {
216
- Vel(this.el, { bottom: 0, opacity: 1 }, enterVelocityOptions);
221
+ $.extend(enterAnimOptions, {
222
+ bottom: 0,
223
+ opacity: 1
224
+ });
225
+ anim(enterAnimOptions);
217
226
 
218
227
  // Normal modal animation
219
228
  } else {
220
- Vel.hook(this.el, 'scaleX', 0.8);
221
- Vel.hook(this.el, 'scaleY', 0.8);
222
- this.el.style.top = this.options.startingTop;
223
- Vel(this.el, { top: this.options.endingTop, opacity: 1, scaleX: 1, scaleY: 1 }, enterVelocityOptions);
229
+ $.extend(enterAnimOptions, {
230
+ top: [this.options.startingTop, this.options.endingTop],
231
+ opacity: 1,
232
+ scaleX: [.8, 1],
233
+ scaleY: [.8, 1]
234
+ });
235
+ anim(enterAnimOptions);
224
236
  }
225
237
  }
226
238
 
@@ -234,19 +246,24 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
234
246
  var _this2 = this;
235
247
 
236
248
  // Animate overlay
237
- Vel(this.$overlay[0], { opacity: 0 }, { duration: this.options.outDuration, queue: false, ease: 'easeOutQuart' });
249
+ anim({
250
+ targets: this.$overlay[0],
251
+ opacity: 0,
252
+ duration: this.options.outDuration,
253
+ easing: 'easeOutQuart'
254
+ });
238
255
 
239
256
  // Define modal animation options
240
- var exitVelocityOptions = {
257
+ var exitAnimOptions = {
258
+ targets: this.el,
241
259
  duration: this.options.outDuration,
242
- queue: false,
243
- ease: 'easeOutCubic',
260
+ easing: 'easeOutCubic',
244
261
  // Handle modal ready callback
245
262
  complete: function () {
246
263
  _this2.el.style.display = 'none';
247
264
  // Call complete callback
248
265
  if (typeof _this2.options.complete === 'function') {
249
- _this2.options.complete.call(_this2, _this2.$el);
266
+ _this2.options.complete.call(_this2, _this2.el);
250
267
  }
251
268
  _this2.$overlay.remove();
252
269
  }
@@ -254,11 +271,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
254
271
 
255
272
  // Bottom sheet animation
256
273
  if (this.el.classList.contains('bottom-sheet')) {
257
- Vel(this.el, { bottom: '-100%', opacity: 0 }, exitVelocityOptions);
274
+ $.extend(exitAnimOptions, {
275
+ bottom: '-100%',
276
+ opacity: 0
277
+ });
278
+ anim(exitAnimOptions);
258
279
 
259
280
  // Normal modal animation
260
281
  } else {
261
- Vel(this.el, { top: this.options.startingTop, opacity: 0, scaleX: 0.8, scaleY: 0.8 }, exitVelocityOptions);
282
+ $.extend(exitAnimOptions, {
283
+ top: [this.options.endingTop, this.options.startingTop],
284
+ opacity: 0,
285
+ scaleX: 0.8,
286
+ scaleY: 0.8
287
+ });
288
+ anim(exitAnimOptions);
262
289
  }
263
290
  }
264
291
 
@@ -281,13 +308,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
281
308
  body.appendChild(this.$overlay[0]);
282
309
 
283
310
  // Set opening trigger, undefined indicates modal was opened by javascript
284
- this._openingTrigger = !!$trigger ? $trigger : undefined;
311
+ this._openingTrigger = !!$trigger ? $trigger[0] : undefined;
285
312
 
286
313
  if (this.options.dismissible) {
287
314
  this._handleKeydownBound = this._handleKeydown.bind(this);
288
315
  document.addEventListener('keydown', this._handleKeydownBound);
289
316
  }
290
317
 
318
+ anim.remove(this.el);
319
+ anim.remove(this.$overlay[0]);
291
320
  this._animateIn();
292
321
  return this;
293
322
  }
@@ -311,6 +340,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
311
340
  document.removeEventListener('keydown', this._handleKeydownBound);
312
341
  }
313
342
 
343
+ anim.remove(this.el);
344
+ anim.remove(this.$overlay[0]);
314
345
  this._animateOut();
315
346
  return this;
316
347
  }
@@ -363,4 +394,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
363
394
  if (M.jQueryLoaded) {
364
395
  M.initializeJqueryWrapper(Modal, 'modal', 'M_Modal');
365
396
  }
366
- })(cash, M.Vel);
397
+ })(cash, M.anime);