function GradientCanvas(t,e,n){this._colorStops=[],this._alphaStops=[],this.angle=n||0==n?n:90,t=t||[];for(var i=0;t.length>i;i++)this.addColorStop(t[i].offset,t[i].color);e=e||[];for(var i=0;e.length>i;i++)this.addAlphaStop(e[i].offset,e[i].alpha)}function pickHex(t,e,n){var i=n,o=2*i-1,r=(o/1+1)/2,s=1-r;return[Math.round(t[0]*r+e[0]*s),Math.round(t[1]*r+e[1]*s),Math.round(t[2]*r+e[2]*s)]}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.one=t.one||{},t.one.color=e())}(this,function(){"use strict";function t(e){if(Array.isArray(e)){if("string"==typeof e[0]&&"function"==typeof t[e[0]])return new t[e[0]](e.slice(1,e.length));if(4===e.length)return new t.RGB(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}else if("string"==typeof e){var i=e.toLowerCase();t.namedColors[i]&&(e="#"+t.namedColors[i]),"transparent"===i&&(e="rgba(0,0,0,0)");var s=e.match(r);if(s){var a=s[1].toUpperCase(),u=n(s[8])?s[8]:parseFloat(s[8]),c="H"===a[0],l=s[3]?100:c?360:255,p=s[5]||c?100:255,d=s[7]||c?100:255;if(n(t[a]))throw new Error("color."+a+" is not installed.");return new t[a](parseFloat(s[2])/l,parseFloat(s[4])/p,parseFloat(s[6])/d,u)}e.length<6&&(e=e.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var f=e.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(f)return new t.RGB(parseInt(f[1],16)/255,parseInt(f[2],16)/255,parseInt(f[3],16)/255);if(t.CMYK){var h=e.match(new RegExp("^cmyk\\("+o.source+","+o.source+","+o.source+","+o.source+"\\)$","i"));if(h)return new t.CMYK(parseFloat(h[1])/100,parseFloat(h[2])/100,parseFloat(h[3])/100,parseFloat(h[4])/100)}}else if("object"==typeof e&&e.isColor)return e;return!1}var e=[],n=function(t){return void 0===t},i=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,o=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,r=new RegExp("^(rgb|hsl|hsv)a?\\("+i.source+","+i.source+","+i.source+"(?:,"+/\s*(\.\d+|\d+(?:\.\d+)?)\s*/.source+")?\\)$","i");t.namedColors={},t.installColorSpace=function(i,o,r){function s(e,n){var i={};i[n.toLowerCase()]=function(){return this.rgb()[n.toLowerCase()]()},t[n].propertyNames.forEach(function(t){var e="black"===t?"k":t.charAt(0);i[t]=i[e]=function(e,i){return this[n.toLowerCase()]()[t](e,i)}});for(var o in i)i.hasOwnProperty(o)&&void 0===t[e].prototype[o]&&(t[e].prototype[o]=i[o])}t[i]=function(t){var e=Array.isArray(t)?t:arguments;o.forEach(function(t,n){var r=e[n];if("alpha"===t)this._alpha=isNaN(r)||r>1?1:r<0?0:r;else{if(isNaN(r))throw new Error("["+i+"]: Invalid color: ("+o.join(",")+")");"hue"===t?this._hue=r<0?r-Math.floor(r):r%1:this["_"+t]=r<0?0:r>1?1:r}},this)},t[i].propertyNames=o;var a=t[i].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(t){a[t]=a[t]||("RGB"===i?a.hex:function(){return this.rgb()[t]()})}),a.isColor=!0,a.equals=function(t,e){n(e)&&(e=1e-10),t=t[i.toLowerCase()]();for(var r=0;re)return!1;return!0},a.toJSON=function(){return[i].concat(o.map(function(t){return this["_"+t]},this))};for(var u in r)if(r.hasOwnProperty(u)){var c=u.match(/^from(.*)$/);c?t[c[1].toUpperCase()].prototype[i.toLowerCase()]=r[u]:a[u]=r[u]}return a[i.toLowerCase()]=function(){return this},a.toString=function(){return"["+i+" "+o.map(function(t){return this["_"+t]},this).join(", ")+"]"},o.forEach(function(t){var e="black"===t?"k":t.charAt(0);a[t]=a[e]=function(e,n){return void 0===e?this["_"+t]:n?new this.constructor(o.map(function(n){return this["_"+n]+(t===n?e:0)},this)):new this.constructor(o.map(function(n){return t===n?e:this["_"+n]},this))}}),e.forEach(function(t){s(i,t),s(t,i)}),e.push(i),t},t.pluginList=[],t.use=function(e){return-1===t.pluginList.indexOf(e)&&(this.pluginList.push(e),e(t)),t},t.installMethod=function(n,i){return e.forEach(function(e){t[e].prototype[n]=i}),this},t.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var t=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-t.length)+t},hexa:function(){var t=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-t.length)+t+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}});var s=t,a=function(t){t.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e,n,i,o=this._hue,r=this._saturation,s=this._value,a=Math.min(5,Math.floor(6*o)),u=6*o-a,c=s*(1-r),l=s*(1-u*r),p=s*(1-(1-u)*r);switch(a){case 0:e=s,n=p,i=c;break;case 1:e=l,n=s,i=c;break;case 2:e=c,n=s,i=p;break;case 3:e=c,n=l,i=s;break;case 4:e=p,n=c,i=s;break;case 5:e=s,n=c,i=l}return new t.RGB(e,n,i,this._alpha)},hsl:function(){var e,n=(2-this._saturation)*this._value,i=this._saturation*this._value,o=n<=1?n:2-n;return e=o<1e-9?0:i/o,new t.HSL(this._hue,e,n/2,this._alpha)},fromRgb:function(){var e,n=this._red,i=this._green,o=this._blue,r=Math.max(n,i,o),s=Math.min(n,i,o),a=r-s,u=0===r?0:a/r,c=r;if(0===a)e=0;else switch(r){case n:e=(i-o)/a/6+(i=0?n.fix:0,c=C(a)?(""+a).length+u:4;c=u?c+1:c;var l=s.split(""),p="A"==s[s.length-1];if(s=p?s.slice(0,-1):s,["RGB","RGBA","HSL","HSV","CMYK"].indexOf(s)<0)return console.warn("Invalid field names",s);var d=k.div("colorFields",t),f=l.map(function(t){t=t.toLowerCase();var e=k.labelInput("color "+t,t,d,c);return e.input.onblur=i,e.input.onkeydown=o,e.input.onkeyup=r,{name:t,e:e}});return{change:function(t){f.forEach(function(e,n){a instanceof Array?e.e.input.value=(t[e.name]()*a[n]).toFixed(u):e.e.input.value=(t[e.name]()*a).toFixed(u)})}}}function d(t,e){function n(){e.done()}function i(t){var n=k.clamp(t.x,0,1);k.X(t.pointer,n),e.setAlpha(1-n)}var o=O.slider({parent:t,"class":"oned alpha",cbs:{begin:i,change:i,end:n}});return{change:function(t){k.X(o.pointer,1-t.alpha())}}}function f(t,e,n){var i=k.labelInput("hex",n.label||"hex",t,7);return i.input.value="#",i.input.onkeyup=function(t){var n=t.keyCode||t.which,i=t.target.value;i="#"==i[0]?i:"#"+i,i=g(i,7,"0"),13==n&&e.set(i)},i.input.onblur=function(t){e.set(t.target.value),e.done()},{change:function(t){i.input.value="#"==i.input.value[0]?"#":"",i.input.value+=t.hex().slice(1)}}}function h(t,e,n){var i=k.e("a",n["class"]||"close",t);i.href="#",i.innerHTML=n.label||"Close",i.onclick=function(t){t.preventDefault(),e.hide()}}function g(t,e,n){for(var i=t,o=t.length;o1?t[1]:{}):(o=t,r={});var a=o in P._extras?P._extras[o]:null;if(a){i=a(s,w(e,o+n),r);for(var u in i)e.on(u,i[u],o)}}})}}function w(t,e){var n=S(t);return n.update=function(){t.update([e])},n}function S(t){var e={};for(var n in t)e[n]=t[n];return e}function E(t,e){return e.map(t).filter(M).length==e.length}function C(t){return"[object Array]"===Object.prototype.toString.call(t)}function T(t){return"string"==typeof t}function _(t){return void 0!==t}function I(t){return"function"==typeof t}function M(t){return t}/*! colorjoe - v2.0.0 - Juho Vepsalainen - MIT https://bebraw.github.com/colorjoe - 2016-08-12 */ /*! dragjs - v0.7.0 - Juho Vepsalainen - MIT https://bebraw.github.com/dragjs - 2016-08-12 */ var O=function(){function t(t,e){if(!t)return void console.warn("drag is missing elem!");s(t,e,"touchstart","touchmove","touchend"),s(t,e,"mousedown","mousemove","mouseup")}function e(e){var n=o(e["class"]||"",e.parent),r=o("pointer",n);return o("shape shape1",r),o("shape shape2",r),o("bg bg1",n),o("bg bg2",n),t(n,i(e.cbs,r)),{background:n,pointer:r}}function n(e){var n=o(e["class"],e.parent),r=o("pointer",n);o("shape",r);var s=o("bg",n);return e&&"oned alpha"===e["class"]&&o("bg-color js-alpha-color",s),t(n,i(e.cbs,r)),{background:n,pointer:r}}function i(t,e){function n(t){return function(n){n.pointer=e,t(n)}}var i={};for(var o in t)i[o]=n(t[o]);return i}function o(t,e){return r("div",t,e)}function r(t,e,n){var i=document.createElement(t);return e&&(i.className=e),n.appendChild(i),i}function s(t,e,n,i,o){var r=!1;e=c(e);var s=e.begin,l=e.change,p=e.end;a(t,n,function(e){function n(){r=!1,u(document,i,c),u(document,o,n),d(p,t,e)}r=!0;var c=f(d,l,t);a(document,i,c),a(document,o,n),d(s,t,e)})}function a(t,e,n){t.addEventListener(e,n,!1)}function u(t,e,n){t.removeEventListener(e,n,!1)}function c(t){if(t)return{begin:t.begin||p,change:t.change||p,end:t.end||p};var e,n;return{begin:function(t){e={x:t.elem.offsetLeft,y:t.elem.offsetTop},n=t.cursor},change:function(t){l(t.elem,"left",e.x+t.cursor.x-n.x+"px"),l(t.elem,"top",e.y+t.cursor.y-n.y+"px")},end:p}}function l(t,e,n){t.style[e]=n}function p(){}function d(t,e,n){n.preventDefault();var i=h(e),o=e.clientWidth,r=e.clientHeight,s={x:g(e,n),y:v(e,n)},a=(s.x-i.x)/o,u=(s.y-i.y)/r;t({x:isNaN(a)?0:a,y:isNaN(u)?0:u,cursor:s,elem:e,e:n})}function f(t){var e=Array.prototype.slice,n=e.apply(arguments,[1]);return function(){return t.apply(null,n.concat(e.apply(arguments)))}}function h(t){var e=t.getBoundingClientRect();return{x:e.left,y:e.top}}function g(t,e){return(e.touches?e.touches[e.touches.length-1]:e).clientX}function v(t,e){return(e.touches?e.touches[e.touches.length-1]:e).clientY}return t.xyslider=e,t.slider=n,t}(),z=n(e,"div"),k={clamp:c,e:e,div:z,partial:n,labelInput:i,X:s,Y:a,BG:u},A={currentColor:l,fields:p,hex:f,alpha:d,close:h},P=function(t){return E(I,[t.init,t.xy,t.z])?function(e,n,i){return m({e:e,color:n,cbs:t,extras:i})}:console.warn("colorjoe: missing cb")};P.rgb=P({init:function(e,n,i){var o=t(e).hsv();return this.xy(o,{x:o.saturation(),y:1-o.value()},n,i),this.z(o,o.hue(),n,i),o},xy:function(t,e,n){return k.X(n.pointer,e.x),k.Y(n.pointer,e.y),t.saturation(e.x).value(1-e.y)},z:function(t,e,n,i){return k.X(i.pointer,e),v(n.background,e),t.hue(e)}}),P.hsl=P({init:function(e,n,i){var o=t(e).hsl();return this.xy(o,{x:o.hue(),y:1-o.saturation()},n,i),this.z(o,1-o.lightness(),n,i),o},xy:function(t,e,n,i){return k.X(n.pointer,e.x),k.Y(n.pointer,e.y),v(i.background,e.x),t.hue(e.x).saturation(1-e.y)},z:function(t,e,n,i){return k.Y(i.pointer,e),t.lightness(1-e)}}),P._extras={},P.registerExtra=function(t,e){t in P._extras&&console.warn('Extra "'+t+'"has been registered already!'),P._extras[t]=e};for(var D in A)P.registerExtra(D,A[D]);return P}),/** * interact.js v1.3.0 * * Copyright (c) 2012-2017 Taye Adeyemi * Released under the MIT License. * https://raw.github.com/taye/interact.js/master/LICENSE */ function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.interact=t()}}(function(){return function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n||t)},l,l.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s6&&arguments[6]!==undefined&&arguments[6];n(this,t);var f=e.target,h=(f&&f.options||r).deltaSource,g=o(f,l,u),v="start"===c,m="end"===c,y=v?e.startCoords:e.curCoords,x=e.prevEvent;l=l||e.element;var b=i({},y.page),w=i({},y.client);b.x-=g.x,b.y-=g.y,w.x-=g.x,w.y-=g.y,this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.button=a.button,this.buttons=a.buttons,this.target=l,this.currentTarget=l,this.relatedTarget=p||null,this.preEnd=d,this.type=u+(c||""),this.interaction=e,this.interactable=f,this.t0=v?e.downTimes[e.downTimes.length-1]:x.t0;var S={interaction:e,event:a,action:u,phase:c,element:l,related:p,page:b,client:w,coords:y,starting:v,ending:m,deltaSource:h,iEvent:this};s.fire("set-xy",S),m?(this.pageX=x.pageX,this.pageY=x.pageY,this.clientX=x.clientX,this.clientY=x.clientY):(this.pageX=b.x,this.pageY=b.y,this.clientX=w.x,this.clientY=w.y),this.x0=e.startCoords.page.x-g.x,this.y0=e.startCoords.page.y-g.y,this.clientX0=e.startCoords.client.x-g.x,this.clientY0=e.startCoords.client.y-g.y,s.fire("set-delta",S),this.timeStamp=y.timeStamp,this.dt=e.pointerDelta.timeStamp,this.duration=this.timeStamp-this.t0,this.speed=e.pointerDelta[h].speed,this.velocityX=e.pointerDelta[h].vx,this.velocityY=e.pointerDelta[h].vy,this.swipe=m||"inertiastart"===c?this.getSwipe():null,s.fire("new",S)}return t.prototype.getSwipe=function(){var t=this.interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI,n=22.5;e<0&&(e+=360);var i=135-n<=e&&e<225+n,o=225-n<=e&&e<315+n,r=!i&&(315-n<=e||e<45+n);return{up:o,down:!o&&45-n<=e&&e<135+n,left:i,right:r,angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}},t.prototype.preventDefault=function(){},t.prototype.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();s.on("set-delta",function(t){var e=t.iEvent,n=t.interaction,i=t.starting,o=t.deltaSource,r=i?e:n.prevEvent;"client"===o?(e.dx=e.clientX-r.clientX,e.dy=e.clientY-r.clientY):(e.dx=e.pageX-r.pageX,e.dy=e.pageY-r.pageY)}),a.signals=s,e.exports=a},{"./defaultOptions":18,"./utils/Signals":34,"./utils/extend":40,"./utils/getOriginXY":41}],4:[function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=t("./utils/is"),o=t("./utils/events"),r=t("./utils/extend"),s=t("./actions/base"),a=t("./scope"),u=t("./Eventable"),c=t("./defaultOptions"),l=t("./utils/Signals")["new"](),p=t("./utils/domUtils"),d=p.getElementRect,f=p.nodeContains,h=p.trySelector,g=p.matchesSelector,v=t("./utils/window"),m=v.getWindow,y=t("./utils/arr"),x=y.contains,b=t("./utils/browser"),w=b.wheelEvent;a.interactables=[];var S=function(){function t(e,i){n(this,t),i=i||{},this.target=e,this.events=new u,this._context=i.context||a.document,this._win=m(h(e)?this._context:e),this._doc=this._win.document,l.fire("new",{target:e,options:i,interactable:this,win:this._win}),a.addDocument(this._doc,this._win),a.interactables.push(this),this.set(i)}return t.prototype.setOnEvents=function(t,e){var n="on"+t;return i["function"](e.onstart)&&(this.events[n+"start"]=e.onstart),i["function"](e.onmove)&&(this.events[n+"move"]=e.onmove),i["function"](e.onend)&&(this.events[n+"end"]=e.onend),i["function"](e.oninertiastart)&&(this.events[n+"inertiastart"]=e.oninertiastart),this},t.prototype.setPerAction=function(t,e){for(var n in e)n in c[t]&&(i.object(e[n])?(this.options[t][n]=r(this.options[t][n]||{},e[n]),i.object(c.perAction[n])&&"enabled"in c.perAction[n]&&(this.options[t][n].enabled=!1!==e[n].enabled)):i.bool(e[n])&&i.object(c.perAction[n])?this.options[t][n].enabled=e[n]:e[n]!==undefined&&(this.options[t][n]=e[n]))},t.prototype.getRect=function(t){return t=t||this.target,i.string(this.target)&&!i.element(t)&&(t=this._context.querySelector(this.target)),d(t)},t.prototype.rectChecker=function(t){return i["function"](t)?(this.getRect=t,this):null===t?(delete this.options.getRect,this):this.getRect},t.prototype._backCompatOption=function(t,e){if(h(e)||i.object(e)){this.options[t]=e;for(var n=0;nt.pointerMoveTolerance);var u={pointer:e,pointerIndex:this.getPointerIndex(e),event:n,eventTarget:i,dx:r,dy:s,duplicate:o,interaction:this,interactingBeforeMove:this.interacting()};o||a.setCoordDeltas(this.pointerDelta,this.prevCoords,this.curCoords),d.fire("move",u),o||(this.interacting()&&this.doMove(u),this.pointerWasMoved&&a.copyCoords(this.prevCoords,this.curCoords))},t.prototype.doMove=function(t){t=a.extend({pointer:this.pointers[0],event:this.prevEvent,eventTarget:this._eventTarget,interaction:this},t||{}),d.fire("before-action-move",t),this._dontFireMove||d.fire("action-move",t),this._dontFireMove=!1},t.prototype.pointerUp=function(t,e,n,i){var o=this.getPointerIndex(t);d.fire(/cancel$/i.test(e.type)?"cancel":"up",{pointer:t,pointerIndex:o,event:e,eventTarget:n,curEventTarget:i,interaction:this}),this.simulation||this.end(e),this.pointerIsDown=!1,this.removePointer(t,e)},t.prototype.end=function(t){t=t||this.prevEvent,this.interacting()&&d.fire("action-end",{event:t,interaction:this}),this.stop()},t.prototype.currentAction=function(){return this._interacting?this.prepared.name:null},t.prototype.interacting=function(){return this._interacting},t.prototype.stop=function(){d.fire("stop",{interaction:this}),this._interacting&&(d.fire("stop-active",{interaction:this}),d.fire("stop-"+this.prepared.name,{interaction:this})),this.target=this.element=null,this._interacting=!1,this.prepared.name=this.prevEvent=null},t.prototype.getPointerIndex=function(t){return"mouse"===this.pointerType||"pen"===this.pointerType?0:this.pointerIds.indexOf(a.getPointerId(t))},t.prototype.updatePointer=function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:e&&/(down|start)$/i.test(e.type),i=a.getPointerId(t),o=this.getPointerIndex(t);return-1===o&&(o=this.pointerIds.length,this.pointerIds[o]=i),n&&d.fire("update-pointer-down",{pointer:t,event:e,down:n,pointerId:i,pointerIndex:o,interaction:this}),this.pointers[o]=t,o},t.prototype.removePointer=function(t,e){var n=this.getPointerIndex(t);-1!==n&&(d.fire("remove-pointer",{pointer:t,event:e,pointerIndex:n,interaction:this}),this.pointers.splice(n,1),this.pointerIds.splice(n,1),this.downTargets.splice(n,1),this.downTimes.splice(n,1))},t.prototype._updateEventTargets=function(t,e){this._eventTarget=t,this._curEventTarget=e},t}(),m=0;mr.left&&l.xr.top&&l.y=r.left&&h<=r.right&&g>=r.top&&g<=r.bottom}if(f&&c.is.number(a)){s=Math.max(0,Math.min(r.right,f.right)-Math.max(r.left,f.left))*Math.max(0,Math.min(r.bottom,f.bottom)-Math.max(r.top,f.top))/(f.width*f.height)>=a}return this.options.drop.checker&&(s=this.options.drop.checker(t,e,s,this,o,n,i)),s},f.signals.on("unset",function(t){t.interactable.dropzone(!1)}),f.settingsMethods.push("dropChecker"),h.signals.on("new",function(t){t.dropTarget=null,t.dropElement=null,t.prevDropTarget=null,t.prevDropElement=null,t.dropEvents=null,t.activeDrops={dropzones:[],elements:[],rects:[]}}),h.signals.on("stop",function(t){var e=t.interaction;e.dropTarget=e.dropElement=e.prevDropTarget=e.prevDropElement=null}),p.dynamicDrop=function(t){return c.is.bool(t)?(m=t,p):m},c.merge(f.eventTypes,["dragenter","dragleave","dropactivate","dropdeactivate","dropmove","drop"]),u.methodDict.drop="dropzone",g.drop=v.defaults,e.exports=v},{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../interact":21,"../scope":33,"../utils":43,"./base":6}],9:[function(t,e){"use strict";var n=t("./base"),i=t("../utils"),o=t("../InteractEvent"),r=t("../Interactable"),s=t("../Interaction"),a=t("../defaultOptions"),u={defaults:{enabled:!1,origin:null,restrict:null},checker:function(t,e,n,i,o){return o.pointerIds.length>=2?{name:"gesture"}:null},getCursor:function(){return""}};o.signals.on("new",function(t){var e=t.iEvent,n=t.interaction;"gesturestart"===e.type&&(e.ds=0,n.gesture.startDistance=n.gesture.prevDistance=e.distance,n.gesture.startAngle=n.gesture.prevAngle=e.angle,n.gesture.scale=1)}),o.signals.on("new",function(t){var e=t.iEvent,n=t.interaction;"gesturemove"===e.type&&(e.ds=e.scale-n.gesture.scale,n.target.fire(e),n.gesture.prevAngle=e.angle,n.gesture.prevDistance=e.distance,e.scale===Infinity||null===e.scale||e.scale===undefined||isNaN(e.scale)||(n.gesture.scale=e.scale))}),r.prototype.gesturable=function(t){return i.is.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):i.is.bool(t)?(this.options.gesture.enabled=t,t||(this.ongesturestart=this.ongesturestart=this.ongestureend=null),this):this.options.gesture},o.signals.on("set-delta",function(t){var e=t.interaction,n=t.iEvent,r=t.action,s=t.event,a=t.starting,u=t.ending,c=t.deltaSource;if("gesture"===r){var l=e.pointers;n.touches=[l[0],l[1]],a?(n.distance=i.touchDistance(l,c),n.box=i.touchBBox(l),n.scale=1,n.ds=0,n.angle=i.touchAngle(l,undefined,c),n.da=0):u||s instanceof o?(n.distance=e.prevEvent.distance,n.box=e.prevEvent.box,n.scale=e.prevEvent.scale,n.ds=n.scale-1,n.angle=e.prevEvent.angle,n.da=n.angle-e.gesture.startAngle):(n.distance=i.touchDistance(l,c),n.box=i.touchBBox(l),n.scale=n.distance/e.gesture.startDistance,n.angle=i.touchAngle(l,e.gesture.prevAngle,c),n.ds=n.scale-e.gesture.prevScale,n.da=n.angle-e.gesture.prevAngle)}}),s.signals.on("new",function(t){t.gesture={start:{x:0,y:0},startDistance:0,prevDistance:0,distance:0,scale:1,startAngle:0,prevAngle:0}}),n.gesture=u,n.names.push("gesture"),i.merge(r.eventTypes,["gesturestart","gesturemove","gestureend"]),n.methodDict.gesture="gesturable",a.gesture=u.defaults,e.exports=u},{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../utils":43,"./base":6}],10:[function(t,e){"use strict";function n(t,e,n,i,r,s,a){if(!e)return!1;if(!0===e){var u=o.is.number(s.width)?s.width:s.right-s.left,c=o.is.number(s.height)?s.height:s.bottom-s.top;if(u<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t)return n.x<(u>=0?s.left:s.right)+a;if("top"===t)return n.y<(c>=0?s.top:s.bottom)+a;if("right"===t)return n.x>(u>=0?s.right:s.left)-a;if("bottom"===t)return n.y>(c>=0?s.bottom:s.top)-a}return!!o.is.element(i)&&(o.is.element(e)?e===i:o.matchesUpTo(i,e,r))}var i=t("./base"),o=t("../utils"),r=t("../utils/browser"),s=t("../InteractEvent"),a=t("../Interactable"),u=t("../Interaction"),c=t("../defaultOptions"),l=r.supportsTouch||r.supportsPointerEvent?20:10,p={defaults:{enabled:!1,mouseButtons:null,origin:null,snap:null,restrict:null,inertia:null,autoScroll:null,square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},checker:function(t,e,i,r,s,a){if(!a)return null;var u=o.extend({},s.curCoords.page),c=i.options;if(c.resize.enabled){var p=c.resize,d={left:!1,right:!1,top:!1,bottom:!1};if(o.is.object(p.edges)){for(var f in d)d[f]=n(f,p.edges[f],u,s._eventTarget,r,a,p.margin||l);if(d.left=d.left&&!d.right,d.top=d.top&&!d.bottom,d.left||d.right||d.top||d.bottom)return{name:"resize",edges:d}}else{var h="y"!==c.resize.axis&&u.x>a.right-l,g="x"!==c.resize.axis&&u.y>a.bottom-l;if(h||g)return{name:"resize",axes:(h?"x":"")+(g?"y":"")}}}return null},cursors:r.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"},getCursor:function(t){if(t.axis)return p.cursors[t.name+t.axis];if(t.edges){for(var e="",n=["top","bottom","left","right"],i=0;i<4;i++)t.edges[n[i]]&&(e+=n[i]);return p.cursors[e]}}};s.signals.on("new",function(t){var e=t.iEvent,n=t.interaction;if("resizestart"===e.type&&n.prepared.edges){var i=n.target.getRect(n.element),r=n.target.options.resize;if(r.square||r.preserveAspectRatio){var s=o.extend({},n.prepared.edges);s.top=s.top||s.left&&!s.bottom,s.left=s.left||s.top&&!s.right,s.bottom=s.bottom||s.right&&!s.top,s.right=s.right||s.bottom&&!s.left,n.prepared._linkedEdges=s}else n.prepared._linkedEdges=null;r.preserveAspectRatio&&(n.resizeStartAspectRatio=i.width/i.height),n.resizeRects={start:i,current:o.extend({},i),inverted:o.extend({},i),previous:o.extend({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},e.rect=n.resizeRects.inverted,e.deltaRect=n.resizeRects.delta}}),s.signals.on("new",function(t){var e=t.iEvent,n=t.phase,i=t.interaction;if("move"===n&&i.prepared.edges){var r=i.target.options.resize,s=r.invert,a="reposition"===s||"negate"===s,u=i.prepared.edges,c=i.resizeRects.start,l=i.resizeRects.current,p=i.resizeRects.inverted,d=i.resizeRects.delta,f=o.extend(i.resizeRects.previous,p),h=u,g=e.dx,v=e.dy;if(r.preserveAspectRatio||r.square){var m=r.preserveAspectRatio?i.resizeStartAspectRatio:1;u=i.prepared._linkedEdges,h.left&&h.bottom||h.right&&h.top?v=-g/m:h.left||h.right?v=g/m:(h.top||h.bottom)&&(g=v*m)}if(u.top&&(l.top+=v),u.bottom&&(l.bottom+=v),u.left&&(l.left+=g),u.right&&(l.right+=g),a){if(o.extend(p,l),"reposition"===s){var y=void 0;p.top>p.bottom&&(y=p.top,p.top=p.bottom,p.bottom=y),p.left>p.right&&(y=p.left,p.left=p.right,p.right=y)}}else p.top=Math.min(l.top,c.bottom),p.bottom=Math.max(l.bottom,c.top),p.left=Math.min(l.left,c.right),p.right=Math.max(l.right,c.left);p.width=p.right-p.left,p.height=p.bottom-p.top;for(var x in p)d[x]=p[x]-f[x];e.edges=i.prepared.edges,e.rect=p,e.deltaRect=d}}),a.prototype.resizable=function(t){return o.is.object(t)?(this.options.resize.enabled=!1!==t.enabled,this.setPerAction("resize",t),this.setOnEvents("resize",t),/^x$|^y$|^xy$/.test(t.axis)?this.options.resize.axis=t.axis:null===t.axis&&(this.options.resize.axis=c.resize.axis),o.is.bool(t.preserveAspectRatio)?this.options.resize.preserveAspectRatio=t.preserveAspectRatio:o.is.bool(t.square)&&(this.options.resize.square=t.square),this):o.is.bool(t)?(this.options.resize.enabled=t,t||(this.onresizestart=this.onresizestart=this.onresizeend=null),this):this.options.resize},u.signals.on("new",function(t){t.resizeAxes="xy"}),s.signals.on("set-delta",function(t){var e=t.interaction,n=t.iEvent;"resize"===t.action&&e.resizeAxes&&(e.target.options.resize.square?("y"===e.resizeAxes?n.dx=n.dy:n.dy=n.dx,n.axes="xy"):(n.axes=e.resizeAxes,"x"===e.resizeAxes?n.dy=0:"y"===e.resizeAxes&&(n.dx=0)))}),i.resize=p,i.names.push("resize"),o.merge(a.eventTypes,["resizestart","resizemove","resizeinertiastart","resizeinertiaresume","resizeend"]),i.methodDict.resize="resizable",c.resize=p.defaults,e.exports=p},{"../InteractEvent":3,"../Interactable":4,"../Interaction":5,"../defaultOptions":18,"../utils":43,"../utils/browser":36,"./base":6}],11:[function(t,e){"use strict";var n=t("./utils/raf"),i=t("./utils/window").getWindow,o=t("./utils/is"),r=t("./utils/domUtils"),s=t("./Interaction"),a=t("./defaultOptions"),u={defaults:{enabled:!1,container:null,margin:60,speed:300},interaction:null,i:null,x:0,y:0,isScrolling:!1,prevTime:0,start:function(t){u.isScrolling=!0,n.cancel(u.i),u.interaction=t,u.prevTime=(new Date).getTime(),u.i=n.request(u.scroll)},stop:function(){u.isScrolling=!1, n.cancel(u.i)},scroll:function(){var t=u.interaction.target.options[u.interaction.prepared.name].autoScroll,e=t.container||i(u.interaction.element),r=(new Date).getTime(),s=(r-u.prevTime)/1e3,a=t.speed*s;a>=1&&(o.window(e)?e.scrollBy(u.x*a,u.y*a):e&&(e.scrollLeft+=u.x*a),u.prevTime=r),u.isScrolling&&(n.cancel(u.i),u.i=n.request(u.scroll))},check:function(t,e){var n=t.options;return n[e].autoScroll&&n[e].autoScroll.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&u.check(e.target,e.prepared.name)){if(e.simulation)return void(u.x=u.y=0);var s=void 0,a=void 0,c=void 0,l=void 0,p=e.target.options[e.prepared.name].autoScroll,d=p.container||i(e.element);if(o.window(d))l=n.clientXd.innerWidth-u.margin,c=n.clientY>d.innerHeight-u.margin;else{var f=r.getElementClientRect(d);l=n.clientXf.right-u.margin,c=n.clientY>f.bottom-u.margin}u.x=a?1:l?-1:0,u.y=c?1:s?-1:0,u.isScrolling||(u.margin=p.margin,u.speed=p.speed,u.start(e))}}};s.signals.on("stop-active",function(){u.stop()}),s.signals.on("action-move",u.onInteractionMove),a.perAction.autoScroll=u.defaults,e.exports=u},{"./Interaction":5,"./defaultOptions":18,"./utils/domUtils":38,"./utils/is":45,"./utils/raf":49,"./utils/window":51}],12:[function(t){"use strict";var e=t("../Interactable"),n=t("../actions/base"),i=t("../utils/is"),o=t("../utils/domUtils"),r=t("../utils"),s=r.warnOnce;e.prototype.getAction=function(t,e,n,i){var o=this.defaultActionChecker(t,e,n,i);return this.options.actionChecker?this.options.actionChecker(t,e,o,this,i,n):o},e.prototype.ignoreFrom=s(function(t){return this._backCompatOption("ignoreFrom",t)},"Interactable.ignoreForm() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=s(function(t){return this._backCompatOption("allowFrom",t)},"Interactable.allowForm() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.testIgnore=function(t,e,n){return!(!t||!i.element(n))&&(i.string(t)?o.matchesUpTo(n,t,e):!!i.element(t)&&o.nodeContains(t,n))},e.prototype.testAllow=function(t,e,n){return!t||!!i.element(n)&&(i.string(t)?o.matchesUpTo(n,t,e):!!i.element(t)&&o.nodeContains(t,n))},e.prototype.testIgnoreAllow=function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)},e.prototype.actionChecker=function(t){return i["function"](t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker},e.prototype.styleCursor=function(t){return i.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor},e.prototype.defaultActionChecker=function(t,e,i,o){for(var r=this.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],a=null,u=0;u=g.maxInteractions)return!1;if(p.target===t){if((a+=f===n.name|0)>=o)return!1;if(p.element===e&&(u++,f!==n.name||u>=r))return!1}}}return g.maxInteractions>0}}var a=t("../interact"),u=t("../Interactable"),c=t("../Interaction"),l=t("../actions/base"),p=t("../defaultOptions"),d=t("../scope"),f=t("../utils"),h=t("../utils/Signals")["new"]();t("./InteractableMethods");var g={signals:h,withinInteractionLimit:s,maxInteractions:Infinity,defaults:{perAction:{manualStart:!1,max:Infinity,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}},setActionDefaults:function(t){f.extend(t.defaults,g.defaults.perAction)},validateAction:n};c.signals.on("down",function(t){var e=t.interaction,n=t.pointer,i=t.event,s=t.eventTarget;if(!e.interacting()){r(e,o(e,n,i,s))}}),c.signals.on("move",function(t){var e=t.interaction,n=t.pointer,i=t.event,s=t.eventTarget;if("mouse"===e.pointerType&&!e.pointerIsDown&&!e.interacting()){r(e,o(e,n,i,s))}}),c.signals.on("move",function(t){var e=t.interaction,n=t.event;if(e.pointerIsDown&&!e.interacting()&&e.pointerWasMoved&&e.prepared.name){h.fire("before-start",t);var i=e.target;e.prepared.name&&i&&(i.options[e.prepared.name].manualStart||!s(i,e.element,e.prepared)?e.stop(n):e.start(e.prepared,i,e.element))}}),c.signals.on("stop",function(t){var e=t.interaction,n=e.target;n&&n.options.styleCursor&&(n._doc.documentElement.style.cursor="")}),a.maxInteractions=function(t){return f.is.number(t)?(g.maxInteractions=t,a):g.maxInteractions},u.settingsMethods.push("styleCursor"),u.settingsMethods.push("actionChecker"),u.settingsMethods.push("ignoreFrom"),u.settingsMethods.push("allowFrom"),p.base.actionChecker=null,p.base.styleCursor=!0,f.extend(p.perAction,g.defaults.perAction),e.exports=g},{"../Interactable":4,"../Interaction":5,"../actions/base":6,"../defaultOptions":18,"../interact":21,"../scope":33,"../utils":43,"../utils/Signals":34,"./InteractableMethods":12}],14:[function(t){"use strict";function e(t,e){if(!e)return!1;var n=e.options.drag.startAxis;return"xy"===t||"xy"===n||n===t}var n=t("./base"),i=t("../scope"),o=t("../utils/is"),r=t("../utils/domUtils"),s=r.parentNode;n.setActionDefaults(t("../actions/drag")),n.signals.on("before-start",function(t){var r=t.interaction,a=t.eventTarget,u=t.dx,c=t.dy;if("drag"===r.prepared.name){var l=Math.abs(u),p=Math.abs(c),d=r.target.options.drag,f=d.startAxis,h=l>p?"x":l0&&(e.autoStartHoldTimer=setTimeout(function(){e.start(e.prepared,e.target,e.element)},i))}),o.signals.on("move",function(t){var e=t.interaction,n=t.duplicate;e.pointerWasMoved&&!n&&clearTimeout(e.autoStartHoldTimer)}),i.signals.on("before-start",function(t){var e=t.interaction;n(e)>0&&(e.prepared.name=null)}),e.exports={getHoldDuration:n}},{"../Interaction":5,"./base":13}],17:[function(t){"use strict";t("./base").setActionDefaults(t("../actions/resize"))},{"../actions/resize":10,"./base":13}],18:[function(t,e){"use strict";e.exports={base:{accept:null,preventDefault:"auto",deltaSource:"page"},perAction:{origin:{x:0,y:0},inertia:{enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}}}},{}],19:[function(t,e){"use strict";t("./inertia"),t("./modifiers/snap"),t("./modifiers/restrict"),t("./pointerEvents/base"),t("./pointerEvents/holdRepeat"),t("./pointerEvents/interactableTargets"),t("./autoStart/hold"),t("./actions/gesture"),t("./actions/resize"),t("./actions/drag"),t("./actions/drop"),t("./modifiers/snapSize"),t("./modifiers/restrictEdges"),t("./modifiers/restrictSize"),t("./autoStart/gesture"),t("./autoStart/resize"),t("./autoStart/drag"),t("./interactablePreventDefault.js"),t("./autoScroll"),e.exports=t("./interact")},{"./actions/drag":7,"./actions/drop":8,"./actions/gesture":9,"./actions/resize":10,"./autoScroll":11,"./autoStart/drag":14,"./autoStart/gesture":15,"./autoStart/hold":16,"./autoStart/resize":17,"./inertia":20,"./interact":21,"./interactablePreventDefault.js":22,"./modifiers/restrict":24,"./modifiers/restrictEdges":25,"./modifiers/restrictSize":26,"./modifiers/snap":27,"./modifiers/snapSize":28,"./pointerEvents/base":30,"./pointerEvents/holdRepeat":31,"./pointerEvents/interactableTargets":32}],20:[function(t){"use strict";function e(t,e){var n=t.target.options[t.prepared.name].inertia,i=n.resistance,o=-Math.log(n.endSpeed/e.v0)/i;e.x0=t.prevEvent.pageX,e.y0=t.prevEvent.pageY,e.t0=e.startEvent.timeStamp/1e3,e.sx=e.sy=0,e.modifiedXe=e.xe=(e.vx0-o)/i,e.modifiedYe=e.ye=(e.vy0-o)/i,e.te=o,e.lambda_v0=i/e.v0,e.one_ve_v0=1-n.endSpeed/e.v0}function n(){o(this),u.setCoordDeltas(this.pointerDelta,this.prevCoords,this.curCoords);var t=this.inertiaStatus,e=this.target.options[this.prepared.name].inertia,n=e.resistance,i=(new Date).getTime()/1e3-t.t0;if(ip.minSpeed&&g>p.endSpeed,b={interaction:n,pageCoords:h,statuses:f,preEnd:!0,requireEndOnly:!0};y&&!x&&(a.resetStatuses(f),m=a.setAll(b),m.shouldMove&&m.locked&&(v=!0)),(x||v)&&(u.copyCoords(o.upCoords,n.curCoords),n.pointers[0]=o.startEvent=new r(n,i,n.prepared.name,"inertiastart",n.element),o.t0=d,o.active=!0,o.allowResume=p.allowResume,n.simulation=o,s.fire(o.startEvent),x?(o.vx0=n.pointerDelta.client.vx,o.vy0=n.pointerDelta.client.vy,o.v0=g,e(n,o),u.extend(h,n.curCoords.page),h.x+=o.xe,h.y+=o.ye,a.resetStatuses(f),m=a.setAll(b),o.modifiedXe+=m.dx,o.modifiedYe+=m.dy,o.i=c.request(n.boundInertiaFrame)):(o.smoothEnd=!0,o.xe=m.dx,o.ye=m.dy,o.sx=o.sy=0,o.i=c.request(n.boundSmoothEndFrame)))}}),s.signals.on("stop-active",function(t){var e=t.interaction,n=e.inertiaStatus;n.active&&(c.cancel(n.i),n.active=!1,e.simulation=null)})},{"./InteractEvent":3,"./Interaction":5,"./modifiers/base":23,"./utils":43,"./utils/raf":49}],21:[function(t,e){"use strict";function n(t,e){var n=s.interactables.get(t,e);return n||(n=new a(t,e),n.events.global=c),n}var i=t("./utils/browser"),o=t("./utils/events"),r=t("./utils"),s=t("./scope"),a=t("./Interactable"),u=t("./Interaction"),c={};n.isSet=function(t,e){return-1!==s.interactables.indexOfElement(t,e&&e.context)},n.on=function(t,e,i){if(r.is.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),r.is.array(t)){for(var u=0;u=0;e--)s.interactions[e].stop(t);return n},n.pointerMoveTolerance=function(t){return r.is.number(t)?(u.pointerMoveTolerance=t,n):u.pointerMoveTolerance},n.addDocument=s.addDocument,n.removeDocument=s.removeDocument,s.interact=n,e.exports=n},{"./Interactable":4,"./Interaction":5,"./scope":33,"./utils":43,"./utils/browser":36,"./utils/events":39}],22:[function(t){"use strict";function e(t){var e=t.interaction,n=t.event;e.target&&e.target.checkAndPreventDefault(n)}var n=t("./Interactable"),i=t("./Interaction"),o=t("./scope"),r=t("./utils/is"),s=t("./utils/events"),a=t("./utils/domUtils"),u=a.nodeContains,c=a.matchesSelector;n.prototype.preventDefault=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):r.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault},n.prototype.checkAndPreventDefault=function(t){var e=this.options.preventDefault;if("never"!==e)return"always"===e?void t.preventDefault():void(s.supportsOptions&&/^touch(start|move)$/.test(t.type)||/^(mouse|pointer|touch)*(down|start)/i.test(t.type)||r.element(t.target)&&c(t.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||t.preventDefault())};for(var l=["down","move","up","cancel"],p=0;p=0&&(d.selectors[f]!==t||d.contexts[f]!==e);f--);-1===f&&(f=d.selectors.length,d.selectors.push(t),d.contexts.push(e),d.listeners.push([])),d.listeners[f].push([o,!!u.capture,u.passive])}function r(t,e,n,o,r){var u=c(r),l=b[n],p=!1,d=void 0;if(l)for(d=l.selectors.length-1;d>=0;d--)if(l.selectors[d]===t&&l.contexts[d]===e){for(var f=l.listeners[d],h=f.length-1;h>=0;h--){var g=f[h],v=g[0],m=g[1],y=g[2];if(v===o&&m===!!u.capture&&y===u.passive){f.splice(h,1),f.length||(l.selectors.splice(d,1),l.contexts.splice(d,1),l.listeners.splice(d,1),i(e,n,s),i(e,n,a,!0),l.selectors.length||(b[n]=null)),p=!0;break}}if(p)break}}function s(t,e){var n=c(e),i={},o=b[t.type],r=d.getEventTargets(t),s=r[0],a=s;for(f(i,t),i.originalEvent=t,i.preventDefault=u;l.element(a);){for(var h=0;h=2)continue;if(!r.interacting()&&e===r.pointerType)return r}return null}};e.exports=o},{"../scope":33,"./index":43}],45:[function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=t("./window"),o=t("./isWindow"),r={array:function(){},window:function(t){return t===i.window||o(t)},docFrag:function(t){return r.object(t)&&11===t.nodeType},object:function(t){return!!t&&"object"===(void 0===t?"undefined":n(t))},"function":function(t){return"function"==typeof t},number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!==(void 0===t?"undefined":n(t)))return!1;var e=i.getWindow(t)||i.window;return/object|function/.test(n(e.Element))?t instanceof e.Element:1===t.nodeType&&"string"==typeof t.nodeName}};r.array=function(t){return r.object(t)&&"undefined"!=typeof t.length&&r["function"](t.splice)},e.exports=r},{"./isWindow":46,"./window":51}],46:[function(t,e){"use strict";e.exports=function(t){return!(!t||!t.Window)&&t instanceof t.Window}},{}],47:[function(t,e){"use strict";function n(t,n){for(var i in n){var o=e.exports.prefixedPropREs,r=!1;for(var s in o)if(0===i.indexOf(s)&&o[s].test(i)){r=!0;break}r||"function"==typeof n[i]||(t[i]=n[i])}return t}n.prefixedPropREs={webkit:/(Movement[XY]|Radius[XY]|RotationAngle|Force)$/},e.exports=n},{}],48:[function(t,e){"use strict";var n=t("./hypot"),i=t("./browser"),o=t("./domObjects"),r=t("./domUtils"),s=t("./domObjects"),a=t("./is"),u=t("./pointerExtend"),c={copyCoords:function(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp},setCoordDeltas:function(t,e,i){t.page.x=i.page.x-e.page.x,t.page.y=i.page.y-e.page.y,t.client.x=i.client.x-e.client.x,t.client.y=i.client.y-e.client.y,t.timeStamp=i.timeStamp-e.timeStamp;var o=Math.max(t.timeStamp/1e3,.001);t.page.speed=n(t.page.x,t.page.y)/o,t.page.vx=t.page.x/o,t.page.vy=t.page.y/o,t.client.speed=n(t.client.x,t.page.y)/o,t.client.vx=t.client.x/o,t.client.vy=t.client.y/o},isNativePointer:function(t){return t instanceof o.Event||t instanceof o.Touch},getXY:function(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n},getPageXY:function(t,e){return e=e||{},i.isOperaMobile&&c.isNativePointer(t)?(c.getXY("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):c.getXY("page",t,e),e},getClientXY:function(t,e){return e=e||{},i.isOperaMobile&&c.isNativePointer(t)?c.getXY("screen",t,e):c.getXY("client",t,e),e},getPointerId:function(t){return a.number(t.pointerId)?t.pointerId:t.identifier},setCoords:function(t,e,n){var i=e.length>1?c.pointerAverage(e):e[0],o={};c.getPageXY(i,o),t.page.x=o.x,t.page.y=o.y,c.getClientXY(i,o),t.client.x=o.x,t.client.y=o.y,t.timeStamp=a.number(n)?n:(new Date).getTime()},pointerExtend:u,getTouchPair:function(t){var e=[];return a.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e},pointerAverage:function(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n1){var e=c.getTouchPair(t),n=Math.min(e[0].pageX,e[1].pageX),i=Math.min(e[0].pageY,e[1].pageY);return{x:n,y:i,left:n,top:i,width:Math.max(e[0].pageX,e[1].pageX)-n,height:Math.max(e[0].pageY,e[1].pageY)-i}}},touchDistance:function(t,e){var i=e+"X",o=e+"Y",r=c.getTouchPair(t),s=r[0][i]-r[1][i],a=r[0][o]-r[1][o];return n(s,a)},touchAngle:function(t,e,n){var i=n+"X",o=n+"Y",r=c.getTouchPair(t),s=r[1][i]-r[0][i],a=r[1][o]-r[0][o];return 180*Math.atan2(a,s)/Math.PI},getPointerType:function(t){return a.string(t.pointerType)?t.pointerType:a.number(t.pointerType)?[undefined,undefined,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type)||t instanceof s.Touch?"touch":"mouse"},getEventTargets:function(t){var e=a["function"](t.composedPath)?t.composedPath():t.path;return[r.getActualElement(e?e[0]:t.target),r.getActualElement(t.currentTarget)]}};e.exports=c},{"./browser":36,"./domObjects":37,"./domUtils":38,"./hypot":42,"./is":45,"./pointerExtend":47}],49:[function(t,e){"use strict";for(var n=t("./window"),i=n.window,o=["ms","moz","webkit","o"],r=0,s=void 0,a=void 0,u=0;u0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s})},function(t,e,n){function i(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!a.string(e))throw new TypeError("Second argument must be a String");if(!a.fn(n))throw new TypeError("Third argument must be a Function");if(a.node(t))return o(t,e,n);if(a.nodeList(t))return r(t,e,n);if(a.string(t))return s(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function s(t,e,n){return u(document.body,t,e,n)}var a=n(6),u=n(5);t.exports=i},function(t){function e(){}e.prototype={on:function(t,e,n){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function i(){o.off(t,i),e.apply(n,arguments)}var o=this;return i._=e,this.on(t,i,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,o=n.length;for(i;i0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,p["default"])(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c["default"]({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(l["default"]);t.exports=h})},function(t){function e(t,e){for(;t&&t.nodeType!==n;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}t.exports=e},function(t,e,n){function i(t,e,n,i,o){var s=r.apply(this,arguments);return t.addEventListener(n,s,o),{destroy:function(){t.removeEventListener(n,s,o)}}}function o(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}function r(t,e,n,i){return function(n){n.delegateTarget=s(n.target,e),n.delegateTarget&&i.call(t,n)}}var s=n(4);t.exports=o},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t){function e(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(t),i.removeAllRanges(),i.addRange(o),e=i.toString()}return e}t.exports=e}])}),function(t){function e(t,e){return e=e||0,Math.round(t*Math.pow(10,e))/Math.pow(10,e)}function n(t,e){for(var n={},i=[],o=0,r=t.length;o-s&&(c-=s,t+=a),ln;u-=r){var c=s(t,u),l=b.getAvg(o,c),p=a(t,n,i);if(!l.equals(p))return!1}return!0}function h(t,e,n){e=e||0,n=n||t.length-1;var i=[];return f(t,e,n)?(i.push(e),n!==t.length-1?i=i.concat(h(t,n,t.length-1)):n!==t.length-1||1===i.length&&s(t,0).equals(s(t,n))||i.push(n)):i=i.concat(h(t,e,n-1)),i}function g(t){try{var n=l(t),i=p(t,n);return new r(h(i).map(function(t){return{idx:e(t/(i.length-1),2),color:s(i,t)}}),n,t)}catch(t){return!1}}function v(t){for(var e=t.getImageData(0,0,t.canvas.width,t.canvas.height),n=e.width,i=e.height,o=e.data,r=[],s=0;se)return!1;if(Math.abs(this.g-t.g)>e)return!1;if(Math.abs(this.b-t.b)>e)return!1;var n="undefined"==typeof this.a?255:this.a,i="undefined"==typeof t.a?255:t.a;return!(Math.abs(n-i)>e)},b.prototype.toString=function(){return 255===this.a?"rgb("+e(this.r)+", "+e(this.g)+", "+e(this.b)+")":"rgba("+e(this.r)+", "+e(this.g)+", "+e(this.b)+", "+e(this.a/255,2)+")"},r.prototype.toCanvas=function(){var t=document.createElement("canvas");t.width=this.colorarray[0].length,t.height=this.colorarray.length;var e=t.getContext("2d"),n=e.createImageData(t.width,t.height);return o(i(this.colorarray),n.data),e.clearRect(0,0,t.width,t.height),e.putImageData(n,0,0),t},r.prototype.toCss=function(){if(1===this.stops.length)return"background-color: "+this.stops[0].color.toString();var t=n(this.stops,function(t){return e(100*t.idx)});t=t.map(function(t){return t.color.toString()+" "+e(100*t.idx)+"%"});var i=this.angle+"deg, "+t.join(","),o=Math.abs(this.angle-450)%360;t.join(",");return"background: -webkit-linear-gradient("+i+");\nbackground: -o-linear-gradient("+i+");\nbackground: -ms-linear-gradient("+i+");\nbackground: -moz-linear-gradient("+i+");\nbackground: linear-gradient("+i+");\n"},t.GradientFinder={fromUrl:y,fromCanvas:m,colorsEqual:x,Gradient:r,Color:b}}(window),GradientCanvas.fromExportable=function(t){return new GradientCanvas(t.colors.map(function(t){return{offset:t[0],color:tinycolor(t[1]).toRgbString()}}),t.alphas.map(function(t){return{offset:t[0],alpha:t[1]}}),t.angle)},GradientCanvas.prototype.toExportable=function(){return{colors:this.getColorStops().map(function(t){return[t.getOffset(),tinycolor(t.color).toHex()]}),alphas:this.getAlphaStops().map(function(t){return[t.getOffset(),t.alpha]}),angle:this.angle}},GradientCanvas.prototype.stopsToCSS=function(t,e){if(0===e.length)return"transparent";if(1===e.length)return[e[0].color];var n=e.map(function(t){return t.color+" "+Math.max(0,Math.min(parseInt(100*t.offset)))+"%"});return"linear-gradient("+this.angleToCSSValue(t)+", "+n.join(", ")+")"},GradientCanvas.prototype.stopsToW3cCSS=function(t,e){if(0===e.length)return"transparent";if(1===e.length)return[e[0].color];var n=e.map(function(t){return t.color+" "+Math.max(0,Math.min(parseInt(100*t.offset)))+"%"});return"linear-gradient("+this.angleToW3cCSSValue(t)+", "+n.join(", ")+")"},GradientCanvas.prototype.angleToW3cCSSValue=function(t){var e=t||this.angle;void 0===e&&(e="top"),0>e&&(e+=360);var n={0:"to right",90:"to top",180:"to left",270:"to bottom"},i=Math.abs(e-450)%360;return n[e]&&(e=n[e]),isNaN(parseInt(e))||(e=i+"deg"),e},GradientCanvas.prototype.angleToCSSValue=function(t){var e=t||this.angle;void 0===e&&(e="top"),0>e&&(e+=360);var n={0:"left",90:"bottom",180:"right",270:"top"};return n[e]&&(e=n[e]),isNaN(parseInt(e))||(e+="deg"),e},GradientCanvas.prototype.angleToGradientVector=function(){function t(t){return{x:Math.cos(t),y:Math.sin(t)}}function e(t){return t*Math.PI/180}var n=this.getAngle(),i=Math.pow(2,-52),o=n%360,r=t(e(180-o)),s=t(e(360-o));return 0>=r.x||i>=Math.abs(r.x)?r.x=0:(o>90&&180>o||o>270&&360>o)&&(r.x=parseFloat(r.x+.3)),0>=r.y||i>=Math.abs(r.y)?r.y=0:(o>90&&180>o||o>270&&360>o)&&(r.y=parseFloat(r.y+.3)),0>=s.x||i>=Math.abs(s.x)?s.x=0:(o>90&&180>o||o>270&&360>o)&&(s.x=parseFloat(s.x+.3)),0>=s.y||i>=Math.abs(s.y)?s.y=0:(o>90&&180>o||o>270&&360>o)&&(s.y=parseFloat(s.y+.3)),{x1:parseInt(100*r.x),y1:parseInt(100*r.y),x2:parseInt(100*s.x),y2:parseInt(100*s.y)}},GradientCanvas.prototype.toCSSAlpha=function(t){var e=this.getAlphaStopsBlack();return 0===e.length&&(e=[{color:"#000",offset:1}]),this.stopsToCSS(t,e)},GradientCanvas.prototype.toSVG=function(){var t=this.getAllStops(),e=t.map(function(t){return''}),n=this.angleToGradientVector();return['',e.join("\n "),""].join("\n")},GradientCanvas.prototype.getAngle=function(){for(;0>this.angle;)this.angle+=360;return this.angle%360},GradientCanvas.prototype.toCSSColor=function(t){return this.stopsToCSS(t,this.getColorStops())},GradientCanvas.prototype.toCSS=function(t){return this.stopsToCSS(t,this.getAllStops())},GradientCanvas.prototype.toW3cCSS=function(t){return this.stopsToW3cCSS(t,this.getAllStops())},GradientCanvas.prototype.removeStop=function(t){this.removeColorStop(t),this.removeAlphaStop(t)},GradientCanvas.prototype.removeColorStop=function(t){var e=this._colorStops.indexOf(t);-1!=e&&this._colorStops.splice(e,1)},GradientCanvas.prototype.removeAlphaStop=function(t){var e=this._alphaStops.indexOf(t);-1!=e&&this._alphaStops.splice(e,1)},GradientCanvas.prototype.getAllStops=function(){var t=this,e=this.getColorStops().map(function(e){var n=t.getInterpolatedAlphaAtOffset(e.offset),i=tinycolor(e.color);return i.setAlpha(n),{color:i.toString("rgb"),hex:i.toString("hex"),offset:e.offset,percent:e.getPercentOffset(),alpha:n}}),n=this.getAlphaStops().map(function(e){var n=tinycolor(t.getInterpolatedColorAtOffset(e.offset));return n.setAlpha(e.alpha),{color:n.toString("rgb"),hex:n.toString("hex"),offset:e.offset,percent:e.getPercentOffset(),alpha:e.alpha}});return 2>n.length&&(n=[]),e.concat(n).unique(function(t){return t.offset}).sort(function(t,e){return t.offset-e.offset})},GradientCanvas.prototype.getColorStops=function(){return this._colorStops.sort(function(t,e){return t.offset-e.offset})},GradientCanvas.prototype.getAlphaStops=function(){return this._alphaStops.sort(function(t,e){return t.offset-e.offset})},GradientCanvas.prototype.getAlphaStopsBlack=function(){return this.getAlphaStops().map(function(t){return{color:"rgba(0, 0, 0, "+t.alpha+")",offset:Math.max(0,Math.min(1,t.offset))}})},GradientCanvas.prototype.toCanvas=function(t,e,n,i){t=t||100,e=e||100;var o=document.createElement("canvas"),r=o.getContext("2d");o.width=t,o.height=e;var s={x1:0,x2:100,y1:0,y2:0};i||(s=this.angleToGradientVector(this.angle)),s.x1=s.x1/100*t,s.x2=s.x2/100*t,s.y1=s.y1/100*e,s.y2=s.y2/100*e;for(var a=r.createLinearGradient(s.x1,s.y1,s.x2,s.y2),u=n||this.getAllStops(),c=0;u.length>c;c++)a.addColorStop(Math.max(0,Math.min(1,u[c].offset)),u[c].color);return r.fillStyle=a,r.fillRect(0,0,t,e),o},GradientCanvas.prototype.toCanvasRules=function(t,e){var n=this.angleToGradientVector(this.angle);n.x1=n.x1/100*t,n.x2=n.x2/100*t,n.y1=n.y1/100*e,n.y2=n.y2/100*e;var i=this.getAllStops().map(function(t){return"gradient.addColorStop("+Math.max(0,Math.min(1,t.offset))+', "'+t.color+'");'});return["var canvas = document.createElement('canvas');","var context = canvas.getContext('2d')","canvas.width = "+t+";","canvas.height = "+e+";","var gradient = context.createLinearGradient("+n.x1+", "+n.y1+", "+n.x2+", "+n.y2+");",i.join("\n"),"context.fillStyle = gradient;","context.fillRect(0, 0, "+t+", "+e+");"].join("\n")},GradientCanvas.prototype.getInterpolatedColorAtOffset=function(t){var e=this.toCanvas(100,1,this.getColorStops(),!0),n=e.getContext("2d"),i=Math.max(0,Math.min(99,parseInt(100*t))),o=n.getImageData(i,0,1,1).data;return tinycolor({r:o[0],g:o[1],b:o[2]}).toHexString()},GradientCanvas.prototype.getInterpolatedAlphaAtOffset=function(t){var e=this.getAlphaStopsBlack();if(0===e.length)return 1;var n=this.toCanvas(100,1,e,!0),i=n.getContext("2d"),o=Math.max(0,Math.min(99,parseInt(100*t))),r=i.getImageData(o,0,1,1).data;return Math.round(r[3]/255*100)/100},GradientCanvas.prototype.cloneStop=function(t,e){var n=t.offset,i=t.hasOwnProperty("alpha");if(e){var o=Math.random()/5,r=i?this.getAlphaStops():this.getColorStops(),s=r.indexOf(t),a=.5>n?n+o:n-o,u=s>0?r[s-1].offset:0,c=r.length-1>s?r[s+1].offset:1;Math.abs(n-a)n.alpha&&(this.addAlphaStop(t,n.alpha),n.setAlpha(1));var i={offset:t,color:""+n,hex:n.toHexString(),getOffset:function(){return Math.min(1,Math.max(0,Math.round(100*this.offset)/100))},getPercentOffset:function(){return 100*i.getOffset()+"%"},setOffset:function(t){i.offset=Math.min(1,Math.max(0,t))}};return this._colorStops.push(i),this.getColorStops().indexOf(i)},GradientCanvas.prototype.addAlphaStop=function(t,e){e=e||this.getInterpolatedAlphaAtOffset(t);var n={offset:t,alpha:e,getOffset:function(){return Math.min(1,Math.max(0,Math.round(100*this.offset)/100))},getPercentOffset:function(){return 100*n.getOffset()},setOffset:function(t){n.offset=Math.min(1,Math.max(0,t))}};return this._alphaStops.push(n),this.getAlphaStops().indexOf(n)},/*! * Isotope PACKAGED v3.0.6 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * * https://isotope.metafizzy.co * Copyright 2010-2018 Metafizzy */ function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function n(n,r,a){function u(t,e,i){var o,r="$()."+n+'("'+e+'")';return t.each(function(t,u){var c=a.data(u,n);if(!c)return void s(n+" not initialized. Cannot call methods, i.e. "+r);var l=c[e];if(!l||"_"==e.charAt(0))return void s(r+" is not a valid method");var p=l.apply(c,i);o=void 0===o?p:o}),void 0!==o?o:t}function c(t,e){t.each(function(t,i){var o=a.data(i,n);o?(o.option(e),o._init()):(o=new r(i,e),a.data(i,n,o))})}(a=a||e||t.jQuery)&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[n]=function(t){if("string"==typeof t){return u(this,t,o.call(arguments,1))}return c(this,t),this},i(a))}function i(t){!t||t&&t.bridget||(t.bridget=n)}var o=Array.prototype.slice,r=t.console,s=void 0===r?function(){}:function(t){r.error(t)};return i(e||t.jQuery),n}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(var i=this._onceEvents&&this._onceEvents[t],o=0;o