smart-house-frontend
Version:
2 lines • 309 kB
JavaScript
webpackJsonp([8],{419:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(420),a=function(){function t(t){this.devicesService=t}return t.prototype.resolve=function(){return this.devicesService.getSensors()},t=n([s.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof o.DevicesService&&o.DevicesService)&&e||Object])],t);var e}();e.DeviceListResolver=a},420:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(67),a=function(){function t(t){this.http=t}return t.prototype.getSensors=function(){return this.http.get("/sensors")},t.prototype.get=function(t){return void 0===t&&(t=""),this.http.get("/sensors/"+t)},t.prototype.save=function(t){return this.http.post("/sensors",t)},t.prototype.update=function(t){return this.http.put("/sensors/"+t._id,t)},t.prototype.delete=function(t){return this.http.delete("/sensors/"+t._id)},t=n([s.Injectable(),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof o.ShHttpService&&o.ShHttpService)&&e||Object])],t);var e}();e.DevicesService=a},434:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(29),a=i(389),h=i(387),c=i(435),l=i(438),p=i(442),d=i(420),u=i(419),f=i(445),g=i(499),m=i(504),y=i(507),v=function(){function e(){}return e=n([s.NgModule({id:t.id,imports:[o.RouterModule,a.FormsModule,h.SharedModule],declarations:[p.DeviceWidgetComponent,y.SensorWidgetComponent,m.SwitcherWidgetComponent,g.ServoWidgetComponent,c.DeviceListComponent,l.DeviceComponent],exports:[c.DeviceListComponent,l.DeviceComponent,p.DeviceWidgetComponent],providers:[d.DevicesService,u.DeviceListResolver,f.DeviceWidgetService]}),r("design:paramtypes",[])],e)}();e.DevicesModule=v},435:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(29),a=i(420),h=i(398),c=[{topic:"mqttId",name:"ID",sortable:!0},{topic:"type",name:"Type",sortable:!0},{topic:"description",name:"Description",sortable:!0}],l=function(){function t(t,e,i,n){this.devicesService=t,this.dialogService=e,this.viewContainerRef=i,this.router=n,this.editOnItemClick=!0,this.showDeleteButton=!0,this.statisticLink="",this.sortBy="",this.reverse=!1,this._headers=[],this._headers=c}return t.prototype.setSortBy=function(t){var e=this;this.reverse=this.sortBy===t&&!this.reverse,this.sortBy=t,this.deviceList.sort(function(i,n){return i[t]<n[t]?e.reverse?1:-1:i[t]>n[t]?e.reverse?-1:1:0})},t.prototype.isActive=function(t){return t===this.sortBy},t.prototype.getItemEditLink=function(t){return this.editOnItemClick?["./",t]:[]},t.prototype.goToDeviceStatistic=function(t,e,i){i.stopPropagation(),this.router.navigate([this.statisticLink,t,"day",e])},t.prototype.removeSensor=function(t,e){var i=this,n={title:"",message:"Are you sure you want to delete this device?"};e.stopPropagation(),this.dialogService.confirm(this.viewContainerRef,n).filter(function(t){return t}).subscribe(function(){i.devicesService.delete(t).subscribe(function(t){i.deviceList=i.deviceList.filter(function(e){return e._id!==t._id})})})},Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},enumerable:!0,configurable:!0}),n([s.Input(),r("design:type",Object)],t.prototype,"deviceList",void 0),n([s.Input(),r("design:type",Boolean)],t.prototype,"editOnItemClick",void 0),n([s.Input(),r("design:type",Boolean)],t.prototype,"showDeleteButton",void 0),n([s.Input(),r("design:type",String)],t.prototype,"statisticLink",void 0),t=n([s.Component({selector:"sh-device-list",template:i(436),styles:[i(437)]}),r("design:paramtypes",["function"==typeof(e="undefined"!=typeof a.DevicesService&&a.DevicesService)&&e||Object,"function"==typeof(l="undefined"!=typeof h.DialogService&&h.DialogService)&&l||Object,"function"==typeof(p="undefined"!=typeof s.ViewContainerRef&&s.ViewContainerRef)&&p||Object,"function"==typeof(d="undefined"!=typeof o.Router&&o.Router)&&d||Object])],t);var e,l,p,d}();e.DeviceListComponent=l},436:function(t,e){t.exports='<div *ngIf="deviceList.length === 0" class="empty-list">\n <div class="container empty-list__container">\n <div class="empty-list__container__text">\n <h3 class="empty-list__container__text__main">There are no devices yet</h3>\n <h4 class="empty-list__container__text__additional">Once you connect your device to the system, it will be listed here.</h4>\n </div><!-- empty-list__container__text -->\n </div><!-- empty-list__container -->\n</div><!-- empty-list -->\n\n<div *ngIf="deviceList.length !== 0" class="sensors-list">\n <table class="highlight responsive-table sensors-list-table">\n <thead class="sensors-list-table__head">\n <th *ngFor="let header of headers"\n (click)="setSortBy(header.topic)"\n class="sensors-list-table__head__item"\n [class.active]="isActive(header.topic)"\n [class.sortable]="header.sortable">\n {{ header.name }}\n <div [class]="reverse ? \'up\' : \'down\'"></div>\n </th><!-- sensors-list-table__head__item -->\n </thead><!-- sensors-list-table__head -->\n <tbody class="sensors-list-table__body">\n <tr *ngFor="let item of deviceList"\n [routerLink]="getItemEditLink(item._id)"\n class="sensors-list-table__body__row">\n <td *ngFor="let header of headers"\n class="sensors-list-table__body__row__item">\n {{item[header.topic]}}\n </td><!-- sensors-list-table__body__row__item -->\n <td *ngIf="statisticLink">\n <div class="sensor-widget_statistic-button"\n (click)="goToDeviceStatistic(item.mqttId, item.type, $event)">\n </div>\n </td>\n <td *ngIf="showDeleteButton"\n class="sensors-list-table__body__row__actions">\n <button (click)="removeSensor(item, $event)"\n class="waves-effect waves-light btn sensors-list-table__body__row__actions__remove"\n name="remove-device"\n type="remove">\n <i class="material-icons sensors-list-table__body__row__actions__remove__icon">delete</i>\n </button><!-- sensors-list-table__body__row__actions__remove -->\n </td><!-- sensors-list-table__body__row__actions -->\n </tr><!-- sensors-list-table__body__row -->\n </tbody><!-- sensors-list-table__body -->\n </table><!-- sensors-list-table -->\n</div><!-- sensors-list -->\n'},437:function(t,e){t.exports=".sub-header__actions{vertical-align:middle;line-height:54px}.sensors-list-table__head__item.sortable{cursor:pointer}.sensors-list-table__head__item.sortable.active .up{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid black}.sensors-list-table__head__item.sortable.active .down{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid black}.sensors-list-table__body__row__actions__remove{padding:0 15px}.empty-list__container{padding:0px}.empty-list__container::before{content:'';display:block;background:url(\"./assets/empty-sensors-list.png\") no-repeat;background-size:150px;background-position:calc(100%/2);height:150px;margin:0 6px 0 0}.empty-list__container__text__main{font-family:Roboto-Regular;font-size:24px;text-align:center}.empty-list__container__text__additional{font-family:Roboto-Regular;font-size:15px;text-align:center}.sensor-widget_statistic-button{position:relative;display:block;float:left;cursor:pointer;width:24px;height:26px;margin-top:1px;background-color:#dedede;background-image:url(./assets/statistic.svg)}.sensor-widget_statistic-button:hover{box-shadow:0 2px 4px 0 rgba(0,0,0,0.5)}\n"},438:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(439),a=function(){function t(){this.switcher=!1}return t.prototype.switchSensor=function(){this.device.executor=!this.device.executor},t.prototype.switcherImageUrl=function(){return this.device.executor?"url(assets/switcherON.svg)":"url(assets/switcherOFF.svg)"},n([s.Input(),r("design:type","function"==typeof(e="undefined"!=typeof o.Device&&o.Device)&&e||Object)],t.prototype,"device",void 0),t=n([s.Component({selector:"sh-device",template:i(440),styles:[i(441)]}),r("design:paramtypes",[])],t);var e}();e.DeviceComponent=a},439:function(t,e){"use strict";var i=function(){function t(t){void 0===t&&(t={}),Object.assign(this,{mqttId:"",type:"servo",subType:"socket",description:"",executor:!1,sensor:!1},t)}return t}();e.Device=i},440:function(t,e){t.exports='<div class="device">\n <div class="device__icon"\n [style.background-image]="\'url(assets/\' + device?.subType + \'.svg)\'">\n </div>\n <div *ngIf="device?.type === \'switcher\'"\n (click)="switchSensor()">\n <div class="device__switcher"\n [style.background-image]="switcherImageUrl()">\n </div>\n </div>\n</div>\n'},441:function(t,e){t.exports=".device{width:42px;height:42px;position:absolute;cursor:move}.device__icon{width:100%;height:100%}.device__switcher{position:absolute;left:42px;top:0;width:42px;height:42px;cursor:pointer}\n"},442:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=function(){function t(){this.isEditMode=!1,this.onRemoveWidget=new s.EventEmitter}return t.prototype.removeWidget=function(){this.onRemoveWidget.emit(this.device)},n([s.Input(),r("design:type",Object)],t.prototype,"device",void 0),n([s.Input(),r("design:type",Boolean)],t.prototype,"isEditMode",void 0),n([s.Output(),r("design:type","function"==typeof(e="undefined"!=typeof s.EventEmitter&&s.EventEmitter)&&e||Object)],t.prototype,"onRemoveWidget",void 0),t=n([s.Component({selector:"sh-device-widget",template:i(443),styles:[i(444)]}),r("design:paramtypes",[])],t);var e}();e.DeviceWidgetComponent=o},443:function(t,e){t.exports='<div class="sensor-widget">\n <div class="sensor-widget_header">\n <div class="sensor-widget_button-statistics"\n [routerLink]="[\'../statistic/sensor-details\', device.mqttId, \'day\', device.type]">\n </div>\n <div class="sensor-widget_header_info">\n <span>{{device.description}}</span>\n </div>\n <button class="sensor-widget_button-close"\n *ngIf="isEditMode"\n (click)="removeWidget()">\n </button>\n </div>\n <div>\n <sh-sensor-widget\n [device]="device"\n *ngIf="!device.executor && !device.servo">\n </sh-sensor-widget>\n <sh-switcher-widget\n [device]="device"\n *ngIf="device.executor">\n </sh-switcher-widget>\n <sh-servo-widget\n [device]="device"\n *ngIf="device.servo">\n </sh-servo-widget>\n </div>\n</div>\n'},444:function(t,e){t.exports=".sensor-widget{position:relative;width:182px;height:182px;padding:2px;font-family:Roboto;text-align:center;color:white;background-color:#169eb1;border:solid 1px white;overflow:hidden}.sensor-widget_footer,.sensor-widget_header{position:absolute;width:100%;bottom:0;height:27px;max-height:27px;overflow:hidden}.sensor-widget_footer{bottom:0}.sensor-widget_header{top:0;z-index:1}.sensor-widget_button-close,.sensor-widget_button-statistics{position:absolute;top:0;width:27px;height:27px;border:none;box-shadow:none;cursor:pointer;background:transparent;background-repeat:no-repeat;background-position:center;opacity:0.5}.sensor-widget_button-close:hover,.sensor-widget_button-close:active,.sensor-widget_button-close:focus,.sensor-widget_button-statistics:hover,.sensor-widget_button-statistics:active,.sensor-widget_button-statistics:focus{opacity:1}.sensor-widget_button-close{right:0;background-image:url(./assets/close-icon.svg)}.sensor-widget_button-statistics{left:0;background-image:url(./assets/statistics-icon.svg)}.sensor-widget_header_info{line-height:27px;padding:0 27px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sensor-widget_info{margin-top:27px;padding:27px 27px;display:table;height:100%;width:100%}.sensor-widget_info_value{display:table-cell;vertical-align:middle;text-align:center;font-size:24px;line-height:1.5;font-weight:bold;width:100%}.sensor-widget_switcher-info{padding:27px 27px;display:table;height:100%;width:100%}\n"},445:function(t,e,i){"use strict";var n=this&&this.__decorate||function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},s=i(3),o=i(446),a=function(){function t(){this.io=o,this.setupSocket()}return t.prototype.setupSocket=function(){this.socket=this.io.connect({backEndUrl:"",backEndWebSocketUrl:""}.backEndWebSocketUrl)},t.prototype.subscribe=function(t,e){function i(){this.socket.on("event",e),t&&this.socket.emit("subscribe",{device:t})}var n=this;this.socket.connected?i.apply(this):this.socket.on("connect",function(){i.apply(n)})},t.prototype.unsubscribe=function(t){this.socket.emit("unsubscribe",{device:t})},t.prototype.pushEvent=function(t){this.socket.emit("pushEvent",t)},t=n([s.Injectable(),r("design:paramtypes",[])],t)}();e.DeviceWidgetService=a},446:function(t,e,i){function n(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,n=s(t),o=n.source,l=n.id,p=n.path,d=c[l]&&p in c[l].nsps,u=e.forceNew||e["force new connection"]||!1===e.multiplex||d;return u?(h("ignoring socket cache for %s",o),i=a(o,e)):(c[l]||(h("new io instance for %s",o),c[l]=a(o,e)),i=c[l]),n.query&&!e.query?e.query=n.query:e&&"object"==typeof e.query&&(e.query=r(e.query)),i.socket(n.path,e)}function r(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e.join("&")}var s=i(447),o=i(452),a=i(463),h=i(449)("socket.io-client");t.exports=e=n;var c=e.managers={};e.protocol=o.protocol,e.connect=n,e.Manager=i(463),e.Socket=i(493)},447:function(t,e,i){(function(e){function n(t,i){var n=t;i=i||e.location,null==t&&(t=i.protocol+"//"+i.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?i.protocol+t:i.host+t),/^(https?|wss?):\/\//.test(t)||(s("protocol-less url %s",t),t="undefined"!=typeof i?i.protocol+"//"+t:"https://"+t),s("parse %s",t),n=r(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var o=n.host.indexOf(":")!==-1,a=o?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(i&&i.port===n.port?"":":"+n.port),n}var r=i(448),s=i(449)("socket.io-client:url");t.exports=n}).call(e,function(){return this}())},448:function(t,e){var i=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,r=t.indexOf("["),s=t.indexOf("]");r!=-1&&s!=-1&&(t=t.substring(0,r)+t.substring(r,s).replace(/:/g,";")+t.substring(s,t.length));for(var o=i.exec(t||""),a={},h=14;h--;)a[n[h]]=o[h]||"";return r!=-1&&s!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},449:[964,450],450:function(t,e,i){function n(){return e.colors[l++%e.colors.length]}function r(t){function i(){}function r(){var t=r,i=+new Date,s=i-(c||i);t.diff=s,t.prev=c,t.curr=i,c=i,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&(o=["%o"].concat(o));var h=0;o[0]=o[0].replace(/%([a-z%])/g,function(i,n){if("%%"===i)return i;h++;var r=e.formatters[n];if("function"==typeof r){var s=o[h];i=r.call(t,s),o.splice(h,1),h--}return i}),o=e.formatArgs.apply(t,o);var l=r.log||e.log||console.log.bind(console);l.apply(t,o)}i.enabled=!1,r.enabled=!0;var s=e.enabled(t)?r:i;return s.namespace=t,s}function s(t){e.save(t);for(var i=(t||"").split(/[\s,]+/),n=i.length,r=0;r<n;r++)i[r]&&(t=i[r].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function o(){e.enable("")}function a(t){var i,n;for(i=0,n=e.skips.length;i<n;i++)if(e.skips[i].test(t))return!1;for(i=0,n=e.names.length;i<n;i++)if(e.names[i].test(t))return!0;return!1}function h(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=r.debug=r,e.coerce=h,e.disable=o,e.enable=s,e.enabled=a,e.humanize=i(451),e.names=[],e.skips=[],e.formatters={};var c,l=0},451:function(t,e){function i(t){if(t=String(t),!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"days":case"day":case"d":return i*c;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*a;case"seconds":case"second":case"secs":case"sec":case"s":return i*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=h?Math.round(t/h)+"h":t>=a?Math.round(t/a)+"m":t>=o?Math.round(t/o)+"s":t+"ms"}function r(t){return s(t,c,"day")||s(t,h,"hour")||s(t,a,"minute")||s(t,o,"second")||t+" ms"}function s(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}var o=1e3,a=60*o,h=60*a,c=24*h,l=365.25*c;t.exports=function(t,e){e=e||{};var s=typeof t;if("string"===s&&t.length>0)return i(t);if("number"===s&&isNaN(t)===!1)return e.long?r(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},452:function(t,e,i){function n(){}function r(t){var i="",n=!1;return i+=t.type,e.BINARY_EVENT!=t.type&&e.BINARY_ACK!=t.type||(i+=t.attachments,i+="-"),t.nsp&&"/"!=t.nsp&&(n=!0,i+=t.nsp),null!=t.id&&(n&&(i+=",",n=!1),i+=t.id),null!=t.data&&(n&&(i+=","),i+=d.stringify(t.data)),p("encoded %j as %s",t,i),i}function s(t,e){function i(t){var i=f.deconstructPacket(t),n=r(i.packet),s=i.buffers;s.unshift(n),e(s)}f.removeBlobs(t,i)}function o(){this.reconstructor=null}function a(t){var i={},n=0;if(i.type=Number(t.charAt(0)),null==e.types[i.type])return l();if(e.BINARY_EVENT==i.type||e.BINARY_ACK==i.type){for(var r="";"-"!=t.charAt(++n)&&(r+=t.charAt(n),n!=t.length););if(r!=Number(r)||"-"!=t.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(r)}if("/"==t.charAt(n+1))for(i.nsp="";++n;){var s=t.charAt(n);if(","==s)break;if(i.nsp+=s,n==t.length)break}else i.nsp="/";var o=t.charAt(n+1);if(""!==o&&Number(o)==o){for(i.id="";++n;){var s=t.charAt(n);if(null==s||Number(s)!=s){--n;break}if(i.id+=t.charAt(n),n==t.length)break}i.id=Number(i.id)}return t.charAt(++n)&&(i=h(i,t.substr(n))),p("decoded %s as %j",t,i),i}function h(t,e){try{t.data=d.parse(e)}catch(t){return l()}return t}function c(t){this.reconPack=t,this.buffers=[]}function l(t){return{type:e.ERROR,data:"parser error"}}var p=i(453)("socket.io-parser"),d=i(456),u=i(459),f=i(460),g=i(462);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=n,e.Decoder=o,n.prototype.encode=function(t,i){if(p("encoding packet %j",t),e.BINARY_EVENT==t.type||e.BINARY_ACK==t.type)s(t,i);else{var n=r(t);i([n])}},u(o.prototype),o.prototype.add=function(t){var i;if("string"==typeof t)i=a(t),e.BINARY_EVENT==i.type||e.BINARY_ACK==i.type?(this.reconstructor=new c(i),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",i)):this.emit("decoded",i);else{if(!g(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");i=this.reconstructor.takeBinaryData(t),i&&(this.reconstructor=null,this.emit("decoded",i))}},o.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},c.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length==this.reconPack.attachments){var e=f.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},c.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},453:function(t,e,i){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function r(){var t=arguments,i=this.useColors;if(t[0]=(i?"%c":"")+this.namespace+(i?" %c":" ")+t[0]+(i?"%c ":" ")+"+"+e.humanize(this.diff),!i)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var r=0,s=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(s=r))}),t.splice(s,0,n),t}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function a(){var t;try{t=e.storage.debug}catch(t){}return t}function h(){try{return window.localStorage}catch(t){}}e=t.exports=i(454),e.log=s,e.formatArgs=r,e.save=o,e.load=a,e.useColors=n,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:h(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},454:function(t,e,i){function n(){return e.colors[l++%e.colors.length]}function r(t){function i(){}function r(){var t=r,i=+new Date,s=i-(c||i);t.diff=s,t.prev=c,t.curr=i,c=i,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());var o=Array.prototype.slice.call(arguments);o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&(o=["%o"].concat(o));var a=0;o[0]=o[0].replace(/%([a-z%])/g,function(i,n){if("%%"===i)return i;a++;var r=e.formatters[n];if("function"==typeof r){var s=o[a];i=r.call(t,s),o.splice(a,1),a--}return i}),"function"==typeof e.formatArgs&&(o=e.formatArgs.apply(t,o));var h=r.log||e.log||console.log.bind(console);h.apply(t,o)}i.enabled=!1,r.enabled=!0;var s=e.enabled(t)?r:i;return s.namespace=t,s}function s(t){e.save(t);for(var i=(t||"").split(/[\s,]+/),n=i.length,r=0;r<n;r++)i[r]&&(t=i[r].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function o(){e.enable("")}function a(t){var i,n;for(i=0,n=e.skips.length;i<n;i++)if(e.skips[i].test(t))return!1;for(i=0,n=e.names.length;i<n;i++)if(e.names[i].test(t))return!0;return!1}function h(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=r,e.coerce=h,e.disable=o,e.enable=s,e.enabled=a,e.humanize=i(455),e.names=[],e.skips=[],e.formatters={};var c,l=0},455:function(t,e){function i(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var i=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"days":case"day":case"d":return i*c;case"hours":case"hour":case"hrs":case"hr":case"h":return i*h;case"minutes":case"minute":case"mins":case"min":case"m":return i*a;case"seconds":case"second":case"secs":case"sec":case"s":return i*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=h?Math.round(t/h)+"h":t>=a?Math.round(t/a)+"m":t>=o?Math.round(t/o)+"s":t+"ms"}function r(t){return s(t,c,"day")||s(t,h,"hour")||s(t,a,"minute")||s(t,o,"second")||t+" ms"}function s(t,e,i){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+i:Math.ceil(t/e)+" "+i+"s"}var o=1e3,a=60*o,h=60*a,c=24*h,l=365.25*c;t.exports=function(t,e){return e=e||{},"string"==typeof t?i(t):e.long?r(t):n(t)}},456:function(t,e,i){var n;(function(t,r){(function(){function s(t,e){function i(t){if(i[t]!==m)return i[t];var s;if("bug-string-char-index"==t)s="a"!="a"[0];else if("json"==t)s=i("json-stringify")&&i("json-parse");else{var o,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var c=e.stringify,l="function"==typeof c&&x;if(l){(o=function(){return 1}).toJSON=o;try{l="0"===c(0)&&"0"===c(new n)&&'""'==c(new r)&&c(v)===m&&c(m)===m&&c()===m&&"1"===c(o)&&"[1]"==c([o])&&"[null]"==c([m])&&"null"==c(null)&&"[null,null,null]"==c([m,v,null])&&c({a:[o,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===c(null,o)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new h(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==c(new h(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new h(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==c(new h(-1))}catch(t){l=!1}}s=l}if("json-parse"==t){var p=e.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){o=p(a);var d=5==o.a.length&&1===o.a[0];if(d){try{d=!p('"\t"')}catch(t){}if(d)try{d=1!==p("01")}catch(t){}if(d)try{d=1!==p("1.")}catch(t){}}}}catch(t){d=!1}s=d}}return i[t]=!!s}t||(t=c.Object()),e||(e=c.Object());var n=t.Number||c.Number,r=t.String||c.String,o=t.Object||c.Object,h=t.Date||c.Date,l=t.SyntaxError||c.SyntaxError,p=t.TypeError||c.TypeError,d=t.Math||c.Math,u=t.JSON||c.JSON;"object"==typeof u&&u&&(e.stringify=u.stringify,e.parse=u.parse);var f,g,m,y=o.prototype,v=y.toString,x=new h(-0xc782b5b800cec);try{x=x.getUTCFullYear()==-109252&&0===x.getUTCMonth()&&1===x.getUTCDate()&&10==x.getUTCHours()&&37==x.getUTCMinutes()&&6==x.getUTCSeconds()&&708==x.getUTCMilliseconds()}catch(t){}if(!i("json")){var b="[object Function]",w="[object Date]",k="[object Number]",S="[object String]",M="[object Array]",C="[object Boolean]",A=i("bug-string-char-index");if(!x)var T=d.floor,O=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(t,e){return O[e]+365*(t-1970)+T((t-1969+(e=+(e>1)))/4)-T((t-1901+e)/100)+T((t-1601+e)/400)};if((f=y.hasOwnProperty)||(f=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=v?f=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,f=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,f.call(this,t)}),g=function(t,e){var i,n,r,s=0;(i=function(){this.valueOf=0}).prototype.valueOf=0,n=new i;for(r in n)f.call(n,r)&&s++;return i=n=null,s?g=2==s?function(t,e){var i,n={},r=v.call(t)==b;for(i in t)r&&"prototype"==i||f.call(n,i)||!(n[i]=1)||!f.call(t,i)||e(i)}:function(t,e){var i,n,r=v.call(t)==b;for(i in t)r&&"prototype"==i||!f.call(t,i)||(n="constructor"===i)||e(i);(n||f.call(t,i="constructor"))&&e(i)}:(n=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],g=function(t,e){var i,r,s=v.call(t)==b,o=!s&&"function"!=typeof t.constructor&&a[typeof t.hasOwnProperty]&&t.hasOwnProperty||f;for(i in t)s&&"prototype"==i||!o.call(t,i)||e(i);for(r=n.length;i=n[--r];o.call(t,i)&&e(i));}),g(t,e)},!i("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},E="000000",_=function(t,e){return(E+(e||0)).slice(-t)},R="\\u00",I=function(t){for(var e='"',i=0,n=t.length,r=!A||n>10,s=r&&(A?t.split(""):t);i<n;i++){var o=t.charCodeAt(i);switch(o){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=L[o];break;default:if(o<32){e+=R+_(2,o.toString(16));break}e+=r?s[i]:t.charAt(i)}}return e+'"'},D=function(t,e,i,n,r,s,o){var a,h,c,l,d,u,y,x,b,A,O,L,E,R,B,z;try{a=e[t]}catch(t){}if("object"==typeof a&&a)if(h=v.call(a),h!=w||f.call(a,"toJSON"))"function"==typeof a.toJSON&&(h!=k&&h!=S&&h!=M||f.call(a,"toJSON"))&&(a=a.toJSON(t));else if(a>-1/0&&a<1/0){if(P){for(d=T(a/864e5),c=T(d/365.2425)+1970-1;P(c+1,0)<=d;c++);for(l=T((d-P(c,0))/30.42);P(c,l+1)<=d;l++);d=1+d-P(c,l),u=(a%864e5+864e5)%864e5,y=T(u/36e5)%24,x=T(u/6e4)%60,b=T(u/1e3)%60,A=u%1e3}else c=a.getUTCFullYear(),l=a.getUTCMonth(),d=a.getUTCDate(),y=a.getUTCHours(),x=a.getUTCMinutes(),b=a.getUTCSeconds(),A=a.getUTCMilliseconds();a=(c<=0||c>=1e4?(c<0?"-":"+")+_(6,c<0?-c:c):_(4,c))+"-"+_(2,l+1)+"-"+_(2,d)+"T"+_(2,y)+":"+_(2,x)+":"+_(2,b)+"."+_(3,A)+"Z"}else a=null;if(i&&(a=i.call(e,t,a)),null===a)return"null";if(h=v.call(a),h==C)return""+a;if(h==k)return a>-1/0&&a<1/0?""+a:"null";if(h==S)return I(""+a);if("object"==typeof a){for(R=o.length;R--;)if(o[R]===a)throw p();if(o.push(a),O=[],B=s,s+=r,h==M){for(E=0,R=a.length;E<R;E++)L=D(E,a,i,n,r,s,o),O.push(L===m?"null":L);
z=O.length?r?"[\n"+s+O.join(",\n"+s)+"\n"+B+"]":"["+O.join(",")+"]":"[]"}else g(n||a,function(t){var e=D(t,a,i,n,r,s,o);e!==m&&O.push(I(t)+":"+(r?" ":"")+e)}),z=O.length?r?"{\n"+s+O.join(",\n"+s)+"\n"+B+"}":"{"+O.join(",")+"}":"{}";return o.pop(),z}};e.stringify=function(t,e,i){var n,r,s,o;if(a[typeof e]&&e)if((o=v.call(e))==b)r=e;else if(o==M){s={};for(var h,c=0,l=e.length;c<l;h=e[c++],o=v.call(h),(o==S||o==k)&&(s[h]=1));}if(i)if((o=v.call(i))==k){if((i-=i%1)>0)for(n="",i>10&&(i=10);n.length<i;n+=" ");}else o==S&&(n=i.length<=10?i:i.slice(0,10));return D("",(h={},h[""]=t,h),r,s,n,"",[])}}if(!i("json-parse")){var B,z,N=r.fromCharCode,j={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},H=function(){throw B=z=null,l()},W=function(){for(var t,e,i,n,r,s=z,o=s.length;B<o;)switch(r=s.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=A?s.charAt(B):s[B],B++,t;case 34:for(t="@",B++;B<o;)if(r=s.charCodeAt(B),r<32)H();else if(92==r)switch(r=s.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=j[r],B++;break;case 117:for(e=++B,i=B+4;B<i;B++)r=s.charCodeAt(B),r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||H();t+=N("0x"+s.slice(e,B));break;default:H()}else{if(34==r)break;for(r=s.charCodeAt(B),e=B;r>=32&&92!=r&&34!=r;)r=s.charCodeAt(++B);t+=s.slice(e,B)}if(34==s.charCodeAt(B))return B++,t;H();default:if(e=B,45==r&&(n=!0,r=s.charCodeAt(++B)),r>=48&&r<=57){for(48==r&&(r=s.charCodeAt(B+1),r>=48&&r<=57)&&H(),n=!1;B<o&&(r=s.charCodeAt(B),r>=48&&r<=57);B++);if(46==s.charCodeAt(B)){for(i=++B;i<o&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&H(),B=i}if(r=s.charCodeAt(B),101==r||69==r){for(r=s.charCodeAt(++B),43!=r&&45!=r||B++,i=B;i<o&&(r=s.charCodeAt(i),r>=48&&r<=57);i++);i==B&&H(),B=i}return+s.slice(e,B)}if(n&&H(),"true"==s.slice(B,B+4))return B+=4,!0;if("false"==s.slice(B,B+5))return B+=5,!1;if("null"==s.slice(B,B+4))return B+=4,null;H()}return"$"},X=function(t){var e,i;if("$"==t&&H(),"string"==typeof t){if("@"==(A?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=W(),"]"!=t;i||(i=!0))i&&(","==t?(t=W(),"]"==t&&H()):H()),","==t&&H(),e.push(X(t));return e}if("{"==t){for(e={};t=W(),"}"!=t;i||(i=!0))i&&(","==t?(t=W(),"}"==t&&H()):H()),","!=t&&"string"==typeof t&&"@"==(A?t.charAt(0):t[0])&&":"==W()||H(),e[t.slice(1)]=X(W());return e}H()}return t},G=function(t,e,i){var n=F(t,e,i);n===m?delete t[e]:t[e]=n},F=function(t,e,i){var n,r=t[e];if("object"==typeof r&&r)if(v.call(r)==M)for(n=r.length;n--;)G(r,n,i);else g(r,function(t){G(r,t,i)});return i.call(t,e,r)};e.parse=function(t,e){var i,n;return B=0,z=""+t,i=X(W()),"$"!=W()&&H(),B=z=null,e&&v.call(e)==b?F((n={},n[""]=i,n),"",e):i}}}return e.runInContext=s,e}var o=i(458),a={function:!0,object:!0},h=a[typeof e]&&e&&!e.nodeType&&e,c=a[typeof window]&&window||this,l=h&&a[typeof t]&&t&&!t.nodeType&&"object"==typeof r&&r;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(c=l),h&&!o)s(c,h);else{var p=c.JSON,d=c.JSON3,u=!1,f=s(c,c.JSON3={noConflict:function(){return u||(u=!0,c.JSON=p,c.JSON3=d,p=d=null),f}});c.JSON={parse:f.parse,stringify:f.stringify}}o&&(n=function(){return f}.call(e,i,e,t),!(void 0!==n&&(t.exports=n)))}).call(this)}).call(e,i(457)(t),function(){return this}())},457:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},458:function(t,e){(function(e){t.exports=e}).call(e,{})},459:function(t,e){function i(t){if(t)return n(t)}function n(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){n.off(t,i),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,r=0;r<i.length;r++)if(n=i[r],n===e||n.fn===e){i.splice(r,1);break}return this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks[t];if(i){i=i.slice(0);for(var n=0,r=i.length;n<r;++n)i[n].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},460:function(t,e,i){(function(t){var n=i(461),r=i(462);e.deconstructPacket=function(t){function e(t){if(!t)return t;if(r(t)){var s={_placeholder:!0,num:i.length};return i.push(t),s}if(n(t)){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=e(t[a]);return o}if("object"==typeof t&&!(t instanceof Date)){var o={};for(var h in t)o[h]=e(t[h]);return o}return t}var i=[],s=t.data,o=t;return o.data=e(s),o.attachments=i.length,{packet:o,buffers:i}},e.reconstructPacket=function(t,e){function i(t){if(t&&t._placeholder){var r=e[t.num];return r}if(n(t)){for(var s=0;s<t.length;s++)t[s]=i(t[s]);return t}if(t&&"object"==typeof t){for(var o in t)t[o]=i(t[o]);return t}return t}return t.data=i(t.data),t.attachments=void 0,t},e.removeBlobs=function(e,i){function s(e,h,c){if(!e)return e;if(t.Blob&&e instanceof Blob||t.File&&e instanceof File){o++;var l=new FileReader;l.onload=function(){c?c[h]=this.result:a=this.result,--o||i(a)},l.readAsArrayBuffer(e)}else if(n(e))for(var p=0;p<e.length;p++)s(e[p],p,e);else if(e&&"object"==typeof e&&!r(e))for(var d in e)s(e[d],d,e)}var o=0,a=e;s(a),o||i(a)}}).call(e,function(){return this}())},461:function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},462:function(t,e){(function(e){function i(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=i}).call(e,function(){return this}())},463:function(t,e,i){function n(t,e){return this instanceof n?(t&&"object"==typeof t&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[],this.encoder=new a.Encoder,this.decoder=new a.Decoder,this.autoConnect=e.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(t,e)}var r=i(464),s=i(493),o=i(494),a=i(452),h=i(496),c=i(497),l=i(449)("socket.io-client:manager"),p=i(491),d=i(498),u=Object.prototype.hasOwnProperty;t.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)u.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},n.prototype.updateSocketIds=function(){for(var t in this.nsps)u.call(this.nsps,t)&&(this.nsps[t].id=this.engine.id)},o(n.prototype),n.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},n.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},n.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},n.prototype.open=n.prototype.connect=function(t,e){if(l("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;l("opening %s",this.uri),this.engine=r(this.uri,this.opts);var i=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var s=h(i,"open",function(){n.onopen(),t&&t()}),o=h(i,"error",function(e){if(l("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",e),t){var i=new Error("Connection error");i.data=e,t(i)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;l("connect attempt will timeout after %d",a);var c=setTimeout(function(){l("connect attempt timed out after %d",a),s.destroy(),i.close(),i.emit("error","timeout"),n.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(s),this.subs.push(o),this},n.prototype.onopen=function(){l("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(h(t,"data",c(this,"ondata"))),this.subs.push(h(t,"ping",c(this,"onping"))),this.subs.push(h(t,"pong",c(this,"onpong"))),this.subs.push(h(t,"error",c(this,"onerror"))),this.subs.push(h(t,"close",c(this,"onclose"))),this.subs.push(h(this.decoder,"decoded",c(this,"ondecoded")))},n.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},n.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},n.prototype.ondata=function(t){this.decoder.add(t)},n.prototype.ondecoded=function(t){this.emit("packet",t)},n.prototype.onerror=function(t){l("error",t),this.emitAll("error",t)},n.prototype.socket=function(t,e){function i(){~p(r.connecting,n)||r.connecting.push(n)}var n=this.nsps[t];if(!n){n=new s(this,t,e),this.nsps[t]=n;var r=this;n.on("connecting",i),n.on("connect",function(){n.id=r.engine.id}),this.autoConnect&&i()}return n},n.prototype.destroy=function(t){var e=p(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},n.prototype.packet=function(t){l("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(i){for(var n=0;n<i.length;n++)e.engine.write(i[n],t.options);e.encoding=!1,e.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},n.prototype.cleanup=function(){l("cleanup");for(var t=this.subs.length,e=0;e<t;e++){var i=this.subs.shift();i.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){l("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(t){l("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)l("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();l("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var i=setTimeout(function(){t.skipReconnect||(l("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(l("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(l("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(i)}})}},n.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},464:function(t,e,i){t.exports=i(465)},465:function(t,e,i){t.exports=i(466),t.exports.parser=i(473)},466:function(t,e,i){(function(e){function n(t,i){if(!(this instanceof n))return new n(t,i);i=i||{},t&&"object"==typeof t&&(i=t,t=null),t?(t=l(t),i.hostname=t.host,i.secure="https"===t.protocol||"wss"===t.protocol,i.port=t.port,t.query&&(i.query=t.query)):i.host&&(i.hostname=l(i.host).host),this.secure=null!=i.secure?i.secure:e.location&&"https:"===location.protocol,i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.agent=i.agent||!1,this.hostname=i.hostname||(e.location?location.hostname:"localhost"),this.port=i.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=i.query||{},"string"==typeof this.query&&(this.query=d.decode(this.query)),this.upgrade=!1!==i.upgrade,this.path=(i.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!i.forceJSONP,this.jsonp=!1!==i.jsonp,this.forceBase64=!!i.forceBase64,this.enablesXDR=!!i.enablesXDR,this.timestampParam=i.timestampParam||"t",this.timestampRequests=i.timestampRequests,this.transports=i.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=i.policyPort||843,this.rememberUpgrade=i.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=i.onlyBinaryUpgrades,this.perMessageDeflate=!1!==i.perMessageDeflate&&(i.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=i.pfx||null,this.key=i.key||null,this.passphrase=i.passphrase||null,this.cert=i.cert||null,this.ca=i.ca||null,this.ciphers=i.ciphers||null,this.rejectUnauthorized=void 0===i.rejectUnauthorized?null:i.rejectUnauthorized,this.forceNode=!!i.forceNode;var r="object"==typeof e&&e;r.global===r&&(i.extraHeaders&&Object.keys(i.extraHeaders).length>0&&(this.extraHeaders=i.extraHeaders),i.localAddress&&(this.localAddress=i.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function r(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}var s=i(467),o=i(482),a=i(486)("engine.io-client:socket"),h=i(491),c=i(473),l=i(448),p=i(492),d=i(483);t.exports=n,n.priorWebsocketSuccess=!1,o(n.prototype),n.protocol=c.protocol,n.Socket=n,n.Transport=i(472),n.transports=i(467),n.parser=i(473),n.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=r(this.query);e.EIO=c.protocol,e.transport=t,this.id&&(e.sid=this.id);var i=new s[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:e,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized,perMessageDeflate:this.perMessageDeflate,extraHeaders:this.extraHeaders,forceNode:this.forceNode,localAddress:this.localAddress});return i},n.prototype.open=function(){var t;if(this.rememberUpgrade&&n.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},n.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},n.prototype.probe=function(t){function e(){if(d.onlyBinaryUpgrades){var e=!this.supportsBinary&&d.transport.supportsBinary;p=p||e}p||(a('probe transport "%s" opened',t),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(e){if(!p)if("pong"===e.type&&"probe"===e.data){if(a('probe transport "%s" pong',t),d.upgrading=!0,d.emit("upgrading",l),!l)return;n.priorWebsocketSuccess="websocket"===l.name,a('pausing current transport "%s"',d.transport.name),d.transport.pause(function(){p||"closed"!==d.readyState&&(a("changing transport and sending upgrade packet"),c(),d.setTransport(l),l.send([{type:"upgrade"}]),d.emit("upgrade",l),l=null,d.upgrading=!1,d.flush())})}else{a('probe transport "%s" failed',t);var i=new Error("probe error");i.transport=l.name,d.emit("upgradeError",i)}}))}function i(){p||(p=!0,c(),l.close(),l=null)}function r(e){var n=new Error("probe error: "+e);n.transport=l.name,i(),a('probe transport "%s" failed because of error: %s',t,e),d.emit("upgradeError",n)}function s(){r("transport closed")}function o(){r("socket closed")}function h(t){l&&t.name!==l.name&&(a('"%s" works - aborting "%s"',t.name,l.name),i())}function c(){l.removeListener("open",e),l.removeListener("error",r),l.removeListener("close",s),d.removeListener("close",o),d.removeListener("upgrading",h)}a('probing transport "%s"',t);var l=this.createTransport(t,{probe:1}),p=!1,d=this;n.priorWebsocketSuccess=!1,l.once("open",e),l.once("error",r),l.once("close",s),this.once("close",o),this.once("upgrading",h),l.open()},n.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",n.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("