-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmotion-features.min.js
2 lines (2 loc) · 31.5 KB
/
motion-features.min.js
1
2
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.motionFeatures=t()}}(function(){return function t(i,e,n){function r(o,a){if(!e[o]){if(!i[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var u=e[o]={exports:{}};i[o][0].call(u.exports,function(t){var e=i[o][1][t];return r(e?e:t)},u,u.exports,t,i,e,n)}return e[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,i,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=t("./motion-features");Object.defineProperty(e,"MotionFeatures",{enumerable:!0,get:function(){return n(r).default}});var s=t("./zero-crossing-rate");Object.defineProperty(e,"ZeroCrossingRate",{enumerable:!0,get:function(){return n(s).default}})},{"./motion-features":2,"./zero-crossing-rate":3}],2:[function(t,i,e){(function(i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(){return"undefined"==typeof window?function(){var t=i.hrtime();return t[0]+1e-9*t[1]}:"undefined"===window.performance?"undefined"===Date.now?function(){return new Date.getTime}:function(){return Date.now()}:function(){return window.performance.now()}}Object.defineProperty(e,"__esModule",{value:!0});var s=t("babel-runtime/core-js/get-iterator"),o=n(s),a=t("babel-runtime/core-js/object/assign"),c=n(a),h=t("babel-runtime/helpers/classCallCheck"),u=n(h),_=t("babel-runtime/helpers/createClass"),l=n(_),f=t("./zero-crossing-rate"),d=n(f),p=r(),y=function(){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.default)(this,t);var e={descriptors:["accRaw","gyrRaw","accIntensity","gyrIntensity","freefall","kick","shake","spin","still","gyrZcr","accZcr"],gyrIsInDegrees:!0,accIntensityParam1:.8,accIntensityParam2:.1,gyrIntensityParam1:.9,gyrIntensityParam2:1,freefallAccThresh:.15,freefallGyrThresh:750,freefallGyrDeltaThresh:40,kickThresh:.01,kickSpeedGate:200,kickMedianFiltersize:9,kickCallback:null,shakeThresh:.1,shakeWindowSize:200,shakeSlideFactor:10,spinThresh:200,stillThresh:5e3,stillSlideFactor:5,gyrZcrNoiseThresh:.001,gyrZcrFrameSize:100,gyrZcrHopSize:10,accZcrNoiseThresh:.001,accZcrFrameSize:100,accZcrHopSize:10};this._params=(0,c.default)({},e,i),this._methods={accRaw:this._updateAccRaw.bind(this),gyrRaw:this._updateGyrRaw.bind(this),accIntensity:this._updateAccIntensity.bind(this),gyrIntensity:this._updateGyrIntensity.bind(this),freefall:this._updateFreefall.bind(this),kick:this._updateKick.bind(this),shake:this._updateShake.bind(this),spin:this._updateSpin.bind(this),still:this._updateStill.bind(this),gyrZcr:this._updateGyrZcr.bind(this),accZcr:this._updateAccZcr.bind(this)},this._kickCallback=this._params.kickCallback,this.acc=[0,0,0],this.gyr=[0,0,0],this._accLast=[[0,0,0],[0,0,0],[0,0,0]],this._accIntensityLast=[[0,0],[0,0],[0,0]],this._accIntensity=[0,0,0],this._accIntensityNorm=0,this._accNorm=0,this._gyrDelta=[0,0,0],this._gyrNorm=0,this._gyrDeltaNorm=0,this._fallBegin=p(),this._fallEnd=p(),this._fallDuration=0,this._isFalling=!1,this._gyrLast=[[0,0,0],[0,0,0],[0,0,0]],this._gyrIntensityLast=[[0,0],[0,0],[0,0]],this._gyrIntensity=[0,0,0],this._gyrIntensityNorm=0,this._kickIntensity=0,this._lastKick=0,this._isKicking=!1,this._medianValues=[0,0,0,0,0,0,0,0,0],this._medianLinking=[3,4,1,5,7,8,0,2,6],this._medianFifo=[6,2,7,0,1,3,8,4,5],this._i1=0,this._i2=0,this._i3=0,this._accIntensityNormMedian=0,this._accDelta=[0,0,0],this._shakeWindow=[new Array(this._params.shakeWindowSize),new Array(this._params.shakeWindowSize),new Array(this._params.shakeWindowSize)];for(var n=0;n<3;n++)for(var r=0;r<this._params.shakeWindowSize;r++)this._shakeWindow[n][r]=0;this._shakeNb=[0,0,0],this._shakingRaw=0,this._shakeSlidePrev=0,this._shaking=0,this._spinBegin=p(),this._spinEnd=p(),this._spinDuration=0,this._isSpinning=!1,this._stillCrossProd=0,this._stillSlide=0,this._stillSlidePrev=0,this._isStill=!1,this._loopIndexPeriod=this._lcm(this._lcm(this._lcm(2,3),this._params.kickMedianFiltersize),this._params.shakeWindowSize),this._loopIndex=0;var s=this._params.descriptors.indexOf("gyrZcr")>-1,o=this._params.descriptors.indexOf("accZcr")>-1;s&&(this._gyrZcr=new d.default({noiseThreshold:this._params.gyrZcrNoiseThresh,frameSize:this._params.gyrZcrFrameSize,hopSize:this._params.gyrZcrHopSize})),o&&(this._accZcr=new d.default({noiseThreshold:this._params.accZcrNoiseThresh,frameSize:this._params.accZcrFrameSize,hopSize:this._params.accZcrHopSize}))}return(0,l.default)(t,[{key:"updateParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in t)"descriptors"!==i&&(this._params[i]=t[i])}},{key:"setAccelerometer",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.acc[0]=t,this.acc[1]=i,this.acc[2]=e}},{key:"setGyroscope",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.gyr[0]=t,this.gyr[1]=i,this.gyr[2]=e,this._params.gyrIsInDegrees)for(var n=0;n<3;n++)this.gyr[n]*=2*Math.PI/360}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._elapsedTime=p(),this._accNorm=this._magnitude3D(this.acc),this._gyrNorm=this._magnitude3D(this.gyr);var i=null,e=null;try{e={};var n=!0,r=!1,s=void 0;try{for(var a,c=(0,o.default)(this._params.descriptors);!(n=(a=c.next()).done);n=!0){var h=a.value;this._methods[h]&&this._methods[h](e)}}catch(t){r=!0,s=t}finally{try{!n&&c.return&&c.return()}finally{if(r)throw s}}}catch(t){i=t}return this._loopIndex=(this._loopIndex+1)%this._loopIndexPeriod,t&&t(i,e),e}},{key:"_updateAccRaw",value:function(t){t.accRaw={x:this.acc[0],y:this.acc[1],z:this.acc[2]}}},{key:"_updateGyrRaw",value:function(t){t.gyrRaw={x:this.gyr[0],y:this.gyr[1],z:this.gyr[2]}}},{key:"_updateAccIntensity",value:function(t){this._accIntensityNorm=0;for(var i=0;i<3;i++)this._accLast[i][this._loopIndex%3]=this.acc[i],this._accIntensity[i]=this._intensity1D(this.acc[i],this._accLast[i][(this._loopIndex+1)%3],this._accIntensityLast[i][(this._loopIndex+1)%2],this._params.accIntensityParam1,this._params.accIntensityParam2,1),this._accIntensityLast[i][this._loopIndex%2]=this._accIntensity[i],this._accIntensityNorm+=this._accIntensity[i];t.accIntensity={norm:this._accIntensityNorm,x:this._accIntensity[0],y:this._accIntensity[1],z:this._accIntensity[2]}}},{key:"_updateGyrIntensity",value:function(t){this._gyrIntensityNorm=0;for(var i=0;i<3;i++)this._gyrLast[i][this._loopIndex%3]=this.gyr[i],this._gyrIntensity[i]=this._intensity1D(this.gyr[i],this._gyrLast[i][(this._loopIndex+1)%3],this._gyrIntensityLast[i][(this._loopIndex+1)%2],this._params.gyrIntensityParam1,this._params.gyrIntensityParam2,1),this._gyrIntensityLast[i][this._loopIndex%2]=this._gyrIntensity[i],this._gyrIntensityNorm+=this._gyrIntensity[i];t.gyrIntensity={norm:this._gyrIntensityNorm,x:this._gyrIntensity[0],y:this._gyrIntensity[1],z:this._gyrIntensity[2]}}},{key:"_updateFreefall",value:function(t){for(var i=0;i<3;i++)this._gyrDelta[i]=this._delta(this._gyrLast[i][(this._loopIndex+1)%3],this.gyr[i],1);this._gyrDeltaNorm=this._magnitude3D(this._gyrDelta),this._accNorm<this._params.freefallAccThresh||this._gyrNorm>this._params.freefallGyrThresh&&this._gyrDeltaNorm<this._params.freefallGyrDeltaThresh?(this._isFalling||(this._isFalling=!0,this._fallBegin=p()),this._fallEnd=p()):this._isFalling&&(this._isFalling=!1),this._fallDuration=this._fallEnd-this._fallBegin,t.freefall={accNorm:this._accNorm,falling:this._isFalling,duration:this._fallDuration}}},{key:"_updateKick",value:function(t){if(this._i3=this._loopIndex%this._params.kickMedianFiltersize,this._i1=this._medianFifo[this._i3],this._i2=1,this._i1<this._params.kickMedianFiltersize-1&&this._accIntensityNorm>this._medianValues[this._i1+this._i2]){for(;this._i1+this._i2<this.kickMedianFiltersize&&this._accIntensityNorm>this._medianValues[this._i1+this._i2];)this._medianFifo[this._medianLinking[this._i1+this._i2]]=this._medianFifo[this._medianLinking[this._i1+this._i2]]-1,this._medianValues[this._i1+this._i2-1]=this._medianValues[this._i1+this._i2],this._medianLinking[this._i1+this._i2-1]=this._medianLinking[this._i1+this._i2],this._i2++;this._medianValues[this._i1+this._i2-1]=this._accIntensityNorm,this._medianLinking[this._i1+this._i2-1]=this._i3,this._medianFifo[this._i3]=this._i1+this._i2-1}else{for(;this._i2<this._i1+1&&this._accIntensityNorm<this._medianValues[this._i1-this._i2];)this._medianFifo[this._medianLinking[this._i1-this._i2]]=this._medianFifo[this._medianLinking[this._i1-this._i2]]+1,this._medianValues[this._i1-this._i2+1]=this._medianValues[this._i1-this._i2],this._medianLinking[this._i1-this._i2+1]=this._medianLinking[this._i1-this._i2],this._i2++;this._medianValues[this._i1-this._i2+1]=this._accIntensityNorm,this._medianLinking[this._i1-this._i2+1]=this._i3,this._medianFifo[this._i3]=this._i1-this._i2+1}this._accIntensityNorm-this._accIntensityNormMedian>this._params.kickThresh?this._isKicking?(this._kickIntensity<this._accIntensityNorm&&(this._kickIntensity=this._accIntensityNorm),this._kickCallback&&this._kickCallback({state:"middle",intensity:this._kickIntensity})):(this._isKicking=!0,this._kickIntensity=this._accIntensityNorm,this._lastKick=this._elapsedTime,this._kickCallback&&this._kickCallback({state:"start",intensity:this._kickIntensity})):this._elapsedTime-this._lastKick>this._params.kickSpeedGate&&(this._isKicking&&this._kickCallback&&this._kickCallback({state:"stop",intensity:this._kickIntensity}),this._isKicking=!1),this._accIntensityNormMedian=this._medianValues[Math.ceil(.5*this._params.kickMedianFiltersize)],t.kick={intensity:this._kickIntensity,kicking:this._isKicking}}},{key:"_updateShake",value:function(t){for(var i=0;i<3;i++)this._accDelta[i]=this._delta(this._accLast[i][(this._loopIndex+1)%3],this.acc[i],1);for(var e=0;e<3;e++)this._shakeWindow[e][this._loopIndex%this._params.shakeWindowSize]&&this._shakeNb[e]--,this._accDelta[e]>this._params.shakeThresh?(this._shakeWindow[e][this._loopIndex%this._params.shakeWindowSize]=1,this._shakeNb[e]++):this._shakeWindow[e][this._loopIndex%this._params.shakeWindowSize]=0;this._shakingRaw=this._magnitude3D(this._shakeNb)/this._params.shakeWindowSize,this._shakeSlidePrev=this._shaking,this._shaking=this._slide(this._shakeSlidePrev,this._shakingRaw,this._params.shakeSlideFactor),t.shake={shaking:this._shaking}}},{key:"_updateSpin",value:function(t){this._gyrNorm>this._params.spinThresh?(this._isSpinning||(this._isSpinning=!0,this._spinBegin=p()),this._spinEnd=p()):this._isSpinning&&(this._isSpinning=!1),this._spinDuration=this._spinEnd-this._spinBegin,t.spin={spinning:this._isSpinning,duration:this._spinDuration,gyrNorm:this._gyrNorm}}},{key:"_updateStill",value:function(t){this._stillCrossProd=this._stillCrossProduct(this.gyr),this._stillSlidePrev=this._stillSlide,this._stillSlide=this._slide(this._stillSlidePrev,this._stillCrossProd,this._params.stillSlideFactor),this._stillSlide>this._params.stillThresh?this._isStill=!1:this._isStill=!0,t.still={still:this._isStill,slide:this._stillSlide}}},{key:"_updateGyrZcr",value:function(t){var i=this._gyrZcr.process(this._gyrNorm);t.gyrZcr={amplitude:i.amplitude,frequency:i.frequency,periodicity:i.periodicity}}},{key:"_updateAccZcr",value:function(t){this._accZcr.process(this._accNorm);t.accZcr={amplitude:accZcr.amplitude,frequency:accZcr.frequency,periodicity:accZcr.periodicity}}},{key:"_delta",value:function(t,i,e){return(i-t)/(2*e)}},{key:"_intensity1D",value:function(t,i,e,n,r,s){var o=this._delta(t,i,s);return r*o*o+n*e}},{key:"_magnitude3D",value:function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}},{key:"_lcm",value:function(t,i){for(var e=t,n=i;e!=n;)e<n?e+=t:n+=i;return e}},{key:"_slide",value:function(t,i,e){return t+(i-t)/e}},{key:"_stillCrossProduct",value:function(t){return(t[1]-t[2])*(t[1]-t[2])+(t[0]-t[1])*(t[0]-t[1])+(t[2]-t[0])*(t[2]-t[0])}}]),t}();e.default=y}).call(this,t("_process"))},{"./zero-crossing-rate":3,_process:68,"babel-runtime/core-js/get-iterator":4,"babel-runtime/core-js/object/assign":5,"babel-runtime/helpers/classCallCheck":7,"babel-runtime/helpers/createClass":8}],3:[function(t,i,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=t("babel-runtime/core-js/object/assign"),s=n(r),o=t("babel-runtime/helpers/classCallCheck"),a=n(o),c=t("babel-runtime/helpers/createClass"),h=n(c),u={noiseThreshold:.1,frameSize:50,hopSize:5},_=function(){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(this,t),(0,s.default)(i,u),this.mean=0,this.magnitude=0,this.stdDev=0,this.crossings=[],this.periodMean=0,this.periodStdDev=0,this.inputFrame=[],this.setConfig(i)}return(0,h.default)(t,[{key:"setConfig",value:function(t){t.noiseThreshold&&(this.noiseThreshold=t.noiseThreshold),t.frameSize&&(this.frameSize=t.frameSize),t.hopSize&&(this.hopSize=t.hopSize),this.inputBuffer=new Array(this.frameSize);for(var i=0;i<this.frameSize;i++)this.inputBuffer[i]=0;this.hopCounter=0,this.bufferIndex=0,this.results={amplitude:0,frequency:0,periodicity:0}}},{key:"process",value:function(t){return this.inputBuffer[this.bufferIndex]=t,this.bufferIndex=(this.bufferIndex+1)%this.frameSize,this.hopCounter===this.hopSize-1?(this.hopCounter=0,this.processFrame(this.inputBuffer,this.bufferIndex)):this.hopCounter++,this.results}},{key:"processFrame",value:function(t){arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.inputFrame=t,this._mainAlgorithm(),this.amplitude=2*this.stdDev,this.frequency=this.crossings.length/(this.inputFrame.length-1),this.crossings.length>2?this.periodicity=1-Math.sqrt(this.periodStdDev/this.inputFrame.length):this.periodicity=0,this.results.amplitude=this.amplitude,this.results.frequency=this.frequency,this.results.periodicity=this.periodicity,this.results}},{key:"_mainAlgorithm",value:function(){var t=void 0,i=void 0;t=i=this.inputFrame[0],this.mean=0,this.magnitude=0;for(var e in this.inputFrame){var n=this.inputFrame[e];this.magnitude+=n*n,this.mean+=n,n>i?i=n:n<t&&(t=n)}this.mean=t+.5*(i-t),this.magnitude/=this.inputFrame.length,this.magnitude=Math.sqrt(this.magnitude),this.crossings=[],this.stdDev=0;for(var r=this.inputFrame[0]-this.mean,s=1;s<this.inputFrame.length;s++){var o=this.inputFrame[s]-this.mean;this.stdDev+=o*o,r>this.noiseThreshold&&o<this.noiseThreshold?this.crossings.push(s):r<this.noiseThreshold&&o>this.noiseThreshold&&this.crossings.push(s),r=o}this.stdDev/=this.inputFrame.length-1,this.stdDev=Math.sqrt(this.stdDev),this.periodMean=0;for(var a=1;a<this.crossings.length;a++)this.periodMean+=this.crossings[a]-this.crossings[a-1];this.periodMean/=this.crossings.length-1,this.periodStdDev=0;for(var c=1;c<this.crossings.length;c++){var h=this.crossings[c]-this.crossings[c-1]-this.periodMean;this.periodStdDev+=h*h}this.crossings.length>2&&(this.periodStdDev=Math.sqrt(this.periodStdDev/(this.crossings.length-2)))}}]),t}();e.default=_},{"babel-runtime/core-js/object/assign":5,"babel-runtime/helpers/classCallCheck":7,"babel-runtime/helpers/createClass":8}],4:[function(t,i,e){i.exports={default:t("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":9}],5:[function(t,i,e){i.exports={default:t("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":10}],6:[function(t,i,e){i.exports={default:t("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":11}],7:[function(t,i,e){"use strict";e.__esModule=!0,e.default=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}},{}],8:[function(t,i,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=t("../core-js/object/define-property"),s=n(r);e.default=function(){function t(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,s.default)(t,n.key,n)}}return function(i,e,n){return e&&t(i.prototype,e),n&&t(i,n),i}}()},{"../core-js/object/define-property":6}],9:[function(t,i,e){t("../modules/web.dom.iterable"),t("../modules/es6.string.iterator"),i.exports=t("../modules/core.get-iterator")},{"../modules/core.get-iterator":62,"../modules/es6.string.iterator":66,"../modules/web.dom.iterable":67}],10:[function(t,i,e){t("../../modules/es6.object.assign"),i.exports=t("../../modules/_core").Object.assign},{"../../modules/_core":18,"../../modules/es6.object.assign":64}],11:[function(t,i,e){t("../../modules/es6.object.define-property");var n=t("../../modules/_core").Object;i.exports=function(t,i,e){return n.defineProperty(t,i,e)}},{"../../modules/_core":18,"../../modules/es6.object.define-property":65}],12:[function(t,i,e){i.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],13:[function(t,i,e){i.exports=function(){}},{}],14:[function(t,i,e){var n=t("./_is-object");i.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},{"./_is-object":32}],15:[function(t,i,e){var n=t("./_to-iobject"),r=t("./_to-length"),s=t("./_to-index");i.exports=function(t){return function(i,e,o){var a,c=n(i),h=r(c.length),u=s(o,h);if(t&&e!=e){for(;h>u;)if(a=c[u++],a!=a)return!0}else for(;h>u;u++)if((t||u in c)&&c[u]===e)return t||u||0;return!t&&-1}}},{"./_to-index":53,"./_to-iobject":55,"./_to-length":56}],16:[function(t,i,e){var n=t("./_cof"),r=t("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}()),o=function(t,i){try{return t[i]}catch(t){}};i.exports=function(t){var i,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=o(i=Object(t),r))?e:s?n(i):"Object"==(a=n(i))&&"function"==typeof i.callee?"Arguments":a}},{"./_cof":17,"./_wks":60}],17:[function(t,i,e){var n={}.toString;i.exports=function(t){return n.call(t).slice(8,-1)}},{}],18:[function(t,i,e){var n=i.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],19:[function(t,i,e){var n=t("./_a-function");i.exports=function(t,i,e){if(n(t),void 0===i)return t;switch(e){case 1:return function(e){return t.call(i,e)};case 2:return function(e,n){return t.call(i,e,n)};case 3:return function(e,n,r){return t.call(i,e,n,r)}}return function(){return t.apply(i,arguments)}}},{"./_a-function":12}],20:[function(t,i,e){i.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],21:[function(t,i,e){i.exports=!t("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":25}],22:[function(t,i,e){var n=t("./_is-object"),r=t("./_global").document,s=n(r)&&n(r.createElement);i.exports=function(t){return s?r.createElement(t):{}}},{"./_global":26,"./_is-object":32}],23:[function(t,i,e){i.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],24:[function(t,i,e){var n=t("./_global"),r=t("./_core"),s=t("./_ctx"),o=t("./_hide"),a="prototype",c=function(t,i,e){var h,u,_,l=t&c.F,f=t&c.G,d=t&c.S,p=t&c.P,y=t&c.B,m=t&c.W,g=f?r:r[i]||(r[i]={}),b=g[a],v=f?n:d?n[i]:(n[i]||{})[a];f&&(e=i);for(h in e)u=!l&&v&&void 0!==v[h],u&&h in g||(_=u?v[h]:e[h],g[h]=f&&"function"!=typeof v[h]?e[h]:y&&u?s(_,n):m&&v[h]==_?function(t){var i=function(i,e,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,e)}return new t(i,e,n)}return t.apply(this,arguments)};return i[a]=t[a],i}(_):p&&"function"==typeof _?s(Function.call,_):_,p&&((g.virtual||(g.virtual={}))[h]=_,t&c.R&&b&&!b[h]&&o(b,h,_)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,i.exports=c},{"./_core":18,"./_ctx":19,"./_global":26,"./_hide":28}],25:[function(t,i,e){i.exports=function(t){try{return!!t()}catch(t){return!0}}},{}],26:[function(t,i,e){var n=i.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],27:[function(t,i,e){var n={}.hasOwnProperty;i.exports=function(t,i){return n.call(t,i)}},{}],28:[function(t,i,e){var n=t("./_object-dp"),r=t("./_property-desc");i.exports=t("./_descriptors")?function(t,i,e){return n.f(t,i,r(1,e))}:function(t,i,e){return t[i]=e,t}},{"./_descriptors":21,"./_object-dp":40,"./_property-desc":47}],29:[function(t,i,e){i.exports=t("./_global").document&&document.documentElement},{"./_global":26}],30:[function(t,i,e){i.exports=!t("./_descriptors")&&!t("./_fails")(function(){return 7!=Object.defineProperty(t("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":21,"./_dom-create":22,"./_fails":25}],31:[function(t,i,e){var n=t("./_cof");i.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},{"./_cof":17}],32:[function(t,i,e){i.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],33:[function(t,i,e){"use strict";var n=t("./_object-create"),r=t("./_property-desc"),s=t("./_set-to-string-tag"),o={};t("./_hide")(o,t("./_wks")("iterator"),function(){return this}),i.exports=function(t,i,e){t.prototype=n(o,{next:r(1,e)}),s(t,i+" Iterator")}},{"./_hide":28,"./_object-create":39,"./_property-desc":47,"./_set-to-string-tag":49,"./_wks":60}],34:[function(t,i,e){"use strict";var n=t("./_library"),r=t("./_export"),s=t("./_redefine"),o=t("./_hide"),a=t("./_has"),c=t("./_iterators"),h=t("./_iter-create"),u=t("./_set-to-string-tag"),_=t("./_object-gpo"),l=t("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d="@@iterator",p="keys",y="values",m=function(){return this};i.exports=function(t,i,e,g,b,v,k){h(e,i,g);var j,w,x,I=function(t){if(!f&&t in N)return N[t];switch(t){case p:return function(){return new e(this,t)};case y:return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=i+" Iterator",T=b==y,F=!1,N=t.prototype,z=N[l]||N[d]||b&&N[b],O=z||I(b),M=b?T?I("entries"):O:void 0,D="Array"==i?N.entries||z:z;if(D&&(x=_(D.call(new t)),x!==Object.prototype&&(u(x,S,!0),n||a(x,l)||o(x,l,m))),T&&z&&z.name!==y&&(F=!0,O=function(){return z.call(this)}),n&&!k||!f&&!F&&N[l]||o(N,l,O),c[i]=O,c[S]=m,b)if(j={values:T?O:I(y),keys:v?O:I(p),entries:M},k)for(w in j)w in N||s(N,w,j[w]);else r(r.P+r.F*(f||F),i,j);return j}},{"./_export":24,"./_has":27,"./_hide":28,"./_iter-create":33,"./_iterators":36,"./_library":37,"./_object-gpo":43,"./_redefine":48,"./_set-to-string-tag":49,"./_wks":60}],35:[function(t,i,e){i.exports=function(t,i){return{value:i,done:!!t}}},{}],36:[function(t,i,e){i.exports={}},{}],37:[function(t,i,e){i.exports=!0},{}],38:[function(t,i,e){"use strict";var n=t("./_object-keys"),r=t("./_object-gops"),s=t("./_object-pie"),o=t("./_to-object"),a=t("./_iobject"),c=Object.assign;i.exports=!c||t("./_fails")(function(){var t={},i={},e=Symbol(),n="abcdefghijklmnopqrst";return t[e]=7,n.split("").forEach(function(t){i[t]=t}),7!=c({},t)[e]||Object.keys(c({},i)).join("")!=n})?function(t,i){for(var e=o(t),c=arguments.length,h=1,u=r.f,_=s.f;c>h;)for(var l,f=a(arguments[h++]),d=u?n(f).concat(u(f)):n(f),p=d.length,y=0;p>y;)_.call(f,l=d[y++])&&(e[l]=f[l]);return e}:c},{"./_fails":25,"./_iobject":31,"./_object-gops":42,"./_object-keys":45,"./_object-pie":46,"./_to-object":57}],39:[function(t,i,e){var n=t("./_an-object"),r=t("./_object-dps"),s=t("./_enum-bug-keys"),o=t("./_shared-key")("IE_PROTO"),a=function(){},c="prototype",h=function(){var i,e=t("./_dom-create")("iframe"),n=s.length,r="<",o=">";for(e.style.display="none",t("./_html").appendChild(e),e.src="javascript:",i=e.contentWindow.document,i.open(),i.write(r+"script"+o+"document.F=Object"+r+"/script"+o),i.close(),h=i.F;n--;)delete h[c][s[n]];return h()};i.exports=Object.create||function(t,i){var e;return null!==t?(a[c]=n(t),e=new a,a[c]=null,e[o]=t):e=h(),void 0===i?e:r(e,i)}},{"./_an-object":14,"./_dom-create":22,"./_enum-bug-keys":23,"./_html":29,"./_object-dps":41,"./_shared-key":50}],40:[function(t,i,e){var n=t("./_an-object"),r=t("./_ie8-dom-define"),s=t("./_to-primitive"),o=Object.defineProperty;e.f=t("./_descriptors")?Object.defineProperty:function(t,i,e){if(n(t),i=s(i,!0),n(e),r)try{return o(t,i,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[i]=e.value),t}},{"./_an-object":14,"./_descriptors":21,"./_ie8-dom-define":30,"./_to-primitive":58}],41:[function(t,i,e){var n=t("./_object-dp"),r=t("./_an-object"),s=t("./_object-keys");i.exports=t("./_descriptors")?Object.defineProperties:function(t,i){r(t);for(var e,o=s(i),a=o.length,c=0;a>c;)n.f(t,e=o[c++],i[e]);return t}},{"./_an-object":14,"./_descriptors":21,"./_object-dp":40,"./_object-keys":45}],42:[function(t,i,e){e.f=Object.getOwnPropertySymbols},{}],43:[function(t,i,e){var n=t("./_has"),r=t("./_to-object"),s=t("./_shared-key")("IE_PROTO"),o=Object.prototype;i.exports=Object.getPrototypeOf||function(t){return t=r(t),n(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},{"./_has":27,"./_shared-key":50,"./_to-object":57}],44:[function(t,i,e){var n=t("./_has"),r=t("./_to-iobject"),s=t("./_array-includes")(!1),o=t("./_shared-key")("IE_PROTO");i.exports=function(t,i){var e,a=r(t),c=0,h=[];for(e in a)e!=o&&n(a,e)&&h.push(e);for(;i.length>c;)n(a,e=i[c++])&&(~s(h,e)||h.push(e));return h}},{"./_array-includes":15,"./_has":27,"./_shared-key":50,"./_to-iobject":55}],45:[function(t,i,e){var n=t("./_object-keys-internal"),r=t("./_enum-bug-keys");i.exports=Object.keys||function(t){return n(t,r)}},{"./_enum-bug-keys":23,"./_object-keys-internal":44}],46:[function(t,i,e){e.f={}.propertyIsEnumerable},{}],47:[function(t,i,e){i.exports=function(t,i){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:i}}},{}],48:[function(t,i,e){i.exports=t("./_hide")},{"./_hide":28}],49:[function(t,i,e){var n=t("./_object-dp").f,r=t("./_has"),s=t("./_wks")("toStringTag");i.exports=function(t,i,e){t&&!r(t=e?t:t.prototype,s)&&n(t,s,{configurable:!0,value:i})}},{"./_has":27,"./_object-dp":40,"./_wks":60}],50:[function(t,i,e){var n=t("./_shared")("keys"),r=t("./_uid");i.exports=function(t){return n[t]||(n[t]=r(t))}},{"./_shared":51,"./_uid":59}],51:[function(t,i,e){var n=t("./_global"),r="__core-js_shared__",s=n[r]||(n[r]={});i.exports=function(t){return s[t]||(s[t]={})}},{"./_global":26}],52:[function(t,i,e){var n=t("./_to-integer"),r=t("./_defined");i.exports=function(t){return function(i,e){var s,o,a=String(r(i)),c=n(e),h=a.length;return c<0||c>=h?t?"":void 0:(s=a.charCodeAt(c),s<55296||s>56319||c+1===h||(o=a.charCodeAt(c+1))<56320||o>57343?t?a.charAt(c):s:t?a.slice(c,c+2):(s-55296<<10)+(o-56320)+65536)}}},{"./_defined":20,"./_to-integer":54}],53:[function(t,i,e){var n=t("./_to-integer"),r=Math.max,s=Math.min;i.exports=function(t,i){return t=n(t),t<0?r(t+i,0):s(t,i)}},{"./_to-integer":54}],54:[function(t,i,e){var n=Math.ceil,r=Math.floor;i.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},{}],55:[function(t,i,e){var n=t("./_iobject"),r=t("./_defined");i.exports=function(t){return n(r(t))}},{"./_defined":20,"./_iobject":31}],56:[function(t,i,e){var n=t("./_to-integer"),r=Math.min;i.exports=function(t){return t>0?r(n(t),9007199254740991):0}},{"./_to-integer":54}],57:[function(t,i,e){var n=t("./_defined");i.exports=function(t){return Object(n(t))}},{"./_defined":20}],58:[function(t,i,e){var n=t("./_is-object");i.exports=function(t,i){if(!n(t))return t;var e,r;if(i&&"function"==typeof(e=t.toString)&&!n(r=e.call(t)))return r;if("function"==typeof(e=t.valueOf)&&!n(r=e.call(t)))return r;if(!i&&"function"==typeof(e=t.toString)&&!n(r=e.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":32}],59:[function(t,i,e){var n=0,r=Math.random();i.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},{}],60:[function(t,i,e){var n=t("./_shared")("wks"),r=t("./_uid"),s=t("./_global").Symbol,o="function"==typeof s,a=i.exports=function(t){return n[t]||(n[t]=o&&s[t]||(o?s:r)("Symbol."+t))};a.store=n},{"./_global":26,"./_shared":51,"./_uid":59}],61:[function(t,i,e){var n=t("./_classof"),r=t("./_wks")("iterator"),s=t("./_iterators");i.exports=t("./_core").getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||s[n(t)]}},{"./_classof":16,"./_core":18,"./_iterators":36,"./_wks":60}],62:[function(t,i,e){var n=t("./_an-object"),r=t("./core.get-iterator-method");i.exports=t("./_core").getIterator=function(t){var i=r(t);if("function"!=typeof i)throw TypeError(t+" is not iterable!");return n(i.call(t))}},{"./_an-object":14,"./_core":18,"./core.get-iterator-method":61}],63:[function(t,i,e){"use strict";var n=t("./_add-to-unscopables"),r=t("./_iter-step"),s=t("./_iterators"),o=t("./_to-iobject");i.exports=t("./_iter-define")(Array,"Array",function(t,i){this._t=o(t),this._i=0,this._k=i},function(){var t=this._t,i=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,r(1)):"keys"==i?r(0,e):"values"==i?r(0,t[e]):r(0,[e,t[e]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":13,"./_iter-define":34,"./_iter-step":35,"./_iterators":36,"./_to-iobject":55}],64:[function(t,i,e){var n=t("./_export");n(n.S+n.F,"Object",{assign:t("./_object-assign")})},{"./_export":24,"./_object-assign":38}],65:[function(t,i,e){var n=t("./_export");n(n.S+n.F*!t("./_descriptors"),"Object",{defineProperty:t("./_object-dp").f})},{"./_descriptors":21,"./_export":24,"./_object-dp":40}],66:[function(t,i,e){"use strict";var n=t("./_string-at")(!0);t("./_iter-define")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,i=this._t,e=this._i;return e>=i.length?{value:void 0,done:!0}:(t=n(i,e),this._i+=t.length,{value:t,done:!1})})},{"./_iter-define":34,"./_string-at":52}],67:[function(t,i,e){t("./es6.array.iterator");for(var n=t("./_global"),r=t("./_hide"),s=t("./_iterators"),o=t("./_wks")("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var h=a[c],u=n[h],_=u&&u.prototype;_&&!_[o]&&r(_,o,h),s[h]=s.Array}},{"./_global":26,"./_hide":28,"./_iterators":36,"./_wks":60,"./es6.array.iterator":63}],68:[function(t,i,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(t){if(_===setTimeout)return setTimeout(t,0);if((_===n||!_)&&setTimeout)return _=setTimeout,setTimeout(t,0);try{return _(t,0)}catch(i){try{return _.call(null,t,0)}catch(i){return _.call(this,t,0)}}}function o(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(i){try{return l.call(null,t)}catch(i){return l.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?p=d.concat(p):m=-1,p.length&&c())}function c(){if(!y){var t=s(a);y=!0;for(var i=p.length;i;){for(d=p,p=[];++m<i;)d&&d[m].run();m=-1,i=p.length}d=null,y=!1,o(t)}}function h(t,i){this.fun=t,this.array=i}function u(){}var _,l,f=i.exports={};!function(){try{_="function"==typeof setTimeout?setTimeout:n}catch(t){_=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var d,p=[],y=!1,m=-1;f.nextTick=function(t){var i=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)i[e-1]=arguments[e];p.push(new h(t,i)),1!==p.length||y||s(c)},h.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,
f.emit=u,f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}]},{},[1])(1)});