!function(t){function n(r){if(e[r])return e[r].exports;var a=e[r]={exports:{},id:r,loaded:!1};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){function r(t,n,e){var r=s(t,n.property);return AFRAME.utils.extend({},e,{targets:[{property:r}],property:n.to,update:function(){c(t,n.property,this.targets[0].property)}})}function a(t,n,e){var r=s(t,n.property),a=AFRAME.utils.coordinates.parse(n.to);return AFRAME.utils.extend({},e,{targets:[r],update:function(){c(t,n.property,this.targets[0])}},a)}function o(t,n){var e=n.split("."),r=e[0],a=e[1],o=t.components[r]||AFRAME.components[r];return o?a?o.schema[a].type:o.schema.type:null}var i=e(1);if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var u=AFRAME.utils,s=u.entity.getComponentProperty,c=u.entity.setComponentProperty;u.styleParser.parse;AFRAME.registerComponent("animation",{schema:{delay:{"default":0},direction:{"default":""},duration:{"default":1e3},easing:{"default":"easeInQuad"},elasticity:{"default":400},loop:{"default":!1},property:{"default":""},to:{"default":""}},multiple:!0,init:function(){this.animation=null,this.isPlaying=!1},update:function(){var t=this.attrName,n=this.data,e=this.el,u=o(e,n.property),s={autoplay:!1,begin:function(){e.emit("animation-start"),e.emit(t+"-start")},complete:function(){e.emit("animation-end"),e.emit(t+"-end")},direction:n.direction,duration:n.duration,easing:n.easing,elasticity:n.elasticity,loop:n.loop},c=r;"vec2"!==u&&"vec3"!==u&&"vec4"!==u||(c=a),this.stopAnimation(),this.animation=i(c(e,n,s))},remove:function(){this.stopAnimation()},tick:function(t){this.animation&&this.animation.tick(t)},pause:function(){this.stopAnimation()},play:function(){this.animation&&this.animation.play()},stopAnimation:function(){this.animation&&this.animation.pause()}})},function(t,n,e){var r,a,o;!function(e,i){a=[],r=i,o="function"==typeof r?r.apply(n,a):r,!(void 0!==o&&(t.exports=o))}(this,function(){var t,n="1.1.0",e={duration:1e3,delay:0,loop:!1,autoplay:!0,direction:"normal",easing:"easeOutElastic",elasticity:400,round:!1,begin:void 0,update:void 0,complete:void 0},r=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skewX","skewY"],a="transform",o=function(){return{array:function(t){return Array.isArray(t)},object:function(t){return Object.prototype.toString.call(t).indexOf("Object")>-1},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||o.svg(t)},number:function(t){return!isNaN(parseInt(t))},string:function(t){return"string"==typeof t},func:function(t){return"function"==typeof t},undef:function(t){return"undefined"==typeof t},"null":function(t){return"null"==typeof t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},rgba:function(t){return/^rgba/.test(t)},hsl:function(t){return/^hsl/.test(t)},color:function(t){return o.hex(t)||o.rgb(t)||o.rgba(t)||o.hsl(t)}}}(),i=function(){var t={},n=["Quad","Cubic","Quart","Quint","Expo"],e={Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t,n){if(0===t||1===t)return t;var e=1-Math.min(n,998)/1e3,r=t/1,a=r-1,o=e/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*a)*Math.sin((a-o)*(2*Math.PI)/e))},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var n,e=4;t<((n=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*n-2)/22-t,2)}};return n.forEach(function(t,n){e[t]=function(t){return Math.pow(t,n+2)}}),Object.keys(e).forEach(function(n){var r=e[n];t["easeIn"+n]=r,t["easeOut"+n]=function(t,n){return 1-r(1-t,n)},t["easeInOut"+n]=function(t,n){return t<.5?r(2*t,n)/2:1-r(t*-2+2,n)/2}}),t.linear=function(t){return t},t}(),u=function(t){return o.string(t)?t:t+""},s=function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},c=function(t){if(o.color(t))return!1;try{var n=document.querySelectorAll(t);return n}catch(e){return!1}},f=function(t,n){return Math.floor(Math.random()*(n-t+1))+t},l=function(t){return t.reduce(function(t,n){return t.concat(o.array(n)?l(n):n)},[])},p=function(t){return o.array(t)?t:(o.string(t)&&(t=c(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])},d=function(t,n){return t.some(function(t){return t===n})},m=function(t,n){var e={};return t.forEach(function(t){var r=JSON.stringify(n.map(function(n){return t[n]}));e[r]=e[r]||[],e[r].push(t)}),Object.keys(e).map(function(t){return e[t]})},h=function(t){return t.filter(function(t,n,e){return e.indexOf(t)===n})},v=function(t){var n={};for(var e in t)n[e]=t[e];return n},g=function(t,n){for(var e in n)t[e]=o.undef(t[e])?n[e]:t[e];return t},y=function(t){var n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,t=t.replace(n,function(t,n,e,r){return n+n+e+e+r+r}),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),r=parseInt(e[1],16),a=parseInt(e[2],16),o=parseInt(e[3],16);return"rgb("+r+","+a+","+o+")"},b=function(t){var n,e,r,t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),a=parseInt(t[1])/360,o=parseInt(t[2])/100,i=parseInt(t[3])/100,u=function(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t};if(0==o)n=e=r=i;else{var s=i<.5?i*(1+o):i+o-i*o,c=2*i-s;n=u(c,s,a+1/3),e=u(c,s,a),r=u(c,s,a-1/3)}return"rgb("+255*n+","+255*e+","+255*r+")"},M=function(t){return o.rgb(t)||o.rgba(t)?t:o.hex(t)?y(t):o.hsl(t)?b(t):void 0},x=function(t){return/([\+\-]?[0-9|auto\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg)?/.exec(t)[2]},A=function(t,n,e){return x(n)?n:t.indexOf("translate")>-1?x(e)?n+x(e):n+"px":t.indexOf("rotate")>-1||t.indexOf("skew")>-1?n+"deg":n},w=function(t,n){if(n in t.style)return getComputedStyle(t).getPropertyValue(s(n))||"0"},E=function(t,n){var e=n.indexOf("scale")>-1?1:0,r=t.style.transform;if(!r)return e;for(var a=/(\w+)\((.+?)\)/g,o=[],i=[],u=[];o=a.exec(r);)i.push(o[1]),u.push(o[2]);var s=u.filter(function(t,e){return i[e]===n});return s.length?s[0]:e},k=function(t,n){return o.dom(t)&&d(r,n)?"transform":o.dom(t)&&"transform"!==n&&w(t,n)?"css":o.dom(t)&&(t.getAttribute(n)||o.svg(t)&&t[n])?"attribute":o["null"](t[n])||o.undef(t[n])?void 0:"object"},O=function(t,n){switch(k(t,n)){case"transform":return E(t,n);case"css":return w(t,n);case"attribute":return t.getAttribute(n)}return t[n]||0},I=function(t,n,e){if(o.color(n))return M(n);if(x(n))return n;var r=x(x(t.to)?t.to:t.from);return!r&&e&&(r=x(e)),r?n+r:n},F=function(t){var n=/-?\d*\.?\d+/g;return{original:t,numbers:u(t).match(n)?u(t).match(n).map(Number):[0],strings:u(t).split(n)}},P=function(t,n,e){return n.reduce(function(n,r,a){var r=r?r:e[a-1];return n+t[a-1]+r})},j=function(t){var t=t?l(o.array(t)?t.map(p):p(t)):[];return t.map(function(t,n){return{target:t,id:n}})},C=function(t,n){var r=[];for(var a in t)if(!e.hasOwnProperty(a)&&"targets"!==a){var i=o.object(t[a])?v(t[a]):{value:t[a]};i.name=a,r.push(g(i,n))}return r},R=function(t,n,e,r){var a=p(o.func(e)?e(t,r):e);return{from:a.length>1?a[0]:O(t,n),to:a.length>1?a[1]:a[0]}},N=function(t,n,e,r){var a={};if("transform"===e)a.from=t+"("+A(t,n.from,n.to)+")",a.to=t+"("+A(t,n.to)+")";else{var o="css"===e?w(r,t):void 0;a.from=I(n,n.from,o),a.to=I(n,n.to,o)}return{from:F(a.from),to:F(a.to)}},S=function(t,n){var e=[];return t.forEach(function(r,a){var i=r.target;return n.forEach(function(n){var u=k(i,n.name);if(u){var s=R(i,n.name,n.value,a),c=v(n);c.animatables=r,c.type=u,c.from=N(n.name,s,c.type,i).from,c.to=N(n.name,s,c.type,i).to,c.round=o.color(s.from)||c.round?1:0,c.delay=(o.func(c.delay)?c.delay(i,a,t.length):c.delay)/J.speed,c.duration=(o.func(c.duration)?c.duration(i,a,t.length):c.duration)/J.speed,e.push(c)}})}),e},T=function(t,n){var e=S(t,n),r=m(e,["name","from","to","delay","duration"]);return r.map(function(t){var n=v(t[0]);return n.animatables=t.map(function(t){return t.animatables}),n.totalDuration=n.delay+n.duration,n})},$=function(t,n){t.tweens.forEach(function(e){var r=e.to,a=e.from,o=t.duration-(e.delay+e.duration);e.from=r,e.to=a,n&&(e.delay=o)}),t.reversed=!t.reversed},L=function(t){if(t.length)return Math.max.apply(Math,t.map(function(t){return t.totalDuration}))},V=function(t){var n=[],e=[];return t.tweens.forEach(function(t){"css"!==t.type&&"transform"!==t.type||(n.push("css"===t.type?s(t.name):"transform"),t.animatables.forEach(function(t){e.push(t.target)}))}),{properties:h(n).join(", "),elements:h(e)}},X=function(t){var n=V(t);n.elements.forEach(function(t){t.style.willChange=n.properties})},Y=function(t){var n=V(t);n.elements.forEach(function(t){t.style.removeProperty("will-change")})},Q=function(t){var n=o.string(t)?c(t)[0]:t;return{path:n,value:n.getTotalLength()}},Z=function(t,n){var e=t.path,r=t.value*n,a=function(a){var o=a||0,i=n>1?t.value+o:r+o;return e.getPointAtLength(i)},o=a(),i=a(-1),u=a(1);switch(t.name){case"translateX":return o.x;case"translateY":return o.y;case"rotate":return 180*Math.atan2(u.y-i.y,u.x-i.x)/Math.PI}},q=function(t,n){var e=Math.min(Math.max(n-t.delay,0),t.duration),r=e/t.duration,a=t.to.numbers.map(function(n,e){var a=t.from.numbers[e],o=i[t.easing](r,t.elasticity),u=t.path?Z(t,o):a+o*(n-a);return u=t.round?Math.round(u*t.round)/t.round:u});return P(a,t.to.strings,t.from.strings)},B=function(n,e){var r;n.currentTime=e,n.progress=e/n.duration*100;for(var o=0;o=r.delay&&(r.begin(n),r.begin=void 0),e.current>=n.duration&&(r.loop?(e.start=t,"alternate"===r.direction&&$(n,!0),o.number(r.loop)&&r.loop--):(n.ended=!0,n.pause(),r.complete&&r.complete(n)),e.last=0)},n.seek=function(t){B(n,t/100*n.duration)},n.pause=function(){Y(n);var t=z.indexOf(n);t>-1&&z.splice(t,1)},n.play=function(t){n.pause(),t&&(n=g(D(g(t,n.settings)),n)),e.start=0,e.last=n.ended?0:n.currentTime;var r=n.settings;"reverse"===r.direction&&$(n),"alternate"!==r.direction||r.loop||(r.loop=1),X(n),z.push(n),G||H()},n.restart=function(){n.reversed&&$(n),n.pause(),n.seek(0),n.play()},n.settings.autoplay&&n.play(),n},K=function(t){for(var n=l(o.array(t)?t.map(p):p(t)),e=z.length-1;e>=0;e--)for(var r=z[e],a=r.tweens,i=a.length-1;i>=0;i--)for(var u=a[i].animatables,s=u.length-1;s>=0;s--)d(n,u[s].target)&&(u.splice(s,1),u.length||a.splice(i,1),a.length||r.pause())};return J.version=n,J.speed=1,J.list=z,J.remove=K,J.easings=i,J.getValue=O,J.path=Q,J.random=f,J})}]);