kmaterialize 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ !function(){function h(t){return t.split("").reverse().join("")}function o(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(t,e,n,r,i,o,s,a,l,u,c,p){s=p;var f,d=c="";return o&&(p=o(p)),!("number"!=typeof p||!isFinite(p))&&(t&&0===parseFloat(p.toFixed(t))&&(p=0),p<0&&(f=!0,p=Math.abs(p)),t&&(o=Math.pow(10,t),p=(Math.round(p*o)/o).toFixed(t)),-1!==(p=p.toString()).indexOf(".")&&(p=(t=p.split("."))[0],n&&(c=n+t[1])),e&&(p=h((p=h(p).match(/.{1,3}/g)).join(h(e)))),f&&a&&(d+=a),r&&(d+=r),f&&l&&(d+=l),d=d+p+c,i&&(d+=i),u&&(d=u(d,s)),d)}function r(t,e,n,r,i,o,s,a,l,u,c,p){var f;return t="",c&&(p=c(p)),!(!p||"string"!=typeof p)&&(a&&p.substring(0,a.length)===a&&(p=p.replace(a,""),f=!0),r&&p.substring(0,r.length)===r&&(p=p.replace(r,"")),l&&p.substring(0,l.length)===l&&(p=p.replace(l,""),f=!0),i&&p.slice(-1*i.length)===i&&(p=p.slice(0,-1*i.length)),e&&(p=p.split(e).join("")),n&&(p=p.replace(n,".")),f&&(t+="-"),t=Number((t+p).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t,e,n){var r,i=[];for(r=0;r<s.length;r+=1)i.push(t[s[r]]);return i.push(n),e.apply("",i)}var s="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=function t(e){if(!(this instanceof t))return new t(e);"object"==typeof e&&(e=function(t){var e,n,r,i={};for(e=0;e<s.length;e+=1)void 0===(r=t[n=s[e]])?i[n]="negative"!==n||i.negativeBefore?"mark"===n&&"."!==i.thousand&&".":"-":"decimals"===n?0<r&&r<8&&(i[n]=r):"encoder"===n||"decoder"===n||"edit"===n||"undo"===n?"function"==typeof r&&(i[n]=r):"string"==typeof r&&(i[n]=r);return o(i,"mark","thousand"),o(i,"prefix","negative"),o(i,"prefix","negativeBefore"),i}(e),this.to=function(t){return i(e,n,t)},this.from=function(t){return i(e,r,t)})}}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function B(t,e){var n=document.createElement("div");return I(n,e),t.appendChild(n),n}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function X(t,e,n){0<n&&(I(t,e),setTimeout(function(){_(t,e)},n))}function Y(t){return Array.isArray(t)?t:[t]}function e(t){var e=(t=String(t)).split(".");return 1<e.length?e[1].length:0}function I(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function _(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function W(){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 c(t,e){return 100/(e-t)}function p(t,e){return 100*e/(t[1]-t[0])}function f(t,e){for(var n=1;t>=e[n];)n+=1;return n}function n(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a,l,u=f(n,t);return r=t[u-1],i=t[u],o=e[u-1],s=e[u],o+(l=n,p(a=[r,i],a[0]<0?l+Math.abs(a[0]):l-a[0])/c(o,s))}function r(t,e,n,r){if(100===r)return r;var i,o,s,a,l=f(r,t);return n?(i=t[l-1],((o=t[l])-i)/2<r-i?o:i):e[l-1]?t[l-1]+(s=r-t[l-1],a=e[l-1],Math.round(s/a)*a):r}function s(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(!i(r="min"===t?0:"max"===t?100:parseFloat(t))||!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 a(t,e,n){if(!e)return!0;n.xSteps[t]=p([n.xVal[t],n.xVal[t+1]],e)/c(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 o(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++)s(o[i][1],o[i][0],this);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)a(i,this.xNumSteps[i],this)}o.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&&p(this.xVal,t)},o.prototype.toStepping=function(t){return t=n(this.xVal,this.xPct,t)},o.prototype.fromStepping=function(t){return function(t,e,n){if(100<=n)return t.slice(-1)[0];var r,i,o,s,a,l=f(n,e);return r=t[l-1],i=t[l],o=e[l-1],s=e[l],a=[r,i],(n-o)*c(o,s)*(a[1]-a[0])/100+a[0]}(this.xVal,this.xPct,t)},o.prototype.getStep=function(t){return t=r(this.xPct,this.xSteps,this.snap,t)},o.prototype.getNearbySteps=function(t){var e=f(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]}}},o.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(e);return Math.max.apply(null,t)},o.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var l={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function u(t,e){if(!i(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function d(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 o(e,t.snap,t.dir,t.singleStep)}function h(t,e){if(e=Y(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function m(t,e){if("boolean"!=typeof(t.snap=e))throw new Error("noUiSlider: 'snap' option must be a boolean.")}function g(t,e){if("boolean"!=typeof(t.animate=e))throw new Error("noUiSlider: 'animate' option must be a boolean.")}function v(t,e){if("number"!=typeof(t.animationDuration=e))throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function b(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 w(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 S(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 x(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 y(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(50<=t.padding)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function E(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 C(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=0<=e.indexOf("tap"),r=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),o=0<=e.indexOf("snap"),s=0<=e.indexOf("hover");if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");S(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function N(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=Y(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 U(t,e){if("function"==typeof(t.format=e).to&&"function"==typeof e.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function M(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 P(t,e){if(void 0!==e&&"object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");if("string"==typeof t.cssPrefix)for(var n in t.cssClasses={},e)e.hasOwnProperty(n)&&(t.cssClasses[n]=t.cssPrefix+e[n]);else t.cssClasses=e}function k(t,e){if(!0!==e&&!1!==e)throw new Error("noUiSlider: 'useRequestAnimationFrame' option should be true (default) or false.");t.useRequestAnimationFrame=e}function $(e){var n={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,format:l},r={step:{r:!1,t:u},start:{r:!0,t:h},connect:{r:!0,t:b},direction:{r:!0,t:E},snap:{r:!1,t:m},animate:{r:!1,t:g},animationDuration:{r:!1,t:v},range:{r:!0,t:d},orientation:{r:!1,t:w},margin:{r:!1,t:S},limit:{r:!1,t:x},padding:{r:!1,t:y},behaviour:{r:!0,t:C},format:{r:!1,t:U},tooltips:{r:!1,t:N},cssPrefix:{r:!1,t:M},cssClasses:{r:!1,t:P},useRequestAnimationFrame:{r:!1,t:k}},i={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(r).forEach(function(t){if(void 0===e[t]&&void 0===i[t]){if(r[t].r)throw new Error("noUiSlider: '"+t+"' is required.");return!0}r[t].t(n,void 0===e[t]?i[t]:e[t])}),n.pips=e.pips;var t=[["left","top"],["right","bottom"]];return n.style=t[n.dir][n.ort],n.styleOposite=t[n.dir?0:1][n.ort],n}function O(t,f,o){var a,l,s,u,e,c,i,p=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"},S=t,d=[],h=[],m=!1,x=f.spectrum,g=[],v={};function b(t,e){return!!e&&B(t,f.cssClasses.connect)}function n(t,e){return!!f.tooltips[e]&&B(t.firstChild,f.cssClasses.tooltip)}function y(r,i,o){var t=document.createElement("div"),s="",a=[f.cssClasses.valueNormal,f.cssClasses.valueLarge,f.cssClasses.valueSub],l=[f.cssClasses.markerNormal,f.cssClasses.markerLarge,f.cssClasses.markerSub],u=[f.cssClasses.valueHorizontal,f.cssClasses.valueVertical],c=[f.cssClasses.markerHorizontal,f.cssClasses.markerVertical];function p(t,e,n){return'class="'+(r=n[1],o=(i=e)===f.cssClasses.value,s=o?a:l,i+" "+(o?u:c)[f.ort]+" "+s[r])+'" style="'+f.style+": "+t+'%"';var r,i,o,s}return I(t,f.cssClasses.pips),I(t,0===f.ort?f.cssClasses.pipsHorizontal:f.cssClasses.pipsVertical),Object.keys(r).forEach(function(t){var e,n;(n=r[e=t])[1]=n[1]&&i?i(n[0],n[1]):n[1],s+="<div "+p(e,f.cssClasses.marker,n)+"></div>",n[1]&&(s+="<div "+p(e,f.cssClasses.value,n)+">"+o.to(n[0])+"</div>")}),t.innerHTML=s,t}function r(t){var d,h,m,g,e,n,v,b,w,r=t.mode,i=t.density||1,o=t.filter||!1,s=function(t,e,n){if("range"===t||"steps"===t)return x.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 x.fromStepping(n?x.getStep(t):t)}):"values"===t?n?e.map(function(t){return x.fromStepping(x.getStep(x.toStepping(t)))}):e:void 0}(r,t.values||!1,t.stepped||!1),a=(d=i,h=r,m=s,g={},e=x.xVal[0],n=x.xVal[x.xVal.length-1],b=v=!1,w=0,(m=m.slice().sort(function(t,e){return t-e}).filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==e&&(m.unshift(e),v=!0),m[m.length-1]!==n&&(m.push(n),b=!0),m.forEach(function(t,e){var n,r,i,o,s,a,l,u,c,p=t,f=m[e+1];if("steps"===h&&(n=x.xNumSteps[e]),n||(n=f-p),!1!==p&&void 0!==f)for(n=Math.max(n,1e-7),r=p;r<=f;r=(r+n).toFixed(7)/1){for(l=(s=(o=x.toStepping(r))-w)/d,c=s/(u=Math.round(l)),i=1;i<=u;i+=1)g[(w+i*c).toFixed(5)]=["x",0];a=-1<m.indexOf(r)?1:"steps"===h?2:0,!e&&v&&(a=0),r===f&&b||(g[o.toFixed(5)]=[r,a]),w=o}}),g),l=t.format||{to:Math.round};return S.appendChild(y(a,o,l))}function w(){var t=a.getBoundingClientRect(),e="offset"+["Width","Height"][f.ort];return 0===f.ort?t.width||a[e]:t.height||a[e]}function E(r,e,i,o){var n=function(t){return!S.hasAttribute("disabled")&&(e=S,n=f.cssClasses.tap,(e.classList?!e.classList.contains(n):!new RegExp("\\b"+n+"\\b").test(e.className))&&(!!(t=function(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");0===t.type.indexOf("MSPointer")&&(s=!0);if(i){if(1<t.touches.length)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}e=e||W(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y);return t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}(t,o.pageOffset))&&(!(r===p.start&&void 0!==t.buttons&&1<t.buttons)&&((!o.hover||!t.buttons)&&(t.calcPoint=t.points[f.ort],void i(t,o))))));var e,n},s=[];return r.split(" ").forEach(function(t){e.addEventListener(t,n,!1),s.push([t,n])}),s}function C(t){var e,n,r,i,o,s=100*(t-(e=a,n=f.ort,r=e.getBoundingClientRect(),i=e.ownerDocument.documentElement,o=W(),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),n?r.top+o.y-i.clientTop:r.left+o.x-i.clientLeft))/w();return f.dir?100-s:s}function N(t,r,n,e){var i=n.slice(),o=[!t,t],s=[t,!t];e=e.slice(),t&&e.reverse(),1<e.length?e.forEach(function(t,e){var n=L(i,t,i[t]+r,o[e],s[e]);!1===n?r=0:(r=n-i[t],i[t]=n)}):o=s=[!0];var a=!1;e.forEach(function(t,e){a=z(t,n[t]+r,o[e],s[e])||a}),a&&e.forEach(function(t){U("update",t),U("slide",t)})}function U(n,r,i){Object.keys(v).forEach(function(t){var e=t.split(".")[0];n===e&&v[t].forEach(function(t){t.call(u,g.map(f.format.to),r,g.slice(),i||!1,d.slice())})})}function M(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&k(t,e)}function P(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return k(t,e);var n=(f.dir?-1:1)*(t.calcPoint-e.startCalcPoint);N(0<n,100*n/e.baseSize,e.locations,e.handleNumbers)}function k(t,e){m&&(_(m,f.cssClasses.active),m=!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])}),_(S,f.cssClasses.drag),j(),e.handleNumbers.forEach(function(t){U("set",t),U("change",t),U("end",t)})}function O(t,e){if(1===e.handleNumbers.length){var n=l[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;I(m=n.children[0],f.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=E(p.move,document.documentElement,P,{startCalcPoint:t.calcPoint,baseSize:w(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:d.slice()}),i=E(p.end,document.documentElement,k,{handleNumbers:e.handleNumbers}),o=E("mouseout",document.documentElement,M,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(i,o),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,1<l.length&&I(S,f.cssClasses.drag);var s=function(){return!1};document.body.noUiListener=s,document.body.addEventListener("selectstart",s,!1)}e.handleNumbers.forEach(function(t){U("start",t)})}function V(t){t.stopPropagation();var r,i,o,e=C(t.calcPoint),n=(r=e,o=!(i=100),l.forEach(function(t,e){if(!t.hasAttribute("disabled")){var n=Math.abs(d[e]-r);n<i&&(o=e,i=n)}}),o);if(!1===n)return!1;f.events.snap||X(S,f.cssClasses.tap,f.animationDuration),z(n,e,!0,!0),j(),U("slide",n,!0),U("set",n,!0),U("change",n,!0),U("update",n,!0),f.events.snap&&O(t,{handleNumbers:[n]})}function A(t){var e=C(t.calcPoint),n=x.getStep(e),r=x.fromStepping(n);Object.keys(v).forEach(function(t){"hover"===t.split(".")[0]&&v[t].forEach(function(t){t.call(u,r)})})}function L(t,e,n,r,i){var o;return 1<l.length&&(r&&0<e&&(n=Math.max(n,t[e-1]+f.margin)),i&&e<l.length-1&&(n=Math.min(n,t[e+1]-f.margin))),1<l.length&&f.limit&&(r&&0<e&&(n=Math.min(n,t[e-1]+f.limit)),i&&e<l.length-1&&(n=Math.max(n,t[e+1]-f.limit))),f.padding&&(0===e&&(n=Math.max(n,f.padding)),e===l.length-1&&(n=Math.min(n,100-f.padding))),n=x.getStep(n),o=n,(n=Math.max(Math.min(o,100),0))!==t[e]&&n}function F(t){return t+"%"}function j(){h.forEach(function(t){var e=50<d[t]?-1:1,n=3+(l.length+e*t);l[t].childNodes[0].style.zIndex=n})}function z(t,e,n,r){return!1!==(e=L(d,t,e,n,r))&&(function(t,e){d[t]=e,g[t]=x.fromStepping(e);var n=function(){l[t].style[f.style]=F(e),H(t),H(t+1)};window.requestAnimationFrame&&f.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}(t,e),!0)}function H(t){if(s[t]){var e=0,n=100;0!==t&&(e=d[t-1]),t!==s.length-1&&(n=d[t]),s[t].style[f.style]=F(e),s[t].style[f.styleOposite]=F(100-n)}}function D(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=f.format.from(t))||isNaN(t)||z(e,x.toStepping(t),!1,!1))}function T(t,e){var n=Y(t),r=void 0===d[0];e=void 0===e||!!e,n.forEach(D),f.animate&&!r&&X(S,f.cssClasses.tap,f.animationDuration),h.forEach(function(t){z(t,d[t],!0,!1)}),j(),h.forEach(function(t){U("update",t),null!==n[t]&&e&&U("set",t)})}function q(){var t=g.map(f.format.to);return 1===t.length?t[0]:t}function R(t,e){v[t]=v[t]||[],v[t].push(e),"update"===t.split(".")[0]&&l.forEach(function(t,e){U("update",e)})}if(S.noUiSlider)throw new Error("Slider was already initialized.");return I(e=S,f.cssClasses.target),0===f.dir?I(e,f.cssClasses.ltr):I(e,f.cssClasses.rtl),0===f.ort?I(e,f.cssClasses.horizontal):I(e,f.cssClasses.vertical),a=B(e,f.cssClasses.base),function(t,e){l=[],(s=[]).push(b(e,t[0]));for(var n=0;n<f.handles;n++)l.push((r=n,o=void 0,i=B(e,f.cssClasses.origin),B(o=B(i,f.cssClasses.handle),f.cssClasses.handleTouchArea),o.setAttribute("data-handle",r),0===r?I(o,f.cssClasses.handleLower):r===f.handles-1&&I(o,f.cssClasses.handleUpper),i)),h[n]=n,s.push(b(e,t[n+1]));var r,i,o}(f.connect,a),u={destroy:function(){for(var t in f.cssClasses)f.cssClasses.hasOwnProperty(t)&&_(S,f.cssClasses[t]);for(;S.firstChild;)S.removeChild(S.firstChild);delete S.noUiSlider},steps:function(){return d.map(function(t,e){var n=x.getNearbySteps(t),r=g[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=x.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:R,off:function(t){var r=t&&t.split(".")[0],i=r&&t.substring(r.length);Object.keys(v).forEach(function(t){var e=t.split(".")[0],n=t.substring(e.length);r&&r!==e||i&&i!==n||delete v[t]})},get:q,set:T,reset:function(t){T(f.start,t)},__moveHandles:function(t,e,n){N(t,e,d,n)},options:o,updateOptions:function(e,t){var n=q(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(t){void 0!==e[t]&&(o[t]=e[t])});var i=$(o);r.forEach(function(t){void 0!==e[t]&&(f[t]=i[t])}),i.spectrum.direction=x.direction,x=i.spectrum,f.margin=i.margin,f.limit=i.limit,f.padding=i.padding,d=[],T(e.start||n,t)},target:S,pips:r},(c=f.events).fixed||l.forEach(function(t,e){E(p.start,t.children[0],O,{handleNumbers:[e]})}),c.tap&&E(p.start,a,V,{}),c.hover&&E(p.move,a,A,{hover:!0}),c.drag&&s.forEach(function(t,e){if(!1!==t&&0!==e&&e!==s.length-1){var n=l[e-1],r=l[e],i=[t];I(t,f.cssClasses.draggable),c.fixed&&(i.push(n.children[0]),i.push(r.children[0])),i.forEach(function(t){E(p.start,t,O,{handles:[n,r],handleNumbers:[e-1,e]})})}}),T(f.start),f.pips&&r(f.pips),f.tooltips&&(i=l.map(n),R("update",function(t,e,n){if(i[e]){var r=t[e];!0!==f.tooltips[e]&&(r=f.tooltips[e].to(n[e])),i[e].innerHTML="<span>"+r+"</span>"}})),u}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=O(t,$(e),e);return t.noUiSlider=n}}});
@@ -0,0 +1,34 @@
1
+ /*
2
+ v2.2.0
3
+ 2017 Julian Garnier
4
+ Released under the MIT license
5
+ */
6
+ var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,r,p){if(p.get||p.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[r]=p.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
7
+ $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++};
8
+ $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var r=0;return $jscomp.iteratorPrototype(function(){return r<e.length?{done:!1,value:e[r++]}:{done:!0}})};
9
+ $jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};$jscomp.array=$jscomp.array||{};$jscomp.iteratorFromArray=function(e,r){$jscomp.initSymbolIterator();e instanceof String&&(e+="");var p=0,m={next:function(){if(p<e.length){var u=p++;return{value:r(u,e[u]),done:!1}}m.next=function(){return{done:!0,value:void 0}};return m.next()}};m[Symbol.iterator]=function(){return m};return m};
10
+ $jscomp.polyfill=function(e,r,p,m){if(r){p=$jscomp.global;e=e.split(".");for(m=0;m<e.length-1;m++){var u=e[m];u in p||(p[u]={});p=p[u]}e=e[e.length-1];m=p[e];r=r(m);r!=m&&null!=r&&$jscomp.defineProperty(p,e,{configurable:!0,writable:!0,value:r})}};$jscomp.polyfill("Array.prototype.keys",function(e){return e?e:function(){return $jscomp.iteratorFromArray(this,function(e){return e})}},"es6-impl","es3");var $jscomp$this=this;
11
+ (function(r){M.anime=r()})(function(){function e(a){if(!h.col(a))try{return document.querySelectorAll(a)}catch(c){}}function r(a,c){for(var d=a.length,b=2<=arguments.length?arguments[1]:void 0,f=[],n=0;n<d;n++)if(n in a){var k=a[n];c.call(b,k,n,a)&&f.push(k)}return f}function p(a){return a.reduce(function(a,d){return a.concat(h.arr(d)?p(d):d)},[])}function m(a){if(h.arr(a))return a;
12
+ h.str(a)&&(a=e(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function u(a,c){return a.some(function(a){return a===c})}function C(a){var c={},d;for(d in a)c[d]=a[d];return c}function D(a,c){var d=C(a),b;for(b in a)d[b]=c.hasOwnProperty(b)?c[b]:a[b];return d}function z(a,c){var d=C(a),b;for(b in c)d[b]=h.und(a[b])?c[b]:a[b];return d}function T(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,d,k){return c+c+d+d+k+k});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
13
+ a=parseInt(c[1],16);var d=parseInt(c[2],16),c=parseInt(c[3],16);return"rgba("+a+","+d+","+c+",1)"}function U(a){function c(a,c,b){0>b&&(b+=1);1<b&&--b;return b<1/6?a+6*(c-a)*b:.5>b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+
14
+ 255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1<a.indexOf("translate")||"perspective"===a)return"px";if(-1<a.indexOf("rotate")||-1<a.indexOf("skew"))return"deg"}function I(a,c){return h.fnc(a)?a(c.target,c.id,c.total):a}function E(a,c){if(c in a.style)return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function J(a,c){if(h.dom(a)&&
15
+ u(W,c))return"transform";if(h.dom(a)&&(a.getAttribute(c)||h.svg(a)&&a[c]))return"attribute";if(h.dom(a)&&"transform"!==c&&E(a,c))return"css";if(null!=a[c])return"object"}function X(a,c){var d=V(c),d=-1<c.indexOf("scale")?1:0+d;a=a.style.transform;if(!a)return d;for(var b=[],f=[],n=[],k=/(\w+)\((.+?)\)/g;b=k.exec(a);)f.push(b[1]),n.push(b[2]);a=r(n,function(a,b){return f[b]===c});return a.length?a[0]:d}function K(a,c){switch(J(a,c)){case "transform":return X(a,c);case "css":return E(a,c);case "attribute":return a.getAttribute(c)}return a[c]||
16
+ 0}function L(a,c){var d=/^(\*=|\+=|-=)/.exec(a);if(!d)return a;var b=y(a)||0;c=parseFloat(c);a=parseFloat(a.replace(d[0],""));switch(d[0][0]){case "+":return c+a+b;case "-":return c-a+b;case "*":return c*a+b}}function F(a,c){return Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2))}function M(a){a=a.points;for(var c=0,d,b=0;b<a.numberOfItems;b++){var f=a.getItem(b);0<b&&(c+=F(d,f));d=f}return c}function N(a){if(a.getTotalLength)return a.getTotalLength();switch(a.tagName.toLowerCase()){case "circle":return 2*
17
+ Math.PI*a.getAttribute("r");case "rect":return 2*a.getAttribute("width")+2*a.getAttribute("height");case "line":return F({x:a.getAttribute("x1"),y:a.getAttribute("y1")},{x:a.getAttribute("x2"),y:a.getAttribute("y2")});case "polyline":return M(a);case "polygon":var c=a.points;return M(a)+F(c.getItem(c.numberOfItems-1),c.getItem(0))}}function Y(a,c){function d(b){b=void 0===b?0:b;return a.el.getPointAtLength(1<=c+b?c+b:0)}var b=d(),f=d(-1),n=d(1);switch(a.property){case "x":return b.x;case "y":return b.y;
18
+ case "angle":return 180*Math.atan2(n.y-f.y,n.x-f.x)/Math.PI}}function O(a,c){var d=/-?\d*\.?\d+/g,b;b=h.pth(a)?a.totalLength:a;if(h.col(b))if(h.rgb(b)){var f=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b=f?"rgba("+f[1]+",1)":b}else b=h.hex(b)?T(b):h.hsl(b)?U(b):void 0;else f=(f=y(b))?b.substr(0,b.length-f.length):b,b=c&&!/\s/g.test(b)?f+c:f;b+="";return{original:b,numbers:b.match(d)?b.match(d).map(Number):[0],strings:h.str(a)||c?b.split(d):[]}}function P(a){a=a?p(h.arr(a)?a.map(m):m(a)):[];return r(a,
19
+ function(a,d,b){return b.indexOf(a)===d})}function Z(a){var c=P(a);return c.map(function(a,b){return{target:a,id:b,total:c.length}})}function aa(a,c){var d=C(c);if(h.arr(a)){var b=a.length;2!==b||h.obj(a[0])?h.fnc(c.duration)||(d.duration=c.duration/b):a={value:a}}return m(a).map(function(a,b){b=b?0:c.delay;a=h.obj(a)&&!h.pth(a)?a:{value:a};h.und(a.delay)&&(a.delay=b);return a}).map(function(a){return z(a,d)})}function ba(a,c){var d={},b;for(b in a){var f=I(a[b],c);h.arr(f)&&(f=f.map(function(a){return I(a,
20
+ c)}),1===f.length&&(f=f[0]));d[b]=f}d.duration=parseFloat(d.duration);d.delay=parseFloat(d.delay);return d}function ca(a){return h.arr(a)?A.apply(this,a):Q[a]}function da(a,c){var d;return a.tweens.map(function(b){b=ba(b,c);var f=b.value,e=K(c.target,a.name),k=d?d.to.original:e,k=h.arr(f)?f[0]:k,w=L(h.arr(f)?f[1]:f,k),e=y(w)||y(k)||y(e);b.from=O(k,e);b.to=O(w,e);b.start=d?d.end:a.offset;b.end=b.start+b.delay+b.duration;b.easing=ca(b.easing);b.elasticity=(1E3-Math.min(Math.max(b.elasticity,1),999))/
21
+ 1E3;b.isPath=h.pth(f);b.isColor=h.col(b.from.original);b.isColor&&(b.round=1);return d=b})}function ea(a,c){return r(p(a.map(function(a){return c.map(function(b){var c=J(a.target,b.name);if(c){var d=da(b,a);b={type:c,property:b.name,animatable:a,tweens:d,duration:d[d.length-1].end,delay:d[0].delay}}else b=void 0;return b})})),function(a){return!h.und(a)})}function R(a,c,d,b){var f="delay"===a;return c.length?(f?Math.min:Math.max).apply(Math,c.map(function(b){return b[a]})):f?b.delay:d.offset+b.delay+
22
+ b.duration}function fa(a){var c=D(ga,a),d=D(S,a),b=Z(a.targets),f=[],e=z(c,d),k;for(k in a)e.hasOwnProperty(k)||"targets"===k||f.push({name:k,offset:e.offset,tweens:aa(a[k],d)});a=ea(b,f);return z(c,{children:[],animatables:b,animations:a,duration:R("duration",a,c,d),delay:R("delay",a,c,d)})}function q(a){function c(){return window.Promise&&new Promise(function(a){return p=a})}function d(a){return g.reversed?g.duration-a:a}function b(a){for(var b=0,c={},d=g.animations,f=d.length;b<f;){var e=d[b],
23
+ k=e.animatable,h=e.tweens,n=h.length-1,l=h[n];n&&(l=r(h,function(b){return a<b.end})[0]||l);for(var h=Math.min(Math.max(a-l.start-l.delay,0),l.duration)/l.duration,w=isNaN(h)?1:l.easing(h,l.elasticity),h=l.to.strings,p=l.round,n=[],m=void 0,m=l.to.numbers.length,t=0;t<m;t++){var x=void 0,x=l.to.numbers[t],q=l.from.numbers[t],x=l.isPath?Y(l.value,w*x):q+w*(x-q);p&&(l.isColor&&2<t||(x=Math.round(x*p)/p));n.push(x)}if(l=h.length)for(m=h[0],w=0;w<l;w++)p=h[w+1],t=n[w],isNaN(t)||(m=p?m+(t+p):m+(t+" "));
24
+ else m=n[0];ha[e.type](k.target,e.property,m,c,k.id);e.currentValue=m;b++}if(b=Object.keys(c).length)for(d=0;d<b;d++)H||(H=E(document.body,"transform")?"transform":"-webkit-transform"),g.animatables[d].target.style[H]=c[d].join(" ");g.currentTime=a;g.progress=a/g.duration*100}function f(a){if(g[a])g[a](g)}function e(){g.remaining&&!0!==g.remaining&&g.remaining--}function k(a){var k=g.duration,n=g.offset,w=n+g.delay,r=g.currentTime,x=g.reversed,q=d(a);if(g.children.length){var u=g.children,v=u.length;
25
+ if(q>=g.currentTime)for(var G=0;G<v;G++)u[G].seek(q);else for(;v--;)u[v].seek(q)}if(q>=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q<k)b(q);else if(q<=n&&0!==r&&(b(0),x&&e()),q>=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime=
26
+ 0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1<a&&v.splice(a,1);g.paused=!0};g.play=function(){g.paused&&(g.paused=!1,t=0,l=d(g.currentTime),v.push(g),B||ia())};g.reverse=function(){g.reversed=!g.reversed;t=0;l=d(g.currentTime)};g.restart=function(){g.pause();
27
+ g.reset();g.play()};g.finished=m;g.reset();g.autoplay&&g.play();return g}var ga={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},S={duration:1E3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},W="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),H,h={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<Object.prototype.toString.call(a).indexOf("Object")},
28
+ pth:function(a){return h.obj(a)&&a.hasOwnProperty("totalLength")},svg:function(a){return a instanceof SVGElement},dom:function(a){return a.nodeType||h.svg(a)},str:function(a){return"string"===typeof a},fnc:function(a){return"function"===typeof a},und:function(a){return"undefined"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},col:function(a){return h.hex(a)||h.rgb(a)||h.hsl(a)}},A=function(){function a(a,
29
+ d,b){return(((1-3*b+3*d)*a+(3*b-6*d))*a+3*d)*a}return function(c,d,b,f){if(0<=c&&1>=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0===
30
+ n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0<n?h=m:l=m;while(1e-7<Math.abs(n)&&10>++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25,
31
+ .46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)?
32
+ d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;d<b;)v[d]&&v[d].tick(c),d++;a()}else cancelAnimationFrame(B),B=0}return a}();q.version="2.2.0";q.speed=1;q.running=v;q.remove=
33
+ function(a){a=P(a);for(var c=v.length;c--;)for(var d=v[c],b=d.animations,f=b.length;f--;)u(a,b[f].animatable.target)&&(b.splice(f,1),b.length||d.pause())};q.getValue=K;q.path=function(a,c){var d=h.str(a)?e(a)[0]:a,b=c||100;return function(a){return{el:d,property:a,totalLength:N(d)*(b/100)}}};q.setDashoffset=function(a){var c=N(a);a.setAttribute("stroke-dasharray",c);return c};q.bezier=A;q.easings=Q;q.timeline=function(a){var c=q(a);c.pause();c.duration=0;c.add=function(d){c.children.forEach(function(a){a.began=
34
+ !0;a.completed=!0});m(d).forEach(function(b){var d=z(b,D(S,a||{}));d.targets=d.targets||a.targets;b=c.duration;var e=d.offset;d.autoplay=!1;d.direction=c.direction;d.offset=h.und(e)?b:L(e,b);c.began=!0;c.completed=!0;c.seek(d.offset);d=q(d);d.began=!0;d.completed=!0;d.duration>b&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q});
@@ -0,0 +1,448 @@
1
+ (function($) {
2
+ 'use strict';
3
+
4
+ let _defaults = {
5
+ data: {}, // Autocomplete data set
6
+ limit: Infinity, // Limit of results the autocomplete shows
7
+ onAutocomplete: null, // Callback for when autocompleted
8
+ minLength: 1, // Min characters before autocomplete starts
9
+ sortFunction: function(a, b, inputString) {
10
+ // Sort function for sorting autocomplete results
11
+ return a.indexOf(inputString) - b.indexOf(inputString);
12
+ }
13
+ };
14
+
15
+ /**
16
+ * @class
17
+ *
18
+ */
19
+ class Autocomplete extends Component {
20
+ /**
21
+ * Construct Autocomplete instance
22
+ * @constructor
23
+ * @param {Element} el
24
+ * @param {Object} options
25
+ */
26
+ constructor(el, options) {
27
+ super(Autocomplete, el, options);
28
+
29
+ this.el.M_Autocomplete = this;
30
+
31
+ /**
32
+ * Options for the autocomplete
33
+ * @member Autocomplete#options
34
+ * @prop {Number} duration
35
+ * @prop {Number} dist
36
+ * @prop {number} shift
37
+ * @prop {number} padding
38
+ * @prop {Boolean} fullWidth
39
+ * @prop {Boolean} indicators
40
+ * @prop {Boolean} noWrap
41
+ * @prop {Function} onCycleTo
42
+ */
43
+ this.options = $.extend({}, Autocomplete.defaults, options);
44
+
45
+ // Setup
46
+ this.isOpen = false;
47
+ this.count = 0;
48
+ this.activeIndex = -1;
49
+ this.oldVal;
50
+ this.$inputField = this.$el.closest('.input-field');
51
+ this.$active = $();
52
+ this._mousedown = false;
53
+ this._setupDropdown();
54
+
55
+ this._setupEventHandlers();
56
+ }
57
+
58
+ static get defaults() {
59
+ return _defaults;
60
+ }
61
+
62
+ static init(els, options) {
63
+ return super.init(this, els, options);
64
+ }
65
+
66
+ /**
67
+ * Get Instance
68
+ */
69
+ static getInstance(el) {
70
+ let domElem = !!el.jquery ? el[0] : el;
71
+ return domElem.M_Autocomplete;
72
+ }
73
+
74
+ /**
75
+ * Teardown component
76
+ */
77
+ destroy() {
78
+ this._removeEventHandlers();
79
+ this._removeDropdown();
80
+ this.el.M_Autocomplete = undefined;
81
+ }
82
+
83
+ /**
84
+ * Setup Event Handlers
85
+ */
86
+ _setupEventHandlers() {
87
+ this._handleInputBlurBound = this._handleInputBlur.bind(this);
88
+ this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this);
89
+ this._handleInputKeydownBound = this._handleInputKeydown.bind(this);
90
+ this._handleInputClickBound = this._handleInputClick.bind(this);
91
+ this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(
92
+ this
93
+ );
94
+ this._handleContainerMouseupAndTouchendBound = this._handleContainerMouseupAndTouchend.bind(
95
+ this
96
+ );
97
+
98
+ this.el.addEventListener('blur', this._handleInputBlurBound);
99
+ this.el.addEventListener('keyup', this._handleInputKeyupAndFocusBound);
100
+ this.el.addEventListener('focus', this._handleInputKeyupAndFocusBound);
101
+ this.el.addEventListener('keydown', this._handleInputKeydownBound);
102
+ this.el.addEventListener('click', this._handleInputClickBound);
103
+ this.container.addEventListener(
104
+ 'mousedown',
105
+ this._handleContainerMousedownAndTouchstartBound
106
+ );
107
+ this.container.addEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
108
+
109
+ if (typeof window.ontouchstart !== 'undefined') {
110
+ this.container.addEventListener(
111
+ 'touchstart',
112
+ this._handleContainerMousedownAndTouchstartBound
113
+ );
114
+ this.container.addEventListener('touchend', this._handleContainerMouseupAndTouchendBound);
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Remove Event Handlers
120
+ */
121
+ _removeEventHandlers() {
122
+ this.el.removeEventListener('blur', this._handleInputBlurBound);
123
+ this.el.removeEventListener('keyup', this._handleInputKeyupAndFocusBound);
124
+ this.el.removeEventListener('focus', this._handleInputKeyupAndFocusBound);
125
+ this.el.removeEventListener('keydown', this._handleInputKeydownBound);
126
+ this.el.removeEventListener('click', this._handleInputClickBound);
127
+ this.container.removeEventListener(
128
+ 'mousedown',
129
+ this._handleContainerMousedownAndTouchstartBound
130
+ );
131
+ this.container.removeEventListener('mouseup', this._handleContainerMouseupAndTouchendBound);
132
+
133
+ if (typeof window.ontouchstart !== 'undefined') {
134
+ this.container.removeEventListener(
135
+ 'touchstart',
136
+ this._handleContainerMousedownAndTouchstartBound
137
+ );
138
+ this.container.removeEventListener(
139
+ 'touchend',
140
+ this._handleContainerMouseupAndTouchendBound
141
+ );
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Setup dropdown
147
+ */
148
+ _setupDropdown() {
149
+ this.container = document.createElement('ul');
150
+ this.container.id = `autocomplete-options-${M.guid()}`;
151
+ $(this.container).addClass('autocomplete-content dropdown-content');
152
+ this.$inputField.append(this.container);
153
+ this.el.setAttribute('data-target', this.container.id);
154
+
155
+ this.dropdown = M.Dropdown.init(this.el, {
156
+ autoFocus: false,
157
+ closeOnClick: false,
158
+ coverTrigger: false,
159
+ onItemClick: (itemEl) => {
160
+ this.selectOption($(itemEl));
161
+ }
162
+ });
163
+
164
+ // Sketchy removal of dropdown click handler
165
+ this.el.removeEventListener('click', this.dropdown._handleClickBound);
166
+ }
167
+
168
+ /**
169
+ * Remove dropdown
170
+ */
171
+ _removeDropdown() {
172
+ this.container.parentNode.removeChild(this.container);
173
+ }
174
+
175
+ /**
176
+ * Handle Input Blur
177
+ */
178
+ _handleInputBlur() {
179
+ if (!this._mousedown) {
180
+ this.close();
181
+ this._resetAutocomplete();
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Handle Input Keyup and Focus
187
+ * @param {Event} e
188
+ */
189
+ _handleInputKeyupAndFocus(e) {
190
+ if (e.type === 'keyup') {
191
+ Autocomplete._keydown = false;
192
+ }
193
+
194
+ this.count = 0;
195
+ let val = this.el.value.toLowerCase();
196
+
197
+ // Don't capture enter or arrow key usage.
198
+ if (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40) {
199
+ return;
200
+ }
201
+
202
+ // Check if the input isn't empty
203
+ // Check if focus triggered by tab
204
+ if (this.oldVal !== val && (M.tabPressed || e.type !== 'focus')) {
205
+ this.open();
206
+ }
207
+
208
+ // Update oldVal
209
+ this.oldVal = val;
210
+ }
211
+
212
+ /**
213
+ * Handle Input Keydown
214
+ * @param {Event} e
215
+ */
216
+ _handleInputKeydown(e) {
217
+ Autocomplete._keydown = true;
218
+
219
+ // Arrow keys and enter key usage
220
+ let keyCode = e.keyCode,
221
+ liElement,
222
+ numItems = $(this.container).children('li').length;
223
+
224
+ // select element on Enter
225
+ if (keyCode === M.keys.ENTER && this.activeIndex >= 0) {
226
+ liElement = $(this.container)
227
+ .children('li')
228
+ .eq(this.activeIndex);
229
+ if (liElement.length) {
230
+ this.selectOption(liElement);
231
+ e.preventDefault();
232
+ }
233
+ return;
234
+ }
235
+
236
+ // Capture up and down key
237
+ if (keyCode === M.keys.ARROW_UP || keyCode === M.keys.ARROW_DOWN) {
238
+ e.preventDefault();
239
+
240
+ if (keyCode === M.keys.ARROW_UP && this.activeIndex > 0) {
241
+ this.activeIndex--;
242
+ }
243
+
244
+ if (keyCode === M.keys.ARROW_DOWN && this.activeIndex < numItems - 1) {
245
+ this.activeIndex++;
246
+ }
247
+
248
+ this.$active.removeClass('active');
249
+ if (this.activeIndex >= 0) {
250
+ this.$active = $(this.container)
251
+ .children('li')
252
+ .eq(this.activeIndex);
253
+ this.$active.addClass('active');
254
+ }
255
+ }
256
+ }
257
+
258
+ /**
259
+ * Handle Input Click
260
+ * @param {Event} e
261
+ */
262
+ _handleInputClick(e) {
263
+ this.open();
264
+ }
265
+
266
+ /**
267
+ * Handle Container Mousedown and Touchstart
268
+ * @param {Event} e
269
+ */
270
+ _handleContainerMousedownAndTouchstart(e) {
271
+ this._mousedown = true;
272
+ }
273
+
274
+ /**
275
+ * Handle Container Mouseup and Touchend
276
+ * @param {Event} e
277
+ */
278
+ _handleContainerMouseupAndTouchend(e) {
279
+ this._mousedown = false;
280
+ }
281
+
282
+ /**
283
+ * Highlight partial match
284
+ */
285
+ _highlight(string, $el) {
286
+ let img = $el.find('img');
287
+ let matchStart = $el
288
+ .text()
289
+ .toLowerCase()
290
+ .indexOf('' + string.toLowerCase() + ''),
291
+ matchEnd = matchStart + string.length - 1,
292
+ beforeMatch = $el.text().slice(0, matchStart),
293
+ matchText = $el.text().slice(matchStart, matchEnd + 1),
294
+ afterMatch = $el.text().slice(matchEnd + 1);
295
+ $el.html(
296
+ `<span>${beforeMatch}<span class='highlight'>${matchText}</span>${afterMatch}</span>`
297
+ );
298
+ if (img.length) {
299
+ $el.prepend(img);
300
+ }
301
+ }
302
+
303
+ /**
304
+ * Reset current element position
305
+ */
306
+ _resetCurrentElement() {
307
+ this.activeIndex = -1;
308
+ this.$active.removeClass('active');
309
+ }
310
+
311
+ /**
312
+ * Reset autocomplete elements
313
+ */
314
+ _resetAutocomplete() {
315
+ $(this.container).empty();
316
+ this._resetCurrentElement();
317
+ this.oldVal = null;
318
+ this.isOpen = false;
319
+ this._mousedown = false;
320
+ }
321
+
322
+ /**
323
+ * Select autocomplete option
324
+ * @param {Element} el Autocomplete option list item element
325
+ */
326
+ selectOption(el) {
327
+ let text = el.text().trim();
328
+ this.el.value = text;
329
+ this.$el.trigger('change');
330
+ this._resetAutocomplete();
331
+ this.close();
332
+
333
+ // Handle onAutocomplete callback.
334
+ if (typeof this.options.onAutocomplete === 'function') {
335
+ this.options.onAutocomplete.call(this, text);
336
+ }
337
+ }
338
+
339
+ /**
340
+ * Render dropdown content
341
+ * @param {Object} data data set
342
+ * @param {String} val current input value
343
+ */
344
+ _renderDropdown(data, val) {
345
+ this._resetAutocomplete();
346
+
347
+ let matchingData = [];
348
+
349
+ // Gather all matching data
350
+ for (let key in data) {
351
+ if (data.hasOwnProperty(key) && key.toLowerCase().indexOf(val) !== -1) {
352
+ let entry = {
353
+ data: data[key],
354
+ key: key
355
+ };
356
+ matchingData.push(entry);
357
+
358
+ this.count++;
359
+ }
360
+ }
361
+
362
+ // Sort
363
+ if (this.options.sortFunction) {
364
+ let sortFunctionBound = (a, b) => {
365
+ return this.options.sortFunction(
366
+ a.key.toLowerCase(),
367
+ b.key.toLowerCase(),
368
+ val.toLowerCase()
369
+ );
370
+ };
371
+ matchingData.sort(sortFunctionBound);
372
+ }
373
+
374
+ // Limit
375
+ matchingData = matchingData.slice(0, this.options.limit);
376
+
377
+ // Render
378
+ for (let i = 0; i < matchingData.length; i++) {
379
+ let entry = matchingData[i];
380
+ let $autocompleteOption = $('<li></li>');
381
+ if (!!entry.data) {
382
+ $autocompleteOption.append(
383
+ `<img src="${entry.data}" class="right circle"><span>${entry.key}</span>`
384
+ );
385
+ } else {
386
+ $autocompleteOption.append('<span>' + entry.key + '</span>');
387
+ }
388
+
389
+ $(this.container).append($autocompleteOption);
390
+ this._highlight(val, $autocompleteOption);
391
+ }
392
+ }
393
+
394
+ /**
395
+ * Open Autocomplete Dropdown
396
+ */
397
+ open() {
398
+ let val = this.el.value.toLowerCase();
399
+
400
+ this._resetAutocomplete();
401
+
402
+ if (val.length >= this.options.minLength) {
403
+ this.isOpen = true;
404
+ this._renderDropdown(this.options.data, val);
405
+ }
406
+
407
+ // Open dropdown
408
+ if (!this.dropdown.isOpen) {
409
+ this.dropdown.open();
410
+ } else {
411
+ // Recalculate dropdown when its already open
412
+ this.dropdown.recalculateDimensions();
413
+ }
414
+ }
415
+
416
+ /**
417
+ * Close Autocomplete Dropdown
418
+ */
419
+ close() {
420
+ this.dropdown.close();
421
+ }
422
+
423
+ /**
424
+ * Update Data
425
+ * @param {Object} data
426
+ */
427
+ updateData(data) {
428
+ let val = this.el.value.toLowerCase();
429
+ this.options.data = data;
430
+
431
+ if (this.isOpen) {
432
+ this._renderDropdown(data, val);
433
+ }
434
+ }
435
+ }
436
+
437
+ /**
438
+ * @static
439
+ * @memberof Autocomplete
440
+ */
441
+ Autocomplete._keydown = false;
442
+
443
+ M.Autocomplete = Autocomplete;
444
+
445
+ if (M.jQueryLoaded) {
446
+ M.initializeJqueryWrapper(Autocomplete, 'autocomplete', 'M_Autocomplete');
447
+ }
448
+ })(cash);