class Event{on(t,s,e){"function"==typeof s?(this._stores=this._stores||{},(this._stores[t]=this._stores[t]||[]).push({cb:s,ctx:e})):console.error("listener must be a function")}emit(t){this._stores=this._stores||{};let s,e=this._stores[t];if(e){e=e.slice(0),s=[].slice.call(arguments,1),s[0]={eventCode:t,data:s[0]};for(let t=0,o=e.length;t