Socket
Socket
Sign inDemoInstall

zone.js

Package Overview
Dependencies
Maintainers
1
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone.js - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

lib/keys.js

2

dist/jasmine-patch.min.js

@@ -1,1 +0,1 @@

!function n(e,o,t){function r(f,u){if(!o[f]){if(!e[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);var a=new Error("Cannot find module '"+f+"'");throw a.code="MODULE_NOT_FOUND",a}var l=o[f]={exports:{}};e[f][0].call(l.exports,function(n){var o=e[f][1][n];return r(o?o:n)},l,l.exports,n,e,o,t)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)r(t[f]);return r}({1:[function(n,e,o){var t=n("../jasmine/patch");t.apply()},{"../jasmine/patch":2}],2:[function(n,e,o){(function(n){"use strict";function o(){if(!n.zone)throw new Error("zone.js does not seem to be installed");if(!n.zone.isRootZone())throw new Error("The jasmine patch should be called from the root zone");var e=n.zone,o=n.it,t=n.fit;n.it=function(n,t,r){t.length?o(n,function(n){t(function(){e.run(n)})},r):o(n,t,r)},n.fit=function(n,o,r){o.length?t(n,function(n){o(function(){e.run(n)})},r):t(n,o,r)},beforeEach(function(){expect(n.zone.isRootZone()).toBe(!0)})}e.exports=n.jasmine?{apply:o}:{apply:function(){}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
!function n(e,o,t){function r(f,u){if(!o[f]){if(!e[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);var a=new Error("Cannot find module '"+f+"'");throw a.code="MODULE_NOT_FOUND",a}var l=o[f]={exports:{}};e[f][0].call(l.exports,function(n){var o=e[f][1][n];return r(o?o:n)},l,l.exports,n,e,o,t)}return o[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)r(t[f]);return r}({1:[function(n,e,o){var t=n("../jasmine/patch");t.apply()},{"../jasmine/patch":2}],2:[function(n,e,o){(function(n){"use strict";function o(){if(!n.zone)throw new Error("zone.js does not seem to be installed");if(!n.zone.isRootZone())throw new Error("The jasmine patch should be called from the root zone");var e=n.zone,o=n.it,t=n.fit;n.it=function(n,t,r){t.length?o(n,function(n){t(function(){e.run(n)})},r):o(n,t,r)},n.fit=function(n,o,r){o.length?t(n,function(n){o(function(){e.run(n)})},r):t(n,o,r)},beforeEach(function(){expect(n.zone.isRootZone()).toBe(!0)})}n.jasmine?e.exports={apply:o}:e.exports={apply:function(){}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);

@@ -85,3 +85,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

stackFramesFilter: function (line) {
return /zone(-microtask)?(\.min)?\.js/.test(line);
return !/zone(-microtask)?(\.min)?\.js/.test(line);
},

@@ -88,0 +88,0 @@

@@ -1,1 +0,1 @@

!function t(e,n,r){function o(c,s){if(!n[c]){if(!e[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[c]={exports:{}};e[c][0].call(f.exports,function(t){var n=e[c][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;c<r.length;c++)o(r[c]);return o}({1:[function(t,e,n){(function(e){"use strict";if(!e.Zone)throw new Error("zone.js should be installed before loading the long stack trace zone");e.Zone.longStackTraceZone=t("../zones/long-stack-trace.js")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../zones/long-stack-trace.js":2}],2:[function(t,e,n){(function(t){"use strict";function n(t){this._e=t}function r(){return new n(new Error)}function o(){try{throw new Error}catch(t){return new n(t)}}n.prototype.get=function(){return t.zone.stackFramesFilter&&this._e.stack?this._e.stack.split("\n").filter(t.zone.stackFramesFilter).join("\n"):this._e.stack};var i=r(),c=i&&i._e.stack?r:o;e.exports={getLongStacktrace:function(t){var e=[],n=this;t&&e.push(n.stackFramesFilter&&t.stack?t.stack.split("\n").filter(n.stackFramesFilter).join("\n"):t.stack);for(var r=Date.now();n&&n.constructedAtException;)e.push("--- "+Date(n.constructedAtTime).toString()+" - "+(r-n.constructedAtTime)+"ms ago",n.constructedAtException.get()),n=n.parent;return e.join("\n")},stackFramesFilter:function(t){return/zone(-microtask)?(\.min)?\.js/.test(t)},onError:function(t){var e=this.reporter||console.log.bind(console);e(t.toString()),e(this.getLongStacktrace(t))},$fork:function(t){return function(){var e=t.apply(this,arguments);return e.constructedAtException=c(),e.constructedAtTime=Date.now(),e}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
!function t(e,n,r){function o(c,s){if(!n[c]){if(!e[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[c]={exports:{}};e[c][0].call(f.exports,function(t){var n=e[c][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;c<r.length;c++)o(r[c]);return o}({1:[function(t,e,n){(function(e){"use strict";if(!e.Zone)throw new Error("zone.js should be installed before loading the long stack trace zone");e.Zone.longStackTraceZone=t("../zones/long-stack-trace.js")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../zones/long-stack-trace.js":2}],2:[function(t,e,n){(function(t){"use strict";function n(t){this._e=t}function r(){return new n(new Error)}function o(){try{throw new Error}catch(t){return new n(t)}}n.prototype.get=function(){return t.zone.stackFramesFilter&&this._e.stack?this._e.stack.split("\n").filter(t.zone.stackFramesFilter).join("\n"):this._e.stack};var i=r(),c=i&&i._e.stack?r:o;e.exports={getLongStacktrace:function(t){var e=[],n=this;t&&(n.stackFramesFilter&&t.stack?e.push(t.stack.split("\n").filter(n.stackFramesFilter).join("\n")):e.push(t.stack));for(var r=Date.now();n&&n.constructedAtException;)e.push("--- "+Date(n.constructedAtTime).toString()+" - "+(r-n.constructedAtTime)+"ms ago",n.constructedAtException.get()),n=n.parent;return e.join("\n")},stackFramesFilter:function(t){return!/zone(-microtask)?(\.min)?\.js/.test(t)},onError:function(t){var e=this.reporter||console.log.bind(console);e(t.toString()),e(this.getLongStacktrace(t))},$fork:function(t){return function(){var e=t.apply(this,arguments);return e.constructedAtException=c(),e.constructedAtTime=Date.now(),e}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);

@@ -1,1 +0,1 @@

!function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t,n){(function(t){"use strict";var n=e("../core"),r=e("../microtask"),o=e("../patch/browser"),i=e("es6-promise");t.Zone&&console.warn("Zone already exported on window the object!"),t.Zone=r.addMicrotaskSupport(n.Zone),t.zone=new t.Zone,t.Promise=i.Promise,o.apply()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../core":2,"../microtask":3,"../patch/browser":4,"es6-promise":15}],2:[function(e,t,n){(function(n){"use strict";function r(e,t){var n=arguments.length?Object.create(e):this;return n.parent=e||null,Object.keys(t||{}).forEach(function(r){var o=r.substr(1);"$"===r[0]?n[o]=t[r](e[o]||function(){}):"+"===r[0]?n[o]=e[o]?function(){var n=e[o].apply(this,arguments);return t[r].apply(this,arguments),n}:t[r]:"-"===r[0]?n[o]=e[o]?function(){return t[r].apply(this,arguments),e[o].apply(this,arguments)}:t[r]:n[r]="object"==typeof t[r]?JSON.parse(JSON.stringify(t[r])):t[r]}),n.$id=r.nextId++,n}r.prototype={constructor:r,fork:function(e){return this.onZoneCreated(),new r(this,e)},bind:function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);t||this.enqueueTask(e);var n=this.isRootZone()?this:this.fork();return function(){return n.run(e,this,arguments)}},bindOnce:function(e){var t=this;return this.bind(function(){var n=e.apply(this,arguments);return t.dequeueTask(e),n})},isRootZone:function(){return null===this.parent},run:function(e,t,r){r=r||[];var o=n.zone;n.zone=this;try{return this.beforeTask(),e.apply(t,r)}catch(i){if(!this.onError)throw i;this.onError(i)}finally{this.afterTask(),n.zone=o}},onError:null,beforeTask:function(){},onZoneCreated:function(){},afterTask:function(){},enqueueTask:function(){},dequeueTask:function(){}},r.nextId=1,r.bindPromiseFn=e("./patch/promise").bindPromiseFn,t.exports={Zone:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./patch/promise":10}],3:[function(e,t,n){(function(n){"use strict";function r(e){i._asap(this.bind(e))}function o(e){return e.prototype.scheduleMicrotask=r,e}var i=e("es6-promise").Promise;i._setAsap(function(e,t){n.zone.scheduleMicrotask(function(){e(t)})}),t.exports={addMicrotaskSupport:o};var u="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]"),a=n.navigator&&n.navigator.userAgent.toLowerCase().indexOf("firefox")>-1;if(u&&!a){var s=Promise.resolve();i._setScheduler(function(e){s.then(e)})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"es6-promise":15}],4:[function(e,t,n){(function(n){"use strict";function r(){o.patchSetClearFunction(n,["timeout","interval","immediate"]),o.patchRequestAnimationFrame(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),o.patchFunction(n,["alert","prompt"]),c.apply(),f.apply(),i.apply(),u.patchClass("MutationObserver"),u.patchClass("WebKitMutationObserver"),a.apply(),s.apply(),p.apply()}var o=e("./functions"),i=e("./promise"),u=e("./mutation-observer"),a=e("./define-property"),s=e("./register-element"),c=(e("./websocket"),e("./event-target")),f=e("./property-descriptor"),p=e("./geolocation");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":5,"./event-target":6,"./functions":7,"./geolocation":8,"./mutation-observer":9,"./promise":10,"./property-descriptor":11,"./register-element":12,"./websocket":13}],5:[function(e,t,n){"use strict";function r(){Object.defineProperty=function(e,t,n){if(i(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=u(e,t,n)),a(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=u(e,n,t[n])}),c(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=s(e,t);return i(e,t)&&(n.configurable=!1),n}}function o(e,t,n){return n=u(e,t,n),a(e,t,n)}function i(e,t){return e&&e.__unconfigurables&&e.__unconfigurables[t]}function u(e,t,n){return n.configurable=!0,n.configurable||(e.__unconfigurables||a(e,"__unconfigurables",{writable:!0,value:{}}),e.__unconfigurables[t]=!0),n}var a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.create;t.exports={apply:r,_redefineProperty:o}},{}],6:[function(e,t,n){(function(n){"use strict";function r(){if(n.EventTarget)o.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Window","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){n[e]&&o.patchEventTargetMethods(n[e].prototype)})}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],7:[function(e,t,n){(function(n){"use strict";function r(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var r="set"+t,o=e[r];if(o){var i="clear"+t,u={},s="setInterval"===r?a.bindArguments:a.bindArgumentsOnce;n.zone[r]=function(t){var n,r=t;arguments[0]=function(){return delete u[n],r.apply(this,arguments)};var i=s(arguments);return n=o.apply(e,i),u[n]=!0,n},e[r]=function(){return n.zone[r].apply(this,arguments)};var c=e[i];n.zone[i]=function(e){return u[e]&&(delete u[e],n.zone.dequeueTask()),c.apply(this,arguments)},e[i]=function(){return n.zone[i].apply(this,arguments)}}})}function o(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var o=n.zone.isRootZone()?n.zone.fork():n.zone;return t&&(arguments[0]=function(){return o.run(t,arguments)}),r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)})})}function i(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var n=t;arguments[0]=function(){return n.apply(this,arguments)};var o=a.bindArgumentsOnce(arguments);return r.apply(e,o)},e[t]=function(){return zone[t].apply(this,arguments)})})}function u(e,t){t.forEach(function(t){var r=e[t];n.zone[t]=function(){return r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var a=e("../utils");t.exports={patchSetClearFunction:r,patchSetFunction:i,patchRequestAnimationFrame:o,patchFunction:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],8:[function(e,t,n){(function(n){"use strict";function r(){n.navigator&&n.navigator.geolocation&&o.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],9:[function(e,t,n){(function(e){"use strict";function n(t){var n=e[t];if(n){e[t]=function(t){this._o=new n(e.zone.bind(t,!0)),this._creationZone=e.zone};var r=new n(function(){});e[t].prototype.disconnect=function(){var e=this._o.disconnect.apply(this._o,arguments);return this._active&&(this._creationZone.dequeueTask(),this._active=!1),e},e[t].prototype.observe=function(){return this._active||(this._creationZone.enqueueTask(),this._active=!0),this._o.observe.apply(this._o,arguments)};var o;for(o in r)!function(n){void 0===typeof e[t].prototype&&("function"==typeof r[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}}))}(o)}}t.exports={patchClass:n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,t,n){(function(n){"use strict";function r(e,t){var r=n,o=e.every(function(e){return r=r[e]});o&&t.forEach(function(e){var t=r[e];t&&(r[e]=u(t))})}function o(e){var t=e.then;e.then=function(){var n=a.bindArguments(arguments),r=t.apply(e,n);return o(r)};var n=e["catch"];return e["catch"]=function(){var t=a.bindArguments(arguments),r=n.apply(e,t);return o(r)},e}function i(){if(n.Promise){a.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){r(e[0],e[1])})}}var u,a=e("../utils");u=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return o(e.apply(this,arguments))}},t.exports={apply:i,bindPromiseFn:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],11:[function(e,t,n){(function(n){"use strict";function r(){if(!a.isWebWorker()){var e="undefined"!=typeof WebSocket;if(o()){var t=s.map(function(e){return"on"+e});a.patchProperties(HTMLElement.prototype,t),a.patchProperties(XMLHttpRequest.prototype),e&&a.patchProperties(WebSocket.prototype)}else i(),a.patchClass("XMLHttpRequest"),e&&u.apply()}}function o(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function i(){s.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var r,o=e.target;o;)o[t]&&!o[t]._unbound&&(r=n.zone.bind(o[t]),r._unbound=o[t],o[t]=r),o=o.parentElement},!0)})}var u=e("./websocket"),a=e("../utils"),s="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" ");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14,"./websocket":13}],12:[function(e,t,n){(function(n){"use strict";function r(){if(!i.isWebWorker()&&"registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(r,i){return i&&i.prototype&&t.forEach(function(e){if(i.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(i.prototype,e);t&&t.value?(t.value=n.zone.bind(t.value),o(i.prototype,e,t)):i.prototype[e]=n.zone.bind(i.prototype[e])}else i.prototype[e]&&(i.prototype[e]=n.zone.bind(i.prototype[e]))}),e.apply(document,[r,i])}}}var o=e("./define-property")._redefineProperty,i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14,"./define-property":5}],13:[function(e,t,n){(function(n){"use strict";function r(){var e=n.WebSocket;o.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var r,i=arguments.length>1?new e(t,n):new e(t),u=Object.getOwnPropertyDescriptor(i,"onmessage");return u&&u.configurable===!1?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return i[e].apply(i,arguments)}})):r=i,o.patchProperties(r,["onclose","onerror","onmessage","onopen"]),r}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":14}],14:[function(e,t,n){(function(e){"use strict";function n(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bind(t[n]));return t}function r(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bindOnce(t[n]));return t}function o(e,t){t.forEach(function(t){var r=e[t];r&&(e[t]=function(){return r.apply(this,n(arguments))})})}function i(){return"undefined"==typeof document}function u(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e?(this[o]=e,this.addEventListener(r,e,!1)):this[o]=null},n.get=function(){return this[o]},Object.defineProperty(e,t,n)}function a(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){u(e,t)})}function s(t){var n=t.addEventListener;t.addEventListener=function(e,t){var r;return"[object FunctionWrapper]"!==t.toString()&&(r=t.handleEvent?function(e){return function(){e.handleEvent.apply(e,arguments)}}(t):t,t._fn=r,t._bound=t._bound||{},arguments[1]=t._bound[e]=zone.bind(r)),n.apply(this,arguments)};var r=t.removeEventListener;t.removeEventListener=function(t,n){if(n._bound&&n._bound[t]){var o=n._bound;arguments[1]=o[t],delete o[t]}var i=r.apply(this,arguments);return e.zone.dequeueTask(n._fn),i}}function c(t){var r=e[t];if(r){e[t]=function(){var e=n(arguments);switch(e.length){case 0:this._o=new r;break;case 1:this._o=new r(e[0]);break;case 2:this._o=new r(e[0],e[1]);break;case 3:this._o=new r(e[0],e[1],e[2]);break;case 4:this._o=new r(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var o,i=new r;for(o in i)!function(n){"function"==typeof i[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}})}(o);for(o in r)"prototype"!==o&&r.hasOwnProperty(o)&&(e[t][o]=r[o])}}t.exports={bindArguments:n,bindArgumentsOnce:r,patchPrototype:o,patchProperty:u,patchProperties:a,patchEventTargetMethods:s,patchClass:c,isWebWorker:i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(e,t,n){(function(n,r){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function u(e){return"object"==typeof e&&null!==e}function a(e){X=e}function s(e){G=e}function c(){var e=n.nextTick,t=n.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(h)}}function f(){return function(){U(h)}}function p(){var e=0,t=new V(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(h,1)}}function h(){for(var e=0;$>e;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}$=0}function y(){try{var t=e,n=t("vertx");return U=n.runOnLoop||n.runOnContext,f()}catch(r){return d()}}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ie.error=t,ie}}function w(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){G(function(e){var r=!1,o=w(n,t,function(n){r||(r=!0,t!==n?P(e,n):j(e,n))},function(t){r||(r=!0,x(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,x(e,o))},e)}function k(e,t){t._state===re?j(e,t._result):t._state===oe?x(e,t._result):T(t,void 0,function(t){P(e,t)},function(t){x(e,t)})}function E(e,t){if(t.constructor===e.constructor)k(e,t);else{var n=b(t);n===ie?x(e,ie.error):void 0===n?j(e,t):i(n)?_(e,t,n):j(e,t)}}function P(e,t){e===t?x(e,g()):o(t)?E(e,t):j(e,t)}function O(e){e._onerror&&e._onerror(e._result),z(e)}function j(e,t){e._state===ne&&(e._result=t,e._state=re,0!==e._subscribers.length&&G(z,e))}function x(e,t){e._state===ne&&(e._state=oe,e._result=t,G(O,e))}function T(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+re]=n,o[i+oe]=r,0===i&&e._state&&G(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,u=0;u<t.length;u+=3)r=t[u],o=t[u+n],r?M(n,r,o,i):o(i);e._subscribers.length=0}}function A(){this.error=null}function C(e,t){try{return e(t)}catch(n){return ue.error=n,ue}}function M(e,t,n,r){var o,u,a,s,c=i(n);if(c){if(o=C(n,r),o===ue?(s=!0,u=o.error,o=null):a=!0,t===o)return void x(t,m())}else o=r,a=!0;t._state!==ne||(c&&a?P(t,o):s?x(t,u):e===re?j(t,o):e===oe&&x(t,o))}function S(e,t){try{t(function(t){P(e,t)},function(t){x(e,t)})}catch(n){x(e,n)}}function q(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(v),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?j(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&j(n.promise,n._result))):x(n.promise,n._validationError())}function L(e){return new ae(this,e).promise}function F(e){function t(e){P(o,e)}function n(e){x(o,e)}var r=this,o=new r(v);if(!Y(e))return x(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,u=0;o._state===ne&&i>u;u++)T(r.resolve(e[u]),void 0,t,n);return o}function W(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return P(n,e),n}function R(e){var t=this,n=new t(v);return x(n,e),n}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function D(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this._id=le++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(i(e)||Z(),this instanceof H||D(),S(this,e))}function I(){var e;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=de)}var N;N=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var U,X,K,Y=N,$=0,G=({}.toString,function(e,t){te[$]=e,te[$+1]=t,$+=2,2===$&&(X?X(h):K())}),J="undefined"!=typeof window?window:void 0,B=J||{},V=B.MutationObserver||B.WebKitMutationObserver,Q="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);K=Q?c():V?p():ee?l():void 0===J&&"function"==typeof e?y():d();var ne=void 0,re=1,oe=2,ie=new A,ue=new A;q.prototype._validateInput=function(e){return Y(e)},q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._init=function(){this._result=new Array(this.length)};var ae=q;q.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===ne&&t>o;o++)e._eachEntry(r[o],o)},q.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;u(e)?e.constructor===r&&e._state!==ne?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},q.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===ne&&(r._remaining--,e===oe?x(o,n):r._result[t]=n),0===r._remaining&&j(o,r._result)},q.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,function(e){n._settledAt(re,t,e)},function(e){n._settledAt(oe,t,e)})};var se=L,ce=F,fe=W,pe=R,le=0,de=H;H.all=se,H.race=ce,H.resolve=fe,H.reject=pe,H._setScheduler=a,H._setAsap=s,H._asap=G,H.prototype={constructor:H,then:function(e,t){var n=this,r=n._state;if(r===re&&!e||r===oe&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var u=arguments[r-1];G(function(){M(r,o,u,i)})}else T(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var he=I,ye={Promise:de,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),he()}).call(this)}).call(this,{},"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
!function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t,n){(function(t){"use strict";var n=e("../core"),r=e("../microtask"),o=e("../patch/browser"),i=e("es6-promise");t.Zone&&console.warn("Zone already exported on window the object!"),t.Zone=r.addMicrotaskSupport(n.Zone),t.zone=new t.Zone,t.Promise=i.Promise,o.apply()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../core":2,"../microtask":4,"../patch/browser":5,"es6-promise":17}],2:[function(e,t,n){(function(n){"use strict";function r(e,t){var n=arguments.length?Object.create(e):this;return n.parent=e||null,Object.keys(t||{}).forEach(function(r){var o=r.substr(1);"$"===r[0]?n[o]=t[r](e[o]||function(){}):"+"===r[0]?e[o]?n[o]=function(){var n=e[o].apply(this,arguments);return t[r].apply(this,arguments),n}:n[o]=t[r]:"-"===r[0]?e[o]?n[o]=function(){return t[r].apply(this,arguments),e[o].apply(this,arguments)}:n[o]=t[r]:n[r]="object"==typeof t[r]?JSON.parse(JSON.stringify(t[r])):t[r]}),n.$id=r.nextId++,n}var o=e("./keys");r.prototype={constructor:r,fork:function(e){return this.onZoneCreated(),new r(this,e)},bind:function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);t||this.enqueueTask(e);var n=this.isRootZone()?this:this.fork();return function(){return n.run(e,this,arguments)}},bindOnce:function(e){var t=this;return this.bind(function(){var n=e.apply(this,arguments);return t.dequeueTask(e),n})},isRootZone:function(){return null===this.parent},run:function(e,t,r){r=r||[];var o=n.zone;n.zone=this;try{return this.beforeTask(),e.apply(t,r)}catch(i){if(!this.onError)throw i;this.onError(i)}finally{this.afterTask(),n.zone=o}},onError:null,beforeTask:function(){},onZoneCreated:function(){},afterTask:function(){},enqueueTask:function(){},dequeueTask:function(){},addEventListener:function(){return this[o.common.addEventListener].apply(this,arguments)},removeEventListener:function(){return this[o.common.removeEventListener].apply(this,arguments)}},r.nextId=1,r.bindPromiseFn=e("./patch/promise").bindPromiseFn,t.exports={Zone:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":3,"./patch/promise":12}],3:[function(e,t,n){function r(e){return Symbol(e)}function r(e){return"_zone$"+e}"undefined"!=typeof Symbol;var o={addEventListener:r("addEventListener"),removeEventListener:r("removeEventListener")};t.exports={create:r,common:o}},{}],4:[function(e,t,n){(function(n){"use strict";function r(e){i._asap(this.bind(e))}function o(e){return e.prototype.scheduleMicrotask=r,e}var i=e("es6-promise").Promise;i._setAsap(function(e,t){n.zone.scheduleMicrotask(function(){e(t)})}),t.exports={addMicrotaskSupport:o};var u="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]"),a=n.navigator&&n.navigator.userAgent.toLowerCase().indexOf("firefox")>-1;if(u&&!a){var s=Promise.resolve();i._setScheduler(function(e){s.then(e)})}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"es6-promise":17}],5:[function(e,t,n){(function(n){"use strict";function r(){o.patchSetClearFunction(n,["timeout","interval","immediate"]),o.patchRequestAnimationFrame(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),o.patchFunction(n,["alert","prompt"]),c.apply(),f.apply(),i.apply(),u.patchClass("MutationObserver"),u.patchClass("WebKitMutationObserver"),a.apply(),s.apply(),p.apply(),l.apply()}var o=e("./functions"),i=e("./promise"),u=e("./mutation-observer"),a=e("./define-property"),s=e("./register-element"),c=(e("./websocket"),e("./event-target")),f=e("./property-descriptor"),p=e("./geolocation"),l=e("./file-reader");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":6,"./event-target":7,"./file-reader":8,"./functions":9,"./geolocation":10,"./mutation-observer":11,"./promise":12,"./property-descriptor":13,"./register-element":14,"./websocket":15}],6:[function(e,t,n){"use strict";function r(){Object.defineProperty=function(e,t,n){if(i(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=u(e,t,n)),s(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=u(e,n,t[n])}),f(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=c(e,t);return i(e,t)&&(n.configurable=!1),n}}function o(e,t,n){return n=u(e,t,n),s(e,t,n)}function i(e,t){return e&&e[p]&&e[p][t]}function u(e,t,n){return n.configurable=!0,n.configurable||(e[p]||s(e,p,{writable:!0,value:{}}),e[p][t]=!0),n}var a=e("../keys"),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=Object.create,p=a.create("unconfigurables");t.exports={apply:r,_redefineProperty:o}},{"../keys":3}],7:[function(e,t,n){(function(n){"use strict";function r(){if(n.EventTarget)o.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Window","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){var t=n[e]&&n[e].prototype;t&&t.addEventListener&&o.patchEventTargetMethods(t)})}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],8:[function(e,t,n){"use strict";function r(){o.patchClass("FileReader")}var o=e("../utils");t.exports={apply:r}},{"../utils":16}],9:[function(e,t,n){(function(n){"use strict";function r(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var r="set"+t,o=e[r];if(o){var i="clear"+t,u={},s="setInterval"===r?a.bindArguments:a.bindArgumentsOnce;n.zone[r]=function(t){var n,r=t;arguments[0]=function(){return delete u[n],r.apply(this,arguments)};var i=s(arguments);return n=o.apply(e,i),u[n]=!0,n},e[r]=function(){return n.zone[r].apply(this,arguments)};var c=e[i];n.zone[i]=function(e){return u[e]&&(delete u[e],n.zone.dequeueTask()),c.apply(this,arguments)},e[i]=function(){return n.zone[i].apply(this,arguments)}}})}function o(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var o=n.zone.isRootZone()?n.zone.fork():n.zone;return t&&(arguments[0]=function(){return o.run(t,arguments)}),r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)})})}function i(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var n=t;arguments[0]=function(){return n.apply(this,arguments)};var o=a.bindArgumentsOnce(arguments);return r.apply(e,o)},e[t]=function(){return zone[t].apply(this,arguments)})})}function u(e,t){t.forEach(function(t){var r=e[t];n.zone[t]=function(){return r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var a=e("../utils");t.exports={patchSetClearFunction:r,patchSetFunction:i,patchRequestAnimationFrame:o,patchFunction:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],10:[function(e,t,n){(function(n){"use strict";function r(){n.navigator&&n.navigator.geolocation&&o.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],11:[function(e,t,n){(function(n){"use strict";function r(e){var t=n[e];if(t){n[e]=function(e){this[i]=new t(n.zone.bind(e,!0)),this[u]=n.zone};var r=new t(function(){});n[e].prototype.disconnect=function(){var e=this[i].disconnect.apply(this[i],arguments);return this[a]&&(this[u].dequeueTask(),this[a]=!1),e},n[e].prototype.observe=function(){return this[a]||(this[u].enqueueTask(),this[a]=!0),this[i].observe.apply(this[i],arguments)};var o;for(o in r)!function(t){void 0===typeof n[e].prototype&&("function"==typeof r[t]?n[e].prototype[t]=function(){return this[i][t].apply(this[i],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[i][t]=n.zone.bind(e):this[i][t]=e},get:function(){return this[i][t]}}))}(o)}}var o=e("../keys"),i=o.create("originalInstance"),u=o.create("creationZone"),a=o.create("isActive");t.exports={patchClass:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3}],12:[function(e,t,n){(function(n){"use strict";function r(e,t){var r=n,o=e.every(function(e){return r=r[e]});o&&t.forEach(function(e){var t=r[e];t&&(r[e]=u(t))})}function o(e){var t=e.then;e.then=function(){var n=a.bindArguments(arguments),r=t.apply(e,n);return o(r)};var n=e["catch"];return e["catch"]=function(){var t=a.bindArguments(arguments),r=n.apply(e,t);return o(r)},e}function i(){if(n.Promise){a.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){r(e[0],e[1])})}}var u,a=e("../utils");u=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return o(e.apply(this,arguments))}},t.exports={apply:i,bindPromiseFn:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],13:[function(e,t,n){(function(n){"use strict";function r(){if(!a.isWebWorker()){var e="undefined"!=typeof WebSocket;if(o()){var t=c.map(function(e){return"on"+e});a.patchProperties(HTMLElement.prototype,t),a.patchProperties(XMLHttpRequest.prototype),e&&a.patchProperties(WebSocket.prototype)}else i(),a.patchClass("XMLHttpRequest"),e&&u.apply()}}function o(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function i(){c.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var r,o=e.target;o;)o[t]&&!o[t][f]&&(r=n.zone.bind(o[t]),r[f]=o[t],o[t]=r),o=o.parentElement},!0)})}var u=e("./websocket"),a=e("../utils"),s=e("../keys"),c="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),f=s.create("unbound");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3,"../utils":16,"./websocket":15}],14:[function(e,t,n){(function(n){"use strict";function r(){if(!i.isWebWorker()&&"registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(r,i){return i&&i.prototype&&t.forEach(function(e){if(i.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(i.prototype,e);t&&t.value?(t.value=n.zone.bind(t.value),o(i.prototype,e,t)):i.prototype[e]=n.zone.bind(i.prototype[e])}else i.prototype[e]&&(i.prototype[e]=n.zone.bind(i.prototype[e]))}),e.apply(document,[r,i])}}}var o=e("./define-property")._redefineProperty,i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16,"./define-property":6}],15:[function(e,t,n){(function(n){"use strict";function r(){var e=n.WebSocket;o.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var r,i=arguments.length>1?new e(t,n):new e(t),u=Object.getOwnPropertyDescriptor(i,"onmessage");return u&&u.configurable===!1?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return i[e].apply(i,arguments)}})):r=i,o.patchProperties(r,["onclose","onerror","onmessage","onopen"]),r}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],16:[function(e,t,n){(function(n){"use strict";function r(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bind(e[t]));return e}function o(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bindOnce(e[t]));return e}function i(e,t){t.forEach(function(t){var n=e[t];n&&(e[t]=function(){return n.apply(this,r(arguments))})})}function u(){return"undefined"==typeof document}function a(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e?(this[o]=e,this.addEventListener(r,e,!1)):this[o]=null},n.get=function(){return this[o]},Object.defineProperty(e,t,n)}function s(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){a(e,t)})}function c(e){e[p.common.addEventListener]=e.addEventListener,e.addEventListener=function(e,t,r){var o,i=e+(r?"$capturing":"$bubbling");return"[object FunctionWrapper]"!==t.toString()&&(o=t.handleEvent?function(e){return function(){e.handleEvent.apply(e,arguments)}}(t):t,t[l]=o,t[d]=t[d]||{},t[d][i]=t[d][i]||zone.bind(o),arguments[1]=t[d][i]),n.zone.addEventListener.apply(this,arguments)},e[p.common.removeEventListener]=e.removeEventListener,e.removeEventListener=function(e,t,r){var o=e+(r?"$capturing":"$bubbling");if(t[d]&&t[d][o]){var i=t[d];arguments[1]=i[o],delete i[o]}var u=n.zone.removeEventListener.apply(this,arguments);return n.zone.dequeueTask(t[l]),u}}function f(e){var t=n[e];if(t){n[e]=function(){var e=r(arguments);switch(e.length){case 0:this[y]=new t;break;case 1:this[y]=new t(e[0]);break;case 2:this[y]=new t(e[0],e[1]);break;case 3:this[y]=new t(e[0],e[1],e[2]);break;case 4:this[y]=new t(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var o,i=new t;for(o in i)!function(t){"function"==typeof i[t]?n[e].prototype[t]=function(){return this[y][t].apply(this[y],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[y][t]=n.zone.bind(e):this[y][t]=e},get:function(){return this[y][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(n[e][o]=t[o])}}var p=e("./keys"),l=p.create("originalFn"),d=p.create("boundFns"),y=p.create("originalInstance");t.exports={bindArguments:r,bindArgumentsOnce:o,patchPrototype:i,patchProperty:a,patchProperties:s,patchEventTargetMethods:c,patchClass:f,isWebWorker:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":3}],17:[function(e,t,n){(function(n,r){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function u(e){return"object"==typeof e&&null!==e}function a(e){U=e}function s(e){G=e}function c(){return function(){n.nextTick(y)}}function f(){return function(){$(y)}}function p(){var e=0,t=new V(y),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=y,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(y,1)}}function y(){for(var e=0;Y>e;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}Y=0}function h(){try{var t=e,n=t("vertx");return $=n.runOnLoop||n.runOnContext,f()}catch(r){return d()}}function v(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ie.error=t,ie}}function w(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function E(e,t,n){G(function(e){var r=!1,o=w(n,t,function(n){r||(r=!0,t!==n?P(e,n):x(e,n))},function(t){r||(r=!0,j(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,j(e,o))},e)}function _(e,t){t._state===re?x(e,t._result):t._state===oe?j(e,t._result):z(t,void 0,function(t){P(e,t)},function(t){j(e,t)})}function k(e,t){if(t.constructor===e.constructor)_(e,t);else{var n=b(t);n===ie?j(e,ie.error):void 0===n?x(e,t):i(n)?E(e,t,n):x(e,t)}}function P(e,t){e===t?j(e,m()):o(t)?k(e,t):x(e,t)}function O(e){e._onerror&&e._onerror(e._result),T(e)}function x(e,t){e._state===ne&&(e._result=t,e._state=re,0!==e._subscribers.length&&G(T,e))}function j(e,t){e._state===ne&&(e._state=oe,e._result=t,G(O,e))}function z(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+re]=n,o[i+oe]=r,0===i&&e._state&&G(T,e)}function T(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,u=0;u<t.length;u+=3)r=t[u],o=t[u+n],r?C(n,r,o,i):o(i);e._subscribers.length=0}}function L(){this.error=null}function A(e,t){try{return e(t)}catch(n){return ue.error=n,ue}}function C(e,t,n,r){var o,u,a,s,c=i(n);if(c){if(o=A(n,r),o===ue?(s=!0,u=o.error,o=null):a=!0,t===o)return void j(t,g())}else o=r,a=!0;t._state!==ne||(c&&a?P(t,o):s?j(t,u):e===re?x(t,o):e===oe&&j(t,o))}function S(e,t){try{t(function(t){P(e,t)},function(t){j(e,t)})}catch(n){j(e,n)}}function M(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(v),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?x(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&x(n.promise,n._result))):j(n.promise,n._validationError())}function q(e){return new ae(this,e).promise}function F(e){function t(e){P(o,e)}function n(e){j(o,e)}var r=this,o=new r(v);if(!K(e))return j(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,u=0;o._state===ne&&i>u;u++)z(r.resolve(e[u]),void 0,t,n);return o}function W(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return P(n,e),n}function R(e){var t=this,n=new t(v);return j(n,e),n}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function D(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this._id=le++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(i(e)||Z(),this instanceof H||D(),S(this,e))}function I(){var e;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=de)}var N;N=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var $,U,X,K=N,Y=0,G=({}.toString,function(e,t){te[Y]=e,te[Y+1]=t,Y+=2,2===Y&&(U?U(y):X())}),J="undefined"!=typeof window?window:void 0,B=J||{},V=B.MutationObserver||B.WebKitMutationObserver,Q="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);X=Q?c():V?p():ee?l():void 0===J&&"function"==typeof e?h():d();var ne=void 0,re=1,oe=2,ie=new L,ue=new L;M.prototype._validateInput=function(e){return K(e)},M.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},M.prototype._init=function(){this._result=new Array(this.length)};var ae=M;M.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===ne&&t>o;o++)e._eachEntry(r[o],o)},M.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;u(e)?e.constructor===r&&e._state!==ne?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},M.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===ne&&(r._remaining--,e===oe?j(o,n):r._result[t]=n),0===r._remaining&&x(o,r._result)},M.prototype._willSettleAt=function(e,t){var n=this;z(e,void 0,function(e){n._settledAt(re,t,e)},function(e){n._settledAt(oe,t,e)})};var se=q,ce=F,fe=W,pe=R,le=0,de=H;H.all=se,H.race=ce,H.resolve=fe,H.reject=pe,H._setScheduler=a,H._setAsap=s,H._asap=G,H.prototype={constructor:H,then:function(e,t){var n=this,r=n._state;if(r===re&&!e||r===oe&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var u=arguments[r-1];G(function(){C(r,o,u,i)})}else z(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var ye=I,he={Promise:de,polyfill:ye};"function"==typeof define&&define.amd?define(function(){return he}):"undefined"!=typeof t&&t.exports?t.exports=he:"undefined"!=typeof this&&(this.ES6Promise=he),ye()}).call(this)}).call(this,{},"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);

@@ -18,6 +18,8 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../core":2,"../patch/browser":3}],2:[function(require,module,exports){
},{"../core":2,"../patch/browser":4}],2:[function(require,module,exports){
(function (global){
'use strict';
var keys = require('./keys');
function Zone(parentZone, data) {

@@ -142,3 +144,9 @@ var zone = (arguments.length) ? Object.create(parentZone) : this;

enqueueTask: function () {},
dequeueTask: function () {}
dequeueTask: function () {},
addEventListener: function () {
return this[keys.common.addEventListener].apply(this, arguments);
},
removeEventListener: function () {
return this[keys.common.removeEventListener].apply(this, arguments);
}
};

@@ -156,3 +164,27 @@

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./patch/promise":9}],3:[function(require,module,exports){
},{"./keys":3,"./patch/promise":11}],3:[function(require,module,exports){
/**
* Creates keys for `private` properties on exposed objects to minimize interactions with other codebases.
* The key will be a Symbol if the host supports it; otherwise a prefixed string.
*/
if (typeof Symbol !== 'undefined') {
function create(name) {
return Symbol(name);
}
} else {
function create(name) {
return '_zone$' + name;
}
}
var commonKeys = {
addEventListener: create('addEventListener'),
removeEventListener: create('removeEventListener')
};
module.exports = {
create: create,
common: commonKeys
};
},{}],4:[function(require,module,exports){
(function (global){

@@ -170,2 +202,3 @@ 'use strict';

var geolocationPatch = require('./geolocation');
var fileReaderPatch = require('./file-reader');

@@ -204,2 +237,4 @@ function apply() {

geolocationPatch.apply();
fileReaderPatch.apply();
}

@@ -212,5 +247,7 @@

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./define-property":4,"./event-target":5,"./functions":6,"./geolocation":7,"./mutation-observer":8,"./promise":9,"./property-descriptor":10,"./register-element":11,"./websocket":12}],4:[function(require,module,exports){
},{"./define-property":5,"./event-target":6,"./file-reader":7,"./functions":8,"./geolocation":9,"./mutation-observer":10,"./promise":11,"./property-descriptor":12,"./register-element":13,"./websocket":14}],5:[function(require,module,exports){
'use strict';
var keys = require('../keys');
// might need similar for object.freeze

@@ -222,2 +259,3 @@ // i regret nothing

var _create = Object.create;
var unconfigurablesKey = keys.create('unconfigurables');

@@ -266,3 +304,3 @@ function apply() {

function isUnconfigurable (obj, prop) {
return obj && obj.__unconfigurables && obj.__unconfigurables[prop];
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}

@@ -273,6 +311,6 @@

if (!desc.configurable) {
if (!obj.__unconfigurables) {
_defineProperty(obj, '__unconfigurables', { writable: true, value: {} });
if (!obj[unconfigurablesKey]) {
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
}
obj.__unconfigurables[prop] = true;
obj[unconfigurablesKey][prop] = true;
}

@@ -289,3 +327,3 @@ return desc;

},{}],5:[function(require,module,exports){
},{"../keys":3}],6:[function(require,module,exports){
(function (global){

@@ -304,3 +342,4 @@ 'use strict';

} else {
var apis = [ 'ApplicationCache',
var apis = [
'ApplicationCache',
'EventSource',

@@ -328,3 +367,10 @@ 'FileReader',

apis.forEach(function(thing) {
global[thing] && utils.patchEventTargetMethods(global[thing].prototype);
var obj = global[thing] && global[thing].prototype;
// Some browsers e.g. Android 4.3's don't actually implement
// the EventTarget methods for all of these e.g. FileReader.
// In this case, there is nothing to patch.
if (obj && obj.addEventListener) {
utils.patchEventTargetMethods(obj);
}
});

@@ -339,3 +385,15 @@ }

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13}],6:[function(require,module,exports){
},{"../utils":15}],7:[function(require,module,exports){
'use strict';
var utils = require('../utils');
function apply() {
utils.patchClass('FileReader');
}
module.exports = {
apply: apply
};
},{"../utils":15}],8:[function(require,module,exports){
(function (global){

@@ -462,3 +520,3 @@ 'use strict';

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13}],7:[function(require,module,exports){
},{"../utils":15}],9:[function(require,module,exports){
(function (global){

@@ -483,6 +541,12 @@ 'use strict';

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13}],8:[function(require,module,exports){
},{"../utils":15}],10:[function(require,module,exports){
(function (global){
'use strict';
var keys = require('../keys');
var originalInstanceKey = keys.create('originalInstance');
var creationZoneKey = keys.create('creationZone');
var isActiveKey = keys.create('isActive');
// wrap some native API on `window`

@@ -494,5 +558,5 @@ function patchClass(className) {

global[className] = function (fn) {
this._o = new OriginalClass(global.zone.bind(fn, true));
this[originalInstanceKey] = new OriginalClass(global.zone.bind(fn, true));
// Remember where the class was instantiate to execute the enqueueTask and dequeueTask hooks
this._creationZone = global.zone;
this[creationZoneKey] = global.zone;
};

@@ -503,6 +567,6 @@

global[className].prototype.disconnect = function () {
var result = this._o.disconnect.apply(this._o, arguments);
if (this._active) {
this._creationZone.dequeueTask();
this._active = false;
var result = this[originalInstanceKey].disconnect.apply(this[originalInstanceKey], arguments);
if (this[isActiveKey]) {
this[creationZoneKey].dequeueTask();
this[isActiveKey] = false;
}

@@ -513,7 +577,7 @@ return result;

global[className].prototype.observe = function () {
if (!this._active) {
this._creationZone.enqueueTask();
this._active = true;
if (!this[isActiveKey]) {
this[creationZoneKey].enqueueTask();
this[isActiveKey] = true;
}
return this._o.observe.apply(this._o, arguments);
return this[originalInstanceKey].observe.apply(this[originalInstanceKey], arguments);
};

@@ -529,3 +593,3 @@

global[className].prototype[prop] = function () {
return this._o[prop].apply(this._o, arguments);
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
};

@@ -536,9 +600,9 @@ } else {

if (typeof fn === 'function') {
this._o[prop] = global.zone.bind(fn);
this[originalInstanceKey][prop] = global.zone.bind(fn);
} else {
this._o[prop] = fn;
this[originalInstanceKey][prop] = fn;
}
},
get: function () {
return this._o[prop];
return this[originalInstanceKey][prop];
}

@@ -556,3 +620,3 @@ });

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],9:[function(require,module,exports){
},{"../keys":3}],11:[function(require,module,exports){
(function (global){

@@ -676,3 +740,3 @@ 'use strict';

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13}],10:[function(require,module,exports){
},{"../utils":15}],12:[function(require,module,exports){
(function (global){

@@ -683,2 +747,3 @@ 'use strict';

var utils = require('../utils');
var keys = require('../keys');

@@ -733,2 +798,4 @@ var eventNames = 'copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror'.split(' ');

var unboundKey = keys.create('unbound');
// Whenever any event fires, we check the event target and all parents

@@ -743,5 +810,5 @@ // for `onwhatever` properties and replace them with zone-bound functions

while (elt) {
if (elt[onproperty] && !elt[onproperty]._unbound) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = global.zone.bind(elt[onproperty]);
bound._unbound = elt[onproperty];
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;

@@ -760,3 +827,3 @@ }

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13,"./websocket":12}],11:[function(require,module,exports){
},{"../keys":3,"../utils":15,"./websocket":14}],13:[function(require,module,exports){
(function (global){

@@ -807,3 +874,3 @@ 'use strict';

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13,"./define-property":4}],12:[function(require,module,exports){
},{"../utils":15,"./define-property":5}],14:[function(require,module,exports){
(function (global){

@@ -847,6 +914,8 @@ 'use strict';

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"../utils":13}],13:[function(require,module,exports){
},{"../utils":15}],15:[function(require,module,exports){
(function (global){
'use strict';
var keys = require('./keys');
function bindArguments(args) {

@@ -924,3 +993,2 @@ for (var i = args.length - 1; i >= 0; i--) {

function patchProperties(obj, properties) {
(properties || (function () {

@@ -941,5 +1009,10 @@ var props = [];

var originalFnKey = keys.create('originalFn');
var boundFnsKey = keys.create('boundFns');
function patchEventTargetMethods(obj) {
var addDelegate = obj.addEventListener;
obj.addEventListener = function (eventName, handler) {
// This is required for the addEventListener hook on the root zone.
obj[keys.common.addEventListener] = obj.addEventListener;
obj.addEventListener = function (eventName, handler, useCapturing) {
var eventType = eventName + (useCapturing ? '$capturing' : '$bubbling');
var fn;

@@ -958,21 +1031,25 @@ //Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150

fn = handler;
}
}
handler._fn = fn;
handler._bound = handler._bound || {};
arguments[1] = handler._bound[eventName] = zone.bind(fn);
handler[originalFnKey] = fn;
handler[boundFnsKey] = handler[boundFnsKey] || {};
handler[boundFnsKey][eventType] = handler[boundFnsKey][eventType] || zone.bind(fn);
arguments[1] = handler[boundFnsKey][eventType];
}
return addDelegate.apply(this, arguments);
return global.zone.addEventListener.apply(this, arguments);
};
var removeDelegate = obj.removeEventListener;
obj.removeEventListener = function (eventName, handler) {
if(handler._bound && handler._bound[eventName]) {
var _bound = handler._bound;
// This is required for the removeEventListener hook on the root zone.
obj[keys.common.removeEventListener] = obj.removeEventListener;
obj.removeEventListener = function (eventName, handler, useCapturing) {
var eventType = eventName + (useCapturing ? '$capturing' : '$bubbling');
if (handler[boundFnsKey] && handler[boundFnsKey][eventType]) {
var _bound = handler[boundFnsKey];
arguments[1] = _bound[eventName];
delete _bound[eventName];
arguments[1] = _bound[eventType];
delete _bound[eventType];
}
var result = removeDelegate.apply(this, arguments);
global.zone.dequeueTask(handler._fn);
var result = global.zone.removeEventListener.apply(this, arguments);
global.zone.dequeueTask(handler[originalFnKey]);
return result;

@@ -982,2 +1059,4 @@ };

var originalInstanceKey = keys.create('originalInstance');
// wrap some native API on `window`

@@ -991,7 +1070,7 @@ function patchClass(className) {

switch (a.length) {
case 0: this._o = new OriginalClass(); break;
case 1: this._o = new OriginalClass(a[0]); break;
case 2: this._o = new OriginalClass(a[0], a[1]); break;
case 3: this._o = new OriginalClass(a[0], a[1], a[2]); break;
case 4: this._o = new OriginalClass(a[0], a[1], a[2], a[3]); break;
case 0: this[originalInstanceKey] = new OriginalClass(); break;
case 1: this[originalInstanceKey] = new OriginalClass(a[0]); break;
case 2: this[originalInstanceKey] = new OriginalClass(a[0], a[1]); break;
case 3: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); break;
case 4: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); break;
default: throw new Error('what are you even doing?');

@@ -1008,3 +1087,3 @@ }

global[className].prototype[prop] = function () {
return this._o[prop].apply(this._o, arguments);
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
};

@@ -1015,9 +1094,9 @@ } else {

if (typeof fn === 'function') {
this._o[prop] = global.zone.bind(fn);
this[originalInstanceKey][prop] = global.zone.bind(fn);
} else {
this._o[prop] = fn;
this[originalInstanceKey][prop] = fn;
}
},
get: function () {
return this._o[prop];
return this[originalInstanceKey][prop];
}

@@ -1048,2 +1127,2 @@ });

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}]},{},[1]);
},{"./keys":3}]},{},[1]);

@@ -1,1 +0,1 @@

!function e(t,n,o){function r(u,a){if(!n[u]){if(!t[u]){var c="function"==typeof require&&require;if(!a&&c)return c(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return r(n?n:e)},f,f.exports,e,t,n,o)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<o.length;u++)r(o[u]);return r}({1:[function(e,t,n){(function(t){"use strict";var n=e("../core"),o=e("../patch/browser");t.Zone&&console.warn("Zone already exported on window the object!"),t.Zone=n.Zone,t.zone=new t.Zone,o.apply()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../core":2,"../patch/browser":3}],2:[function(e,t,n){(function(n){"use strict";function o(e,t){var n=arguments.length?Object.create(e):this;return n.parent=e||null,Object.keys(t||{}).forEach(function(o){var r=o.substr(1);"$"===o[0]?n[r]=t[o](e[r]||function(){}):"+"===o[0]?n[r]=e[r]?function(){var n=e[r].apply(this,arguments);return t[o].apply(this,arguments),n}:t[o]:"-"===o[0]?n[r]=e[r]?function(){return t[o].apply(this,arguments),e[r].apply(this,arguments)}:t[o]:n[o]="object"==typeof t[o]?JSON.parse(JSON.stringify(t[o])):t[o]}),n.$id=o.nextId++,n}o.prototype={constructor:o,fork:function(e){return this.onZoneCreated(),new o(this,e)},bind:function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);t||this.enqueueTask(e);var n=this.isRootZone()?this:this.fork();return function(){return n.run(e,this,arguments)}},bindOnce:function(e){var t=this;return this.bind(function(){var n=e.apply(this,arguments);return t.dequeueTask(e),n})},isRootZone:function(){return null===this.parent},run:function(e,t,o){o=o||[];var r=n.zone;n.zone=this;try{return this.beforeTask(),e.apply(t,o)}catch(i){if(!this.onError)throw i;this.onError(i)}finally{this.afterTask(),n.zone=r}},onError:null,beforeTask:function(){},onZoneCreated:function(){},afterTask:function(){},enqueueTask:function(){},dequeueTask:function(){}},o.nextId=1,o.bindPromiseFn=e("./patch/promise").bindPromiseFn,t.exports={Zone:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./patch/promise":9}],3:[function(e,t,n){(function(n){"use strict";function o(){r.patchSetClearFunction(n,["timeout","interval","immediate"]),r.patchRequestAnimationFrame(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),r.patchFunction(n,["alert","prompt"]),s.apply(),f.apply(),i.apply(),u.patchClass("MutationObserver"),u.patchClass("WebKitMutationObserver"),a.apply(),c.apply(),p.apply()}var r=e("./functions"),i=e("./promise"),u=e("./mutation-observer"),a=e("./define-property"),c=e("./register-element"),s=(e("./websocket"),e("./event-target")),f=e("./property-descriptor"),p=e("./geolocation");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":4,"./event-target":5,"./functions":6,"./geolocation":7,"./mutation-observer":8,"./promise":9,"./property-descriptor":10,"./register-element":11,"./websocket":12}],4:[function(e,t,n){"use strict";function o(){Object.defineProperty=function(e,t,n){if(i(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=u(e,t,n)),a(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=u(e,n,t[n])}),s(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=c(e,t);return i(e,t)&&(n.configurable=!1),n}}function r(e,t,n){return n=u(e,t,n),a(e,t,n)}function i(e,t){return e&&e.__unconfigurables&&e.__unconfigurables[t]}function u(e,t,n){return n.configurable=!0,n.configurable||(e.__unconfigurables||a(e,"__unconfigurables",{writable:!0,value:{}}),e.__unconfigurables[t]=!0),n}var a=Object.defineProperty,c=Object.getOwnPropertyDescriptor,s=Object.create;t.exports={apply:o,_redefineProperty:r}},{}],5:[function(e,t,n){(function(n){"use strict";function o(){if(n.EventTarget)r.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Window","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){n[e]&&r.patchEventTargetMethods(n[e].prototype)})}}var r=e("../utils");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13}],6:[function(e,t,n){(function(n){"use strict";function o(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var o="set"+t,r=e[o];if(r){var i="clear"+t,u={},c="setInterval"===o?a.bindArguments:a.bindArgumentsOnce;n.zone[o]=function(t){var n,o=t;arguments[0]=function(){return delete u[n],o.apply(this,arguments)};var i=c(arguments);return n=r.apply(e,i),u[n]=!0,n},e[o]=function(){return n.zone[o].apply(this,arguments)};var s=e[i];n.zone[i]=function(e){return u[e]&&(delete u[e],n.zone.dequeueTask()),s.apply(this,arguments)},e[i]=function(){return n.zone[i].apply(this,arguments)}}})}function r(e,t){t.forEach(function(t){var o=e[t];o&&(n.zone[t]=function(t){var r=n.zone.isRootZone()?n.zone.fork():n.zone;return t&&(arguments[0]=function(){return r.run(t,arguments)}),o.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)})})}function i(e,t){t.forEach(function(t){var o=e[t];o&&(n.zone[t]=function(t){var n=t;arguments[0]=function(){return n.apply(this,arguments)};var r=a.bindArgumentsOnce(arguments);return o.apply(e,r)},e[t]=function(){return zone[t].apply(this,arguments)})})}function u(e,t){t.forEach(function(t){var o=e[t];n.zone[t]=function(){return o.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var a=e("../utils");t.exports={patchSetClearFunction:o,patchSetFunction:i,patchRequestAnimationFrame:r,patchFunction:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13}],7:[function(e,t,n){(function(n){"use strict";function o(){n.navigator&&n.navigator.geolocation&&r.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var r=e("../utils");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13}],8:[function(e,t,n){(function(e){"use strict";function n(t){var n=e[t];if(n){e[t]=function(t){this._o=new n(e.zone.bind(t,!0)),this._creationZone=e.zone};var o=new n(function(){});e[t].prototype.disconnect=function(){var e=this._o.disconnect.apply(this._o,arguments);return this._active&&(this._creationZone.dequeueTask(),this._active=!1),e},e[t].prototype.observe=function(){return this._active||(this._creationZone.enqueueTask(),this._active=!0),this._o.observe.apply(this._o,arguments)};var r;for(r in o)!function(n){void 0===typeof e[t].prototype&&("function"==typeof o[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}}))}(r)}}t.exports={patchClass:n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,t,n){(function(n){"use strict";function o(e,t){var o=n,r=e.every(function(e){return o=o[e]});r&&t.forEach(function(e){var t=o[e];t&&(o[e]=u(t))})}function r(e){var t=e.then;e.then=function(){var n=a.bindArguments(arguments),o=t.apply(e,n);return r(o)};var n=e["catch"];return e["catch"]=function(){var t=a.bindArguments(arguments),o=n.apply(e,t);return r(o)},e}function i(){if(n.Promise){a.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){o(e[0],e[1])})}}var u,a=e("../utils");u=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return r(e.apply(this,arguments))}},t.exports={apply:i,bindPromiseFn:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13}],10:[function(e,t,n){(function(n){"use strict";function o(){if(!a.isWebWorker()){var e="undefined"!=typeof WebSocket;if(r()){var t=c.map(function(e){return"on"+e});a.patchProperties(HTMLElement.prototype,t),a.patchProperties(XMLHttpRequest.prototype),e&&a.patchProperties(WebSocket.prototype)}else i(),a.patchClass("XMLHttpRequest"),e&&u.apply()}}function r(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function i(){c.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var o,r=e.target;r;)r[t]&&!r[t]._unbound&&(o=n.zone.bind(r[t]),o._unbound=r[t],r[t]=o),r=r.parentElement},!0)})}var u=e("./websocket"),a=e("../utils"),c="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" ");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13,"./websocket":12}],11:[function(e,t,n){(function(n){"use strict";function o(){if(!i.isWebWorker()&&"registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(o,i){return i&&i.prototype&&t.forEach(function(e){if(i.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(i.prototype,e);t&&t.value?(t.value=n.zone.bind(t.value),r(i.prototype,e,t)):i.prototype[e]=n.zone.bind(i.prototype[e])}else i.prototype[e]&&(i.prototype[e]=n.zone.bind(i.prototype[e]))}),e.apply(document,[o,i])}}}var r=e("./define-property")._redefineProperty,i=e("../utils");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13,"./define-property":4}],12:[function(e,t,n){(function(n){"use strict";function o(){var e=n.WebSocket;r.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var o,i=arguments.length>1?new e(t,n):new e(t),u=Object.getOwnPropertyDescriptor(i,"onmessage");return u&&u.configurable===!1?(o=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){o[e]=function(){return i[e].apply(i,arguments)}})):o=i,r.patchProperties(o,["onclose","onerror","onmessage","onopen"]),o}}var r=e("../utils");t.exports={apply:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":13}],13:[function(e,t,n){(function(e){"use strict";function n(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bind(t[n]));return t}function o(t){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=e.zone.bindOnce(t[n]));return t}function r(e,t){t.forEach(function(t){var o=e[t];o&&(e[t]=function(){return o.apply(this,n(arguments))})})}function i(){return"undefined"==typeof document}function u(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var o=t.substr(2),r="_"+t;n.set=function(e){this[r]&&this.removeEventListener(o,this[r]),"function"==typeof e?(this[r]=e,this.addEventListener(o,e,!1)):this[r]=null},n.get=function(){return this[r]},Object.defineProperty(e,t,n)}function a(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){u(e,t)})}function c(t){var n=t.addEventListener;t.addEventListener=function(e,t){var o;return"[object FunctionWrapper]"!==t.toString()&&(o=t.handleEvent?function(e){return function(){e.handleEvent.apply(e,arguments)}}(t):t,t._fn=o,t._bound=t._bound||{},arguments[1]=t._bound[e]=zone.bind(o)),n.apply(this,arguments)};var o=t.removeEventListener;t.removeEventListener=function(t,n){if(n._bound&&n._bound[t]){var r=n._bound;arguments[1]=r[t],delete r[t]}var i=o.apply(this,arguments);return e.zone.dequeueTask(n._fn),i}}function s(t){var o=e[t];if(o){e[t]=function(){var e=n(arguments);switch(e.length){case 0:this._o=new o;break;case 1:this._o=new o(e[0]);break;case 2:this._o=new o(e[0],e[1]);break;case 3:this._o=new o(e[0],e[1],e[2]);break;case 4:this._o=new o(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var r,i=new o;for(r in i)!function(n){"function"==typeof i[n]?e[t].prototype[n]=function(){return this._o[n].apply(this._o,arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(t){this._o[n]="function"==typeof t?e.zone.bind(t):t},get:function(){return this._o[n]}})}(r);for(r in o)"prototype"!==r&&o.hasOwnProperty(r)&&(e[t][r]=o[r])}}t.exports={bindArguments:n,bindArgumentsOnce:o,patchPrototype:r,patchProperty:u,patchProperties:a,patchEventTargetMethods:c,patchClass:s,isWebWorker:i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
!function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){(function(t){"use strict";var n=e("../core"),r=e("../patch/browser");t.Zone&&console.warn("Zone already exported on window the object!"),t.Zone=n.Zone,t.zone=new t.Zone,r.apply()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../core":2,"../patch/browser":4}],2:[function(e,t,n){(function(n){"use strict";function r(e,t){var n=arguments.length?Object.create(e):this;return n.parent=e||null,Object.keys(t||{}).forEach(function(r){var o=r.substr(1);"$"===r[0]?n[o]=t[r](e[o]||function(){}):"+"===r[0]?e[o]?n[o]=function(){var n=e[o].apply(this,arguments);return t[r].apply(this,arguments),n}:n[o]=t[r]:"-"===r[0]?e[o]?n[o]=function(){return t[r].apply(this,arguments),e[o].apply(this,arguments)}:n[o]=t[r]:n[r]="object"==typeof t[r]?JSON.parse(JSON.stringify(t[r])):t[r]}),n.$id=r.nextId++,n}var o=e("./keys");r.prototype={constructor:r,fork:function(e){return this.onZoneCreated(),new r(this,e)},bind:function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);t||this.enqueueTask(e);var n=this.isRootZone()?this:this.fork();return function(){return n.run(e,this,arguments)}},bindOnce:function(e){var t=this;return this.bind(function(){var n=e.apply(this,arguments);return t.dequeueTask(e),n})},isRootZone:function(){return null===this.parent},run:function(e,t,r){r=r||[];var o=n.zone;n.zone=this;try{return this.beforeTask(),e.apply(t,r)}catch(i){if(!this.onError)throw i;this.onError(i)}finally{this.afterTask(),n.zone=o}},onError:null,beforeTask:function(){},onZoneCreated:function(){},afterTask:function(){},enqueueTask:function(){},dequeueTask:function(){},addEventListener:function(){return this[o.common.addEventListener].apply(this,arguments)},removeEventListener:function(){return this[o.common.removeEventListener].apply(this,arguments)}},r.nextId=1,r.bindPromiseFn=e("./patch/promise").bindPromiseFn,t.exports={Zone:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":3,"./patch/promise":11}],3:[function(e,t,n){function r(e){return Symbol(e)}function r(e){return"_zone$"+e}"undefined"!=typeof Symbol;var o={addEventListener:r("addEventListener"),removeEventListener:r("removeEventListener")};t.exports={create:r,common:o}},{}],4:[function(e,t,n){(function(n){"use strict";function r(){o.patchSetClearFunction(n,["timeout","interval","immediate"]),o.patchRequestAnimationFrame(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),o.patchFunction(n,["alert","prompt"]),c.apply(),p.apply(),i.apply(),a.patchClass("MutationObserver"),a.patchClass("WebKitMutationObserver"),u.apply(),s.apply(),f.apply(),l.apply()}var o=e("./functions"),i=e("./promise"),a=e("./mutation-observer"),u=e("./define-property"),s=e("./register-element"),c=(e("./websocket"),e("./event-target")),p=e("./property-descriptor"),f=e("./geolocation"),l=e("./file-reader");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":5,"./event-target":6,"./file-reader":7,"./functions":8,"./geolocation":9,"./mutation-observer":10,"./promise":11,"./property-descriptor":12,"./register-element":13,"./websocket":14}],5:[function(e,t,n){"use strict";function r(){Object.defineProperty=function(e,t,n){if(i(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=a(e,t,n)),s(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=a(e,n,t[n])}),p(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=c(e,t);return i(e,t)&&(n.configurable=!1),n}}function o(e,t,n){return n=a(e,t,n),s(e,t,n)}function i(e,t){return e&&e[f]&&e[f][t]}function a(e,t,n){return n.configurable=!0,n.configurable||(e[f]||s(e,f,{writable:!0,value:{}}),e[f][t]=!0),n}var u=e("../keys"),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,p=Object.create,f=u.create("unconfigurables");t.exports={apply:r,_redefineProperty:o}},{"../keys":3}],6:[function(e,t,n){(function(n){"use strict";function r(){if(n.EventTarget)o.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Window","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){var t=n[e]&&n[e].prototype;t&&t.addEventListener&&o.patchEventTargetMethods(t)})}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15}],7:[function(e,t,n){"use strict";function r(){o.patchClass("FileReader")}var o=e("../utils");t.exports={apply:r}},{"../utils":15}],8:[function(e,t,n){(function(n){"use strict";function r(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var r="set"+t,o=e[r];if(o){var i="clear"+t,a={},s="setInterval"===r?u.bindArguments:u.bindArgumentsOnce;n.zone[r]=function(t){var n,r=t;arguments[0]=function(){return delete a[n],r.apply(this,arguments)};var i=s(arguments);return n=o.apply(e,i),a[n]=!0,n},e[r]=function(){return n.zone[r].apply(this,arguments)};var c=e[i];n.zone[i]=function(e){return a[e]&&(delete a[e],n.zone.dequeueTask()),c.apply(this,arguments)},e[i]=function(){return n.zone[i].apply(this,arguments)}}})}function o(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var o=n.zone.isRootZone()?n.zone.fork():n.zone;return t&&(arguments[0]=function(){return o.run(t,arguments)}),r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)})})}function i(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var n=t;arguments[0]=function(){return n.apply(this,arguments)};var o=u.bindArgumentsOnce(arguments);return r.apply(e,o)},e[t]=function(){return zone[t].apply(this,arguments)})})}function a(e,t){t.forEach(function(t){var r=e[t];n.zone[t]=function(){return r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var u=e("../utils");t.exports={patchSetClearFunction:r,patchSetFunction:i,patchRequestAnimationFrame:o,patchFunction:a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15}],9:[function(e,t,n){(function(n){"use strict";function r(){n.navigator&&n.navigator.geolocation&&o.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15}],10:[function(e,t,n){(function(n){"use strict";function r(e){var t=n[e];if(t){n[e]=function(e){this[i]=new t(n.zone.bind(e,!0)),this[a]=n.zone};var r=new t(function(){});n[e].prototype.disconnect=function(){var e=this[i].disconnect.apply(this[i],arguments);return this[u]&&(this[a].dequeueTask(),this[u]=!1),e},n[e].prototype.observe=function(){return this[u]||(this[a].enqueueTask(),this[u]=!0),this[i].observe.apply(this[i],arguments)};var o;for(o in r)!function(t){void 0===typeof n[e].prototype&&("function"==typeof r[t]?n[e].prototype[t]=function(){return this[i][t].apply(this[i],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[i][t]=n.zone.bind(e):this[i][t]=e},get:function(){return this[i][t]}}))}(o)}}var o=e("../keys"),i=o.create("originalInstance"),a=o.create("creationZone"),u=o.create("isActive");t.exports={patchClass:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3}],11:[function(e,t,n){(function(n){"use strict";function r(e,t){var r=n,o=e.every(function(e){return r=r[e]});o&&t.forEach(function(e){var t=r[e];t&&(r[e]=a(t))})}function o(e){var t=e.then;e.then=function(){var n=u.bindArguments(arguments),r=t.apply(e,n);return o(r)};var n=e["catch"];return e["catch"]=function(){var t=u.bindArguments(arguments),r=n.apply(e,t);return o(r)},e}function i(){if(n.Promise){u.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){r(e[0],e[1])})}}var a,u=e("../utils");a=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return o(e.apply(this,arguments))}},t.exports={apply:i,bindPromiseFn:a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15}],12:[function(e,t,n){(function(n){"use strict";function r(){if(!u.isWebWorker()){var e="undefined"!=typeof WebSocket;if(o()){var t=c.map(function(e){return"on"+e});u.patchProperties(HTMLElement.prototype,t),u.patchProperties(XMLHttpRequest.prototype),e&&u.patchProperties(WebSocket.prototype)}else i(),u.patchClass("XMLHttpRequest"),e&&a.apply()}}function o(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function i(){c.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var r,o=e.target;o;)o[t]&&!o[t][p]&&(r=n.zone.bind(o[t]),r[p]=o[t],o[t]=r),o=o.parentElement},!0)})}var a=e("./websocket"),u=e("../utils"),s=e("../keys"),c="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),p=s.create("unbound");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3,"../utils":15,"./websocket":14}],13:[function(e,t,n){(function(n){"use strict";function r(){if(!i.isWebWorker()&&"registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(r,i){return i&&i.prototype&&t.forEach(function(e){if(i.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(i.prototype,e);t&&t.value?(t.value=n.zone.bind(t.value),o(i.prototype,e,t)):i.prototype[e]=n.zone.bind(i.prototype[e])}else i.prototype[e]&&(i.prototype[e]=n.zone.bind(i.prototype[e]))}),e.apply(document,[r,i])}}}var o=e("./define-property")._redefineProperty,i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15,"./define-property":5}],14:[function(e,t,n){(function(n){"use strict";function r(){var e=n.WebSocket;o.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var r,i=arguments.length>1?new e(t,n):new e(t),a=Object.getOwnPropertyDescriptor(i,"onmessage");return a&&a.configurable===!1?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return i[e].apply(i,arguments)}})):r=i,o.patchProperties(r,["onclose","onerror","onmessage","onopen"]),r}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":15}],15:[function(e,t,n){(function(n){"use strict";function r(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bind(e[t]));return e}function o(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bindOnce(e[t]));return e}function i(e,t){t.forEach(function(t){var n=e[t];n&&(e[t]=function(){return n.apply(this,r(arguments))})})}function a(){return"undefined"==typeof document}function u(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e?(this[o]=e,this.addEventListener(r,e,!1)):this[o]=null},n.get=function(){return this[o]},Object.defineProperty(e,t,n)}function s(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){u(e,t)})}function c(e){e[f.common.addEventListener]=e.addEventListener,e.addEventListener=function(e,t,r){var o,i=e+(r?"$capturing":"$bubbling");return"[object FunctionWrapper]"!==t.toString()&&(o=t.handleEvent?function(e){return function(){e.handleEvent.apply(e,arguments)}}(t):t,t[l]=o,t[d]=t[d]||{},t[d][i]=t[d][i]||zone.bind(o),arguments[1]=t[d][i]),n.zone.addEventListener.apply(this,arguments)},e[f.common.removeEventListener]=e.removeEventListener,e.removeEventListener=function(e,t,r){var o=e+(r?"$capturing":"$bubbling");if(t[d]&&t[d][o]){var i=t[d];arguments[1]=i[o],delete i[o]}var a=n.zone.removeEventListener.apply(this,arguments);return n.zone.dequeueTask(t[l]),a}}function p(e){var t=n[e];if(t){n[e]=function(){var e=r(arguments);switch(e.length){case 0:this[y]=new t;break;case 1:this[y]=new t(e[0]);break;case 2:this[y]=new t(e[0],e[1]);break;case 3:this[y]=new t(e[0],e[1],e[2]);break;case 4:this[y]=new t(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var o,i=new t;for(o in i)!function(t){"function"==typeof i[t]?n[e].prototype[t]=function(){return this[y][t].apply(this[y],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[y][t]=n.zone.bind(e):this[y][t]=e},get:function(){return this[y][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(n[e][o]=t[o])}}var f=e("./keys"),l=f.create("originalFn"),d=f.create("boundFns"),y=f.create("originalInstance");t.exports={bindArguments:r,bindArgumentsOnce:o,patchPrototype:i,patchProperty:u,patchProperties:s,patchEventTargetMethods:c,patchClass:p,isWebWorker:a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":3}]},{},[1]);
'use strict';
var keys = require('./keys');
function Zone(parentZone, data) {

@@ -122,3 +124,9 @@ var zone = (arguments.length) ? Object.create(parentZone) : this;

enqueueTask: function () {},
dequeueTask: function () {}
dequeueTask: function () {},
addEventListener: function () {
return this[keys.common.addEventListener].apply(this, arguments);
},
removeEventListener: function () {
return this[keys.common.removeEventListener].apply(this, arguments);
}
};

@@ -125,0 +133,0 @@

@@ -12,2 +12,3 @@ 'use strict';

var geolocationPatch = require('./geolocation');
var fileReaderPatch = require('./file-reader');

@@ -46,2 +47,4 @@ function apply() {

geolocationPatch.apply();
fileReaderPatch.apply();
}

@@ -48,0 +51,0 @@

'use strict';
var keys = require('../keys');
// might need similar for object.freeze

@@ -9,2 +11,3 @@ // i regret nothing

var _create = Object.create;
var unconfigurablesKey = keys.create('unconfigurables');

@@ -53,3 +56,3 @@ function apply() {

function isUnconfigurable (obj, prop) {
return obj && obj.__unconfigurables && obj.__unconfigurables[prop];
return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
}

@@ -60,6 +63,6 @@

if (!desc.configurable) {
if (!obj.__unconfigurables) {
_defineProperty(obj, '__unconfigurables', { writable: true, value: {} });
if (!obj[unconfigurablesKey]) {
_defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
}
obj.__unconfigurables[prop] = true;
obj[unconfigurablesKey][prop] = true;
}

@@ -66,0 +69,0 @@ return desc;

@@ -13,3 +13,4 @@ 'use strict';

} else {
var apis = [ 'ApplicationCache',
var apis = [
'ApplicationCache',
'EventSource',

@@ -37,3 +38,10 @@ 'FileReader',

apis.forEach(function(thing) {
global[thing] && utils.patchEventTargetMethods(global[thing].prototype);
var obj = global[thing] && global[thing].prototype;
// Some browsers e.g. Android 4.3's don't actually implement
// the EventTarget methods for all of these e.g. FileReader.
// In this case, there is nothing to patch.
if (obj && obj.addEventListener) {
utils.patchEventTargetMethods(obj);
}
});

@@ -40,0 +48,0 @@ }

'use strict';
var keys = require('../keys');
var originalInstanceKey = keys.create('originalInstance');
var creationZoneKey = keys.create('creationZone');
var isActiveKey = keys.create('isActive');
// wrap some native API on `window`

@@ -9,5 +15,5 @@ function patchClass(className) {

global[className] = function (fn) {
this._o = new OriginalClass(global.zone.bind(fn, true));
this[originalInstanceKey] = new OriginalClass(global.zone.bind(fn, true));
// Remember where the class was instantiate to execute the enqueueTask and dequeueTask hooks
this._creationZone = global.zone;
this[creationZoneKey] = global.zone;
};

@@ -18,6 +24,6 @@

global[className].prototype.disconnect = function () {
var result = this._o.disconnect.apply(this._o, arguments);
if (this._active) {
this._creationZone.dequeueTask();
this._active = false;
var result = this[originalInstanceKey].disconnect.apply(this[originalInstanceKey], arguments);
if (this[isActiveKey]) {
this[creationZoneKey].dequeueTask();
this[isActiveKey] = false;
}

@@ -28,7 +34,7 @@ return result;

global[className].prototype.observe = function () {
if (!this._active) {
this._creationZone.enqueueTask();
this._active = true;
if (!this[isActiveKey]) {
this[creationZoneKey].enqueueTask();
this[isActiveKey] = true;
}
return this._o.observe.apply(this._o, arguments);
return this[originalInstanceKey].observe.apply(this[originalInstanceKey], arguments);
};

@@ -44,3 +50,3 @@

global[className].prototype[prop] = function () {
return this._o[prop].apply(this._o, arguments);
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
};

@@ -51,9 +57,9 @@ } else {

if (typeof fn === 'function') {
this._o[prop] = global.zone.bind(fn);
this[originalInstanceKey][prop] = global.zone.bind(fn);
} else {
this._o[prop] = fn;
this[originalInstanceKey][prop] = fn;
}
},
get: function () {
return this._o[prop];
return this[originalInstanceKey][prop];
}

@@ -60,0 +66,0 @@ });

@@ -5,2 +5,3 @@ 'use strict';

var utils = require('../utils');
var keys = require('../keys');

@@ -55,2 +56,4 @@ var eventNames = 'copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror'.split(' ');

var unboundKey = keys.create('unbound');
// Whenever any event fires, we check the event target and all parents

@@ -65,5 +68,5 @@ // for `onwhatever` properties and replace them with zone-bound functions

while (elt) {
if (elt[onproperty] && !elt[onproperty]._unbound) {
if (elt[onproperty] && !elt[onproperty][unboundKey]) {
bound = global.zone.bind(elt[onproperty]);
bound._unbound = elt[onproperty];
bound[unboundKey] = elt[onproperty];
elt[onproperty] = bound;

@@ -70,0 +73,0 @@ }

'use strict';
var keys = require('./keys');
function bindArguments(args) {

@@ -75,3 +77,2 @@ for (var i = args.length - 1; i >= 0; i--) {

function patchProperties(obj, properties) {
(properties || (function () {

@@ -92,5 +93,10 @@ var props = [];

var originalFnKey = keys.create('originalFn');
var boundFnsKey = keys.create('boundFns');
function patchEventTargetMethods(obj) {
var addDelegate = obj.addEventListener;
obj.addEventListener = function (eventName, handler) {
// This is required for the addEventListener hook on the root zone.
obj[keys.common.addEventListener] = obj.addEventListener;
obj.addEventListener = function (eventName, handler, useCapturing) {
var eventType = eventName + (useCapturing ? '$capturing' : '$bubbling');
var fn;

@@ -109,21 +115,25 @@ //Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150

fn = handler;
}
}
handler._fn = fn;
handler._bound = handler._bound || {};
arguments[1] = handler._bound[eventName] = zone.bind(fn);
handler[originalFnKey] = fn;
handler[boundFnsKey] = handler[boundFnsKey] || {};
handler[boundFnsKey][eventType] = handler[boundFnsKey][eventType] || zone.bind(fn);
arguments[1] = handler[boundFnsKey][eventType];
}
return addDelegate.apply(this, arguments);
return global.zone.addEventListener.apply(this, arguments);
};
var removeDelegate = obj.removeEventListener;
obj.removeEventListener = function (eventName, handler) {
if(handler._bound && handler._bound[eventName]) {
var _bound = handler._bound;
// This is required for the removeEventListener hook on the root zone.
obj[keys.common.removeEventListener] = obj.removeEventListener;
obj.removeEventListener = function (eventName, handler, useCapturing) {
var eventType = eventName + (useCapturing ? '$capturing' : '$bubbling');
if (handler[boundFnsKey] && handler[boundFnsKey][eventType]) {
var _bound = handler[boundFnsKey];
arguments[1] = _bound[eventName];
delete _bound[eventName];
arguments[1] = _bound[eventType];
delete _bound[eventType];
}
var result = removeDelegate.apply(this, arguments);
global.zone.dequeueTask(handler._fn);
var result = global.zone.removeEventListener.apply(this, arguments);
global.zone.dequeueTask(handler[originalFnKey]);
return result;

@@ -133,2 +143,4 @@ };

var originalInstanceKey = keys.create('originalInstance');
// wrap some native API on `window`

@@ -142,7 +154,7 @@ function patchClass(className) {

switch (a.length) {
case 0: this._o = new OriginalClass(); break;
case 1: this._o = new OriginalClass(a[0]); break;
case 2: this._o = new OriginalClass(a[0], a[1]); break;
case 3: this._o = new OriginalClass(a[0], a[1], a[2]); break;
case 4: this._o = new OriginalClass(a[0], a[1], a[2], a[3]); break;
case 0: this[originalInstanceKey] = new OriginalClass(); break;
case 1: this[originalInstanceKey] = new OriginalClass(a[0]); break;
case 2: this[originalInstanceKey] = new OriginalClass(a[0], a[1]); break;
case 3: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); break;
case 4: this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); break;
default: throw new Error('what are you even doing?');

@@ -159,3 +171,3 @@ }

global[className].prototype[prop] = function () {
return this._o[prop].apply(this._o, arguments);
return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
};

@@ -166,9 +178,9 @@ } else {

if (typeof fn === 'function') {
this._o[prop] = global.zone.bind(fn);
this[originalInstanceKey][prop] = global.zone.bind(fn);
} else {
this._o[prop] = fn;
this[originalInstanceKey][prop] = fn;
}
},
get: function () {
return this._o[prop];
return this[originalInstanceKey][prop];
}

@@ -175,0 +187,0 @@ });

@@ -72,3 +72,3 @@ /*

stackFramesFilter: function (line) {
return /zone(-microtask)?(\.min)?\.js/.test(line);
return !/zone(-microtask)?(\.min)?\.js/.test(line);
},

@@ -75,0 +75,0 @@

{
"name": "zone.js",
"version": "0.5.4",
"version": "0.5.5",
"description": "Zones for JavaScript",

@@ -27,5 +27,7 @@ "main": "lib/zone.js",

},
"dependencies": {
"es6-promise": "^3.0.2"
},
"devDependencies": {
"browserify": "^9.0.8",
"es6-promise": "^2.3.0",
"gulp": "^3.8.11",

@@ -32,0 +34,0 @@ "gulp-rename": "^1.2.2",

@@ -182,3 +182,3 @@ # Zone.js

```javascript
zone.fork({
var myZone = zone.fork({
onZoneCreated: function () {},

@@ -194,3 +194,2 @@ beforeTask: function () {},

prompt: function () {},
addEventListener: function () {}
});

@@ -247,5 +246,49 @@ myZone.run(function () {

This hook allows you to intercept calls to `EventTarget.addEventListener`.
This hook allows you to intercept calls to `EventTarget#addEventListener`.
````javascript
var clickListenerCount = 0;
zone.fork(
$addEventListener: function(parentAddEventListener) {
return function (type, listener) {
if (type === 'click') clickListenerCount++;
return parentAddEventListener.apply(this, arguments);
};
}
);
zone.run(function() {
myElement.addEventListener('click', listener);
myOtherElement.addEventListener('click', listener);
console.log(clickListenerCount); // 2
});
````
### `zone.removeEventListener`
This hook allows you to intercept calls to `EventTarget#removeEventListener`.
````javascript
var clickListenerCount = 0;
zone.fork(
$removeEventListener: function(parentRemoveEventListener) {
return function (type, listener) {
if (type === 'click') clickListenerCount--;
return parentRemoveEventListener.apply(this, arguments);
};
}
);
zone.run(function() {
myElement.addEventListener('click', listener);
myElement.removeEventListener('click', listener);
console.log(clickListenerCount); // 0
});
````
## Status

@@ -252,0 +295,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc