text: !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/build/",t(t.s=13)}([function(e,t,n){"use strict";e.exports=n(15)},function(e,t,n){e.exports=n(27)()},function(e,t,n){(function(t){var n,n;!function(t){e.exports=t()}(function(){return function e(t,r,o){function i(s,l){if(!r[s]){if(!t[s]){var u="function"==typeof n&&n;if(!l&&u)return n(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var n=t[s][1][e];return i(n||e)},p,p.exports,e,t,r,o)}return r[s].exports}for(var a="function"==typeof n&&n,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vertices"),i=e("../geometry/Vector"),a=e("../core/Sleeping"),s=(e("../render/Render"),e("../core/Common")),l=e("../geometry/Bounds"),u=e("../geometry/Axes");!function(){r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r.create=function(t){var n={id:s.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:o.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"),position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,render:{visible:!0,opacity:1,sprite:{xScale:1,yScale:1,xOffset:0,yOffset:0},lineWidth:0}},r=s.extend(n,t);return e(r,t),r},r.nextGroup=function(e){return e?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory};var e=function(e,t){t=t||{},r.set(e,{bounds:e.bounds||l.create(e.vertices),positionPrev:e.positionPrev||i.clone(e.position),anglePrev:e.anglePrev||e.angle,vertices:e.vertices,parts:e.parts||[e],isStatic:e.isStatic,isSleeping:e.isSleeping,parent:e.parent||e}),o.rotate(e.vertices,e.angle,e.position),u.rotate(e.axes,e.angle),l.update(e.bounds,e.vertices,e.velocity),r.set(e,{axes:t.axes||e.axes,area:t.area||e.area,mass:t.mass||e.mass,inertia:t.inertia||e.inertia});var n=e.isStatic?"#2e2b44":s.choose(["#006BA6","#0496FF","#FFBC42","#D81159","#8F2D56"]);e.render.fillStyle=e.render.fillStyle||n,e.render.strokeStyle=e.render.strokeStyle||"#000",e.render.sprite.xOffset+=-(e.bounds.min.x-e.position.x)/(e.bounds.max.x-e.bounds.min.x),e.render.sprite.yOffset+=-(e.bounds.min.y-e.position.y)/(e.bounds.max.y-e.bounds.min.y)};r.set=function(e,t,n){var o;"string"==typeof t&&(o=t,t={},t[o]=n);for(o in t)if(n=t[o],t.hasOwnProperty(o))switch(o){case"isStatic":r.setStatic(e,n);break;case"isSleeping":a.set(e,n);break;case"mass":r.setMass(e,n);break;case"density":r.setDensity(e,n);break;case"inertia":r.setInertia(e,n);break;case"vertices":r.setVertices(e,n);break;case"position":r.setPosition(e,n);break;case"angle":r.setAngle(e,n);break;case"velocity":r.setVelocity(e,n);break;case"angularVelocity":r.setAngularVelocity(e,n);break;case"parts":r.setParts(e,n);break;default:e[o]=n}},r.setStatic=function(e,t){for(var n=0;n<e.parts.length;n++){var r=e.parts[n];r.isStatic=t,t?(r._original={restitution:r.restitution,friction:r.friction,mass:r.mass,inertia:r.inertia,density:r.density,inverseMass:r.inverseMass,inverseInertia:r.inverseInertia},r.restitution=0,r.friction=1,r.mass=r.inertia=r.density=1/0,r.inverseMass=r.inverseInertia=0,r.positionPrev.x=r.position.x,r.positionPrev.y=r.position.y,r.anglePrev=r.angle,r.angularVelocity=0,r.speed=0,r.angularSpeed=0,r.motion=0):r._original&&(r.restitution=r._original.restitution,r.friction=r._original.friction,r.mass=r._original.mass,r.inertia=r._original.inertia,r.density=r._original.density,r.inverseMass=r._original.inverseMass,r.inverseInertia=r._original.inverseInertia,delete r._original)}},r.setMass=function(e,t){e.mass=t,e.inverseMass=1/e.mass,e.density=e.mass/e.area},r.setDensity=function(e,t){r.setMass(e,t*e.area),e.density=t},r.setInertia=function(e,t){e.inertia=t,e.inverseInertia=1/e.inertia},r.setVertices=function(e,t){t[0].body===e?e.vertices=t:e.vertices=o.create(t,e),e.axes=u.fromVertices(e.vertices),e.area=o.area(e.vertices),r.setMass(e,e.density*e.area);var n=o.centre(e.vertices);o.translate(e.vertices,n,-1),r.setInertia(e,r._inertiaScale*o.inertia(e.vertices,e.mass)),o.translate(e.vertices,e.position),l.update(e.bounds,e.vertices,e.velocity)},r.setParts=function(e,n,i){var a;for(n=n.slice(0),e.parts.length=0,e.parts.push(e),e.parent=e,a=0;a<n.length;a++){var s=n[a];s!==e&&(s.parent=e,e.parts.push(s))}if(1!==e.parts.length){if(i=void 0===i||i){var l=[];for(a=0;a<n.length;a++)l=l.concat(n[a].vertices);o.clockwiseSort(l);var u=o.hull(l),c=o.centre(u);r.setVertices(e,u),o.translate(e.vertices,c)}var p=t(e);e.area=p.area,e.parent=e,e.position.x=p.centre.x,e.position.y=p.centre.y,e.positionPrev.x=p.centre.x,e.positionPrev.y=p.centre.y,r.setMass(e,p.mass),r.setInertia(e,p.inertia),r.setPosition(e,p.centre)}},r.setPosition=function(e,t){var n=i.sub(t,e.position);e.positionPrev.x+=n.x,e.positionPrev.y+=n.y;for(var r=0;r<e.parts.length;r++){var a=e.parts[r];a.position.x+=n.x,a.position.y+=n.y,o.translate(a.vertices,n),l.update(a.bounds,a.vertices,e.velocity)}},r.setAngle=function(e,t){var n=t-e.angle;e.anglePrev+=n;for(var r=0;r<e.parts.length;r++){var a=e.parts[r];a.angle+=n,o.rotate(a.vertices,n,e.position),u.rotate(a.axes,n),l.update(a.bounds,a.vertices,e.velocity),r>0&&i.rotateAbout(a.position,n,e.position,a.position)}},r.setVelocity=function(e,t){e.positionPrev.x=e.position.x-t.x,e.positionPrev.y=e.position.y-t.y,e.velocity.x=t.x,e.velocity.y=t.y,e.speed=i.magnitude(e.velocity)},r.setAngularVelocity=function(e,t){e.anglePrev=e.angle-t,e.angularVelocity=t,e.angularSpeed=Math.abs(e.angularVelocity)},r.translate=function(e,t){r.setPosition(e,i.add(e.position,t))},r.rotate=function(e,t,n){if(n){var o=Math.cos(t),i=Math.sin(t),a=e.position.x-n.x,s=e.position.y-n.y;r.setPosition(e,{x:n.x+(a*o-s*i),y:n.y+(a*i+s*o)}),r.setAngle(e,e.angle+t)}else r.setAngle(e,e.angle+t)},r.scale=function(e,n,i,a){for(var s=0;s<e.parts.length;s++){var c=e.parts[s];o.scale(c.vertices,n,i,e.position),c.axes=u.fromVertices(c.vertices),e.isStatic||(c.area=o.area(c.vertices),r.setMass(c,e.density*c.area),o.translate(c.vertices,{x:-c.position.x,y:-c.position.y}),r.setInertia(c,o.inertia(c.vertices,c.mass)),o.translate(c.vertices,{x:c.position.x,y:c.position.y})),l.update(c.bounds,c.vertices,e.velocity)}if(e.circleRadius&&(n===i?e.circleRadius*=n:e.circleRadius=null),!e.isStatic){var p=t(e);e.area=p.area,r.setMass(e,p.mass),r.setInertia(e,p.inertia)}},r.update=function(e,t,n,r){var a=Math.pow(t*n*e.timeScale,2),s=1-e.frictionAir*n*e.timeScale,c=e.position.x-e.positionPrev.x,p=e.position.y-e.positionPrev.y;e.velocity.x=c*s*r+e.force.x/e.mass*a,e.velocity.y=p*s*r+e.force.y/e.mass*a,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.position.x+=e.velocity.x,e.position.y+=e.velocity.y,e.angularVelocity=(e.angle-e.anglePrev)*s*r+e.torque/e.inertia*a,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=i.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var f=0;f<e.parts.length;f++){var d=e.parts[f];o.translate(d.vertices,e.velocity),f>0&&(d.position.x+=e.velocity.x,d.position.y+=e.velocity.y),0!==e.angularVelocity&&(o.rotate(d.vertices,e.angularVelocity,e.position),u.rotate(d.axes,e.angularVelocity),f>0&&i.rotateAbout(d.position,e.angularVelocity,e.position,d.position)),l.update(d.bounds,d.vertices,e.velocity)}},r.applyForce=function(e,t,n){e.force.x+=n.x,e.force.y+=n.y;var r={x:t.x-e.position.x,y:t.y-e.position.y};e.torque+=r.x*n.y-r.y*n.x};var t=function(e){for(var t={mass:0,area:0,inertia:0,centre:{x:0,y:0}},n=1===e.parts.length?0:1;n<e.parts.length;n++){var r=e.parts[n];t.mass+=r.mass,t.area+=r.area,t.inertia+=r.inertia,t.centre=i.add(t.centre,i.mult(r.position,r.mass!==1/0?r.mass:1))}return t.centre=i.div(t.centre,t.mass!==1/0?t.mass:e.parts.length),t}}()},{"../core/Common":14,"../core/Sleeping":22,"../geometry/Axes":25,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29,"../render/Render":31}],2:[function(e,t,n){var r={};t.exports=r;var o=e("../core/Events"),i=e("../core/Common"),a=e("./Body");!function(){r.create=function(e){return i.extend({id:i.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},e)},r.setModified=function(e,t,n,o){if(e.isModified=t,n&&e.parent&&r.setModified(e.parent,t,n,o),o)for(var i=0;i<e.composites.length;i++){var a=e.composites[i];r.setModified(a,t,n,o)}},r.add=function(e,t){var n=[].concat(t);o.trigger(e,"beforeAdd",{object:t});for(var a=0;a<n.length;a++){var s=n[a];switch(s.type){case"body":if(s.parent!==s){i.warn("Composite.add: skipped adding a compound body part (you must add its parent instead)");break}r.addBody(e,s);break;case"constraint":r.addConstraint(e,s);break;case"composite":r.addComposite(e,s);break;case"mouseConstraint":r.addConstraint(e,s.constraint)}}return o.trigger(e,"afterAdd",{object:t}),e},r.remove=function(e,t,n){var i=[].concat(t);o.trigger(e,"beforeRemove",{object:t});for(var a=0;a<i.length;a++){var s=i[a];switch(s.type){case"body":r.removeBody(e,s,n);break;case"constraint":r.removeConstraint(e,s,n);break;case"composite":r.removeComposite(e,s,n);break;case"mouseConstraint":r.removeConstraint(e,s.constraint)}}return o.trigger(e,"afterRemove",{object:t}),e},r.addComposite=function(e,t){return e.composites.push(t),t.parent=e,r.setModified(e,!0,!0,!1),e},r.removeComposite=function(e,t,n){var o=i.indexOf(e.composites,t);if(-1!==o&&(r.removeCompositeAt(e,o),r.setModified(e,!0,!0,!1)),n)for(var a=0;a<e.composites.length;a++)r.removeComposite(e.composites[a],t,!0);return e},r.removeCompositeAt=function(e,t){return e.composites.splice(t,1),r.setModified(e,!0,!0,!1),e},r.addBody=function(e,t){return e.bodies.push(t),r.setModified(e,!0,!0,!1),e},r.removeBody=function(e,t,n){var o=i.indexOf(e.bodies,t);if(-1!==o&&(r.removeBodyAt(e,o),r.setModified(e,!0,!0,!1)),n)for(var a=0;a<e.composites.length;a++)r.removeBody(e.composites[a],t,!0);return e},r.removeBodyAt=function(e,t){return e.bodies.splice(t,1),r.setModified(e,!0,!0,!1),e},r.addConstraint=function(e,t){return e.constraints.push(t),r.setModified(e,!0,!0,!1),e},r.removeConstraint=function(e,t,n){var o=i.indexOf(e.constraints,t);if(-1!==o&&r.removeConstraintAt(e,o),n)for(var a=0;a<e.composites.length;a++)r.removeConstraint(e.composites[a],t,!0);return e},r.removeConstraintAt=function(e,t){return e.constraints.splice(t,1),r.setModified(e,!0,!0,!1),e},r.clear=function(e,t,n){if(n)for(var o=0;o<e.composites.length;o++)r.clear(e.composites[o],t,!0);return t?e.bodies=e.bodies.filter(function(e){return e.isStatic}):e.bodies.length=0,e.constraints.length=0,e.composites.length=0,r.setModified(e,!0,!0,!1),e},r.allBodies=function(e){for(var t=[].concat(e.bodies),n=0;n<e.composites.length;n++)t=t.concat(r.allBodies(e.composites[n]));return t},r.allConstraints=function(e){for(var t=[].concat(e.constraints),n=0;n<e.composites.length;n++)t=t.concat(r.allConstraints(e.composites[n]));return t},r.allComposites=function(e){for(var t=[].concat(e.composites),n=0;n<e.composites.length;n++)t=t.concat(r.allComposites(e.composites[n]));return t},r.get=function(e,t,n){var o,i;switch(n){case"body":o=r.allBodies(e);break;case"constraint":o=r.allConstraints(e);break;case"composite":o=r.allComposites(e).concat(e)}return o?(i=o.filter(function(e){return e.id.toString()===t.toString()}),0===i.length?null:i[0]):null},r.move=function(e,t,n){return r.remove(e,t),r.add(n,t),e},r.rebase=function(e){for(var t=r.allBodies(e).concat(r.allConstraints(e)).concat(r.allComposites(e)),n=0;n<t.length;n++)t[n].id=i.nextId();return r.setModified(e,!0,!0,!1),e},r.translate=function(e,t,n){for(var o=n?r.allBodies(e):e.bodies,i=0;i<o.length;i++)a.translate(o[i],t);return r.setModified(e,!0,!0,!1),e},r.rotate=function(e,t,n,o){for(var i=Math.cos(t),s=Math.sin(t),l=o?r.allBodies(e):e.bodies,u=0;u<l.length;u++){var c=l[u],p=c.position.x-n.x,f=c.position.y-n.y;a.setPosition(c,{x:n.x+(p*i-f*s),y:n.y+(p*s+f*i)}),a.rotate(c,t)}return r.setModified(e,!0,!0,!1),e},r.scale=function(e,t,n,o,i){for(var s=i?r.allBodies(e):e.bodies,l=0;l<s.length;l++){var u=s[l],c=u.position.x-o.x,p=u.position.y-o.y;a.setPosition(u,{x:o.x+c*t,y:o.y+p*n}),a.scale(u,t,n)}return r.setModified(e,!0,!0,!1),e},r.bounds=function(e){for(var t=Matter.Composite.allBodies(e),n=[],r=0;r<t.length;r+=1){var o=t[r];n.push(o.bounds.min,o.bounds.max)}return Matter.Bounds.create(n)}}()},{"../core/Common":14,"../core/Events":16,"./Body":1}],3:[function(e,t,n){var r={};t.exports=r;var o=e("./Composite"),i=(e("../constraint/Constraint"),e("../core/Common"));!function(){r.create=function(e){var t=o.create(),n={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return i.extend(t,n,e)}}()},{"../constraint/Constraint":12,"../core/Common":14,"./Composite":2}],4:[function(e,t,n){var r={};t.exports=r,function(){r.create=function(e){return{id:r.id(e),vertex:e,normalImpulse:0,tangentImpulse:0}},r.id=function(e){return e.body.id+"_"+e.index}}()},{}],5:[function(e,t,n){var r={};t.exports=r;var o=e("./SAT"),i=e("./Pair"),a=e("../geometry/Bounds");!function(){r.collisions=function(e,t){for(var n=[],s=t.pairs.table,l=0;l<e.length;l++){var u=e[l][0],c=e[l][1];if((!u.isStatic&&!u.isSleeping||!c.isStatic&&!c.isSleeping)&&(r.canCollide(u.collisionFilter,c.collisionFilter)&&a.overlaps(u.bounds,c.bounds)))for(var p=u.parts.length>1?1:0;p<u.parts.length;p++)for(var f=u.parts[p],d=c.parts.length>1?1:0;d<c.parts.length;d++){var h=c.parts[d];if(f===u&&h===c||a.overlaps(f.bounds,h.bounds)){var y,m=i.id(f,h),v=s[m];y=v&&v.isActive?v.collision:null;var g=o.collides(f,h,y);g.collided&&n.push(g)}}}return n},r.canCollide=function(e,t){return e.group===t.group&&0!==e.group?e.group>0:0!=(e.mask&t.category)&&0!=(t.mask&e.category)}}()},{"../geometry/Bounds":26,"./Pair":7,"./SAT":11}],6:[function(e,t,n){var r={};t.exports=r;var o=e("./Pair"),i=e("./Detector"),a=e("../core/Common");!function(){r.create=function(e){var t={controller:r,detector:i.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return a.extend(t,e)},r.update=function(n,r,o,i){var a,f,d,h,y,m=o.world,v=n.buckets,g=!1;for(a=0;a<r.length;a++){var b=r[a];if((!b.isSleeping||i)&&!(b.bounds.max.x<m.bounds.min.x||b.bounds.min.x>m.bounds.max.x||b.bounds.max.y<m.bounds.min.y||b.bounds.min.y>m.bounds.max.y)){var x=t(n,b);if(!b.region||x.id!==b.region.id||i){b.region&&!i||(b.region=x);var w=e(x,b.region);for(f=w.startCol;f<=w.endCol;f++)for(d=w.startRow;d<=w.endRow;d++){y=s(f,d),h=v[y];var C=f>=x.startCol&&f<=x.endCol&&d>=x.startRow&&d<=x.endRow,S=f>=b.region.startCol&&f<=b.region.endCol&&d>=b.region.startRow&&d<=b.region.endRow;!C&&S&&S&&h&&c(n,h,b),(b.region===x||C&&!S||i)&&(h||(h=l(v,y)),u(n,h,b))}b.region=x,g=!0}}}g&&(n.pairsList=p(n))},r.clear=function(e){e.buckets={},e.pairs={},e.pairsList=[]};var e=function(e,t){var r=Math.min(e.startCol,t.startCol),o=Math.max(e.endCol,t.endCol),i=Math.min(e.startRow,t.startRow),a=Math.max(e.endRow,t.endRow);return n(r,o,i,a)},t=function(e,t){var r=t.bounds,o=Math.floor(r.min.x/e.bucketWidth),i=Math.floor(r.max.x/e.bucketWidth),a=Math.floor(r.min.y/e.bucketHeight),s=Math.floor(r.max.y/e.bucketHeight);return n(o,i,a,s)},n=function(e,t,n,r){return{id:e+","+t+","+n+","+r,startCol:e,endCol:t,startRow:n,endRow:r}},s=function(e,t){return"C"+e+"R"+t},l=function(e,t){return e[t]=[]},u=function(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];if(!(n.id===i.id||n.isStatic&&i.isStatic)){var a=o.id(n,i),s=e.pairs[a];s?s[2]+=1:e.pairs[a]=[n,i,1]}}t.push(n)},c=function(e,t,n){t.splice(a.indexOf(t,n),1);for(var r=0;r<t.length;r++){var i=t[r],s=o.id(n,i),l=e.pairs[s];l&&(l[2]-=1)}},p=function(e){var t,n,r=[];t=a.keys(e.pairs);for(var o=0;o<t.length;o++)n=e.pairs[t[o]],n[2]>0?r.push(n):delete e.pairs[t[o]];return r}}()},{"../core/Common":14,"./Detector":5,"./Pair":7}],7:[function(e,t,n){var r={};t.exports=r;var o=e("./Contact");!function(){r.create=function(e,t){var n=e.bodyA,o=e.bodyB,i=e.parentA,a=e.parentB,s={id:r.id(n,o),bodyA:n,bodyB:o,contacts:{},activeContacts:[],separation:0,isActive:!0,isSensor:n.isSensor||o.isSensor,timeCreated:t,timeUpdated:t,inverseMass:i.inverseMass+a.inverseMass,friction:Math.min(i.friction,a.friction),frictionStatic:Math.max(i.frictionStatic,a.frictionStatic),restitution:Math.max(i.restitution,a.restitution),slop:Math.max(i.slop,a.slop)};return r.update(s,e,t),s},r.update=function(e,t,n){var i=e.contacts,a=t.supports,s=e.activeContacts,l=t.parentA,u=t.parentB;if(e.collision=t,e.inverseMass=l.inverseMass+u.inverseMass,e.friction=Math.min(l.friction,u.friction),e.frictionStatic=Math.max(l.frictionStatic,u.frictionStatic),e.restitution=Math.max(l.restitution,u.restitution),e.slop=Math.max(l.slop,u.slop),s.length=0,t.collided){for(var c=0;c<a.length;c++){var p=a[c],f=o.id(p),d=i[f];d?s.push(d):s.push(i[f]=o.create(p))}e.separation=t.depth,r.setActive(e,!0,n)}else!0===e.isActive&&r.setActive(e,!1,n)},r.setActive=function(e,t,n){t?(e.isActive=!0,e.timeUpdated=n):(e.isActive=!1,e.activeContacts.length=0)},r.id=function(e,t){return e.id<t.id?"A"+e.id+"B"+t.id:"A"+t.id+"B"+e.id}}()},{"./Contact":4}],8:[function(e,t,n){var r={};t.exports=r;var o=e("./Pair"),i=e("../core/Common");!function(){r.create=function(e){return i.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},r.update=function(e,t,n){var r,a,s,l,u=e.list,c=e.table,p=e.collisionStart,f=e.collisionEnd,d=e.collisionActive,h=[];for(p.length=0,f.length=0,d.length=0,l=0;l<t.length;l++)r=t[l],r.collided&&(a=o.id(r.bodyA,r.bodyB),h.push(a),s=c[a],s?(s.isActive?d.push(s):p.push(s),o.update(s,r,n)):(s=o.create(r,n),c[a]=s,p.push(s),u.push(s)));for(l=0;l<u.length;l++)s=u[l],s.isActive&&-1===i.indexOf(h,s.id)&&(o.setActive(s,!1,n),f.push(s))},r.removeOld=function(e,t){var n,r,o,i,a=e.list,s=e.table,l=[];for(i=0;i<a.length;i++)n=a[i],r=n.collision,r.bodyA.isSleeping||r.bodyB.isSleeping?n.timeUpdated=t:t-n.timeUpdated>1e3&&l.push(i);for(i=0;i<l.length;i++)o=l[i]-i,n=a[o],delete s[n.id],a.splice(o,1)},r.clear=function(e){return e.table={},e.list.length=0,e.collisionStart.length=0,e.collisionActive.length=0,e.collisionEnd.length=0,e}}()},{"../core/Common":14,"./Pair":7}],9:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vector"),i=e("./SAT"),a=e("../geometry/Bounds"),s=e("../factory/Bodies"),l=e("../geometry/Vertices");!function(){r.ray=function(e,t,n,r){r=r||1e-100;for(var l=o.angle(t,n),u=o.magnitude(o.sub(t,n)),c=.5*(n.x+t.x),p=.5*(n.y+t.y),f=s.rectangle(c,p,u,r,{angle:l}),d=[],h=0;h<e.length;h++){var y=e[h];if(a.overlaps(y.bounds,f.bounds))for(var m=1===y.parts.length?0:1;m<y.parts.length;m++){var v=y.parts[m];if(a.overlaps(v.bounds,f.bounds)){var g=i.collides(v,f);if(g.collided){g.body=g.bodyA=g.bodyB=y,d.push(g);break}}}}return d},r.region=function(e,t,n){for(var r=[],o=0;o<e.length;o++){var i=e[o],s=a.overlaps(i.bounds,t);(s&&!n||!s&&n)&&r.push(i)}return r},r.point=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(a.contains(o.bounds,t))for(var i=1===o.parts.length?0:1;i<o.parts.length;i++){var s=o.parts[i];if(a.contains(s.bounds,t)&&l.contains(s.vertices,t)){n.push(o);break}}}return n}}()},{"../factory/Bodies":23,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29,"./SAT":11}],10:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vertices"),i=e("../geometry/Vector"),a=e("../core/Common"),s=e("../geometry/Bounds");!function(){r._restingThresh=4,r._restingThreshTangent=6,r._positionDampen=.9,r._positionWarming=.8,r._frictionNormalMultiplier=5,r.preSolvePosition=function(e){var t,n,r;for(t=0;t<e.length;t++)n=e[t],n.isActive&&(r=n.activeContacts.length,n.collision.parentA.totalContacts+=r,n.collision.parentB.totalContacts+=r)},r.solvePosition=function(e,t){var n,o,a,s,l,u,c,p,f,d=i._temp[0],h=i._temp[1],y=i._temp[2],m=i._temp[3];for(n=0;n<e.length;n++)o=e[n],o.isActive&&!o.isSensor&&(a=o.collision,s=a.parentA,l=a.parentB,u=a.normal,c=i.sub(i.add(l.positionImpulse,l.position,d),i.add(s.positionImpulse,i.sub(l.position,a.penetration,h),y),m),o.separation=i.dot(u,c));for(n=0;n<e.length;n++)o=e[n],o.isActive&&!o.isSensor&&(a=o.collision,s=a.parentA,l=a.parentB,u=a.normal,f=(o.separation-o.slop)*t,(s.isStatic||l.isStatic)&&(f*=2),s.isStatic||s.isSleeping||(p=r._positionDampen/s.totalContacts,s.positionImpulse.x+=u.x*f*p,s.positionImpulse.y+=u.y*f*p),l.isStatic||l.isSleeping||(p=r._positionDampen/l.totalContacts,l.positionImpulse.x-=u.x*f*p,l.positionImpulse.y-=u.y*f*p))},r.postSolvePosition=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.totalContacts=0,0!==n.positionImpulse.x||0!==n.positionImpulse.y){for(var a=0;a<n.parts.length;a++){var l=n.parts[a];o.translate(l.vertices,n.positionImpulse),s.update(l.bounds,l.vertices,n.velocity),l.position.x+=n.positionImpulse.x,l.position.y+=n.positionImpulse.y}n.positionPrev.x+=n.positionImpulse.x,n.positionPrev.y+=n.positionImpulse.y,i.dot(n.positionImpulse,n.velocity)<0?(n.positionImpulse.x=0,n.positionImpulse.y=0):(n.positionImpulse.x*=r._positionWarming,n.positionImpulse.y*=r._positionWarming)}}},r.preSolveVelocity=function(e){var t,n,r,o,a,s,l,u,c,p,f,d,h,y,m=i._temp[0],v=i._temp[1];for(t=0;t<e.length;t++)if(r=e[t],r.isActive&&!r.isSensor)for(o=r.activeContacts,a=r.collision,s=a.parentA,l=a.parentB,u=a.normal,c=a.tangent,n=0;n<o.length;n++)p=o[n],f=p.vertex,d=p.normalImpulse,h=p.tangentImpulse,0===d&&0===h||(m.x=u.x*d+c.x*h,m.y=u.y*d+c.y*h,s.isStatic||s.isSleeping||(y=i.sub(f,s.position,v),s.positionPrev.x+=m.x*s.inverseMass,s.positionPrev.y+=m.y*s.inverseMass,s.anglePrev+=i.cross(y,m)*s.inverseInertia),l.isStatic||l.isSleeping||(y=i.sub(f,l.position,v),l.positionPrev.x-=m.x*l.inverseMass,l.positionPrev.y-=m.y*l.inverseMass,l.anglePrev-=i.cross(y,m)*l.inverseInertia))},r.solveVelocity=function(e,t){for(var n=t*t,o=i._temp[0],s=i._temp[1],l=i._temp[2],u=i._temp[3],c=i._temp[4],p=i._temp[5],f=0;f<e.length;f++){var d=e[f];if(d.isActive&&!d.isSensor){var h=d.collision,y=h.parentA,m=h.parentB,v=h.normal,g=h.tangent,b=d.activeContacts,x=1/b.length;y.velocity.x=y.position.x-y.positionPrev.x,y.velocity.y=y.position.y-y.positionPrev.y,m.velocity.x=m.position.x-m.positionPrev.x,m.velocity.y=m.position.y-m.positionPrev.y,y.angularVelocity=y.angle-y.anglePrev,m.angularVelocity=m.angle-m.anglePrev;for(var w=0;w<b.length;w++){var C=b[w],S=C.vertex,k=i.sub(S,y.position,s),P=i.sub(S,m.position,l),_=i.add(y.velocity,i.mult(i.perp(k),y.angularVelocity),u),E=i.add(m.velocity,i.mult(i.perp(P),m.angularVelocity),c),O=i.sub(_,E,p),T=i.dot(v,O),A=i.dot(g,O),I=Math.abs(A),M=a.sign(A),R=(1+d.restitution)*T,N=a.clamp(d.separation+T,0,1)*r._frictionNormalMultiplier,j=A,D=1/0;I>d.friction*d.frictionStatic*N*n&&(D=I,j=a.clamp(d.friction*M*n,-D,D));var B=i.cross(k,v),L=i.cross(P,v),F=x/(y.inverseMass+m.inverseMass+y.inverseInertia*B*B+m.inverseInertia*L*L);if(R*=F,j*=F,T<0&&T*T>r._restingThresh*n)C.normalImpulse=0;else{var U=C.normalImpulse;C.normalImpulse=Math.min(C.normalImpulse+R,0),R=C.normalImpulse-U}if(A*A>r._restingThreshTangent*n)C.tangentImpulse=0;else{var V=C.tangentImpulse;C.tangentImpulse=a.clamp(C.tangentImpulse+j,-D,D),j=C.tangentImpulse-V}o.x=v.x*R+g.x*j,o.y=v.y*R+g.y*j,y.isStatic||y.isSleeping||(y.positionPrev.x+=o.x*y.inverseMass,y.positionPrev.y+=o.y*y.inverseMass,y.anglePrev+=i.cross(k,o)*y.inverseInertia),m.isStatic||m.isSleeping||(m.positionPrev.x-=o.x*m.inverseMass,m.positionPrev.y-=o.y*m.inverseMass,m.anglePrev-=i.cross(P,o)*m.inverseInertia)}}}}}()},{"../core/Common":14,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],11:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vertices"),i=e("../geometry/Vector");!function(){r.collides=function(t,r,a){var s,l,u,c,p=!1;if(a){var f=t.parent,d=r.parent,h=f.speed*f.speed+f.angularSpeed*f.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;p=a&&a.collided&&h<.2,c=a}else c={collided:!1,bodyA:t,bodyB:r};if(a&&p){var y=c.axisBody,m=y===t?r:t,v=[y.axes[a.axisNumber]];if(u=e(y.vertices,m.vertices,v),c.reused=!0,u.overlap<=0)return c.collided=!1,c}else{if(s=e(t.vertices,r.vertices,t.axes),s.overlap<=0)return c.collided=!1,c;if(l=e(r.vertices,t.vertices,r.axes),l.overlap<=0)return c.collided=!1,c;s.overlap<l.overlap?(u=s,c.axisBody=t):(u=l,c.axisBody=r),c.axisNumber=u.axisNumber}c.bodyA=t.id<r.id?t:r,c.bodyB=t.id<r.id?r:t,c.collided=!0,c.depth=u.overlap,c.parentA=c.bodyA.parent,c.parentB=c.bodyB.parent,t=c.bodyA,r=c.bodyB,i.dot(u.axis,i.sub(r.position,t.position))<0?c.normal={x:u.axis.x,y:u.axis.y}:c.normal={x:-u.axis.x,y:-u.axis.y},c.tangent=i.perp(c.normal),c.penetration=c.penetration||{},c.penetration.x=c.normal.x*c.depth,c.penetration.y=c.normal.y*c.depth;var g=n(t,r,c.normal),b=[];if(o.contains(t.vertices,g[0])&&b.push(g[0]),o.contains(t.vertices,g[1])&&b.push(g[1]),b.length<2){var x=n(r,t,i.neg(c.normal));o.contains(r.vertices,x[0])&&b.push(x[0]),b.length<2&&o.contains(r.vertices,x[1])&&b.push(x[1])}return b.length<1&&(b=[g[0]]),c.supports=b,c};var e=function(e,n,r){for(var o,a,s=i._temp[0],l=i._temp[1],u={overlap:Number.MAX_VALUE},c=0;c<r.length;c++){if(a=r[c],t(s,e,a),t(l,n,a),(o=Math.min(s.max-l.min,l.max-s.min))<=0)return u.overlap=o,u;o<u.overlap&&(u.overlap=o,u.axis=a,u.axisNumber=c)}return u},t=function(e,t,n){for(var r=i.dot(t[0],n),o=r,a=1;a<t.length;a+=1){var s=i.dot(t[a],n);s>o?o=s:s<r&&(r=s)}e.min=r,e.max=o},n=function(e,t,n){for(var r,o,a,s,l=Number.MAX_VALUE,u=i._temp[0],c=t.vertices,p=e.position,f=0;f<c.length;f++)o=c[f],u.x=o.x-p.x,u.y=o.y-p.y,(r=-i.dot(n,u))<l&&(l=r,a=o);return o=c[a.index-1>=0?a.index-1:c.length-1],u.x=o.x-p.x,u.y=o.y-p.y,l=-i.dot(n,u),s=o,o=c[(a.index+1)%c.length],u.x=o.x-p.x,u.y=o.y-p.y,r=-i.dot(n,u),r<l&&(s=o),[a,s]}}()},{"../geometry/Vector":28,"../geometry/Vertices":29}],12:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vertices"),i=e("../geometry/Vector"),a=e("../core/Sleeping"),s=e("../geometry/Bounds"),l=e("../geometry/Axes"),u=e("../core/Common");!function(){r._warming=.4,r._torqueDampen=1,r._minLength=1e-6,r.create=function(e){var t=e;t.bodyA&&!t.pointA&&(t.pointA={x:0,y:0}),t.bodyB&&!t.pointB&&(t.pointB={x:0,y:0});var n=t.bodyA?i.add(t.bodyA.position,t.pointA):t.pointA,r=t.bodyB?i.add(t.bodyB.position,t.pointB):t.pointB,o=i.magnitude(i.sub(n,r));t.length=void 0!==t.length?t.length:o,t.id=t.id||u.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||(t.length>0?1:.7),t.damping=t.damping||0,t.angularStiffness=t.angularStiffness||0,t.angleA=t.bodyA?t.bodyA.angle:t.angleA,t.angleB=t.bodyB?t.bodyB.angle:t.angleB,t.plugin={};var a={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===t.length&&t.stiffness>.1?(a.type="pin",a.anchors=!1):t.stiffness<.9&&(a.type="spring"),t.render=u.extend(a,t.render),t},r.preSolveAll=function(e){for(var t=0;t<e.length;t+=1){var n=e[t],r=n.constraintImpulse;n.isStatic||0===r.x&&0===r.y&&0===r.angle||(n.position.x+=r.x,n.position.y+=r.y,n.angle+=r.angle)}},r.solveAll=function(e,t){for(var n=0;n<e.length;n+=1){var o=e[n],i=!o.bodyA||o.bodyA&&o.bodyA.isStatic,a=!o.bodyB||o.bodyB&&o.bodyB.isStatic;(i||a)&&r.solve(e[n],t)}for(n=0;n<e.length;n+=1)o=e[n],i=!o.bodyA||o.bodyA&&o.bodyA.isStatic,a=!o.bodyB||o.bodyB&&o.bodyB.isStatic,i||a||r.solve(e[n],t)},r.solve=function(e,t){var n=e.bodyA,o=e.bodyB,a=e.pointA,s=e.pointB;if(n||o){n&&!n.isStatic&&(i.rotate(a,n.angle-e.angleA,a),e.angleA=n.angle),o&&!o.isStatic&&(i.rotate(s,o.angle-e.angleB,s),e.angleB=o.angle);var l=a,u=s;if(n&&(l=i.add(n.position,a)),o&&(u=i.add(o.position,s)),l&&u){var c=i.sub(l,u),p=i.magnitude(c);p<r._minLength&&(p=r._minLength);var f,d,h,y,m,v=(p-e.length)/p,g=e.stiffness<1?e.stiffness*t:e.stiffness,b=i.mult(c,v*g),x=(n?n.inverseMass:0)+(o?o.inverseMass:0),w=(n?n.inverseInertia:0)+(o?o.inverseInertia:0),C=x+w;if(e.damping){var S=i.create();h=i.div(c,p),m=i.sub(o&&i.sub(o.position,o.positionPrev)||S,n&&i.sub(n.position,n.positionPrev)||S),y=i.dot(h,m)}n&&!n.isStatic&&(d=n.inverseMass/x,n.constraintImpulse.x-=b.x*d,n.constraintImpulse.y-=b.y*d,n.position.x-=b.x*d,n.position.y-=b.y*d,e.damping&&(n.positionPrev.x-=e.damping*h.x*y*d,n.positionPrev.y-=e.damping*h.y*y*d),f=i.cross(a,b)/C*r._torqueDampen*n.inverseInertia*(1-e.angularStiffness),n.constraintImpulse.angle-=f,n.angle-=f),o&&!o.isStatic&&(d=o.inverseMass/x,o.constraintImpulse.x+=b.x*d,o.constraintImpulse.y+=b.y*d,o.position.x+=b.x*d,o.position.y+=b.y*d,e.damping&&(o.positionPrev.x+=e.damping*h.x*y*d,o.positionPrev.y+=e.damping*h.y*y*d),f=i.cross(s,b)/C*r._torqueDampen*o.inverseInertia*(1-e.angularStiffness),o.constraintImpulse.angle+=f,o.angle+=f)}}},r.postSolveAll=function(e){for(var t=0;t<e.length;t++){var n=e[t],u=n.constraintImpulse;if(!(n.isStatic||0===u.x&&0===u.y&&0===u.angle)){a.set(n,!1);for(var c=0;c<n.parts.length;c++){var p=n.parts[c];o.translate(p.vertices,u),c>0&&(p.position.x+=u.x,p.position.y+=u.y),0!==u.angle&&(o.rotate(p.vertices,u.angle,n.position),l.rotate(p.axes,u.angle),c>0&&i.rotateAbout(p.position,u.angle,n.position,p.position)),s.update(p.bounds,p.vertices,n.velocity)}u.angle*=r._warming,u.x*=r._warming,u.y*=r._warming}}}}()},{"../core/Common":14,"../core/Sleeping":22,"../geometry/Axes":25,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],13:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vertices"),i=e("../core/Sleeping"),a=e("../core/Mouse"),s=e("../core/Events"),l=e("../collision/Detector"),u=e("./Constraint"),c=e("../body/Composite"),p=e("../core/Common"),f=e("../geometry/Bounds");!function(){r.create=function(t,n){var o=(t?t.mouse:null)||(n?n.mouse:null);o||(t&&t.render&&t.render.canvas?o=a.create(t.render.canvas):n&&n.element?o=a.create(n.element):(o=a.create(),p.warn("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected")));var i=u.create({label:"Mouse Constraint",pointA:o.position,pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,render:{strokeStyle:"#90EE90",lineWidth:3}}),l={type:"mouseConstraint",mouse:o,element:null,body:null,constraint:i,collisionFilter:{category:1,mask:4294967295,group:0}},f=p.extend(l,n);return s.on(t,"beforeUpdate",function(){var n=c.allBodies(t.world);r.update(f,n),e(f)}),f},r.update=function(e,t){var n=e.mouse,r=e.constraint,a=e.body;if(0===n.button){if(r.bodyB)i.set(r.bodyB,!1),r.pointA=n.position;else for(var u=0;u<t.length;u++)if(a=t[u],f.contains(a.bounds,n.position)&&l.canCollide(a.collisionFilter,e.collisionFilter))for(var c=a.parts.length>1?1:0;c<a.parts.length;c++){var p=a.parts[c];if(o.contains(p.vertices,n.position)){r.pointA=n.position,r.bodyB=e.body=a,r.pointB={x:n.position.x-a.position.x,y:n.position.y-a.position.y},r.angleB=a.angle,i.set(a,!1),s.trigger(e,"startdrag",{mouse:n,body:a});break}}}else r.bodyB=e.body=null,r.pointB=null,a&&s.trigger(e,"enddrag",{mouse:n,body:a})};var e=function(e){var t=e.mouse,n=t.sourceEvents;n.mousemove&&s.trigger(e,"mousemove",{mouse:t}),n.mousedown&&s.trigger(e,"mousedown",{mouse:t}),n.mouseup&&s.trigger(e,"mouseup",{mouse:t}),a.clearSourceEvents(t)}}()},{"../body/Composite":2,"../collision/Detector":5,"../core/Common":14,"../core/Events":16,"../core/Mouse":19,"../core/Sleeping":22,"../geometry/Bounds":26,"../geometry/Vertices":29,"./Constraint":12}],14:[function(e,t,n){var r={};t.exports=r,function(){r._nextId=0,r._seed=0,r._nowStartTime=+new Date,r.extend=function(e,t){var n,o;"boolean"==typeof t?(n=2,o=t):(n=1,o=!0);for(var i=n;i<arguments.length;i++){var a=arguments[i];if(a)for(var s in a)o&&a[s]&&a[s].constructor===Object?e[s]&&e[s].constructor!==Object?e[s]=a[s]:(e[s]=e[s]||{},r.extend(e[s],o,a[s])):e[s]=a[s]}return e},r.clone=function(e,t){return r.extend({},t,e)},r.keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},r.values=function(e){var t=[];if(Object.keys){for(var n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}for(var o in e)t.push(e[o]);return t},r.get=function(e,t,n,r){t=t.split(".").slice(n,r);for(var o=0;o<t.length;o+=1)e=e[t[o]];return e},r.set=function(e,t,n,o,i){var a=t.split(".").slice(o,i);return r.get(e,t,0,-1)[a[a.length-1]]=n,n},r.shuffle=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(r.random()*(t+1)),o=e[t];e[t]=e[n],e[n]=o}return e},r.choose=function(e){return e[Math.floor(r.random()*e.length)]},r.isElement=function(e){return e instanceof HTMLElement},r.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r.isFunction=function(e){return"function"==typeof e},r.isPlainObject=function(e){return"object"==typeof e&&e.constructor===Object},r.isString=function(e){return"[object String]"===toString.call(e)},r.clamp=function(e,t,n){return e<t?t:e>n?n:e},r.sign=function(e){return e<0?-1:1},r.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-r._nowStartTime},r.random=function(t,n){return t=void 0!==t?t:0,n=void 0!==n?n:1,t+e()*(n-t)};var e=function(){return r._seed=(9301*r._seed+49297)%233280,r._seed/233280};r.colorToNumber=function(e){return e=e.replace("#",""),3==e.length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},r.logLevel=1,r.log=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.info=function(){console&&r.logLevel>0&&r.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.warn=function(){console&&r.logLevel>0&&r.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},r.nextId=function(){return r._nextId++},r.indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},r.map=function(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n},r.topologicalSort=function(e){var n=[],r=[],o=[];for(var i in e)r[i]||o[i]||t(i,r,o,e,n);return n};var t=function(e,n,r,o,i){var a=o[e]||[];r[e]=!0;for(var s=0;s<a.length;s+=1){var l=a[s];r[l]||(n[l]||t(l,n,r,o,i))}r[e]=!1,n[e]=!0,i.push(e)};r.chain=function(){for(var e=[],t=0;t<arguments.length;t+=1){var n=arguments[t];n._chained?e.push.apply(e,n._chained):e.push(n)}var r=function(){for(var t,n=new Array(arguments.length),r=0,o=arguments.length;r<o;r++)n[r]=arguments[r];for(r=0;r<e.length;r+=1){var i=e[r].apply(t,n);void 0!==i&&(t=i)}return t};return r._chained=e,r},r.chainPathBefore=function(e,t,n){return r.set(e,t,r.chain(n,r.get(e,t)))},r.chainPathAfter=function(e,t,n){return r.set(e,t,r.chain(r.get(e,t),n))}}()},{}],15:[function(e,t,n){var r={};t.exports=r;var o=e("../body/World"),i=e("./Sleeping"),a=e("../collision/Resolver"),s=e("../render/Render"),l=e("../collision/Pairs"),u=(e("./Metrics"),e("../collision/Grid")),c=e("./Events"),p=e("../body/Composite"),f=e("../constraint/Constraint"),d=e("./Common"),h=e("../body/Body");!function(){r.create=function(e,t){t=d.isElement(e)?t:e,e=d.isElement(e)?e:null,t=t||{},(e||t.render)&&d.warn("Engine.create: engine.render is deprecated (see docs)");var n={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:u}},r=d.extend(n,t);if(e||r.render){var i={element:e,controller:s};r.render=d.extend(i,r.render)}return r.render&&r.render.controller&&(r.render=r.render.controller.create(r.render)),r.render&&(r.render.engine=r),r.world=t.world||o.create(r.world),r.pairs=l.create(),r.broadphase=r.broadphase.controller.create(r.broadphase),r.metrics=r.metrics||{extended:!1},r},r.update=function(r,o,s){o=o||1e3/60,s=s||1;var u,d=r.world,h=r.timing,y=r.broadphase,m=[];h.timestamp+=o*h.timeScale;var v={timestamp:h.timestamp};c.trigger(r,"beforeUpdate",v);var g=p.allBodies(d),b=p.allConstraints(d);for(r.enableSleeping&&i.update(g,h.timeScale),t(g,d.gravity),n(g,o,h.timeScale,s,d.bounds),f.preSolveAll(g),u=0;u<r.constraintIterations;u++)f.solveAll(b,h.timeScale);f.postSolveAll(g),y.controller?(d.isModified&&y.controller.clear(y),y.controller.update(y,g,r,d.isModified),m=y.pairsList):m=g,d.isModified&&p.setModified(d,!1,!1,!0);var x=y.detector(m,r),w=r.pairs,C=h.timestamp;for(l.update(w,x,C),l.removeOld(w,C),r.enableSleeping&&i.afterCollisions(w.list,h.timeScale),w.collisionStart.length>0&&c.trigger(r,"collisionStart",{pairs:w.collisionStart}),a.preSolvePosition(w.list),u=0;u<r.positionIterations;u++)a.solvePosition(w.list,h.timeScale);for(a.postSolvePosition(g),f.preSolveAll(g),u=0;u<r.constraintIterations;u++)f.solveAll(b,h.timeScale);for(f.postSolveAll(g),a.preSolveVelocity(w.list),u=0;u<r.velocityIterations;u++)a.solveVelocity(w.list,h.timeScale);return w.collisionActive.length>0&&c.trigger(r,"collisionActive",{pairs:w.collisionActive}),w.collisionEnd.length>0&&c.trigger(r,"collisionEnd",{pairs:w.collisionEnd}),e(g),c.trigger(r,"afterUpdate",v),r},r.merge=function(e,t){if(d.extend(e,t),t.world){e.world=t.world,r.clear(e);for(var n=p.allBodies(e.world),o=0;o<n.length;o++){var a=n[o];i.set(a,!1),a.id=d.nextId()}}},r.clear=function(e){var t=e.world;l.clear(e.pairs);var n=e.broadphase;if(n.controller){var r=p.allBodies(t);n.controller.clear(n),n.controller.update(n,r,e,!0)}};var e=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.force.x=0,n.force.y=0,n.torque=0}},t=function(e,t){var n=void 0!==t.scale?t.scale:.001;if((0!==t.x||0!==t.y)&&0!==n)for(var r=0;r<e.length;r++){var o=e[r];o.isStatic||o.isSleeping||(o.force.y+=o.mass*t.y*n,o.force.x+=o.mass*t.x*n)}},n=function(e,t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];a.isStatic||a.isSleeping||h.update(a,t,n,r)}}}()},{"../body/Body":1,"../body/Composite":2,"../body/World":3,"../collision/Grid":6,"../collision/Pairs":8,"../collision/Resolver":10,"../constraint/Constraint":12,"../render/Render":31,"./Common":14,"./Events":16,"./Metrics":18,"./Sleeping":22}],16:[function(e,t,n){var r={};t.exports=r;var o=e("./Common");!function(){r.on=function(e,t,n){for(var r,o=t.split(" "),i=0;i<o.length;i++)r=o[i],e.events=e.events||{},e.events[r]=e.events[r]||[],e.events[r].push(n);return n},r.off=function(e,t,n){if(!t)return void(e.events={});"function"==typeof t&&(n=t,t=o.keys(e.events).join(" "));for(var r=t.split(" "),i=0;i<r.length;i++){var a=e.events[r[i]],s=[];if(n&&a)for(var l=0;l<a.length;l++)a[l]!==n&&s.push(a[l]);e.events[r[i]]=s}},r.trigger=function(e,t,n){var r,i,a,s;if(e.events){n||(n={}),r=t.split(" ");for(var l=0;l<r.length;l++)if(i=r[l],a=e.events[i]){s=o.clone(n,!1),s.name=i,s.source=e;for(var u=0;u<a.length;u++)a[u].apply(e,[s])}}}}()},{"./Common":14}],17:[function(e,t,n){var r={};t.exports=r;var o=e("./Plugin"),i=e("./Common");!function(){r.name="matter-js",r.version="0.13.0",r.uses=[],r.used=[],r.use=function(){o.use(r,Array.prototype.slice.call(arguments))},r.before=function(e,t){return e=e.replace(/^Matter./,""),i.chainPathBefore(r,e,t)},r.after=function(e,t){return e=e.replace(/^Matter./,""),i.chainPathAfter(r,e,t)}}()},{"./Common":14,"./Plugin":20}],18:[function(e,t,n){},{"../body/Composite":2,"./Common":14}],19:[function(e,t,n){var r={};t.exports=r;var o=e("../core/Common");!function(){r.create=function(t){var n={};return t||o.log("Mouse.create: element was undefined, defaulting to document.body","warn"),n.element=t||document.body,n.absolute={x:0,y:0},n.position={x:0,y:0},n.mousedownPosition={x:0,y:0},n.mouseupPosition={x:0,y:0},n.offset={x:0,y:0},n.scale={x:1,y:1},n.wheelDelta=0,n.button=-1,n.pixelRatio=n.element.getAttribute("data-pixel-ratio")||1,n.sourceEvents={mousemove:null,mousedown:null,mouseup:null,mousewheel:null},n.mousemove=function(t){var r=e(t,n.element,n.pixelRatio);t.changedTouches&&(n.button=0,t.preventDefault()),n.absolute.x=r.x,n.absolute.y=r.y,n.position.x=n.absolute.x*n.scale.x+n.offset.x,n.position.y=n.absolute.y*n.scale.y+n.offset.y,n.sourceEvents.mousemove=t},n.mousedown=function(t){var r=e(t,n.element,n.pixelRatio);t.changedTouches?(n.button=0,t.preventDefault()):n.button=t.button,n.absolute.x=r.x,n.absolute.y=r.y,n.position.x=n.absolute.x*n.scale.x+n.offset.x,n.position.y=n.absolute.y*n.scale.y+n.offset.y,n.mousedownPosition.x=n.position.x,n.mousedownPosition.y=n.position.y,n.sourceEvents.mousedown=t},n.mouseup=function(t){var r=e(t,n.element,n.pixelRatio);t.changedTouches&&t.preventDefault(),n.button=-1,n.absolute.x=r.x,n.absolute.y=r.y,n.position.x=n.absolute.x*n.scale.x+n.offset.x,n.position.y=n.absolute.y*n.scale.y+n.offset.y,n.mouseupPosition.x=n.position.x,n.mouseupPosition.y=n.position.y,n.sourceEvents.mouseup=t},n.mousewheel=function(e){n.wheelDelta=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail)),e.preventDefault()},r.setElement(n,n.element),n},r.setElement=function(e,t){e.element=t,t.addEventListener("mousemove",e.mousemove),t.addEventListener("mousedown",e.mousedown),t.addEventListener("mouseup",e.mouseup),t.addEventListener("mousewheel",e.mousewheel),t.addEventListener("DOMMouseScroll",e.mousewheel),t.addEventListener("touchmove",e.mousemove),t.addEventListener("touchstart",e.mousedown),t.addEventListener("touchend",e.mouseup)},r.clearSourceEvents=function(e){e.sourceEvents.mousemove=null,e.sourceEvents.mousedown=null,e.sourceEvents.mouseup=null,e.sourceEvents.mousewheel=null,e.wheelDelta=0},r.setOffset=function(e,t){e.offset.x=t.x,e.offset.y=t.y,e.position.x=e.absolute.x*e.scale.x+e.offset.x,e.position.y=e.absolute.y*e.scale.y+e.offset.y},r.setScale=function(e,t){e.scale.x=t.x,e.scale.y=t.y,e.position.x=e.absolute.x*e.scale.x+e.offset.x,e.position.y=e.absolute.y*e.scale.y+e.offset.y};var e=function(e,t,n){var r,o,i=t.getBoundingClientRect(),a=document.documentElement||document.body.parentNode||document.body,s=void 0!==window.pageXOffset?window.pageXOffset:a.scrollLeft,l=void 0!==window.pageYOffset?window.pageYOffset:a.scrollTop,u=e.changedTouches;return u?(r=u[0].pageX-i.left-s,o=u[0].pageY-i.top-l):(r=e.pageX-i.left-s,o=e.pageY-i.top-l),{x:r/(t.clientWidth/(t.width||t.clientWidth)*n),y:o/(t.clientHeight/(t.height||t.clientHeight)*n)}}}()},{"../core/Common":14}],20:[function(e,t,n){var r={};t.exports=r;var o=e("./Common");!function(){r._registry={},r.register=function(e){if(r.isPlugin(e)||o.warn("Plugin.register:",r.toString(e),"does not implement all required fields."),e.name in r._registry){var t=r._registry[e.name],n=r.versionParse(e.version).number,i=r.versionParse(t.version).number;n>i?(o.warn("Plugin.register:",r.toString(t),"was upgraded to",r.toString(e)),r._registry[e.name]=e):n<i?o.warn("Plugin.register:",r.toString(t),"can not be downgraded to",r.toString(e)):e!==t&&o.warn("Plugin.register:",r.toString(e),"is already registered to different plugin object")}else r._registry[e.name]=e;return e},r.resolve=function(e){return r._registry[r.dependencyParse(e).name]},r.toString=function(e){return"string"==typeof e?e:(e.name||"anonymous")+"@"+(e.version||e.range||"0.0.0")},r.isPlugin=function(e){return e&&e.name&&e.version&&e.install},r.isUsed=function(e,t){return e.used.indexOf(t)>-1},r.isFor=function(e,t){var n=e.for&&r.dependencyParse(e.for);return!e.for||t.name===n.name&&r.versionSatisfies(t.version,n.range)},r.use=function(e,t){if(e.uses=(e.uses||[]).concat(t||[]),0===e.uses.length)return void o.warn("Plugin.use:",r.toString(e),"does not specify any dependencies to install.");for(var n=r.dependencies(e),i=o.topologicalSort(n),a=[],s=0;s<i.length;s+=1)if(i[s]!==e.name){var l=r.resolve(i[s]);l?r.isUsed(e,l.name)||(r.isFor(l,e)||(o.warn("Plugin.use:",r.toString(l),"is for",l.for,"but installed on",r.toString(e)+"."),l._warned=!0),l.install?l.install(e):(o.warn("Plugin.use:",r.toString(l),"does not specify an install function."),l._warned=!0),l._warned?(a.push("🔶 "+r.toString(l)),delete l._warned):a.push("✅ "+r.toString(l)),e.used.push(l.name)):a.push("❌ "+i[s])}a.length>0&&o.info(a.join("  "))},r.dependencies=function(e,t){var n=r.dependencyParse(e),i=n.name;if(t=t||{},!(i in t)){e=r.resolve(e)||e,t[i]=o.map(e.uses||[],function(t){r.isPlugin(t)&&r.register(t);var i=r.dependencyParse(t),a=r.resolve(t);return a&&!r.versionSatisfies(a.version,i.range)?(o.warn("Plugin.dependencies:",r.toString(a),"does not satisfy",r.toString(i),"used by",r.toString(n)+"."),a._warned=!0,e._warned=!0):a||(o.warn("Plugin.dependencies:",r.toString(t),"used by",r.toString(n),"could not be resolved."),e._warned=!0),i.name});for(var a=0;a<t[i].length;a+=1)r.dependencies(t[i][a],t);return t}},r.dependencyParse=function(e){if(o.isString(e)){return/^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/.test(e)||o.warn("Plugin.dependencyParse:",e,"is not a valid dependency string."),{name:e.split("@")[0],range:e.split("@")[1]||"*"}}return{name:e.name,range:e.range||e.version}},r.versionParse=function(e){/^\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?$/.test(e)||o.warn("Plugin.versionParse:",e,"is not a valid version or range.");var t=e.split("-");e=t[0];var n=isNaN(Number(e[0])),r=n?e.substr(1):e,i=o.map(r.split("."),function(e){return Number(e)});return{isRange:n,version:r,range:e,operator:n?e[0]:"",parts:i,prerelease:t[1],number:1e8*i[0]+1e4*i[1]+i[2]}},r.versionSatisfies=function(e,t){t=t||"*";var n=r.versionParse(t),o=n.parts,i=r.versionParse(e),a=i.parts;if(n.isRange){if("*"===n.operator||"*"===e)return!0;if("~"===n.operator)return a[0]===o[0]&&a[1]===o[1]&&a[2]>=o[2];if("^"===n.operator)return o[0]>0?a[0]===o[0]&&i.number>=n.number:o[1]>0?a[1]===o[1]&&a[2]>=o[2]:a[2]===o[2]}return e===t||"*"===e}}()},{"./Common":14}],21:[function(e,t,n){var r={};t.exports=r;var o=e("./Events"),i=e("./Engine"),a=e("./Common");!function(){var e,t;if("undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),!e){var n;e=function(e){n=setTimeout(function(){e(a.now())},1e3/60)},t=function(){clearTimeout(n)}}r.create=function(e){var t={fps:60,correction:1,deltaSampleSize:60,counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:!1,enabled:!0},n=a.extend(t,e);return n.delta=n.delta||1e3/n.fps,n.deltaMin=n.deltaMin||1e3/n.fps,n.deltaMax=n.deltaMax||1e3/(.5*n.fps),n.fps=1e3/n.delta,n},r.run=function(t,n){return void 0!==t.positionIterations&&(n=t,t=r.create()),function o(i){t.frameRequestId=e(o),i&&t.enabled&&r.tick(t,n,i)}(),t},r.tick=function(e,t,n){var r,a=t.timing,s=1,l={timestamp:a.timestamp};o.trigger(e,"beforeTick",l),o.trigger(t,"beforeTick",l),e.isFixed?r=e.delta:(r=n-e.timePrev||e.delta,e.timePrev=n,e.deltaHistory.push(r),e.deltaHistory=e.deltaHistory.slice(-e.deltaSampleSize),r=Math.min.apply(null,e.deltaHistory),r=r<e.deltaMin?e.deltaMin:r,r=r>e.deltaMax?e.deltaMax:r,s=r/e.delta,e.delta=r),0!==e.timeScalePrev&&(s*=a.timeScale/e.timeScalePrev),0===a.timeScale&&(s=0),e.timeScalePrev=a.timeScale,e.correction=s,e.frameCounter+=1,n-e.counterTimestamp>=1e3&&(e.fps=e.frameCounter*((n-e.counterTimestamp)/1e3),e.counterTimestamp=n,e.frameCounter=0),o.trigger(e,"tick",l),o.trigger(t,"tick",l),t.world.isModified&&t.render&&t.render.controller&&t.render.controller.clear&&t.render.controller.clear(t.render),o.trigger(e,"beforeUpdate",l),i.update(t,r,s),o.trigger(e,"afterUpdate",l),t.render&&t.render.controller&&(o.trigger(e,"beforeRender",l),o.trigger(t,"beforeRender",l),t.render.controller.world(t.render),o.trigger(e,"afterRender",l),o.trigger(t,"afterRender",l)),o.trigger(e,"afterTick",l),o.trigger(t,"afterTick",l)},r.stop=function(e){t(e.frameRequestId)},r.start=function(e,t){r.run(e,t)}}()},{"./Common":14,"./Engine":15,"./Events":16}],22:[function(e,t,n){var r={};t.exports=r;var o=e("./Events");!function(){r._motionWakeThreshold=.18,r._motionSleepThreshold=.08,r._minBias=.9,r.update=function(e,t){for(var n=t*t*t,o=0;o<e.length;o++){var i=e[o],a=i.speed*i.speed+i.angularSpeed*i.angularSpeed;if(0===i.force.x&&0===i.force.y){var s=Math.min(i.motion,a),l=Math.max(i.motion,a);i.motion=r._minBias*s+(1-r._minBias)*l,i.sleepThreshold>0&&i.motion<r._motionSleepThreshold*n?(i.sleepCounter+=1,i.sleepCounter>=i.sleepThreshold&&r.set(i,!0)):i.sleepCounter>0&&(i.sleepCounter-=1)}else r.set(i,!1)}},r.afterCollisions=function(e,t){for(var n=t*t*t,o=0;o<e.length;o++){var i=e[o];if(i.isActive){var a=i.collision,s=a.bodyA.parent,l=a.bodyB.parent;if(!(s.isSleeping&&l.isSleeping||s.isStatic||l.isStatic)&&(s.isSleeping||l.isSleeping)){var u=s.isSleeping&&!s.isStatic?s:l,c=u===s?l:s;!u.isStatic&&c.motion>r._motionWakeThreshold*n&&r.set(u,!1)}}}},r.set=function(e,t){var n=e.isSleeping;t?(e.isSleeping=!0,e.sleepCounter=e.sleepThreshold,e.positionImpulse.x=0,e.positionImpulse.y=0,e.positionPrev.x=e.position.x,e.positionPrev.y=e.position.y,e.anglePrev=e.angle,e.speed=0,e.angularSpeed=0,e.motion=0,n||o.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,n&&o.trigger(e,"sleepEnd"))}}()},{"./Events":16}],23:[function(e,n,r){(function(t){var r={};n.exports=r;var o=e("../geometry/Vertices"),i=e("../core/Common"),a=e("../body/Body"),s=e("../geometry/Bounds"),l=e("../geometry/Vector"),u="undefined"!=typeof window?window.decomp:void 0!==t?t.decomp:null;!function(){r.rectangle=function(e,t,n,r,s){s=s||{};var l={label:"Rectangle Body",position:{x:e,y:t},vertices:o.fromPath("L 0 0 L "+n+" 0 L "+n+" "+r+" L 0 "+r)};if(s.chamfer){var u=s.chamfer;l.vertices=o.chamfer(l.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete s.chamfer}return a.create(i.extend({},l,s))},r.trapezoid=function(e,t,n,r,s,l){l=l||{},s*=.5;var u,c=(1-2*s)*n,p=n*s,f=p+c,d=f+p;u=s<.5?"L 0 0 L "+p+" "+-r+" L "+f+" "+-r+" L "+d+" 0":"L 0 0 L "+f+" "+-r+" L "+d+" 0";var h={label:"Trapezoid Body",position:{x:e,y:t},vertices:o.fromPath(u)};if(l.chamfer){var y=l.chamfer;h.vertices=o.chamfer(h.vertices,y.radius,y.quality,y.qualityMin,y.qualityMax),delete l.chamfer}return a.create(i.extend({},h,l))},r.circle=function(e,t,n,o,a){o=o||{};var s={label:"Circle Body",circleRadius:n};a=a||25;var l=Math.ceil(Math.max(10,Math.min(a,n)));return l%2==1&&(l+=1),r.polygon(e,t,l,n,i.extend({},s,o))},r.polygon=function(e,t,n,s,l){if(l=l||{},n<3)return r.circle(e,t,s,l);for(var u=2*Math.PI/n,c="",p=.5*u,f=0;f<n;f+=1){var d=p+f*u,h=Math.cos(d)*s,y=Math.sin(d)*s;c+="L "+h.toFixed(3)+" "+y.toFixed(3)+" "}var m={label:"Polygon Body",position:{x:e,y:t},vertices:o.fromPath(c)};if(l.chamfer){var v=l.chamfer;m.vertices=o.chamfer(m.vertices,v.radius,v.quality,v.qualityMin,v.qualityMax),delete l.chamfer}return a.create(i.extend({},m,l))},r.fromVertices=function(e,t,n,r,c,p,f){var d,h,y,m,v,g,b,x,w;for(r=r||{},h=[],c=void 0!==c&&c,p=void 0!==p?p:.01,f=void 0!==f?f:10,u||i.warn("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull."),i.isArray(n[0])||(n=[n]),x=0;x<n.length;x+=1)if(m=n[x],(y=o.isConvex(m))||!u)m=y?o.clockwiseSort(m):o.hull(m),h.push({position:{x:e,y:t},vertices:m});else{var C=m.map(function(e){return[e.x,e.y]});u.makeCCW(C),!1!==p&&u.removeCollinearPoints(C,p);var S=u.quickDecomp(C);for(v=0;v<S.length;v++){var k=S[v],P=k.map(function(e){return{x:e[0],y:e[1]}});f>0&&o.area(P)<f||h.push({position:o.centre(P),vertices:P})}}for(v=0;v<h.length;v++)h[v]=a.create(i.extend(h[v],r));if(c){for(v=0;v<h.length;v++){var _=h[v];for(g=v+1;g<h.length;g++){var E=h[g];if(s.overlaps(_.bounds,E.bounds)){var O=_.vertices,T=E.vertices;for(b=0;b<_.vertices.length;b++)for(w=0;w<E.vertices.length;w++){var A=l.magnitudeSquared(l.sub(O[(b+1)%O.length],T[w])),I=l.magnitudeSquared(l.sub(O[b],T[(w+1)%T.length]));A<5&&I<5&&(O[b].isInternal=!0,T[w].isInternal=!0)}}}}}return h.length>1?(d=a.create(i.extend({parts:h.slice(0)},r)),a.setPosition(d,{x:e,y:t}),d):h[0]}}()}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../body/Body":1,"../core/Common":14,"../geometry/Bounds":26,"../geometry/Vector":28,"../geometry/Vertices":29}],24:[function(e,t,n){var r={};t.exports=r;var o=e("../body/Composite"),i=e("../constraint/Constraint"),a=e("../core/Common"),s=e("../body/Body"),l=e("./Bodies");!function(){r.stack=function(e,t,n,r,i,a,l){for(var u,c=o.create({label:"Stack"}),p=e,f=t,d=0,h=0;h<r;h++){for(var y=0,m=0;m<n;m++){var v=l(p,f,m,h,u,d);if(v){var g=v.bounds.max.y-v.bounds.min.y,b=v.bounds.max.x-v.bounds.min.x;g>y&&(y=g),s.translate(v,{x:.5*b,y:.5*g}),p=v.bounds.max.x+i,o.addBody(c,v),u=v,d+=1}else p+=i}f+=y+a,p=e}return c},r.chain=function(e,t,n,r,s,l){for(var u=e.bodies,c=1;c<u.length;c++){var p=u[c-1],f=u[c],d=p.bounds.max.y-p.bounds.min.y,h=p.bounds.max.x-p.bounds.min.x,y=f.bounds.max.y-f.bounds.min.y,m=f.bounds.max.x-f.bounds.min.x,v={bodyA:p,pointA:{x:h*t,y:d*n},bodyB:f,pointB:{x:m*r,y:y*s}},g=a.extend(v,l);o.addConstraint(e,i.create(g))}return e.label+=" Chain",e},r.mesh=function(e,t,n,r,s){var l,u,c,p,f,d=e.bodies;for(l=0;l<n;l++){for(u=1;u<t;u++)c=d[u-1+l*t],p=d[u+l*t],o.addConstraint(e,i.create(a.extend({bodyA:c,bodyB:p},s)));if(l>0)for(u=0;u<t;u++)c=d[u+(l-1)*t],p=d[u+l*t],o.addConstraint(e,i.create(a.extend({bodyA:c,bodyB:p},s))),r&&u>0&&(f=d[u-1+(l-1)*t],o.addConstraint(e,i.create(a.extend({bodyA:f,bodyB:p},s)))),r&&u<t-1&&(f=d[u+1+(l-1)*t],o.addConstraint(e,i.create(a.extend({bodyA:f,bodyB:p},s))))}return e.label+=" Mesh",e},r.pyramid=function(e,t,n,o,i,a,l){return r.stack(e,t,n,o,i,a,function(t,r,a,u,c,p){var f=Math.min(o,Math.ceil(n/2)),d=c?c.bounds.max.x-c.bounds.min.x:0;if(!(u>f)){u=f-u;var h=u,y=n-1-u;if(!(a<h||a>y)){1===p&&s.translate(c,{x:(a+(n%2==1?1:-1))*d,y:0});return l(e+(c?a*d:0)+a*i,r,a,u,c,p)}}})},r.newtonsCradle=function(e,t,n,r,a){for(var s=o.create({label:"Newtons Cradle"}),u=0;u<n;u++){var c=l.circle(e+u*(1.9*r),t+a,r,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),p=i.create({pointA:{x:e+u*(1.9*r),y:t},bodyB:c});o.addBody(s,c),o.addConstraint(s,p)}return s},r.car=function(e,t,n,r,a){var u=s.nextGroup(!0),c=.5*-n+20,p=.5*n-20,f=o.create({label:"Car"}),d=l.rectangle(e,t,n,r,{collisionFilter:{group:u},chamfer:{radius:.5*r},density:2e-4}),h=l.circle(e+c,t+0,a,{collisionFilter:{group:u},friction:.8}),y=l.circle(e+p,t+0,a,{collisionFilter:{group:u},friction:.8}),m=i.create({bodyB:d,pointB:{x:c,y:0},bodyA:h,stiffness:1,length:0}),v=i.create({bodyB:d,pointB:{x:p,y:0},bodyA:y,stiffness:1,length:0});return o.addBody(f,d),o.addBody(f,h),o.addBody(f,y),o.addConstraint(f,m),o.addConstraint(f,v),f},r.softBody=function(e,t,n,o,i,s,u,c,p,f){p=a.extend({inertia:1/0},p),f=a.extend({stiffness:.2,render:{type:"line",anchors:!1}},f);var d=r.stack(e,t,n,o,i,s,function(e,t){return l.circle(e,t,c,p)});return r.mesh(d,n,o,u,f),d.label="Soft Body",d}}()},{"../body/Body":1,"../body/Composite":2,"../constraint/Constraint":12,"../core/Common":14,"./Bodies":23}],25:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vector"),i=e("../core/Common");!function(){r.fromVertices=function(e){for(var t={},n=0;n<e.length;n++){var r=(n+1)%e.length,a=o.normalise({x:e[r].y-e[n].y,y:e[n].x-e[r].x}),s=0===a.y?1/0:a.x/a.y;s=s.toFixed(3).toString(),t[s]=a}return i.values(t)},r.rotate=function(e,t){if(0!==t)for(var n=Math.cos(t),r=Math.sin(t),o=0;o<e.length;o++){var i,a=e[o];i=a.x*n-a.y*r,a.y=a.x*r+a.y*n,a.x=i}}}()},{"../core/Common":14,"../geometry/Vector":28}],26:[function(e,t,n){var r={};t.exports=r,function(){r.create=function(e){var t={min:{x:0,y:0},max:{x:0,y:0}};return e&&r.update(t,e),t},r.update=function(e,t,n){e.min.x=1/0,e.max.x=-1/0,e.min.y=1/0,e.max.y=-1/0;for(var r=0;r<t.length;r++){var o=t[r];o.x>e.max.x&&(e.max.x=o.x),o.x<e.min.x&&(e.min.x=o.x),o.y>e.max.y&&(e.max.y=o.y),o.y<e.min.y&&(e.min.y=o.y)}n&&(n.x>0?e.max.x+=n.x:e.min.x+=n.x,n.y>0?e.max.y+=n.y:e.min.y+=n.y)},r.contains=function(e,t){return t.x>=e.min.x&&t.x<=e.max.x&&t.y>=e.min.y&&t.y<=e.max.y},r.overlaps=function(e,t){return e.min.x<=t.max.x&&e.max.x>=t.min.x&&e.max.y>=t.min.y&&e.min.y<=t.max.y},r.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},r.shift=function(e,t){var n=e.max.x-e.min.x,r=e.max.y-e.min.y;e.min.x=t.x,e.max.x=t.x+n,e.min.y=t.y,e.max.y=t.y+r}}()},{}],27:[function(e,t,n){var r={};t.exports=r;e("../geometry/Bounds");!function(){r.pathToVertices=function(t,n){var r,o,i,a,s,l,u,c,p,f,d,h,y=[],m=0,v=0,g=0;n=n||15;var b=function(e,t,n){var r=n%2==1&&n>1;if(!p||e!=p.x||t!=p.y){p&&r?(d=p.x,h=p.y):(d=0,h=0);var o={x:d+e,y:h+t};!r&&p||(p=o),y.push(o),v=d+e,g=h+t}},x=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":v=e.x,g=e.y;break;case"H":v=e.x;break;case"V":g=e.y}b(v,g,e.pathSegType)}};for(e(t),i=t.getTotalLength(),l=[],r=0;r<t.pathSegList.numberOfItems;r+=1)l.push(t.pathSegList.getItem(r));for(u=l.concat();m<i;){if(f=t.getPathSegAtLength(m),(s=l[f])!=c){for(;u.length&&u[0]!=s;)x(u.shift());c=s}switch(s.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":a=t.getPointAtLength(m),b(a.x,a.y,0)}m+=n}for(r=0,o=u.length;r<o;++r)x(u[r]);return y};var e=function(e){for(var t,n,r,o,i,a,s=e.pathSegList,l=0,u=0,c=s.numberOfItems,p=0;p<c;++p){var f=s.getItem(p),d=f.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(d))"x"in f&&(l=f.x),"y"in f&&(u=f.y);else switch("x1"in f&&(r=l+f.x1),"x2"in f&&(i=l+f.x2),"y1"in f&&(o=u+f.y1),"y2"in f&&(a=u+f.y2),"x"in f&&(l+=f.x),"y"in f&&(u+=f.y),d){case"m":s.replaceItem(e.createSVGPathSegMovetoAbs(l,u),p);break;case"l":s.replaceItem(e.createSVGPathSegLinetoAbs(l,u),p);break;case"h":s.replaceItem(e.createSVGPathSegLinetoHorizontalAbs(l),p);break;case"v":s.replaceItem(e.createSVGPathSegLinetoVerticalAbs(u),p);break;case"c":s.replaceItem(e.createSVGPathSegCurvetoCubicAbs(l,u,r,o,i,a),p);break;case"s":s.replaceItem(e.createSVGPathSegCurvetoCubicSmoothAbs(l,u,i,a),p);break;case"q":s.replaceItem(e.createSVGPathSegCurvetoQuadraticAbs(l,u,r,o),p);break;case"t":s.replaceItem(e.createSVGPathSegCurvetoQuadraticSmoothAbs(l,u),p);break;case"a":s.replaceItem(e.createSVGPathSegArcAbs(l,u,f.r1,f.r2,f.angle,f.largeArcFlag,f.sweepFlag),p);break;case"z":case"Z":l=t,u=n}"M"!=d&&"m"!=d||(t=l,n=u)}}}()},{"../geometry/Bounds":26}],28:[function(e,t,n){var r={};t.exports=r,function(){r.create=function(e,t){return{x:e||0,y:t||0}},r.clone=function(e){return{x:e.x,y:e.y}},r.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},r.rotate=function(e,t,n){var r=Math.cos(t),o=Math.sin(t);n||(n={});var i=e.x*r-e.y*o;return n.y=e.x*o+e.y*r,n.x=i,n},r.rotateAbout=function(e,t,n,r){var o=Math.cos(t),i=Math.sin(t);r||(r={});var a=n.x+((e.x-n.x)*o-(e.y-n.y)*i);return r.y=n.y+((e.x-n.x)*i+(e.y-n.y)*o),r.x=a,r},r.normalise=function(e){var t=r.magnitude(e);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.cross=function(e,t){return e.x*t.y-e.y*t.x},r.cross3=function(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)},r.add=function(e,t,n){return n||(n={}),n.x=e.x+t.x,n.y=e.y+t.y,n},r.sub=function(e,t,n){return n||(n={}),n.x=e.x-t.x,n.y=e.y-t.y,n},r.mult=function(e,t){return{x:e.x*t,y:e.y*t}},r.div=function(e,t){return{x:e.x/t,y:e.y/t}},r.perp=function(e,t){return t=!0===t?-1:1,{x:t*-e.y,y:t*e.x}},r.neg=function(e){return{x:-e.x,y:-e.y}},r.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},r._temp=[r.create(),r.create(),r.create(),r.create(),r.create(),r.create()]}()},{}],29:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Vector"),i=e("../core/Common");!function(){r.create=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i={x:o.x,y:o.y,index:r,body:t,isInternal:!1};n.push(i)}return n},r.fromPath=function(e,t){var n=/L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/gi,o=[];return e.replace(n,function(e,t,n){o.push({x:parseFloat(t),y:parseFloat(n)})}),r.create(o,t)},r.centre=function(e){for(var t,n,i,a=r.area(e,!0),s={x:0,y:0},l=0;l<e.length;l++)i=(l+1)%e.length,t=o.cross(e[l],e[i]),n=o.mult(o.add(e[l],e[i]),t),s=o.add(s,n);return o.div(s,6*a)},r.mean=function(e){for(var t={x:0,y:0},n=0;n<e.length;n++)t.x+=e[n].x,t.y+=e[n].y;return o.div(t,e.length)},r.area=function(e,t){for(var n=0,r=e.length-1,o=0;o<e.length;o++)n+=(e[r].x-e[o].x)*(e[r].y+e[o].y),r=o;return t?n/2:Math.abs(n)/2},r.inertia=function(e,t){for(var n,r,i=0,a=0,s=e,l=0;l<s.length;l++)r=(l+1)%s.length,n=Math.abs(o.cross(s[r],s[l])),i+=n*(o.dot(s[r],s[r])+o.dot(s[r],s[l])+o.dot(s[l],s[l])),a+=n;return t/6*(i/a)},r.translate=function(e,t,n){var r;if(n)for(r=0;r<e.length;r++)e[r].x+=t.x*n,e[r].y+=t.y*n;else for(r=0;r<e.length;r++)e[r].x+=t.x,e[r].y+=t.y;return e},r.rotate=function(e,t,n){if(0!==t){for(var r=Math.cos(t),o=Math.sin(t),i=0;i<e.length;i++){var a=e[i],s=a.x-n.x,l=a.y-n.y;a.x=n.x+(s*r-l*o),a.y=n.y+(s*o+l*r)}return e}},r.contains=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=e[(n+1)%e.length];if((t.x-r.x)*(o.y-r.y)+(t.y-r.y)*(r.x-o.x)>0)return!1}return!0},r.scale=function(e,t,n,i){if(1===t&&1===n)return e;i=i||r.centre(e);for(var a,s,l=0;l<e.length;l++)a=e[l],s=o.sub(a,i),e[l].x=i.x+s.x*t,e[l].y=i.y+s.y*n;return e},r.chamfer=function(e,t,n,r,a){t=t||[8],t.length||(t=[t]),n=void 0!==n?n:-1,r=r||2,a=a||14;for(var s=[],l=0;l<e.length;l++){var u=e[l-1>=0?l-1:e.length-1],c=e[l],p=e[(l+1)%e.length],f=t[l<t.length?l:t.length-1];if(0!==f){var d=o.normalise({x:c.y-u.y,y:u.x-c.x}),h=o.normalise({x:p.y-c.y,y:c.x-p.x}),y=Math.sqrt(2*Math.pow(f,2)),m=o.mult(i.clone(d),f),v=o.normalise(o.mult(o.add(d,h),.5)),g=o.sub(c,o.mult(v,y)),b=n;-1===n&&(b=1.75*Math.pow(f,.32)),b=i.clamp(b,r,a),b%2==1&&(b+=1);for(var x=Math.acos(o.dot(d,h)),w=x/b,C=0;C<b;C++)s.push(o.add(o.rotate(m,w*C),g))}else s.push(c)}return s},r.clockwiseSort=function(e){var t=r.mean(e);return e.sort(function(e,n){return o.angle(t,e)-o.angle(t,n)}),e},r.isConvex=function(e){var t,n,r,o,i=0,a=e.length;if(a<3)return null;for(t=0;t<a;t++)if(n=(t+1)%a,r=(t+2)%a,o=(e[n].x-e[t].x)*(e[r].y-e[n].y),o-=(e[n].y-e[t].y)*(e[r].x-e[n].x),o<0?i|=1:o>0&&(i|=2),3===i)return!1;return 0!==i||null},r.hull=function(e){var t,n,r=[],i=[];for(e=e.slice(0),e.sort(function(e,t){var n=e.x-t.x;return 0!==n?n:e.y-t.y}),n=0;n<e.length;n+=1){for(t=e[n];i.length>=2&&o.cross3(i[i.length-2],i[i.length-1],t)<=0;)i.pop();i.push(t)}for(n=e.length-1;n>=0;n-=1){for(t=e[n];r.length>=2&&o.cross3(r[r.length-2],r[r.length-1],t)<=0;)r.pop();r.push(t)}return r.pop(),i.pop(),r.concat(i)}}()},{"../core/Common":14,"../geometry/Vector":28}],30:[function(e,t,n){var r=t.exports=e("../core/Matter");r.Body=e("../body/Body"),r.Composite=e("../body/Composite"),r.World=e("../body/World"),r.Contact=e("../collision/Contact"),r.Detector=e("../collision/Detector"),r.Grid=e("../collision/Grid"),r.Pairs=e("../collision/Pairs"),r.Pair=e("../collision/Pair"),r.Query=e("../collision/Query"),r.Resolver=e("../collision/Resolver"),r.SAT=e("../collision/SAT"),r.Constraint=e("../constraint/Constraint"),r.MouseConstraint=e("../constraint/MouseConstraint"),r.Common=e("../core/Common"),r.Engine=e("../core/Engine"),r.Events=e("../core/Events"),r.Mouse=e("../core/Mouse"),r.Runner=e("../core/Runner"),r.Sleeping=e("../core/Sleeping"),r.Plugin=e("../core/Plugin"),r.Bodies=e("../factory/Bodies"),r.Composites=e("../factory/Composites"),r.Axes=e("../geometry/Axes"),r.Bounds=e("../geometry/Bounds"),r.Svg=e("../geometry/Svg"),r.Vector=e("../geometry/Vector"),r.Vertices=e("../geometry/Vertices"),r.Render=e("../render/Render"),r.RenderPixi=e("../render/RenderPixi"),r.World.add=r.Composite.add,r.World.remove=r.Composite.remove,r.World.addComposite=r.Composite.addComposite,r.World.addBody=r.Composite.addBody,r.World.addConstraint=r.Composite.addConstraint,r.World.clear=r.Composite.clear,r.Engine.run=r.Runner.run},{"../body/Body":1,"../body/Composite":2,"../body/World":3,"../collision/Contact":4,"../collision/Detector":5,"../collision/Grid":6,"../collision/Pair":7,"../collision/Pairs":8,"../collision/Query":9,"../collision/Resolver":10,"../collision/SAT":11,"../constraint/Constraint":12,"../constraint/MouseConstraint":13,"../core/Common":14,"../core/Engine":15,"../core/Events":16,"../core/Matter":17,"../core/Metrics":18,"../core/Mouse":19,"../core/Plugin":20,"../core/Runner":21,"../core/Sleeping":22,"../factory/Bodies":23,"../factory/Composites":24,"../geometry/Axes":25,"../geometry/Bounds":26,"../geometry/Svg":27,"../geometry/Vector":28,"../geometry/Vertices":29,"../render/Render":31,"../render/RenderPixi":32}],31:[function(e,t,n){var r={};t.exports=r;var o=e("../core/Common"),i=e("../body/Composite"),a=e("../geometry/Bounds"),s=e("../core/Events"),l=e("../collision/Grid"),u=e("../geometry/Vector"),c=e("../core/Mouse");!function(){var e,t;"undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(function(){e(o.now())},1e3/60)},t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),r.create=function(e){var t={controller:r,engine:null,element:null,canvas:null,mouse:null,frameRequestId:null,options:{width:800,height:600,pixelRatio:1,background:"#18181d",wireframeBackground:"#0f0f13",hasBounds:!!e.bounds,enabled:!0,wireframes:!0,showSleeping:!0,showDebug:!1,showBroadphase:!1,showBounds:!1,showVelocity:!1,showCollisions:!1,showSeparations:!1,showAxes:!1,showPositions:!1,showAngleIndicator:!1,showIds:!1,showShadows:!1,showVertexNumbers:!1,showConvexHulls:!1,showInternalEdges:!1,showMousePosition:!1}},i=o.extend(t,e);return i.canvas&&(i.canvas.width=i.options.width||i.canvas.width,i.canvas.height=i.options.height||i.canvas.height),i.mouse=e.mouse,i.engine=e.engine,i.canvas=i.canvas||n(i.options.width,i.options.height),i.context=i.canvas.getContext("2d"),i.textures={},i.bounds=i.bounds||{min:{x:0,y:0},max:{x:i.canvas.width,y:i.canvas.height}},1!==i.options.pixelRatio&&r.setPixelRatio(i,i.options.pixelRatio),o.isElement(i.element)?i.element.appendChild(i.canvas):o.log("Render.create: options.element was undefined, render.canvas was created but not appended","warn"),i},r.run=function(t){!function n(o){t.frameRequestId=e(n),r.world(t)}()},r.stop=function(e){t(e.frameRequestId)},r.setPixelRatio=function(e,t){var n=e.options,r=e.canvas;"auto"===t&&(t=p(r)),n.pixelRatio=t,r.setAttribute("data-pixel-ratio",t),r.width=n.width*t,r.height=n.height*t,r.style.width=n.width+"px",r.style.height=n.height+"px",e.context.scale(t,t)},r.lookAt=function(e,t,n,r){r=void 0===r||r,t=o.isArray(t)?t:[t],n=n||{x:0,y:0};for(var i={min:{x:1/0,y:1/0},max:{x:-1/0,y:-1/0}},a=0;a<t.length;a+=1){var s=t[a],l=s.bounds?s.bounds.min:s.min||s.position||s,u=s.bounds?s.bounds.max:s.max||s.position||s;l&&u&&(l.x<i.min.x&&(i.min.x=l.x),u.x>i.max.x&&(i.max.x=u.x),l.y<i.min.y&&(i.min.y=l.y),u.y>i.max.y&&(i.max.y=u.y))}var p=i.max.x-i.min.x+2*n.x,f=i.max.y-i.min.y+2*n.y,d=e.canvas.height,h=e.canvas.width,y=h/d,m=p/f,v=1,g=1;m>y?g=m/y:v=y/m,e.options.hasBounds=!0,e.bounds.min.x=i.min.x,e.bounds.max.x=i.min.x+p*v,e.bounds.min.y=i.min.y,e.bounds.max.y=i.min.y+f*g,r&&(e.bounds.min.x+=.5*p-p*v*.5,e.bounds.max.x+=.5*p-p*v*.5,e.bounds.min.y+=.5*f-f*g*.5,e.bounds.max.y+=.5*f-f*g*.5),e.bounds.min.x-=n.x,e.bounds.max.x-=n.x,e.bounds.min.y-=n.y,e.bounds.max.y-=n.y,e.mouse&&(c.setScale(e.mouse,{x:(e.bounds.max.x-e.bounds.min.x)/e.canvas.width,y:(e.bounds.max.y-e.bounds.min.y)/e.canvas.height}),c.setOffset(e.mouse,e.bounds.min))},r.startViewTransform=function(e){var t=e.bounds.max.x-e.bounds.min.x,n=e.bounds.max.y-e.bounds.min.y,r=t/e.options.width,o=n/e.options.height;e.context.scale(1/r,1/o),e.context.translate(-e.bounds.min.x,-e.bounds.min.y)},r.endViewTransform=function(e){e.context.setTransform(e.options.pixelRatio,0,0,e.options.pixelRatio,0,0)},r.world=function(e){var t,n=e.engine,o=n.world,p=e.canvas,f=e.context,h=e.options,y=i.allBodies(o),m=i.allConstraints(o),v=h.wireframes?h.wireframeBackground:h.background,g=[],b=[],x={timestamp:n.timing.timestamp};if(s.trigger(e,"beforeRender",x),e.currentBackground!==v&&d(e,v),f.globalCompositeOperation="source-in",f.fillStyle="transparent",f.fillRect(0,0,p.width,p.height),f.globalCompositeOperation="source-over",h.hasBounds){for(t=0;t<y.length;t++){var w=y[t];a.overlaps(w.bounds,e.bounds)&&g.push(w)}for(t=0;t<m.length;t++){var C=m[t],S=C.bodyA,k=C.bodyB,P=C.pointA,_=C.pointB;S&&(P=u.add(S.position,C.pointA)),k&&(_=u.add(k.position,C.pointB)),P&&_&&((a.contains(e.bounds,P)||a.contains(e.bounds,_))&&b.push(C))}r.startViewTransform(e),e.mouse&&(c.setScale(e.mouse,{x:(e.bounds.max.x-e.bounds.min.x)/e.canvas.width,y:(e.bounds.max.y-e.bounds.min.y)/e.canvas.height}),c.setOffset(e.mouse,e.bounds.min))}else b=m,g=y;!h.wireframes||n.enableSleeping&&h.showSleeping?r.bodies(e,g,f):(h.showConvexHulls&&r.bodyConvexHulls(e,g,f),r.bodyWireframes(e,g,f)),h.showBounds&&r.bodyBounds(e,g,f),(h.showAxes||h.showAngleIndicator)&&r.bodyAxes(e,g,f),h.showPositions&&r.bodyPositions(e,g,f),h.showVelocity&&r.bodyVelocity(e,g,f),h.showIds&&r.bodyIds(e,g,f),h.showSeparations&&r.separations(e,n.pairs.list,f),h.showCollisions&&r.collisions(e,n.pairs.list,f),h.showVertexNumbers&&r.vertexNumbers(e,g,f),h.showMousePosition&&r.mousePosition(e,e.mouse,f),r.constraints(b,f),h.showBroadphase&&n.broadphase.controller===l&&r.grid(e,n.broadphase,f),h.showDebug&&r.debug(e,f),h.hasBounds&&r.endViewTransform(e),s.trigger(e,"afterRender",x)},r.debug=function(e,t){var n=t,r=e.engine,o=r.world,a=r.metrics,s=e.options;i.allBodies(o);if(r.timing.timestamp-(e.debugTimestamp||0)>=500){var l="";a.timing&&(l+="fps: "+Math.round(a.timing.fps)+"    "),e.debugString=l,e.debugTimestamp=r.timing.timestamp}if(e.debugString){n.font="12px Arial",s.wireframes?n.fillStyle="rgba(255,255,255,0.5)":n.fillStyle="rgba(0,0,0,0.5)";for(var u=e.debugString.split("\n"),c=0;c<u.length;c++)n.fillText(u[c],50,50+18*c)}},r.constraints=function(e,t){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(i.render.visible&&i.pointA&&i.pointB){var a,s,l=i.bodyA,c=i.bodyB;if(a=l?u.add(l.position,i.pointA):i.pointA,"pin"===i.render.type)n.beginPath(),n.arc(a.x,a.y,3,0,2*Math.PI),n.closePath();else{if(s=c?u.add(c.position,i.pointB):i.pointB,n.beginPath(),n.moveTo(a.x,a.y),"spring"===i.render.type)for(var p,f=u.sub(s,a),d=u.perp(u.normalise(f)),h=Math.ceil(o.clamp(i.length/5,12,20)),y=1;y<h;y+=1)p=y%2==0?1:-1,n.lineTo(a.x+f.x*(y/h)+d.x*p*4,a.y+f.y*(y/h)+d.y*p*4);n.lineTo(s.x,s.y)}i.render.lineWidth&&(n.lineWidth=i.render.lineWidth,n.strokeStyle=i.render.strokeStyle,n.stroke()),i.render.anchors&&(n.fillStyle=i.render.strokeStyle,n.beginPath(),n.arc(a.x,a.y,3,0,2*Math.PI),n.arc(s.x,s.y,3,0,2*Math.PI),n.closePath(),n.fill())}}},r.bodyShadows=function(e,t,n){for(var r=n,o=(e.engine,0);o<t.length;o++){var i=t[o];if(i.render.visible){if(i.circleRadius)r.beginPath(),r.arc(i.position.x,i.position.y,i.circleRadius,0,2*Math.PI),r.closePath();else{r.beginPath(),r.moveTo(i.vertices[0].x,i.vertices[0].y);for(var a=1;a<i.vertices.length;a++)r.lineTo(i.vertices[a].x,i.vertices[a].y);r.closePath()}var s=i.position.x-.5*e.options.width,l=i.position.y-.2*e.options.height,u=Math.abs(s)+Math.abs(l);r.shadowColor="rgba(0,0,0,0.15)",r.shadowOffsetX=.05*s,r.shadowOffsetY=.05*l,r.shadowBlur=1+12*Math.min(1,u/1e3),r.fill(),r.shadowColor=null,r.shadowOffsetX=null,r.shadowOffsetY=null,r.shadowBlur=null}}},r.bodies=function(e,t,n){var r,o,i,a,s=n,l=(e.engine,e.options),u=l.showInternalEdges||!l.wireframes;for(i=0;i<t.length;i++)if(r=t[i],r.render.visible)for(a=r.parts.length>1?1:0;a<r.parts.length;a++)if(o=r.parts[a],o.render.visible){if(l.showSleeping&&r.isSleeping?s.globalAlpha=.5*o.render.opacity:1!==o.render.opacity&&(s.globalAlpha=o.render.opacity),o.render.sprite&&o.render.sprite.texture&&!l.wireframes){var c=o.render.sprite,p=f(e,c.texture);s.translate(o.position.x,o.position.y),s.rotate(o.angle),s.drawImage(p,p.width*-c.xOffset*c.xScale,p.height*-c.yOffset*c.yScale,p.width*c.xScale,p.height*c.yScale),s.rotate(-o.angle),s.translate(-o.position.x,-o.position.y)}else{if(o.circleRadius)s.beginPath(),s.arc(o.position.x,o.position.y,o.circleRadius,0,2*Math.PI);else{s.beginPath(),s.moveTo(o.vertices[0].x,o.vertices[0].y);for(var d=1;d<o.vertices.length;d++)!o.vertices[d-1].isInternal||u?s.lineTo(o.vertices[d].x,o.vertices[d].y):s.moveTo(o.vertices[d].x,o.vertices[d].y),o.vertices[d].isInternal&&!u&&s.moveTo(o.vertices[(d+1)%o.vertices.length].x,o.vertices[(d+1)%o.vertices.length].y);s.lineTo(o.vertices[0].x,o.vertices[0].y),s.closePath()}l.wireframes?(s.lineWidth=1,s.strokeStyle="#bbb",s.stroke()):(s.fillStyle=o.render.fillStyle,o.render.lineWidth&&(s.lineWidth=o.render.lineWidth,s.strokeStyle=o.render.strokeStyle,s.stroke()),s.fill())}s.globalAlpha=1}},r.bodyWireframes=function(e,t,n){var r,o,i,a,s,l=n,u=e.options.showInternalEdges;for(l.beginPath(),i=0;i<t.length;i++)if(r=t[i],r.render.visible)for(s=r.parts.length>1?1:0;s<r.parts.length;s++){for(o=r.parts[s],l.moveTo(o.vertices[0].x,o.vertices[0].y),a=1;a<o.vertices.length;a++)!o.vertices[a-1].isInternal||u?l.lineTo(o.vertices[a].x,o.vertices[a].y):l.moveTo(o.vertices[a].x,o.vertices[a].y),o.vertices[a].isInternal&&!u&&l.moveTo(o.vertices[(a+1)%o.vertices.length].x,o.vertices[(a+1)%o.vertices.length].y);l.lineTo(o.vertices[0].x,o.vertices[0].y)}l.lineWidth=1,l.strokeStyle="#bbb",l.stroke()},r.bodyConvexHulls=function(e,t,n){var r,o,i,a=n;for(a.beginPath(),o=0;o<t.length;o++)if(r=t[o],r.render.visible&&1!==r.parts.length){for(a.moveTo(r.vertices[0].x,r.vertices[0].y),i=1;i<r.vertices.length;i++)a.lineTo(r.vertices[i].x,r.vertices[i].y);a.lineTo(r.vertices[0].x,r.vertices[0].y)}a.lineWidth=1,a.strokeStyle="rgba(255,255,255,0.2)",a.stroke()},r.vertexNumbers=function(e,t,n){var r,o,i,a=n;for(r=0;r<t.length;r++){var s=t[r].parts;for(i=s.length>1?1:0;i<s.length;i++){var l=s[i];for(o=0;o<l.vertices.length;o++)a.fillStyle="rgba(255,255,255,0.2)",a.fillText(r+"_"+o,l.position.x+.8*(l.vertices[o].x-l.position.x),l.position.y+.8*(l.vertices[o].y-l.position.y))}}},r.mousePosition=function(e,t,n){var r=n;r.fillStyle="rgba(255,255,255,0.8)",r.fillText(t.position.x+"  "+t.position.y,t.position.x+5,t.position.y-5)},r.bodyBounds=function(e,t,n){var r=n,o=(e.engine,e.options);r.beginPath();for(var i=0;i<t.length;i++){if(t[i].render.visible)for(var a=t[i].parts,s=a.length>1?1:0;s<a.length;s++){var l=a[s];r.rect(l.bounds.min.x,l.bounds.min.y,l.bounds.max.x-l.bounds.min.x,l.bounds.max.y-l.bounds.min.y)}}o.wireframes?r.strokeStyle="rgba(255,255,255,0.08)":r.strokeStyle="rgba(0,0,0,0.1)",r.lineWidth=1,r.stroke()},r.bodyAxes=function(e,t,n){var r,o,i,a,s=n,l=(e.engine,e.options);for(s.beginPath(),o=0;o<t.length;o++){var u=t[o],c=u.parts;if(u.render.visible)if(l.showAxes)for(i=c.length>1?1:0;i<c.length;i++)for(r=c[i],a=0;a<r.axes.length;a++){var p=r.axes[a];s.moveTo(r.position.x,r.position.y),s.lineTo(r.position.x+20*p.x,r.position.y+20*p.y)}else for(i=c.length>1?1:0;i<c.length;i++)for(r=c[i],a=0;a<r.axes.length;a++)s.moveTo(r.position.x,r.position.y),s.lineTo((r.vertices[0].x+r.vertices[r.vertices.length-1].x)/2,(r.vertices[0].y+r.vertices[r.vertices.length-1].y)/2)}l.wireframes?(s.strokeStyle="indianred",s.lineWidth=1):(s.strokeStyle="rgba(255, 255, 255, 0.4)",s.globalCompositeOperation="overlay",s.lineWidth=2),s.stroke(),s.globalCompositeOperation="source-over"},r.bodyPositions=function(e,t,n){var r,o,i,a,s=n,l=(e.engine,e.options);for(s.beginPath(),i=0;i<t.length;i++)if(r=t[i],r.render.visible)for(a=0;a<r.parts.length;a++)o=r.parts[a],s.arc(o.position.x,o.position.y,3,0,2*Math.PI,!1),s.closePath();for(l.wireframes?s.fillStyle="indianred":s.fillStyle="rgba(0,0,0,0.5)",s.fill(),s.beginPath(),i=0;i<t.length;i++)r=t[i],r.render.visible&&(s.arc(r.positionPrev.x,r.positionPrev.y,2,0,2*Math.PI,!1),s.closePath());s.fillStyle="rgba(255,165,0,0.8)",s.fill()},r.bodyVelocity=function(e,t,n){var r=n;r.beginPath();for(var o=0;o<t.length;o++){var i=t[o];i.render.visible&&(r.moveTo(i.position.x,i.position.y),r.lineTo(i.position.x+2*(i.position.x-i.positionPrev.x),i.position.y+2*(i.position.y-i.positionPrev.y)))}r.lineWidth=3,r.strokeStyle="cornflowerblue",r.stroke()},r.bodyIds=function(e,t,n){var r,o,i=n;for(r=0;r<t.length;r++)if(t[r].render.visible){var a=t[r].parts;for(o=a.length>1?1:0;o<a.length;o++){var s=a[o];i.font="12px Arial",i.fillStyle="rgba(255,255,255,0.5)",i.fillText(s.id,s.position.x+10,s.position.y-10)}}},r.collisions=function(e,t,n){var r,o,i,a,s=n,l=e.options;for(s.beginPath(),i=0;i<t.length;i++)if(r=t[i],r.isActive)for(o=r.collision,a=0;a<r.activeContacts.length;a++){var u=r.activeContacts[a],c=u.vertex;s.rect(c.x-1.5,c.y-1.5,3.5,3.5)}for(l.wireframes?s.fillStyle="rgba(255,255,255,0.7)":s.fillStyle="orange",s.fill(),s.beginPath(),i=0;i<t.length;i++)if(r=t[i],r.isActive&&(o=r.collision,r.activeContacts.length>0)){var p=r.activeContacts[0].vertex.x,f=r.activeContacts[0].vertex.y;2===r.activeContacts.length&&(p=(r.activeContacts[0].vertex.x+r.activeContacts[1].vertex.x)/2,f=(r.activeContacts[0].vertex.y+r.activeContacts[1].vertex.y)/2),o.bodyB===o.supports[0].body||!0===o.bodyA.isStatic?s.moveTo(p-8*o.normal.x,f-8*o.normal.y):s.moveTo(p+8*o.normal.x,f+8*o.normal.y),s.lineTo(p,f)}l.wireframes?s.strokeStyle="rgba(255,165,0,0.7)":s.strokeStyle="orange",s.lineWidth=1,s.stroke()},r.separations=function(e,t,n){var r,o,i,a,s,l=n,u=e.options;for(l.beginPath(),s=0;s<t.length;s++)if(r=t[s],r.isActive){o=r.collision,i=o.bodyA,a=o.bodyB;var c=1;a.isStatic||i.isStatic||(c=.5),a.isStatic&&(c=0),l.moveTo(a.position.x,a.position.y),l.lineTo(a.position.x-o.penetration.x*c,a.position.y-o.penetration.y*c),c=1,a.isStatic||i.isStatic||(c=.5),i.isStatic&&(c=0),l.moveTo(i.position.x,i.position.y),l.lineTo(i.position.x+o.penetration.x*c,i.position.y+o.penetration.y*c)}u.wireframes?l.strokeStyle="rgba(255,165,0,0.5)":l.strokeStyle="orange",l.stroke()},r.grid=function(e,t,n){var r=n;e.options.wireframes?r.strokeStyle="rgba(255,180,0,0.1)":r.strokeStyle="rgba(255,180,0,0.5)",r.beginPath();for(var i=o.keys(t.buckets),a=0;a<i.length;a++){var s=i[a];if(!(t.buckets[s].length<2)){var l=s.split(/C|R/);r.rect(.5+parseInt(l[1],10)*t.bucketWidth,.5+parseInt(l[2],10)*t.bucketHeight,t.bucketWidth,t.bucketHeight)}}r.lineWidth=1,r.stroke()},r.inspector=function(e,t){var n,r=(e.engine,e.selected),o=e.render,i=o.options;if(i.hasBounds){var a=o.bounds.max.x-o.bounds.min.x,s=o.bounds.max.y-o.bounds.min.y,l=a/o.options.width,u=s/o.options.height;t.scale(1/l,1/u),t.translate(-o.bounds.min.x,-o.bounds.min.y)}for(var c=0;c<r.length;c++){var p=r[c].data;switch(t.translate(.5,.5),t.lineWidth=1,t.strokeStyle="rgba(255,165,0,0.9)",t.setLineDash([1,2]),p.type){case"body":n=p.bounds,t.beginPath(),t.rect(Math.floor(n.min.x-3),Math.floor(n.min.y-3),Math.floor(n.max.x-n.min.x+6),Math.floor(n.max.y-n.min.y+6)),t.closePath(),t.stroke();break;case"constraint":var f=p.pointA;p.bodyA&&(f=p.pointB),t.beginPath(),t.arc(f.x,f.y,10,0,2*Math.PI),t.closePath(),t.stroke()}t.setLineDash([]),t.translate(-.5,-.5)}null!==e.selectStart&&(t.translate(.5,.5),t.lineWidth=1,t.strokeStyle="rgba(255,165,0,0.6)",t.fillStyle="rgba(255,165,0,0.1)",n=e.selectBounds,t.beginPath(),t.rect(Math.floor(n.min.x),Math.floor(n.min.y),Math.floor(n.max.x-n.min.x),Math.floor(n.max.y-n.min.y)),t.closePath(),t.stroke(),t.fill(),t.translate(-.5,-.5)),i.hasBounds&&t.setTransform(1,0,0,1,0,0)};var n=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},n},p=function(e){var t=e.getContext("2d");return(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)},f=function(e,t){var n=e.textures[t];return n||(n=e.textures[t]=new Image,n.src=t,n)},d=function(e,t){var n=t;/(jpg|gif|png)$/.test(t)&&(n="url("+t+")"),e.canvas.style.background=n,e.canvas.style.backgroundSize="contain",e.currentBackground=t}}()},{"../body/Composite":2,"../collision/Grid":6,"../core/Common":14,"../core/Events":16,"../core/Mouse":19,"../geometry/Bounds":26,"../geometry/Vector":28}],32:[function(e,t,n){var r={};t.exports=r;var o=e("../geometry/Bounds"),i=e("../body/Composite"),a=e("../core/Common"),s=e("../core/Events"),l=e("../geometry/Vector");!function(){var e,t;"undefined"!=typeof window&&(e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(function(){e(a.now())},1e3/60)},t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),r.create=function(e){a.warn("RenderPixi.create: Matter.RenderPixi is deprecated (see docs)");var t={controller:r,engine:null,element:null,frameRequestId:null,canvas:null,renderer:null,container:null,spriteContainer:null,pixiOptions:null,options:{width:800,height:600,background:"#fafafa",wireframeBackground:"#222",hasBounds:!1,enabled:!0,wireframes:!0,showSleeping:!0,showDebug:!1,showBroadphase:!1,showBounds:!1,showVelocity:!1,showCollisions:!1,showAxes:!1,showPositions:!1,showAngleIndicator:!1,showIds:!1,showShadows:!1}},n=a.extend(t,e),o=!n.options.wireframes&&"transparent"===n.options.background;return n.pixiOptions=n.pixiOptions||{view:n.canvas,transparent:o,antialias:!0,backgroundColor:e.background},n.mouse=e.mouse,n.engine=e.engine,n.renderer=n.renderer||new PIXI.WebGLRenderer(n.options.width,n.options.height,n.pixiOptions),n.container=n.container||new PIXI.Container,n.spriteContainer=n.spriteContainer||new PIXI.Container,n.canvas=n.canvas||n.renderer.view,n.bounds=n.bounds||{min:{x:0,y:0},max:{x:n.options.width,y:n.options.height}},s.on(n.engine,"beforeUpdate",function(){r.clear(n)}),n.textures={},n.sprites={},n.primitives={},n.container.addChild(n.spriteContainer),a.isElement(n.element)?n.element.appendChild(n.canvas):a.warn('No "render.element" passed, "render.canvas" was not inserted into document.'),n.canvas.oncontextmenu=function(){return!1},n.canvas.onselectstart=function(){return!1},n},r.run=function(t){!function n(o){t.frameRequestId=e(n),r.world(t)}()},r.stop=function(e){t(e.frameRequestId)},r.clear=function(e){for(var t=e.container,n=e.spriteContainer;t.children[0];)t.removeChild(t.children[0]);for(;n.children[0];)n.removeChild(n.children[0]);var r=e.sprites["bg-0"];e.textures={},e.sprites={},e.primitives={},e.sprites["bg-0"]=r,r&&t.addChildAt(r,0),e.container.addChild(e.spriteContainer),e.currentBackground=null,t.scale.set(1,1),t.position.set(0,0)},r.setBackground=function(e,t){if(e.currentBackground!==t){var n=t.indexOf&&-1!==t.indexOf("#"),r=e.sprites["bg-0"];if(n){var o=a.colorToNumber(t);e.renderer.backgroundColor=o,r&&e.container.removeChild(r)}else if(!r){var i=c(e,t);r=e.sprites["bg-0"]=new PIXI.Sprite(i),r.position.x=0,r.position.y=0,e.container.addChildAt(r,0)}e.currentBackground=t}},r.world=function(e){var t,n=e.engine,a=n.world,s=e.renderer,u=e.container,c=e.options,p=i.allBodies(a),f=i.allConstraints(a),d=[];c.wireframes?r.setBackground(e,c.wireframeBackground):r.setBackground(e,c.background);var h=e.bounds.max.x-e.bounds.min.x,y=e.bounds.max.y-e.bounds.min.y,m=h/e.options.width,v=y/e.options.height;if(c.hasBounds){for(t=0;t<p.length;t++){var g=p[t];g.render.sprite.visible=o.overlaps(g.bounds,e.bounds)}for(t=0;t<f.length;t++){var b=f[t],x=b.bodyA,w=b.bodyB,C=b.pointA,S=b.pointB;x&&(C=l.add(x.position,b.pointA)),w&&(S=l.add(w.position,b.pointB)),C&&S&&((o.contains(e.bounds,C)||o.contains(e.bounds,S))&&d.push(b))}u.scale.set(1/m,1/v),u.position.set(-e.bounds.min.x*(1/m),-e.bounds.min.y*(1/v))}else d=f;for(t=0;t<p.length;t++)r.body(e,p[t]);for(t=0;t<d.length;t++)r.constraint(e,d[t]);s.render(u)},r.constraint=function(e,t){var n=(e.engine,t.bodyA),r=t.bodyB,o=t.pointA,i=t.pointB,s=e.container,l=t.render,u="c-"+t.id,c=e.primitives[u];if(c||(c=e.primitives[u]=new PIXI.Graphics),!l.visible||!t.pointA||!t.pointB)return void c.clear();-1===a.indexOf(s.children,c)&&s.addChild(c),c.clear(),c.beginFill(0,0),c.lineStyle(l.lineWidth,a.colorToNumber(l.strokeStyle),1),n?c.moveTo(n.position.x+o.x,n.position.y+o.y):c.moveTo(o.x,o.y),r?c.lineTo(r.position.x+i.x,r.position.y+i.y):c.lineTo(i.x,i.y),c.endFill()},r.body=function(e,t){var r=(e.engine,t.render);if(r.visible)if(r.sprite&&r.sprite.texture){var o="b-"+t.id,i=e.sprites[o],s=e.spriteContainer;i||(i=e.sprites[o]=n(e,t)),-1===a.indexOf(s.children,i)&&s.addChild(i),i.position.x=t.position.x,i.position.y=t.position.y,i.rotation=t.angle,i.scale.x=r.sprite.xScale||1,i.scale.y=r.sprite.yScale||1}else{var l="b-"+t.id,c=e.primitives[l],p=e.container;c||(c=e.primitives[l]=u(e,t),c.initialAngle=t.angle),-1===a.indexOf(p.children,c)&&p.addChild(c),c.position.x=t.position.x,c.position.y=t.position.y,c.rotation=t.angle-c.initialAngle}};var n=function(e,t){var n=t.render,r=n.sprite.texture,o=c(e,r),i=new PIXI.Sprite(o);return i.anchor.x=t.render.sprite.xOffset,i.anchor.y=t.render.sprite.yOffset,i},u=function(e,t){var n,r=t.render,o=e.options,i=new PIXI.Graphics,s=a.colorToNumber(r.fillStyle),l=a.colorToNumber(r.strokeStyle),u=a.colorToNumber(r.strokeStyle),c=a.colorToNumber("#bbb"),p=a.colorToNumber("#CD5C5C");i.clear();for(var f=t.parts.length>1?1:0;f<t.parts.length;f++){n=t.parts[f],o.wireframes?(i.beginFill(0,0),i.lineStyle(1,c,1)):(i.beginFill(s,1),i.lineStyle(r.lineWidth,l,1)),i.moveTo(n.vertices[0].x-t.position.x,n.vertices[0].y-t.position.y);for(var d=1;d<n.vertices.length;d++)i.lineTo(n.vertices[d].x-t.position.x,n.vertices[d].y-t.position.y);i.lineTo(n.vertices[0].x-t.position.x,n.vertices[0].y-t.position.y),i.endFill(),(o.showAngleIndicator||o.showAxes)&&(i.beginFill(0,0),o.wireframes?i.lineStyle(1,p,1):i.lineStyle(1,u),i.moveTo(n.position.x-t.position.x,n.position.y-t.position.y),i.lineTo((n.vertices[0].x+n.vertices[n.vertices.length-1].x)/2-t.position.x,(n.vertices[0].y+n.vertices[n.vertices.length-1].y)/2-t.position.y),i.endFill())}return i},c=function(e,t){var n=e.textures[t];return n||(n=e.textures[t]=PIXI.Texture.fromImage(t)),n}}()},{"../body/Composite":2,"../core/Common":14,"../core/Events":16,"../geometry/Bounds":26,"../geometry/Vector":28}]},{},[30])(30)})}).call(t,n(11))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.World=t.TileMap=t.Stage=t.Sprite=t.KeyListener=t.Loop=t.Body=t.AudioPlayer=void 0;var o=n(30),i=r(o),a=n(31),s=r(a),l=n(32),u=r(l),c=n(34),p=r(c),f=n(35),d=r(f),h=n(36),y=r(h),m=n(37),v=r(m),g=n(38),b=r(g);t.AudioPlayer=i.default,t.Body=s.default,t.Loop=u.default,t.KeyListener=p.default,t.Sprite=d.default,t.Stage=y.default,t.TileMap=v.default,t.World=b.default},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,l){if(o(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,s,l],p=0;u=new Error(t.replace(/%s/g,function(){return c[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i,a){for(var s=arguments.length,l=Array(s>6?s-6:0),u=6;u<s;u++)l[u-6]=arguments[u];return Object(w.untracked)(function(){if(o=o||"<<anonymous>>",a=a||r,null==n[r]){if(t){var s=null===n[r]?"null":"undefined";return new Error("The "+i+" `"+a+"` is marked as required in `"+o+"`, but its value is `"+s+"`.")}return null}return e.apply(void 0,[n,r,o,i,a].concat(l))})}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function i(e){var t=void 0===e?"undefined":k(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":o(t,e)?"symbol":t}function a(e){var t=i(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function s(e,t){return r(function(n,r,o,s,l){return Object(w.untracked)(function(){if(e&&i(n[r])===t.toLowerCase())return null;var s=void 0;switch(t){case"Array":s=w.isObservableArray;break;case"Object":s=w.isObservableObject;break;case"Map":s=w.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var u=n[r];if(!s(u)){var c=a(u),p=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected `mobx.Observable"+t+"`"+p+".")}return null})})}function l(e,t){return r(function(n,r,o,i,a){for(var l=arguments.length,u=Array(l>5?l-5:0),c=5;c<l;c++)u[c-5]=arguments[c];return Object(w.untracked)(function(){if("function"!=typeof t)return new Error("Property `"+a+"` of component `"+o+"` has invalid PropType notation.");var l=s(e,"Array")(n,r,o);if(l instanceof Error)return l;for(var c=n[r],p=0;p<c.length;p++)if((l=t.apply(void 0,[c,p,o,i,a+"["+p+"]"].concat(u)))instanceof Error)return l;return null})})}function u(e){return!(e.prototype&&e.prototype.render)}function c(e,t,n){var r,o,i="inject-"+(t.displayName||t.name||t.constructor&&t.constructor.name||"Unknown");n&&(i+="-with-"+n);var a=(o=r=function(n){function r(){var e,t,n,o;P(this,r);for(var i=arguments.length,a=Array(i),s=0;s<i;s++)a[s]=arguments[s];return t=n=O(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(a))),n.storeRef=function(e){n.wrappedInstance=e},o=t,O(n,o)}return E(r,n),_(r,[{key:"render",value:function(){var n={};for(var r in this.props)this.props.hasOwnProperty(r)&&(n[r]=this.props[r]);var o=e(this.context.mobxStores||{},n,this.context)||{};for(var i in o)n[i]=o[i];return u(t)||(n.ref=this.storeRef),Object(C.createElement)(t,n)}}]),r}(C.Component),r.displayName=i,o);return L(a,t),a.wrappedComponent=t,Object.defineProperties(a,X),a}function p(e){return function(t,n){return e.forEach(function(e){if(!(e in n)){if(!(e in t))throw new Error("MobX injector: Store '"+e+"' is not available! Make sure it is provided by some Provider");n[e]=t[e]}}),n}}function f(){var e=void 0;if("function"==typeof arguments[0])return e=arguments[0],function(t){var n=c(e,t);return n.isMobxInjector=!1,n=b(n),n.isMobxInjector=!0,n};for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e=p(t),function(n){return c(e,n,t.join("-"))}}function d(e){if(S.findDOMNode)try{return Object(S.findDOMNode)(e)}catch(e){return null}return null}function h(e){var t=d(e);t&&J&&J.set(t,e),Z.emit({event:"render",renderTime:e.__$mobRenderEnd-e.__$mobRenderStart,totalTime:Date.now()-e.__$mobRenderStart,component:e,node:t})}function y(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");Y||(Y=!0)}function m(e){G=e}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e[t],o=te[t],i=r?!0===n?function(){o.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),o.apply(this,arguments)}:o;e[t]=i}function g(e,t){if(null==e||null==t||"object"!==(void 0===e?"undefined":k(e))||"object"!==(void 0===t?"undefined":k(t)))return e!==t;var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(var r=void 0,o=n.length-1;r=n[o];o--)if(t[r]!==e[r])return!0;return!1}function b(e,t){if("string"==typeof e)throw new Error("Store names should be provided as array");if(Array.isArray(e))return Q||(Q=!0,console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')),t?f.apply(null,e)(b(t)):function(t){return b(e,t)};var n=e;if(!0===n.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),!("function"!=typeof n||n.prototype&&n.prototype.render||n.isReactClass||C.Component.isPrototypeOf(n))){var r,o;return b((o=r=function(e){function t(){return P(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return E(t,e),_(t,[{key:"render",value:function(){return n.call(this,this.props,this.context)}}]),t}(C.Component),r.displayName=n.displayName||n.name,r.contextTypes=n.contextTypes,r.propTypes=n.propTypes,r.defaultProps=n.defaultProps,o))}if(!n)throw new Error("Please pass a valid component to 'observer'");return x(n.prototype||n),n.isMobXReactObserver=!0,n}function x(e){v(e,"componentWillMount",!0),["componentDidMount","componentWillUnmount","componentDidUpdate"].forEach(function(t){v(e,t)}),e.shouldComponentUpdate||(e.shouldComponentUpdate=te.shouldComponentUpdate)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"propTypes",function(){return K}),n.d(t,"PropTypes",function(){return K}),n.d(t,"onError",function(){return se}),n.d(t,"observer",function(){return b}),n.d(t,"Observer",function(){return ne}),n.d(t,"renderReporter",function(){return Z}),n.d(t,"componentByNodeRegistery",function(){return J}),n.d(t,"trackComponents",function(){return y}),n.d(t,"useStaticRendering",function(){return m}),n.d(t,"Provider",function(){return ae}),n.d(t,"inject",function(){return f});var w=n(7),C=n(0),S=(n.n(C),n(10)),k=(n.n(S),"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),P=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var s={key:e,arg:t,resolve:n,reject:o,next:null};a?a=a.next=s:(i=a=s,r(e,t))})}function r(n,i){try{var a=t[n](i),s=a.value;s instanceof e?Promise.resolve(s.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(a.done?"return":"normal",a.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next,i?r(i.key,i.arg):a=null}var i,a;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),E=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},T=function(){function e(){P(this,e),this.listeners=[]}return _(e,[{key:"on",value:function(e){var t=this;return this.listeners.push(e),function(){var n=t.listeners.indexOf(e);-1!==n&&t.listeners.splice(n,1)}}},{key:"emit",value:function(e){this.listeners.forEach(function(t){return t(e)})}}]),e}(),A={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},I={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},M=Object.defineProperty,R=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols,j=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,B=D&&D(Object),L=function e(t,n,r){if("string"!=typeof n){if(B){var o=D(n);o&&o!==B&&e(t,o,r)}var i=R(n);N&&(i=i.concat(N(n)));for(var a=0;a<i.length;++a){var s=i[a];if(!(A[s]||I[s]||r&&r[s])){var l=j(n,s);try{M(t,s,l)}catch(e){}}}return t}return t},F=s(!1,"Array"),U=l.bind(null,!1),V=s(!1,"Map"),W=s(!1,"Object"),H=s(!0,"Array"),z=l.bind(null,!0),$=s(!0,"Object"),K=Object.freeze({observableArray:F,observableArrayOf:U,observableMap:V,observableObject:W,arrayOrObservableArray:H,arrayOrObservableArrayOf:z,objectOrObservableObject:$}),q={mobxStores:$};Object.seal(q);var X={contextTypes:{get:function(){return q},set:function(e){console.warn("Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`")},configurable:!0,enumerable:!1},isMobxInjector:{value:!0,writable:!0,configurable:!0,enumerable:!0}},Y=!1,G=!1,Q=!1,J="undefined"!=typeof WeakMap?new WeakMap:void 0,Z=new T,ee=new T,te={componentWillMount:function(){function e(e){var t=this[e],n=new w.Atom("reactive "+e);Object.defineProperty(this,e,{configurable:!0,enumerable:!0,get:function(){return n.reportObserved(),t},set:function(e){!i&&g(t,e)?(t=e,o=!0,n.reportChanged(),o=!1):t=e}})}var t=this;if(!0!==G){var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>",r=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID,o=!1,i=!1;e.call(this,"props"),e.call(this,"state");var a=this.render.bind(this),s=null,l=!1,u=function(){return s=new w.Reaction(n+"#"+r+".render()",function(){if(!l&&(l=!0,"function"==typeof t.componentWillReact&&t.componentWillReact(),!0!==t.__$mobxIsUnmounted)){var e=!0;try{i=!0,o||C.Component.prototype.forceUpdate.call(t),e=!1}finally{i=!1,e&&s.dispose()}}}),s.reactComponent=t,c.$mobx=s,t.render=c,c()},c=function(){l=!1;var e=void 0,n=void 0;if(s.track(function(){Y&&(t.__$mobRenderStart=Date.now());try{n=w.extras.allowStateChanges(!1,a)}catch(t){e=t}Y&&(t.__$mobRenderEnd=Date.now())}),e)throw ee.emit(e),e;return n};this.render=u}},componentWillUnmount:function(){if(!0!==G&&(this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0,Y)){var e=d(this);e&&J&&J.delete(e),Z.emit({event:"destroy",component:this,node:e})}},componentDidMount:function(){Y&&h(this)},componentDidUpdate:function(){Y&&h(this)},shouldComponentUpdate:function(e,t){return G&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||g(this.props,e)}},ne=b(function(e){return(0,e.children)()});ne.displayName="Observer",ne.propTypes={children:function(e,t,n,r,o){if("function"!=typeof e[t])return new Error("Invalid prop `"+o+"` of type `"+k(e[t])+"` supplied to `"+n+"`, expected `function`.")}};var re,oe,ie={children:!0,key:!0,ref:!0},ae=(oe=re=function(e){function t(){return P(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return E(t,e),_(t,[{key:"render",value:function(){return C.Children.only(this.props.children)}},{key:"getChildContext",value:function(){var e={},t=this.context.mobxStores;if(t)for(var n in t)e[n]=t[n];for(var r in this.props)ie[r]||"suppressChangedStoreWarning"===r||(e[r]=this.props[r]);return{mobxStores:e}}},{key:"componentWillReceiveProps",value:function(e){if(Object.keys(e).length!==Object.keys(this.props).length&&console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!e.suppressChangedStoreWarning)for(var t in e)ie[t]||this.props[t]===e[t]||console.warn("MobX Provider: Provided store '"+t+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),t}(C.Component),re.contextTypes={mobxStores:$},re.childContextTypes={mobxStores:$.isRequired},oe);if(!C.Component)throw new Error("mobx-react requires React to be available");if(!w.extras)throw new Error("mobx-react requires mobx to be available");"function"==typeof S.unstable_batchedUpdates&&w.extras.setReactionScheduler(S.unstable_batchedUpdates);var se=function(e){return ee.on(e)};if("object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":k(__MOBX_DEVTOOLS_GLOBAL_HOOK__))){var le={spy:w.spy,extras:w.extras},ue={renderReporter:Z,componentByNodeRegistery:J,trackComponents:y};__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(ue,le)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(e,t){function n(){this.constructor=e}Xt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e){return e.interceptors&&e.interceptors.length>0}function i(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),ke(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function a(e,t){var n=ht();try{var r=e.interceptors;if(r)for(var o=0,i=r.length;o<i&&(t=r[o](t),Ce(!t||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{yt(n)}}function s(e){return e.changeListeners&&e.changeListeners.length>0}function l(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),ke(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function u(e,t){var n=ht(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)r[o](t);yt(n)}}function c(){return!!Ln.spyListeners.length}function p(e){if(Ln.spyListeners.length)for(var t=Ln.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function f(e){p(Te({},e,{spyReportStart:!0}))}function d(e){p(e?Te({},e,Jt):Jt)}function h(e){return Ln.spyListeners.push(e),ke(function(){var t=Ln.spyListeners.indexOf(e);-1!==t&&Ln.spyListeners.splice(t,1)})}function y(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function m(e){Ce(!0!==e[Zt],"Illegal state: cannot recycle array as iterator"),Me(e,Zt,!0);var t=-1;return Me(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function v(e,t){Me(e,y(),t)}function g(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function b(e){Object.defineProperty(on.prototype,""+e,g(e))}function x(e){for(var t=tn;t<e;t++)b(t);tn=e}function w(e){return Ee(e)&&sn(e.$mobx)}function C(e){return pn[e]}function S(e,t){Ce("function"==typeof t,C("m026")),Ce("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return k(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function k(e,t,n,r){var o=P(e,t,n,r);try{return t.apply(n,r)}finally{_(o)}}function P(e,t,n,r){var o=c()&&!!e,i=0;if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];f({type:"action",name:e,fn:t,object:n,arguments:s})}var u=ht();return et(),{prevDerivation:u,prevAllowStateChanges:A(!0),notifySpy:o,startTime:i}}function _(e){I(e.prevAllowStateChanges),tt(),yt(e.prevDerivation),e.notifySpy&&d({time:Date.now()-e.startTime})}function E(e){Ce(null===Ln.trackingDerivation,C("m028")),Ln.strictMode=e,Ln.allowStateChanges=!e}function O(){return Ln.strictMode}function T(e,t){var n,r=A(e);try{n=t()}finally{I(r)}return n}function A(e){var t=Ln.allowStateChanges;return Ln.allowStateChanges=e,t}function I(e){Ln.allowStateChanges=e}function M(e,t,n,r,o){function i(i,a,s,l,u){if(void 0===u&&(u=0),Ce(o||j(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){Ae(i,"__mobxLazyInitializers")||Ie(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var c=s.value,p=s.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,a,p?p.call(t):c,l,s)}),{enumerable:r,configurable:!0,get:function(){return!0!==this.__mobxDidRunLazyInitializers&&N(this),t.call(this,a)},set:function(e){!0!==this.__mobxDidRunLazyInitializers&&N(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]||R(this,a,void 0,e,l,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]?n.call(this,a,t):R(this,a,t,e,l,s)}};return(arguments.length<3||5===arguments.length&&u<3)&&Object.defineProperty(i,a,f),f}return o?function(){if(j(arguments))return i.apply(null,arguments);var e=arguments,t=arguments.length;return function(n,r,o){return i(n,r,o,e,t)}}:i}function R(e,t,n,r,o,i){Ae(e,"__mobxInitializedProps")||Ie(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function N(e){!0!==e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers&&(Ie(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function j(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function D(e){return function(t,n,r){if(r&&"function"==typeof r.value)return r.value=S(e,r.value),r.enumerable=!1,r.configurable=!0,r;if(void 0!==r&&void 0!==r.get)throw new Error("[mobx] action is not expected to be used with getters");return fn(e).apply(this,arguments)}}function B(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return Ce("function"==typeof o,C("m002")),Ce(0===o.length,C("m003")),Ce("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),k(r,o,i,void 0)}function L(e){return"function"==typeof e&&!0===e.isMobxAction}function F(e,t,n){var r=function(){return k(t,n,e,arguments)};r.isMobxAction=!0,Ie(e,t,r)}function U(e,t){return e===t}function V(e,t){return De(e,t)}function W(e,t){return Le(e,t)||U(e,t)}function H(e,t,n){function r(){i(s)}var o,i,a;"string"==typeof e?(o=e,i=t,a=n):(o=e.name||"Autorun@"+xe(),i=e,a=t),Ce("function"==typeof i,C("m004")),Ce(!1===L(i),C("m005")),a&&(i=i.bind(a));var s=new $n(o,function(){this.track(r)});return s.schedule(),s.getDisposer()}function z(e,t,n,r){var o,i,a,s;return"string"==typeof e?(o=e,i=t,a=n,s=r):(o="When@"+xe(),i=e,a=t,s=n),H(o,function(e){if(i.call(s)){e.dispose();var t=ht();a.call(s),yt(t)}})}function $(e,t,n,r){function o(){a(c)}var i,a,s,l;"string"==typeof e?(i=e,a=t,s=n,l=r):(i=e.name||"AutorunAsync@"+xe(),a=e,s=t,l=n),Ce(!1===L(a),C("m006")),void 0===s&&(s=1),l&&(a=a.bind(l));var u=!1,c=new $n(i,function(){u||(u=!0,setTimeout(function(){u=!1,c.isDisposed||c.track(o)},s))});return c.schedule(),c.getDisposer()}function K(e,t,n){function r(){if(!u.isDisposed){var n=!1;u.track(function(){var t=e(u);n=a||!l(i,t),i=t}),a&&o.fireImmediately&&t(i,u),a||!0!==n||t(i,u),a&&(a=!1)}}arguments.length>3&&we(C("m007")),ce(e)&&we(C("m008"));var o;o="object"==typeof n?n:{},o.name=o.name||e.name||t.name||"Reaction@"+xe(),o.fireImmediately=!0===n||!0===o.fireImmediately,o.delay=o.delay||0,o.compareStructural=o.compareStructural||o.struct||!1,t=hn(o.name,o.context?t.bind(o.context):t),o.context&&(e=e.bind(o.context));var i,a=!0,s=!1,l=o.equals?o.equals:o.compareStructural||o.struct?yn.structural:yn.default,u=new $n(o.name,function(){a||o.delay<1?r():s||(s=!0,setTimeout(function(){s=!1,r()},o.delay))});return u.schedule(),u.getDisposer()}function q(e,t){if(ne(e)&&e.hasOwnProperty("$mobx"))return e.$mobx;Ce(Object.isExtensible(e),C("m035")),Oe(e)||(t=(e.constructor.name||"ObservableObject")+"@"+xe()),t||(t="ObservableObject@"+xe());var n=new gn(e,t);return Me(e,"$mobx",n),n}function X(e,t,n,r){if(e.values[t]&&!vn(e.values[t]))return Ce("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(ce(n.value)){var o=n.value;Y(e,t,o.initialValue,o.enhancer)}else L(n.value)&&!0===n.value.autoBind?F(e.target,t,n.value.originalFn):vn(n.value)?Q(e,t,n.value):Y(e,t,n.value,r);else G(e,t,n.get,n.set,yn.default,!0)}function Y(e,t,n,r){if(Ne(e.target,t),o(e)){var i=a(e,{object:e.target,name:t,type:"add",newValue:n});if(!i)return;n=i.newValue}n=(e.values[t]=new un(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,J(t)),te(e,e.target,t,n)}function G(e,t,n,r,o,i){i&&Ne(e.target,t),e.values[t]=new mn(n,e.target,o,e.name+"."+t,r),i&&Object.defineProperty(e.target,t,Z(t))}function Q(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target),e.values[t]=n,Object.defineProperty(e.target,t,Z(t))}function J(e){return bn[e]||(bn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){ee(this,e,t)}})}function Z(e){return xn[e]||(xn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function ee(e,t,n){var r=e.$mobx,i=r.values[t];if(o(r)){var l=a(r,{type:"update",object:e,name:t,newValue:n});if(!l)return;n=l.newValue}if((n=i.prepareNewValue(n))!==ln){var p=s(r),h=c(),l=p||h?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;h&&f(l),i.setNewValue(n),p&&u(r,l),h&&d()}}function te(e,t,n,r){var o=s(e),i=c(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&f(a),o&&u(e,a),i&&d()}function ne(e){return!!Ee(e)&&(N(e),wn(e.$mobx))}function re(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(w(e)||In(e))throw new Error(C("m019"));if(ne(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return ne(e)||!!e.$mobx||Qt(e)||Xn(e)||vn(e)}function oe(e){return Ce(!!e,":("),M(function(t,n,r,o,i){Ne(t,n),Ce(!i||!i.get,C("m022")),Y(q(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){ee(this,e,t)},!0,!1)}function ie(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return se(e,fe,t)}function ae(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return se(e,he,t)}function se(e,t,n){Ce(arguments.length>=2,C("m014")),Ce("object"==typeof e,C("m015")),Ce(!In(e),C("m016")),n.forEach(function(e){Ce("object"==typeof e,C("m017")),Ce(!re(e),C("m018"))});for(var r=q(e),o={},i=n.length-1;i>=0;i--){var a=n[i];for(var s in a)if(!0!==o[s]&&Ae(a,s)){if(o[s]=!0,e===a&&!Re(e,s))continue;var l=Object.getOwnPropertyDescriptor(a,s);X(r,s,l,t)}}return e}function le(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return Cn.apply(null,arguments);if(Ce(arguments.length<=1,C("m021")),Ce(!ce(e),C("m020")),re(e))return e;var t=fe(e,void 0,void 0);return t!==e?t:On.box(e)}function ue(e){we("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function ce(e){return"object"==typeof e&&null!==e&&!0===e.isMobxModifierDescriptor}function pe(e,t){return Ce(!ce(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function fe(e,t,n){return ce(e)&&we("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),re(e)?e:Array.isArray(e)?On.array(e,n):Oe(e)?On.object(e,n):Ve(e)?On.map(e,n):e}function de(e,t,n){return ce(e)&&we("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),void 0===e||null===e?e:ne(e)||w(e)||In(e)?e:Array.isArray(e)?On.shallowArray(e,n):Oe(e)?On.shallowObject(e,n):Ve(e)?On.shallowMap(e,n):we("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function he(e){return e}function ye(e,t,n){if(De(e,t))return t;if(re(e))return e;if(Array.isArray(e))return new on(e,ye,n);if(Ve(e))return new An(e,ye,n);if(Oe(e)){var r={};return q(r,n),se(r,ye,[e]),r}return e}function me(e,t,n){return De(e,t)?t:e}function ve(e,t){void 0===t&&(t=void 0),et();try{return e.apply(t)}finally{tt()}}function ge(e){return Se("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),On.map(e)}function be(){return"undefined"!=typeof window?window:e}function xe(){return++Ln.mobxGuid}function we(e,t){throw Ce(!1,e,t),"X"}function Ce(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function Se(e){return-1===Rn.indexOf(e)&&(Rn.push(e),console.error("[mobx] Deprecated: "+e),!0)}function ke(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function Pe(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function _e(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function Ee(e){return null!==e&&"object"==typeof e}function Oe(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function Te(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)Ae(r,o)&&(e[o]=r[o])}return e}function Ae(e,t){return jn.call(e,t)}function Ie(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Me(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Re(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}function Ne(e,t){Ce(Re(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function je(e){var t=[];for(var n in e)t.push(n);return t}function De(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;if(Le(e,t))return!0;if("object"!=typeof e)return e===t;var n=Fe(e),r=Ue(e);if(n!==Fe(t))return!1;if(r!==Ue(t))return!1;if(n){if(e.length!==t.length)return!1;for(var o=e.length-1;o>=0;o--)if(!De(e[o],t[o]))return!1;return!0}if(r){if(e.size!==t.size)return!1;var i=!0;return e.forEach(function(e,n){i=i&&De(t.get(n),e)}),i}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Ue(e)&&Ue(t))return e.size===t.size&&De(On.shallowMap(e).entries(),On.shallowMap(t).entries());if(je(e).length!==je(t).length)return!1;for(var a in e){if(!(a in t))return!1;if(!De(e[a],t[a]))return!1}return!0}return!1}function Be(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Ee(e)&&!0===e[n]}}function Le(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function Fe(e){return Array.isArray(e)||w(e)}function Ue(e){return Ve(e)||In(e)}function Ve(e){return void 0!==be().Map&&e instanceof be().Map}function We(e){var t;return Oe(e)?t=Object.keys(e):Array.isArray(e)?t=e.map(function(e){return e[0]}):Ve(e)?t=Array.from(e.keys()):we("Cannot get keys from "+e),t}function He(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function ze(e){return null===e?null:"object"==typeof e?""+e:e}function $e(){Un=!0,be().__mobxInstanceCount--}function Ke(){Se("Using `shareGlobalState` is not recommended, use peer dependencies instead. See https://github.com/mobxjs/mobx/issues/1082 for details."),Fn=!0;var e=be(),t=Ln;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?Ln=e.__mobxGlobal:e.__mobxGlobal=t}function qe(){return Ln}function Xe(){Ln.resetId++;var e=new Bn;for(var t in e)-1===Dn.indexOf(t)&&(Ln[t]=e[t]);Ln.allowStateChanges=!Ln.strictMode}function Ye(e){return e.observers&&e.observers.length>0}function Ge(e){return e.observers}function Qe(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Je(e,t){if(1===e.observers.length)e.observers.length=0,Ze(e);else{var n=e.observers,r=e.observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function Ze(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Ln.pendingUnobservations.push(e))}function et(){Ln.inBatch++}function tt(){if(0==--Ln.inBatch){bt();for(var e=Ln.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}Ln.pendingUnobservations=[]}}function nt(e){var t=Ln.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&Ze(e)}function rt(e){if(e.lowestObserverState!==Hn.STALE){e.lowestObserverState=Hn.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Hn.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Hn.STALE}}}function ot(e){if(e.lowestObserverState!==Hn.STALE){e.lowestObserverState=Hn.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Hn.POSSIBLY_STALE?r.dependenciesState=Hn.STALE:r.dependenciesState===Hn.UP_TO_DATE&&(e.lowestObserverState=Hn.UP_TO_DATE)}}}function it(e){if(e.lowestObserverState===Hn.UP_TO_DATE){e.lowestObserverState=Hn.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Hn.UP_TO_DATE&&(r.dependenciesState=Hn.POSSIBLY_STALE,r.onBecomeStale())}}}function at(e){return e instanceof zn}function st(e){switch(e.dependenciesState){case Hn.UP_TO_DATE:return!1;case Hn.NOT_TRACKING:case Hn.STALE:return!0;case Hn.POSSIBLY_STALE:for(var t=ht(),n=e.observing,r=n.length,o=0;o<r;o++){var i=n[o];if(vn(i)){try{i.get()}catch(e){return yt(t),!0}if(e.dependenciesState===Hn.STALE)return yt(t),!0}}return mt(e),yt(t),!1}}function lt(){return null!==Ln.trackingDerivation}function ut(e){var t=e.observers.length>0;Ln.computationDepth>0&&t&&we(C("m031")+e.name),!Ln.allowStateChanges&&t&&we(C(Ln.strictMode?"m030a":"m030b")+e.name)}function ct(e,t,n){mt(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ln.runId;var r=Ln.trackingDerivation;Ln.trackingDerivation=e;var o;try{o=t.call(n)}catch(e){o=new zn(e)}return Ln.trackingDerivation=r,pt(e),o}function pt(e){for(var t=e.observing,n=e.observing=e.newObserving,r=Hn.UP_TO_DATE,o=0,i=e.unboundDepsCount,a=0;a<i;a++){var s=n[a];0===s.diffValue&&(s.diffValue=1,o!==a&&(n[o]=s),o++),s.dependenciesState>r&&(r=s.dependenciesState)}for(n.length=o,e.newObserving=null,i=t.length;i--;){var s=t[i];0===s.diffValue&&Je(s,e),s.diffValue=0}for(;o--;){var s=n[o];1===s.diffValue&&(s.diffValue=0,Qe(s,e))}r!==Hn.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}function ft(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Je(t[n],e);e.dependenciesState=Hn.NOT_TRACKING}function dt(e){var t=ht(),n=e();return yt(t),n}function ht(){var e=Ln.trackingDerivation;return Ln.trackingDerivation=null,e}function yt(e){Ln.trackingDerivation=e}function mt(e){if(e.dependenciesState!==Hn.UP_TO_DATE){e.dependenciesState=Hn.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Hn.UP_TO_DATE}}function vt(e){Ce(this&&this.$mobx&&Xn(this.$mobx),"Invalid `this`"),Ce(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}function gt(e){return Ln.globalReactionErrorHandlers.push(e),function(){var t=Ln.globalReactionErrorHandlers.indexOf(e);t>=0&&Ln.globalReactionErrorHandlers.splice(t,1)}}function bt(){Ln.inBatch>0||Ln.isRunningReactions||qn(xt)}function xt(){Ln.isRunningReactions=!0;for(var e=Ln.pendingReactions,t=0;e.length>0;){++t===Kn&&(console.error("Reaction doesn't converge to a stable state after "+Kn+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Ln.isRunningReactions=!1}function wt(e){var t=qn;qn=function(n){return e(function(){return t(n)})}}function Ct(e){return Se("asReference is deprecated, use observable.ref instead"),On.ref(e)}function St(e){return Se("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),On.struct(e)}function kt(e){return Se("asFlat is deprecated, use observable.shallow instead"),On.shallow(e)}function Pt(e){return Se("asMap is deprecated, use observable.map or observable.shallowMap instead"),On.map(e||{})}function _t(e){return M(function(t,n,r,o,i){Ce(void 0!==i,C("m009")),Ce("function"==typeof i.get,C("m010")),G(q(t,""),n,i.get,i.set,e,!1)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!1)}function Et(e,t){if("object"==typeof e&&null!==e){if(w(e))return Ce(void 0===t,C("m036")),e.$mobx.atom;if(In(e)){var n=e;if(void 0===t)return Et(n._keys);var r=n._data[t]||n._hasMap[t];return Ce(!!r,"the entry '"+t+"' does not exist in the observable map '"+Tt(e)+"'"),r}if(N(e),t&&!e.$mobx&&e[t],ne(e)){if(!t)return we("please specify a property");var r=e.$mobx.values[t];return Ce(!!r,"no observable property '"+t+"' found on the observable object '"+Tt(e)+"'"),r}if(Qt(e)||vn(e)||Xn(e))return e}else if("function"==typeof e&&Xn(e.$mobx))return e.$mobx;return we("Cannot obtain atom from "+e)}function Ot(e,t){return Ce(e,"Expecting some object"),void 0!==t?Ot(Et(e,t)):Qt(e)||vn(e)||Xn(e)?e:In(e)?e:(N(e),e.$mobx?e.$mobx:void Ce(!1,"Cannot obtain administration from "+e))}function Tt(e,t){var n;return n=void 0!==t?Et(e,t):ne(e)||In(e)?Ot(e):Et(e),n.name}function At(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===ne(e))return!1;if(!e.$mobx.values[t])return!1;var n=Et(e,t);return vn(n)}return vn(e)}function It(e,t,n,r){return"function"==typeof n?Rt(e,t,n,r):Mt(e,t,n)}function Mt(e,t,n){return Ot(e).observe(t,n)}function Rt(e,t,n,r){return Ot(e,t).observe(n,r)}function Nt(e,t,n){return"function"==typeof n?Dt(e,t,n):jt(e,t)}function jt(e,t){return Ot(e).intercept(t)}function Dt(e,t,n){return Ot(e,t).intercept(n)}function Bt(e,t){return lt()||console.warn(C("m013")),Qn(e,{context:t}).get()}function Lt(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=[]),re(e)){if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(w(e)){var a=r([]),s=e.map(function(e){return Lt(e,t,n)});a.length=s.length;for(var o=0,i=s.length;o<i;o++)a[o]=s[o];return a}if(ne(e)){var a=r({});for(var l in e)a[l]=Lt(e[l],t,n);return a}if(In(e)){var u=r({});return e.forEach(function(e,r){return u[r]=Lt(e,t,n)}),u}if(cn(e))return Lt(e.get(),t,n)}return e}function Ft(e,t){Ce("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},o=Ln.resetId,i=function(o){function i(t,n){var r=o.call(this,function(){return e(n)},void 0,yn.default,"Transformer-"+e.name+"-"+t,void 0)||this;return r.sourceIdentifier=t,r.sourceObject=n,r}return r(i,o),i.prototype.onBecomeUnobserved=function(){var e=this.value;o.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(mn);return function(e){o!==Ln.resetId&&(n={},o=Ln.resetId);var t=Ut(e),r=n[t];return r?r.get():(r=n[t]=new i(t,e),r.get())}}function Ut(e){if("string"==typeof e||"number"==typeof e)return e;if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object or primitive value, got: "+e);var t=e.$transformId;return void 0===t&&(t=xe(),Ie(e,"$transformId",t)),t}function Vt(e){return console.log(e),e}function Wt(e,t){switch(arguments.length){case 0:if(!(e=Ln.trackingDerivation))return Vt(C("m024"));break;case 2:e=Et(e,t)}return e=Et(e),vn(e)?Vt(e.whyRun()):Xn(e)?Vt(e.whyRun()):we(C("m025"))}function Ht(e,t){return zt(Et(e,t))}function zt(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Pe(e.observing).map(zt)),t}function $t(e,t){return Kt(Et(e,t))}function Kt(e){var t={name:e.name};return Ye(e)&&(t.observers=Ge(e).map(Kt)),t}function qt(e,t,n){var r;if(In(e)||w(e)||cn(e))r=Ot(e);else{if(!ne(e))return we("Expected observable map, object or array as first array");if("string"!=typeof t)return we("InterceptReads can only be used with a specific property, not with an object in general");r=Ot(e,t)}return void 0!==r.dehancer?we("An intercept reader was already established"):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})}n.d(t,"extras",function(){return Jn}),n.d(t,"Reaction",function(){return $n}),n.d(t,"untracked",function(){return dt}),n.d(t,"IDerivationState",function(){return Hn}),n.d(t,"Atom",function(){return Gt}),n.d(t,"BaseAtom",function(){return Yt}),n.d(t,"useStrict",function(){return E}),n.d(t,"isStrictModeEnabled",function(){return O}),n.d(t,"spy",function(){return h}),n.d(t,"comparer",function(){return yn}),n.d(t,"asReference",function(){return Ct}),n.d(t,"asFlat",function(){return kt}),n.d(t,"asStructure",function(){return St}),n.d(t,"asMap",function(){return Pt}),n.d(t,"isModifierDescriptor",function(){return ce}),n.d(t,"isObservableObject",function(){return ne}),n.d(t,"isBoxedObservable",function(){return cn}),n.d(t,"isObservableArray",function(){return w}),n.d(t,"ObservableMap",function(){return An}),n.d(t,"isObservableMap",function(){return In}),n.d(t,"map",function(){return ge}),n.d(t,"transaction",function(){return ve}),n.d(t,"observable",function(){return On}),n.d(t,"IObservableFactories",function(){return En}),n.d(t,"computed",function(){return Qn}),n.d(t,"isObservable",function(){return re}),n.d(t,"isComputed",function(){return At}),n.d(t,"extendObservable",function(){return ie}),n.d(t,"extendShallowObservable",function(){return ae}),n.d(t,"observe",function(){return It}),n.d(t,"intercept",function(){return Nt}),n.d(t,"autorun",function(){return H}),n.d(t,"autorunAsync",function(){return $}),n.d(t,"when",function(){return z}),n.d(t,"reaction",function(){return K}),n.d(t,"action",function(){return hn}),n.d(t,"isAction",function(){return L}),n.d(t,"runInAction",function(){return B}),n.d(t,"expr",function(){return Bt}),n.d(t,"toJS",function(){return Lt}),n.d(t,"createTransformer",function(){return Ft}),n.d(t,"whyRun",function(){return Wt}),n.d(t,"isArrayLike",function(){return Fe});/*! *****************************************************************************
  Copyright (c) Microsoft Corporation. All rights reserved.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of the
  License at http://www.apache.org/licenses/LICENSE-2.0
  
  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.
  
  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** */
  var Xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Yt=function(){function e(e){void 0===e&&(e="Atom@"+xe()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Hn.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){nt(this)},e.prototype.reportChanged=function(){et(),rt(this),tt()},e.prototype.toString=function(){return this.name},e}(),Gt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+xe()),void 0===n&&(n=Nn),void 0===r&&(r=Nn);var o=e.call(this,t)||this;return o.name=t,o.onBecomeObservedHandler=n,o.onBecomeUnobservedHandler=r,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return r(t,e),t.prototype.reportObserved=function(){return et(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),tt(),!!Ln.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Yt),Qt=Be("Atom",Yt),Jt={spyReportEnd:!0},Zt="__$$iterating",en=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),tn=0,nn=function(){function e(){}return e}();!function(e,t){void 0!==Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}(nn,Array.prototype),Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(nn.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var rn=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Yt(e||"ObservableArray@"+xe()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer?e.map(this.dehancer):e},e.prototype.intercept=function(e){return i(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),l(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>tn&&x(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;ut(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=[]),o(this)){var s=a(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!s)return Mn;t=s.removedCount,n=s.added}n=n.map(function(e){return r.enhancer(e,void 0)});var l=n.length-t;this.updateArrayLength(i,l);var u=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,u),this.dehanceValues(u)},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(o=this.values).splice.apply(o,[e,t].concat(n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r;var o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&c(),o=s(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&f(i),this.atom.reportChanged(),o&&u(this,i),r&&d()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&c(),o=s(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&f(i),this.atom.reportChanged(),o&&u(this,i),r&&d()},e}(),on=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+xe()),void 0===o&&(o=!1);var i=e.call(this)||this,a=new rn(r,n,i,o);return Me(i,"$mobx",a),t&&t.length&&i.spliceWithArray(0,0,t),en&&Object.defineProperty(a.array,"0",an),i}return r(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return w(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0);var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0);for(var r=this.peek(),o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return i;return-1},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,o=this.$mobx.values;r=e<t?o.slice(0,e).concat(o.slice(e+1,t+1),[o[e]],o.slice(t+1)):o.slice(0,t).concat([o[e]],o.slice(t,e),o.slice(e+1)),this.replace(r)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,r=n.values;if(e<r.length){ut(n.atom);var i=r[e];if(o(n)){var s=a(n,{type:"update",object:this,index:e,newValue:t});if(!s)return;t=s.newValue}t=n.enhancer(t,i);t!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}},t}(nn);v(on.prototype,function(){return m(this.slice())}),Object.defineProperty(on.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){var t=Array.prototype[e];Ce("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),Ie(on.prototype,e,function(){return t.apply(this.peek(),arguments)})}),function(e,t){for(var n=0;n<t.length;n++)Ie(e,t[n],e[t[n]])}(on.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var an=g(0);x(1e3);var sn=Be("ObservableArrayAdministration",rn),ln={},un=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+xe()),void 0===o&&(o=!0);var i=e.call(this,r)||this;return i.enhancer=n,i.hasUnreportedChange=!1,i.dehancer=void 0,i.value=n(t,void 0,r),o&&c()&&p({type:"create",object:i,newValue:i.value}),i}return r(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==ln){var n=c();n&&f({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&d()}},t.prototype.prepareNewValue=function(e){if(ut(this),o(this)){var t=a(this,{object:this,type:"update",newValue:e});if(!t)return ln;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.value!==e?e:ln},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),s(this)&&u(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return i(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),l(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return ze(this.get())},t}(Yt);un.prototype[He()]=un.prototype.valueOf;var cn=Be("ObservableValue",un),pn={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or two arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m024:"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t  1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t  2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"Missing items in this list?\n    1. Check whether all used values are properly marked as observable (use isObservable to verify)\n    2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},fn=M(function(e,t,n,r,o){var i=r&&1===r.length?r[0]:n.name||t||"<unnamed action>";Ie(e,t,hn(i,n))},function(e){return this[e]},function(){Ce(!1,C("m001"))},!1,!0),dn=M(function(e,t,n){F(e,t,n)},function(e){return this[e]},function(){Ce(!1,C("m001"))},!1,!1),hn=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?S(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?S(e,t):1===arguments.length&&"string"==typeof e?D(e):D(t).apply(null,arguments)};hn.bound=function(e,t,n){if("function"==typeof e){var r=S("<not yet bound action>",e);return r.autoBind=!0,r}return dn.apply(null,arguments)};var yn={identity:U,structural:V,default:W},mn=function(){function e(e,t,n,r,o){this.derivation=e,this.scope=t,this.equals=n,this.dependenciesState=Hn.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Hn.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+xe(),this.value=new zn(null),this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+xe(),o&&(this.setter=S(r+"-setter",o))}return e.prototype.onBecomeStale=function(){it(this)},e.prototype.onBecomeUnobserved=function(){ft(this),this.value=void 0},e.prototype.get=function(){Ce(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===Ln.inBatch?(et(),st(this)&&(this.value=this.computeValue(!1)),tt()):(nt(this),st(this)&&this.trackAndCompute()&&ot(this));var e=this.value;if(at(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(at(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){Ce(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Ce(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){c()&&p({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.dependenciesState===Hn.NOT_TRACKING,n=this.value=this.computeValue(!0);return t||at(e)||at(n)||!this.equals(e,n)},e.prototype.computeValue=function(e){this.isComputing=!0,Ln.computationDepth++;var t;if(e)t=ct(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new zn(e)}return Ln.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return H(function(){var i=n.get();if(!r||t){var a=ht();e({type:"update",object:n,newValue:i,oldValue:o}),yt(a)}r=!1,o=i})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return ze(this.get())},e.prototype.whyRun=function(){var e=Boolean(Ln.trackingDerivation),t=Pe(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=Pe(Ge(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Hn.NOT_TRACKING?C("m032"):" * This computation will re-run if any of the following observables changes:\n    "+_e(t)+"\n    "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n    "+C("m038")+"\n\n  * If the outcome of this computation changes, the following observers will be re-run:\n    "+_e(n)+"\n")},e}();mn.prototype[He()]=mn.prototype.valueOf;var vn=Be("ComputedValue",mn),gn=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return Ce(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),l(this,e)},e.prototype.intercept=function(e){return i(this,e)},e}(),bn={},xn={},wn=Be("ObservableObjectAdministration",gn),Cn=oe(fe),Sn=oe(de),kn=oe(he),Pn=oe(ye),_n=oe(me),En=function(){function e(){}return e.prototype.box=function(e,t){return arguments.length>2&&ue("box"),new un(e,fe,t)},e.prototype.shallowBox=function(e,t){return arguments.length>2&&ue("shallowBox"),new un(e,he,t)},e.prototype.array=function(e,t){return arguments.length>2&&ue("array"),new on(e,fe,t)},e.prototype.shallowArray=function(e,t){return arguments.length>2&&ue("shallowArray"),new on(e,he,t)},e.prototype.map=function(e,t){return arguments.length>2&&ue("map"),new An(e,fe,t)},e.prototype.shallowMap=function(e,t){return arguments.length>2&&ue("shallowMap"),new An(e,he,t)},e.prototype.object=function(e,t){arguments.length>2&&ue("object");var n={};return q(n,t),ie(n,e),n},e.prototype.shallowObject=function(e,t){arguments.length>2&&ue("shallowObject");var n={};return q(n,t),ae(n,e),n},e.prototype.ref=function(){return arguments.length<2?pe(he,arguments[0]):kn.apply(null,arguments)},e.prototype.shallow=function(){return arguments.length<2?pe(de,arguments[0]):Sn.apply(null,arguments)},e.prototype.deep=function(){return arguments.length<2?pe(fe,arguments[0]):Cn.apply(null,arguments)},e.prototype.struct=function(){return arguments.length<2?pe(ye,arguments[0]):Pn.apply(null,arguments)},e}(),On=le;Object.getOwnPropertyNames(En.prototype).filter(function(e){return"constructor"!==e}).forEach(function(e){return On[e]=En.prototype[e]}),On.deep.struct=On.struct,On.ref.struct=function(){return arguments.length<2?pe(me,arguments[0]):_n.apply(null,arguments)};var Tn={},An=function(){function e(e,t,n){void 0===t&&(t=fe),void 0===n&&(n="ObservableMap@"+xe()),this.enhancer=t,this.name=n,this.$mobx=Tn,this._data=Object.create(null),this._hasMap=Object.create(null),this._keys=new on(void 0,he,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.dehancer=void 0,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(o(this)){var r=a(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,o(this)){var n=a(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=c(),i=s(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&f(n),ve(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),i&&u(this,n),r&&d(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new un(t,he,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if((t=n.prepareNewValue(t))!==ln){var r=c(),o=s(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&f(i),n.setNewValue(t),o&&u(this,i),r&&d()}},e.prototype._addValue=function(e,t){var n=this;ve(function(){var r=n._data[e]=new un(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=c(),o=s(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&f(i),o&&u(this,i),r&&d()},e.prototype.get=function(e){return e=""+e,this.has(e)?this.dehanceValue(this._data[e].get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return m(this._keys.slice())},e.prototype.values=function(){return m(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return m(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r,n)})},e.prototype.merge=function(e){var t=this;return In(e)&&(e=e.toJS()),ve(function(){Oe(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):Ve(e)?e.forEach(function(e,n){return t.set(n,e)}):null!==e&&void 0!==e&&we("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;ve(function(){dt(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return ve(function(){var n=We(e);t.keys().filter(function(e){return-1===n.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return Ce(!0!==t,C("m033")),l(this,e)},e.prototype.intercept=function(e){return i(this,e)},e}();v(An.prototype,function(){return this.entries()});var In=Be("ObservableMap",An),Mn=[];Object.freeze(Mn);var Rn=[],Nn=function(){},jn=Object.prototype.hasOwnProperty,Dn=["mobxGuid","resetId","spyListeners","strictMode","runId"],Bn=function(){function e(){this.version=5,this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]}return e}(),Ln=new Bn,Fn=!1,Un=!1,Vn=!1,Wn=be();Wn.__mobxInstanceCount?(Wn.__mobxInstanceCount++,setTimeout(function(){Fn||Un||Vn||(Vn=!0,console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details."))})):Wn.__mobxInstanceCount=1;var Hn;!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(Hn||(Hn={}));var zn=function(){function e(e){this.cause=e}return e}(),$n=function(){function e(e,t){void 0===e&&(e="Reaction@"+xe()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Hn.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+xe(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ln.pendingReactions.push(this),bt())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(et(),this._isScheduled=!1,st(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&c()&&p({object:this,type:"scheduled-reaction"})),tt())},e.prototype.track=function(e){et();var t,n=c();n&&(t=Date.now(),f({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=ct(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ft(this),at(r)&&this.reportExceptionInDerivation(r.cause),n&&d({time:Date.now()-t}),tt()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)return void this.errorHandler(e,this);var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=C("m037");console.error(n||r,e),c()&&p({type:"error",message:n,error:e,object:this}),Ln.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(et(),ft(this),tt()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=vt,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=Pe(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n    "+_e(e)+"\n    "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+C("m038")+"\n"},e}(),Kn=100,qn=function(e){return e()},Xn=Be("Reaction",$n),Yn=_t(yn.default),Gn=_t(yn.structural),Qn=function(e,t,n){if("string"==typeof t)return Yn.apply(null,arguments);Ce("function"==typeof e,C("m011")),Ce(arguments.length<3,C("m012"));var r="object"==typeof t?t:{};r.setter="function"==typeof t?t:r.setter;var o=r.equals?r.equals:r.compareStructural||r.struct?yn.structural:yn.default;return new mn(e,r.context,o,r.name||e.name||"",r.setter)};Qn.struct=Gn,Qn.equals=_t;var Jn={allowStateChanges:T,deepEqual:De,getAtom:Et,getDebugName:Tt,getDependencyTree:Ht,getAdministration:Ot,getGlobalState:qe,getObserverTree:$t,interceptReads:qt,isComputingDerivation:lt,isSpyEnabled:c,onReactionError:gt,reserveArrayBuffer:x,resetGlobalState:Xe,isolateGlobalState:$e,shareGlobalState:Ke,spyReport:p,spyReportEnd:d,spyReportStart:f,setReactionScheduler:wt},Zn={Reaction:$n,untracked:dt,Atom:Gt,BaseAtom:Yt,useStrict:E,isStrictModeEnabled:O,spy:h,comparer:yn,asReference:Ct,asFlat:kt,asStructure:St,asMap:Pt,isModifierDescriptor:ce,isObservableObject:ne,isBoxedObservable:cn,isObservableArray:w,ObservableMap:An,isObservableMap:In,map:ge,transaction:ve,observable:On,computed:Qn,isObservable:re,isComputed:At,extendObservable:ie,extendShallowObservable:ae,observe:It,intercept:Nt,autorun:H,autorunAsync:$,when:z,reaction:K,action:hn,isAction:L,runInAction:B,expr:Bt,toJS:Lt,createTransformer:Ft,whyRun:Wt,isArrayLike:Fe,extras:Jn},er=!1;for(var tr in Zn)!function(e){var t=Zn[e];Object.defineProperty(Zn,e,{get:function(){return er||(er=!0,console.warn("Using default export (`import mobx from 'mobx'`) is deprecated and won’t work in mobx@4.0.0\nUse `import * as mobx from 'mobx'` instead")),t}})}(tr);"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:h,extras:Jn}),t.default=Zn}.call(t,n(11))},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=r(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var c in n)i.call(n,c)&&(l[c]=n[c]);if(o){s=o(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(l[s[p]]=n[s[p]])}}return l}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(16)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}Object.defineProperty(t,"__esModule",{value:!0});var a,s,l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(7),f=(a=function(){function e(){o(this,e),r(this,"characterPosition",s,this),r(this,"stageX",l,this),r(this,"stageY",u,this)}return c(e,[{key:"setCharacterPosition",value:function(e,t){this.characterPosition[t]=e}},{key:"setStageX",value:function(e,t){this.stageX[t]=e>0?0:e<-1024?-1024:e}},{key:"setStageY",value:function(e,t){this.stageY[t]=e>0?0:e<-756?-756:e}}]),e}(),s=i(a.prototype,"characterPosition",[p.observable],{enumerable:!0,initializer:function(){return[{x:64,y:64},{x:899,y:450}]}}),l=i(a.prototype,"stageX",[p.observable],{enumerable:!0,initializer:function(){return[0,0]}}),u=i(a.prototype,"stageY",[p.observable],{enumerable:!0,initializer:function(){return[0,0]}}),a);t.default=new f},function(e,t,n){e.exports=n(14)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),i=r(o),a=n(10),s=r(a),l=n(25),u=r(l),c=n(43);s.default.render(i.default.createElement(c.AppContainer,null,i.default.createElement(u.default,null)),document.getElementById("root"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||x}function i(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||x}function a(){}function s(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||x}function l(e,t,n,r,o,i,a){return{$$typeof:_,type:e,key:t,ref:n,props:a,_owner:i}}function u(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function c(e,t,n,r){if(I.length){var o=I.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>I.length&&I.push(e)}function f(e,t,n,o){var i=typeof e;if("undefined"!==i&&"boolean"!==i||(e=null),null===e||"string"===i||"number"===i||"object"===i&&e.$$typeof===T)return n(o,e,""===t?"."+d(e,0):t),1;var a=0;if(t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){i=e[s];var l=t+d(i,s);a+=f(i,l,n,o)}else if("function"==typeof(l=O&&e[O]||e["@@iterator"]))for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=t+d(i,s++),a+=f(i,l,n,o);else"object"===i&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return a}function d(e,t){return"object"==typeof e&&null!==e&&null!=e.key?u(e.key):t.toString(36)}function h(e,t){e.func.call(e.context,t,e.count++)}function y(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?m(e,r,n,b.thatReturnsArgument):null!=e&&(l.isValidElement(e)&&(e=l.cloneAndReplaceKey(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),r.push(e))}function m(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),t=c(t,i,r,o),null==e||f(e,"",y,t),p(t)}var v=n(8),g=n(9);n(5);var b=n(4),x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},a.prototype=o.prototype;var w=i.prototype=new a;w.constructor=i,v(w,o.prototype),w.isPureReactComponent=!0;var C=s.prototype=new a;C.constructor=s,v(C,o.prototype),C.unstable_isAsyncReactComponent=!0,C.render=function(){return this.props.children};var S={Component:o,PureComponent:i,AsyncComponent:s},k={current:null},P=Object.prototype.hasOwnProperty,_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,E={key:!0,ref:!0,__self:!0,__source:!0};l.createElement=function(e,t,n){var r,o={},i=null,a=null,s=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),s=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)P.call(t,r)&&!E.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var p=Array(c),f=0;f<c;f++)p[f]=arguments[f+2];o.children=p}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return l(e,i,a,s,u,k.current,o)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){return l(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},l.cloneElement=function(e,t,n){var r=v({},e.props),o=e.key,i=e.ref,a=e._self,s=e._source,u=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,u=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(p in t)P.call(t,p)&&!E.hasOwnProperty(p)&&(r[p]=void 0===t[p]&&void 0!==c?c[p]:t[p])}var p=arguments.length-2;if(1===p)r.children=n;else if(1<p){c=Array(p);for(var f=0;f<p;f++)c[f]=arguments[f+2];r.children=c}return l(e.type,o,i,a,s,u,r)},l.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===_};var O="function"==typeof Symbol&&Symbol.iterator,T="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,A=/\/+/g,I=[],M={forEach:function(e,t,n){if(null==e)return e;t=c(null,null,t,n),null==e||f(e,"",h,t),p(t)},map:function(e,t,n){if(null==e)return e;var r=[];return m(e,r,null,t,n),r},count:function(e){return null==e?0:f(e,"",b.thatReturnsNull,null)},toArray:function(e){var t=[];return m(e,t,null,b.thatReturnsArgument),t}};e.exports={Children:{map:M.map,forEach:M.forEach,count:M.count,toArray:M.toArray,only:function(e){return l.isValidElement(e)||r("143"),e}},Component:S.Component,PureComponent:S.PureComponent,unstable_AsyncComponent:S.AsyncComponent,createElement:l.createElement,cloneElement:l.cloneElement,isValidElement:l.isValidElement,createFactory:l.createFactory,version:"16.0.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:k,assign:v}}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function i(){if(Ot)for(var e in Tt){var t=Tt[e],n=Ot.indexOf(e);if(-1<n||r("96",e),!At.plugins[n]){t.extractEvents||r("97",e),At.plugins[n]=t,n=t.eventTypes;for(var o in n){var i=void 0,s=n[o],l=t,u=o;At.eventNameDispatchConfigs.hasOwnProperty(u)&&r("99",u),At.eventNameDispatchConfigs[u]=s;var c=s.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&a(c[i],l,u);i=!0}else s.registrationName?(a(s.registrationName,l,u),i=!0):i=!1;i||r("98",o,e)}}}}function a(e,t,n){At.registrationNameModules[e]&&r("100",e),At.registrationNameModules[e]=t,At.registrationNameDependencies[e]=t.eventTypes[n].dependencies}function s(e,t){return(e&t)===t}function l(e){for(var t;t=e._renderedComponent;)e=t;return e}function u(e,t){e=l(e),e._hostNode=t,t[$t]=e}function c(e,t){if(!(e._flags&Ht.hasCachedChildNodes)){var n=e._renderedChildren;t=t.firstChild;var o;e:for(o in n)if(n.hasOwnProperty(o)){var i=n[o],a=l(i)._domID;if(0!==a){for(;null!==t;t=t.nextSibling){var s=t,c=a;if(s.nodeType===Ut&&s.getAttribute(Wt)===""+c||s.nodeType===Vt&&s.nodeValue===" react-text: "+c+" "||s.nodeType===Vt&&s.nodeValue===" react-empty: "+c+" "){u(i,t);continue e}}r("32",a)}}e._flags|=Ht.hasCachedChildNodes}}function p(e){if(e[$t])return e[$t];for(var t=[];!e[$t];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=e[$t];if(n.tag===Lt||n.tag===Ft)return n;for(;e&&(n=e[$t]);e=t.pop()){var r=n;t.length&&c(n,e)}return r}function f(e){if("function"==typeof e.getName)return e.getName();if("number"==typeof e.tag){if("string"==typeof(e=e.type))return e;if("function"==typeof e)return e.displayName||e.name}return null}function d(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if((t.effectTag&nn)!==tn)return 1;for(;t.return;)if(t=t.return,(t.effectTag&nn)!==tn)return 1}return t.tag===Jt?2:3}function h(e){2!==d(e)&&r("188")}function y(e){var t=e.alternate;if(!t)return t=d(e),3===t&&r("188"),1===t?null:e;for(var n=e,o=t;;){var i=n.return,a=i?i.alternate:null;if(!i||!a)break;if(i.child===a.child){for(var s=i.child;s;){if(s===n)return h(i),e;if(s===o)return h(i),t;s=s.sibling}r("188")}if(n.return!==o.return)n=i,o=a;else{s=!1;for(var l=i.child;l;){if(l===n){s=!0,n=i,o=a;break}if(l===o){s=!0,o=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,o=i;break}if(l===o){s=!0,o=a,n=i;break}l=l.sibling}s||r("189")}}n.alternate!==o&&r("190")}return n.tag!==Jt&&r("188"),n.stateNode.current===n?e:t}function m(e,t,n,r,o,i,a,s,l){on._hasCaughtError=!1,on._caughtError=null;var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){on._caughtError=e,on._hasCaughtError=!0}}function v(){if(on._hasRethrowError){var e=on._rethrowError;throw on._rethrowError=null,on._hasRethrowError=!1,e}}function g(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=sn.getNodeFromInstance(r),an.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function b(e){if(e=ln.getInstanceFromNode(e))if("number"==typeof e.tag){un&&"function"==typeof un.restoreControlledState||r("194");var t=ln.getFiberCurrentPropsFromNode(e.stateNode);un.restoreControlledState(e.stateNode,e.type,t)}else"function"!=typeof e.restoreControlledState&&r("195"),e.restoreControlledState()}function x(e,t,n,r,o,i){return e(t,n,r,o,i)}function w(e,t){return e(t)}function C(e,t){return w(e,t)}function S(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===yn?e.parentNode:e}function k(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n=t;if("number"==typeof n.tag){for(;n.return;)n=n.return;n=n.tag!==mn?null:n.stateNode.containerInfo}else{for(;n._hostParent;)n=n._hostParent;n=qt.getNodeFromInstance(n).parentNode}if(!n)break;e.ancestors.push(t),t=qt.getClosestInstanceFromNode(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],gn._handleTopLevel(e.topLevelType,t,e.nativeEvent,S(e.nativeEvent))}function P(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function _(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function E(e,t){e&&(ln.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))}function O(e){return E(e,!0)}function T(e){return E(e,!1)}function A(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||"button"!==t&&"input"!==t&&"select"!==t&&"textarea"!==t);default:return!1}}function I(e,t){if(!mt.canUseDOM||t&&!("addEventListener"in document))return!1;t="on"+e;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n="function"==typeof n[t]),!n&&_t&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function M(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function R(e){if(Sn[e])return Sn[e];if(!Cn[e])return e;var t,n=Cn[e];for(t in n)if(n.hasOwnProperty(t)&&t in kn)return Sn[e]=n[t];return""}function N(e){return Object.prototype.hasOwnProperty.call(e,On)||(e[On]=En++,_n[e[On]]={}),_n[e[On]]}function j(e){return!!Un.hasOwnProperty(e)||!Fn.hasOwnProperty(e)&&(Ln.test(e)?Un[e]=!0:(Fn[e]=!0,!1))}function D(){return null}function B(e){var t="";return yt.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}function L(e,t,n){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r)}else{for(n=""+n,t=null,r=0;r<e.length;r++){if(e[r].value===n)return void(e[r].selected=!0);null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function F(e,t){t&&(Jn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",""))}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function W(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function H(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===rr)return void(n.nodeValue=t)}e.textContent=t}function z(e,t){sr(t,e.nodeType===ir||e.nodeType===ar?e:e.ownerDocument)}function $(e,t){return e!==Mr&&e!==Ir||t!==Mr&&t!==Ir?e===Ar&&t!==Ar?-255:e!==Ar&&t===Ar?255:e-t:0}function K(){return{first:null,last:null,hasForceUpdate:!1,callbackList:null}}function q(e,t,n,r){null!==n?n.next=t:(t.next=e.first,e.first=t),null!==r?t.next=r:e.last=t}function X(e,t){t=t.priorityLevel;var n=null;if(null!==e.last&&0>=$(e.last.priorityLevel,t))n=e.last;else for(e=e.first;null!==e&&0>=$(e.priorityLevel,t);)n=e,e=e.next;return n}function Y(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=K()),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=K()):e=null,jr=r,Dr=e!==r?e:null;var o=jr;n=Dr;var i=X(o,t),a=null!==i?i.next:o.first;return null===n?(q(o,t,i,a),null):(r=X(n,t),e=null!==r?r.next:n.first,q(o,t,i,a),a===e&&null!==a||i===r&&null!==i?(null===r&&(n.first=t),null===e&&(n.last=null),null):(t={priorityLevel:t.priorityLevel,partialState:t.partialState,callback:t.callback,isReplace:t.isReplace,isForced:t.isForced,isTopLevelUnmount:t.isTopLevelUnmount,next:null},q(n,t,r,e),t))}function G(e,t,n,r){return e=e.partialState,"function"==typeof e?e.call(t,n,r):e}function Q(e,t,n){e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n}function J(e){return e.tag===Wr&&null!=e.type.childContextTypes}function Z(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",f(e)||"Unknown",i);return vt({},t,n)}function ee(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=uo,this.lastEffect=this.firstEffect=this.nextEffect=null,this.pendingWorkPriority=so,this.alternate=null}function te(e,t,n){var o=void 0;return"function"==typeof e?(o=e.prototype&&e.prototype.isReactComponent?new ee(Zr,t,n):new ee(Jr,t,n),o.type=e):"string"==typeof e?(o=new ee(to,t,n),o.type=e):"object"==typeof e&&null!==e&&"number"==typeof e.tag?o=e:r("130",null==e?e:typeof e,""),o}function ne(e){return null===e||void 0===e?null:(e=Vo&&e[Vo]||e["@@iterator"],"function"==typeof e?e:null)}function re(e,t){var n=t.ref;if(null!==n&&"function"!=typeof n){if(t._owner){t=t._owner;var o=void 0;t&&("number"==typeof t.tag?(t.tag!==Mo&&r("110"),o=t.stateNode):o=t.getPublicInstance()),o||r("147",n);var i=""+n;return null!==e&&null!==e.ref&&e.ref._stringRef===i?e.ref:(e=function(e){var t=o.refs===xt?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e},e._stringRef=i,e)}"string"!=typeof n&&r("148"),t._owner||r("149",n)}return n}function oe(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function ie(e,t){function n(n,r){if(t){if(!e){if(null===r.alternate)return;r=r.alternate}var o=n.lastEffect;null!==o?(o.nextEffect=r,n.lastEffect=r):n.firstEffect=n.lastEffect=r,r.nextEffect=null,r.effectTag=Uo}}function o(e,r){if(!t)return null;for(;null!==r;)n(e,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(t,n){return e?(t=So(t,n),t.index=0,t.sibling=null,t):(t.pendingWorkPriority=n,t.effectTag=Lo,t.index=0,t.sibling=null,t)}function s(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index,r<n?(e.effectTag=Fo,n):r):(e.effectTag=Fo,n):n}function l(e){return t&&null===e.alternate&&(e.effectTag=Fo),e}function u(e,t,n,r){return null===t||t.tag!==Ro?(n=_o(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function c(e,t,n,r){return null===t||t.type!==n.type?(r=ko(n,e.internalContextTag,r),r.ref=re(t,n),r.return=e,r):(r=a(t,r),r.ref=re(t,n),r.pendingProps=n.props,r.return=e,r)}function p(e,t,n,r){return null===t||t.tag!==jo?(n=Eo(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function f(e,t,n,r){return null===t||t.tag!==Do?(t=Oo(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=a(t,r),t.type=n.value,t.return=e,t)}function d(e,t,n,r){return null===t||t.tag!==No||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(n=To(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n.children||[],t.return=e,t)}function h(e,t,n,r){return null===t||t.tag!==Bo?(n=Po(n,e.internalContextTag,r),n.return=e,n):(t=a(t,r),t.pendingProps=n,t.return=e,t)}function y(e,t,n){if("string"==typeof t||"number"==typeof t)return t=_o(""+t,e.internalContextTag,n),t.return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Wo:return n=ko(t,e.internalContextTag,n),n.ref=re(null,t),n.return=e,n;case xo:return t=Eo(t,e.internalContextTag,n),t.return=e,t;case wo:return n=Oo(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case Co:return t=To(t,e.internalContextTag,n),t.return=e,t}if(Ao(t)||ne(t))return t=Po(t,e.internalContextTag,n),t.return=e,t;oe(e,t)}return null}function m(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Wo:return n.key===o?c(e,t,n,r):null;case xo:return n.key===o?p(e,t,n,r):null;case wo:return null===o?f(e,t,n,r):null;case Co:return n.key===o?d(e,t,n,r):null}if(Ao(n)||ne(n))return null!==o?null:h(e,t,n,r);oe(e,n)}return null}function v(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return e=e.get(n)||null,u(t,e,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Wo:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,o);case xo:return e=e.get(null===r.key?n:r.key)||null,p(t,e,r,o);case wo:return e=e.get(n)||null,f(t,e,r,o);case Co:return e=e.get(null===r.key?n:r.key)||null,d(t,e,r,o)}if(Ao(r)||ne(r))return e=e.get(n)||null,h(t,e,r,o);oe(t,r)}return null}function g(e,r,a,l){for(var u=null,c=null,p=r,f=r=0,d=null;null!==p&&f<a.length;f++){p.index>f?(d=p,p=null):d=p.sibling;var h=m(e,p,a[f],l);if(null===h){null===p&&(p=d);break}t&&p&&null===h.alternate&&n(e,p),r=s(h,r,f),null===c?u=h:c.sibling=h,c=h,p=d}if(f===a.length)return o(e,p),u;if(null===p){for(;f<a.length;f++)(p=y(e,a[f],l))&&(r=s(p,r,f),null===c?u=p:c.sibling=p,c=p);return u}for(p=i(e,p);f<a.length;f++)(d=v(p,e,f,a[f],l))&&(t&&null!==d.alternate&&p.delete(null===d.key?f:d.key),r=s(d,r,f),null===c?u=d:c.sibling=d,c=d);return t&&p.forEach(function(t){return n(e,t)}),u}function b(e,a,l,u){var c=ne(l);"function"!=typeof c&&r("150"),null==(l=c.call(l))&&r("151");for(var p=c=null,f=a,d=a=0,h=null,g=l.next();null!==f&&!g.done;d++,g=l.next()){f.index>d?(h=f,f=null):h=f.sibling;var b=m(e,f,g.value,u);if(null===b){f||(f=h);break}t&&f&&null===b.alternate&&n(e,f),a=s(b,a,d),null===p?c=b:p.sibling=b,p=b,f=h}if(g.done)return o(e,f),c;if(null===f){for(;!g.done;d++,g=l.next())null!==(g=y(e,g.value,u))&&(a=s(g,a,d),null===p?c=g:p.sibling=g,p=g);return c}for(f=i(e,f);!g.done;d++,g=l.next())null!==(g=v(f,e,d,g.value,u))&&(t&&null!==g.alternate&&f.delete(null===g.key?d:g.key),a=s(g,a,d),null===p?c=g:p.sibling=g,p=g);return t&&f.forEach(function(t){return n(e,t)}),c}return function(e,t,i,s){var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case Wo:e:{var c=i.key;for(u=t;null!==u;){if(u.key===c){if(u.type===i.type){o(e,u.sibling),t=a(u,s),t.ref=re(u,i),t.pendingProps=i.props,t.return=e,e=t;break e}o(e,u);break}n(e,u),u=u.sibling}s=ko(i,e.internalContextTag,s),s.ref=re(t,i),s.return=e,e=s}return l(e);case xo:e:{for(u=i.key;null!==t;){if(t.key===u){if(t.tag===jo){o(e,t.sibling),t=a(t,s),t.pendingProps=i,t.return=e,e=t;break e}o(e,t);break}n(e,t),t=t.sibling}i=Eo(i,e.internalContextTag,s),i.return=e,e=i}return l(e);case wo:e:{if(null!==t){if(t.tag===Do){o(e,t.sibling),t=a(t,s),t.type=i.value,t.return=e,e=t;break e}o(e,t)}t=Oo(i,e.internalContextTag,s),t.type=i.value,t.return=e,e=t}return l(e);case Co:e:{for(u=i.key;null!==t;){if(t.key===u){if(t.tag===No&&t.stateNode.containerInfo===i.containerInfo&&t.stateNode.implementation===i.implementation){o(e,t.sibling),t=a(t,s),t.pendingProps=i.children||[],t.return=e,e=t;break e}o(e,t);break}n(e,t),t=t.sibling}i=To(i,e.internalContextTag,s),i.return=e,e=i}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==t&&t.tag===Ro?(o(e,t.sibling),t=a(t,s),t.pendingProps=i,t.return=e,e=t):(o(e,t),i=_o(i,e.internalContextTag,s),i.return=e,e=i),l(e);if(Ao(i))return g(e,t,i,s);if(ne(i))return b(e,t,i,s);if(u&&oe(e,i),void 0===i)switch(e.tag){case Mo:case Io:i=e.type,r("152",i.displayName||i.name||"Component")}return o(e,t)}}function ae(e,t,n,o){function i(e,t){t.updater=a,e.stateNode=t,Xt.set(t,e)}var a={isMounted:oi,enqueueSetState:function(n,r,o){n=Xt.get(n);var i=t(n,!1);Zo(n,r,void 0===o?null:o,i),e(n,i)},enqueueReplaceState:function(n,r,o){n=Xt.get(n);var i=t(n,!1);ei(n,r,void 0===o?null:o,i),e(n,i)},enqueueForceUpdate:function(n,r){n=Xt.get(n);var o=t(n,!1);ti(n,void 0===r?null:r,o),e(n,o)}};return{adoptClassInstance:i,constructClassInstance:function(e,t){var n=e.type,r=Qo(e),o=Jo(e),a=o?Go(e,r):xt;return t=new n(t,a),i(e,t),o&&Yo(e,r,a),t},mountClassInstance:function(e,t){var n=e.alternate,o=e.stateNode,i=o.state||null,s=e.pendingProps;s||r("158");var l=Qo(e);o.props=s,o.state=i,o.refs=xt,o.context=Go(e,l),Er.enableAsyncSubtreeAPI&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=Xo),"function"==typeof o.componentWillMount&&(l=o.state,o.componentWillMount(),l!==o.state&&a.enqueueReplaceState(o,o.state,null),null!==(l=e.updateQueue)&&(o.state=ni(n,e,l,o,i,s,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=qo)},updateClassInstance:function(e,t,i){var s=t.stateNode;s.props=t.memoizedProps,s.state=t.memoizedState;var l=t.memoizedProps,u=t.pendingProps;u||null==(u=l)&&r("159");var c=s.context,p=Qo(t);if(p=Go(t,p),"function"!=typeof s.componentWillReceiveProps||l===u&&c===p||(c=s.state,s.componentWillReceiveProps(u,p),s.state!==c&&a.enqueueReplaceState(s,s.state,null)),c=t.memoizedState,i=null!==t.updateQueue?ni(e,t,t.updateQueue,s,c,u,i):c,!(l!==u||c!==i||ri()||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return"function"!=typeof s.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=qo),!1;var f=u;if(null===l||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)f=!0;else{var d=t.stateNode,h=t.type;f="function"==typeof d.shouldComponentUpdate?d.shouldComponentUpdate(f,i,p):!h.prototype||!h.prototype.isPureReactComponent||(!wt(l,f)||!wt(c,i))}return f?("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(u,i,p),"function"==typeof s.componentDidUpdate&&(t.effectTag|=qo)):("function"!=typeof s.componentDidUpdate||l===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=qo),n(t,u),o(t,i)),s.props=u,s.state=i,s.context=p,f}}}function se(e,t,n,o,i){function a(e,t,n){s(e,t,n,t.pendingWorkPriority)}function s(e,t,n,r){t.child=null===e?ii(t,t.child,n,r):e.child===t.child?ai(t,t.child,n,r):si(t,t.child,n,r)}function l(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=Ri)}function u(e,t,n,r){if(l(e,t),!n)return r&&yi(t,!1),p(e,t);n=t.stateNode,Ni.current=t;var o=n.render();return t.effectTag|=Ti,a(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&yi(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?hi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hi(e,t.context,!1),v(e,t.containerInfo)}function p(e,t){return li(e,t),t.child}function f(e,t){switch(t.tag){case bi:c(t);break;case gi:di(t);break;case Ci:v(t,t.stateNode.containerInfo)}return null}var d=e.shouldSetTextContent,h=e.useSyncScheduling,y=e.shouldDeprioritizeSubtree,m=t.pushHostContext,v=t.pushHostContainer,g=n.enterHydrationState,b=n.resetHydrationState,x=n.tryToClaimNextHydratableInstance;e=ae(o,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var w=e.adoptClassInstance,C=e.constructClassInstance,S=e.mountClassInstance,k=e.updateClassInstance;return{beginWork:function(e,t,n){if(t.pendingWorkPriority===Ei||t.pendingWorkPriority>n)return f(e,t);switch(t.tag){case mi:null!==e&&r("155");var o=t.type,i=t.pendingProps,s=pi(t);return s=ci(t,s),o=o(i,s),t.effectTag|=Ti,"object"==typeof o&&null!==o&&"function"==typeof o.render?(t.tag=gi,i=di(t),w(t,o),S(t,n),t=u(e,t,!0,i)):(t.tag=vi,a(e,t,o),t.memoizedProps=i,t=t.child),t;case vi:e:{if(i=t.type,n=t.pendingProps,o=t.memoizedProps,fi())null===n&&(n=o);else if(null===n||o===n){t=p(e,t);break e}o=pi(t),o=ci(t,o),i=i(n,o),t.effectTag|=Ti,a(e,t,i),t.memoizedProps=n,t=t.child}return t;case gi:return i=di(t),o=void 0,null===e?t.stateNode?r("153"):(C(t,t.pendingProps),S(t,n),o=!0):o=k(e,t,n),u(e,t,o,i);case bi:return c(t),o=t.updateQueue,null!==o?(i=t.memoizedState,o=ui(e,t,o,null,i,null,n),i===o?(b(),t=p(e,t)):(i=o.element,null!==e&&null!==e.child||!g(t)?(b(),a(e,t,i)):(t.effectTag|=Ai,t.child=ii(t,t.child,i,n)),t.memoizedState=o,t=t.child)):(b(),t=p(e,t)),t;case xi:m(t),null===e&&x(t),i=t.type;var P=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=P)&&r("154"),s=null!==e?e.memoizedProps:null,fi()||null!==o&&P!==o?(P=o.children,d(i,o)?P=null:s&&d(i,s)&&(t.effectTag|=Ii),l(e,t),n!==Oi&&!h&&y(i,o)?(t.pendingWorkPriority=Oi,t=null):(a(e,t,P),t.memoizedProps=o,t=t.child)):t=p(e,t),t;case wi:return null===e&&x(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case ki:t.tag=Si;case Si:return n=t.pendingProps,fi()?null===n&&null===(n=e&&e.memoizedProps)&&r("154"):null!==n&&t.memoizedProps!==n||(n=t.memoizedProps),i=n.children,o=t.pendingWorkPriority,t.stateNode=null===e?ii(t,t.stateNode,i,o):e.child===t.child?ai(t,t.stateNode,i,o):si(t,t.stateNode,i,o),t.memoizedProps=n,t.stateNode;case Pi:return null;case Ci:e:{if(v(t,t.stateNode.containerInfo),n=t.pendingWorkPriority,i=t.pendingProps,fi())null===i&&null==(i=e&&e.memoizedProps)&&r("154");else if(null===i||t.memoizedProps===i){t=p(e,t);break e}null===e?t.child=si(t,t.child,i,n):a(e,t,i),t.memoizedProps=i,t=t.child}return t;case _i:e:{if(n=t.pendingProps,fi())null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=p(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case gi:di(t);break;case bi:c(t);break;default:r("157")}return t.effectTag|=Mi,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),t.pendingWorkPriority===Ei||t.pendingWorkPriority>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,s(e,t,null,n),t.tag===gi&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function le(e,t,n){var o=e.createInstance,i=e.createTextInstance,a=e.appendInitialChild,s=e.finalizeInitialChildren,l=e.prepareUpdate,u=t.getRootHostContainer,c=t.popHostContext,p=t.getHostContext,f=t.popHostContainer,d=n.prepareToHydrateHostInstance,h=n.prepareToHydrateHostTextInstance,y=n.popHydrationState;return{completeWork:function(e,t,n){var m=t.pendingProps;switch(null===m?m=t.memoizedProps:t.pendingWorkPriority===Ji&&n!==Ji||(t.pendingProps=null),t.tag){case Fi:return null;case Ui:return Di(t),null;case Vi:return f(t),Bi(t),m=t.stateNode,m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),null!==e&&null!==e.child||(y(t),t.effectTag&=~Yi),null;case Wi:c(t),n=u();var v=t.type;if(null!==e&&null!=t.stateNode){var g=e.memoizedProps,b=t.stateNode,x=p();m=l(b,v,g,m,n,x),(t.updateQueue=m)&&(t.effectTag|=Qi),e.ref!==t.ref&&(t.effectTag|=Gi)}else{if(!m)return null===t.stateNode&&r("166"),null;if(e=p(),y(t))d(t,n,e)&&(t.effectTag|=Qi);else{e=o(v,m,n,e,t);e:for(g=t.child;null!==g;){if(g.tag===Wi||g.tag===Hi)a(e,g.stateNode);else if(g.tag!==zi&&null!==g.child){g=g.child;continue}if(g===t)break e;for(;null===g.sibling;){if(null===g.return||g.return===t)break e;g=g.return}g=g.sibling}s(e,v,m,n)&&(t.effectTag|=Qi),t.stateNode=e}null!==t.ref&&(t.effectTag|=Gi)}return null;case Hi:if(e&&null!=t.stateNode)e.memoizedProps!==m&&(t.effectTag|=Qi);else{if("string"!=typeof m)return null===t.stateNode&&r("166"),null;e=u(),n=p(),y(t)?h(t)&&(t.effectTag|=Qi):t.stateNode=i(m,e,n,t)}return null;case $i:(m=t.memoizedProps)||r("165"),t.tag=Ki,n=[];e:for((v=t.stateNode)&&(v.return=t);null!==v;){if(v.tag===Wi||v.tag===Hi||v.tag===zi)r("164");else if(v.tag===qi)n.push(v.type);else if(null!==v.child){v.child.return=v,v=v.child;continue}for(;null===v.sibling;){if(null===v.return||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}return v=m.handler,m=v(m.props,n),t.child=ji(t,null!==e?e.child:null,m,t.pendingWorkPriority),t.child;case Ki:return t.tag=$i,null;case qi:case Xi:return null;case zi:return t.effectTag|=Qi,f(t),null;case Li:r("167");default:r("156")}}}}function ue(e){return function(t){try{return e(t)}catch(e){}}}function ce(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){return e.tag===oa||e.tag===ra||e.tag===aa}function i(e){for(var t=e;;)if(s(t),null!==t.child&&t.tag!==aa)t.child.return=t,t=t.child;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}}function a(e){for(var t=e,n=!1,o=void 0,a=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case oa:o=n.stateNode,a=!1;break e;case ra:case aa:o=n.stateNode.containerInfo,a=!0;break e}n=n.return}n=!0}if(t.tag===oa||t.tag===ia)i(t),a?v(o,t.stateNode):m(o,t.stateNode);else if(t.tag===aa?o=t.stateNode.containerInfo:s(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,t.tag===aa&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function s(e){switch("function"==typeof ua&&ua(e),e.tag){case na:n(e);var r=e.stateNode;if("function"==typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case oa:n(e);break;case sa:i(e.stateNode);break;case aa:a(e)}}var l=e.commitMount,u=e.commitUpdate,c=e.resetTextContent,p=e.commitTextUpdate,f=e.appendChild,d=e.appendChildToContainer,h=e.insertBefore,y=e.insertInContainerBefore,m=e.removeChild,v=e.removeChildFromContainer,g=e.getPublicInstance;return{commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(o(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var i=t=void 0;switch(n.tag){case oa:t=n.stateNode,i=!1;break;case ra:case aa:t=n.stateNode.containerInfo,i=!0;break;default:r("161")}n.effectTag&da&&(c(t),n.effectTag&=~da);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||o(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==oa&&n.tag!==ia;){if(n.effectTag&ca)continue t;if(null===n.child||n.tag===aa)continue t;n.child.return=n,n=n.child}if(!(n.effectTag&ca)){n=n.stateNode;break e}}for(var a=e;;){if(a.tag===oa||a.tag===ia)n?i?y(t,a.stateNode,n):h(t,a.stateNode,n):i?d(t,a.stateNode):f(t,a.stateNode);else if(a.tag!==aa&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},commitDeletion:function(e){a(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case na:break;case oa:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&u(n,a,i,e,o,t)}break;case ia:null===t.stateNode&&r("162"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case ra:case aa:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case na:var n=t.stateNode;if(t.effectTag&pa)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t.effectTag&fa&&null!==t.updateQueue&&la(t,t.updateQueue,n);break;case ra:e=t.updateQueue,null!==e&&la(t,e,t.child&&t.child.stateNode);break;case oa:n=t.stateNode,null===e&&t.effectTag&pa&&l(n,t.type,t.memoizedProps,t);break;case ia:case aa:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case oa:t(g(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function pe(e){function t(e){return e===va&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,i=ha(va),a=ha(va),s=ha(va);return{getHostContext:function(){return t(i.current)},getRootHostContainer:function(){return t(s.current)},popHostContainer:function(e){ya(i,e),ya(a,e),ya(s,e)},popHostContext:function(e){a.current===e&&(ya(i,e),ya(a,e))},pushHostContainer:function(e,t){ma(s,t,e),t=o(t),ma(a,e,e),ma(i,t,e)},pushHostContext:function(e){var r=t(s.current),o=t(i.current);r=n(o,e.type,r),o!==r&&(ma(a,e,e),ma(i,r,e))},resetHostContainer:function(){i.current=va,s.current=va}}}function fe(e){function t(e,t){var n=Sa();n.stateNode=t,n.return=e,n.effectTag=wa,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case ga:return a(t,e.type,e.pendingProps);case ba:return s(t,e.pendingProps);default:return!1}}function o(e){for(e=e.return;null!==e&&e.tag!==ga&&e.tag!==xa;)e=e.return;h=e}var i=e.shouldSetTextContent,a=e.canHydrateInstance,s=e.canHydrateTextInstance,l=e.getNextHydratableSibling,u=e.getFirstHydratableChild,c=e.hydrateInstance,p=e.hydrateTextInstance,f=e.didNotHydrateInstance,d=e.didNotFindHydratableInstance;if(e=e.didNotFindHydratableTextInstance,!(a&&s&&l&&u&&c&&p&&f&&d&&e))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var h=null,y=null,m=!1;return{enterHydrationState:function(e){return y=u(e.stateNode.containerInfo),h=e,m=!0},resetHydrationState:function(){y=h=null,m=!1},tryToClaimNextHydratableInstance:function(e){if(m){var r=y;if(r){if(!n(e,r)){if(!(r=l(r))||!n(e,r))return e.effectTag|=Ca,m=!1,void(h=e);t(h,y)}e.stateNode=r,h=e,y=u(r)}else e.effectTag|=Ca,m=!1,h=e}},prepareToHydrateHostInstance:function(e,t,n){return t=c(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return p(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==h)return!1;if(!m)return o(e),m=!0,!1;var n=e.type;if(e.tag!==ga||"head"!==n&&"body"!==n&&!i(n,e.memoizedProps))for(n=y;n;)t(e,n),n=l(n);return o(e),y=h?l(e.stateNode):null,!0}}}function de(e){function t(){for(;null!==K&&K.current.pendingWorkPriority===Aa;){K.isScheduled=!1;var e=K.nextScheduledRoot;if(K.nextScheduledRoot=null,K===q)return q=K=null,H=Aa,null;K=e}e=K;for(var t=null,n=Aa;null!==e;)e.current.pendingWorkPriority!==Aa&&(n===Aa||n>e.current.pendingWorkPriority)&&(n=e.current.pendingWorkPriority,t=e),e=e.nextScheduledRoot;null!==t?(H=n,Pa(),Qa(),C(),W=Ea(t.current,n),t!==oe&&(re=0,oe=t)):(H=Aa,oe=W=null)}function n(n){ee=!0,$=null;var o=n.stateNode;if(o.current===n&&r("177"),H!==Ia&&H!==Ma||re++,_a.current=null,n.effectTag>Ba)if(null!==n.lastEffect){n.lastEffect.nextEffect=n;var i=n.firstEffect}else i=n;else i=n.firstEffect;for(j(),z=i;null!==z;){var a=!1,s=void 0;try{for(;null!==z;){var l=z.effectTag;if(l&Wa&&e.resetTextContent(z.stateNode),l&$a){var u=z.alternate;null!==u&&M(u)}switch(l&~(Ha|za|Wa|$a|Ba)){case La:E(z),z.effectTag&=~La;break;case Ua:E(z),z.effectTag&=~La,T(z.alternate,z);break;case Fa:T(z.alternate,z);break;case Va:te=!0,O(z),te=!1}z=z.nextEffect}}catch(e){a=!0,s=e}a&&(null===z&&r("178"),p(z,s),null!==z&&(z=z.nextEffect))}for(D(),o.current=n,z=i;null!==z;){o=!1,i=void 0;try{for(;null!==z;){var c=z.effectTag;if(c&(Fa|Ha)&&A(z.alternate,z),c&$a&&I(z),c&za)switch(a=z,s=void 0,null!==Y&&(s=Y.get(a),Y.delete(a),null==s&&null!==a.alternate&&(a=a.alternate,s=Y.get(a),Y.delete(a))),null==s&&r("184"),a.tag){case Ya:a.stateNode.componentDidCatch(s.error,{componentStack:s.componentStack});break;case Ka:null===J&&(J=s.error);break;default:r("157")}var f=z.nextEffect;z.nextEffect=null,z=f}}catch(e){o=!0,i=e}o&&(null===z&&r("178"),p(z,i),null!==z&&(z=z.nextEffect))}ee=!1,"function"==typeof Ta&&Ta(n.stateNode),Q&&(Q.forEach(v),Q=null),t()}function o(e){for(;;){var t=_(e.alternate,e,H),n=e.return,r=e.sibling,o=e;if(!(o.pendingWorkPriority!==Aa&&o.pendingWorkPriority>H)){for(var i=Ga(o),a=o.child;null!==a;)i=Oa(i,a.pendingWorkPriority),a=a.sibling;o.pendingWorkPriority=i}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),e.effectTag>Ba&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){$=e;break}e=n}return null}function i(e){var t=k(e.alternate,e,H);return null===t&&(t=o(e)),_a.current=null,t}function a(e){var t=P(e.alternate,e,H);return null===t&&(t=o(e)),_a.current=null,t}function s(e){c(ja,e)}function l(){if(null!==Y&&0<Y.size&&H===Ma)for(;null!==W;){var e=W;if(null===(W=null!==Y&&(Y.has(e)||null!==e.alternate&&Y.has(e.alternate))?a(W):i(W))&&(null===$&&r("179"),B=Ma,n($),B=H,null===Y||0===Y.size||H!==Ma))break}}function u(e,o){if(null!==$?(B=Ma,n($),l()):null===W&&t(),!(H===Aa||H>e)){B=H;e:for(;;){if(H<=Ma)for(;null!==W&&!(null===(W=i(W))&&(null===$&&r("179"),B=Ma,n($),B=H,l(),H===Aa||H>e||H>Ma)););else if(null!==o)for(;null!==W&&!F;)if(1<o.timeRemaining()){if(null===(W=i(W)))if(null===$&&r("179"),1<o.timeRemaining()){if(B=Ma,n($),B=H,l(),H===Aa||H>e||H<Ra)break}else F=!0}else F=!0;switch(H){case Ia:case Ma:if(H<=e)continue e;break e;case Ra:case Na:case ja:if(null===o)break e;if(!F&&H<=e)continue e;break e;case Aa:break e;default:r("181")}}}}function c(e,t){L&&r("182"),L=!0;var n=B,o=!1,i=null;try{u(e,t)}catch(e){o=!0,i=e}for(;o;){if(Z){J=i;break}var l=W;if(null===l)Z=!0;else{var c=p(l,i);if(null===c&&r("183"),!Z){try{o=c,i=e,c=t;for(var f=o;null!==l;){switch(l.tag){case Ya:ka(l);break;case qa:w(l);break;case Ka:x(l);break;case Xa:x(l)}if(l===f||l.alternate===f)break;l=l.return}W=a(o),u(i,c)}catch(e){o=!0,i=e;continue}break}}}if(B=n,null!==t&&(X=!1),H>Ma&&!X&&(R(s),X=!0),e=J,Z=F=L=!1,oe=G=Y=J=null,re=0,null!==e)throw e}function p(e,t){var n=_a.current=null,r=!1,o=!1,i=null;if(e.tag===Ka)n=e,d(e)&&(Z=!0);else for(var a=e.return;null!==a&&null===n;){if(a.tag===Ya?"function"==typeof a.stateNode.componentDidCatch&&(r=!0,i=f(a),n=a,o=!0):a.tag===Ka&&(n=a),d(a)){if(te||null!==Q&&(Q.has(a)||null!==a.alternate&&Q.has(a.alternate)))return null;n=null,o=!1}a=a.return}if(null!==n){null===G&&(G=new Set),G.add(n);var s="";a=e;do{e:switch(a.tag){case fo:case ho:case yo:case mo:var l=a._debugOwner,u=a._debugSource,c=f(a),p=null;l&&(p=f(l)),l=u,c="\n    in "+(c||"Unknown")+(l?" (at "+l.fileName.replace(/^.*[\\\/]/,"")+":"+l.lineNumber+")":p?" (created by "+p+")":"");break e;default:c=""}s+=c,a=a.return}while(a);a=s,e=f(e),null===Y&&(Y=new Map),t={componentName:e,componentStack:a,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:i,willRetry:o},Y.set(n,t);try{console.error(t.error)}catch(e){console.error(e)}return ee?(null===Q&&(Q=new Set),Q.add(n)):v(n),n}return null===J&&(J=t),null}function d(e){return null!==G&&(G.has(e)||null!==e.alternate&&G.has(e.alternate))}function h(e,t){return y(e,t,!1)}function y(e,t){re>ne&&(Z=!0,r("185")),!L&&t<=H&&(W=null);for(var n=!0;null!==e&&n;){if(n=!1,(e.pendingWorkPriority===Aa||e.pendingWorkPriority>t)&&(n=!0,e.pendingWorkPriority=t),null!==e.alternate&&(e.alternate.pendingWorkPriority===Aa||e.alternate.pendingWorkPriority>t)&&(n=!0,e.alternate.pendingWorkPriority=t),null===e.return){if(e.tag!==Ka)break;var o=e.stateNode;if(t===Aa||o.isScheduled||(o.isScheduled=!0,q?q.nextScheduledRoot=o:K=o,q=o),!L)switch(t){case Ia:V?c(Ia,null):c(Ma,null);break;case Ma:U||r("186");break;default:X||(R(s),X=!0)}}e=e.return}}function m(e,t){var n=B;return n===Aa&&(n=!N||e.internalContextTag&Da||t?Na:Ia),n===Ia&&(L||U)?Ma:n}function v(e){y(e,Ma,!0)}var g=pe(e),b=fe(e),x=g.popHostContainer,w=g.popHostContext,C=g.resetHostContainer,S=se(e,g,b,h,m),k=S.beginWork,P=S.beginFailedWork,_=le(e,g,b).completeWork;g=ce(e,p);var E=g.commitPlacement,O=g.commitDeletion,T=g.commitWork,A=g.commitLifeCycles,I=g.commitAttachRef,M=g.commitDetachRef,R=e.scheduleDeferredCallback,N=e.useSyncScheduling,j=e.prepareForCommit,D=e.resetAfterCommit,B=Aa,L=!1,F=!1,U=!1,V=!1,W=null,H=Aa,z=null,$=null,K=null,q=null,X=!1,Y=null,G=null,Q=null,J=null,Z=!1,ee=!1,te=!1,ne=1e3,re=0,oe=null;return{scheduleUpdate:h,getPriorityContext:m,batchedUpdates:function(e,t){var n=U;U=!0;try{return e(t)}finally{U=n,L||U||c(Ma,null)}},unbatchedUpdates:function(e){var t=V,n=U;V=U,U=!1;try{return e()}finally{U=n,V=t}},flushSync:function(e){var t=U,n=B;U=!0,B=Ia;try{return e()}finally{U=t,B=n,L&&r("187"),c(Ma,null)}},deferredUpdates:function(e){var t=B;B=Na;try{return e()}finally{B=t}}}}function he(){r("196")}function ye(e){return e?(e=Xt.get(e),"number"==typeof e.tag?he(e):e._processChildContext(e._context)):xt}function me(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ve(e,t){var n=me(e);e=0;for(var r;n;){if(n.nodeType===is){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=me(n)}}function ge(){return!as&&mt.canUseDOM&&(as="textContent"in document.documentElement?"textContent":"innerText"),as}function be(){r("211")}function xe(){r("212")}function we(e){if(null==e)return null;if(e.nodeType===ps)return e;var t=Xt.get(e);if(t)return"number"==typeof t.tag?be(t):xe(t);"function"==typeof e.render?r("188"):r("213",Object.keys(e))}function Ce(e){if(void 0!==e._hostParent)return e._hostParent;if("number"==typeof e.tag){do{e=e.return}while(e&&e.tag!==fs);if(e)return e}return null}function Se(e,t){for(var n=0,r=e;r;r=Ce(r))n++;r=0;for(var o=t;o;o=Ce(o))r++;for(;0<n-r;)e=Ce(e),n--;for(;0<r-n;)t=Ce(t),r--;for(;n--;){if(e===t||e===t.alternate)return e;e=Ce(e),t=Ce(t)}return null}function ke(e,t,n){(t=hs(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=P(n._dispatchListeners,t),n._dispatchInstances=P(n._dispatchInstances,e))}function Pe(e){e&&e.dispatchConfig.phasedRegistrationNames&&ds.traverseTwoPhase(e._targetInst,ke,e)}function _e(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?ds.getParentInstance(t):null,ds.traverseTwoPhase(t,ke,e)}}function Ee(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=hs(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=P(n._dispatchListeners,t),n._dispatchInstances=P(n._dispatchInstances,e))}function Oe(e){e&&e.dispatchConfig.registrationName&&Ee(e._targetInst,null,e)}function Te(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var o in e)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?bt.thatReturnsTrue:bt.thatReturnsFalse,this.isPropagationStopped=bt.thatReturnsFalse,this}function Ae(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Ie(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Me(e){e.eventPool=[],e.getPooled=Ae,e.release=Ie}function Re(e,t,n,r){return Te.call(this,e,t,n,r)}function Ne(e,t,n,r){return Te.call(this,e,t,n,r)}function je(e,t){switch(e){case"topKeyUp":return-1!==ws.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function De(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function Be(e,t){switch(e){case"topCompositionEnd":return De(t);case"topKeyPress":return 32!==t.which?null:(As=!0,Os);case"topTextInput":return e=t.data,e===Os&&As?null:e;default:return null}}function Le(e,t){if(Is)return"topCompositionEnd"===e||!Cs&&je(e,t)?(e=gs.getData(),gs.reset(),Is=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return Es?null:t.data;default:return null}}function Fe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rs[e.type]:"textarea"===t}function Ue(e,t,n){return e=Te.getPooled(Ns.change,e,t,n),e.type="change",fn.enqueueStateRestore(n),ys.accumulateTwoPhaseDispatches(e),e}function Ve(e){wn.enqueueEvents(e),wn.processEventQueue(!1)}function We(e){var t=qt.getNodeFromInstance(e);if(Zn.updateValueIfChanged(t))return e}function He(e,t){if("topChange"===e)return t}function ze(){js&&(js.detachEvent("onpropertychange",$e),Ds=js=null)}function $e(e){"value"===e.propertyName&&We(Ds)&&(e=Ue(Ds,e,S(e)),hn.batchedUpdates(Ve,e))}function Ke(e,t,n){"topFocus"===e?(ze(),js=t,Ds=n,js.attachEvent("onpropertychange",$e)):"topBlur"===e&&ze()}function qe(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return We(Ds)}function Xe(e,t){if("topClick"===e)return We(t)}function Ye(e,t){if("topInput"===e||"topChange"===e)return We(t)}function Ge(e,t,n,r){return Te.call(this,e,t,n,r)}function Qe(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Fs[e])&&!!t[e]}function Je(){return Qe}function Ze(e,t,n,r){return Te.call(this,e,t,n,r)}function et(e,t){if(Xs||null==$s||$s!==kt())return null;var n=$s;return"selectionStart"in n&&cs.hasSelectionCapabilities(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,qs&&wt(qs,n)?null:(qs=n,e=Te.getPooled(zs.select,Ks,e,t),e.type="select",e.target=$s,ys.accumulateTwoPhaseDispatches(e),e)}function tt(e,t,n,r){return Te.call(this,e,t,n,r)}function nt(e,t,n,r){return Te.call(this,e,t,n,r)}function rt(e,t,n,r){return Te.call(this,e,t,n,r)}function ot(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function it(e,t,n,r){return Te.call(this,e,t,n,r)}function at(e,t,n,r){return Te.call(this,e,t,n,r)}function st(e,t,n,r){return Te.call(this,e,t,n,r)}function lt(e,t,n,r){return Te.call(this,e,t,n,r)}function ut(e,t,n,r){return Te.call(this,e,t,n,r)}function ct(e){return e[1].toUpperCase()}function pt(e){return!(!e||e.nodeType!==dl&&e.nodeType!==ml&&e.nodeType!==vl&&(e.nodeType!==yl||" react-mount-point-unstable "!==e.nodeValue))}function ft(e){return!(!(e=e?e.nodeType===ml?e.documentElement:e.firstChild:null)||e.nodeType!==dl||!e.hasAttribute(gl))}function dt(e,t,n,o,i){pt(n)||r("200");var a=n._reactRootContainer;if(a)jl.updateContainer(t,a,e,i);else{if(!o&&!ft(n))for(o=void 0;o=n.lastChild;)n.removeChild(o);var s=jl.createContainer(n);a=n._reactRootContainer=s,jl.unbatchedUpdates(function(){jl.updateContainer(t,s,e,i)})}return jl.getPublicRootInstance(a)}function ht(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return pt(t)||r("200"),bo.createPortal(e,t,null,n)}var yt=n(0);n(5);var mt=n(17),vt=n(8),gt=n(18),bt=n(4),xt=n(9),wt=n(19),Ct=n(20),St=n(23),kt=n(24);yt||r("227");var Pt,_t,Et={Namespaces:{html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},getIntrinsicNamespace:o,getChildNamespace:function(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?o(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}},Ot=null,Tt={},At={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){Ot&&r("101"),Ot=Array.prototype.slice.call(e),i()},injectEventPluginsByName:function(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];Tt.hasOwnProperty(t)&&Tt[t]===o||(Tt[t]&&r("102",t),Tt[t]=o,n=!0)}n&&i()}},It=At,Mt={children:!0,dangerouslySetInnerHTML:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,style:!0},Rt={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=Rt,n=e.Properties||{},o=e.DOMAttributeNamespaces||{},i=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var a in n){Nt.properties.hasOwnProperty(a)&&r("48",a);var l=a.toLowerCase(),u=n[a];l={attributeName:l,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:s(u,t.MUST_USE_PROPERTY),hasBooleanValue:s(u,t.HAS_BOOLEAN_VALUE),hasNumericValue:s(u,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:s(u,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:s(u,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:s(u,t.HAS_STRING_BOOLEAN_VALUE)},1>=l.hasBooleanValue+l.hasNumericValue+l.hasOverloadedBooleanValue||r("50",a),i.hasOwnProperty(a)&&(l.attributeName=i[a]),o.hasOwnProperty(a)&&(l.attributeNamespace=o[a]),e.hasOwnProperty(a)&&(l.mutationMethod=e[a]),Nt.properties[a]=l}}},Nt={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ATTRIBUTE_NAME_CHAR:":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},shouldSetAttribute:function(e,t){if(Nt.isReservedProp(e)||!("o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1]))return!1;if(null===t)return!0;switch(typeof t){case"boolean":return Nt.shouldAttributeAcceptBooleanValue(e);case"undefined":case"number":case"string":case"object":return!0;default:return!1}},getPropertyInfo:function(e){return Nt.properties.hasOwnProperty(e)?Nt.properties[e]:null},shouldAttributeAcceptBooleanValue:function(e){if(Nt.isReservedProp(e))return!0;var t=Nt.getPropertyInfo(e);return t?t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:"data-"===(e=e.toLowerCase().slice(0,5))||"aria-"===e},isReservedProp:function(e){return Mt.hasOwnProperty(e)},injection:Rt},jt=Nt,Dt={IndeterminateComponent:0,FunctionalComponent:1,ClassComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,CoroutineComponent:7,CoroutineHandlerPhase:8,YieldComponent:9,Fragment:10},Bt={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_FRAGMENT_NODE:11},Lt=Dt.HostComponent,Ft=Dt.HostText,Ut=Bt.ELEMENT_NODE,Vt=Bt.COMMENT_NODE,Wt=jt.ID_ATTRIBUTE_NAME,Ht={hasCachedChildNodes:1},zt=Math.random().toString(36).slice(2),$t="__reactInternalInstance$"+zt,Kt="__reactEventHandlers$"+zt,qt={getClosestInstanceFromNode:p,getInstanceFromNode:function(e){var t=e[$t];return t?t.tag===Lt||t.tag===Ft?t:t._hostNode===e?t:null:(t=p(e),null!=t&&t._hostNode===e?t:null)},getNodeFromInstance:function(e){if(e.tag===Lt||e.tag===Ft)return e.stateNode;if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())c(e,e._hostNode);return e._hostNode},precacheChildNodes:c,precacheNode:u,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[$t],e._hostNode=null)},precacheFiberNode:function(e,t){t[$t]=e},getFiberCurrentPropsFromNode:function(e){return e[Kt]||null},updateFiberProps:function(e,t){e[Kt]=t}},Xt={remove:function(e){e._reactInternalFiber=void 0},get:function(e){return e._reactInternalFiber},has:function(e){return void 0!==e._reactInternalFiber},set:function(e,t){e._reactInternalFiber=t}},Yt={ReactCurrentOwner:yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},Gt={NoEffect:0,PerformedWork:1,Placement:2,Update:4,PlacementAndUpdate:6,Deletion:8,ContentReset:16,Callback:32,Err:64,Ref:128},Qt=Dt.HostComponent,Jt=Dt.HostRoot,Zt=Dt.HostPortal,en=Dt.HostText,tn=Gt.NoEffect,nn=Gt.Placement,rn={isFiberMounted:function(e){return 2===d(e)},isMounted:function(e){return!!(e=Xt.get(e))&&2===d(e)},findCurrentFiberUsingSlowPath:y,findCurrentHostFiber:function(e){if(!(e=y(e)))return null;for(var t=e;;){if(t.tag===Qt||t.tag===en)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null},findCurrentHostFiberWithNoPortals:function(e){if(!(e=y(e)))return null;for(var t=e;;){if(t.tag===Qt||t.tag===en)return t;if(t.child&&t.tag!==Zt)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}},on={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!=typeof e.invokeGuardedCallback&&r("197"),m=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,a,s,l){m.apply(on,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,l){if(on.invokeGuardedCallback.apply(this,arguments),on.hasCaughtError()){var u=on.clearCaughtError();on._hasRethrowError||(on._hasRethrowError=!0,on._rethrowError=u)}},rethrowCaughtError:function(){return v.apply(on,arguments)},hasCaughtError:function(){return on._hasCaughtError},clearCaughtError:function(){if(on._hasCaughtError){var e=on._caughtError;return on._caughtError=null,on._hasCaughtError=!1,e}r("198")}},an=on,sn={isEndish:function(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e},isMoveish:function(e){return"topMouseMove"===e||"topTouchMove"===e},isStartish:function(e){return"topMouseDown"===e||"topTouchStart"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;return Array.isArray(t)&&r("103"),e.currentTarget=t?sn.getNodeFromInstance(n):null,t=t?t(e):null,e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,t},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)g(e,t,n[o],r[o]);else n&&g(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(e){e:{var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r])){t=n[r];break e}}else if(t&&t(e,n)){t=n;break e}t=null}return e._dispatchInstances=null,e._dispatchListeners=null,t},hasDispatches:function(e){return!!e._dispatchListeners},getFiberCurrentPropsFromNode:function(e){return Pt.getFiberCurrentPropsFromNode(e)},getInstanceFromNode:function(e){return Pt.getInstanceFromNode(e)},getNodeFromInstance:function(e){return Pt.getNodeFromInstance(e)},injection:{injectComponentTree:function(e){Pt=e}}},ln=sn,un=null,cn=null,pn=null,fn={injection:{injectFiberControlledHostComponent:function(e){un=e}},enqueueStateRestore:function(e){cn?pn?pn.push(e):pn=[e]:cn=e},restoreStateIfNeeded:function(){if(cn){var e=cn,t=pn;if(pn=cn=null,b(e),t)for(e=0;e<t.length;e++)b(t[e])}}},dn=!1,hn={batchedUpdates:function(e,t){if(dn)return x(C,e,t);dn=!0;try{return x(C,e,t)}finally{dn=!1,fn.restoreStateIfNeeded()}},injection:{injectStackBatchedUpdates:function(e){x=e},injectFiberBatchedUpdates:function(e){w=e}}},yn=Bt.TEXT_NODE,mn=Dt.HostRoot,vn=[],gn={_enabled:!0,_handleTopLevel:null,setHandleTopLevel:function(e){gn._handleTopLevel=e},setEnabled:function(e){gn._enabled=!!e},isEnabled:function(){return gn._enabled},trapBubbledEvent:function(e,t,n){return n?gt.listen(n,t,gn.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?gt.capture(n,t,gn.dispatchEvent.bind(null,e)):null},dispatchEvent:function(e,t){if(gn._enabled){var n=S(t);if(n=qt.getClosestInstanceFromNode(n),null===n||"number"!=typeof n.tag||rn.isFiberMounted(n)||(n=null),vn.length){var r=vn.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{hn.batchedUpdates(k,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>vn.length&&vn.push(e)}}}},bn=gn,xn=null,wn={injection:{injectEventPluginOrder:It.injectEventPluginOrder,injectEventPluginsByName:It.injectEventPluginsByName},getListener:function(e,t){if("number"==typeof e.tag){var n=e.stateNode;if(!n)return null;var o=ln.getFiberCurrentPropsFromNode(n);if(!o)return null;if(n=o[t],A(t,e.type,o))return null}else{if("string"==typeof(o=e._currentElement)||"number"==typeof o||!e._rootNodeID)return null;if(e=o.props,n=e[t],A(t,o.type,e))return null}return n&&"function"!=typeof n&&r("231",t,typeof n),n},extractEvents:function(e,t,n,r){for(var o,i=It.plugins,a=0;a<i.length;a++){var s=i[a];s&&(s=s.extractEvents(e,t,n,r))&&(o=P(o,s))}return o},enqueueEvents:function(e){e&&(xn=P(xn,e))},processEventQueue:function(e){var t=xn;xn=null,e?_(t,O):_(t,T),xn&&r("95"),an.rethrowCaughtError()}};mt.canUseDOM&&(_t=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Cn={animationend:M("Animation","AnimationEnd"),animationiteration:M("Animation","AnimationIteration"),animationstart:M("Animation","AnimationStart"),transitionend:M("Transition","TransitionEnd")},Sn={},kn={};mt.canUseDOM&&(kn=document.createElement("div").style,"AnimationEvent"in window||(delete Cn.animationend.animation,delete Cn.animationiteration.animation,delete Cn.animationstart.animation),"TransitionEvent"in window||delete Cn.transitionend.transition);var Pn={topAbort:"abort",topAnimationEnd:R("animationend")||"animationend",topAnimationIteration:R("animationiteration")||"animationiteration",topAnimationStart:R("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:R("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},_n={},En=0,On="_reactListenersID"+(""+Math.random()).slice(2),Tn=vt({},{handleTopLevel:function(e,t,n,r){e=wn.extractEvents(e,t,n,r),wn.enqueueEvents(e),wn.processEventQueue(!1)}},{setEnabled:function(e){bn&&bn.setEnabled(e)},isEnabled:function(){return!(!bn||!bn.isEnabled())},listenTo:function(e,t){var n=N(t);e=It.registrationNameDependencies[e];for(var r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)&&n[o]||("topWheel"===o?I("wheel")?bn.trapBubbledEvent("topWheel","wheel",t):I("mousewheel")?bn.trapBubbledEvent("topWheel","mousewheel",t):bn.trapBubbledEvent("topWheel","DOMMouseScroll",t):"topScroll"===o?bn.trapCapturedEvent("topScroll","scroll",t):"topFocus"===o||"topBlur"===o?(bn.trapCapturedEvent("topFocus","focus",t),bn.trapCapturedEvent("topBlur","blur",t),n.topBlur=!0,n.topFocus=!0):"topCancel"===o?(I("cancel",!0)&&bn.trapCapturedEvent("topCancel","cancel",t),n.topCancel=!0):"topClose"===o?(I("close",!0)&&bn.trapCapturedEvent("topClose","close",t),n.topClose=!0):Pn.hasOwnProperty(o)&&bn.trapBubbledEvent(o,Pn[o],t),n[o]=!0)}},isListeningToAllDependencies:function(e,t){t=N(t),e=It.registrationNameDependencies[e];for(var n=0;n<e.length;n++){var r=e[n];if(!t.hasOwnProperty(r)||!t[r])return!1}return!0},trapBubbledEvent:function(e,t,n){return bn.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return bn.trapCapturedEvent(e,t,n)}}),An={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},In=["Webkit","ms","Moz","O"];Object.keys(An).forEach(function(e){In.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),An[t]=An[e]})});var Mn={isUnitlessNumber:An,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}},Rn=Mn.isUnitlessNumber,Nn=!1;if(mt.canUseDOM){var jn=document.createElement("div").style;try{jn.font=""}catch(e){Nn=!0}}var Dn,Bn={createDangerousStringForStyles:function(){},setValueForStyles:function(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];if(o=null==i||"boolean"==typeof i||""===i?"":r||"number"!=typeof i||0===i||Rn.hasOwnProperty(o)&&Rn[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r)e.setProperty(n,o);else if(o)e[n]=o;else if(r=Nn&&Mn.shorthandPropertyExpansions[n])for(var a in r)e[a]="";else e[n]=""}}},Ln=new RegExp("^["+jt.ATTRIBUTE_NAME_START_CHAR+"]["+jt.ATTRIBUTE_NAME_CHAR+"]*$"),Fn={},Un={},Vn={setAttributeForID:function(e,t){e.setAttribute(jt.ID_ATTRIBUTE_NAME,t)},setAttributeForRoot:function(e){e.setAttribute(jt.ROOT_ATTRIBUTE_NAME,"")},getValueForProperty:function(){},getValueForAttribute:function(){},setValueForProperty:function(e,t,n){var r=jt.getPropertyInfo(t);if(r&&jt.shouldSetAttribute(t,n)){var o=r.mutationMethod;o?o(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?Vn.deleteValueForProperty(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Vn.setValueForAttribute(e,t,jt.shouldSetAttribute(t,n)?n:null)},setValueForAttribute:function(e,t,n){j(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=jt.getPropertyInfo(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}},Wn=Vn,Hn=Yt.ReactDebugCurrentFrame,zn={current:null,phase:null,resetCurrentFiber:function(){Hn.getCurrentStack=null,zn.current=null,zn.phase=null},setCurrentFiber:function(e,t){Hn.getCurrentStack=D,zn.current=e,zn.phase=t},getCurrentFiberOwnerName:function(){return null},getCurrentFiberStackAddendum:D},$n=zn,Kn={getHostProps:function(e,t){var n=t.value,r=t.checked;return vt({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})},initWrapperState:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}},updateWrapper:function(e,t){var n=t.checked;null!=n&&Wn.setValueForProperty(e,"checked",n||!1),n=t.value,null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))},postMountWrapper:function(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)},restoreControlledState:function(e,t){Kn.updateWrapper(e,t);var n=t.name;if("radio"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(n=t.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=qt.getFiberCurrentPropsFromNode(o);i||r("90"),Kn.updateWrapper(o,i)}}}}},qn=Kn,Xn={validateProps:function(){},postMountWrapper:function(e,t){null!=t.value&&e.setAttribute("value",t.value)},getHostProps:function(e,t){return e=vt({children:void 0},t),(t=B(t.children))&&(e.children=t),e}},Yn={getHostProps:function(e,t){return vt({},t,{value:void 0})},initWrapperState:function(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}},postMountWrapper:function(e,t){e.multiple=!!t.multiple;var n=t.value;null!=n?L(e,!!t.multiple,n):null!=t.defaultValue&&L(e,!!t.multiple,t.defaultValue)},postUpdateWrapper:function(e,t){e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!t.multiple;var r=t.value;null!=r?L(e,!!t.multiple,r):n!==!!t.multiple&&(null!=t.defaultValue?L(e,!!t.multiple,t.defaultValue):L(e,!!t.multiple,t.multiple?[]:""))},restoreControlledState:function(e,t){var n=t.value;null!=n&&L(e,!!t.multiple,n)}},Gn={getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),vt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})},initWrapperState:function(e,t){var n=t.value,o=n;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n=""),o=n),e._wrapperState={initialValue:""+o}},updateWrapper:function(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)},restoreControlledState:function(e,t){Gn.updateWrapper(e,t)}},Qn=Gn,Jn=vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Zn={_getTrackerFromNode:function(e){return e._valueTracker},track:function(e){e._valueTracker||(e._valueTracker=V(e))},updateValueIfChanged:function(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=U(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)},stopTracking:function(e){(e=e._valueTracker)&&e.stopTracking()}},er=Et.Namespaces,tr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==er.svg||"innerHTML"in e)e.innerHTML=t;else for(Dn=Dn||document.createElement("div"),Dn.innerHTML="<svg>"+t+"</svg>",t=Dn.firstChild;t.firstChild;)e.appendChild(t.firstChild)}),nr=/["'&<>]/,rr=Bt.TEXT_NODE;mt.canUseDOM&&("textContent"in document.documentElement||(H=function(e,t){if(e.nodeType===rr)e.nodeValue=t;else{if("boolean"==typeof t||"number"==typeof t)t=""+t;else{t=""+t;var n=nr.exec(t);if(n){var r,o="",i=0;for(r=n.index;r<t.length;r++){switch(t.charCodeAt(r)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#x27;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}i!==r&&(o+=t.substring(i,r)),i=r+1,o+=n}t=i!==r?o+t.substring(i,r):o}}tr(e,t)}}));var or=H,ir=($n.getCurrentFiberOwnerName,Bt.DOCUMENT_NODE),ar=Bt.DOCUMENT_FRAGMENT_NODE,sr=Tn.listenTo,lr=It.registrationNameModules,ur=Et.Namespaces.html,cr=Et.getIntrinsicNamespace,pr={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},fr={createElement:function(e,t,n,r){return n=n.nodeType===ir?n:n.ownerDocument,r===ur&&(r=cr(e)),r===ur?"script"===e?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e},createTextNode:function(e,t){return(t.nodeType===ir?t:t.ownerDocument).createTextNode(e)},setInitialProperties:function(e,t,n,r){var o=W(t,n);switch(t){case"iframe":case"object":Tn.trapBubbledEvent("topLoad","load",e);var i=n;break;case"video":case"audio":for(i in pr)pr.hasOwnProperty(i)&&Tn.trapBubbledEvent(i,pr[i],e);i=n;break;case"source":Tn.trapBubbledEvent("topError","error",e),i=n;break;case"img":case"image":Tn.trapBubbledEvent("topError","error",e),Tn.trapBubbledEvent("topLoad","load",e),i=n;break;case"form":Tn.trapBubbledEvent("topReset","reset",e),Tn.trapBubbledEvent("topSubmit","submit",e),i=n;break;case"details":Tn.trapBubbledEvent("topToggle","toggle",e),i=n;break;case"input":qn.initWrapperState(e,n),i=qn.getHostProps(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(r,"onChange");break;case"option":Xn.validateProps(e,n),i=Xn.getHostProps(e,n);break;case"select":Yn.initWrapperState(e,n),i=Yn.getHostProps(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(r,"onChange");break;case"textarea":Qn.initWrapperState(e,n),i=Qn.getHostProps(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(r,"onChange");break;default:i=n}F(t,i);var a,s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?Bn.setValueForStyles(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&tr(e,l):"children"===a?"string"==typeof l?or(e,l):"number"==typeof l&&or(e,""+l):"suppressContentEditableWarning"!==a&&(lr.hasOwnProperty(a)?null!=l&&z(r,a):o?Wn.setValueForAttribute(e,a,l):null!=l&&Wn.setValueForProperty(e,a,l))}switch(t){case"input":Zn.track(e),qn.postMountWrapper(e,n);break;case"textarea":Zn.track(e),Qn.postMountWrapper(e,n);break;case"option":Xn.postMountWrapper(e,n);break;case"select":Yn.postMountWrapper(e,n);break;default:"function"==typeof i.onClick&&(e.onclick=bt)}},diffProperties:function(e,t,n,r,o){var i=null;switch(t){case"input":n=qn.getHostProps(e,n),r=qn.getHostProps(e,r),i=[];break;case"option":n=Xn.getHostProps(e,n),r=Xn.getHostProps(e,r),i=[];break;case"select":n=Yn.getHostProps(e,n),r=Yn.getHostProps(e,r),i=[];break;case"textarea":n=Qn.getHostProps(e,n),r=Qn.getHostProps(e,r),i=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=bt)}F(t,r);var a,s;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in t=n[a])t.hasOwnProperty(s)&&(e||(e={}),e[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&(lr.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var l=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&l!==t&&(null!=l||null!=t))if("style"===a)if(t){for(s in t)!t.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(e||(e={}),e[s]="");for(s in l)l.hasOwnProperty(s)&&t[s]!==l[s]&&(e||(e={}),e[s]=l[s])}else e||(i||(i=[]),i.push(a,e)),e=l;else"dangerouslySetInnerHTML"===a?(l=l?l.__html:void 0,t=t?t.__html:void 0,null!=l&&t!==l&&(i=i||[]).push(a,""+l)):"children"===a?t===l||"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(a,""+l):"suppressContentEditableWarning"!==a&&(lr.hasOwnProperty(a)?(null!=l&&z(o,a),i||t===l||(i=[])):(i=i||[]).push(a,l))}return e&&(i=i||[]).push("style",e),i},updateProperties:function(e,t,n,r,o){W(n,r),r=W(n,o);for(var i=0;i<t.length;i+=2){var a=t[i],s=t[i+1];"style"===a?Bn.setValueForStyles(e,s):"dangerouslySetInnerHTML"===a?tr(e,s):"children"===a?or(e,s):r?null!=s?Wn.setValueForAttribute(e,a,s):Wn.deleteValueForAttribute(e,a):null!=s?Wn.setValueForProperty(e,a,s):Wn.deleteValueForProperty(e,a)}switch(n){case"input":qn.updateWrapper(e,o),Zn.updateValueIfChanged(e);break;case"textarea":Qn.updateWrapper(e,o);break;case"select":Yn.postUpdateWrapper(e,o)}},diffHydratedProperties:function(e,t,n,r,o){switch(t){case"iframe":case"object":Tn.trapBubbledEvent("topLoad","load",e);break;case"video":case"audio":for(var i in pr)pr.hasOwnProperty(i)&&Tn.trapBubbledEvent(i,pr[i],e);break;case"source":Tn.trapBubbledEvent("topError","error",e);break;case"img":case"image":Tn.trapBubbledEvent("topError","error",e),Tn.trapBubbledEvent("topLoad","load",e);break;case"form":Tn.trapBubbledEvent("topReset","reset",e),Tn.trapBubbledEvent("topSubmit","submit",e);break;case"details":Tn.trapBubbledEvent("topToggle","toggle",e);break;case"input":qn.initWrapperState(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(o,"onChange");break;case"option":Xn.validateProps(e,n);break;case"select":Yn.initWrapperState(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(o,"onChange");break;case"textarea":Qn.initWrapperState(e,n),Tn.trapBubbledEvent("topInvalid","invalid",e),z(o,"onChange")}F(t,n),r=null;for(var a in n)n.hasOwnProperty(a)&&(i=n[a],"children"===a?"string"==typeof i?e.textContent!==i&&(r=["children",i]):"number"==typeof i&&e.textContent!==""+i&&(r=["children",""+i]):lr.hasOwnProperty(a)&&null!=i&&z(o,a));switch(t){case"input":Zn.track(e),qn.postMountWrapper(e,n);break;case"textarea":Zn.track(e),Qn.postMountWrapper(e,n);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=bt)}return r},diffHydratedText:function(e,t){return e.nodeValue!==t},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":qn.restoreControlledState(e,n);break;case"textarea":Qn.restoreControlledState(e,n);break;case"select":Yn.restoreControlledState(e,n)}}},dr=void 0;if(mt.canUseDOM)if("function"!=typeof requestIdleCallback){var hr=null,yr=null,mr=!1,vr=!1,gr=0,br=33,xr=33,wr={timeRemaining:"object"==typeof performance&&"function"==typeof performance.now?function(){return gr-performance.now()}:function(){return gr-Date.now()}},Cr="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){e.source===window&&e.data===Cr&&(mr=!1,e=yr,yr=null,null!==e&&e(wr))},!1);var Sr=function(e){vr=!1;var t=e-gr+xr;t<xr&&br<xr?(8>t&&(t=8),xr=t<br?br:t):br=t,gr=e+xr,mr||(mr=!0,window.postMessage(Cr,"*")),t=hr,hr=null,null!==t&&t(e)};dr=function(e){return yr=e,vr||(vr=!0,requestAnimationFrame(Sr)),0}}else dr=requestIdleCallback;else dr=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})}),0};var kr,Pr,_r={rIC:dr},Er={enableAsyncSubtreeAPI:!0},Or={NoWork:0,SynchronousPriority:1,TaskPriority:2,HighPriority:3,LowPriority:4,OffscreenPriority:5},Tr=Gt.Callback,Ar=Or.NoWork,Ir=Or.SynchronousPriority,Mr=Or.TaskPriority,Rr=Dt.ClassComponent,Nr=Dt.HostRoot,jr=void 0,Dr=void 0,Br={addUpdate:function(e,t,n,r){Y(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:!1,next:null})},addReplaceUpdate:function(e,t,n,r){Y(e,{priorityLevel:r,partialState:t,callback:n,isReplace:!0,isForced:!1,isTopLevelUnmount:!1,next:null})},addForceUpdate:function(e,t,n){Y(e,{priorityLevel:n,partialState:null,callback:t,isReplace:!1,isForced:!0,isTopLevelUnmount:!1,next:null})},getUpdatePriority:function(e){var t=e.updateQueue;return null===t||e.tag!==Rr&&e.tag!==Nr?Ar:null!==t.first?t.first.priorityLevel:Ar},addTopLevelUpdate:function(e,t,n,r){var o=null===t.element;t={priorityLevel:r,partialState:t,callback:n,isReplace:!1,isForced:!1,isTopLevelUnmount:o,next:null},e=Y(e,t),o&&(o=jr,n=Dr,null!==o&&null!==t.next&&(t.next=null,o.last=t),null!==n&&null!==e&&null!==e.next&&(e.next=null,n.last=t))},beginUpdateQueue:function(e,t,n,r,o,i,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={first:n.first,last:n.last,callbackList:null,hasForceUpdate:!1}),e=n.callbackList;for(var s=n.hasForceUpdate,l=!0,u=n.first;null!==u&&0>=$(u.priorityLevel,a);){n.first=u.next,null===n.first&&(n.last=null);var c;u.isReplace?(o=G(u,r,o,i),l=!0):(c=G(u,r,o,i))&&(o=l?vt({},o,c):vt(o,c),l=!1),u.isForced&&(s=!0),null===u.callback||u.isTopLevelUnmount&&null!==u.next||(e=null!==e?e:[],e.push(u.callback),t.effectTag|=Tr),u=u.next}return n.callbackList=e,n.hasForceUpdate=s,null!==n.first||null!==e||s||(t.updateQueue=null),o},commitCallbacks:function(e,t,n){if(null!==(e=t.callbackList))for(t.callbackList=null,t=0;t<e.length;t++){var o=e[t];"function"!=typeof o&&r("191",o),o.call(n)}}},Lr=[],Fr=-1,Ur={createCursor:function(e){return{current:e}},isEmpty:function(){return-1===Fr},pop:function(e){0>Fr||(e.current=Lr[Fr],Lr[Fr]=null,Fr--)},push:function(e,t){Fr++,Lr[Fr]=e.current,e.current=t},reset:function(){for(;-1<Fr;)Lr[Fr]=null,Fr--}},Vr=rn.isFiberMounted,Wr=Dt.ClassComponent,Hr=Dt.HostRoot,zr=Ur.createCursor,$r=Ur.pop,Kr=Ur.push,qr=zr(xt),Xr=zr(!1),Yr=xt,Gr={getUnmaskedContext:function(e){return J(e)?Yr:qr.current},cacheContext:Q,getMaskedContext:function(e,t){var n=e.type.contextTypes;if(!n)return xt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&Q(e,t,i),i},hasContextChanged:function(){return Xr.current},isContextConsumer:function(e){return e.tag===Wr&&null!=e.type.contextTypes},isContextProvider:J,popContextProvider:function(e){J(e)&&($r(Xr,e),$r(qr,e))},popTopLevelContextObject:function(e){$r(Xr,e),$r(qr,e)},pushTopLevelContextObject:function(e,t,n){null!=qr.cursor&&r("168"),Kr(qr,t,e),Kr(Xr,n,e)},processChildContext:Z,pushContextProvider:function(e){if(!J(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||xt,Yr=qr.current,Kr(qr,t,e),Kr(Xr,Xr.current,e),!0},invalidateContextProvider:function(e,t){var n=e.stateNode;if(n||r("169"),t){var o=Z(e,Yr);n.__reactInternalMemoizedMergedChildContext=o,$r(Xr,e),$r(qr,e),Kr(qr,o,e)}else $r(Xr,e);Kr(Xr,t,e)},resetContext:function(){Yr=xt,qr.current=xt,Xr.current=!1},findCurrentUnmaskedContext:function(e){for(Vr(e)&&e.tag===Wr?void 0:r("170");e.tag!==Hr;){if(J(e))return e.stateNode.__reactInternalMemoizedMergedChildContext;(e=e.return)||r("171")}return e.stateNode.context}},Qr={NoContext:0,AsyncUpdates:1},Jr=Dt.IndeterminateComponent,Zr=Dt.ClassComponent,eo=Dt.HostRoot,to=Dt.HostComponent,no=Dt.HostText,ro=Dt.HostPortal,oo=Dt.CoroutineComponent,io=Dt.YieldComponent,ao=Dt.Fragment,so=Or.NoWork,lo=Qr.NoContext,uo=Gt.NoEffect,co={createWorkInProgress:function(e,t){var n=e.alternate;return null===n?(n=new ee(e.tag,e.key,e.internalContextTag),n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.effectTag=uo,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.pendingWorkPriority=t,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n},createHostRootFiber:function(){return new ee(eo,null,lo)},createFiberFromElement:function(e,t,n){return t=te(e.type,e.key,t),t.pendingProps=e.props,t.pendingWorkPriority=n,t},createFiberFromFragment:function(e,t,n){return t=new ee(ao,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromText:function(e,t,n){return t=new ee(no,null,t),t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromElementType:te,createFiberFromHostInstanceForDeletion:function(){var e=new ee(to,null,lo);return e.type="DELETED",e},createFiberFromCoroutine:function(e,t,n){return t=new ee(oo,e.key,t),t.type=e.handler,t.pendingProps=e,t.pendingWorkPriority=n,t},createFiberFromYield:function(e,t){return new ee(io,null,t)},createFiberFromPortal:function(e,t,n){return t=new ee(ro,e.key,t),t.pendingProps=e.children||[],t.pendingWorkPriority=n,t.stateNode={containerInfo:e.containerInfo,implementation:e.implementation},t},largerPriority:function(e,t){return e!==so&&(t===so||t>e)?e:t}},po=co.createHostRootFiber,fo=Dt.IndeterminateComponent,ho=Dt.FunctionalComponent,yo=Dt.ClassComponent,mo=Dt.HostComponent;"function"==typeof Symbol&&Symbol.for?(kr=Symbol.for("react.coroutine"),Pr=Symbol.for("react.yield")):(kr=60104,Pr=60105);var vo={createCoroutine:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:kr,key:null==r?null:""+r,children:e,handler:t,props:n}},createYield:function(e){return{$$typeof:Pr,value:e}},isCoroutine:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===kr},isYield:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Pr},REACT_YIELD_TYPE:Pr,REACT_COROUTINE_TYPE:kr},go="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.portal")||60106,bo={createPortal:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:go,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},isPortal:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===go},REACT_PORTAL_TYPE:go},xo=vo.REACT_COROUTINE_TYPE,wo=vo.REACT_YIELD_TYPE,Co=bo.REACT_PORTAL_TYPE,So=co.createWorkInProgress,ko=co.createFiberFromElement,Po=co.createFiberFromFragment,_o=co.createFiberFromText,Eo=co.createFiberFromCoroutine,Oo=co.createFiberFromYield,To=co.createFiberFromPortal,Ao=Array.isArray,Io=Dt.FunctionalComponent,Mo=Dt.ClassComponent,Ro=Dt.HostText,No=Dt.HostPortal,jo=Dt.CoroutineComponent,Do=Dt.YieldComponent,Bo=Dt.Fragment,Lo=Gt.NoEffect,Fo=Gt.Placement,Uo=Gt.Deletion,Vo="function"==typeof Symbol&&Symbol.iterator,Wo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ho=ie(!0,!0),zo=ie(!1,!0),$o=ie(!1,!1),Ko={reconcileChildFibers:Ho,reconcileChildFibersInPlace:zo,mountChildFibersInPlace:$o,cloneChildFibers:function(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=So(e,e.pendingWorkPriority);for(n.pendingProps=e.pendingProps,t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=So(e,e.pendingWorkPriority),n.pendingProps=e.pendingProps,n.return=t;n.sibling=null}}},qo=Gt.Update,Xo=Qr.AsyncUpdates,Yo=Gr.cacheContext,Go=Gr.getMaskedContext,Qo=Gr.getUnmaskedContext,Jo=Gr.isContextConsumer,Zo=Br.addUpdate,ei=Br.addReplaceUpdate,ti=Br.addForceUpdate,ni=Br.beginUpdateQueue,ri=Gr.hasContextChanged,oi=rn.isMounted,ii=Ko.mountChildFibersInPlace,ai=Ko.reconcileChildFibers,si=Ko.reconcileChildFibersInPlace,li=Ko.cloneChildFibers,ui=Br.beginUpdateQueue,ci=Gr.getMaskedContext,pi=Gr.getUnmaskedContext,fi=Gr.hasContextChanged,di=Gr.pushContextProvider,hi=Gr.pushTopLevelContextObject,yi=Gr.invalidateContextProvider,mi=Dt.IndeterminateComponent,vi=Dt.FunctionalComponent,gi=Dt.ClassComponent,bi=Dt.HostRoot,xi=Dt.HostComponent,wi=Dt.HostText,Ci=Dt.HostPortal,Si=Dt.CoroutineComponent,ki=Dt.CoroutineHandlerPhase,Pi=Dt.YieldComponent,_i=Dt.Fragment,Ei=Or.NoWork,Oi=Or.OffscreenPriority,Ti=Gt.PerformedWork,Ai=Gt.Placement,Ii=Gt.ContentReset,Mi=Gt.Err,Ri=Gt.Ref,Ni=Yt.ReactCurrentOwner,ji=Ko.reconcileChildFibers,Di=Gr.popContextProvider,Bi=Gr.popTopLevelContextObject,Li=Dt.IndeterminateComponent,Fi=Dt.FunctionalComponent,Ui=Dt.ClassComponent,Vi=Dt.HostRoot,Wi=Dt.HostComponent,Hi=Dt.HostText,zi=Dt.HostPortal,$i=Dt.CoroutineComponent,Ki=Dt.CoroutineHandlerPhase,qi=Dt.YieldComponent,Xi=Dt.Fragment,Yi=Gt.Placement,Gi=Gt.Ref,Qi=Gt.Update,Ji=Or.OffscreenPriority,Zi=null,ea=null,ta={injectInternals:function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.supportsFiber)return!0;try{var n=t.inject(e);Zi=ue(function(e){return t.onCommitFiberRoot(n,e)}),ea=ue(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0},onCommitRoot:function(e){"function"==typeof Zi&&Zi(e)},onCommitUnmount:function(e){"function"==typeof ea&&ea(e)}},na=Dt.ClassComponent,ra=Dt.HostRoot,oa=Dt.HostComponent,ia=Dt.HostText,aa=Dt.HostPortal,sa=Dt.CoroutineComponent,la=Br.commitCallbacks,ua=ta.onCommitUnmount,ca=Gt.Placement,pa=Gt.Update,fa=Gt.Callback,da=Gt.ContentReset,ha=Ur.createCursor,ya=Ur.pop,ma=Ur.push,va={},ga=Dt.HostComponent,ba=Dt.HostText,xa=Dt.HostRoot,wa=Gt.Deletion,Ca=Gt.Placement,Sa=co.createFiberFromHostInstanceForDeletion,ka=Gr.popContextProvider,Pa=Ur.reset,_a=Yt.ReactCurrentOwner,Ea=co.createWorkInProgress,Oa=co.largerPriority,Ta=ta.onCommitRoot,Aa=Or.NoWork,Ia=Or.SynchronousPriority,Ma=Or.TaskPriority,Ra=Or.HighPriority,Na=Or.LowPriority,ja=Or.OffscreenPriority,Da=Qr.AsyncUpdates,Ba=Gt.PerformedWork,La=Gt.Placement,Fa=Gt.Update,Ua=Gt.PlacementAndUpdate,Va=Gt.Deletion,Wa=Gt.ContentReset,Ha=Gt.Callback,za=Gt.Err,$a=Gt.Ref,Ka=Dt.HostRoot,qa=Dt.HostComponent,Xa=Dt.HostPortal,Ya=Dt.ClassComponent,Ga=Br.getUpdatePriority,Qa=Gr.resetContext;ye._injectFiber=function(e){he=e};var Ja=Br.addTopLevelUpdate,Za=Gr.findCurrentUnmaskedContext,es=Gr.isContextProvider,ts=Gr.processChildContext,ns=Dt.HostComponent,rs=rn.findCurrentHostFiber,os=rn.findCurrentHostFiberWithNoPortals;ye._injectFiber(function(e){var t=Za(e);return es(e)?ts(e,t,!1):t});var is=Bt.TEXT_NODE,as=null,ss={getOffsets:function(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,o=t.focusNode,i=t.focusOffset,a=t.getRangeAt(0);try{a.startContainer.nodeType,a.endContainer.nodeType}catch(e){return null}t=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset?0:a.toString().length;var s=a.cloneRange();return s.selectNodeContents(e),s.setEnd(a.startContainer,a.startOffset),e=s.startContainer===s.endContainer&&s.startOffset===s.endOffset?0:s.toString().length,a=e+t,t=document.createRange(),t.setStart(n,r),t.setEnd(o,i),n=t.collapsed,{start:n?a:e,end:n?e:a}},setOffsets:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[ge()].length,o=Math.min(t.start,r);if(t=void 0===t.end?o:Math.min(t.end,r),!n.extend&&o>t&&(r=t,t=o,o=r),r=ve(e,o),e=ve(e,t),r&&e){var i=document.createRange();i.setStart(r.node,r.offset),n.removeAllRanges(),o>t?(n.addRange(i),n.extend(e.node,e.offset)):(i.setEnd(e.node,e.offset),n.addRange(i))}}}},ls=Bt.ELEMENT_NODE,us={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=kt();return{focusedElem:e,selectionRange:us.hasSelectionCapabilities(e)?us.getSelection(e):null}},restoreSelection:function(e){var t=kt(),n=e.focusedElem;if(e=e.selectionRange,t!==n&&Ct(document.documentElement,n)){for(us.hasSelectionCapabilities(n)&&us.setSelection(n,e),t=[],e=n;e=e.parentNode;)e.nodeType===ls&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(St(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}},getSelection:function(e){return("selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:ss.getOffsets(e))||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;void 0===r&&(r=n),"selectionStart"in e?(e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length)):ss.setOffsets(e,t)}},cs=us,ps=Bt.ELEMENT_NODE;we._injectFiber=function(e){be=e},we._injectStack=function(e){xe=e};var fs=Dt.HostComponent,ds={isAncestor:function(e,t){for(;t;){if(e===t||e===t.alternate)return!0;t=Ce(t)}return!1},getLowestCommonAncestor:Se,getParentInstance:function(e){return Ce(e)},traverseTwoPhase:function(e,t,n){for(var r=[];e;)r.push(e),e=Ce(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)},traverseEnterLeave:function(e,t,n,r,o){for(var i=e&&t?Se(e,t):null,a=[];e&&e!==i;)a.push(e),e=Ce(e);for(e=[];t&&t!==i;)e.push(t),t=Ce(t);for(t=0;t<a.length;t++)n(a[t],"bubbled",r);for(t=e.length;0<t--;)n(e[t],"captured",o)}},hs=wn.getListener,ys={accumulateTwoPhaseDispatches:function(e){_(e,Pe)},accumulateTwoPhaseDispatchesSkipTarget:function(e){_(e,_e)},accumulateDirectDispatches:function(e){_(e,Oe)},accumulateEnterLeaveDispatches:function(e,t,n,r){ds.traverseEnterLeave(n,r,Ee,e,t)}},ms={_root:null,_startText:null,_fallbackText:null},vs={initialize:function(e){return ms._root=e,ms._startText=vs.getText(),!0},reset:function(){ms._root=null,ms._startText=null,ms._fallbackText=null},getData:function(){if(ms._fallbackText)return ms._fallbackText;var e,t,n=ms._startText,r=n.length,o=vs.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return ms._fallbackText=o.slice(e,1<t?1-t:void 0),ms._fallbackText},getText:function(){return"value"in ms._root?ms._root.value:ms._root[ge()]}},gs=vs,bs="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),xs={type:null,target:null,currentTarget:bt.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};vt(Te.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=bt.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=bt.thatReturnsTrue)},persist:function(){this.isPersistent=bt.thatReturnsTrue},isPersistent:bt.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<bs.length;t++)this[bs[t]]=null}}),Te.Interface=xs,Te.augmentClass=function(e,t){function n(){}n.prototype=this.prototype;var r=new n;vt(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=vt({},this.Interface,t),e.augmentClass=this.augmentClass,Me(e)},Me(Te),Te.augmentClass(Re,{data:null}),Te.augmentClass(Ne,{data:null});var ws=[9,13,27,32],Cs=mt.canUseDOM&&"CompositionEvent"in window,Ss=null;mt.canUseDOM&&"documentMode"in document&&(Ss=document.documentMode);var ks;if(ks=mt.canUseDOM&&"TextEvent"in window&&!Ss){var Ps=window.opera;ks=!("object"==typeof Ps&&"function"==typeof Ps.version&&12>=parseInt(Ps.version(),10))}var _s=ks,Es=mt.canUseDOM&&(!Cs||Ss&&8<Ss&&11>=Ss),Os=String.fromCharCode(32),Ts={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},As=!1,Is=!1,Ms={eventTypes:Ts,extractEvents:function(e,t,n,r){var o;if(Cs)e:{switch(e){case"topCompositionStart":var i=Ts.compositionStart;break e;case"topCompositionEnd":i=Ts.compositionEnd;break e;case"topCompositionUpdate":i=Ts.compositionUpdate;break e}i=void 0}else Is?je(e,n)&&(i=Ts.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Ts.compositionStart);return i?(Es&&(Is||i!==Ts.compositionStart?i===Ts.compositionEnd&&Is&&(o=gs.getData()):Is=gs.initialize(r)),i=Re.getPooled(i,t,n,r),o?i.data=o:null!==(o=De(n))&&(i.data=o),ys.accumulateTwoPhaseDispatches(i),o=i):o=null,(e=_s?Be(e,n):Le(e,n))?(t=Ne.getPooled(Ts.beforeInput,t,n,r),t.data=e,ys.accumulateTwoPhaseDispatches(t)):t=null,[o,t]}},Rs={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ns={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},js=null,Ds=null,Bs=!1;mt.canUseDOM&&(Bs=I("input")&&(!document.documentMode||9<document.documentMode));var Ls={eventTypes:Ns,_isInputEventSupported:Bs,extractEvents:function(e,t,n,r){var o=t?qt.getNodeFromInstance(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=He;else if(Fe(o))if(Bs)a=Ye;else{a=qe;var s=Ke}else!(i=o.nodeName)||"input"!==i.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type||(a=Xe);if(a&&(a=a(e,t)))return Ue(a,n,r);s&&s(e,o,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||o._wrapperState)&&e.controlled&&"number"===o.type&&(e=""+o.value,o.getAttribute("value")!==e&&o.setAttribute("value",e))}};Te.augmentClass(Ge,{view:function(e){return e.view?e.view:(e=S(e),e.window===e?e:(e=e.ownerDocument)?e.defaultView||e.parentWindow:window)},detail:function(e){return e.detail||0}});var Fs={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};Ge.augmentClass(Ze,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Je,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Us={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Vs={eventTypes:Us,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?qt.getClosestInstanceFromNode(t):null):e=null,e===t)return null;var i=null==e?o:qt.getNodeFromInstance(e);o=null==t?o:qt.getNodeFromInstance(t);var a=Ze.getPooled(Us.mouseLeave,e,n,r);return a.type="mouseleave",a.target=i,a.relatedTarget=o,n=Ze.getPooled(Us.mouseEnter,t,n,r),n.type="mouseenter",n.target=o,n.relatedTarget=i,ys.accumulateEnterLeaveDispatches(a,n,e,t),[a,n]}},Ws=Bt.DOCUMENT_NODE,Hs=mt.canUseDOM&&"documentMode"in document&&11>=document.documentMode,zs={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},$s=null,Ks=null,qs=null,Xs=!1,Ys=Tn.isListeningToAllDependencies,Gs={eventTypes:zs,extractEvents:function(e,t,n,r){var o=r.window===r?r.document:r.nodeType===Ws?r:r.ownerDocument;if(!o||!Ys("onSelect",o))return null;switch(o=t?qt.getNodeFromInstance(t):window,e){case"topFocus":(Fe(o)||"true"===o.contentEditable)&&($s=o,Ks=t,qs=null);break;case"topBlur":qs=Ks=$s=null;break;case"topMouseDown":Xs=!0;break;case"topContextMenu":case"topMouseUp":return Xs=!1,et(n,r);case"topSelectionChange":if(Hs)break;case"topKeyDown":case"topKeyUp":return et(n,r)}return null}};Te.augmentClass(tt,{animationName:null,elapsedTime:null,pseudoElement:null}),Te.augmentClass(nt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ge.augmentClass(rt,{relatedTarget:null});var Qs={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Js={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};Ge.augmentClass(it,{key:function(e){if(e.key){var t=Qs[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=ot(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?Js[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Je,charCode:function(e){return"keypress"===e.type?ot(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ot(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ze.augmentClass(at,{dataTransfer:null}),Ge.augmentClass(st,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Je}),Te.augmentClass(lt,{propertyName:null,elapsedTime:null,pseudoElement:null}),Ze.augmentClass(ut,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null});var Zs={},el={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t;t="top"+t,n={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[t]},Zs[e]=n,el[t]=n});var tl={eventTypes:Zs,extractEvents:function(e,t,n,o){var i=el[e];if(!i)return null;switch(e){case"topAbort":case"topCancel":case"topCanPlay":case"topCanPlayThrough":case"topClose":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topToggle":case"topVolumeChange":case"topWaiting":var a=Te;break;case"topKeyPress":if(0===ot(n))return null;case"topKeyDown":case"topKeyUp":a=it;break;case"topBlur":case"topFocus":a=rt;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=Ze;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=at;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=st;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=tt;break;case"topTransitionEnd":a=lt;break;case"topScroll":a=Ge;break;case"topWheel":a=ut;break;case"topCopy":case"topCut":case"topPaste":a=nt}return a||r("86",e),e=a.getPooled(i,t,n,o),ys.accumulateTwoPhaseDispatches(e),e}};bn.setHandleTopLevel(Tn.handleTopLevel),wn.injection.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),ln.injection.injectComponentTree(qt),wn.injection.injectEventPluginsByName({SimpleEventPlugin:tl,EnterLeaveEventPlugin:Vs,ChangeEventPlugin:Ls,SelectEventPlugin:Gs,BeforeInputEventPlugin:Ms});var nl=jt.injection.MUST_USE_PROPERTY,rl=jt.injection.HAS_BOOLEAN_VALUE,ol=jt.injection.HAS_NUMERIC_VALUE,il=jt.injection.HAS_POSITIVE_NUMERIC_VALUE,al=jt.injection.HAS_STRING_BOOLEAN_VALUE,sl={Properties:{allowFullScreen:rl,allowTransparency:al,async:rl,autoPlay:rl,capture:rl,checked:nl|rl,cols:il,contentEditable:al,controls:rl,default:rl,defer:rl,disabled:rl,download:jt.injection.HAS_OVERLOADED_BOOLEAN_VALUE,draggable:al,formNoValidate:rl,hidden:rl,loop:rl,multiple:nl|rl,muted:nl|rl,noValidate:rl,open:rl,playsInline:rl,readOnly:rl,required:rl,reversed:rl,rows:il,rowSpan:ol,scoped:rl,seamless:rl,selected:nl|rl,size:il,start:ol,span:il,spellCheck:al,style:0,itemScope:rl,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:al},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},ll=jt.injection.HAS_STRING_BOOLEAN_VALUE,ul={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},cl={Properties:{autoReverse:ll,externalResourcesRequired:ll,preserveAlpha:ll},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:ul.xlink,xlinkArcrole:ul.xlink,xlinkHref:ul.xlink,xlinkRole:ul.xlink,xlinkShow:ul.xlink,xlinkTitle:ul.xlink,xlinkType:ul.xlink,xmlBase:ul.xml,xmlLang:ul.xml,xmlSpace:ul.xml}},pl=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(pl,ct);cl.Properties[t]=0,cl.DOMAttributeNames[t]=e}),jt.injection.injectDOMPropertyConfig(sl),jt.injection.injectDOMPropertyConfig(cl);var fl=ta.injectInternals,dl=Bt.ELEMENT_NODE,hl=Bt.TEXT_NODE,yl=Bt.COMMENT_NODE,ml=Bt.DOCUMENT_NODE,vl=Bt.DOCUMENT_FRAGMENT_NODE,gl=jt.ROOT_ATTRIBUTE_NAME,bl=Et.getChildNamespace,xl=fr.createElement,wl=fr.createTextNode,Cl=fr.setInitialProperties,Sl=fr.diffProperties,kl=fr.updateProperties,Pl=fr.diffHydratedProperties,_l=fr.diffHydratedText,El=fr.warnForDeletedHydratableElement,Ol=fr.warnForDeletedHydratableText,Tl=fr.warnForInsertedHydratedElement,Al=fr.warnForInsertedHydratedText,Il=qt.precacheFiberNode,Ml=qt.updateFiberProps;fn.injection.injectFiberControlledHostComponent(fr),we._injectFiber(function(e){return jl.findHostInstance(e)});var Rl=null,Nl=null,jl=function(e){var t=e.getPublicInstance;e=de(e);var n=e.scheduleUpdate,r=e.getPriorityContext;return{createContainer:function(e){var t=po();return e={current:t,containerInfo:e,isScheduled:!1,nextScheduledRoot:null,context:null,pendingContext:null},t.stateNode=e},updateContainer:function(e,t,o,i){var a=t.current;o=ye(o),null===t.context?t.context=o:t.pendingContext=o,t=i,i=r(a,Er.enableAsyncSubtreeAPI&&null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent),e={element:e},Ja(a,e,void 0===t?null:t,i),n(a,i)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case ns:return t(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:function(e){return e=rs(e),null===e?null:e.stateNode},findHostInstanceWithNoPortals:function(e){return e=os(e),null===e?null:e.stateNode}}}({getRootHostContext:function(e){if(e.nodeType===ml)e=(e=e.documentElement)?e.namespaceURI:bl(null,"");else{var t=e.nodeType===yl?e.parentNode:e;e=t.namespaceURI||null,t=t.tagName,e=bl(e,t)}return e},getChildHostContext:function(e,t){return bl(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){Rl=Tn.isEnabled(),Nl=cs.getSelectionInformation(),Tn.setEnabled(!1)},resetAfterCommit:function(){cs.restoreSelection(Nl),Nl=null,Tn.setEnabled(Rl),Rl=null},createInstance:function(e,t,n,r,o){return e=xl(e,t,n,r),Il(o,e),Ml(e,t),e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){Cl(e,t,n,r);e:{switch(t){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,o){return Sl(e,t,n,r,o)},commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,o){Ml(e,o),kl(e,t,n,r,o)},shouldSetTextContent:function(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html},resetTextContent:function(e){e.textContent=""},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=wl(e,t),Il(r,e),e},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){e.nodeType===yl?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){e.nodeType===yl?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){e.nodeType===yl?e.parentNode.removeChild(t):e.removeChild(t)},canHydrateInstance:function(e,t){return e.nodeType===dl&&t===e.nodeName.toLowerCase()},canHydrateTextInstance:function(e,t){return""!==t&&e.nodeType===hl},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&e.nodeType!==dl&&e.nodeType!==hl;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&e.nodeType!==dl&&e.nodeType!==hl;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,o,i){return Il(i,e),Ml(e,n),Pl(e,t,n,o,r)},hydrateTextInstance:function(e,t,n){return Il(n,e),_l(e,t)},didNotHydrateInstance:function(e,t){1===t.nodeType?El(e,t):Ol(e,t)},didNotFindHydratableInstance:function(e,t,n){Tl(e,t,n)},didNotFindHydratableTextInstance:function(e,t){Al(e,t)},scheduleDeferredCallback:_r.rIC,useSyncScheduling:!0});hn.injection.injectFiberBatchedUpdates(jl.batchedUpdates);var Dl={createPortal:ht,hydrate:function(e,t,n){return dt(null,e,t,!0,n)},render:function(e,t,n){return dt(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,o){return null!=e&&Xt.has(e)||r("38"),dt(e,t,n,!1,o)},unmountComponentAtNode:function(e){return pt(e)||r("40"),!!e._reactRootContainer&&(jl.unbatchedUpdates(function(){dt(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},findDOMNode:we,unstable_createPortal:ht,unstable_batchedUpdates:hn.batchedUpdates,unstable_deferredUpdates:jl.deferredUpdates,flushSync:jl.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:wn,EventPluginRegistry:It,EventPropagators:ys,ReactControlledComponent:fn,ReactDOMComponentTree:qt,ReactDOMEventListener:bn}};fl({findFiberByHostInstance:qt.getClosestInstanceFromNode,findHostInstanceByFiber:jl.findHostInstance,bundleType:0,version:"16.0.0",rendererPackageName:"react-dom"}),e.exports=Dl},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=n(4),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;e.exports=o},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(21);e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(22);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t,n){"use strict";function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=r(l),c=n(26),p=r(c),f=n(29),d=r(f),h=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={gameState:0},n.handleStart=n.handleStart.bind(n),n.handleLeave=n.handleLeave.bind(n),n}return a(t,e),s(t,[{key:"render",value:function(){return this.gameStates=[u.default.createElement(p.default,{onStart:this.handleStart}),u.default.createElement(d.default,{onLeave:this.handleLeave})],this.gameStates[this.state.gameState]}},{key:"handleStart",value:function(){this.setState({gameState:1})}},{key:"handleLeave",value:function(e){this.setState({gameState:2})}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=r(c),f=n(1),d=r(f),h=(l=s=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={blink:!1},n.startUpdate=n.startUpdate.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;window.addEventListener("keypress",this.handleKeyPress),this.animationFrame=requestAnimationFrame(this.startUpdate),this.interval=setInterval(function(){e.setState({blink:!e.state.blink})},500)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keypress",this.handleKeyPress),cancelAnimationFrame(this.animationFrame),clearInterval(this.interval)}},{key:"render",value:function(){return p.default.createElement("div",null,p.default.createElement("img",{className:"splash",src:"assets/splash.png"}),p.default.createElement("p",{className:"start",style:{display:this.state.blink?"block":"none"}},"Press Enter"))}},{key:"startUpdate",value:function(){this.animationFrame=requestAnimationFrame(this.startUpdate)}},{key:"handleKeyPress",value:function(e){13===e.keyCode&&this.props.onStart()}}]),t}(c.Component),s.propTypes={onStart:d.default.func},l);t.default=h},function(e,t,n){"use strict";var r=n(4),o=n(5),i=n(28);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=r(l),c=n(1),p=(r(c),n(2)),f=r(p),d=n(3),h=n(39),y=(r(h),n(40)),m=r(y),v=n(41),g=r(v),b=n(42),x=r(b),w=n(12),C=r(w),S=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.keyListener1=new d.KeyListener,n.keyListener2=new d.KeyListener,window.context=window.context||new AudioContext,n}return a(t,e),s(t,[{key:"componentDidMount",value:function(){this.keyListener1.subscribe([this.keyListener1.LEFT,this.keyListener1.RIGHT,this.keyListener1.UP,this.keyListener1.DOWN,65]),this.keyListener2.subscribe([73,74,75,76])}},{key:"componentWillUnmount",value:function(){this.keyListener1.unsubscribe(),this.keyListener2.unsubscribe()}},{key:"physicsInit",value:function(e){var t=f.default.Bodies.rectangle(-10,520,2048,64,{isStatic:!0}),n=f.default.Bodies.rectangle(-10,288,64,576,{isStatic:!0}),r=f.default.Bodies.rectangle(964,288,64,576,{isStatic:!0}),o=f.default.Bodies.rectangle(-64,-7,2048,64,{isStatic:!0});f.default.World.addBody(e.world,t),f.default.World.addBody(e.world,o),f.default.World.addBody(e.world,n),f.default.World.addBody(e.world,r)}},{key:"render",value:function(){return u.default.createElement(d.Loop,null,u.default.createElement(d.Stage,{style:{background:"#3a9bdc"}},u.default.createElement(d.World,{onInit:this.physicsInit,gravity:{y:0,scale:1e-12}},u.default.createElement(x.default,{store:C.default}),u.default.createElement(g.default,{store:C.default,keys:this.keyListener2,index:1}),u.default.createElement(m.default,{store:C.default,keys:this.keyListener1,index:0}))))}}]),t}(l.Component);t.default=S},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){r(this,e),this.url=t||null,this.callback=n||function(){},this.buffer=null,window.AudioContext=window.AudioContext||window.webkitAudioContext,this.context=window.context||new AudioContext,this.loadBuffer()}return o(e,[{key:"play",value:function(e){var t=e&&e.volume,n=e&&e.offset,r=e&&e.loop,o=this.context.createBufferSource(),i=this.context.createGain();return i.gain.value=t||.5,i.connect(this.context.destination),o.connect(i),o.buffer=this.buffer,o.start(n?this.context.currentTime+n:0),o.loop=r||!1,o.stop.bind(o)}},{key:"loadBuffer",value:function(){var e=this,t=new XMLHttpRequest;t.open("GET",this.url,!0),t.responseType="arraybuffer",t.onload=function(){e.context.decodeAudioData(t.response,function(t){if(!t)return void console.error("error decoding file data: "+e.url);e.buffer=t,e.callback()},function(e){console.error("decodeAudioData error",e)})},t.onerror=function(){console.error("BufferLoader: XHR error")},t.send()}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u,c,p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=n(1),h=r(d),y=n(2),m=r(y),v=(c=u=function(e){function t(e,n){a(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),l=e.args,u=(e.children,e.shape),c=i(e,["args","children","shape"]);return r.body=y.Bodies[u].apply(y.Bodies,o(l).concat([c])),y.World.addBody(n.engine.world,r.body),r}return l(t,e),p(t,[{key:"componentWillReceiveProps",value:function(e){var t=this,n=(e.args,e.children,e.shape,i(e,["args","children","shape"]));Object.keys(n).forEach(function(r){r in t.body&&t.props[r]!==e[r]&&m.default.Body.set(t.body,r,n[r])})}},{key:"componentWillUnmount",value:function(){y.World.remove(this.context.engine.world,this.body)}},{key:"getChildContext",value:function(){return{body:this.body}}},{key:"render",value:function(){return this.props.children}}]),t}(f.Component),u.propTypes={angle:h.default.number,area:h.default.string,args:h.default.array,axes:h.default.shape({x:h.default.number,y:h.default.number}),bounds:h.default.shape({min:h.default.shape({x:h.default.number,y:h.default.number}),max:h.default.shape({x:h.default.number,y:h.default.number})}),children:h.default.any,collisionFilter:h.default.shape({category:h.default.number,group:h.default.number,mask:h.default.number}),density:h.default.number,force:h.default.shape({x:h.default.number,y:h.default.number}),friction:h.default.number,frictionAir:h.default.number,frictionStatic:h.default.number,id:h.default.number,inertia:h.default.number,inverseInertia:h.default.number,inverseMass:h.default.number,isSensor:h.default.bool,isSleeping:h.default.bool,isStatic:h.default.bool,label:h.default.string,mass:h.default.number,position:h.default.shape({x:h.default.number,y:h.default.number}),restitution:h.default.number,shape:h.default.string,sleepThreshold:h.default.number,slop:h.default.number,slope:h.default.number,timeScale:h.default.number,torque:h.default.number,vertices:h.default.array},u.defaultProps={args:[0,0,100,100],restitution:0,friction:1,frictionStatic:0,shape:"rectangle"},u.contextTypes={engine:h.default.object},u.childContextTypes={body:h.default.object},c);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=n(33),m=r(y),v=(l=s=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.loop=new m.default,n}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.loop.start()}},{key:"componentWillUnmount",value:function(){this.loop.stop()}},{key:"getChildContext",value:function(){return{loop:this.loop}}},{key:"render",value:function(){var e={height:"100%",width:"100%"},t=u({},e,this.props.style);return f.default.createElement("div",{style:t},this.props.children)}}]),t}(p.Component),s.propTypes={children:h.default.any,style:h.default.object},s.childContextTypes={loop:h.default.object},l);t.default=v},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e),this.subscribers=[],this.loopID=null,this.loop=this.loop.bind(this)}return o(e,[{key:"loop",value:function(){this.subscribers.forEach(function(e){e.call()}),this.loopID=window.requestAnimationFrame(this.loop)}},{key:"start",value:function(){this.loopID||this.loop()}},{key:"stop",value:function(){this.loopID||(window.cancelAnimationFrame(this.loopID),this.loopID=null)}},{key:"subscribe",value:function(e){return this.subscribers.push(e)}},{key:"unsubscribe",value:function(e){this.subscribers.splice(e-1,1)}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e),this.LEFT=37,this.RIGHT=39,this.UP=38,this.DOWN=40,this.SPACE=32,this.keys={},this.down=this.down.bind(this),this.up=this.up.bind(this),this.isDown=this.isDown.bind(this),this.subscribe=this.subscribe.bind(this),this.unsubscribe=this.unsubscribe.bind(this)}return o(e,[{key:"down",value:function(e){e.keyCode in this.keys&&(e.preventDefault(),this.keys[e.keyCode]=!0)}},{key:"up",value:function(e){e.keyCode in this.keys&&(e.preventDefault(),this.keys[e.keyCode]=!1)}},{key:"isDown",value:function(e){return this.keys[e]||!1}},{key:"subscribe",value:function(e){var t=this;window.addEventListener("keydown",this.down),window.addEventListener("keyup",this.up),e.forEach(function(e){t.keys[e]=!1})}},{key:"unsubscribe",value:function(){window.removeEventListener("keydown",this.down),window.removeEventListener("keyup",this.up),this.keys={}}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=(l=s=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.loopID=null,n.tickCount=0,n.finished=!1,n.state={currentStep:0},n}return a(t,e),c(t,[{key:"componentDidMount",value:function(){this.props.onPlayStateChanged(1);var e=this.animate.bind(this,this.props);this.loopID=this.context.loop.subscribe(e)}},{key:"componentWillReceiveProps",value:function(e){var t=this;e.state!==this.props.state&&(this.finished=!1,this.props.onPlayStateChanged(1),this.context.loop.unsubscribe(this.loopID),this.tickCount=0,this.setState({currentStep:0},function(){var n=t.animate.bind(t,e);t.loopID=t.context.loop.subscribe(n)}))}},{key:"componentWillUnmount",value:function(){this.context.loop.unsubscribe(this.loopID)}},{key:"animate",value:function(e){var t=e.repeat,n=e.ticksPerFrame,r=e.state,o=e.steps;if(this.tickCount!==n||this.finished)this.tickCount++;else{if(0!==o[r]){var i=this.state.currentStep,a=o[r],s=i===a?0:i+1;this.setState({currentStep:s}),i===a&&!1===t&&(this.finished=!0,this.props.onPlayStateChanged(0))}this.tickCount=0}}},{key:"getImageStyles",value:function(){var e=this.state.currentStep,t=this.props,n=t.state,r=t.tileWidth,o=t.tileHeight;return{position:"absolute",transform:"translate(-"+(this.props.offset[0]+e*r)+"px, -"+(this.props.offset[1]+n*o)+"px)"}}},{key:"getWrapperStyles",value:function(){return{height:this.props.tileHeight,width:this.props.tileWidth,overflow:"hidden",position:"relative",transform:"scale("+(this.props.scale||this.context.scale)+")",transformOrigin:"top left",imageRendering:"pixelated"}}},{key:"render",value:function(){return f.default.createElement("div",{style:u({},this.getWrapperStyles(),this.props.style)},f.default.createElement("img",{style:this.getImageStyles(),src:this.props.src}))}}]),t}(p.Component),s.propTypes={offset:h.default.array,onPlayStateChanged:h.default.func,repeat:h.default.bool,scale:h.default.number,src:h.default.string,state:h.default.number,steps:h.default.array,style:h.default.object,ticksPerFrame:h.default.number,tileHeight:h.default.number,tileWidth:h.default.number},s.defaultProps={offset:[0,0],onPlayStateChanged:function(){},repeat:!0,src:"",state:0,steps:[],ticksPerFrame:4,tileHeight:64,tileWidth:64},s.contextTypes={loop:h.default.object,scale:h.default.number},l);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=r(f),h=n(1),y=r(h),m=(l=s=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.container=null,n.state={dimensions:[0,0]},n.setDimensions=n.setDimensions.bind(n),n}return a(t,e),p(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.setDimensions),this.setDimensions()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.setDimensions)}},{key:"getChildContext",value:function(){return{scale:this.getScale().scale,loop:this.context.loop}}},{key:"getScale",value:function(){var e=c(this.state.dimensions,2),t=e[0],n=e[1],r=this.props,o=r.height,i=r.width,a=void 0,s=void 0,l=void 0;return o/i>n/t?(s=n,a=s*i/o,l=n/o):(a=t,s=a*o/i,l=t/i),this.container?{height:s,width:a,scale:l}:{height:o,width:i,scale:1}}},{key:"getWrapperStyles",value:function(){return{height:"100%",width:"100%",position:"relative"}}},{key:"getInnerStyles",value:function(){var e=this.getScale(),t=Math.floor((this.state.dimensions[0]-e.width)/2),n=Math.floor((this.state.dimensions[1]-e.height)/2);return{height:Math.floor(e.height),width:Math.floor(e.width),position:"absolute",overflow:"hidden",transform:"translate("+t+"px, "+n+"px)"}}},{key:"render",value:function(){var e=this;return d.default.createElement("div",{style:this.getWrapperStyles(),ref:function(t){e.container=t}},d.default.createElement("div",{style:u({},this.getInnerStyles(),this.props.style)},this.props.children))}},{key:"setDimensions",value:function(){this.setState({dimensions:[this.container.offsetWidth,this.container.offsetHeight]})}}]),t}(f.Component),s.propTypes={children:y.default.any,height:y.default.number,style:y.default.object,width:y.default.number},s.defaultProps={width:1024,height:576},s.contextTypes={loop:y.default.object},s.childContextTypes={loop:y.default.object,scale:y.default.number},l);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=(l=s=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e,t,n){return this.context.scale!==n.scale}},{key:"generateMap",value:function(){var e=this,t=this.props,n=t.columns,r=t.layers,o=t.rows,i=[];return r.forEach(function(t,r){for(var a=[],s=0;s<o;s++)for(var l=0;l<n;l++){var u=s*n+l;0!==t[u]&&a.push(f.default.createElement("div",{key:"tile-"+r+"-"+s+"-"+l,style:e.getImageWrapperStyles(s,l)},e.props.renderTile(e.getTileData(s,l,t[u]),e.props.src,e.getImageStyles(t[u]))))}i.push(a)}),i}},{key:"getTileData",value:function(e,t,n){var r=this.props.tileSize,o=r;return{index:n,size:r,left:t*o,top:e*o}}},{key:"getImageStyles",value:function(e){var t=this.context.scale,n=this.props.tileSize;return{position:"absolute",imageRendering:"pixelated",display:"block",height:"100%",transform:"translate(-"+(e-1)*Math.round(t*n)+"px, 0px)"}}},{key:"getImageWrapperStyles",value:function(e,t){var n=this.context.scale,r=this.props.tileSize,o=Math.round(n*r);return{height:o,width:o,overflow:"hidden",position:"absolute",transform:"translate("+t*o+"px, "+e*o+"px)"}}},{key:"getLayerStyles",value:function(){return{position:"absolute",top:0,left:0}}},{key:"getWrapperStyles",value:function(){return{position:"absolute",top:0,left:0}}},{key:"render",value:function(){var e=this,t=this.generateMap();return f.default.createElement("div",{style:u({},this.getWrapperStyles(),this.props.style)},t.map(function(t,n){return f.default.createElement("div",{key:"layer-"+n,style:e.getLayerStyles()},t)}))}}]),t}(p.Component),s.propTypes={columns:h.default.number,layers:h.default.array,renderTile:h.default.func,rows:h.default.number,scale:h.default.number,src:h.default.string,style:h.default.object,tileSize:h.default.number},s.defaultProps={columns:16,layers:[],renderTile:function(e,t,n){return f.default.createElement("img",{style:n,src:t})},rows:9,src:"",tileSize:64},s.contextTypes={scale:h.default.number},l);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=r(c),f=n(1),d=r(f),h=n(2),y=r(h),m=(l=s=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.loopID=null,n.lastTime=null;var r=y.default.World.create({gravity:e.gravity});return n.engine=h.Engine.create({world:r}),n.loop=n.loop.bind(n),n}return a(t,e),u(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.gravity;t!==this.props.gravity&&(this.engine.world.gravity=t)}},{key:"componentDidMount",value:function(){this.loopID=this.context.loop.subscribe(this.loop),this.props.onInit(this.engine),h.Events.on(this.engine,"afterUpdate",this.props.onUpdate),h.Events.on(this.engine,"collisionStart",this.props.onCollision)}},{key:"componentWillUnmount",value:function(){this.context.loop.unsubscribe(this.loopID),h.Events.off(this.engine,"afterUpdate",this.props.onUpdate),h.Events.off(this.engine,"collisionStart",this.props.onCollision)}},{key:"getChildContext",value:function(){return{engine:this.engine}}},{key:"render",value:function(){var e={position:"absolute",top:0,left:0,height:"100%",width:"100%"};return p.default.createElement("div",{style:e},this.props.children)}},{key:"loop",value:function(){var e=.001*Date.now();h.Engine.update(this.engine,1e3/60,this.lastTime?e/this.lastTime:1),this.lastTime=e}}]),t}(c.Component),s.propTypes={children:d.default.any,gravity:d.default.shape({x:d.default.number,y:d.default.number,scale:d.default.number}),onCollision:d.default.func,onInit:d.default.func,onUpdate:d.default.func},s.defaultProps={gravity:{x:0,y:1,scale:.001},onCollision:function(){},onInit:function(){},onUpdate:function(){}},s.contextTypes={scale:d.default.number,loop:d.default.object},s.childContextTypes={engine:d.default.object},l);t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=n(6),m=n(2),v=r(m),g=n(3),b=(0,y.observer)((u=l=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.loopID=null,n.isLeaving=!1,n.lastX=0,n.state={characterState:2,loop:!1,spritePlaying:!0},n.handlePlayStateChanged=n.handlePlayStateChanged.bind(n),n.checkKeys=n.checkKeys.bind(n),n.update=n.update.bind(n),n}return a(t,e),c(t,[{key:"componentDidMount",value:function(){v.default.Events.on(this.context.engine,"afterUpdate",this.update)}},{key:"componentWillUnmount",value:function(){v.default.Events.off(this.context.engine,"afterUpdate",this.update)}},{key:"getWrapperStyles",value:function(){var e=this.props.store,t=e.characterPosition,n=e.stageX,r=this.context.scale;return{position:"absolute",transform:"translate("+(t.x+n)*r+"px, "+t.y*r+"px)",transformOrigin:"left top"}}},{key:"render",value:function(){var e=this,t=this.props.store.characterPosition.x;return f.default.createElement("div",{style:this.getWrapperStyles()},f.default.createElement(g.Body,{args:[t,384,64,64],inertia:1/0,ref:function(t){e.body=t}},f.default.createElement(g.Sprite,{repeat:this.state.repeat,onPlayStateChanged:this.handlePlayStateChanged,src:"assets/character1-sprite.png",scale:2*this.context.scale,state:this.state.characterState,steps:[9,9,0,4,5]})))}},{key:"handlePlayStateChanged",value:function(e){this.setState({spritePlaying:!!e})}},{key:"move",value:function(e,t){v.default.Body.setVelocity(e,{x:t,y:0})}},{key:"checkKeys",value:function(e,t){var n=this.props,r=n.keys,o=n.store,i=this.body.body,a=2;r.isDown(r.LEFT)?(e&&o.setStageX(o.stageX+5),this.move(i,-5),a=1):r.isDown(r.RIGHT)&&(t&&o.setStageX(o.stageX-5),this.move(i,5),a=0),this.setState({characterState:a,repeat:a<2})}},{key:"update",value:function(){var e=this.props.store,t=this.body.body,n=Math.abs(e.stageX)+1024,r=t.position.x<n&&e.stageX<0,o=t.position.x>n&&e.stageX>-2048;if(0===parseFloat(t.velocity.y.toFixed(10))&&(this.isJumping=!1,v.default.Body.set(t,"friction",.9999)),this.isLeaving){var i=e.stageX+(this.lastX-t.position.x);(r||o)&&e.setStageX(i)}else this.checkKeys(r,o),e.setCharacterPosition(t.position);this.lastX=t.position.x}}]),t}(p.Component),l.propTypes={keys:h.default.object,store:h.default.object},l.contextTypes={engine:h.default.object,scale:h.default.number},s=u))||s;t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=n(6),m=n(2),v=r(m),g=n(3),b=(0,y.observer)((u=l=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.loopID=null,n.state={characterState:5,loop:!1,spritePlaying:!0},n.handlePlayStateChanged=n.handlePlayStateChanged.bind(n),n.checkKeys=n.checkKeys.bind(n),n.update=n.update.bind(n),n}return a(t,e),c(t,[{key:"componentDidMount",value:function(){v.default.Events.on(this.context.engine,"afterUpdate",this.update)}},{key:"componentWillUnmount",value:function(){v.default.Events.off(this.context.engine,"afterUpdate",this.update)}},{key:"getWrapperStyles",value:function(){var e=this.props.store,t=e.characterPosition,n=e.stageX,r=e.stageY,o=this.context.scale,i=t[this.props.index],a=i.x,s=i.y;return{position:"absolute",transform:"translate("+(a+n[this.props.index])*o+"px, "+(s+r[this.props.index])*o+"px)",transformOrigin:"left top"}}},{key:"handlePlayStateChanged",value:function(e){this.setState({spritePlaying:!!e})}},{key:"move",value:function(e,t,n){v.default.Body.setVelocity(e,{x:t,y:n})}},{key:"checkKeys",value:function(e,t,n,r){var o=this.props,i=o.keys,a=o.store,s=o.index,l=this.body.body,u=4;i.isDown(i.LEFT)?(e&&a.setStageX(a.stageX[s]+2,s),this.move(l,-2,0),u=1):i.isDown(i.RIGHT)?(t&&a.setStageX(a.stageX[s]-2,s),this.move(l,2,0),u=0):i.isDown(i.UP)?(n&&a.setStageY(a.stageY[s]+2,s),this.move(l,0,-2),u=2):i.isDown(i.DOWN)&&(r&&a.setStageY(a.stageY[s]-2,s),this.move(l,0,2),u=3),this.setState({characterState:u,repeat:u<5})}},{key:"update",value:function(){var e=this.props,t=e.store,n=e.index,r=this.body.body,o=Math.abs(t.stageX[n])+920,i=r.position.x<o&&t.stageX[n]<0,a=r.position.x>o&&t.stageX[n]>-2048,s=r.position.y<576&&t.stageY[n]<0,l=r.position.y>576&&t.stageY[n]>-576;if(this.isLeaving){var u=t.stageX[n]+(this.lastX-r.position.x),c=t.stageY[n]+(this.lastY-r.position.y);i||a?t.setStageX(u,n):(s||l)&&t.setStageY(c,n)}else this.checkKeys(i,a,s,l),t.setCharacterPosition(r.position,n);this.lastX=r.position.x,this.lastY=r.position.y,console.log("character1"),console.log(this.lastX,this.lastY)}},{key:"render",value:function(){var e=this,t=this.props.store.characterPosition[this.props.index].x,n=this.props.store.characterPosition[this.props.index].y;return f.default.createElement("div",{style:this.getWrapperStyles()},f.default.createElement(g.Body,{args:[t,n,64,64],inertia:1/0,ref:function(t){e.body=t}},f.default.createElement(g.Sprite,{repeat:this.state.repeat,onPlayStateChanged:this.handlePlayStateChanged,src:"assets/character1.png",scale:this.context.scale,state:this.state.characterState,steps:[7,7,7,7,0,0]})))}}]),t}(p.Component),l.propTypes={keys:h.default.object,store:h.default.object,index:h.default.number},l.contextTypes={engine:h.default.object,scale:h.default.number},s=u))||s;t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u,c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(0),f=r(p),d=n(1),h=r(d),y=n(6),m=n(2),v=r(m),g=n(3),b=(0,y.observer)((u=l=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.loopID=null,n.isLeaving=!1,n.lastX=0,n.lastY=0,n.state={characterState:4,loop:!1,spritePlaying:!0},n.handlePlayStateChanged=n.handlePlayStateChanged.bind(n),n.checkKeys=n.checkKeys.bind(n),n.update=n.update.bind(n),n}return a(t,e),c(t,[{key:"componentDidMount",value:function(){v.default.Events.on(this.context.engine,"afterUpdate",this.update)}},{key:"componentWillUnmount",value:function(){v.default.Events.off(this.context.engine,"afterUpdate",this.update)}},{key:"getWrapperStyles",value:function(){var e=this.props.store,t=e.characterPosition,n=e.stageX,r=e.stageY,o=this.context.scale,i=t[this.props.index],a=i.x,s=i.y;return{position:"absolute",transform:"translate("+(a+n[this.props.index])*o+"px, "+(s+r[this.props.index])*o+"px)",transformOrigin:"left top"}}},{key:"handlePlayStateChanged",value:function(e){this.setState({spritePlaying:!!e})}},{key:"move",value:function(e,t,n){v.default.Body.setVelocity(e,{x:t,y:n})}},{key:"checkKeys",value:function(e,t,n,r){var o=this.props,i=o.keys,a=o.store,s=o.index,l=this.body.body,u=4;i.isDown(74)?(e&&a.setStageX(a.stageX[s]+2,s),this.move(l,-2,0),u=0):i.isDown(76)?(t&&a.setStageX(a.stageX[s]-2,s),this.move(l,2,0),u=1):i.isDown(73)?(n&&a.setStageY(a.stageY[s]+2,s),this.move(l,0,-2),u=2):i.isDown(75)&&(r&&a.setStageY(a.stageY[s]-2,s),this.move(l,0,2),u=3),this.setState({characterState:u,repeat:u<4})}},{key:"update",value:function(){var e=this.props,t=e.store,n=e.index,r=this.body.body,o=Math.abs(t.stageX[n])+920,i=Math.abs(t.stageY[n])+576,a=r.position.x<o&&t.stageX[n]<0,s=r.position.x>o&&t.stageX[n]>-2048,l=r.position.y<i&&t.stageY[n]<0,u=r.position.y>i&&t.stageY[n]>-756;if(0===parseFloat(r.velocity.y.toFixed(10))&&(this.isJumping=!1,v.default.Body.set(r,"friction",.9999)),this.isLeaving){var c=t.stageX[n]+(this.lastX-r.position.x),p=t.stageY[n]+(this.lastY-r.position.y);a||s?t.setStageX(c,n):(l||u)&&t.setStageY(p,n)}else this.checkKeys(a,s,l,u),t.setCharacterPosition(r.position,n);this.lastX=r.position.x,this.lastY=r.position.y,console.log("character2"),console.log(this.lastX,this.lastY)}},{key:"render",value:function(){var e=this,t=this.props.store.characterPosition[this.props.index].x,n=this.props.store.characterPosition[this.props.index].y;return f.default.createElement("div",{style:this.getWrapperStyles()},f.default.createElement(g.Body,{args:[t,n,64,64],inertia:1/0,ref:function(t){e.body=t}},f.default.createElement(g.Sprite,{repeat:this.state.repeat,onPlayStateChanged:this.handlePlayStateChanged,src:"assets/character2.png",scale:this.context.scale,state:this.state.characterState,steps:[7,7,7,7,0]})))}}]),t}(p.Component),l.propTypes={keys:h.default.object,store:h.default.object,index:h.default.number},l.contextTypes={engine:h.default.object,scale:h.default.number},s=u))||s;t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,l,u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),p=r(c),f=n(1),d=r(f),h=(n(7),n(3)),y=n(12),m=(r(y),l=s=function(e){function t(e){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return a(t,e),u(t,[{key:"componentDidMount",value:function(){}},{key:"componentWillReceiveProps",value:function(e,t){}},{key:"componentWillUnmount",value:function(){}},{key:"getWrapperStyles",value:function(){return{position:"absolute",transform:"translate(0px, 0px) translateZ(0)",transformOrigin:"top left"}}},{key:"render",value:function(){return p.default.createElement("div",{style:this.getWrapperStyles()},p.default.createElement(h.TileMap,{src:"assets/background.jpg",rows:1,columns:3,tileSize:590,layers:[[1,2,3]]}))}}]),t}(c.Component),s.contextTypes={scale:d.default.number},l);t.default=m},function(e,t,n){e.exports=n(44)},function(e,t,n){"use strict";e.exports=n(45)},function(e,t,n){"use strict";e.exports.AppContainer=n(46)},function(e,t,n){"use strict";e.exports=n(47)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),l=s.Component,u=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"render",value:function(){return this.props.component?s.createElement(this.props.component,this.props.props):s.Children.only(this.props.children)}}]),t}(l);e.exports=u}]);