var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.defineProperty=typeof Object.defineProperties=='function'?Object.defineProperty:function(b,c,a){a=(a);if(b==Array.prototype||b==Object.prototype){return}b[c]=a.value};$jscomp.getGlobal=function(a){return typeof window!='undefined'&&window===a?a:typeof global!='undefined'&&global!=null?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(i,f,j,k){if(!f){return}var a=$jscomp.global;var b=i.split('.');for(var e=0;ec){if(--b in this){this[--d]=this[b]}else {delete this[d]}}}return this};return b},'es6-impl','es3');$jscomp.SYMBOL_PREFIX='jscomp_symbol_';$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};if(!$jscomp.global['Symbol']){$jscomp.global['Symbol']=$jscomp.Symbol}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return ($jscomp.SYMBOL_PREFIX+(a||'')+$jscomp.symbolCounter_++)};$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global['Symbol'].iterator;if(!a){a=$jscomp.global['Symbol'].iterator=$jscomp.global['Symbol']('iterator')}if(typeof Array.prototype[a]!='function'){$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}})}$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){if(bd){b=d}b=Number(b);if(b<0){b=Math.max(0,d+b)}for(var e=Number(c||0);e-0.25){var f=b;var g=1;var c=b;var d=0;var e=1;while(d!=c){f*=b;e*=-1;c=(d=c)+e*f/++g}return c}return Math.log(1+b)};return b},'es6-impl','es3');$jscomp.polyfill('Math.atanh',function(b){if(b){return b}var a=Math.log1p;var c=function(c){c=Number(c);return (a(c)-a(-c))/2};return c},'es6-impl','es3');$jscomp.polyfill('Math.cbrt',function(a){if(a){return a}var b=function(b){if(b===0){return b}b=Number(b);var c=Math.pow(Math.abs(b),1/3);return b<0?-c:c};return b},'es6-impl','es3');$jscomp.polyfill('Math.clz32',function(a){if(a){return a}var b=function(b){b=Number(b)>>>0;if(b===0){return 32}var c=0;if((b&4.29490176E9)===0){b<<=16;c+=16}if((b&4.27819008E9)===0){b<<=8;c+=8}if((b&4.02653184E9)===0){b<<=4;c+=4}if((b&3.221225472E9)===0){b<<=2;c+=2}if((b&2.147483648E9)===0){c++}return c};return b},'es6-impl','es3');$jscomp.polyfill('Math.cosh',function(a){if(a){return a}var b=Math.exp;var c=function(c){c=Number(c);return (b(c)+b(-c))/2};return c},'es6-impl','es3');$jscomp.polyfill('Math.expm1',function(a){if(a){return a}var b=function(b){b=Number(b);if(b<0.25&&b>-0.25){var e=b;var f=1;var c=b;var d=0;while(d!=c){e*=b/++f;c=(d=c)+e}return c}return Math.exp(b)-1};return b},'es6-impl','es3');$jscomp.polyfill('Math.hypot',function(a){if(a){return a}var b=function(c,d,h){c=Number(c);d=Number(d);var b,g,f;var e=Math.max(Math.abs(c),Math.abs(d));for(b=2;b1.0E100||e<1.0E-100){c=c/e;d=d/e;f=c*c+d*d;for(b=2;b>>16&65535;var d=b&65535;var g=c>>>16&65535;var e=c&65535;var h=f*e+d*g<<16>>>0;return d*e+h|0};return b},'es6-impl','es3');$jscomp.polyfill('Math.log10',function(a){if(a){return a}var b=function(b){return Math.log(b)/Math.LN10};return b},'es6-impl','es3');$jscomp.polyfill('Math.log2',function(a){if(a){return a}var b=function(b){return Math.log(b)/Math.LN2};return b},'es6-impl','es3');$jscomp.polyfill('Math.sign',function(a){if(a){return a}var b=function(b){b=Number(b);return b===0||isNaN(b)?b:b>0?1:-1};return b},'es6-impl','es3');$jscomp.polyfill('Math.sinh',function(a){if(a){return a}var b=Math.exp;var c=function(c){c=Number(c);if(c===0){return c}return (b(c)-b(-c))/2};return c},'es6-impl','es3');$jscomp.polyfill('Math.tanh',function(a){if(a){return a}var b=function(b){b=Number(b);if(b===0){return b}var c=Math.exp(-2*Math.abs(b));var d=(1-c)/(1+c);return b<0?-d:d};return b},'es6-impl','es3');$jscomp.polyfill('Math.trunc',function(a){if(a){return a}var b=function(b){b=Number(b);if(isNaN(b)||b===Infinity||b===-Infinity||b===0){return b}var c=Math.floor(Math.abs(b));return b<0?-c:c};return b},'es6-impl','es3');$jscomp.polyfill('Number.EPSILON',function(a){return Math.pow(2,-52)},'es6-impl','es3');$jscomp.polyfill('Number.MAX_SAFE_INTEGER',function(){return 9.007199254740991E15},'es6-impl','es3');$jscomp.polyfill('Number.MIN_SAFE_INTEGER',function(){return -9.007199254740991E15},'es6-impl','es3');$jscomp.polyfill('Number.isFinite',function(a){if(a){return a}var b=function(b){if(typeof b!=='number'){return !1}return !isNaN(b)&&b!==Infinity&&b!==-Infinity};return b},'es6-impl','es3');$jscomp.polyfill('Number.isInteger',function(a){if(a){return a}var b=function(b){if(!Number.isFinite(b)){return !1}return b===Math.floor(b)};return b},'es6-impl','es3');$jscomp.polyfill('Number.isNaN',function(a){if(a){return a}var b=function(b){return typeof b==='number'&&isNaN(b)};return b},'es6-impl','es3');$jscomp.polyfill('Number.isSafeInteger',function(a){if(a){return a}var b=function(b){return Number.isInteger(b)&&Math.abs(b)<=Number.MAX_SAFE_INTEGER};return b},'es6-impl','es3');$jscomp.polyfill('Object.assign',function(a){if(a){return a}var b=function(e,f){for(var d=1;d3?f:b,e);return !0}else {if(c.writable&&!Object.isFrozen(b)){b[d]=e;return !0}}return !1};return b},'es6','es5');$jscomp.polyfill('Reflect.setPrototypeOf',function(a){if(a){return a}if(typeof ''.__proto__!='object'){return null}var b=function(b,c){try{b.__proto__=c;return b.__proto__===c}catch(d){return !1}};return b},'es6','es5');$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.polyfill('Set',function(b){var c=!$jscomp.ASSUME_NO_NATIVE_SET&&function(){if(!b||!b.prototype.entries||typeof Object.seal!='function'){return !1}try{b=(b);var d=Object.seal({x:4});var c=new b($jscomp.makeIterator([d]));if(!c.has(d)||c.size!=1||c.add(d)!=c||c.size!=1||c.add({x:4})!=c||c.size!=2){return !1}var e=c.entries();var a=e.next();if(a.done||a.value[0]!=d||a.value[1]!=d){return !1}a=e.next();if(a.done||a.value[0]==d||a.value[0].x!=4||a.value[1]!=a.value[0]){return !1}return e.next().done}catch(f){return !1}}();if(c){return b}$jscomp.initSymbol();$jscomp.initSymbolIterator();var a=function(a){this.map_=new Map();if(a){var e=$jscomp.makeIterator(a);var c;while(!(c=e.next()).done){var d=(c).value;this.add(d)}}this.size=this.map_.size};a.prototype.add=function(a){this.map_.set(a,a);this.size=this.map_.size;return this};a.prototype['delete']=function(c){var a=this.map_['delete'](c);this.size=this.map_.size;return a};a.prototype.clear=function(){this.map_.clear();this.size=0};a.prototype.has=function(a){return this.map_.has(a)};a.prototype.entries=function(){return this.map_.entries()};a.prototype.values=function(){return this.map_.values()};a.prototype.keys=a.prototype.values;(a.prototype)[Symbol.iterator]=a.prototype.values;a.prototype.forEach=function(c,a){var d=this;this.map_.forEach(function(e){return c.call((a),e,e,d)})};return a},'es6-impl','es3');$jscomp.checkStringArgs=function(a,c,b){if(a==null){throw new TypeError("The 'this' value for String.prototype."+b+' must not be null or undefined')}if(c instanceof RegExp){throw new TypeError('First argument to String.prototype.'+b+' must not be a regular expression')}return a+''};$jscomp.polyfill('String.prototype.codePointAt',function(a){if(a){return a}var b=function(b){var e=$jscomp.checkStringArgs(this,null,'codePointAt');var f=e.length;b=Number(b)||0;if(!(b>=0&&b56319||b+1===f){return c}var d=e.charCodeAt(b+1);if(d<56320||d>57343){return c}return (c-55296)*1024+d+9216};return b},'es6-impl','es3');$jscomp.polyfill('String.prototype.endsWith',function(a){if(a){return a}var b=function(b,c){var d=$jscomp.checkStringArgs(this,b,'endsWith');b=b+'';if(c===void 0){c=d.length}var f=Math.max(0,Math.min(c|0,d.length));var e=b.length;while(e>0&&f>0){if(d[--f]!=b[--e]){return !1}}return e<=0};return b},'es6-impl','es3');$jscomp.polyfill('String.fromCodePoint',function(a){if(a){return a}var b=function(e){var c='';for(var d=0;d1114111||b!==Math.floor(b)){throw new RangeError('invalid_code_point '+b)}if(b<=65535){c+=String.fromCharCode(b)}else {b-=65536;c+=String.fromCharCode(b>>>10&1023|55296);c+=String.fromCharCode(b&1023|56320)}}return c};return b},'es6-impl','es3');$jscomp.polyfill('String.prototype.includes',function(a){if(a){return a}var b=function(b,c){var d=$jscomp.checkStringArgs(this,b,'includes');return d.indexOf(b,c||0)!==-1};return b},'es6-impl','es3');$jscomp.polyfill('String.prototype.repeat',function(a){if(a){return a}var b=function(b){var c=$jscomp.checkStringArgs(this,null,'repeat');if(b<0||b>1342177279){throw new RangeError('Invalid count value')}b=b|0;var d='';while(b){if(b&1){d+=c}if(b>>>=1){c+=c}}return d};return b},'es6-impl','es3');$jscomp.stringPadding=function(c,a){var b=c!==undefined?String(c):' ';if(!(a>0)||!b){return ''}var d=Math.ceil(a/b.length);return b.repeat(d).substring(0,a)};$jscomp.polyfill('String.prototype.padEnd',function(a){if(a){return a}var b=function(d,c){var b=$jscomp.checkStringArgs(this,null,'padStart');var e=d-b.length;return b+$jscomp.stringPadding(c,e)};return b},'es8','es3');$jscomp.polyfill('String.prototype.padStart',function(a){if(a){return a}var b=function(d,c){var b=$jscomp.checkStringArgs(this,null,'padStart');var e=d-b.length;return $jscomp.stringPadding(c,e)+b};return b},'es8','es3');$jscomp.polyfill('String.prototype.startsWith',function(a){if(a){return a}var b=function(b,g){var c=$jscomp.checkStringArgs(this,b,'startsWith');b=b+'';var h=c.length;var e=b.length;var f=Math.max(0,Math.min((g)|0,c.length));var d=0;while(d=e};return b},'es6-impl','es3');$jscomp.arrayFromIterator=function(c){var b;var a=[];while(!(b=c.next()).done){a.push(b.value)}return a};$jscomp.arrayFromIterable=function(a){if(a instanceof Array){return a}else {return $jscomp.arrayFromIterator($jscomp.makeIterator(a))}};$jscomp.inherits=function(a,b){function tempCtor(){}tempCtor.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new tempCtor();a.prototype.constructor=a;for(var c in b){if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);if(d){Object.defineProperty(a,c,d)}}else {a[c]=b[c]}}};$jscomp.polyfill('WeakSet',function(b){function isConformant(){if(!b||!Object.seal){return !1}try{var c=Object.seal({});var d=Object.seal({});var a=new (b)([c]);if(!a.has(c)||a.has(d)){return !1}a['delete'](c);a.add(d);return !a.has(c)&&a.has(d)}catch(e){return !1}}if(isConformant()){return b}var a=function(a){this.map_=new WeakMap();if(a){$jscomp.initSymbol();$jscomp.initSymbolIterator();var e=$jscomp.makeIterator(a);var c;while(!(c=e.next()).done){var d=c.value;this.add(d)}}};a.prototype.add=function(a){this.map_.set(a,!0);return this};a.prototype.has=function(a){return this.map_.has(a)};a.prototype['delete']=function(a){return this.map_['delete'](a)};return a},'es6-impl','es3');try{if(Array.prototype.values.toString().indexOf('[native code]')==-1){delete Array.prototype.values}}catch(a){}!function(n,k,t){function r(a,b){return typeof a===b}function o(){var d,a,g,f,e,i,c;for(var h in q){if(q.hasOwnProperty(h)){if(d=[],a=q[h],a.name&&(d.push(a.name.toLowerCase()),a.options&&a.options.aliases&&a.options.aliases.length)){for(g=0;gc;c++){if(b=h[c],j=g.style[b],f(b,'-')&&(b=a(b)),g.style[b]!==t){if(d||r(e,'undefined')){return s(),'pfx'==o?b:!0}try{g.style[b]=e}catch(G){}if(g.style[b]!=j){return s(),'pfx'==o?b:!0}}}return s(),!1}function h(a,b,g,f,e){var c=a.charAt(0).toUpperCase()+a.slice(1),d=(a+' '+C.join(c+' ')+c).split(' ');return r(b,'string')||r(b,'undefined')?v(d,b,f,e):(d=(a+' '+A.join(c+' ')+c).split(' '),p(d,b,g))}function y(a,b,c){return h(a,t,t,b,c)}var D=[],q=[],e={_version:'3.2.0',_config:{classPrefix:'',enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(a,b){var c=this;setTimeout(function(){b(c[a])},0)},addTest:function(a,b,c){q.push({name:a,fn:b,options:c})},addAsyncTest:function(a){q.push({name:null,fn:a})}},b=function(){};b.prototype=e,b=new b();var j=k.documentElement,w='svg'===j.nodeName.toLowerCase(),B='Moz O ms Webkit',C=e._config.usePrefixes?B.split(' '):[];e._cssomPrefixes=C;var z=function(a){var c,g=prefixes.length,b=n.CSSRule;if('undefined'==typeof b){return t}if(!a){return !1}if(a=a.replace(/^@/,''),c=a.replace(/-/g,'_').toUpperCase()+'_RULE',c in b){return '@'+a}for(var d=0;g>d;d++){var e=prefixes[d],f=e.toUpperCase()+'_'+c;if(f in b){return '@-'+e.toLowerCase()+'-'+a}}return !1};e.atRule=z;var A=e._config.usePrefixes?B.toLowerCase().split(' '):[];e._domPrefixes=A;var E={elem:l('modernizr')};b._q.push(function(){delete E.elem});var g={style:E.elem.style};b._q.unshift(function(){delete g.style}),e.testAllProps=h;var F=e.prefixed=function(b,c,d){return 0===b.indexOf('@')?z(b):(-1!=b.indexOf('-')&&(b=a(b)),c?h(b,c,d):h(b,'pfx'))};e.prefixedCSS=function(b){var a=F(b);return a&&s(a)};e.testAllProps=y,b.addTest('csstransitions',y('transition','all',!0)),o(),i(D),delete e.addTest,delete e.addAsyncTest;for(var x=0;xl){return a(l)}while(km){k=j}else {l=j}j=(l-k)*0.5+k}return a(j)}},c=function(a,b){return Math.floor(Math.random()*(b-a+1))+a},r=function(c,b){var a=!0;return function(d){if(a){a=!1;setTimeout(function(){a=!0},b);c(d)}}},p=function(){var b=h.getComputedStyle(document.documentElement,''),a=(Array.prototype.slice.call(b).join('').match(/-(moz|webkit|ms)-/)||b.OLink===''&&['','o'])[1],c='WebKit|Moz|MS|O'.match(new RegExp('('+a+')','i'))[1];return {dom:c,lowercase:a,css:'-'+a+'-',js:a[0].toUpperCase()+a.substr(1)}}();var k={transitions:Modernizr.csstransitions},l={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd','msTransition':'MSTransitionEnd','transition':'transitionend'},j=l[Modernizr.prefixed('transition')],n=function(d,b,c){var a=function(e){if(k.transitions){if(e.target!=this||c&&e.propertyName!==c&&e.propertyName!==p.css+c){return}this.removeEventListener(j,a)}if(b&&typeof b==='function'){b.call(this)}};if(k.transitions){d.addEventListener(j,a)}else {a()}},f=document.querySelector('.component'),g=f.querySelector('div.button--start'),o=50,i,m=4.5,d={width:h.innerWidth,height:h.innerHeight},a=g.getBoundingClientRect(),b={width:g.offsetWidth,height:g.offsetHeight},e=!1,q=f.querySelector('.player');function init(){createNotes();listen()}function createNotes(){var a=document.createElement('div'),c='';a.className='notes';for(var b=0;b'}a.innerHTML=c;f.insertBefore(a,f.firstChild);i=[].slice.call(a.querySelectorAll('.note'))}function listen(){e=!0;showNotes()}function stopListening(){e=!1;hideNotes()}function showNotes(){i.forEach(function(a){positionNote(a);animateNote(a)})}function hideNotes(){i.forEach(function(a){a.style.opacity=0})}function positionNote(e){var f=c(-2*(a.left+b.width/2),2*(d.width-(a.left+b.width/2))),g,i=c(-30,30);if(f>-1*(a.top+b.height/2)&&f0?c(-2*(a.top+b.height/2),-1*(a.top+b.height/2)):c(d.height-(a.top+b.height/2),d.height+d.height-(a.top+b.height/2))}else {g=c(-2*(a.top+b.height/2),d.height+d.height-(a.top+b.height/2))}e.style.WebkitTransition=e.style.transition='none';e.style.WebkitTransform=e.style.transform='translate3d('+f+'px,'+g+'px,0) rotate3d(0,0,1,'+i+'deg)';e.setAttribute('data-tx',Math.abs(f));e.setAttribute('data-ty',Math.abs(g))}function animateNote(a){setTimeout(function(){if(!e){return}var b=m*Math.sqrt(Math.pow(a.getAttribute('data-tx'),2)+Math.pow(a.getAttribute('data-ty'),2));a.style.WebkitTransition='-webkit-transform '+b+'ms ease, opacity 0.8s';a.style.transition='transform '+b+'ms ease-in, opacity 0.8s';a.style.WebkitTransform=a.style.transform='translate3d(0,0,0)';a.style.opacity=1;var c=function(){a.style.WebkitTransition=a.style.transition='none';a.style.opacity=0;if(!e){return}positionNote(a);animateNote(a)};n(a,c,'transform')},60)}init()})(window);