text: /*! vassiliskrikonis 2017-08-20 */
  
  function blastedToBodies(e){return e.map(function(e){var t=$(e),n=t.offset().left,i=t.offset().top,r=t.width(),o=t.height(),a=n+r/2,s=i+o/2,l=Matter.Bodies.rectangle(a,s,r,o,{frictionAir:.1});return l.origX=a,l.origY=s,l.ref=e,l})}function onTouchMove(e){var t=new Hammer(document.body);t.get("pan").set({direction:Hammer.DIRECTION_ALL}),t.on("pan",e)}function setPosition(e){return function(t){"mouse"!=t.pointerType&&Matter.Body.setPosition(e,Matter.Vector.create(t.center.x,t.center.y))}}function transformElementsFrom(e){e.forEach(function(e){if(!e.isSleeping){var t=e.ref,n=e.position.x-e.origX,i=e.position.y-e.origY;t.style.transform="translate("+n+"px, "+i+"px)"}})}$(function(){function e(){transformElementsFrom(i),requestAnimationFrame(e)}var t=$("p").blast({delimiter:"word"}).toArray(),n=Matter.Engine.create(),i=blastedToBodies(t);Matter.World.add(n.world,i);var r=Matter.Bodies.circle(0,0,30,{isStatic:!0});Matter.World.add(n.world,r),onTouchMove(setPosition(r)),e(),n.world.gravity.scale=1e-12,Matter.Engine.run(n)}),function(){for(var e,t=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"],n=t.length,i=window.console=window.console||{};n--;)i[e=t[n]]||(i[e]=function(){})}(),function(e,t,n,i){"use strict";function r(e,t,n){return setTimeout(c(e,n),t)}function o(e,t,n){return!!Array.isArray(e)&&(a(e,n[t],n),!0)}function a(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function s(t,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,r,i),t.apply(this,arguments)}}function l(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&ue(i,n)}function c(e,t){return function(){return e.apply(t,arguments)}}function u(e,t){return typeof e==fe?e.apply(t?t[0]||i:i,t):e}function d(e,t){return e===i?t:e}function p(e,t,n){a(v(t),function(t){e.addEventListener(t,n,!1)})}function f(e,t,n){a(v(t),function(t){e.removeEventListener(t,n,!1)})}function h(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function v(e){return e.trim().split(/\s+/g)}function g(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function y(e){return Array.prototype.slice.call(e,0)}function x(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];g(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function b(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),a=0;a<de.length;){if(n=de[a],(r=n?n+o:t)in e)return r;a++}return i}function w(){return xe++}function C(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function S(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){u(e.options.enable,[e])&&n.handler(t)},this.init()}function T(e){var t=e.options.inputClass;return new(t||(Ce?F:Se?H:we?V:_))(e,E)}function E(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&ke&&i-r==0,a=t&(Pe|Ne)&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,A(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function A(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=P(t)),r>1&&!n.firstMultiple?n.firstMultiple=P(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,l=t.center=N(i);t.timeStamp=ve(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=L(s,l),t.distance=D(s,l),k(n,t),t.offsetDirection=I(t.deltaX,t.deltaY);var c=B(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=me(c.x)>me(c.y)?c.x:c.y,t.scale=a?j(a.pointers,i):1,t.rotation=a?R(a.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,M(n,t);var u=e.element;h(t.srcEvent.target,u)&&(u=t.srcEvent.target),t.target=u}function k(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==ke&&o.eventType!==Pe||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function M(e,t){var n,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(t.eventType!=Ne&&(l>Ae||s.velocity===i)){var c=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,d=B(l,c,u);r=d.x,o=d.y,n=me(d.x)>me(d.y)?d.x:d.y,a=I(c,u),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}function P(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:he(e.pointers[n].clientX),clientY:he(e.pointers[n].clientY)},n++;return{timeStamp:ve(),pointers:t,center:N(t),deltaX:e.deltaX,deltaY:e.deltaY}}function N(e){var t=e.length;if(1===t)return{x:he(e[0].clientX),y:he(e[0].clientY)};for(var n=0,i=0,r=0;t>r;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:he(n/t),y:he(i/t)}}function B(e,t,n){return{x:t/e||0,y:n/e||0}}function I(e,t){return e===t?Be:me(e)>=me(t)?0>e?Ie:De:0>t?Le:Re}function D(e,t,n){n||(n=Oe);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function L(e,t,n){n||(n=Oe);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}function R(e,t){return L(t[1],t[0],qe)+L(e[1],e[0],qe)}function j(e,t){return D(t[0],t[1],qe)/D(e[0],e[1],qe)}function _(){this.evEl=We,this.evWin=Ve,this.pressed=!1,S.apply(this,arguments)}function F(){this.evEl=Xe,this.evWin=Ue,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ye,this.evWin=Qe,this.started=!1,S.apply(this,arguments)}function q(e,t){var n=y(e.touches),i=y(e.changedTouches);return t&(Pe|Ne)&&(n=x(n.concat(i),"identifier",!0)),[n,i]}function H(){this.evTarget=Ze,this.targetIds={},S.apply(this,arguments)}function W(e,t){var n=y(e.touches),i=this.targetIds;if(t&(ke|Me)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=y(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return h(e.target,l)}),t===ke)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),t&(Pe|Ne)&&delete i[a[r].identifier],r++;return s.length?[x(o.concat(s),"identifier",!0),s]:void 0}function V(){S.apply(this,arguments);var e=c(this.handler,this);this.touch=new H(this.manager,e),this.mouse=new _(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function z(e,t){e&ke?(this.primaryTouch=t.changedPointers[0].identifier,$.call(this,t)):e&(Pe|Ne)&&$.call(this,t)}function $(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)},Ke)}}function X(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(et>=o&&et>=a)return!0}return!1}function U(e,t){this.manager=e,this.set(t)}function G(e){if(m(e,at))return at;var t=m(e,st),n=m(e,lt);return t&&n?at:t||n?t?st:lt:m(e,ot)?ot:rt}function Y(e){this.options=ue({},this.defaults,e||{}),this.id=w(),this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=ut,this.simultaneous={},this.requireFail=[]}function Q(e){return e&mt?"cancel":e&ft?"end":e&pt?"move":e&dt?"start":""}function J(e){return e==Re?"down":e==Le?"up":e==Ie?"left":e==De?"right":""}function Z(e,t){var n=t.manager;return n?n.get(e):e}function K(){Y.apply(this,arguments)}function ee(){K.apply(this,arguments),this.pX=null,this.pY=null}function te(){K.apply(this,arguments)}function ne(){Y.apply(this,arguments),this._timer=null,this._input=null}function ie(){K.apply(this,arguments)}function re(){K.apply(this,arguments)}function oe(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ae(e,t){return t=t||{},t.recognizers=d(t.recognizers,ae.defaults.preset),new se(e,t)}function se(e,t){this.options=ue({},ae.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=T(this),this.touchAction=new U(this,this.options.touchAction),le(this,!0),a(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function le(e,t){var n=e.element;if(n.style){var i;a(e.options.cssProps,function(r,o){i=b(n.style,o),t?(e.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=e.oldCssProps[i]||""}),t||(e.oldCssProps={})}}function ce(e,n){var i=t.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=n,n.target.dispatchEvent(i)}var ue,de=["","webkit","Moz","MS","ms","o"],pe=t.createElement("div"),fe="function",he=Math.round,me=Math.abs,ve=Date.now;ue="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var ge=s(function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),ye=s(function(e,t){return ge(e,t,!0)},"merge","Use `assign`."),xe=1,be=/mobile|tablet|ip(ad|hone|od)|android/i,we="ontouchstart"in e,Ce=b(e,"PointerEvent")!==i,Se=we&&be.test(navigator.userAgent),Te="touch",Ee="mouse",Ae=25,ke=1,Me=2,Pe=4,Ne=8,Be=1,Ie=2,De=4,Le=8,Re=16,je=Ie|De,_e=Le|Re,Fe=je|_e,Oe=["x","y"],qe=["clientX","clientY"];S.prototype={handler:function(){},init:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(C(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(C(this.element),this.evWin,this.domHandler)}};var He={mousedown:ke,mousemove:Me,mouseup:Pe},We="mousedown",Ve="mousemove mouseup";l(_,S,{handler:function(e){var t=He[e.type];t&ke&&0===e.button&&(this.pressed=!0),t&Me&&1!==e.which&&(t=Pe),this.pressed&&(t&Pe&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Ee,srcEvent:e}))}});var ze={pointerdown:ke,pointermove:Me,pointerup:Pe,pointercancel:Ne,pointerout:Ne},$e={2:Te,3:"pen",4:Ee,5:"kinect"},Xe="pointerdown",Ue="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Xe="MSPointerDown",Ue="MSPointerMove MSPointerUp MSPointerCancel"),l(F,S,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=ze[i],o=$e[e.pointerType]||e.pointerType,a=o==Te,s=g(t,e.pointerId,"pointerId");r&ke&&(0===e.button||a)?0>s&&(t.push(e),s=t.length-1):r&(Pe|Ne)&&(n=!0),0>s||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var Ge={touchstart:ke,touchmove:Me,touchend:Pe,touchcancel:Ne},Ye="touchstart",Qe="touchstart touchmove touchend touchcancel";l(O,S,{handler:function(e){var t=Ge[e.type];if(t===ke&&(this.started=!0),this.started){var n=q.call(this,e,t);t&(Pe|Ne)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Te,srcEvent:e})}}});var Je={touchstart:ke,touchmove:Me,touchend:Pe,touchcancel:Ne},Ze="touchstart touchmove touchend touchcancel";l(H,S,{handler:function(e){var t=Je[e.type],n=W.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Te,srcEvent:e})}});var Ke=2500,et=25;l(V,S,{handler:function(e,t,n){var i=n.pointerType==Te,r=n.pointerType==Ee;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)z.call(this,t,n);else if(r&&X.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var tt=b(pe.style,"touchAction"),nt=tt!==i,it="compute",rt="auto",ot="manipulation",at="none",st="pan-x",lt="pan-y",ct=function(){if(!nt)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){t[i]=!n||e.CSS.supports("touch-action",i)}),t}();U.prototype={set:function(e){e==it&&(e=this.compute()),nt&&this.manager.element.style&&ct[e]&&(this.manager.element.style[tt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return a(this.manager.recognizers,function(t){u(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),G(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;{if(!this.manager.session.prevented){var i=this.actions,r=m(i,at)&&!ct[at],o=m(i,lt)&&!ct[lt],a=m(i,st)&&!ct[st];if(r){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}return a&&o?void 0:r||o&&n&je||a&&n&_e?this.preventSrc(t):void 0}t.preventDefault()}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ut=1,dt=2,pt=4,ft=8,ht=ft,mt=16;Y.prototype={defaults:{},set:function(e){return ue(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=Z(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)?this:(e=Z(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return e=Z(e,this),-1===g(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=Z(e,this);var t=g(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;ft>i&&t(n.options.event+Q(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=ft&&t(n.options.event+Q(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=32)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|ut)))return!1;e++}return!0},recognize:function(e){var t=ue({},e);return u(this.options.enable,[this,t])?(this.state&(ht|mt|32)&&(this.state=ut),this.state=this.process(t),void(this.state&(dt|pt|ft|mt)&&this.tryEmit(t))):(this.reset(),void(this.state=32))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(K,Y,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(dt|pt),r=this.attrTest(e);return i&&(n&Ne||!r)?t|mt:i||r?n&Pe?t|ft:t&dt?t|pt:dt:32}}),l(ee,K,{defaults:{event:"pan",threshold:10,pointers:1,direction:Fe},getTouchAction:function(){var e=this.options.direction,t=[];return e&je&&t.push(lt),e&_e&&t.push(st),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(t.direction&je?(r=0===o?Be:0>o?Ie:De,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?Be:0>a?Le:Re,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return K.prototype.attrTest.call(this,e)&&(this.state&dt||!(this.state&dt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=J(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(te,K,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&dt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(ne,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[rt]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(Pe|Ne)&&!o)this.reset();else if(e.eventType&ke)this.reset(),this._timer=r(function(){this.state=ht,this.tryEmit()},t.time,this);else if(e.eventType&Pe)return ht;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===ht&&(e&&e.eventType&Pe?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ve(),this.manager.emit(this.options.event,this._input)))}}),l(ie,K,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&dt)}}),l(re,K,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:je|_e,pointers:1},getTouchAction:function(){return ee.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(je|_e)?t=e.overallVelocity:n&je?t=e.overallVelocityX:n&_e&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&me(t)>this.options.velocity&&e.eventType&Pe},emit:function(e){var t=J(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(oe,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ot]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&ke&&0===this.count)return this.failTimeout();if(i&&o&&n){if(e.eventType!=Pe)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||D(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&a?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=r(function(){this.state=ht,this.tryEmit()},t.interval,this),dt):ht}return 32},failTimeout:function(){return this._timer=r(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ae.VERSION="2.0.8",ae.defaults={domEvents:!1,touchAction:it,enable:!0,inputTarget:null,inputClass:null,preset:[[ie,{enable:!1}],[te,{enable:!1},["rotate"]],[re,{direction:je}],[ee,{direction:je},["swipe"]],[oe],[oe,{event:"doubletap",taps:2},["tap"]],[ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};se.prototype={set:function(e){return ue(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&ht)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(dt|pt|ft)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Y)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=g(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return a(v(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return a(v(e),function(e){t?n[e]&&n[e].splice(g(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&ce(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&le(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ue(ae,{INPUT_START:ke,INPUT_MOVE:Me,INPUT_END:Pe,INPUT_CANCEL:Ne,STATE_POSSIBLE:ut,STATE_BEGAN:dt,STATE_CHANGED:pt,STATE_ENDED:ft,STATE_RECOGNIZED:ht,STATE_CANCELLED:mt,STATE_FAILED:32,DIRECTION_NONE:Be,DIRECTION_LEFT:Ie,DIRECTION_RIGHT:De,DIRECTION_UP:Le,DIRECTION_DOWN:Re,DIRECTION_HORIZONTAL:je,DIRECTION_VERTICAL:_e,DIRECTION_ALL:Fe,Manager:se,Input:S,TouchAction:U,TouchInput:H,MouseInput:_,PointerEventInput:F,TouchMouseInput:V,SingleTouchInput:O,Recognizer:Y,AttrRecognizer:K,Tap:oe,Pan:ee,Swipe:re,Pinch:te,Rotate:ie,Press:ne,on:p,off:f,each:a,merge:ye,extend:ge,assign:ue,inherit:l,bindFn:c,prefixed:b}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=ae,"function"==typeof define&&define.amd?define(function(){return ae}):"undefined"!=typeof module&&module.exports?module.exports=ae:e.Hammer=ae}(window,document),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function r(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(ke)||[],function(e,n){t[n]=!0}),t}function a(){ne.addEventListener?(ne.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ne.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ne.addEventListener||"load"===e.event.type||"complete"===ne.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Ie,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Be.test(n)?pe.parseJSON(n):n)}catch(e){}pe.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,i){if(Ne(e)){var r,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,c=s?e[a]:e[a]&&a;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[a]=te.pop()||pe.guid++:a),l[c]||(l[c]=s?{}:{toJSON:pe.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=pe.extend(l[c],t):l[c].data=pe.extend(l[c].data,t)),o=l[c],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?null==(r=o[t])&&(r=o[pe.camelCase(t)]):r=o,r}}function d(e,t,n){if(Ne(e)){var i,r,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in i?t=[t]:(t=pe.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!c(i):!pe.isEmptyObject(i))return}(n||(delete a[s].data,c(a[s])))&&(o?pe.cleanData([e],!0):ue.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function p(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return pe.css(e,t,"")},l=s(),c=n&&n[3]||(pe.cssNumber[t]?"":"px"),u=(pe.cssNumber[t]||"px"!==c&&+l)&&Le.exec(pe.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{o=o||".5",u/=o,pe.style(e,t,u+c)}while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function f(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,i,r=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||pe.nodeName(i,t)?o.push(i):pe.merge(o,h(i,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,i=0;null!=(n=e[i]);i++)pe._data(n,"globalEval",!t||pe._data(t[i],"globalEval"))}function v(e){Fe.test(e.type)&&(e.defaultChecked=e.checked)}function g(e,t,n,i,r){for(var o,a,s,l,c,u,d,p=e.length,g=f(t),y=[],x=0;p>x;x++)if((a=e[x])||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(ze.test(a)){for(l=l||g.appendChild(t.createElement("div")),c=(Oe.exec(a)||["",""])[1].toLowerCase(),d=Ve[c]||Ve._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!ue.leadingWhitespace&&He.test(a)&&y.push(t.createTextNode(He.exec(a)[0])),!ue.tbody)for(o=(a="table"!==c||$e.test(a)?"<table>"!==d[1]||$e.test(a)?0:l:l.firstChild)&&a.childNodes.length;o--;)pe.nodeName(u=a.childNodes[o],"tbody")&&!u.childNodes.length&&a.removeChild(u);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=g.lastChild}else y.push(t.createTextNode(a));for(l&&g.removeChild(l),ue.appendChecked||pe.grep(h(y,"input"),v),x=0;a=y[x++];)if(i&&pe.inArray(a,i)>-1)r&&r.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(g.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)qe.test(a.type||"")&&n.push(a);return l=null,g}function y(){return!0}function x(){return!1}function b(){try{return ne.activeElement}catch(e){}}function w(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)w(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=x;else if(!r)return e;return 1===o&&(a=r,r=function(e){return pe().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,r,i,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function S(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function T(e){var t=nt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,i,r,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)pe.event.add(t,n,s[n][i])}a.data&&(a.data=pe.extend({},a.data))}}function A(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ue.noCloneEvent&&t[pe.expando]){r=pe._data(t);for(i in r.events)pe.removeEvent(t,i,r.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(S(t).text=e.text,T(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ue.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Fe.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function k(e,t,n,i){t=re.apply([],t);var r,o,a,s,l,c,u=0,d=e.length,p=d-1,f=t[0],m=pe.isFunction(f);if(m||d>1&&"string"==typeof f&&!ue.checkClone&&tt.test(f))return e.each(function(r){var o=e.eq(r);m&&(t[0]=f.call(this,r,o.html())),k(o,t,n,i)});if(d&&(c=g(t,e[0].ownerDocument,!1,e,i),r=c.firstChild,1===c.childNodes.length&&(c=r),r||i)){for(a=(s=pe.map(h(c,"script"),S)).length;d>u;u++)o=c,u!==p&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[u],o,u);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,T),u=0;a>u;u++)o=s[u],qe.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(it,"")));c=r=null}return e}function M(e,t,n){for(var i,r=t?pe.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||pe.cleanData(h(i)),i.parentNode&&(n&&pe.contains(i.ownerDocument,i)&&m(h(i,"script")),i.parentNode.removeChild(i));return e}function P(e,t){var n=pe(t.createElement(e)).appendTo(t.body),i=pe.css(n[0],"display");return n.detach(),i}function N(e){var t=ne,n=at[e];return n||("none"!==(n=P(e,t))&&n||(ot=(ot||pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),(t=(ot[0].contentWindow||ot[0].contentDocument).document).write(),t.close(),n=P(e,t),ot.detach()),at[e]=n),n}function B(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function I(e){if(e in wt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=bt.length;n--;)if((e=bt[n]+t)in wt)return e}function D(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)(i=e[a]).style&&(o[a]=pe._data(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&je(i)&&(o[a]=pe._data(i,"olddisplay",N(i.nodeName)))):(r=je(i),(n&&"none"!==n||!r)&&pe._data(i,"olddisplay",r?n:pe.css(i,"display"))));for(a=0;s>a;a++)(i=e[a]).style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function L(e,t,n){var i=gt.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function R(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=pe.css(e,n+Re[o],!0,r)),i?("content"===n&&(a-=pe.css(e,"padding"+Re[o],!0,r)),"margin"!==n&&(a-=pe.css(e,"border"+Re[o]+"Width",!0,r))):(a+=pe.css(e,"padding"+Re[o],!0,r),"padding"!==n&&(a+=pe.css(e,"border"+Re[o]+"Width",!0,r)));return a}function j(t,n,i){var r=!0,o="width"===n?t.offsetWidth:t.offsetHeight,a=dt(t),s=ue.boxSizing&&"border-box"===pe.css(t,"boxSizing",!1,a);if(ne.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(o=Math.round(100*t.getBoundingClientRect()[n])),0>=o||null==o){if((0>(o=pt(t,n,a))||null==o)&&(o=t.style[n]),lt.test(o))return o;r=s&&(ue.boxSizingReliable()||o===t.style[n]),o=parseFloat(o)||0}return o+R(t,n,i||(s?"border":"content"),r,a)+"px"}function _(e,t,n,i,r){return new _.prototype.init(e,t,n,i,r)}function F(){return e.setTimeout(function(){Ct=void 0}),Ct=pe.now()}function O(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Re[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function q(e,t,n){for(var i,r=(W.tweeners[t]||[]).concat(W.tweeners["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function H(e,t){var n,i,r,o,a;for(n in e)if(i=pe.camelCase(n),r=t[i],o=e[n],pe.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),(a=pe.cssHooks[i])&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function W(e,t,n){var i,r,o=0,a=W.prefilters.length,s=pe.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=Ct||F(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),o=0,a=c.tweens.length;a>o;o++)c.tweens[o].run(i);return s.notifyWith(e,[c,i,n]),1>i&&a?n:(s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:pe.extend({},t),opts:pe.extend(!0,{specialEasing:{},easing:pe.easing._default},n),originalProperties:t,originalOptions:n,startTime:Ct||F(),duration:n.duration,tweens:[],createTween:function(t,n){var i=pe.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),u=c.props;for(H(u,c.opts.specialEasing);a>o;o++)if(i=W.prefilters[o].call(c,e,u,c.opts))return pe.isFunction(i.stop)&&(pe._queueHooks(c.elem,c.opts.queue).stop=pe.proxy(i.stop,i)),i;return pe.map(u,q,c),pe.isFunction(c.opts.start)&&c.opts.start.call(e,c),pe.fx.timer(pe.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function V(e){return pe.attr(e,"class")||""}function z(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(ke)||[];if(pe.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function $(e,t,n,i){function r(s){var l;return o[s]=!0,pe.each(e[s]||[],function(e,s){var c=s(t,n,i);return"string"!=typeof c||a||o[c]?a?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)}),l}var o={},a=e===Gt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function X(e,t){var n,i,r=pe.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&pe.extend(!0,e,n),e}function U(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function G(e,t,n,i){var r,o,a,s,l,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=c[l+" "+o]||c["* "+o]))for(r in c)if((s=r.split(" "))[1]===o&&(a=c[l+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[r]:!0!==c[r]&&(o=s[0],u.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function Y(e){return e.style&&e.style.display||pe.css(e,"display")}function Q(e){for(;e&&1===e.nodeType;){if("none"===Y(e)||"hidden"===e.type)return!0;e=e.parentNode}return!1}function J(e,t,n,i){var r;if(pe.isArray(t))pe.each(t,function(t,r){n||Kt.test(e)?i(e,r):J(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==pe.type(t))i(e,t);else for(r in t)J(e+"["+r+"]",t[r],n,i)}function Z(){try{return new e.XMLHttpRequest}catch(e){}}function K(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function ee(e){return pe.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var te=[],ne=e.document,ie=te.slice,re=te.concat,oe=te.push,ae=te.indexOf,se={},le=se.toString,ce=se.hasOwnProperty,ue={},de="1.12.0",pe=function(e,t){return new pe.fn.init(e,t)},fe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,he=/^-ms-/,me=/-([\da-z])/gi,ve=function(e,t){return t.toUpperCase()};pe.fn=pe.prototype={jquery:de,constructor:pe,selector:"",length:0,toArray:function(){return ie.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:ie.call(this)},pushStack:function(e){var t=pe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return pe.each(this,e)},map:function(e){return this.pushStack(pe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ie.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:oe,sort:te.sort,splice:te.splice},pe.extend=pe.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||pe.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(r=arguments[s]))for(i in r)e=a[i],n=r[i],a!==n&&(c&&n&&(pe.isPlainObject(n)||(t=pe.isArray(n)))?(t?(t=!1,o=e&&pe.isArray(e)?e:[]):o=e&&pe.isPlainObject(e)?e:{},a[i]=pe.extend(c,o,n)):void 0!==n&&(a[i]=n));return a},pe.extend({expando:"jQuery"+(de+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===pe.type(e)},isArray:Array.isArray||function(e){return"array"===pe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){var t=e&&e.toString();return!pe.isArray(e)&&t-parseFloat(t)+1>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!ue.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?se[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(he,"ms-").replace(me,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,r=0;if(n(e))for(i=e.length;i>r&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(fe,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?pe.merge(i,"string"==typeof e?[e]:e):oe.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(ae)return ae.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;)e[r++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,a=!n;o>r;r++)!t(e[r],r)!==a&&i.push(e[r]);return i},map:function(e,t,i){var r,o,a=0,s=[];if(n(e))for(r=e.length;r>a;a++)null!=(o=t(e[a],a,i))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,i))&&s.push(o);return re.apply([],s)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(r=e[t],t=e,e=r),pe.isFunction(e)?(n=ie.call(arguments,2),i=function(){return e.apply(t||this,n.concat(ie.call(arguments)))},i.guid=e.guid=e.guid||pe.guid++,i):void 0},now:function(){return+new Date},support:ue}),"function"==typeof Symbol&&(pe.fn[Symbol.iterator]=te[Symbol.iterator]),pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){se["[object "+t+"]"]=t.toLowerCase()});var ge=function(e){function t(e,t,n,i){var r,o,a,s,c,d,p,f,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!i&&((t?t.ownerDocument||t:F)!==N&&P(t),t=t||N,I)){if(11!==m&&(d=me.exec(e)))if(r=d[1]){if(9===m){if(!(a=t.getElementById(r)))return n;if(a.id===r)return n.push(a),n}else if(h&&(a=h.getElementById(r))&&j(t,a)&&a.id===r)return n.push(a),n}else{if(d[2])return Q.apply(n,t.getElementsByTagName(e)),n;if((r=d[3])&&x.getElementsByClassName&&t.getElementsByClassName)return Q.apply(n,t.getElementsByClassName(r)),n}if(x.qsa&&!V[e+" "]&&(!D||!D.test(e))){if(1!==m)h=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ge,"\\$&"):t.setAttribute("id",s=_),o=(p=S(e)).length,c=ue.test(s)?"#"+s:"[id='"+s+"']";o--;)p[o]=c+" "+u(p[o]);f=p.join(","),h=ve.test(e)&&l(t.parentNode)||t}if(f)try{return Q.apply(n,h.querySelectorAll(f)),n}catch(e){}finally{s===_&&t.removeAttribute("id")}}}return E(e.replace(oe,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>b.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[_]=!0,e}function r(e){var t=N.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)b.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||$)-(~e.sourceIndex||$);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function d(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=q++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,c,u=[O,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(c=t[_]||(t[_]={}),l=c[t.uniqueID]||(c[t.uniqueID]={}),(s=l[i])&&s[0]===O&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function f(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function h(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),c&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[_]&&(r=m(r)),o&&!o[_]&&(o=m(o,a)),i(function(i,a,s,l){var c,u,d,p=[],m=[],v=a.length,g=i||f(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?g:h(g,p,e,s,l),x=n?o||(i?e:v||r)?[]:a:y;if(n&&n(y,x,s,l),r)for(c=h(x,m),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(x[m[u]]=!(y[m[u]]=d));if(i){if(o||e){if(o){for(c=[],u=x.length;u--;)(d=x[u])&&c.push(y[u]=d);o(null,x=[],c,l)}for(u=x.length;u--;)(d=x[u])&&(c=o?Z(i,d):p[u])>-1&&(i[c]=!(a[c]=d))}}else x=h(x===a?x.splice(v,x.length):x),o?o(null,a,x,l):Q.apply(a,x)})}function v(e){for(var t,n,i,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Z(t,e)>-1},a,!0),f=[function(e,n,i){var r=!o&&(i||n!==A)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];r>s;s++)if(n=b.relative[e[s].type])f=[d(p(f),n)];else{if((n=b.filter[e[s].type].apply(null,e[s].matches))[_]){for(i=++s;r>i&&!b.relative[e[i].type];i++);return m(s>1&&p(f),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,i>s&&v(e.slice(s,i)),r>i&&v(e=e.slice(i)),r>i&&u(e))}f.push(n)}return p(f)}function g(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,c){var u,d,p,f=0,m="0",v=i&&[],g=[],y=A,x=i||o&&b.find.TAG("*",c),w=O+=null==y?1:Math.random()||.1,C=x.length;for(c&&(A=a===N||a||c);m!==C&&null!=(u=x[m]);m++){if(o&&u){for(d=0,a||u.ownerDocument===N||(P(u),s=!I);p=e[d++];)if(p(u,a||N,s)){l.push(u);break}c&&(O=w)}r&&((u=!p&&u)&&f--,i&&v.push(u))}if(f+=m,r&&m!==f){for(d=0;p=n[d++];)p(v,g,a,s);if(i){if(f>0)for(;m--;)v[m]||g[m]||(g[m]=G.call(l));g=h(g)}Q.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(O=w,A=y),v};return r?i(a):a}var y,x,b,w,C,S,T,E,A,k,M,P,N,B,I,D,L,R,j,_="sizzle"+1*new Date,F=e.document,O=0,q=0,H=n(),W=n(),V=n(),z=function(e,t){return e===t&&(M=!0),0},$=1<<31,X={}.hasOwnProperty,U=[],G=U.pop,Y=U.push,Q=U.push,J=U.slice,Z=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",ie=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",re=new RegExp(ee+"+","g"),oe=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ge=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},be=function(){P()};try{Q.apply(U=J.call(F.childNodes),F.childNodes),U[F.childNodes.length].nodeType}catch(e){Q={apply:U.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},P=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:F;return i!==N&&9===i.nodeType&&i.documentElement?(N=i,B=N.documentElement,I=!C(N),(n=N.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",be,!1):n.attachEvent&&n.attachEvent("onunload",be)),x.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=r(function(e){return e.appendChild(N.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=he.test(N.getElementsByClassName),x.getById=r(function(e){return B.appendChild(e).id=_,!N.getElementsByName||!N.getElementsByName(_).length}),x.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&I){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var t=e.replace(ye,xe);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),b.find.TAG=x.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},b.find.CLASS=x.getElementsByClassName&&function(e,t){return void 0!==t.getElementsByClassName&&I?t.getElementsByClassName(e):void 0},L=[],D=[],(x.qsa=he.test(N.querySelectorAll))&&(r(function(e){B.appendChild(e).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+K+")"),e.querySelectorAll("[id~="+_+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||D.push(".#.+[+~]")}),r(function(e){var t=N.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(x.matchesSelector=he.test(R=B.matches||B.webkitMatchesSelector||B.mozMatchesSelector||B.oMatchesSelector||B.msMatchesSelector))&&r(function(e){x.disconnectedMatch=R.call(e,"div"),R.call(e,"[s!='']:x"),L.push("!=",ie)}),D=D.length&&new RegExp(D.join("|")),L=L.length&&new RegExp(L.join("|")),t=he.test(B.compareDocumentPosition),j=t||he.test(B.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return M=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===N||e.ownerDocument===F&&j(F,e)?-1:t===N||t.ownerDocument===F&&j(F,t)?1:k?Z(k,e)-Z(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return M=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],l=[t];if(!r||!o)return e===N?-1:t===N?1:r?-1:o?1:k?Z(k,e)-Z(k,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===F?-1:l[i]===F?1:0},N):N},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==N&&P(e),n=n.replace(le,"='$1']"),x.matchesSelector&&I&&!V[n+" "]&&(!L||!L.test(n))&&(!D||!D.test(n)))try{var i=R.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,N,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==N&&P(e),j(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==N&&P(e);var n=b.attrHandle[t.toLowerCase()],i=n&&X.call(b.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==i?i:x.attributes||!I?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(M=!x.detectDuplicates,k=!x.sortStable&&e.slice(0),e.sort(z),M){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return k=null,e},w=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=w(t);return n},(b=t.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,p,f,h,m=o!==a?"nextSibling":"previousSibling",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!l&&!s,x=!1;if(v){if(o){for(;m;){for(p=t;p=p[m];)if(s?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(x=(f=(c=(u=(d=(p=v)[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===O&&c[1])&&c[2],p=f&&v.childNodes[f];p=++f&&p&&p[m]||(x=f=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){u[e]=[O,f,x];break}}else if(y&&(p=t,d=p[_]||(p[_]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),c=u[e]||[],f=c[0]===O&&c[1],x=f),!1===x)for(;(p=++f&&p&&p[m]||(x=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++x||(y&&(d=p[_]||(p[_]={}),u=d[p.uniqueID]||(d[p.uniqueID]={}),u[e]=[O,x]),p!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var r,o=b.pseudos[e]||b.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[_]?o(n):o.length>1?(r=[e,e,"",n],b.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=Z(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=T(e.replace(oe,"$1"));return r[_]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ye,xe),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,xe).toLowerCase(),function(t){var n;do{if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===B},focus:function(e){return e===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[0>n?n+t:n]}),even:s(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:s(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:s(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=b.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[y]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(y);for(y in{submit:!0,reset:!0})b.pseudos[y]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(y);return c.prototype=b.filters=b.pseudos,b.setFilters=new c,S=t.tokenize=function(e,n){var i,r,o,a,s,l,c,u=W[e+" "];if(u)return n?0:u.slice(0);for(s=e,l=[],c=b.preFilter;s;){(!i||(r=ae.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=se.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(oe," ")}),s=s.slice(i.length));for(a in b.filter)!(r=de[a].exec(s))||c[a]&&!(r=c[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):W(e,l).slice(0)},T=t.compile=function(e,t){var n,i=[],r=[],o=V[e+" "];if(!o){for(t||(t=S(e)),n=t.length;n--;)(o=v(t[n]))[_]?i.push(o):r.push(o);(o=V(e,g(r,i))).selector=e}return o},E=t.select=function(e,t,n,i){var r,o,a,s,c,d="function"==typeof e&&e,p=!i&&S(e=d.selector||e);if(n=n||[],1===p.length){if((o=p[0]=p[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&I&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(ye,xe),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(a=o[r],!b.relative[s=a.type]);)if((c=b.find[s])&&(i=c(a.matches[0].replace(ye,xe),ve.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&u(o)))return Q.apply(n,i),n;break}}return(d||T(e,p))(i,t,!I,n,!t||ve.test(e)&&l(t.parentNode)||t),n},x.sortStable=_.split("").sort(z).join("")===_,x.detectDuplicates=!!M,P(),x.sortDetached=r(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(K,function(e,t,n){var i;return n?void 0:!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);pe.find=ge,pe.expr=ge.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ge.uniqueSort,pe.text=ge.getText,pe.isXMLDoc=ge.isXML,pe.contains=ge.contains;var ye=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&pe(e).is(n))break;i.push(e)}return i},xe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},be=pe.expr.match.needsContext,we=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?pe.find.matchesSelector(i,e)?[i]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;r>t;t++)if(pe.contains(i[t],this))return!0}));for(t=0;r>t;t++)pe.find(e,i[t],n);return n=this.pushStack(r>1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&be.test(e)?pe(e):e||[],!1).length}});var Se,Te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pe.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Se,"string"==typeof e){if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Te.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),we.test(i[1])&&pe.isPlainObject(t))for(i in t)pe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if((r=ne.getElementById(i[2]))&&r.parentNode){if(r.id!==i[2])return Se.find(e);this.length=1,this[0]=r}return this.context=ne,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?void 0!==n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))}).prototype=pe.fn,Se=pe(ne);var Ee=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(pe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=be.test(e)||"string"!=typeof e?pe(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ye(e,"parentNode")},parentsUntil:function(e,t,n){return ye(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return ye(e,"nextSibling")},prevAll:function(e){return ye(e,"previousSibling")},nextUntil:function(e,t,n){return ye(e,"nextSibling",n)},prevUntil:function(e,t,n){return ye(e,"previousSibling",n)},siblings:function(e){return xe((e.parentNode||{}).firstChild,e)},children:function(e){return xe(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,i){var r=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=pe.filter(i,r)),this.length>1&&(Ae[e]||(r=pe.uniqueSort(r)),Ee.test(e)&&(r=r.reverse())),this.pushStack(r)}});var ke=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,i,r,a=[],s=[],l=-1,c=function(){for(r=e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l<a.length;)!1===a[l].apply(n[0],n[1])&&e.stopOnFalse&&(l=a.length,n=!1);e.memory||(n=!1),t=!1,r&&(a=n?[]:"")},u={add:function(){return a&&(n&&!t&&(l=a.length-1,s.push(n)),function t(n){pe.each(n,function(n,i){pe.isFunction(i)?e.unique&&u.has(i)||a.push(i):i&&i.length&&"string"!==pe.type(i)&&t(i)})}(arguments),n&&!t&&c()),this},remove:function(){return pe.each(arguments,function(e,t){for(var n;(n=pe.inArray(t,a,n))>-1;)a.splice(n,1),l>=n&&l--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=!0,n||u.disable(),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,i):i}},r={};return i.pipe=i.then,pe.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,l=1===s?e:pe.Deferred(),c=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?ie.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&pe.isFunction(o[r].promise)?o[r].promise().progress(c(r,n,t)).done(c(r,i,o)).fail(l.reject):--s;return s||l.resolveWith(i,o),l.promise()}});var Me;pe.fn.ready=function(e){return pe.ready.promise().done(e),this},pe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?pe.readyWait++:pe.ready(!0)},ready:function(e){(!0===e?--pe.readyWait:pe.isReady)||(pe.isReady=!0,!0!==e&&--pe.readyWait>0||(Me.resolveWith(ne,[pe]),pe.fn.triggerHandler&&(pe(ne).triggerHandler("ready"),pe(ne).off("ready"))))}}),pe.ready.promise=function(t){if(!Me)if(Me=pe.Deferred(),"complete"===ne.readyState)e.setTimeout(pe.ready);else if(ne.addEventListener)ne.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{ne.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&ne.documentElement}catch(e){}n&&n.doScroll&&function t(){if(!pe.isReady){try{n.doScroll("left")}catch(n){return e.setTimeout(t,50)}a(),pe.ready()}}()}return Me.promise(t)},pe.ready.promise();var Pe;for(Pe in pe(ue))break;ue.ownFirst="0"===Pe,ue.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,i;(n=ne.getElementsByTagName("body")[0])&&n.style&&(t=ne.createElement("div"),i=ne.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ue.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ne.createElement("div");ue.deleteExpando=!0;try{delete e.test}catch(e){ue.deleteExpando=!1}e=null}();var Ne=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},Be=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ie=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando])&&!c(e)},data:function(e,t,n){return u(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return u(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(i=a[n].name).indexOf("data-")&&(i=pe.camelCase(i.slice(5)),l(o,i,r[i]));pe._data(o,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?l(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=pe._data(e,t),n&&(!i||pe.isArray(n)?i=pe._data(e,t,pe.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),i=n.length,r=n.shift(),o=pe._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){pe.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?pe.queue(this[0],e):void 0===t?this:this.each(function(){var n=pe.queue(this,e,t);pe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&pe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){pe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=pe.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=pe._data(o[a],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}}),function(){var e;ue.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,n,i;return(n=ne.getElementsByTagName("body")[0])&&n.style?(t=ne.createElement("div"),i=ne.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(ne.createElement("div")).style.width="5px",e=3!==t.offsetWidth),n.removeChild(i),e):void 0}}();var De=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Le=new RegExp("^(?:([+-])=|)("+De+")([a-z%]*)$","i"),Re=["Top","Right","Bottom","Left"],je=function(e,t){return e=t||e,"none"===pe.css(e,"display")||!pe.contains(e.ownerDocument,e)},_e=function(e,t,n,i,r,o,a){var s=0,l=e.length,c=null==n;if("object"===pe.type(n)){r=!0;for(s in n)_e(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,pe.isFunction(i)||(a=!0),c&&(a?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(pe(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:c?t.call(e):l?t(e[0],n):o},Fe=/^(?:checkbox|radio)$/i,Oe=/<([\w:-]+)/,qe=/^$|\/(?:java|ecma)script/i,He=/^\s+/,We="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var e=ne.createElement("div"),t=ne.createDocumentFragment(),n=ne.createElement("input");e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ue.leadingWhitespace=3===e.firstChild.nodeType,ue.tbody=!e.getElementsByTagName("tbody").length,ue.htmlSerialize=!!e.getElementsByTagName("link").length,ue.html5Clone="<:nav></:nav>"!==ne.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),ue.appendChecked=n.checked,e.innerHTML="<textarea>x</textarea>",ue.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),(n=ne.createElement("input")).setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ue.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,ue.attributes=!e.getAttribute(pe.expando)}();var Ve={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ue.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Ve.optgroup=Ve.option,Ve.tbody=Ve.tfoot=Ve.colgroup=Ve.caption=Ve.thead,Ve.th=Ve.td;var ze=/<|&#?\w+;/,$e=/<tbody/i;!function(){var t,n,i=ne.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ue[t]=n in e)||(i.setAttribute(n,"t"),ue[t]=!1===i.attributes[n].expando);i=null}();var Xe=/^(?:input|select|textarea)$/i,Ue=/^key/,Ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ye=/^(?:focusinfocus|focusoutblur)$/,Qe=/^([^.]*)(?:\.(.+)|)/;pe.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,c,u,d,p,f,h,m,v=pe._data(e);if(v){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=pe.guid++),(a=v.events)||(a=v.events={}),(u=v.handle)||(u=v.handle=function(e){return void 0===pe||e&&pe.event.triggered===e.type?void 0:pe.event.dispatch.apply(u.elem,arguments)},u.elem=e),s=(t=(t||"").match(ke)||[""]).length;s--;)o=Qe.exec(t[s])||[],f=m=o[1],h=(o[2]||"").split(".").sort(),f&&(c=pe.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,c=pe.event.special[f]||{},d=pe.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&pe.expr.match.needsContext.test(r),namespace:h.join(".")},l),(p=a[f])||(p=a[f]=[],p.delegateCount=0,c.setup&&!1!==c.setup.call(e,i,h,u)||(e.addEventListener?e.addEventListener(f,u,!1):e.attachEvent&&e.attachEvent("on"+f,u))),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?p.splice(p.delegateCount++,0,d):p.push(d),pe.event.global[f]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,c,u,d,p,f,h,m,v=pe.hasData(e)&&pe._data(e);if(v&&(u=v.events)){for(c=(t=(t||"").match(ke)||[""]).length;c--;)if(s=Qe.exec(t[c])||[],f=m=s[1],h=(s[2]||"").split(".").sort(),f){for(d=pe.event.special[f]||{},p=u[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)a=p[o],!r&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,d.remove&&d.remove.call(e,a));l&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,v.handle)||pe.removeEvent(e,f,v.handle),delete u[f])}else for(f in u)pe.event.remove(e,f+t[c],n,i,!0);pe.isEmptyObject(u)&&(delete v.handle,pe._removeData(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,c,u,d,p=[i||ne],f=ce.call(t,"type")?t.type:t,h=ce.call(t,"namespace")?t.namespace.split("."):[];if(s=u=i=i||ne,3!==i.nodeType&&8!==i.nodeType&&!Ye.test(f+pe.event.triggered)&&(f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort()),a=f.indexOf(":")<0&&"on"+f,t=t[pe.expando]?t:new pe.Event(f,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:pe.makeArray(n,[t]),c=pe.event.special[f]||{},r||!c.trigger||!1!==c.trigger.apply(i,n))){if(!r&&!c.noBubble&&!pe.isWindow(i)){for(l=c.delegateType||f,Ye.test(l+f)||(s=s.parentNode);s;s=s.parentNode)p.push(s),u=s;u===(i.ownerDocument||ne)&&p.push(u.defaultView||u.parentWindow||e)}for(d=0;(s=p[d++])&&!t.isPropagationStopped();)t.type=d>1?l:c.bindType||f,(o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"))&&o.apply(s,n),(o=a&&s[a])&&o.apply&&Ne(s)&&(t.result=o.apply(s,n),!1===t.result&&t.preventDefault());if(t.type=f,!r&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(p.pop(),n))&&Ne(i)&&a&&i[f]&&!pe.isWindow(i)){(u=i[a])&&(i[a]=null),pe.event.triggered=f;try{i[f]()}catch(e){}pe.event.triggered=void 0,u&&(i[a]=u)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,i,r,o,a=[],s=ie.call(arguments),l=(pe._data(this,"events")||{})[e.type]||[],c=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=pe.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.rnamespace||e.rnamespace.test(o.namespace))&&(e.handleObj=o,e.data=o.data,void 0!==(i=((pe.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s))&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],n=0;s>n;n++)o=t[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?pe(r,this).index(l)>-1:pe.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&a.push({elem:l,handlers:i})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[pe.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Ge.test(r)?this.mouseHooks:Ue.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new pe.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||ne),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||ne,r=i.documentElement,n=i.body,e.pageX=t.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===b()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return pe.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return pe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n){var i=pe.extend(new pe.Event,n,{type:e,isSimulated:!0});pe.event.trigger(i,null,t),i.isDefaultPrevented()&&n.preventDefault()}},pe.removeEvent=ne.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)}:function(e,t,n){var i="on"+t;e.detachEvent&&(void 0===e[i]&&(e[i]=null),e.detachEvent(i,n))},pe.Event=function(e,t){return this instanceof pe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?y:x):this.type=e,t&&pe.extend(this,t),this.timeStamp=e&&e.timeStamp||pe.now(),void(this[pe.expando]=!0)):new pe.Event(e,t)},pe.Event.prototype={constructor:pe.Event,isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&!this.isSimulated&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},pe.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){pe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!pe.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ue.submit||(pe.event.special.submit={setup:function(){return!pe.nodeName(this,"form")&&void pe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=pe.nodeName(t,"input")||pe.nodeName(t,"button")?pe.prop(t,"form"):void 0;n&&!pe._data(n,"submit")&&(pe.event.add(n,"submit._submit",function(e){e._submitBubble=!0}),pe._data(n,"submit",!0))})},postDispatch:function(e){e._submitBubble&&(delete e._submitBubble,this.parentNode&&!e.isTrigger&&pe.event.simulate("submit",this.parentNode,e))},teardown:function(){return!pe.nodeName(this,"form")&&void pe.event.remove(this,"._submit")}}),ue.change||(pe.event.special.change={setup:function(){return Xe.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(pe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._justChanged=!0)}),pe.event.add(this,"click._change",function(e){this._justChanged&&!e.isTrigger&&(this._justChanged=!1),pe.event.simulate("change",this,e)})),!1):void pe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Xe.test(t.nodeName)&&!pe._data(t,"change")&&(pe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||pe.event.simulate("change",this.parentNode,e)}),pe._data(t,"change",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return pe.event.remove(this,"._change"),!Xe.test(this.nodeName)}}),ue.focusin||pe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){pe.event.simulate(t,e.target,pe.event.fix(e))};pe.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=pe._data(i,t);r||i.addEventListener(e,n,!0),pe._data(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=pe._data(i,t)-1;r?pe._data(i,t,r):(i.removeEventListener(e,n,!0),pe._removeData(i,t))}}}),pe.fn.extend({on:function(e,t,n,i){return w(this,e,t,n,i)},one:function(e,t,n,i){return w(this,e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,pe(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return(!1===t||"function"==typeof t)&&(n=t,t=void 0),!1===n&&(n=x),this.each(function(){pe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){pe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?pe.event.trigger(e,t,n,!0):void 0}});var Je=/ jQuery\d+="(?:null|\d+)"/g,Ze=new RegExp("<(?:"+We+")[\\s/>]","i"),Ke=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,et=/<script|<style|<link/i,tt=/checked\s*(?:[^=]|=\s*.checked.)/i,nt=/^true\/(.*)/,it=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rt=f(ne).appendChild(ne.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(Ke,"<$1></$2>")},clone:function(e,t,n){var i,r,o,a,s,l=pe.contains(e.ownerDocument,e);if(ue.html5Clone||pe.isXMLDoc(e)||!Ze.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(rt.innerHTML=e.outerHTML,rt.removeChild(o=rt.firstChild)),!(ue.noCloneEvent&&ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(i=h(o),s=h(e),a=0;null!=(r=s[a]);++a)i[a]&&A(r,i[a]);if(t)if(n)for(s=s||h(e),i=i||h(o),a=0;null!=(r=s[a]);a++)E(r,i[a]);else E(e,o);return(i=h(o,"script")).length>0&&m(i,!l&&h(e,"script")),i=s=r=null,o},cleanData:function(e,t){for(var n,i,r,o,a=0,s=pe.expando,l=pe.cache,c=ue.attributes,u=pe.event.special;null!=(n=e[a]);a++)if((t||Ne(n))&&(r=n[s],o=r&&l[r])){if(o.events)for(i in o.events)u[i]?pe.event.remove(n,i):pe.removeEvent(n,i,o.handle);l[r]&&(delete l[r],c||void 0===n.removeAttribute?n[s]=void 0:n.removeAttribute(s),te.push(r))}}}),pe.fn.extend({domManip:k,detach:function(e){return M(this,e,!0)},remove:function(e){return M(this,e)},text:function(e){return _e(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ne).createTextNode(e))},null,e,arguments.length)},append:function(){return k(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||C(this,e).appendChild(e)})},prepend:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return _e(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Je,""):void 0;if("string"==typeof e&&!et.test(e)&&(ue.htmlSerialize||!Ze.test(e))&&(ue.leadingWhitespace||!He.test(e))&&!Ve[(Oe.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;i>n;n++)1===(t=this[n]||{}).nodeType&&(pe.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return k(this,arguments,function(t){var n=this.parentNode;pe.inArray(this,e)<0&&(pe.cleanData(h(this)),n&&n.replaceChild(t,this))},e)}}),pe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){pe.fn[e]=function(e){for(var n,i=0,r=[],o=pe(e),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),pe(o[i])[t](n),oe.apply(r,n.get());return this.pushStack(r)}});var ot,at={HTML:"block",BODY:"block"},st=/^margin/,lt=new RegExp("^("+De+")(?!px)[a-z%]+$","i"),ct=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r},ut=ne.documentElement;!function(){function t(){var t,u,d=ne.documentElement;d.appendChild(l),c.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=r=s=!1,i=a=!0,e.getComputedStyle&&(u=e.getComputedStyle(c),n="1%"!==(u||{}).top,s="2px"===(u||{}).marginLeft,r="4px"===(u||{width:"4px"}).width,c.style.marginRight="50%",i="4px"===(u||{marginRight:"4px"}).marginRight,t=c.appendChild(ne.createElement("div")),t.style.cssText=c.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",c.style.width="1px",a=!parseFloat((e.getComputedStyle(t)||{}).marginRight),c.removeChild(t)),c.style.display="none",(o=0===c.getClientRects().length)&&(c.style.display="",c.innerHTML="<table><tr><td></td><td>t</td></tr></table>",t=c.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),d.removeChild(l)}var n,i,r,o,a,s,l=ne.createElement("div"),c=ne.createElement("div");c.style&&(c.style.cssText="float:left;opacity:.5",ue.opacity="0.5"===c.style.opacity,ue.cssFloat=!!c.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",ue.clearCloneStyle="content-box"===c.style.backgroundClip,(l=ne.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.innerHTML="",l.appendChild(c),ue.boxSizing=""===c.style.boxSizing||""===c.style.MozBoxSizing||""===c.style.WebkitBoxSizing,pe.extend(ue,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),r},pixelMarginRight:function(){return null==n&&t(),i},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var dt,pt,ft=/^(top|right|bottom|left)$/;e.getComputedStyle?(dt=function(t){var n=t.ownerDocument.defaultView;return n.opener||(n=e),n.getComputedStyle(t)},pt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||dt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),!ue.pixelMarginRight()&&lt.test(a)&&st.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0===a?a:a+""}):ut.currentStyle&&(dt=function(e){return e.currentStyle},pt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||dt(e),null==(a=n?n[t]:void 0)&&s&&s[t]&&(a=s[t]),lt.test(a)&&!ft.test(t)&&(i=s.left,r=e.runtimeStyle,(o=r&&r.left)&&(r.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),void 0===a?a:a+""||"auto"});var ht=/alpha\([^)]*\)/i,mt=/opacity\s*=\s*([^)]*)/i,vt=/^(none|table(?!-c[ea]).+)/,gt=new RegExp("^("+De+")(.*)$","i"),yt={position:"absolute",visibility:"hidden",display:"block"},xt={letterSpacing:"0",fontWeight:"400"},bt=["Webkit","O","Moz","ms"],wt=ne.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=pt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:ue.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=pe.camelCase(t),l=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=I(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];if("string"===(o=typeof n)&&(r=Le.exec(n))&&r[1]&&(n=p(e,t,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(pe.cssNumber[s]?"":"px")),ue.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var r,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=I(s)||s),(a=pe.cssHooks[t]||pe.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=pt(e,t,i)),"normal"===o&&t in xt&&(o=xt[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,i){return n?vt.test(pe.css(e,"display"))&&0===e.offsetWidth?ct(e,yt,function(){return j(e,t,i)}):j(e,t,i):void 0},set:function(e,n,i){var r=i&&dt(e);return L(0,n,i?R(e,t,i,ue.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,r),r):0)}}}),ue.opacity||(pe.cssHooks.opacity={get:function(e,t){return mt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(ht,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=ht.test(o)?o.replace(ht,r):o+" "+r)}}),pe.cssHooks.marginRight=B(ue.reliableMarginRight,function(e,t){return t?ct(e,{display:"inline-block"},pt,[e,"marginRight"]):void 0}),pe.cssHooks.marginLeft=B(ue.reliableMarginLeft,function(e,t){return t?(parseFloat(pt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ct(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px":void 0}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Re[i]+t]=o[i]||o[i-2]||o[0];return r}},st.test(e)||(pe.cssHooks[e+t].set=L)}),pe.fn.extend({css:function(e,t){return _e(this,function(e,t,n){var i,r,o={},a=0;if(pe.isArray(t)){for(i=dt(e),r=t.length;r>a;a++)o[t[a]]=pe.css(e,t[a],!1,i);return o}return void 0!==n?pe.style(e,t,n):pe.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){je(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=_,_.prototype={constructor:_,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=_.propHooks[this.prop];return e&&e.get?e.get(this):_.propHooks._default.get(this)},run:function(e){var t,n=_.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):_.propHooks._default.set(this),this}},_.prototype.init.prototype=_.prototype,_.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},_.propHooks.scrollTop=_.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=_.prototype.init,pe.fx.step={};var Ct,St,Tt=/^(?:toggle|show|hide)$/,Et=/queueHooks$/;pe.Animation=pe.extend(W,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return p(n.elem,e,Le.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(ke);for(var n,i=0,r=e.length;r>i;i++)n=e[i],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,r,o,a,s,l,c,u=this,d={},p=e.style,f=e.nodeType&&je(e),h=pe._data(e,"fxshow");n.queue||(null==(s=pe._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,pe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===("none"===(c=pe.css(e,"display"))?pe._data(e,"olddisplay")||N(e.nodeName):c)&&"none"===pe.css(e,"float")&&(ue.inlineBlockNeedsLayout&&"inline"!==N(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ue.shrinkWrapBlocks()||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],Tt.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!h||void 0===h[i])continue;f=!0}d[i]=h&&h[i]||pe.style(e,i)}else c=void 0;if(pe.isEmptyObject(d))"inline"===("none"===c?N(e.nodeName):c)&&(p.display=c);else{h?"hidden"in h&&(f=h.hidden):h=pe._data(e,"fxshow",{}),o&&(h.hidden=!f),f?pe(e).show():u.done(function(){pe(e).hide()}),u.done(function(){var t;pe._removeData(e,"fxshow");for(t in d)pe.style(e,t,d[t])});for(i in d)a=q(f?h[i]:0,i,u),i in h||(h[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}],prefilter:function(e,t){t?W.prefilters.unshift(e):W.prefilters.push(e)}}),pe.speed=function(e,t,n){var i=e&&"object"==typeof e?pe.extend({},e):{complete:n||!n&&t||pe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!pe.isFunction(t)&&t};return i.duration=pe.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in pe.fx.speeds?pe.fx.speeds[i.duration]:pe.fx.speeds._default,(null==i.queue||!0===i.queue)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){pe.isFunction(i.old)&&i.old.call(this),i.queue&&pe.dequeue(this,i.queue)},i},pe.fn.extend({fadeTo:function(e,t,n,i){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=pe.isEmptyObject(e),o=pe.speed(t,n,i),a=function(){var t=W(this,pe.extend({},e),o);(r||pe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,r||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=pe.timers,a=pe._data(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&Et.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));(t||!n)&&pe.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=pe._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=pe.timers,a=i?i.length:0;for(n.finish=!0,pe.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),pe.each(["toggle","show","hide"],function(e,t){var n=pe.fn[t];pe.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(O(t,!0),e,i,r)}}),pe.each({slideDown:O("show"),slideUp:O("hide"),slideToggle:O("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){pe.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),pe.timers=[],pe.fx.tick=function(){var e,t=pe.timers,n=0;for(Ct=pe.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||pe.fx.stop(),Ct=void 0},pe.fx.timer=function(e){pe.timers.push(e),e()?pe.fx.start():pe.timers.pop()},pe.fx.interval=13,pe.fx.start=function(){St||(St=e.setInterval(pe.fx.tick,pe.fx.interval))},pe.fx.stop=function(){e.clearInterval(St),St=null},pe.fx.speeds={slow:600,fast:200,_default:400},pe.fn.delay=function(t,n){return t=pe.fx?pe.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var r=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(r)}})},function(){var e,t=ne.createElement("input"),n=ne.createElement("div"),i=ne.createElement("select"),r=i.appendChild(ne.createElement("option"));(n=ne.createElement("div")).setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),(e=n.getElementsByTagName("a")[0]).style.cssText="top:1px",ue.getSetAttribute="t"!==n.className,ue.style=/top/.test(e.getAttribute("style")),ue.hrefNormalized="/a"===e.getAttribute("href"),ue.checkOn=!!t.value,ue.optSelected=r.selected,ue.enctype=!!ne.createElement("form").enctype,i.disabled=!0,ue.optDisabled=!r.disabled,(t=ne.createElement("input")).setAttribute("value",""),ue.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ue.radioValue="t"===t.value}();var At=/\r/g;pe.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=pe.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,pe(this).val()):e)?r="":"number"==typeof r?r+="":pe.isArray(r)&&(r=pe.map(r,function(e){return null==e?"":e+""})),(t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=pe.valHooks[r.type]||pe.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(At,""):null==n?"":n:void 0}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e))}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(((n=i[l]).selected||l===r)&&(ue.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!pe.nodeName(n.parentNode,"optgroup"))){if(t=pe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=pe.makeArray(t),a=r.length;a--;)if(i=r[a],pe.inArray(pe.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(e){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){return pe.isArray(t)?e.checked=pe.inArray(pe(e).val(),t)>-1:void 0}},ue.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var kt,Mt,Pt=pe.expr.attrHandle,Nt=/^(?:checked|selected)$/i,Bt=ue.getSetAttribute,It=ue.input;pe.fn.extend({attr:function(e,t){return _e(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),r=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Mt:kt)),void 0!==n?null===n?void pe.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=pe.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!ue.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(ke);if(o&&1===e.nodeType)for(;n=o[r++];)i=pe.propFix[n]||n,pe.expr.match.bool.test(n)?It&&Bt||!Nt.test(n)?e[i]=!1:e[pe.camelCase("default-"+n)]=e[i]=!1:pe.attr(e,n,""),e.removeAttribute(Bt?n:i)}}),Mt={set:function(e,t,n){return!1===t?pe.removeAttr(e,n):It&&Bt||!Nt.test(n)?e.setAttribute(!Bt&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Pt[t]||pe.find.attr;It&&Bt||!Nt.test(t)?Pt[t]=function(e,t,i){var r,o;return i||(o=Pt[t],Pt[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,Pt[t]=o),r}:Pt[t]=function(e,t,n){return n?void 0:e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),It&&Bt||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):kt&&kt.set(e,t,n)}}),Bt||(kt={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Pt.id=Pt.name=Pt.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:kt.set},pe.attrHooks.contenteditable={set:function(e,t,n){kt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),ue.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Dt=/^(?:input|select|textarea|button|object)$/i,Lt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return _e(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),pe.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,r=pe.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Dt.test(e.nodeName)||Lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ue.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ue.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),ue.enctype||(pe.propFix.enctype="encoding");var Rt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,i,r,o,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,V(this)))});if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=V(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(a=0;o=t[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(s=pe.trim(i))&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,i,r,o,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,V(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(ke)||[];n=this[l++];)if(r=V(n),i=1===n.nodeType&&(" "+r+" ").replace(Rt," ")){for(a=0;o=t[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(s=pe.trim(i))&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,V(this),t),t)}):this.each(function(){var t,i,r,o;if("string"===n)for(i=0,r=pe(this),o=e.match(ke)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(void 0===e||"boolean"===n)&&((t=V(this))&&pe._data(this,"__className__",t),pe.attr(this,"class",t||!1===e?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+V(n)+" ").replace(Rt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var jt=e.location,_t=pe.now(),Ft=/\?/,Ot=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,r=pe.trim(t+"");return r&&!pe.trim(r.replace(Ot,function(e,t,r,o){return n&&t&&(i=0),0===i?e:(n=r||t,i+=!o-!r,"")}))?Function("return "+r)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new e.DOMParser,n=i.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var qt=/#.*$/,Ht=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,zt=/^(?:GET|HEAD)$/,$t=/^\/\//,Xt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ut={},Gt={},Yt="*/".concat("*"),Qt=jt.href,Jt=Xt.exec(Qt.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Qt,type:"GET",isLocal:Vt.test(Jt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,pe.ajaxSettings),t):X(pe.ajaxSettings,e)},ajaxPrefilter:z(Ut),ajaxTransport:z(Gt),ajax:function(t,n){function i(t,n,i,r){var o,d,y,x,w,S=n;2!==b&&(b=2,l&&e.clearTimeout(l),u=void 0,s=r||"",C.readyState=t>0?4:0,o=t>=200&&300>t||304===t,i&&(x=U(p,C,i)),x=G(p,x,C,o),o?(p.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(pe.lastModified[a]=w),(w=C.getResponseHeader("etag"))&&(pe.etag[a]=w)),204===t||"HEAD"===p.type?S="nocontent":304===t?S="notmodified":(S=x.state,d=x.data,y=x.error,o=!y)):(y=S,(t||!S)&&(S="error",0>t&&(t=0))),C.status=t,C.statusText=(n||S)+"",o?m.resolveWith(f,[d,S,C]):m.rejectWith(f,[C,S,y]),C.statusCode(g),g=void 0,c&&h.trigger(o?"ajaxSuccess":"ajaxError",[C,p,o?d:y]),v.fireWith(f,[C,S]),c&&(h.trigger("ajaxComplete",[C,p]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,o,a,s,l,c,u,d,p=pe.ajaxSetup({},n),f=p.context||p,h=p.context&&(f.nodeType||f.jquery)?pe(f):pe.event,m=pe.Deferred(),v=pe.Callbacks("once memory"),g=p.statusCode||{},y={},x={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!d)for(d={};t=Wt.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),i(0,t),this}};if(m.promise(C).complete=v.add,C.success=C.done,C.error=C.fail,p.url=((t||p.url||Qt)+"").replace(qt,"").replace($t,Jt[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=pe.trim(p.dataType||"*").toLowerCase().match(ke)||[""],null==p.crossDomain&&(r=Xt.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===Jt[1]&&r[2]===Jt[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Jt[3]||("http:"===Jt[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=pe.param(p.data,p.traditional)),$(Ut,p,n,C),2===b)return C;(c=pe.event&&p.global)&&0==pe.active++&&pe.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!zt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(Ft.test(a)?"&":"?")+p.data,delete p.data),!1===p.cache&&(p.url=Ht.test(a)?a.replace(Ht,"$1_="+_t++):a+(Ft.test(a)?"&":"?")+"_="+_t++)),p.ifModified&&(pe.lastModified[a]&&C.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&C.setRequestHeader("If-None-Match",pe.etag[a])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Yt+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)C.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(!1===p.beforeSend.call(f,C,p)||2===b))return C.abort();w="abort";for(o in{success:1,error:1,complete:1})C[o](p[o]);if(u=$(Gt,p,n,C)){if(C.readyState=1,c&&h.trigger("ajaxSend",[C,p]),2===b)return C;p.async&&p.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,i)}catch(e){if(!(2>b))throw e;i(-1,e)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,i,r){return pe.isFunction(n)&&(r=r||i,i=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:r,data:n,success:i},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return ue.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Q(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var Zt=/%20/g,Kt=/\[\]$/,en=/\r?\n/g,tn=/^(?:submit|button|image|reset|file)$/i,nn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,i=[],r=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){r(this.name,this.value)});else for(n in e)J(n,e[n],t,r);return i.join("&").replace(Zt,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&nn.test(this.nodeName)&&!tn.test(e)&&(this.checked||!Fe.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(en,"\r\n")}}):{name:t.name,value:n.replace(en,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?K():ne.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||K()}:Z;var rn=0,on={},an=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in on)on[e](void 0,!0)}),ue.cors=!!an&&"withCredentials"in an,(an=ue.ajax=!!an)&&pe.ajaxTransport(function(t){if(!t.crossDomain||ue.cors){var n;return{send:function(i,r){var o,a=t.xhr(),s=++rn;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)void 0!==i[o]&&a.setRequestHeader(o,i[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,i){var o,l,c;if(n&&(i||4===a.readyState))if(delete on[s],n=void 0,a.onreadystatechange=pe.noop,i)4!==a.readyState&&a.abort();else{c={},o=a.status,"string"==typeof a.responseText&&(c.text=a.responseText);try{l=a.statusText}catch(e){l=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=c.text?200:404}c&&r(o,l,c,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=on[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ne.head||pe("head")[0]||ne.documentElement;return{send:function(i,r){(t=ne.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||r(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var sn=[],ln=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=sn.pop()||pe.expando+"_"+_t++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=!1!==t.jsonp&&(ln.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ln.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ln,"$1"+r):!1!==t.jsonp&&(t.url+=(Ft.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||pe.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){void 0===o?pe(e).removeProp(r):e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,sn.push(r)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),ue.createHTMLDocument=function(){if(!ne.implementation.createHTMLDocument)return!1;var e=ne.implementation.createHTMLDocument("");return e.body.innerHTML="<form></form><form></form>",2===e.body.childNodes.length}(),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||(ue.createHTMLDocument?ne.implementation.createHTMLDocument(""):ne);var i=we.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=g([e],t,r),r&&r.length&&pe(r).remove(),pe.merge([],i.childNodes))};var cn=pe.fn.load;pe.fn.load=function(e,t,n){if("string"!=typeof e&&cn)return cn.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>-1&&(i=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&pe.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(i?pe("<div>").append(pe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){a.each(function(){n.apply(a,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,c=pe.css(e,"position"),u=pe(e),d={};"static"===c&&(e.style.position="relative"),s=u.offset(),o=pe.css(e,"top"),l=pe.css(e,"left"),("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,l])>-1?(i=u.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+r),"using"in t?t.using.call(e,d):u.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;return o?(t=o.documentElement,pe.contains(t,r)?(void 0!==r.getBoundingClientRect&&(i=r.getBoundingClientRect()),n=ee(o),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===pe.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0)-e.scrollTop(),n.left+=pe.css(e[0],"borderLeftWidth",!0)-e.scrollLeft()),{top:t.top-n.top-pe.css(i,"marginTop",!0),left:t.left-n.left-pe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||ut})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(i){return _e(this,function(e,i,r){var o=ee(e);return void 0===r?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(n?pe(o).scrollLeft():r,n?r:pe(o).scrollTop()):e[i]=r)},e,i,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=B(ue.pixelPosition,function(e,n){return n?(n=pt(e,t),lt.test(n)?pe(e).position()[t]+"px":n):void 0})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){pe.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return _e(this,function(t,n,i){var r;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?pe.css(t,n,a):pe.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var un=e.jQuery,dn=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=dn),t&&e.jQuery===pe&&(e.jQuery=un),pe},t||(e.jQuery=e.$=pe),pe}),function(e,t,n,i){var r=function(){if(n.documentMode)return n.documentMode;for(var e=7;e>0;e--){var t=n.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]><span></span><![endif]--\x3e",t.getElementsByTagName("span").length)return t=null,e;t=null}return i}(),o=t.console||{log:function(){},time:function(){}},a="blast",s={latinPunctuation:"–—′’'“″„\"(«.…¡¿′’'”″“\")».…!?",latinLetters:"\\u0041-\\u005A\\u0061-\\u007A\\u00C0-\\u017F\\u0100-\\u01FF\\u0180-\\u027F"},l={abbreviations:new RegExp("[^"+s.latinLetters+"](e\\.g\\.)|(i\\.e\\.)|(mr\\.)|(mrs\\.)|(ms\\.)|(dr\\.)|(prof\\.)|(esq\\.)|(sr\\.)|(jr\\.)[^"+s.latinLetters+"]","ig"),innerWordPeriod:new RegExp("["+s.latinLetters+"].["+s.latinLetters+"]","ig"),onlyContainsPunctuation:new RegExp("[^"+s.latinPunctuation+"]"),adjoinedPunctuation:new RegExp("^["+s.latinPunctuation+"]+|["+s.latinPunctuation+"]+$","g"),skippedElements:/(script|style|select|textarea)/i,hasPluginClass:new RegExp("(^| )"+a+"( |$)","gi")};e.fn[a]=function(c){function u(e){return e.replace(l.abbreviations,function(e){return e.replace(/\./g,"{{46}}")}).replace(l.innerWordPeriod,function(e){return e.replace(/\./g,"{{46}}")})}function d(e){return e.replace(/{{(\d{1,3})}}/g,function(e,t){return String.fromCharCode(t)})}function p(e,t){var i=n.createElement(t.tag);if(i.className=a,t.customClass&&(i.className+=" "+t.customClass,t.generateIndexID&&(i.id=t.customClass+"-"+g.blastedIndex)),"all"===t.delimiter&&/\s/.test(e.data)&&(i.style.whiteSpace="pre-line"),!0===t.generateValueClass&&!t.search&&("character"===t.delimiter||"word"===t.delimiter)){var r,o=e.data;"word"===t.delimiter&&l.onlyContainsPunctuation.test(o)&&(o=o.replace(l.adjoinedPunctuation,"")),r=a+"-"+t.delimiter.toLowerCase()+"-"+o.toLowerCase(),i.className+=" "+r}return t.aria&&i.setAttribute("aria-hidden","true"),i.appendChild(e.cloneNode(!1)),i}function f(e,t){var n=-1,i=0;if(3===e.nodeType&&e.data.length){if(g.nodeBeginning&&(e.data=t.search||"sentence"!==t.delimiter?d(e.data):u(e.data),g.nodeBeginning=!1),-1!==(n=e.data.search(m))){var r=e.data.match(m),o=r[0],a=r[1]||!1;""===o?n++:a&&a!==o&&(n+=o.indexOf(a),o=a);var s=e.splitText(n);s.splitText(o.length),i=1,t.search||"sentence"!==t.delimiter||(s.data=d(s.data));var c=p(s,t,g.blastedIndex);s.parentNode.replaceChild(c,s),g.wrappers.push(c),g.blastedIndex++}}else if(1===e.nodeType&&e.hasChildNodes()&&!l.skippedElements.test(e.tagName)&&!l.hasPluginClass.test(e.className))for(var h=0;h<e.childNodes.length;h++)g.nodeBeginning=!0,h+=f(e.childNodes[h],t);return i}function h(n,s){s.debug&&o.time("blast reversal");var l=!1;n.removeClass(a+"-root").removeAttr("aria-label").find("."+a).each(function(){if(e(this).closest("."+a+"-root").length)l=!0;else{var t=this.parentNode;7>=r&&t.firstChild.nodeName,t.replaceChild(this.firstChild,this),t.normalize()}}),t.Zepto?n.data(a,i):n.removeData(a),s.debug&&(o.log(a+": Reversed Blast"+(n.attr("id")?" on #"+n.attr("id")+".":".")+(l?" Skipped reversal on the children of one or more descendant root elements.":"")),o.timeEnd("blast reversal"))}var m,v=e.extend({},e.fn[a].defaults,c),g={};if(v.search.length&&("string"==typeof v.search||/^\d/.test(parseFloat(v.search))))v.delimiter=v.search.toString().replace(/[-[\]{,}(.)*+?|^$\\\/]/g,"\\$&"),m=new RegExp("(?:^|[^-"+s.latinLetters+"])("+v.delimiter+"('s)?)(?![-"+s.latinLetters+"])","i");else switch("string"==typeof v.delimiter&&(v.delimiter=v.delimiter.toLowerCase()),v.delimiter){case"all":m=/(.)/;break;case"letter":case"char":case"character":m=/(\S)/;break;case"word":m=/\s*(\S+)\s*/;break;case"sentence":m=/(?=\S)(([.]{2,})?[^!?]+?([.…!?]+|(?=\s+$)|$)(\s*[′’'”″“")»]+)*)/;break;case"element":m=/(?=\S)([\S\s]*\S)/;break;default:if(!(v.delimiter instanceof RegExp))return o.log(a+": Unrecognized delimiter, empty search string, or invalid custom Regex. Aborting."),!0;m=v.delimiter}if(this.each(function(){var t=e(this),r=t.text();if(!1!==c){g={blastedIndex:0,nodeBeginning:!1,wrappers:g.wrappers||[]},t.data(a)===i||"search"===t.data(a)&&!1!==v.search||(h(t,v),v.debug&&o.log(a+": Removed element's existing Blast call.")),t.data(a,!1!==v.search?"search":v.delimiter),v.aria&&t.attr("aria-label",r),v.stripHTMLTags&&t.html(r);try{n.createElement(v.tag)}catch(e){v.tag="span",v.debug&&o.log(a+": Invalid tag supplied. Defaulting to span.")}t.addClass(a+"-root"),v.debug&&o.time(a),f(this,v),v.debug&&o.timeEnd(a)}else!1===c&&t.data(a)!==i&&h(t,v);v.debug&&e.each(g.wrappers,function(e,t){o.log(a+" ["+v.delimiter+"] "+this.outerHTML),this.style.backgroundColor=e%2?"#f12185":"#075d9a"})}),!1!==c&&!0===v.returnGenerated){var y=e().add(g.wrappers);return y.prevObject=this,y.context=this.context,y}return this},e.fn.blast.defaults={returnGenerated:!0,delimiter:"word",tag:"span",search:!1,customClass:"",generateIndexID:!1,generateValueClass:!1,stripHTMLTags:!1,aria:!0,debug:!1}}(window.jQuery||window.Zepto,window,document),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Matter=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return r(n||e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../geometry/Vector"),a=e("../core/Sleeping"),s=(e("../render/Render"),e("../core/Common")),l=e("../geometry/Bounds"),c=e("../geometry/Axes");!function(){i._inertiaScale=4,i._nextCollidingGroupId=1,i._nextNonCollidingGroupId=-1,i._nextCategory=1,i.create=function(t){var n={id:s.nextId(),type:"body",label:"Body",parts:[],angle:0,vertices:r.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:1.5}},i=s.extend(n,t);return e(i,t),i},i.nextGroup=function(e){return e?i._nextNonCollidingGroupId--:i._nextCollidingGroupId++},i.nextCategory=function(){return i._nextCategory=i._nextCategory<<1,i._nextCategory};var e=function(e,t){i.set(e,{bounds:e.bounds||l.create(e.vertices),positionPrev:e.positionPrev||o.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}),r.rotate(e.vertices,e.angle,e.position),c.rotate(e.axes,e.angle),l.update(e.bounds,e.vertices,e.velocity),i.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?"#eeeeee":s.choose(["#556270","#4ECDC4","#C7F464","#FF6B6B","#C44D58"]),a=s.shadeColor(n,-20);e.render.fillStyle=e.render.fillStyle||n,e.render.strokeStyle=e.render.strokeStyle||a,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)};i.set=function(e,t,n){var r;"string"==typeof t&&(r=t,t={},t[r]=n);for(r in t)if(n=t[r],t.hasOwnProperty(r))switch(r){case"isStatic":i.setStatic(e,n);break;case"isSleeping":a.set(e,n);break;case"mass":i.setMass(e,n);break;case"density":i.setDensity(e,n);break;case"inertia":i.setInertia(e,n);break;case"vertices":i.setVertices(e,n);break;case"position":i.setPosition(e,n);break;case"angle":i.setAngle(e,n);break;case"velocity":i.setVelocity(e,n);break;case"angularVelocity":i.setAngularVelocity(e,n);break;case"parts":i.setParts(e,n);break;default:e[r]=n}},i.setStatic=function(e,t){for(var n=0;n<e.parts.length;n++){var i=e.parts[n];i.isStatic=t,t&&(i.restitution=0,i.friction=1,i.mass=i.inertia=i.density=1/0,i.inverseMass=i.inverseInertia=0,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.anglePrev=i.angle,i.angularVelocity=0,i.speed=0,i.angularSpeed=0,i.motion=0)}},i.setMass=function(e,t){e.mass=t,e.inverseMass=1/e.mass,e.density=e.mass/e.area},i.setDensity=function(e,t){i.setMass(e,t*e.area),e.density=t},i.setInertia=function(e,t){e.inertia=t,e.inverseInertia=1/e.inertia},i.setVertices=function(e,t){t[0].body===e?e.vertices=t:e.vertices=r.create(t,e),e.axes=c.fromVertices(e.vertices),e.area=r.area(e.vertices),i.setMass(e,e.density*e.area);var n=r.centre(e.vertices);r.translate(e.vertices,n,-1),i.setInertia(e,i._inertiaScale*r.inertia(e.vertices,e.mass)),r.translate(e.vertices,e.position),l.update(e.bounds,e.vertices,e.velocity)},i.setParts=function(e,n,o){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(o=void 0===o||o){var l=[];for(a=0;a<n.length;a++)l=l.concat(n[a].vertices);r.clockwiseSort(l);var c=r.hull(l),u=r.centre(c);i.setVertices(e,c),r.translate(e.vertices,u)}var d=t(e);e.area=d.area,e.parent=e,e.position.x=d.centre.x,e.position.y=d.centre.y,e.positionPrev.x=d.centre.x,e.positionPrev.y=d.centre.y,i.setMass(e,d.mass),i.setInertia(e,d.inertia),i.setPosition(e,d.centre)}},i.setPosition=function(e,t){var n=o.sub(t,e.position);e.positionPrev.x+=n.x,e.positionPrev.y+=n.y;for(var i=0;i<e.parts.length;i++){var a=e.parts[i];a.position.x+=n.x,a.position.y+=n.y,r.translate(a.vertices,n),l.update(a.bounds,a.vertices,e.velocity)}},i.setAngle=function(e,t){var n=t-e.angle;e.anglePrev+=n;for(var i=0;i<e.parts.length;i++){var a=e.parts[i];a.angle+=n,r.rotate(a.vertices,n,e.position),c.rotate(a.axes,n),l.update(a.bounds,a.vertices,e.velocity),i>0&&o.rotateAbout(a.position,n,e.position,a.position)}},i.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=o.magnitude(e.velocity)},i.setAngularVelocity=function(e,t){e.anglePrev=e.angle-t,e.angularVelocity=t,e.angularSpeed=Math.abs(e.angularVelocity)},i.translate=function(e,t){i.setPosition(e,o.add(e.position,t))},i.rotate=function(e,t){i.setAngle(e,e.angle+t)},i.scale=function(e,n,o,a){for(var s=0;s<e.parts.length;s++){var u=e.parts[s];r.scale(u.vertices,n,o,e.position),u.axes=c.fromVertices(u.vertices),e.isStatic||(u.area=r.area(u.vertices),i.setMass(u,e.density*u.area),r.translate(u.vertices,{x:-u.position.x,y:-u.position.y}),i.setInertia(u,r.inertia(u.vertices,u.mass)),r.translate(u.vertices,{x:u.position.x,y:u.position.y})),l.update(u.bounds,u.vertices,e.velocity)}if(e.circleRadius&&(n===o?e.circleRadius*=n:e.circleRadius=null),!e.isStatic){var d=t(e);e.area=d.area,i.setMass(e,d.mass),i.setInertia(e,d.inertia)}},i.update=function(e,t,n,i){var a=Math.pow(t*n*e.timeScale,2),s=1-e.frictionAir*n*e.timeScale,u=e.position.x-e.positionPrev.x,d=e.position.y-e.positionPrev.y;e.velocity.x=u*s*i+e.force.x/e.mass*a,e.velocity.y=d*s*i+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*i+e.torque/e.inertia*a,e.anglePrev=e.angle,e.angle+=e.angularVelocity,e.speed=o.magnitude(e.velocity),e.angularSpeed=Math.abs(e.angularVelocity);for(var p=0;p<e.parts.length;p++){var f=e.parts[p];r.translate(f.vertices,e.velocity),p>0&&(f.position.x+=e.velocity.x,f.position.y+=e.velocity.y),0!==e.angularVelocity&&(r.rotate(f.vertices,e.angularVelocity,e.position),c.rotate(f.axes,e.angularVelocity),p>0&&o.rotateAbout(f.position,e.angularVelocity,e.position,f.position)),l.update(f.bounds,f.vertices,e.velocity)}},i.applyForce=function(e,t,n){e.force.x+=n.x,e.force.y+=n.y;var i={x:t.x-e.position.x,y:t.y-e.position.y};e.torque+=i.x*n.y-i.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 i=e.parts[n];t.mass+=i.mass,t.area+=i.area,t.inertia+=i.inertia,t.centre=o.add(t.centre,o.mult(i.position,i.mass!==1/0?i.mass:1))}return t.centre=o.div(t.centre,t.mass!==1/0?t.mass:e.parts.length),t}}()},{"../core/Common":14,"../core/Sleeping":20,"../geometry/Axes":23,"../geometry/Bounds":24,"../geometry/Vector":26,"../geometry/Vertices":27,"../render/Render":29}],2:[function(e,t,n){var i={};t.exports=i;var r=e("../core/Events"),o=e("../core/Common"),a=e("./Body");i.create=function(e){return o.extend({id:o.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite"},e)},i.setModified=function(e,t,n,r){if(e.isModified=t,n&&e.parent&&i.setModified(e.parent,t,n,r),r)for(var o=0;o<e.composites.length;o++){var a=e.composites[o];i.setModified(a,t,n,r)}},i.add=function(e,t){var n=[].concat(t);r.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){o.log("Composite.add: skipped adding a compound body part (you must add its parent instead)","warn");break}i.addBody(e,s);break;case"constraint":i.addConstraint(e,s);break;case"composite":i.addComposite(e,s);break;case"mouseConstraint":i.addConstraint(e,s.constraint)}}return r.trigger(e,"afterAdd",{object:t}),e},i.remove=function(e,t,n){var o=[].concat(t);r.trigger(e,"beforeRemove",{object:t});for(var a=0;a<o.length;a++){var s=o[a];switch(s.type){case"body":i.removeBody(e,s,n);break;case"constraint":i.removeConstraint(e,s,n);break;case"composite":i.removeComposite(e,s,n);break;case"mouseConstraint":i.removeConstraint(e,s.constraint)}}return r.trigger(e,"afterRemove",{object:t}),e},i.addComposite=function(e,t){return e.composites.push(t),t.parent=e,i.setModified(e,!0,!0,!1),e},i.removeComposite=function(e,t,n){var r=o.indexOf(e.composites,t);if(-1!==r&&(i.removeCompositeAt(e,r),i.setModified(e,!0,!0,!1)),n)for(var a=0;a<e.composites.length;a++)i.removeComposite(e.composites[a],t,!0);return e},i.removeCompositeAt=function(e,t){return e.composites.splice(t,1),i.setModified(e,!0,!0,!1),e},i.addBody=function(e,t){return e.bodies.push(t),i.setModified(e,!0,!0,!1),e},i.removeBody=function(e,t,n){var r=o.indexOf(e.bodies,t);if(-1!==r&&(i.removeBodyAt(e,r),i.setModified(e,!0,!0,!1)),n)for(var a=0;a<e.composites.length;a++)i.removeBody(e.composites[a],t,!0);return e},i.removeBodyAt=function(e,t){return e.bodies.splice(t,1),i.setModified(e,!0,!0,!1),e},i.addConstraint=function(e,t){return e.constraints.push(t),i.setModified(e,!0,!0,!1),e},i.removeConstraint=function(e,t,n){var r=o.indexOf(e.constraints,t);if(-1!==r&&i.removeConstraintAt(e,r),n)for(var a=0;a<e.composites.length;a++)i.removeConstraint(e.composites[a],t,!0);return e},i.removeConstraintAt=function(e,t){return e.constraints.splice(t,1),i.setModified(e,!0,!0,!1),e},i.clear=function(e,t,n){if(n)for(var r=0;r<e.composites.length;r++)i.clear(e.composites[r],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,i.setModified(e,!0,!0,!1),e},i.allBodies=function(e){for(var t=[].concat(e.bodies),n=0;n<e.composites.length;n++)t=t.concat(i.allBodies(e.composites[n]));return t},i.allConstraints=function(e){for(var t=[].concat(e.constraints),n=0;n<e.composites.length;n++)t=t.concat(i.allConstraints(e.composites[n]));return t},i.allComposites=function(e){for(var t=[].concat(e.composites),n=0;n<e.composites.length;n++)t=t.concat(i.allComposites(e.composites[n]));return t},i.get=function(e,t,n){var r,o;switch(n){case"body":r=i.allBodies(e);break;case"constraint":r=i.allConstraints(e);break;case"composite":r=i.allComposites(e).concat(e)}return r?0===(o=r.filter(function(e){return e.id.toString()===t.toString()})).length?null:o[0]:null},i.move=function(e,t,n){return i.remove(e,t),i.add(n,t),e},i.rebase=function(e){for(var t=i.allBodies(e).concat(i.allConstraints(e)).concat(i.allComposites(e)),n=0;n<t.length;n++)t[n].id=o.nextId();return i.setModified(e,!0,!0,!1),e},i.translate=function(e,t,n){for(var r=n?i.allBodies(e):e.bodies,o=0;o<r.length;o++)a.translate(r[o],t);return i.setModified(e,!0,!0,!1),e},i.rotate=function(e,t,n,r){for(var o=Math.cos(t),s=Math.sin(t),l=r?i.allBodies(e):e.bodies,c=0;c<l.length;c++){var u=l[c],d=u.position.x-n.x,p=u.position.y-n.y;a.setPosition(u,{x:n.x+(d*o-p*s),y:n.y+(d*s+p*o)}),a.rotate(u,t)}return i.setModified(e,!0,!0,!1),e},i.scale=function(e,t,n,r,o){for(var s=o?i.allBodies(e):e.bodies,l=0;l<s.length;l++){var c=s[l],u=c.position.x-r.x,d=c.position.y-r.y;a.setPosition(c,{x:r.x+u*t,y:r.y+d*n}),a.scale(c,t,n)}return i.setModified(e,!0,!0,!1),e}},{"../core/Common":14,"../core/Events":16,"./Body":1}],3:[function(e,t,n){var i={};t.exports=i;var r=e("./Composite"),o=(e("../constraint/Constraint"),e("../core/Common"));i.create=function(e){var t=r.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 o.extend(t,n,e)}},{"../constraint/Constraint":12,"../core/Common":14,"./Composite":2}],4:[function(e,t,n){var i={};t.exports=i,i.create=function(e){return{id:i.id(e),vertex:e,normalImpulse:0,tangentImpulse:0}},i.id=function(e){return e.body.id+"_"+e.index}},{}],5:[function(e,t,n){var i={};t.exports=i;var r=e("./SAT"),o=e("./Pair"),a=e("../geometry/Bounds");i.collisions=function(e,t){for(var n=[],s=t.pairs.table,l=0;l<e.length;l++){var c=e[l][0],u=e[l][1];if((!c.isStatic&&!c.isSleeping||!u.isStatic&&!u.isSleeping)&&i.canCollide(c.collisionFilter,u.collisionFilter)&&a.overlaps(c.bounds,u.bounds))for(var d=c.parts.length>1?1:0;d<c.parts.length;d++)for(var p=c.parts[d],f=u.parts.length>1?1:0;f<u.parts.length;f++){var h=u.parts[f];if(p===c&&h===u||a.overlaps(p.bounds,h.bounds)){var m,v=s[o.id(p,h)];m=v&&v.isActive?v.collision:null;var g=r.collides(p,h,m);g.collided&&n.push(g)}}}return n},i.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":24,"./Pair":7,"./SAT":11}],6:[function(e,t,n){var i={};t.exports=i;var r=e("./Pair"),o=e("./Detector"),a=e("../core/Common");!function(){i.create=function(e){var t={controller:i,detector:o.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return a.extend(t,e)},i.update=function(n,i,r,o){var a,p,f,h,m,v=r.world,g=n.buckets,y=!1;for(a=0;a<i.length;a++){var x=i[a];if((!x.isSleeping||o)&&!(x.bounds.max.x<v.bounds.min.x||x.bounds.min.x>v.bounds.max.x||x.bounds.max.y<v.bounds.min.y||x.bounds.min.y>v.bounds.max.y)){var b=t(n,x);if(!x.region||b.id!==x.region.id||o){x.region&&!o||(x.region=b);var w=e(b,x.region);for(p=w.startCol;p<=w.endCol;p++)for(f=w.startRow;f<=w.endRow;f++){h=g[m=s(p,f)];var C=p>=b.startCol&&p<=b.endCol&&f>=b.startRow&&f<=b.endRow,S=p>=x.region.startCol&&p<=x.region.endCol&&f>=x.region.startRow&&f<=x.region.endRow;!C&&S&&S&&h&&u(n,h,x),(x.region===b||C&&!S||o)&&(h||(h=l(g,m)),c(n,h,x))}x.region=b,y=!0}}}y&&(n.pairsList=d(n))},i.clear=function(e){e.buckets={},e.pairs={},e.pairsList=[]};var e=function(e,t){var i=Math.min(e.startCol,t.startCol),r=Math.max(e.endCol,t.endCol),o=Math.min(e.startRow,t.startRow),a=Math.max(e.endRow,t.endRow);return n(i,r,o,a)},t=function(e,t){var i=t.bounds,r=Math.floor(i.min.x/e.bucketWidth),o=Math.floor(i.max.x/e.bucketWidth),a=Math.floor(i.min.y/e.bucketHeight),s=Math.floor(i.max.y/e.bucketHeight);return n(r,o,a,s)},n=function(e,t,n,i){return{id:e+","+t+","+n+","+i,startCol:e,endCol:t,startRow:n,endRow:i}},s=function(e,t){return e+","+t},l=function(e,t){return e[t]=[]},c=function(e,t,n){for(var i=0;i<t.length;i++){var o=t[i];if(!(n.id===o.id||n.isStatic&&o.isStatic)){var a=r.id(n,o),s=e.pairs[a];s?s[2]+=1:e.pairs[a]=[n,o,1]}}t.push(n)},u=function(e,t,n){t.splice(a.indexOf(t,n),1);for(var i=0;i<t.length;i++){var o=t[i],s=r.id(n,o),l=e.pairs[s];l&&(l[2]-=1)}},d=function(e){var t,n,i=[];t=a.keys(e.pairs);for(var r=0;r<t.length;r++)(n=e.pairs[t[r]])[2]>0?i.push(n):delete e.pairs[t[r]];return i}}()},{"../core/Common":14,"./Detector":5,"./Pair":7}],7:[function(e,t,n){var i={};t.exports=i;var r=e("./Contact");i.create=function(e,t){var n=e.bodyA,r=e.bodyB,o=e.parentA,a=e.parentB,s={id:i.id(n,r),bodyA:n,bodyB:r,contacts:{},activeContacts:[],separation:0,isActive:!0,isSensor:n.isSensor||r.isSensor,timeCreated:t,timeUpdated:t,inverseMass:o.inverseMass+a.inverseMass,friction:Math.min(o.friction,a.friction),frictionStatic:Math.max(o.frictionStatic,a.frictionStatic),restitution:Math.max(o.restitution,a.restitution),slop:Math.max(o.slop,a.slop)};return i.update(s,e,t),s},i.update=function(e,t,n){var o=e.contacts,a=t.supports,s=e.activeContacts,l=t.parentA,c=t.parentB;if(e.collision=t,e.inverseMass=l.inverseMass+c.inverseMass,e.friction=Math.min(l.friction,c.friction),e.frictionStatic=Math.max(l.frictionStatic,c.frictionStatic),e.restitution=Math.max(l.restitution,c.restitution),e.slop=Math.max(l.slop,c.slop),s.length=0,t.collided){for(var u=0;u<a.length;u++){var d=a[u],p=r.id(d),f=o[p];f?s.push(f):s.push(o[p]=r.create(d))}e.separation=t.depth,i.setActive(e,!0,n)}else!0===e.isActive&&i.setActive(e,!1,n)},i.setActive=function(e,t,n){t?(e.isActive=!0,e.timeUpdated=n):(e.isActive=!1,e.activeContacts.length=0)},i.id=function(e,t){return e.id<t.id?e.id+"_"+t.id:t.id+"_"+e.id}},{"./Contact":4}],8:[function(e,t,n){var i={};t.exports=i;var r=e("./Pair"),o=e("../core/Common");i.create=function(e){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},e)},i.update=function(e,t,n){var i,a,s,l,c=e.list,u=e.table,d=e.collisionStart,p=e.collisionEnd,f=e.collisionActive,h=[];for(d.length=0,p.length=0,f.length=0,l=0;l<t.length;l++)(i=t[l]).collided&&(a=r.id(i.bodyA,i.bodyB),h.push(a),(s=u[a])?(s.isActive?f.push(s):d.push(s),r.update(s,i,n)):(s=r.create(i,n),u[a]=s,d.push(s),c.push(s)));for(l=0;l<c.length;l++)(s=c[l]).isActive&&-1===o.indexOf(h,s.id)&&(r.setActive(s,!1,n),p.push(s))},i.removeOld=function(e,t){var n,i,r,o,a=e.list,s=e.table,l=[];for(o=0;o<a.length;o++)n=a[o],(i=n.collision).bodyA.isSleeping||i.bodyB.isSleeping?n.timeUpdated=t:t-n.timeUpdated>1e3&&l.push(o);for(o=0;o<l.length;o++)r=l[o]-o,n=a[r],delete s[n.id],a.splice(r,1)},i.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 i={};t.exports=i;var r=e("../geometry/Vector"),o=e("./SAT"),a=e("../geometry/Bounds"),s=e("../factory/Bodies"),l=e("../geometry/Vertices");i.ray=function(e,t,n,i){i=i||1e-100;for(var l=r.angle(t,n),c=r.magnitude(r.sub(t,n)),u=.5*(n.x+t.x),d=.5*(n.y+t.y),p=s.rectangle(u,d,c,i,{angle:l}),f=[],h=0;h<e.length;h++){var m=e[h];if(a.overlaps(m.bounds,p.bounds))for(var v=1===m.parts.length?0:1;v<m.parts.length;v++){var g=m.parts[v];if(a.overlaps(g.bounds,p.bounds)){var y=o.collides(g,p);if(y.collided){y.body=y.bodyA=y.bodyB=m,f.push(y);break}}}}return f},i.region=function(e,t,n){for(var i=[],r=0;r<e.length;r++){var o=e[r],s=a.overlaps(o.bounds,t);(s&&!n||!s&&n)&&i.push(o)}return i},i.point=function(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];if(a.contains(r.bounds,t))for(var o=1===r.parts.length?0:1;o<r.parts.length;o++){var s=r.parts[o];if(a.contains(s.bounds,t)&&l.contains(s.vertices,t)){n.push(r);break}}}return n}},{"../factory/Bodies":21,"../geometry/Bounds":24,"../geometry/Vector":26,"../geometry/Vertices":27,"./SAT":11}],10:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../geometry/Vector"),a=e("../core/Common"),s=e("../geometry/Bounds");i._restingThresh=4,i._restingThreshTangent=6,i._positionDampen=.9,i._positionWarming=.8,i._frictionNormalMultiplier=5,i.preSolvePosition=function(e){var t,n,i;for(t=0;t<e.length;t++)(n=e[t]).isActive&&(i=n.activeContacts.length,n.collision.parentA.totalContacts+=i,n.collision.parentB.totalContacts+=i)},i.solvePosition=function(e,t){var n,r,a,s,l,c,u,d,p,f=o._temp[0],h=o._temp[1],m=o._temp[2],v=o._temp[3];for(n=0;n<e.length;n++)(r=e[n]).isActive&&!r.isSensor&&(a=r.collision,s=a.parentA,l=a.parentB,c=a.normal,u=o.sub(o.add(l.positionImpulse,l.position,f),o.add(s.positionImpulse,o.sub(l.position,a.penetration,h),m),v),r.separation=o.dot(c,u));for(n=0;n<e.length;n++)!(r=e[n]).isActive||r.isSensor||r.separation<0||(a=r.collision,s=a.parentA,l=a.parentB,c=a.normal,p=(r.separation-r.slop)*t,(s.isStatic||l.isStatic)&&(p*=2),s.isStatic||s.isSleeping||(d=i._positionDampen/s.totalContacts,s.positionImpulse.x+=c.x*p*d,s.positionImpulse.y+=c.y*p*d),l.isStatic||l.isSleeping||(d=i._positionDampen/l.totalContacts,l.positionImpulse.x-=c.x*p*d,l.positionImpulse.y-=c.y*p*d))},i.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];r.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,o.dot(n.positionImpulse,n.velocity)<0?(n.positionImpulse.x=0,n.positionImpulse.y=0):(n.positionImpulse.x*=i._positionWarming,n.positionImpulse.y*=i._positionWarming)}}},i.preSolveVelocity=function(e){var t,n,i,r,a,s,l,c,u,d,p,f,h,m,v=o._temp[0],g=o._temp[1];for(t=0;t<e.length;t++)if((i=e[t]).isActive&&!i.isSensor)for(r=i.activeContacts,a=i.collision,s=a.parentA,l=a.parentB,c=a.normal,u=a.tangent,n=0;n<r.length;n++)d=r[n],p=d.vertex,f=d.normalImpulse,h=d.tangentImpulse,0===f&&0===h||(v.x=c.x*f+u.x*h,v.y=c.y*f+u.y*h,s.isStatic||s.isSleeping||(m=o.sub(p,s.position,g),s.positionPrev.x+=v.x*s.inverseMass,s.positionPrev.y+=v.y*s.inverseMass,s.anglePrev+=o.cross(m,v)*s.inverseInertia),l.isStatic||l.isSleeping||(m=o.sub(p,l.position,g),l.positionPrev.x-=v.x*l.inverseMass,l.positionPrev.y-=v.y*l.inverseMass,l.anglePrev-=o.cross(m,v)*l.inverseInertia))},i.solveVelocity=function(e,t){for(var n=t*t,r=o._temp[0],s=o._temp[1],l=o._temp[2],c=o._temp[3],u=o._temp[4],d=o._temp[5],p=0;p<e.length;p++){var f=e[p];if(f.isActive&&!f.isSensor){var h=f.collision,m=h.parentA,v=h.parentB,g=h.normal,y=h.tangent,x=f.activeContacts,b=1/x.length;m.velocity.x=m.position.x-m.positionPrev.x,m.velocity.y=m.position.y-m.positionPrev.y,v.velocity.x=v.position.x-v.positionPrev.x,v.velocity.y=v.position.y-v.positionPrev.y,m.angularVelocity=m.angle-m.anglePrev,v.angularVelocity=v.angle-v.anglePrev;for(var w=0;w<x.length;w++){var C=x[w],S=C.vertex,T=o.sub(S,m.position,s),E=o.sub(S,v.position,l),A=o.add(m.velocity,o.mult(o.perp(T),m.angularVelocity),c),k=o.add(v.velocity,o.mult(o.perp(E),v.angularVelocity),u),M=o.sub(A,k,d),P=o.dot(g,M),N=o.dot(y,M),B=Math.abs(N),I=a.sign(N),D=(1+f.restitution)*P,L=a.clamp(f.separation+P,0,1)*i._frictionNormalMultiplier,R=N,j=1/0;B>f.friction*f.frictionStatic*L*n&&(j=B,R=a.clamp(f.friction*I*n,-j,j));var _=o.cross(T,g),F=o.cross(E,g),O=b/(m.inverseMass+v.inverseMass+m.inverseInertia*_*_+v.inverseInertia*F*F);if(D*=O,R*=O,0>P&&P*P>i._restingThresh*n)C.normalImpulse=0;else{var q=C.normalImpulse;C.normalImpulse=Math.min(C.normalImpulse+D,0),D=C.normalImpulse-q}if(N*N>i._restingThreshTangent*n)C.tangentImpulse=0;else{var H=C.tangentImpulse;C.tangentImpulse=a.clamp(C.tangentImpulse+R,-j,j),R=C.tangentImpulse-H}r.x=g.x*D+y.x*R,r.y=g.y*D+y.y*R,m.isStatic||m.isSleeping||(m.positionPrev.x+=r.x*m.inverseMass,m.positionPrev.y+=r.y*m.inverseMass,m.anglePrev+=o.cross(T,r)*m.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=r.x*v.inverseMass,v.positionPrev.y-=r.y*v.inverseMass,v.anglePrev-=o.cross(E,r)*v.inverseInertia)}}}}},{"../core/Common":14,"../geometry/Bounds":24,"../geometry/Vector":26,"../geometry/Vertices":27}],11:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../geometry/Vector");!function(){i.collides=function(t,i,a){var s,l,c,u,d=a,p=!1;if(d){var f=t.parent,h=i.parent,m=f.speed*f.speed+f.angularSpeed*f.angularSpeed+h.speed*h.speed+h.angularSpeed*h.angularSpeed;p=d&&d.collided&&.2>m,u=d}else u={collided:!1,bodyA:t,bodyB:i};if(d&&p){var v=u.axisBody,g=v===t?i:t,y=[v.axes[d.axisNumber]];if(c=e(v.vertices,g.vertices,y),u.reused=!0,c.overlap<=0)return u.collided=!1,u}else{if((s=e(t.vertices,i.vertices,t.axes)).overlap<=0)return u.collided=!1,u;if((l=e(i.vertices,t.vertices,i.axes)).overlap<=0)return u.collided=!1,u;s.overlap<l.overlap?(c=s,u.axisBody=t):(c=l,u.axisBody=i),u.axisNumber=c.axisNumber}u.bodyA=t.id<i.id?t:i,u.bodyB=t.id<i.id?i:t,u.collided=!0,u.normal=c.axis,u.depth=c.overlap,u.parentA=u.bodyA.parent,u.parentB=u.bodyB.parent,t=u.bodyA,i=u.bodyB,o.dot(u.normal,o.sub(i.position,t.position))>0&&(u.normal=o.neg(u.normal)),u.tangent=o.perp(u.normal),u.penetration={x:u.normal.x*u.depth,y:u.normal.y*u.depth};var x=n(t,i,u.normal),b=u.supports||[];if(b.length=0,r.contains(t.vertices,x[0])&&b.push(x[0]),r.contains(t.vertices,x[1])&&b.push(x[1]),b.length<2){var w=n(i,t,o.neg(u.normal));r.contains(i.vertices,w[0])&&b.push(w[0]),b.length<2&&r.contains(i.vertices,w[1])&&b.push(w[1])}return b.length<1&&(b=[x[0]]),u.supports=b,u};var e=function(e,n,i){for(var r,a,s=o._temp[0],l=o._temp[1],c={overlap:Number.MAX_VALUE},u=0;u<i.length;u++){if(a=i[u],t(s,e,a),t(l,n,a),0>=(r=Math.min(s.max-l.min,l.max-s.min)))return c.overlap=r,c;r<c.overlap&&(c.overlap=r,c.axis=a,c.axisNumber=u)}return c},t=function(e,t,n){for(var i=o.dot(t[0],n),r=i,a=1;a<t.length;a+=1){var s=o.dot(t[a],n);s>r?r=s:i>s&&(i=s)}e.min=i,e.max=r},n=function(e,t,n){for(var i,r,a,s,l=Number.MAX_VALUE,c=o._temp[0],u=t.vertices,d=e.position,p=0;p<u.length;p++)r=u[p],c.x=r.x-d.x,c.y=r.y-d.y,i=-o.dot(n,c),l>i&&(l=i,a=r);return r=u[a.index-1>=0?a.index-1:u.length-1],c.x=r.x-d.x,c.y=r.y-d.y,l=-o.dot(n,c),s=r,r=u[(a.index+1)%u.length],c.x=r.x-d.x,c.y=r.y-d.y,i=-o.dot(n,c),l>i&&(s=r),[a,s]}}()},{"../geometry/Vector":26,"../geometry/Vertices":27}],12:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../geometry/Vector"),a=e("../core/Sleeping"),s=e("../geometry/Bounds"),l=e("../geometry/Axes"),c=e("../core/Common");i.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?o.add(t.bodyA.position,t.pointA):t.pointA,i=t.bodyB?o.add(t.bodyB.position,t.pointB):t.pointB,r=o.magnitude(o.sub(n,i));t.length=t.length||r||1e-6;var a={visible:!0,lineWidth:2,strokeStyle:"#666"};return t.render=c.extend(a,t.render),t.id=t.id||c.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||1,t.angularStiffness=t.angularStiffness||0,t.angleA=t.bodyA?t.bodyA.angle:t.angleA,t.angleB=t.bodyB?t.bodyB.angle:t.angleB,t},i.solveAll=function(e,t){for(var n=0;n<e.length;n++)i.solve(e[n],t)},i.solve=function(e,t){var n=e.bodyA,i=e.bodyB,r=e.pointA,a=e.pointB;n&&!n.isStatic&&(e.pointA=o.rotate(r,n.angle-e.angleA),e.angleA=n.angle),i&&!i.isStatic&&(e.pointB=o.rotate(a,i.angle-e.angleB),e.angleB=i.angle);var s=r,l=a;if(n&&(s=o.add(n.position,r)),i&&(l=o.add(i.position,a)),s&&l){var c=o.sub(s,l),u=o.magnitude(c);0===u&&(u=1e-6);var d=(u-e.length)/u,p=o.div(c,u),f=o.mult(c,.5*d*e.stiffness*t*t);if(!(Math.abs(1-u/e.length)<.001*t)){var h,m,v,g,y,x,b,w;n&&!n.isStatic?(v={x:s.x-n.position.x+f.x,y:s.y-n.position.y+f.y},n.velocity.x=n.position.x-n.positionPrev.x,n.velocity.y=n.position.y-n.positionPrev.y,n.angularVelocity=n.angle-n.anglePrev,h=o.add(n.velocity,o.mult(o.perp(v),n.angularVelocity)),y=o.dot(v,p),b=n.inverseMass+n.inverseInertia*y*y):(h={x:0,y:0},b=n?n.inverseMass:0),i&&!i.isStatic?(g={x:l.x-i.position.x-f.x,y:l.y-i.position.y-f.y},i.velocity.x=i.position.x-i.positionPrev.x,i.velocity.y=i.position.y-i.positionPrev.y,i.angularVelocity=i.angle-i.anglePrev,m=o.add(i.velocity,o.mult(o.perp(g),i.angularVelocity)),x=o.dot(g,p),w=i.inverseMass+i.inverseInertia*x*x):(m={x:0,y:0},w=i?i.inverseMass:0);var C=o.sub(m,h),S=o.dot(p,C)/(b+w);S>0&&(S=0);var T,E={x:p.x*S,y:p.y*S};n&&!n.isStatic&&(T=o.cross(v,E)*n.inverseInertia*(1-e.angularStiffness),n.constraintImpulse.x-=f.x,n.constraintImpulse.y-=f.y,n.constraintImpulse.angle+=T,n.position.x-=f.x,n.position.y-=f.y,n.angle+=T),i&&!i.isStatic&&(T=o.cross(g,E)*i.inverseInertia*(1-e.angularStiffness),i.constraintImpulse.x+=f.x,i.constraintImpulse.y+=f.y,i.constraintImpulse.angle-=T,i.position.x+=f.x,i.position.y+=f.y,i.angle-=T)}}},i.postSolveAll=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.constraintImpulse;if(0!==i.x||0!==i.y||0!==i.angle){a.set(n,!1);for(var c=0;c<n.parts.length;c++){var u=n.parts[c];r.translate(u.vertices,i),c>0&&(u.position.x+=i.x,u.position.y+=i.y),0!==i.angle&&(r.rotate(u.vertices,i.angle,n.position),l.rotate(u.axes,i.angle),c>0&&o.rotateAbout(u.position,i.angle,n.position,u.position)),s.update(u.bounds,u.vertices,n.velocity)}i.angle=0,i.x=0,i.y=0}}}},{"../core/Common":14,"../core/Sleeping":20,"../geometry/Axes":23,"../geometry/Bounds":24,"../geometry/Vector":26,"../geometry/Vertices":27}],13:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../core/Sleeping"),a=e("../core/Mouse"),s=e("../core/Events"),l=e("../collision/Detector"),c=e("./Constraint"),u=e("../body/Composite"),d=e("../core/Common"),p=e("../geometry/Bounds");!function(){i.create=function(t,n){var r=(t?t.mouse:null)||(n?n.mouse:null);r||(t&&t.render&&t.render.canvas?r=a.create(t.render.canvas):n&&n.element?r=a.create(n.element):(r=a.create(),d.log("MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected","warn")));var o={type:"mouseConstraint",mouse:r,element:null,body:null,constraint:c.create({label:"Mouse Constraint",pointA:r.position,pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,render:{strokeStyle:"#90EE90",lineWidth:3}}),collisionFilter:{category:1,mask:4294967295,group:0}},l=d.extend(o,n);return s.on(t,"tick",function(){var n=u.allBodies(t.world);i.update(l,n),e(l)}),l},i.update=function(e,t){var n=e.mouse,i=e.constraint,a=e.body;if(0===n.button){if(i.bodyB)o.set(i.bodyB,!1),i.pointA=n.position;else for(var c=0;c<t.length;c++)if(a=t[c],p.contains(a.bounds,n.position)&&l.canCollide(a.collisionFilter,e.collisionFilter))for(var u=a.parts.length>1?1:0;u<a.parts.length;u++){var d=a.parts[u];if(r.contains(d.vertices,n.position)){i.pointA=n.position,i.bodyB=e.body=a,i.pointB={x:n.position.x-a.position.x,y:n.position.y-a.position.y},i.angleB=a.angle,o.set(a,!1),s.trigger(e,"startdrag",{mouse:n,body:a});break}}}else i.bodyB=e.body=null,i.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":18,"../core/Sleeping":20,"../geometry/Bounds":24,"../geometry/Vertices":27,"./Constraint":12}],14:[function(e,t,n){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i.extend=function(e,t){var n,r,o;"boolean"==typeof t?(n=2,o=t):(n=1,o=!0),r=Array.prototype.slice.call(arguments,n);for(var a=0;a<r.length;a++){var s=r[a];if(s)for(var l in s)o&&s[l]&&s[l].constructor===Object?e[l]&&e[l].constructor!==Object?e[l]=s[l]:(e[l]=e[l]||{},i.extend(e[l],o,s[l])):e[l]=s[l]}return e},i.clone=function(e,t){return i.extend({},t,e)},i.keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},i.values=function(e){var t=[];if(Object.keys){for(var n=Object.keys(e),i=0;i<n.length;i++)t.push(e[n[i]]);return t}for(var r in e)t.push(e[r]);return t},i.shadeColor=function(e,t){var n=parseInt(e.slice(1),16),i=Math.round(2.55*t),r=(n>>16)+i,o=(n>>8&255)+i,a=(255&n)+i;return"#"+(16777216+65536*(255>r?1>r?0:r:255)+256*(255>o?1>o?0:o:255)+(255>a?1>a?0:a:255)).toString(16).slice(1)},i.shuffle=function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(i.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e},i.choose=function(e){return e[Math.floor(i.random()*e.length)]},i.isElement=function(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}},i.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i.clamp=function(e,t,n){return t>e?t:e>n?n:e},i.sign=function(e){return 0>e?-1:1},i.now=function(){var e=window.performance||{};return e.now=e.now||e.webkitNow||e.msNow||e.oNow||e.mozNow||function(){return+new Date},e.now()},i.random=function(t,n){return t=void 0!==t?t:0,n=void 0!==n?n:1,t+e()*(n-t)},i.colorToNumber=function(e){return 3==(e=e.replace("#","")).length&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)),parseInt(e,16)},i.log=function(e,t){if(console&&console.log&&console.warn)switch(t){case"warn":console.warn("Matter.js:",e);break;case"error":console.log("Matter.js:",e)}},i.nextId=function(){return i._nextId++},i.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};var e=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280}}()},{}],15:[function(e,t,n){var i={};t.exports=i;var r=e("../body/World"),o=e("./Sleeping"),a=e("../collision/Resolver"),s=e("../render/Render"),l=e("../collision/Pairs"),c=(e("./Metrics"),e("../collision/Grid")),u=e("./Events"),d=e("../body/Composite"),p=e("../constraint/Constraint"),f=e("./Common"),h=e("../body/Body");!function(){i.create=function(e,t){t=f.isElement(e)?t:e,e=f.isElement(e)?e:null,t=t||{},(e||t.render)&&f.log("Engine.create: engine.render is deprecated (see docs)","warn");var n={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],timing:{timestamp:0,timeScale:1},broadphase:{controller:c}},i=f.extend(n,t);if(e||i.render){var o={element:e,controller:s};i.render=f.extend(o,i.render)}return i.render&&i.render.controller&&(i.render=i.render.controller.create(i.render)),i.render&&(i.render.engine=i),i.world=t.world||r.create(i.world),i.pairs=l.create(),i.broadphase=i.broadphase.controller.create(i.broadphase),i.metrics=i.metrics||{extended:!1},i},i.update=function(i,r,s){r=r||1e3/60,s=s||1;var c,f=i.world,h=i.timing,m=i.broadphase,v=[];h.timestamp+=r*h.timeScale;var g={timestamp:h.timestamp};u.trigger(i,"beforeUpdate",g);var y=d.allBodies(f),x=d.allConstraints(f);for(i.enableSleeping&&o.update(y,h.timeScale),t(y,f.gravity),n(y,r,h.timeScale,s,f.bounds),c=0;c<i.constraintIterations;c++)p.solveAll(x,h.timeScale);p.postSolveAll(y),m.controller?(f.isModified&&m.controller.clear(m),m.controller.update(m,y,i,f.isModified),v=m.pairsList):v=y,f.isModified&&d.setModified(f,!1,!1,!0);var b=m.detector(v,i),w=i.pairs,C=h.timestamp;for(l.update(w,b,C),l.removeOld(w,C),i.enableSleeping&&o.afterCollisions(w.list,h.timeScale),w.collisionStart.length>0&&u.trigger(i,"collisionStart",{pairs:w.collisionStart}),a.preSolvePosition(w.list),c=0;c<i.positionIterations;c++)a.solvePosition(w.list,h.timeScale);for(a.postSolvePosition(y),a.preSolveVelocity(w.list),c=0;c<i.velocityIterations;c++)a.solveVelocity(w.list,h.timeScale);return w.collisionActive.length>0&&u.trigger(i,"collisionActive",{pairs:w.collisionActive}),w.collisionEnd.length>0&&u.trigger(i,"collisionEnd",{pairs:w.collisionEnd}),e(y),u.trigger(i,"afterUpdate",g),i},i.merge=function(e,t){if(f.extend(e,t),t.world){e.world=t.world,i.clear(e);for(var n=d.allBodies(e.world),r=0;r<n.length;r++){var a=n[r];o.set(a,!1),a.id=f.nextId()}}},i.clear=function(e){var t=e.world;l.clear(e.pairs);var n=e.broadphase;if(n.controller){var i=d.allBodies(t);n.controller.clear(n),n.controller.update(n,i,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 i=0;i<e.length;i++){var r=e[i];r.isStatic||r.isSleeping||(r.force.y+=r.mass*t.y*n,r.force.x+=r.mass*t.x*n)}},n=function(e,t,n,i,r){for(var o=0;o<e.length;o++){var a=e[o];a.isStatic||a.isSleeping||h.update(a,t,n,i)}}}()},{"../body/Body":1,"../body/Composite":2,"../body/World":3,"../collision/Grid":6,"../collision/Pairs":8,"../collision/Resolver":10,"../constraint/Constraint":12,"../render/Render":29,"./Common":14,"./Events":16,"./Metrics":17,"./Sleeping":20}],16:[function(e,t,n){var i={};t.exports=i;var r=e("./Common");i.on=function(e,t,n){for(var i,r=t.split(" "),o=0;o<r.length;o++)i=r[o],e.events=e.events||{},e.events[i]=e.events[i]||[],e.events[i].push(n);return n},i.off=function(e,t,n){if(t){"function"==typeof t&&(n=t,t=r.keys(e.events).join(" "));for(var i=t.split(" "),o=0;o<i.length;o++){var a=e.events[i[o]],s=[];if(n&&a)for(var l=0;l<a.length;l++)a[l]!==n&&s.push(a[l]);e.events[i[o]]=s}}else e.events={}},i.trigger=function(e,t,n){var i,o,a,s;if(e.events){n||(n={}),i=t.split(" ");for(var l=0;l<i.length;l++)if(o=i[l],a=e.events[o]){(s=r.clone(n,!1)).name=o,s.source=e;for(var c=0;c<a.length;c++)a[c].apply(e,[s])}}}},{"./Common":14}],17:[function(e,t,n){},{"../body/Composite":2,"./Common":14}],18:[function(e,t,n){var i={};t.exports=i;var r=e("../core/Common");!function(){i.create=function(t){var n={};return t||r.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 i=e(t,n.element,n.pixelRatio);t.changedTouches&&(n.button=0,t.preventDefault()),n.absolute.x=i.x,n.absolute.y=i.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 i=e(t,n.element,n.pixelRatio);t.changedTouches?(n.button=0,t.preventDefault()):n.button=t.button,n.absolute.x=i.x,n.absolute.y=i.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 i=e(t,n.element,n.pixelRatio);t.changedTouches&&t.preventDefault(),n.button=-1,n.absolute.x=i.x,n.absolute.y=i.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()},i.setElement(n,n.element),n},i.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)},i.clearSourceEvents=function(e){e.sourceEvents.mousemove=null,e.sourceEvents.mousedown=null,e.sourceEvents.mouseup=null,e.sourceEvents.mousewheel=null,e.wheelDelta=0},i.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},i.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 i,r,o=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,c=e.changedTouches;return c?(i=c[0].pageX-o.left-s,r=c[0].pageY-o.top-l):(i=e.pageX-o.left-s,r=e.pageY-o.top-l),{x:i/(t.clientWidth/t.width*n),y:r/(t.clientHeight/t.height*n)}}}()},{"../core/Common":14}],19:[function(e,t,n){var i={};t.exports=i;var r=e("./Events"),o=e("./Engine"),a=e("./Common");!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),i.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},i.run=function(t,n){return void 0!==t.positionIterations&&(n=t,t=i.create()),function r(o){t.frameRequestId=e(r),o&&t.enabled&&i.tick(t,n,o)}(),t},i.tick=function(e,t,n){var i,a=t.timing,s=1,l={timestamp:a.timestamp};r.trigger(e,"beforeTick",l),r.trigger(t,"beforeTick",l),e.isFixed?i=e.delta:(i=n-e.timePrev||e.delta,e.timePrev=n,e.deltaHistory.push(i),e.deltaHistory=e.deltaHistory.slice(-e.deltaSampleSize),i=Math.min.apply(null,e.deltaHistory),i=i<e.deltaMin?e.deltaMin:i,i=i>e.deltaMax?e.deltaMax:i,s=i/e.delta,e.delta=i),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),r.trigger(e,"tick",l),r.trigger(t,"tick",l),t.world.isModified&&t.render&&t.render.controller&&t.render.controller.clear&&t.render.controller.clear(t.render),r.trigger(e,"beforeUpdate",l),o.update(t,i,s),r.trigger(e,"afterUpdate",l),t.render&&t.render.controller&&(r.trigger(e,"beforeRender",l),r.trigger(t,"beforeRender",l),t.render.controller.world(t.render),r.trigger(e,"afterRender",l),r.trigger(t,"afterRender",l)),r.trigger(e,"afterTick",l),r.trigger(t,"afterTick",l)},i.stop=function(e){t(e.frameRequestId)},i.start=function(e,t){i.run(e,t)}}()},{"./Common":14,"./Engine":15,"./Events":16}],20:[function(e,t,n){var i={};t.exports=i;var r=e("./Events");i._motionWakeThreshold=.18,i._motionSleepThreshold=.08,i._minBias=.9,i.update=function(e,t){for(var n=t*t*t,r=0;r<e.length;r++){var o=e[r],a=o.speed*o.speed+o.angularSpeed*o.angularSpeed;if(0===o.force.x&&0===o.force.y){var s=Math.min(o.motion,a),l=Math.max(o.motion,a);o.motion=i._minBias*s+(1-i._minBias)*l,o.sleepThreshold>0&&o.motion<i._motionSleepThreshold*n?(o.sleepCounter+=1,o.sleepCounter>=o.sleepThreshold&&i.set(o,!0)):o.sleepCounter>0&&(o.sleepCounter-=1)}else i.set(o,!1)}},i.afterCollisions=function(e,t){for(var n=t*t*t,r=0;r<e.length;r++){var o=e[r];if(o.isActive){var a=o.collision,s=a.bodyA.parent,l=a.bodyB.parent;if(!(s.isSleeping&&l.isSleeping||s.isStatic||l.isStatic)&&(s.isSleeping||l.isSleeping)){var c=s.isSleeping&&!s.isStatic?s:l,u=c===s?l:s;!c.isStatic&&u.motion>i._motionWakeThreshold*n&&i.set(c,!1)}}}},i.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||r.trigger(e,"sleepStart")):(e.isSleeping=!1,e.sleepCounter=0,n&&r.trigger(e,"sleepEnd"))}},{"./Events":16}],21:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vertices"),o=e("../core/Common"),a=e("../body/Body"),s=e("../geometry/Bounds"),l=e("../geometry/Vector");i.rectangle=function(e,t,n,i,s){s=s||{};var l={label:"Rectangle Body",position:{x:e,y:t},vertices:r.fromPath("L 0 0 L "+n+" 0 L "+n+" "+i+" L 0 "+i)};if(s.chamfer){var c=s.chamfer;l.vertices=r.chamfer(l.vertices,c.radius,c.quality,c.qualityMin,c.qualityMax),delete s.chamfer}return a.create(o.extend({},l,s))},i.trapezoid=function(e,t,n,i,s,l){l=l||{};var c,u=n*(s*=.5),d=u+(1-2*s)*n,p=d+u;c=.5>s?"L 0 0 L "+u+" "+-i+" L "+d+" "+-i+" L "+p+" 0":"L 0 0 L "+d+" "+-i+" L "+p+" 0";var f={label:"Trapezoid Body",position:{x:e,y:t},vertices:r.fromPath(c)};if(l.chamfer){var h=l.chamfer;f.vertices=r.chamfer(f.vertices,h.radius,h.quality,h.qualityMin,h.qualityMax),delete l.chamfer}return a.create(o.extend({},f,l))},i.circle=function(e,t,n,r,a){r=r||{};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),i.polygon(e,t,l,n,o.extend({},s,r))},i.polygon=function(e,t,n,s,l){if(l=l||{},3>n)return i.circle(e,t,s,l);for(var c=2*Math.PI/n,u="",d=.5*c,p=0;n>p;p+=1){var f=d+p*c,h=Math.cos(f)*s,m=Math.sin(f)*s;u+="L "+h.toFixed(3)+" "+m.toFixed(3)+" "}var v={label:"Polygon Body",position:{x:e,y:t},vertices:r.fromPath(u)};if(l.chamfer){var g=l.chamfer;v.vertices=r.chamfer(v.vertices,g.radius,g.quality,g.qualityMin,g.qualityMax),delete l.chamfer}return a.create(o.extend({},v,l))},i.fromVertices=function(e,t,n,i,c,u,d){var p,f,h,m,v,g,y,x,b;for(i=i||{},f=[],c=void 0!==c&&c,u=void 0!==u?u:.01,d=void 0!==d?d:10,window.decomp||o.log("Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.","warn"),o.isArray(n[0])||(n=[n]),x=0;x<n.length;x+=1)if(m=n[x],(h=r.isConvex(m))||!window.decomp)m=h?r.clockwiseSort(m):r.hull(m),f.push({position:{x:e,y:t},vertices:m});else{var w=new decomp.Polygon;for(v=0;v<m.length;v++)w.vertices.push([m[v].x,m[v].y]);w.makeCCW(),!1!==u&&w.removeCollinearPoints(u);var C=w.quickDecomp();for(v=0;v<C.length;v++){var S=C[v],T=[];for(g=0;g<S.vertices.length;g++)T.push({x:S.vertices[g][0],y:S.vertices[g][1]});d>0&&r.area(T)<d||f.push({position:r.centre(T),vertices:T})}}for(v=0;v<f.length;v++)f[v]=a.create(o.extend(f[v],i));if(c){for(v=0;v<f.length;v++){var E=f[v];for(g=v+1;g<f.length;g++){var A=f[g];if(s.overlaps(E.bounds,A.bounds)){var k=E.vertices,M=A.vertices;for(y=0;y<E.vertices.length;y++)for(b=0;b<A.vertices.length;b++){var P=l.magnitudeSquared(l.sub(k[(y+1)%k.length],M[b])),N=l.magnitudeSquared(l.sub(k[y],M[(b+1)%M.length]));5>P&&5>N&&(k[y].isInternal=!0,M[b].isInternal=!0)}}}}}return f.length>1?(p=a.create(o.extend({parts:f.slice(0)},i)),a.setPosition(p,{x:e,y:t}),p):f[0]}},{"../body/Body":1,"../core/Common":14,"../geometry/Bounds":24,"../geometry/Vector":26,"../geometry/Vertices":27}],22:[function(e,t,n){var i={};t.exports=i;var r=e("../body/Composite"),o=e("../constraint/Constraint"),a=e("../core/Common"),s=e("../body/Body"),l=e("./Bodies");i.stack=function(e,t,n,i,o,a,l){for(var c,u=r.create({label:"Stack"}),d=e,p=t,f=0,h=0;i>h;h++){for(var m=0,v=0;n>v;v++){var g=l(d,p,v,h,c,f);if(g){var y=g.bounds.max.y-g.bounds.min.y,x=g.bounds.max.x-g.bounds.min.x;y>m&&(m=y),s.translate(g,{x:.5*x,y:.5*y}),d=g.bounds.max.x+o,r.addBody(u,g),c=g,f+=1}else d+=o}p+=m+a,d=e}return u},i.chain=function(e,t,n,i,s,l){for(var c=e.bodies,u=1;u<c.length;u++){var d=c[u-1],p=c[u],f=d.bounds.max.y-d.bounds.min.y,h=d.bounds.max.x-d.bounds.min.x,m=p.bounds.max.y-p.bounds.min.y,v={bodyA:d,pointA:{x:h*t,y:f*n},bodyB:p,pointB:{x:(p.bounds.max.x-p.bounds.min.x)*i,y:m*s}},g=a.extend(v,l);r.addConstraint(e,o.create(g))}return e.label+=" Chain",e},i.mesh=function(e,t,n,i,s){var l,c,u,d,p,f=e.bodies;for(l=0;n>l;l++){for(c=1;t>c;c++)u=f[c-1+l*t],d=f[c+l*t],r.addConstraint(e,o.create(a.extend({bodyA:u,bodyB:d},s)));if(l>0)for(c=0;t>c;c++)u=f[c+(l-1)*t],d=f[c+l*t],r.addConstraint(e,o.create(a.extend({bodyA:u,bodyB:d},s))),i&&c>0&&(p=f[c-1+(l-1)*t],r.addConstraint(e,o.create(a.extend({bodyA:p,bodyB:d},s)))),i&&t-1>c&&(p=f[c+1+(l-1)*t],r.addConstraint(e,o.create(a.extend({bodyA:p,bodyB:d},s))))}return e.label+=" Mesh",e},i.pyramid=function(e,t,n,r,o,a,l){return i.stack(e,t,n,r,o,a,function(t,i,a,c,u,d){var p=Math.min(r,Math.ceil(n/2)),f=u?u.bounds.max.x-u.bounds.min.x:0;if(!(c>p)){var h=n-1-(c=p-c);if(!(c>a||a>h))return 1===d&&s.translate(u,{x:(a+(n%2==1?1:-1))*f,y:0}),l(e+(u?a*f:0)+a*o,i,a,c,u,d)}})},i.newtonsCradle=function(e,t,n,i,a){for(var s=r.create({label:"Newtons Cradle"}),c=0;n>c;c++){var u=l.circle(e+c*(1.9*i),t+a,i,{inertia:1/0,restitution:1,friction:0,frictionAir:1e-4,slop:1}),d=o.create({pointA:{x:e+c*(1.9*i),y:t},bodyB:u});r.addBody(s,u),r.addConstraint(s,d)}return s},i.car=function(e,t,n,i,a){var c=s.nextGroup(!0),u=.5*-n-20,d=.5*n- -20,p=r.create({label:"Car"}),f=l.trapezoid(e,t,n,i,.3,{collisionFilter:{group:c},friction:.01,chamfer:{radius:10}}),h=l.circle(e+u,t+0,a,{collisionFilter:{group:c},friction:.8,density:.01}),m=l.circle(e+d,t+0,a,{collisionFilter:{group:c},friction:.8,density:.01}),v=o.create({bodyA:f,pointA:{x:u,y:0},bodyB:h,stiffness:.2}),g=o.create({bodyA:f,pointA:{x:d,y:0},bodyB:m,stiffness:.2});return r.addBody(p,f),r.addBody(p,h),r.addBody(p,m),r.addConstraint(p,v),r.addConstraint(p,g),p},i.softBody=function(e,t,n,r,o,s,c,u,d,p){d=a.extend({inertia:1/0},d),p=a.extend({stiffness:.4},p);var f=i.stack(e,t,n,r,o,s,function(e,t){return l.circle(e,t,u,d)});return i.mesh(f,n,r,c,p),f.label="Soft Body",f}},{"../body/Body":1,"../body/Composite":2,"../constraint/Constraint":12,"../core/Common":14,"./Bodies":21}],23:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vector"),o=e("../core/Common");i.fromVertices=function(e){for(var t={},n=0;n<e.length;n++){var i=(n+1)%e.length,a=r.normalise({x:e[i].y-e[n].y,y:e[n].x-e[i].x}),s=0===a.y?1/0:a.x/a.y;t[s=s.toFixed(3).toString()]=a}return o.values(t)},i.rotate=function(e,t){if(0!==t)for(var n=Math.cos(t),i=Math.sin(t),r=0;r<e.length;r++){var o,a=e[r];o=a.x*n-a.y*i,a.y=a.x*i+a.y*n,a.x=o}}},{"../core/Common":14,"../geometry/Vector":26}],24:[function(e,t,n){var i={};t.exports=i,i.create=function(e){var t={min:{x:0,y:0},max:{x:0,y:0}};return e&&i.update(t,e),t},i.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 i=0;i<t.length;i++){var r=t[i];r.x>e.max.x&&(e.max.x=r.x),r.x<e.min.x&&(e.min.x=r.x),r.y>e.max.y&&(e.max.y=r.y),r.y<e.min.y&&(e.min.y=r.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)},i.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},i.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},i.translate=function(e,t){e.min.x+=t.x,e.max.x+=t.x,e.min.y+=t.y,e.max.y+=t.y},i.shift=function(e,t){var n=e.max.x-e.min.x,i=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+i}},{}],25:[function(e,t,n){var i={};t.exports=i,e("../geometry/Bounds"),function(){i.pathToVertices=function(t,n){var i,r,o,a,s,l,c,u,d,p,f,h,m=[],v=0,g=0,y=0;n=n||15;var x=function(e,t,n){var i=n%2==1&&n>1;if(!d||e!=d.x||t!=d.y){d&&i?(f=d.x,h=d.y):(f=0,h=0);var r={x:f+e,y:h+t};!i&&d||(d=r),m.push(r),g=f+e,y=h+t}},b=function(e){var t=e.pathSegTypeAsLetter.toUpperCase();if("Z"!==t){switch(t){case"M":case"L":case"T":case"C":case"S":case"Q":g=e.x,y=e.y;break;case"H":g=e.x;break;case"V":y=e.y}x(g,y,e.pathSegType)}};for(e(t),o=t.getTotalLength(),l=[],i=0;i<t.pathSegList.numberOfItems;i+=1)l.push(t.pathSegList.getItem(i));for(c=l.concat();o>v;){if(p=t.getPathSegAtLength(v),(s=l[p])!=u){for(;c.length&&c[0]!=s;)b(c.shift());u=s}switch(s.pathSegTypeAsLetter.toUpperCase()){case"C":case"T":case"S":case"Q":case"A":a=t.getPointAtLength(v),x(a.x,a.y,0)}v+=n}for(i=0,r=c.length;r>i;++i)b(c[i]);return m};var e=function(e){for(var t,n,i,r,o,a,s=e.pathSegList,l=0,c=0,u=s.numberOfItems,d=0;u>d;++d){var p=s.getItem(d),f=p.pathSegTypeAsLetter;if(/[MLHVCSQTA]/.test(f))"x"in p&&(l=p.x),"y"in p&&(c=p.y);else switch("x1"in p&&(i=l+p.x1),"x2"in p&&(o=l+p.x2),"y1"in p&&(r=c+p.y1),"y2"in p&&(a=c+p.y2),"x"in p&&(l+=p.x),"y"in p&&(c+=p.y),f){case"m":s.replaceItem(e.createSVGPathSegMovetoAbs(l,c),d);break;case"l":s.replaceItem(e.createSVGPathSegLinetoAbs(l,c),d);break;case"h":s.replaceItem(e.createSVGPathSegLinetoHorizontalAbs(l),d);break;case"v":s.replaceItem(e.createSVGPathSegLinetoVerticalAbs(c),d);break;case"c":s.replaceItem(e.createSVGPathSegCurvetoCubicAbs(l,c,i,r,o,a),d);break;case"s":s.replaceItem(e.createSVGPathSegCurvetoCubicSmoothAbs(l,c,o,a),d);break;case"q":s.replaceItem(e.createSVGPathSegCurvetoQuadraticAbs(l,c,i,r),d);break;case"t":s.replaceItem(e.createSVGPathSegCurvetoQuadraticSmoothAbs(l,c),d);break;case"a":s.replaceItem(e.createSVGPathSegArcAbs(l,c,p.r1,p.r2,p.angle,p.largeArcFlag,p.sweepFlag),d);break;case"z":case"Z":l=t,c=n}"M"!=f&&"m"!=f||(t=l,n=c)}}}()},{"../geometry/Bounds":24}],26:[function(e,t,n){var i={};t.exports=i,i.create=function(e,t){return{x:e||0,y:t||0}},i.clone=function(e){return{x:e.x,y:e.y}},i.magnitude=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},i.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},i.rotate=function(e,t){var n=Math.cos(t),i=Math.sin(t);return{x:e.x*n-e.y*i,y:e.x*i+e.y*n}},i.rotateAbout=function(e,t,n,i){var r=Math.cos(t),o=Math.sin(t);i||(i={});var a=n.x+((e.x-n.x)*r-(e.y-n.y)*o);return i.y=n.y+((e.x-n.x)*o+(e.y-n.y)*r),i.x=a,i},i.normalise=function(e){var t=i.magnitude(e);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},i.dot=function(e,t){return e.x*t.x+e.y*t.y},i.cross=function(e,t){return e.x*t.y-e.y*t.x},i.cross3=function(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)},i.add=function(e,t,n){return n||(n={}),n.x=e.x+t.x,n.y=e.y+t.y,n},i.sub=function(e,t,n){return n||(n={}),n.x=e.x-t.x,n.y=e.y-t.y,n},i.mult=function(e,t){return{x:e.x*t,y:e.y*t}},i.div=function(e,t){return{x:e.x/t,y:e.y/t}},i.perp=function(e,t){return t=!0===t?-1:1,{x:t*-e.y,y:t*e.x}},i.neg=function(e){return{x:-e.x,y:-e.y}},i.angle=function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},{}],27:[function(e,t,n){var i={};t.exports=i;var r=e("../geometry/Vector"),o=e("../core/Common");i.create=function(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i],o={x:r.x,y:r.y,index:i,body:t,isInternal:!1};n.push(o)}return n},i.fromPath=function(e,t){var n=/L?\s*([\-\d\.e]+)[\s,]*([\-\d\.e]+)*/gi,r=[];return e.replace(n,function(e,t,n){r.push({x:parseFloat(t),y:parseFloat(n)})}),i.create(r,t)},i.centre=function(e){for(var t,n,o,a=i.area(e,!0),s={x:0,y:0},l=0;l<e.length;l++)o=(l+1)%e.length,t=r.cross(e[l],e[o]),n=r.mult(r.add(e[l],e[o]),t),s=r.add(s,n);return r.div(s,6*a)},i.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 r.div(t,e.length)},i.area=function(e,t){for(var n=0,i=e.length-1,r=0;r<e.length;r++)n+=(e[i].x-e[r].x)*(e[i].y+e[r].y),i=r;return t?n/2:Math.abs(n)/2},i.inertia=function(e,t){for(var n,i,o=0,a=0,s=e,l=0;l<s.length;l++)i=(l+1)%s.length,n=Math.abs(r.cross(s[i],s[l])),o+=n*(r.dot(s[i],s[i])+r.dot(s[i],s[l])+r.dot(s[l],s[l])),a+=n;return t/6*(o/a)},i.translate=function(e,t,n){var i;if(n)for(i=0;i<e.length;i++)e[i].x+=t.x*n,e[i].y+=t.y*n;else for(i=0;i<e.length;i++)e[i].x+=t.x,e[i].y+=t.y;return e},i.rotate=function(e,t,n){if(0!==t){for(var i=Math.cos(t),r=Math.sin(t),o=0;o<e.length;o++){var a=e[o],s=a.x-n.x,l=a.y-n.y;a.x=n.x+(s*i-l*r),a.y=n.y+(s*r+l*i)}return e}},i.contains=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=e[(n+1)%e.length];if((t.x-i.x)*(r.y-i.y)+(t.y-i.y)*(i.x-r.x)>0)return!1}return!0},i.scale=function(e,t,n,o){if(1===t&&1===n)return e;o=o||i.centre(e);for(var a,s,l=0;l<e.length;l++)a=e[l],s=r.sub(a,o),e[l].x=o.x+s.x*t,e[l].y=o.y+s.y*n;return e},i.chamfer=function(e,t,n,i,a){(t=t||[8]).length||(t=[t]),n=void 0!==n?n:-1,i=i||2,a=a||14;for(var s=[],l=0;l<e.length;l++){var c=e[l-1>=0?l-1:e.length-1],u=e[l],d=e[(l+1)%e.length],p=t[l<t.length?l:t.length-1];if(0!==p){var f=r.normalise({x:u.y-c.y,y:c.x-u.x}),h=r.normalise({x:d.y-u.y,y:u.x-d.x}),m=Math.sqrt(2*Math.pow(p,2)),v=r.mult(o.clone(f),p),g=r.normalise(r.mult(r.add(f,h),.5)),y=r.sub(u,r.mult(g,m)),x=n;-1===n&&(x=1.75*Math.pow(p,.32)),(x=o.clamp(x,i,a))%2==1&&(x+=1);for(var b=Math.acos(r.dot(f,h))/x,w=0;x>w;w++)s.push(r.add(r.rotate(v,b*w),y))}else s.push(u)}return s},i.clockwiseSort=function(e){var t=i.mean(e);return e.sort(function(e,n){return r.angle(t,e)-r.angle(t,n)}),e},i.isConvex=function(e){var t,n,i,r,o=0,a=e.length;if(3>a)return null;for(t=0;a>t;t++)if(n=(t+1)%a,i=(t+2)%a,r=(e[n].x-e[t].x)*(e[i].y-e[n].y),0>(r-=(e[n].y-e[t].y)*(e[i].x-e[n].x))?o|=1:r>0&&(o|=2),3===o)return!1;return 0!==o||null},i.hull=function(e){var t,n,i=[],o=[];for((e=e.slice(0)).sort(function(e,t){var n=e.x-t.x;return 0!==n?n:e.y-t.y}),n=0;n<e.length;n++){for(t=e[n];o.length>=2&&r.cross3(o[o.length-2],o[o.length-1],t)<=0;)o.pop();o.push(t)}for(n=e.length-1;n>=0;n--){for(t=e[n];i.length>=2&&r.cross3(i[i.length-2],i[i.length-1],t)<=0;)i.pop();i.push(t)}return i.pop(),o.pop(),i.concat(o)}},{"../core/Common":14,"../geometry/Vector":26}],28:[function(e,t,n){var i=t.exports={};i.version="master",i.Body=e("../body/Body"),i.Composite=e("../body/Composite"),i.World=e("../body/World"),i.Contact=e("../collision/Contact"),i.Detector=e("../collision/Detector"),i.Grid=e("../collision/Grid"),i.Pairs=e("../collision/Pairs"),i.Pair=e("../collision/Pair"),i.Query=e("../collision/Query"),i.Resolver=e("../collision/Resolver"),i.SAT=e("../collision/SAT"),i.Constraint=e("../constraint/Constraint"),i.MouseConstraint=e("../constraint/MouseConstraint"),i.Common=e("../core/Common"),i.Engine=e("../core/Engine"),i.Events=e("../core/Events"),i.Mouse=e("../core/Mouse"),i.Runner=e("../core/Runner"),i.Sleeping=e("../core/Sleeping"),i.Bodies=e("../factory/Bodies"),i.Composites=e("../factory/Composites"),i.Axes=e("../geometry/Axes"),i.Bounds=e("../geometry/Bounds"),i.Svg=e("../geometry/Svg"),i.Vector=e("../geometry/Vector"),i.Vertices=e("../geometry/Vertices"),i.Render=e("../render/Render"),i.RenderPixi=e("../render/RenderPixi"),i.World.add=i.Composite.add,i.World.remove=i.Composite.remove,i.World.addComposite=i.Composite.addComposite,i.World.addBody=i.Composite.addBody,i.World.addConstraint=i.Composite.addConstraint,i.World.clear=i.Composite.clear,i.Engine.run=i.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/Metrics":17,"../core/Mouse":18,"../core/Runner":19,"../core/Sleeping":20,"../factory/Bodies":21,"../factory/Composites":22,"../geometry/Axes":23,"../geometry/Bounds":24,"../geometry/Svg":25,"../geometry/Vector":26,"../geometry/Vertices":27,"../render/Render":29,"../render/RenderPixi":30}],29:[function(e,t,n){var i={};t.exports=i;var r=e("../core/Common"),o=e("../body/Composite"),a=e("../geometry/Bounds"),s=e("../core/Events"),l=e("../collision/Grid"),c=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(r.now())},1e3/60)},t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame),i.create=function(e){var t={controller:i,engine:null,element:null,canvas:null,mouse:null,frameRequestId:null,options:{width:800,height:600,pixelRatio:1,background:"#fafafa",wireframeBackground:"#222",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}},o=r.extend(t,e);return o.canvas&&(o.canvas.width=o.options.width||o.canvas.width,o.canvas.height=o.options.height||o.canvas.height),o.mouse=e.mouse,o.engine=e.engine,o.canvas=o.canvas||n(o.options.width,o.options.height),o.context=o.canvas.getContext("2d"),o.textures={},o.bounds=o.bounds||{min:{x:0,y:0},max:{x:o.canvas.width,y:o.canvas.height}},1!==o.options.pixelRatio&&i.setPixelRatio(o,o.options.pixelRatio),r.isElement(o.element)?o.element.appendChild(o.canvas):r.log("Render.create: options.element was undefined, render.canvas was created but not appended","warn"),o},i.run=function(t){!function n(r){t.frameRequestId=e(n),i.world(t)}()},i.stop=function(e){t(e.frameRequestId)},i.setPixelRatio=function(e,t){var n=e.options,i=e.canvas;"auto"===t&&(t=u(i)),n.pixelRatio=t,i.setAttribute("data-pixel-ratio",t),i.width=n.width*t,i.height=n.height*t,i.style.width=n.width+"px",i.style.height=n.height+"px",e.context.scale(t,t)},i.world=function(e){var t,n=e.engine,r=n.world,u=e.canvas,d=e.context,f=e.options,h=o.allBodies(r),m=o.allConstraints(r),v=f.wireframes?f.wireframeBackground:f.background,g=[],y=[],x={timestamp:n.timing.timestamp};if(s.trigger(e,"beforeRender",x),e.currentBackground!==v&&p(e,v),d.globalCompositeOperation="source-in",d.fillStyle="transparent",d.fillRect(0,0,u.width,u.height),d.globalCompositeOperation="source-over",f.hasBounds){var b=e.bounds.max.x-e.bounds.min.x,w=e.bounds.max.y-e.bounds.min.y,C=b/f.width,S=w/f.height;for(t=0;t<h.length;t++){var T=h[t];a.overlaps(T.bounds,e.bounds)&&g.push(T)}for(t=0;t<m.length;t++){var E=m[t],A=E.bodyA,k=E.bodyB,M=E.pointA,P=E.pointB;A&&(M=c.add(A.position,E.pointA)),k&&(P=c.add(k.position,E.pointB)),M&&P&&(a.contains(e.bounds,M)||a.contains(e.bounds,P))&&y.push(E)}d.scale(1/C,1/S),d.translate(-e.bounds.min.x,-e.bounds.min.y)}else y=m,g=h;!f.wireframes||n.enableSleeping&&f.showSleeping?i.bodies(e,g,d):(f.showConvexHulls&&i.bodyConvexHulls(e,g,d),i.bodyWireframes(e,g,d)),f.showBounds&&i.bodyBounds(e,g,d),(f.showAxes||f.showAngleIndicator)&&i.bodyAxes(e,g,d),f.showPositions&&i.bodyPositions(e,g,d),f.showVelocity&&i.bodyVelocity(e,g,d),f.showIds&&i.bodyIds(e,g,d),f.showSeparations&&i.separations(e,n.pairs.list,d),f.showCollisions&&i.collisions(e,n.pairs.list,d),f.showVertexNumbers&&i.vertexNumbers(e,g,d),f.showMousePosition&&i.mousePosition(e,e.mouse,d),i.constraints(y,d),f.showBroadphase&&n.broadphase.controller===l&&i.grid(e,n.broadphase,d),f.showDebug&&i.debug(e,d),f.hasBounds&&d.setTransform(f.pixelRatio,0,0,f.pixelRatio,0,0),s.trigger(e,"afterRender",x)},i.debug=function(e,t){var n=t,i=e.engine,r=i.world,a=i.metrics,s=e.options,l=(o.allBodies(r),"    ");if(i.timing.timestamp-(e.debugTimestamp||0)>=500){var c="";a.timing&&(c+="fps: "+Math.round(a.timing.fps)+l),e.debugString=c,e.debugTimestamp=i.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"),d=0;d<u.length;d++)n.fillText(u[d],50,50+18*d)}},i.constraints=function(e,t){for(var n=t,i=0;i<e.length;i++){var r=e[i];if(r.render.visible&&r.pointA&&r.pointB){var o=r.bodyA,a=r.bodyB;o?(n.beginPath(),n.moveTo(o.position.x+r.pointA.x,o.position.y+r.pointA.y)):(n.beginPath(),n.moveTo(r.pointA.x,r.pointA.y)),a?n.lineTo(a.position.x+r.pointB.x,a.position.y+r.pointB.y):n.lineTo(r.pointB.x,r.pointB.y),n.lineWidth=r.render.lineWidth,n.strokeStyle=r.render.strokeStyle,n.stroke()}}},i.bodyShadows=function(e,t,n){for(var i=n,r=(e.engine,0);r<t.length;r++){var o=t[r];if(o.render.visible){if(o.circleRadius)i.beginPath(),i.arc(o.position.x,o.position.y,o.circleRadius,0,2*Math.PI),i.closePath();else{i.beginPath(),i.moveTo(o.vertices[0].x,o.vertices[0].y);for(var a=1;a<o.vertices.length;a++)i.lineTo(o.vertices[a].x,o.vertices[a].y);i.closePath()}var s=o.position.x-.5*e.options.width,l=o.position.y-.2*e.options.height,c=Math.abs(s)+Math.abs(l);i.shadowColor="rgba(0,0,0,0.15)",i.shadowOffsetX=.05*s,i.shadowOffsetY=.05*l,i.shadowBlur=1+12*Math.min(1,c/1e3),i.fill(),i.shadowColor=null,i.shadowOffsetX=null,i.shadowOffsetY=null,i.shadowBlur=null}}},i.bodies=function(e,t,n){var i,r,o,a,s=n,l=(e.engine,e.options),c=l.showInternalEdges||!l.wireframes;for(o=0;o<t.length;o++)if((i=t[o]).render.visible)for(a=i.parts.length>1?1:0;a<i.parts.length;a++)if((r=i.parts[a]).render.visible){if(l.showSleeping&&i.isSleeping?s.globalAlpha=.5*r.render.opacity:1!==r.render.opacity&&(s.globalAlpha=r.render.opacity),r.render.sprite&&r.render.sprite.texture&&!l.wireframes){var u=r.render.sprite,p=d(e,u.texture);s.translate(r.position.x,r.position.y),s.rotate(r.angle),s.drawImage(p,p.width*-u.xOffset*u.xScale,p.height*-u.yOffset*u.yScale,p.width*u.xScale,p.height*u.yScale),s.rotate(-r.angle),s.translate(-r.position.x,-r.position.y)}else{if(r.circleRadius)s.beginPath(),s.arc(r.position.x,r.position.y,r.circleRadius,0,2*Math.PI);else{s.beginPath(),s.moveTo(r.vertices[0].x,r.vertices[0].y);for(var f=1;f<r.vertices.length;f++)!r.vertices[f-1].isInternal||c?s.lineTo(r.vertices[f].x,r.vertices[f].y):s.moveTo(r.vertices[f].x,r.vertices[f].y),r.vertices[f].isInternal&&!c&&s.moveTo(r.vertices[(f+1)%r.vertices.length].x,r.vertices[(f+1)%r.vertices.length].y);s.lineTo(r.vertices[0].x,r.vertices[0].y),s.closePath()}l.wireframes?(s.lineWidth=1,s.strokeStyle="#bbb"):(s.fillStyle=r.render.fillStyle,s.lineWidth=r.render.lineWidth,s.strokeStyle=r.render.strokeStyle,s.fill()),s.stroke()}s.globalAlpha=1}},i.bodyWireframes=function(e,t,n){var i,r,o,a,s,l=n,c=e.options.showInternalEdges;for(l.beginPath(),o=0;o<t.length;o++)if((i=t[o]).render.visible)for(s=i.parts.length>1?1:0;s<i.parts.length;s++){for(r=i.parts[s],l.moveTo(r.vertices[0].x,r.vertices[0].y),a=1;a<r.vertices.length;a++)!r.vertices[a-1].isInternal||c?l.lineTo(r.vertices[a].x,r.vertices[a].y):l.moveTo(r.vertices[a].x,r.vertices[a].y),r.vertices[a].isInternal&&!c&&l.moveTo(r.vertices[(a+1)%r.vertices.length].x,r.vertices[(a+1)%r.vertices.length].y);l.lineTo(r.vertices[0].x,r.vertices[0].y)}l.lineWidth=1,l.strokeStyle="#bbb",l.stroke()},i.bodyConvexHulls=function(e,t,n){var i,r,o,a=n;for(a.beginPath(),r=0;r<t.length;r++)if((i=t[r]).render.visible&&1!==i.parts.length){for(a.moveTo(i.vertices[0].x,i.vertices[0].y),o=1;o<i.vertices.length;o++)a.lineTo(i.vertices[o].x,i.vertices[o].y);a.lineTo(i.vertices[0].x,i.vertices[0].y)}a.lineWidth=1,a.strokeStyle="rgba(255,255,255,0.2)",a.stroke()},i.vertexNumbers=function(e,t,n){var i,r,o,a=n;for(i=0;i<t.length;i++){var s=t[i].parts;for(o=s.length>1?1:0;o<s.length;o++){var l=s[o];for(r=0;r<l.vertices.length;r++)a.fillStyle="rgba(255,255,255,0.2)",a.fillText(i+"_"+r,l.position.x+.8*(l.vertices[r].x-l.position.x),l.position.y+.8*(l.vertices[r].y-l.position.y))}}},i.mousePosition=function(e,t,n){var i=n;i.fillStyle="rgba(255,255,255,0.8)",i.fillText(t.position.x+"  "+t.position.y,t.position.x+5,t.position.y-5)},i.bodyBounds=function(e,t,n){var i=n,r=(e.engine,e.options);i.beginPath();for(var o=0;o<t.length;o++)if(t[o].render.visible)for(var a=t[o].parts,s=a.length>1?1:0;s<a.length;s++){var l=a[s];i.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)}r.wireframes?i.strokeStyle="rgba(255,255,255,0.08)":i.strokeStyle="rgba(0,0,0,0.1)",i.lineWidth=1,i.stroke()},i.bodyAxes=function(e,t,n){var i,r,o,a,s=n,l=(e.engine,e.options);for(s.beginPath(),r=0;r<t.length;r++){var c=t[r],u=c.parts;if(c.render.visible)if(l.showAxes)for(o=u.length>1?1:0;o<u.length;o++)for(i=u[o],a=0;a<i.axes.length;a++){var d=i.axes[a];s.moveTo(i.position.x,i.position.y),s.lineTo(i.position.x+20*d.x,i.position.y+20*d.y)}else for(o=u.length>1?1:0;o<u.length;o++)for(i=u[o],a=0;a<i.axes.length;a++)s.moveTo(i.position.x,i.position.y),s.lineTo((i.vertices[0].x+i.vertices[i.vertices.length-1].x)/2,(i.vertices[0].y+i.vertices[i.vertices.length-1].y)/2)}l.wireframes?s.strokeStyle="indianred":(s.strokeStyle="rgba(0,0,0,0.8)",s.globalCompositeOperation="overlay"),s.lineWidth=1,s.stroke(),s.globalCompositeOperation="source-over"},i.bodyPositions=function(e,t,n){var i,r,o,a,s=n,l=(e.engine,e.options);for(s.beginPath(),o=0;o<t.length;o++)if((i=t[o]).render.visible)for(a=0;a<i.parts.length;a++)r=i.parts[a],s.arc(r.position.x,r.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(),o=0;o<t.length;o++)(i=t[o]).render.visible&&(s.arc(i.positionPrev.x,i.positionPrev.y,2,0,2*Math.PI,!1),s.closePath());s.fillStyle="rgba(255,165,0,0.8)",s.fill()},i.bodyVelocity=function(e,t,n){var i=n;i.beginPath();for(var r=0;r<t.length;r++){var o=t[r];o.render.visible&&(i.moveTo(o.position.x,o.position.y),i.lineTo(o.position.x+2*(o.position.x-o.positionPrev.x),o.position.y+2*(o.position.y-o.positionPrev.y)))}i.lineWidth=3,i.strokeStyle="cornflowerblue",i.stroke()},i.bodyIds=function(e,t,n){var i,r,o=n;for(i=0;i<t.length;i++)if(t[i].render.visible){var a=t[i].parts;for(r=a.length>1?1:0;r<a.length;r++){var s=a[r];o.font="12px Arial",o.fillStyle="rgba(255,255,255,0.5)",o.fillText(s.id,s.position.x+10,s.position.y-10)}}},i.collisions=function(e,t,n){var i,r,o,a,s=n,l=e.options;for(s.beginPath(),o=0;o<t.length;o++)if((i=t[o]).isActive)for(r=i.collision,a=0;a<i.activeContacts.length;a++){var c=i.activeContacts[a].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(),o=0;o<t.length;o++)if((i=t[o]).isActive&&(r=i.collision,i.activeContacts.length>0)){var u=i.activeContacts[0].vertex.x,d=i.activeContacts[0].vertex.y;2===i.activeContacts.length&&(u=(i.activeContacts[0].vertex.x+i.activeContacts[1].vertex.x)/2,d=(i.activeContacts[0].vertex.y+i.activeContacts[1].vertex.y)/2),r.bodyB===r.supports[0].body||!0===r.bodyA.isStatic?s.moveTo(u-8*r.normal.x,d-8*r.normal.y):s.moveTo(u+8*r.normal.x,d+8*r.normal.y),s.lineTo(u,d)}l.wireframes?s.strokeStyle="rgba(255,165,0,0.7)":s.strokeStyle="orange",s.lineWidth=1,s.stroke()},i.separations=function(e,t,n){var i,r,o,a,s,l=n,c=e.options;for(l.beginPath(),s=0;s<t.length;s++)if((i=t[s]).isActive){o=(r=i.collision).bodyA;var u=1;(a=r.bodyB).isStatic||o.isStatic||(u=.5),a.isStatic&&(u=0),l.moveTo(a.position.x,a.position.y),l.lineTo(a.position.x-r.penetration.x*u,a.position.y-r.penetration.y*u),u=1,a.isStatic||o.isStatic||(u=.5),o.isStatic&&(u=0),l.moveTo(o.position.x,o.position.y),l.lineTo(o.position.x+r.penetration.x*u,o.position.y+r.penetration.y*u)}c.wireframes?l.strokeStyle="rgba(255,165,0,0.5)":l.strokeStyle="orange",l.stroke()},i.grid=function(e,t,n){var i=n;e.options.wireframes?i.strokeStyle="rgba(255,180,0,0.1)":i.strokeStyle="rgba(255,180,0,0.5)",i.beginPath();for(var o=r.keys(t.buckets),a=0;a<o.length;a++){var s=o[a];if(!(t.buckets[s].length<2)){var l=s.split(",");i.rect(.5+parseInt(l[0],10)*t.bucketWidth,.5+parseInt(l[1],10)*t.bucketHeight,t.bucketWidth,t.bucketHeight)}}i.lineWidth=1,i.stroke()},i.inspector=function(e,t){var n,i=(e.engine,e.selected),r=e.render,o=r.options;if(o.hasBounds){var a=r.bounds.max.x-r.bounds.min.x,s=r.bounds.max.y-r.bounds.min.y,l=a/r.options.width,c=s/r.options.height;t.scale(1/l,1/c),t.translate(-r.bounds.min.x,-r.bounds.min.y)}for(var u=0;u<i.length;u++){var d=i[u].data;switch(t.translate(.5,.5),t.lineWidth=1,t.strokeStyle="rgba(255,165,0,0.9)",t.setLineDash([1,2]),d.type){case"body":n=d.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 p=d.pointA;d.bodyA&&(p=d.pointB),t.beginPath(),t.arc(p.x,p.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)),o.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},u=function(e){var t=e.getContext("2d");return(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)},d=function(e,t){var n=e.textures[t];return n||(n=e.textures[t]=new Image,n.src=t,n)},p=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,"../geometry/Bounds":24,"../geometry/Vector":26}],30:[function(e,t,n){var i={};t.exports=i;var r=e("../body/Composite"),o=e("../core/Common");!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),i.create=function(e){o.log("RenderPixi.create: Matter.RenderPixi is deprecated (see docs)","warn");var t={controller:i,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=o.extend(t,e),r=!n.options.wireframes&&"transparent"===n.options.background;return n.pixiOptions=n.pixiOptions||{view:n.canvas,transparent:r,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}},n.textures={},n.sprites={},n.primitives={},n.container.addChild(n.spriteContainer),o.isElement(n.element)?n.element.appendChild(n.canvas):o.log('No "render.element" passed, "render.canvas" was not inserted into document.',"warn"),n.canvas.oncontextmenu=function(){return!1},n.canvas.onselectstart=function(){return!1},n},i.run=function(t){!function n(r){t.frameRequestId=e(n),i.world(t)}()},i.stop=function(e){t(e.frameRequestId)},i.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 i=e.sprites["bg-0"];e.textures={},e.sprites={},e.primitives={},e.sprites["bg-0"]=i,i&&t.addChildAt(i,0),e.container.addChild(e.spriteContainer),e.currentBackground=null,t.scale.set(1,1),t.position.set(0,0)},i.setBackground=function(e,t){if(e.currentBackground!==t){var n=t.indexOf&&-1!==t.indexOf("#"),i=e.sprites["bg-0"];if(n){var r=o.colorToNumber(t);e.renderer.backgroundColor=r,i&&e.container.removeChild(i)}else if(!i){var a=s(e,t);(i=e.sprites["bg-0"]=new PIXI.Sprite(a)).position.x=0,i.position.y=0,e.container.addChildAt(i,0)}e.currentBackground=t}},i.world=function(e){var t,n=e.engine.world,o=e.renderer,a=e.container,s=e.options,l=r.allBodies(n),c=r.allConstraints(n),u=[];s.wireframes?i.setBackground(e,s.wireframeBackground):i.setBackground(e,s.background);var d=e.bounds.max.x-e.bounds.min.x,p=e.bounds.max.y-e.bounds.min.y,f=d/e.options.width,h=p/e.options.height;if(s.hasBounds){for(t=0;t<l.length;t++){var m=l[t];m.render.sprite.visible=Bounds.overlaps(m.bounds,e.bounds)}for(t=0;t<c.length;t++){var v=c[t],g=v.bodyA,y=v.bodyB,x=v.pointA,b=v.pointB;g&&(x=Vector.add(g.position,v.pointA)),y&&(b=Vector.add(y.position,v.pointB)),x&&b&&(Bounds.contains(e.bounds,x)||Bounds.contains(e.bounds,b))&&u.push(v)}a.scale.set(1/f,1/h),a.position.set(-e.bounds.min.x*(1/f),-e.bounds.min.y*(1/h))}else u=c;for(t=0;t<l.length;t++)i.body(e,l[t]);for(t=0;t<u.length;t++)i.constraint(e,u[t]);o.render(a)},i.constraint=function(e,t){var n=(e.engine,t.bodyA),i=t.bodyB,r=t.pointA,a=t.pointB,s=e.container,l=t.render,c="c-"+t.id,u=e.primitives[c];return u||(u=e.primitives[c]=new PIXI.Graphics),l.visible&&t.pointA&&t.pointB?(-1===o.indexOf(s.children,u)&&s.addChild(u),u.clear(),u.beginFill(0,0),u.lineStyle(l.lineWidth,o.colorToNumber(l.strokeStyle),1),n?u.moveTo(n.position.x+r.x,n.position.y+r.y):u.moveTo(r.x,r.y),i?u.lineTo(i.position.x+a.x,i.position.y+a.y):u.lineTo(a.x,a.y),void u.endFill()):void u.clear()},i.body=function(e,t){var i=(e.engine,t.render);if(i.visible)if(i.sprite&&i.sprite.texture){var r="b-"+t.id,s=e.sprites[r],l=e.spriteContainer;s||(s=e.sprites[r]=n(e,t)),-1===o.indexOf(l.children,s)&&l.addChild(s),s.position.x=t.position.x,s.position.y=t.position.y,s.rotation=t.angle,s.scale.x=i.sprite.xScale||1,s.scale.y=i.sprite.yScale||1}else{var c="b-"+t.id,u=e.primitives[c],d=e.container;u||(u=e.primitives[c]=a(e,t),u.initialAngle=t.angle),-1===o.indexOf(d.children,u)&&d.addChild(u),u.position.x=t.position.x,u.position.y=t.position.y,u.rotation=t.angle-u.initialAngle}};var n=function(e,t){var n=t.render.sprite.texture,i=s(e,n),r=new PIXI.Sprite(i);return r.anchor.x=t.render.sprite.xOffset,r.anchor.y=t.render.sprite.yOffset,r},a=function(e,t){var n,i=t.render,r=e.options,a=new PIXI.Graphics,s=o.colorToNumber(i.fillStyle),l=o.colorToNumber(i.strokeStyle),c=o.colorToNumber(i.strokeStyle),u=o.colorToNumber("#bbb"),d=o.colorToNumber("#CD5C5C");a.clear();for(var p=t.parts.length>1?1:0;p<t.parts.length;p++){n=t.parts[p],r.wireframes?(a.beginFill(0,0),a.lineStyle(1,u,1)):(a.beginFill(s,1),a.lineStyle(i.lineWidth,l,1)),a.moveTo(n.vertices[0].x-t.position.x,n.vertices[0].y-t.position.y);for(var f=1;f<n.vertices.length;f++)a.lineTo(n.vertices[f].x-t.position.x,n.vertices[f].y-t.position.y);a.lineTo(n.vertices[0].x-t.position.x,n.vertices[0].y-t.position.y),a.endFill(),(r.showAngleIndicator||r.showAxes)&&(a.beginFill(0,0),r.wireframes?a.lineStyle(1,d,1):a.lineStyle(1,c),a.moveTo(n.position.x-t.position.x,n.position.y-t.position.y),a.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),a.endFill())}return a},s=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}]},{},[28])(28)}),window.Modernizr=function(e,t,n){function i(e){v.cssText=e}function r(e,t){return i(b.join(e+";")+(t||""))}function o(e,t){return typeof e===t}function a(e,t){return!!~(""+e).indexOf(t)}function s(e,t){for(var i in e){var r=e[i];if(!a(r,"-")&&v[r]!==n)return"pfx"!=t||r}return!1}function l(e,t,i){for(var r in e){var a=t[e[r]];if(a!==n)return!1===i?e[r]:o(a,"function")?a.bind(i||t):a}return!1}function c(e,t,n){var i=e.charAt(0).toUpperCase()+e.slice(1),r=(e+" "+C.join(i+" ")+i).split(" ");return o(t,"string")||o(t,"undefined")?s(r,t):(r=(e+" "+S.join(i+" ")+i).split(" "),l(r,t,n))}var u,d,p={},f=t.documentElement,h="modernizr",m=t.createElement(h),v=m.style,g=t.createElement("input"),y=":)",x={}.toString,b=" -webkit- -moz- -o- -ms- ".split(" "),w="Webkit Moz O ms",C=w.split(" "),S=w.toLowerCase().split(" "),T={svg:"http://www.w3.org/2000/svg"},E={},A={},k={},M=[],P=M.slice,N=function(e,n,i,r){var o,a,s,l,c=t.createElement("div"),u=t.body,d=u||t.createElement("body");if(parseInt(i,10))for(;i--;)s=t.createElement("div"),s.id=r?r[i]:h+(i+1),c.appendChild(s);return o=["&#173;",'<style id="s',h,'">',e,"</style>"].join(""),c.id=h,(u?c:d).innerHTML+=o,d.appendChild(c),u||(d.style.background="",d.style.overflow="hidden",l=f.style.overflow,f.style.overflow="hidden",f.appendChild(d)),a=n(c,e),u?c.parentNode.removeChild(c):(d.parentNode.removeChild(d),f.style.overflow=l),!!a},B=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(i,r){r=r||t.createElement(e[i]||"div");var a=(i="on"+i)in r;return a||(r.setAttribute||(r=t.createElement("div")),r.setAttribute&&r.removeAttribute&&(r.setAttribute(i,""),a=o(r[i],"function"),o(r[i],"undefined")||(r[i]=n),r.removeAttribute(i))),r=null,a}}(),I={}.hasOwnProperty;d=o(I,"undefined")||o(I.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return I.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=P.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=t.prototype;var o=new r,a=t.apply(o,n.concat(P.call(arguments)));return Object(a)===a?a:o}return t.apply(e,n.concat(P.call(arguments)))};return i}),E.flexbox=function(){return c("flexWrap")},E.canvas=function(){var e=t.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")},E.canvastext=function(){return!!p.canvas&&!!o(t.createElement("canvas").getContext("2d").fillText,"function")},E.webgl=function(){return!!e.WebGLRenderingContext},E.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:N(["@media (",b.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},E.geolocation=function(){return"geolocation"in navigator},E.postmessage=function(){return!!e.postMessage},E.websqldatabase=function(){return!!e.openDatabase},E.indexedDB=function(){return!!c("indexedDB",e)},E.hashchange=function(){return B("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},E.history=function(){return!!e.history&&!!history.pushState},E.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},E.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},E.rgba=function(){return i("background-color:rgba(150,255,150,.5)"),a(v.backgroundColor,"rgba")},E.hsla=function(){return i("background-color:hsla(120,40%,100%,.5)"),a(v.backgroundColor,"rgba")||a(v.backgroundColor,"hsla")},E.multiplebgs=function(){return i("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(v.background)},E.backgroundsize=function(){return c("backgroundSize")},E.borderimage=function(){return c("borderImage")},E.borderradius=function(){return c("borderRadius")},E.boxshadow=function(){return c("boxShadow")},E.textshadow=function(){return""===t.createElement("div").style.textShadow},E.opacity=function(){return r("opacity:.55"),/^0.55$/.test(v.opacity)},E.cssanimations=function(){return c("animationName")},E.csscolumns=function(){return c("columnCount")},E.cssgradients=function(){var e="background-image:";return i((e+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+e)+b.join("linear-gradient(left top,#9f9, white);"+e)).slice(0,-e.length)),a(v.backgroundImage,"gradient")},E.cssreflections=function(){return c("boxReflect")},E.csstransforms=function(){return!!c("transform")},E.csstransforms3d=function(){var e=!!c("perspective");return e&&"webkitPerspective"in f.style&&N("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e},E.csstransitions=function(){return c("transition")},E.fontface=function(){var e;return N('@font-face {font-family:"font";src:url("https://")}',function(n,i){var r=t.getElementById("smodernizr"),o=r.sheet||r.styleSheet,a=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"";e=/src/i.test(a)&&0===a.indexOf(i.split(" ")[0])}),e},E.generatedcontent=function(){var e;return N(["#",h,"{font:0/0 a}#",h,':after{content:"',y,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3}),e},E.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(e){}return n},E.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(e){}return n},E.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(e){return!1}},E.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(e){return!1}},E.webworkers=function(){return!!e.Worker},E.applicationcache=function(){return!!e.applicationCache},E.svg=function(){return!!t.createElementNS&&!!t.createElementNS(T.svg,"svg").createSVGRect},E.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==T.svg},E.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(x.call(t.createElementNS(T.svg,"animate")))},E.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(x.call(t.createElementNS(T.svg,"clipPath")))};for(var D in E)d(E,D)&&(u=D.toLowerCase(),p[u]=E[D](),M.push((p[u]?"":"no-")+u));return p.input||(p.input=function(n){for(var i=0,r=n.length;i<r;i++)k[n[i]]=n[i]in g;return k.list&&(k.list=!!t.createElement("datalist")&&!!e.HTMLDataListElement),k}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(e){for(var i,r,o,a=0,s=e.length;a<s;a++)g.setAttribute("type",r=e[a]),(i="text"!==g.type)&&(g.value=y,g.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&g.style.WebkitAppearance!==n?(f.appendChild(g),o=t.defaultView,i=o.getComputedStyle&&"textfield"!==o.getComputedStyle(g,null).WebkitAppearance&&0!==g.offsetHeight,f.removeChild(g)):/^(search|tel)$/.test(r)||(i=/^(url|email)$/.test(r)?g.checkValidity&&!1===g.checkValidity():g.value!=y)),A[e[a]]=!!i;return A}("search tel url email datetime date month week time datetime-local number range color".split(" "))),p.addTest=function(e,t){if("object"==typeof e)for(var i in e)d(e,i)&&p.addTest(i,e[i]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,f.className+=" "+(t?"":"no-")+e,p[e]=t}return p},i(""),m=g=null,function(e,t){function n(e,t){var n=e.createElement("p"),i=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",i.insertBefore(n.lastChild,i.firstChild)}function i(){var e=v.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=m[e[f]];return t||(t={},h++,e[f]=h,m[h]=t),t}function o(e,n,i){if(n||(n=t),c)return n.createElement(e);i||(i=r(n));var o;return!(o=i.cache[e]?i.cache[e].cloneNode():p.test(e)?(i.cache[e]=i.createElem(e)).cloneNode():i.createElem(e)).canHaveChildren||d.test(e)||o.tagUrn?o:i.frag.appendChild(o)}function a(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return v.shivMethods?o(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(v,t.frag)}function s(e){e||(e=t);var i=r(e);return v.shivCSS&&!l&&!i.hasCSS&&(i.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),c||a(e,i),e}var l,c,u=e.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f="_html5shiv",h=0,m={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",l="hidden"in e,c=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){l=!0,c=!0}}();var v={elements:u.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==u.shivCSS,supportsUnknownElements:c,shivMethods:!1!==u.shivMethods,type:"default",shivDocument:s,createElement:o,createDocumentFragment:function(e,n){if(e||(e=t),c)return e.createDocumentFragment();for(var o=(n=n||r(e)).frag.cloneNode(),a=0,s=i(),l=s.length;a<l;a++)o.createElement(s[a]);return o}};e.html5=v,s(t)}(this,t),p._version="2.8.3",p._prefixes=b,p._domPrefixes=S,p._cssomPrefixes=C,p.mq=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var i;return N("@media "+t+" { #"+h+" { position: absolute; } }",function(t){i="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),i},p.hasEvent=B,p.testProp=function(e){return s([e])},p.testAllProps=c,p.testStyles=N,p.prefixed=function(e,t,n){return t?c(e,t,n):c(e,"pfx")},f.className=f.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+M.join(" "),p}(this,this.document),function(e,t,n){function i(e){return"[object Function]"==v.call(e)}function r(e){return"string"==typeof e}function o(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function s(){var e=g.shift();y=1,e?e.t?h(function(){("c"==e.t?p.injectCss:p.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),s()):y=0}function l(e,n,i,r,o,l,c){function u(t){if(!f&&a(d.readyState)&&(x.r=f=1,!y&&s(),d.onload=d.onreadystatechange=null,t)){"img"!=e&&h(function(){w.removeChild(d)},50);for(var i in A[n])A[n].hasOwnProperty(i)&&A[n][i].onload()}}var c=c||p.errorTimeout,d=t.createElement(e),f=0,v=0,x={t:i,s:n,e:o,a:l,x:c};1===A[n]&&(v=1,A[n]=[]),"object"==e?d.data=n:(d.src=n,d.type=e),d.width=d.height="0",d.onerror=d.onload=d.onreadystatechange=function(){u.call(this,v)},g.splice(r,0,x),"img"!=e&&(v||2===A[n]?(w.insertBefore(d,b?null:m),h(u,c)):A[n].push(d))}function c(e,t,n,i,o){return y=0,t=t||"j",r(e)?l("c"==t?S:C,e,t,this.i++,n,i,o):(g.splice(this.i++,0,e),1==g.length&&s()),this}function u(){var e=p;return e.loader={load:c,i:0},e}var d,p,f=t.documentElement,h=e.setTimeout,m=t.getElementsByTagName("script")[0],v={}.toString,g=[],y=0,x="MozAppearance"in f.style,b=x&&!!t.createRange().compareNode,w=b?f:m.parentNode,f=e.opera&&"[object Opera]"==v.call(e.opera),f=!!t.attachEvent&&!f,C=x?"object":f?"script":"img",S=f?"script":C,T=Array.isArray||function(e){return"[object Array]"==v.call(e)},E=[],A={},k={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};(p=function(e){function t(e){var t,n,i,e=e.split("!"),r=E.length,o=e.pop(),a=e.length,o={url:o,origUrl:o,prefixes:e};for(n=0;n<a;n++)i=e[n].split("="),(t=k[i.shift()])&&(o=t(o,i));for(n=0;n<r;n++)o=E[n](o);return o}function a(e,r,o,a,s){var l=t(e),c=l.autoCallback;l.url.split(".").pop().split("?").shift(),l.bypass||(r&&(r=i(r)?r:r[e]||r[a]||r[e.split("/").pop().split("?")[0]]),l.instead?l.instead(e,r,o,a,s):(A[l.url]?l.noexec=!0:A[l.url]=1,o.load(l.url,l.forceCSS||!l.forceJS&&"css"==l.url.split(".").pop().split("?").shift()?"c":n,l.noexec,l.attrs,l.timeout),(i(r)||i(c))&&o.load(function(){u(),r&&r(l.origUrl,s,a),c&&c(l.origUrl,s,a),A[l.url]=2})))}function s(e,t){function n(e,n){if(e){if(r(e))n||(d=function(){var e=[].slice.call(arguments);p.apply(this,e),f()}),a(e,d,t,0,c);else if(Object(e)===e)for(l in s=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!n&&!--s&&(i(d)?d=function(){var e=[].slice.call(arguments);p.apply(this,e),f()}:d[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),f()}}(p[l])),a(e[l],d,t,l,c))}else!n&&f()}var s,l,c=!!e.test,u=e.load||e.both,d=e.callback||o,p=d,f=e.complete||o;n(c?e.yep:e.nope,!!u),u&&n(u)}var l,c,d=this.yepnope.loader;if(r(e))a(e,0,d,0);else if(T(e))for(l=0;l<e.length;l++)c=e[l],r(c)?a(c,0,d,0):T(c)?p(c):Object(c)===c&&s(c,d);else Object(e)===e&&s(e,d)}).addPrefix=function(e,t){k[e]=t},p.addFilter=function(e){E.push(e)},p.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",d=function(){t.removeEventListener("DOMContentLoaded",d,0),t.readyState="complete"},0)),e.yepnope=u(),e.yepnope.executeStack=s,e.yepnope.injectJs=function(e,n,i,r,l,c){var u,d,f=t.createElement("script"),r=r||p.errorTimeout;f.src=e;for(d in i)f.setAttribute(d,i[d]);n=c?s:n||o,f.onreadystatechange=f.onload=function(){!u&&a(f.readyState)&&(u=1,n(),f.onload=f.onreadystatechange=null)},h(function(){u||(u=1,n(1))},r),l?f.onload():m.parentNode.insertBefore(f,m)},e.yepnope.injectCss=function(e,n,i,r,a,l){var c,r=t.createElement("link"),n=l?s:n||o;r.href=e,r.rel="stylesheet",r.type="text/css";for(c in i)r.setAttribute(c,i[c]);a||(m.parentNode.insertBefore(r,m),h(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};