text: !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.ActionDispatcher=e()}}(function(){return function e(n,t,r){function i(f,u){if(!t[f]){if(!n[f]){var d="function"==typeof require&&require;if(!u&&d)return d(f,!0);if(o)return o(f,!0);var s=new Error("Cannot find module '"+f+"'");throw s.code="MODULE_NOT_FOUND",s}var l=t[f]={exports:{}};n[f][0].call(l.exports,function(e){var t=n[f][1][e];return i(t?t:e)},l,l.exports,e,n,t,r)}return t[f].exports}for(var o="function"==typeof require&&require,f=0;f<r.length;f++)i(r[f]);return i}({1:[function(e,n){var t="undefined"!=typeof window?window.Promise:"undefined"!=typeof global?global.Promise:null,r=function(e){return function(n,t){s.prototype.addListener.call(this,n,t,e)}},i=function(e){return function(n,t){s.prototype.removeListener.call(this,n,t,e)}},o=function(e){var n=0;return this._listeners.some(function(t,r){return t.priority>e?!0:void(n=r+1)}),n},f=function(e,n,t){var r=-1;return this._listeners.some(function(i,o){return i.handler===e&&i.context===n&&i.priority===t?(r=o,!0):void 0}),r},u=function(e,n,t,r,i){var o=e[n];if("undefined"==typeof o)return void r();try{var f=o.handler.apply(o.context,t);if(d(f))return void f.then(function(){u(e,n+1,t,r,i)},i)}catch(s){return void i(s)}u(e,n+1,t,r,i)},d=function(e){return"undefined"!=typeof e&&null!==e&&"then"in e&&"function"==typeof e.then},s=function(){this._listeners=[],this.dispatchWithContext=this.dispatch.bind(this)};s.BEFORE_HANDLERS_PRIORITY=5,s.HANDLERS_PRIORITY=10,s.AFTER_HANDLERS_PRIORITY=15,s.DEFAULT_PRIORITY=20,s.prototype={constructor:s,addListenerBeforeHandlers:r(s.BEFORE_HANDLERS_PRIORITY),removeListenerBeforeHandlers:i(s.BEFORE_HANDLERS_PRIORITY),addHandler:r(s.HANDLERS_PRIORITY),removeHandler:i(s.HANDLERS_PRIORITY),addListenerAfterHandlers:r(s.AFTER_HANDLERS_PRIORITY),removeListenerAfterHandlers:i(s.AFTER_HANDLERS_PRIORITY),addListener:function(e,n,t){t="undefined"==typeof t&&s.DEFAULT_PRIORITY||+t;var r=o.call(this,t);this._listeners.splice(r,0,{handler:e,context:n,priority:t})},removeListener:function(e,n,t){t="undefined"==typeof t&&s.DEFAULT_PRIORITY||+t;var r=f.call(this,e,n,t);return-1!==r&&this._listeners.splice(r,1),-1!==r},dispatch:function(){var e=this._listeners,n=arguments;return new t(function(t,r){u(e,0,n,t,r)})}},n.exports=s},{}]},{},[1])(1)});