heyujie
2021-06-07 8f8155aa4c83f7c2577ac123add550766b6a7ce3
1
(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"01cc":function(t,e,n){"use strict";n.r(e);var r=n("907c"),i=n("9d4d");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"148fa7e8",null,!1,r["a"],s);e["default"]=c.exports},"0477":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={pulldown:"\ue588",refreshempty:"\ue461",back:"\ue471",forward:"\ue470",more:"\ue507","more-filled":"\ue537",scan:"\ue612",qq:"\ue264",weibo:"\ue260",weixin:"\ue261",pengyouquan:"\ue262",loop:"\ue565",refresh:"\ue407","refresh-filled":"\ue437",arrowthindown:"\ue585",arrowthinleft:"\ue586",arrowthinright:"\ue587",arrowthinup:"\ue584","undo-filled":"\ue7d6",undo:"\ue406",redo:"\ue405","redo-filled":"\ue7d9",bars:"\ue563",chatboxes:"\ue203",camera:"\ue301","chatboxes-filled":"\ue233","camera-filled":"\ue7ef","cart-filled":"\ue7f4",cart:"\ue7f5","checkbox-filled":"\ue442",checkbox:"\ue7fa",arrowleft:"\ue582",arrowdown:"\ue581",arrowright:"\ue583","smallcircle-filled":"\ue801",arrowup:"\ue580",circle:"\ue411","eye-filled":"\ue568","eye-slash-filled":"\ue822","eye-slash":"\ue823",eye:"\ue824","flag-filled":"\ue825",flag:"\ue508","gear-filled":"\ue532",reload:"\ue462",gear:"\ue502","hand-thumbsdown-filled":"\ue83b","hand-thumbsdown":"\ue83c","hand-thumbsup-filled":"\ue83d","heart-filled":"\ue83e","hand-thumbsup":"\ue83f",heart:"\ue840",home:"\ue500",info:"\ue504","home-filled":"\ue530","info-filled":"\ue534","circle-filled":"\ue441","chat-filled":"\ue847",chat:"\ue263","mail-open-filled":"\ue84d","email-filled":"\ue231","mail-open":"\ue84e",email:"\ue201",checkmarkempty:"\ue472",list:"\ue562","locked-filled":"\ue856",locked:"\ue506","map-filled":"\ue85c","map-pin":"\ue85e","map-pin-ellipse":"\ue864",map:"\ue364","minus-filled":"\ue440","mic-filled":"\ue332",minus:"\ue410",micoff:"\ue360",mic:"\ue302",clear:"\ue434",smallcircle:"\ue868",close:"\ue404",closeempty:"\ue460",paperclip:"\ue567",paperplane:"\ue503","paperplane-filled":"\ue86e","person-filled":"\ue131","contact-filled":"\ue130",person:"\ue101",contact:"\ue100","images-filled":"\ue87a",phone:"\ue200",images:"\ue87b",image:"\ue363","image-filled":"\ue877","location-filled":"\ue333",location:"\ue303","plus-filled":"\ue439",plus:"\ue409",plusempty:"\ue468","help-filled":"\ue535",help:"\ue505","navigate-filled":"\ue884",navigate:"\ue501","mic-slash-filled":"\ue892",search:"\ue466",settings:"\ue560",sound:"\ue590","sound-filled":"\ue8a1","spinner-cycle":"\ue465","download-filled":"\ue8a4","personadd-filled":"\ue132","videocam-filled":"\ue8af",personadd:"\ue102",upload:"\ue402","upload-filled":"\ue8b1",starhalf:"\ue463","star-filled":"\ue438",star:"\ue408",trash:"\ue401","phone-filled":"\ue230",compose:"\ue400",videocam:"\ue300","trash-filled":"\ue8dc",download:"\ue403","chatbubble-filled":"\ue232",chatbubble:"\ue202","cloud-download":"\ue8e4","cloud-upload-filled":"\ue8e5","cloud-upload":"\ue8e6","cloud-download-filled":"\ue8e9",headphones:"\ue8bf",shop:"\ue609"};e.default=r},"066e":function(t,e,n){"use strict";n.r(e);var r=n("99e2"),i=n("8169");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"55418c22",null,!1,r["a"],s);e["default"]=c.exports},"0dd7":function(t,e,n){"use strict";n.r(e);var r=n("1dec"),i=n("c245");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},"0de9":function(t,e,n){"use strict";function r(t){var e=Object.prototype.toString.call(t);return e.substring(8,e.length-1)}function i(){return"string"===typeof __channelId__&&__channelId__}function o(t,e){switch(r(e)){case"Function":return"function() { [native code] }";default:return e}}function s(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t].apply(console,n)}function a(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var s=e.shift();if(i())return e.push(e.pop().replace("at ","uni-app:///")),console[s].apply(console,e);var a=e.map((function(t){var e=Object.prototype.toString.call(t).toLowerCase();if("[object object]"===e||"[object array]"===e)try{t="---BEGIN:JSON---"+JSON.stringify(t,o)+"---END:JSON---"}catch(i){t=e}else if(null===t)t="---NULL---";else if(void 0===t)t="---UNDEFINED---";else{var n=r(t).toUpperCase();t="NUMBER"===n||"BOOLEAN"===n?"---BEGIN:"+n+"---"+t+"---END:"+n+"---":String(t)}return t})),c="";if(a.length>1){var u=a.pop();c=a.join("---COMMA---"),0===u.indexOf(" at ")?c+=u:c+="---COMMA---"+u}else c=a[0];console[s](c)}n.r(e),n.d(e,"log",(function(){return s})),n.d(e,"default",(function(){return a}))},"0ed3":function(t,e,n){"use strict";n.r(e);var r=n("7582"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"11b8":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","uni-status-bar"),style:t._$s(0,"s",{height:t.statusBarHeight}),attrs:{_i:0}},[t._t("default",null,{_i:1})],2)},o=[]},"16dd":function(t,e,n){"use strict";n.r(e);var r=n("f4e4"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"1cfb":function(t,e,n){"use strict";n.r(e);var r=n("3540"),i=n("0ed3");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"3e439ab5",null,!1,r["a"],s);e["default"]=c.exports},"1dec":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",[n("view",{staticClass:t._$s(1,"sc","tui-actionsheet-mask"),class:t._$s(1,"c",[t.show?"tui-mask-show":""]),attrs:{_i:1},on:{click:t.handleClickMask}})])},o=[]},"206e":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniNavBar:n("4f7a").default,uniPopup:n("b67c").default,uniPopupMessage:n("1cfb").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[n("uni-nav-bar",{attrs:{"left-icon":"back","left-text":"\u8fd4\u56de",title:"\u901a\u7528\u8bbe\u7f6e",statusBar:"true",_i:1},on:{clickLeft:t.goBack}}),n("view",{staticClass:t._$s(2,"sc","setting-content"),attrs:{_i:2}},[n("view",{staticClass:t._$s(3,"sc","title"),attrs:{_i:3}}),n("view",{staticClass:t._$s(4,"sc","uni-form-item uni-column"),attrs:{_i:4}},[n("view",{staticClass:t._$s(5,"sc","title"),attrs:{_i:5}}),n("input",{directives:[{name:"model",rawName:"v-model",value:t.mq_ip,expression:"mq_ip"}],staticClass:t._$s(6,"sc","uni-input"),attrs:{_i:6},domProps:{value:t._$s(6,"v-model",t.mq_ip)},on:{input:function(e){e.target.composing||(t.mq_ip=e.target.value)}}})]),n("view",{staticClass:t._$s(7,"sc","uni-form-item uni-column"),attrs:{_i:7}},[n("view",{staticClass:t._$s(8,"sc","title"),attrs:{_i:8}}),n("input",{directives:[{name:"model",rawName:"v-model",value:t.mq_port,expression:"mq_port"}],staticClass:t._$s(9,"sc","uni-input"),attrs:{_i:9},domProps:{value:t._$s(9,"v-model",t.mq_port)},on:{input:function(e){e.target.composing||(t.mq_port=e.target.value)}}})])]),n("view",{staticClass:t._$s(10,"sc","setting-content"),attrs:{_i:10}},[n("view",{staticClass:t._$s(11,"sc","title"),attrs:{_i:11}}),n("view",{staticClass:t._$s(12,"sc","uni-form-item uni-column"),attrs:{_i:12}},[n("view",{staticClass:t._$s(13,"sc","title"),attrs:{_i:13}}),n("input",{directives:[{name:"model",rawName:"v-model",value:t.pic_ip,expression:"pic_ip"}],staticClass:t._$s(14,"sc","uni-input"),attrs:{_i:14},domProps:{value:t._$s(14,"v-model",t.pic_ip)},on:{input:function(e){e.target.composing||(t.pic_ip=e.target.value)}}})]),n("view",{staticClass:t._$s(15,"sc","uni-form-item uni-column"),attrs:{_i:15}},[n("view",{staticClass:t._$s(16,"sc","title"),attrs:{_i:16}}),n("input",{directives:[{name:"model",rawName:"v-model",value:t.pic_port,expression:"pic_port"}],staticClass:t._$s(17,"sc","uni-input"),attrs:{_i:17},domProps:{value:t._$s(17,"v-model",t.pic_port)},on:{input:function(e){e.target.composing||(t.pic_port=e.target.value)}}})])]),n("button",{attrs:{_i:18},on:{click:t.commit}}),n("uni-popup",{ref:"popup",attrs:{type:"message",_i:19}},[n("uni-popup-message",{attrs:{type:"success",message:"\u4fee\u6539\u6210\u529f",duration:2e3,_i:20}})],1),n("uni-popup",{ref:"popup1",attrs:{type:"message",_i:21}},[n("uni-popup-message",{attrs:{type:"error",message:"\u8fde\u63a5\u5931\u8d25",duration:2e3,_i:22}})],1)],1)},o=[]},3540:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","uni-popup-message"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","uni-popup-message__box fixforpc-width"),class:t._$s(1,"c","uni-popup__"+[t.type]),attrs:{_i:1}},[n("text",{staticClass:t._$s(2,"sc","uni-popup-message-text"),class:t._$s(2,"c","uni-popup__"+[t.type]+"-text"),attrs:{_i:2}},[t._v(t._$s(2,"t0-0",t._s(t.message)))])])])},o=[]},"3b77":function(t,e,n){"use strict";n.r(e);var r=n("405f"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"405f":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=uni.getSystemInfoSync().statusBarHeight+"px",i={name:"UniStatusBar",data:function(){return{statusBarHeight:r}}};e.default=i},"41b6":function(t,e,n){"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}Object.defineProperty(e,"__esModule",{value:!0}),e.createAnimation=h;var u=function(){function t(e,n){s(this,t),this.options=e,this.animation=uni.createAnimation(e),this.currentStepAnimates={},this.next=0,this.$=n}return c(t,[{key:"_nvuePushAnimates",value:function(t,e){var n=this.currentStepAnimates[this.next],r={};if(r=n||{styles:{},config:{}},l.includes(t)){r.styles.transform||(r.styles.transform="");var i="";"rotate"===t&&(i="deg"),r.styles.transform+="".concat(t,"(").concat(e+i,") ")}else r.styles[t]="".concat(e);this.currentStepAnimates[this.next]=r}},{key:"_animateRun",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.$.$refs["ani"].ref;if(n)return new Promise((function(r,o){nvueAnimation.transition(n,i({styles:t},e),(function(t){r()}))}))}},{key:"_nvueNextAnimate",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,i=t[n];if(i){var o=i.styles,s=i.config;this._animateRun(o,s).then((function(){n+=1,e._nvueNextAnimate(t,n,r)}))}else this.currentStepAnimates={},"function"===typeof r&&r(),this.isEnd=!0}},{key:"step",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.animation.step(t),this}},{key:"run",value:function(t){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((function(){"function"===typeof t&&t()}),this.$.durationTime)}}]),t}(),l=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"],f=["opacity","backgroundColor"],p=["width","height","left","right","top","bottom"];function h(t,e){if(e)return clearTimeout(e.timer),new u(t,e)}l.concat(f,p).forEach((function(t){u.prototype[t]=function(){var e;return(e=this.animation)[t].apply(e,arguments),this}}))},4287:function(t,e,n){"use strict";n.r(e);var r=n("ecdd"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"42e9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("d691"));function i(t){return t&&t.__esModule?t:{default:t}}var o={name:"UniPopup",components:{},props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},maskClick:{type:Boolean,default:!0}},provide:function(){return{popup:this}},mixins:[r.default],watch:{type:{handler:function(t){this[this.config[t]]()},immediate:!0},isDesktop:{handler:function(t){this[this.config[this.type]]()},immediate:!0},maskClick:{handler:function(t){this.mkclick=t},immediate:!0}},data:function(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:this.isDesktop?"fixforpc-top":"top"}},created:function(){this.mkclick=this.maskClick,this.animation?this.duration=300:this.duration=0},methods:{clear:function(t){t.stopPropagation()},open:function(){var t=this;this.showPopup=!0,this.$nextTick((function(){new Promise((function(e){clearTimeout(t.timer),t.timer=setTimeout((function(){t.showTrans=!0,t.$nextTick((function(){e()}))}),50)})).then((function(e){clearTimeout(t.msgtimer),t.msgtimer=setTimeout((function(){t.customOpen&&t.customOpen()}),100),t.$emit("change",{show:!0,type:t.type})}))}))},close:function(t){var e=this;this.showTrans=!1,this.$nextTick((function(){e.$emit("change",{show:!1,type:e.type}),clearTimeout(e.timer),e.customOpen&&e.customClose(),e.timer=setTimeout((function(){e.showPopup=!1}),300)}))},onTap:function(){this.mkclick&&this.close()},top:function(){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0}},bottom:function(){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0}},center:function(){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"}}}};e.default=o},"4aa6":function(t,e,n){"use strict";n.r(e);var r=n("42e9"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"4f7a":function(t,e,n){"use strict";n.r(e);var r=n("e549"),i=n("96c1");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"03bf6c84",null,!1,r["a"],s);e["default"]=c.exports},5996:function(t,e,n){"use strict";n.r(e);var r=n("638c"),i=n("c259");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"fbce20e0",null,!1,r["a"],s);e["default"]=c.exports},"5a46":function(t,e,n){"use strict";n.r(e);var r=n("11b8"),i=n("3b77");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"653830e9",null,!1,r["a"],s);e["default"]=c.exports},"5ccf":function(t,e){t.exports="/static/icon.png"},"5d55":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("a8ec"));function i(t){return t&&t.__esModule?t:{default:t}}var o={globalData:{resourseUrl:"1.119.197.90:60106",mqUrl:"1.119.197.90:15675",requestVideoUrl:"1.119.197.90:9000",curPageDetail:null},onLaunch:function(){t("log","App Launch"," at App.vue:17"),0==r.default.isOpen()&&r.default.openSqlite(),r.default.createTable("warning_list","id text UNIQUE, time text, date text, pos text, name text, warningLevel text, imgUrl text, unixTime INTEGER, isRead integer")},onShow:function(){t("log","App Show"," at App.vue:27")},onHide:function(){t("log","App Hide"," at App.vue:30")}};e.default=o}).call(this,n("0de9")["default"])},"638c":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniIcons:n("066e").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","uni-searchbar"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","uni-searchbar__box"),style:t._$s(1,"s",{borderRadius:t.radius+"px",backgroundColor:t.bgColor}),attrs:{_i:1},on:{click:t.searchClick}},[n("view",{staticClass:t._$s(2,"sc","uni-searchbar__box-icon-search"),attrs:{_i:2}},[t._t("searchIcon",[n("uni-icons",{attrs:{color:"#999999",size:"18",type:"search",_i:4}})],{_i:3})],2),t._$s(5,"i",t.show||t.searchVal)?n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchVal,expression:"searchVal"}],staticClass:t._$s(5,"sc","uni-searchbar__box-search-input"),attrs:{focus:t._$s(5,"a-focus",t.showSync),placeholder:t._$s(5,"a-placeholder",t.placeholder),maxlength:t._$s(5,"a-maxlength",t.maxlength),_i:5},domProps:{value:t._$s(5,"v-model",t.searchVal)},on:{confirm:t.confirm,blur:t.blur,focus:t.emitFocus,input:function(e){e.target.composing||(t.searchVal=e.target.value)}}}):n("text",{staticClass:t._$s(6,"sc","uni-searchbar__text-placeholder"),attrs:{_i:6}},[t._v(t._$s(6,"t0-0",t._s(t.placeholder)))]),t._$s(7,"i",t.show&&("always"===t.clearButton||"auto"===t.clearButton&&""!==t.searchVal))?n("view",{staticClass:t._$s(7,"sc","uni-searchbar__box-icon-clear"),attrs:{_i:7},on:{click:t.clear}},[t._t("clearIcon",[n("uni-icons",{attrs:{color:"#c0c4cc",size:"15",type:"clear",_i:9}})],{_i:8})],2):t._e()]),t._$s(10,"i","always"===t.cancelButton||t.show&&"auto"===t.cancelButton)?n("text",{staticClass:t._$s(10,"sc","uni-searchbar__cancel"),attrs:{_i:10},on:{click:t.cancel}},[t._v(t._$s(10,"t0-0",t._s(t.cancelText)))]):t._e()])},o=[]},6857:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniNavBar:n("4f7a").default,uniSearchBar:n("5996").default,uniIcons:n("066e").default},i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("view",{staticClass:t._$s(0,"sc","container"),attrs:{_i:0}},[r("uni-nav-bar",{staticClass:t._$s(1,"sc","header-bar"),attrs:{leftText:"\u9996\u9875",rightIcon:"gear",fixed:"true",statusBar:"true",_i:1},on:{clickLeft:t.goFrontPage,clickRight:t.goToSetting}},[r("view",[r("uni-search-bar",{attrs:{cancelButton:"none",placeholder:"\u573a\u666f\u540d\u79f0 \u6444\u50cf\u673a\u5730\u5740",_i:3},on:{confirm:t.toSearch,clear:t.clearInput,input:t.inputMethod},model:{value:t._$s(3,"v-model",t.searchVal),callback:function(e){t.searchVal=e},expression:"searchVal"}})],1)]),r("view",{staticClass:t._$s(4,"sc","intro"),attrs:{_i:4}},[r("view",{staticClass:t._$s(5,"sc","top"),attrs:{_i:5}},[r("view",{staticClass:t._$s(6,"sc","banner"),attrs:{_i:6}},[r("view",{staticClass:t._$s(7,"sc","banner-img"),attrs:{_i:7}},[r("image",{attrs:{src:t._$s(8,"a-src",n("5ccf")),_i:8}})]),r("view",[r("view",{staticClass:t._$s(10,"sc","title"),attrs:{_i:10}}),r("view",{staticClass:t._$s(11,"sc","desc"),attrs:{_i:11}})])]),r("view",{staticClass:t._$s(12,"sc","top-title"),attrs:{_i:12}},[r("view",{staticClass:t._$s(13,"sc","t"),attrs:{_i:13}}),r("button",{staticClass:t._$s(14,"sc","select-channel-btn"),attrs:{_i:14},on:{click:t.showAllChannel}},[t._v(t._$s(14,"t0-0",t._s(t.activeChannel))),r("uni-icons",{staticClass:t._$s(15,"sc","down-icon"),attrs:{type:"arrowdown",size:"11",_i:15}})],1)])]),r("view",{staticClass:t._$s(16,"sc","total-list"),attrs:{_i:16}},t._l(t._$s(17,"f",{forItems:t.wList}),(function(e,n,i,o){return r("view",{key:t._$s(17,"f",{forIndex:i,key:"17-"+o}),staticClass:t._$s("17-"+o,"sc","list-item"),attrs:{_i:"17-"+o},on:{click:function(n){return t.toDetail(e)}}},[r("view",{staticClass:t._$s("18-"+o,"sc","left-img"),attrs:{_i:"18-"+o}},[r("image",{attrs:{src:t._$s("19-"+o,"a-src","http://"+t.getResourceUrl()+"/httpImage/"+e.imgUrl),_i:"19-"+o}})]),r("view",{staticClass:t._$s("20-"+o,"sc","right-desc"),attrs:{_i:"20-"+o}},[t._$s("21-"+o,"i",!e.isRead)?r("div",{ref:t._$s("21-"+o,"ref",e.id),refInFor:!0,staticClass:t._$s("21-"+o,"sc","triangle-topright"),attrs:{_i:"21-"+o}},[r("div",{staticClass:t._$s("22-"+o,"sc","word"),attrs:{_i:"22-"+o}})]):t._e(),r("view",{staticClass:t._$s("23-"+o,"sc","first"),attrs:{_i:"23-"+o}},[r("view",{staticClass:t._$s("24-"+o,"sc","name"),attrs:{_i:"24-"+o}},[t._v(t._$s("24-"+o,"t0-0",t._s(e.name)))]),r("view",{staticClass:t._$s("25-"+o,"sc","level"),attrs:{_i:"25-"+o}},[r("view",{class:t._$s("26-"+o,"c","\u4e00\u7ea7"==e.warningLevel?"level-label-top":"level-label-no-top"),attrs:{_i:"26-"+o}}),r("text",{staticClass:t._$s("27-"+o,"sc","level-name"),attrs:{_i:"27-"+o}},[t._v(t._$s("27-"+o,"t0-0",t._s(e.warningLevel)))])])]),r("view",{staticClass:t._$s("28-"+o,"sc","second"),attrs:{_i:"28-"+o}},[r("view",{staticClass:t._$s("29-"+o,"sc","pos"),attrs:{_i:"29-"+o}},[t._v(t._$s("29-"+o,"t0-0",t._s(e.pos)))]),r("view",{staticClass:t._$s("30-"+o,"sc","time"),attrs:{_i:"30-"+o}},[t._v(t._$s("30-"+o,"t0-0",t._s(e.date))+t._$s("30-"+o,"t0-1",t._s(e.time)))])])])])})),0),r("bottomDrawer",{attrs:{tips:t.showActionSheet.tips,itemList:t.showActionSheet.itemList,show:t.showActionSheet.show,maskClosable:t.showActionSheet.maskClosable,isCancel:t.showActionSheet.isCancel,_i:31},on:{chooseCancel:t.chooseCancel,slectDevice:t.slectDevice}})],1)],1)},o=[]},7582:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={name:"UniPopupMessage",props:{type:{type:String,default:"success"},message:{type:String,default:""},duration:{type:Number,default:3e3}},inject:["popup"],data:function(){return{}},created:function(){this.popup.childrenMsg=this},methods:{open:function(){var t=this;0!==this.duration&&(clearTimeout(this.popuptimer),this.popuptimer=setTimeout((function(){t.popup.close()}),this.duration))},close:function(){clearTimeout(this.popuptimer)}}};e.default=r},"79fa":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n("bbb4")),i=s(n("fd82")),o=s(n("a8ec"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){return p(t)||f(t,e)||u(t,e)||c()}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(t){if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){i=!0,o=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(i)throw o}}return n}}function p(t){if(Array.isArray(t))return t}var h={data:function(){return{href:"https://uniapp.dcloud.io/component/README?id=uniui",searchVal:"",status:"more",wList:[],serve:{host:"192.168.20.189",wsport:"1883",path:"/ws"},onTopic:"MIDDOL-TEST",Qos:0,sendMassage:"Hello EMQ-X\uff01",time:0,client:null,activeChannel:"\u5168\u90e8\u8bbe\u5907",options:{wsOptions:{},protocolVersion:4,clientId:"WebClient-"+parseInt(1e5*Math.random()),username:"admin",password:"admin123",keepalive:60,reconnectPeriod:100,connectTimeout:6e4,resubscribe:!0},showActionSheet:{show:!1,maskClosable:!0,tips:"\u8bf7\u9009\u62e9\u7533\u8bf7\u8282\u70b9\u8eab\u4efd\uff0c\u4e0d\u540c\u7684\u8282\u70b9\u6d88\u8017\u798f\u5361\u4e0d\u540c",itemList:["\u5168\u90e8\u8bbe\u5907"],color:"#9a9a9a",size:26,isCancel:!0}}},components:{bottomDrawer:r.default},mounted:function(){this.connectAndSubscribe("wx://"+getApp().globalData.mqUrl+"/ws"),this.listenIPChange()},onShow:function(){this.pullData()},methods:{listenIPChange:function(){var t=this;uni.$on("changeClientIP",(function(e){t.disconnect(),t.connectAndSubscribe("wx://".concat(e.host,"/ws")),getApp().globalData.mqUrl=e.host,uni.$emit("connectStatus",{status:t.client.connected})}))},pullData:function(e,n){var r=this;o.default.selectTableData("warning_list",e,n).then((function(t){r.wList=t}),(function(e){t("log",6677,e," at pages/index/index.vue:216")}))},connectAndSubscribe:function(e){var n=this;t("log",e," at pages/index/index.vue:221"),this.client=i.default.connect(e,n.options),this.client.on("connect",(function(){t("log","\u8fde\u63a5\u6210\u529f"," at pages/index/index.vue:227"),n.client.subscribe(n.onTopic,{qos:n.Qos},(function(e){e||t("log","\u8ba2\u9605\u6210\u529f"," at pages/index/index.vue:232")}))})),this.client.on("reconnect",(function(e){t("log","\u8d70\u8fd9\u91cc111"," at pages/index/index.vue:237")})),this.client.on("error",(function(e){t("log","\u8fde\u63a5\u5931\u8d25"," at pages/index/index.vue:240")})),this.client.on("message",(function(e,r){t("log","\u65b0\u589e\u4e00\u6761\u6570\u636e"," at pages/index/index.vue:243");var i=r.toString();n.handleMsg(i)}))},getResourceUrl:function(){return getApp().globalData.resourseUrl},disconnect:function(){this.client&&this.client.connected?(this.client.end(),this.client=null,t("log","\u5df2\u65ad\u5f00\u8fde\u63a5"," at pages/index/index.vue:258")):t("log","\u5ba2\u6237\u7aef\u672a\u8fde\u63a5"," at pages/index/index.vue:253")},handleMsg:function(e){var n=this,r=JSON.parse(e),i=r.picDate.split(" "),s=a(i,2),c=s[0],u=s[1];u=u.substring(0,u.length-4);var l=new Date(r.picDate);o.default.insertTableData("warning_list","'".concat(r.id,"', '").concat(u,"', '").concat(c,"', '").concat(r.cameraAddr,"', '").concat(r.taskName,"', '").concat(r.alarmRules[0].alarmLevel,"', '").concat(r.picMaxUrl[0],"','").concat(l.getTime(),"', 0")).then((function(){t("log","\u6210\u529f\u63d2\u5165\u4e00\u6761\u6570\u636e"," at pages/index/index.vue:268"),"\u5168\u90e8\u8bbe\u5907"!=n.activeChannel&&n.activeChannel!=r.cameraAddr||void 0==n.wList.find((function(t){return t.id==r.id}))&&n.wList.unshift({id:r.id,time:u,date:c,pos:r.cameraAddr,name:r.taskName,warningLevel:r.alarmRules[0].alarmLevel,imgUrl:r.picMaxUrl[0]})}),(function(){t("log","\u63d2\u5165\u4e00\u6761\u6570\u636e\u5931\u8d25"," at pages/index/index.vue:285")}))},goFrontPage:function(){uni.navigateTo({url:"pages/index/index"})},goToSetting:function(){uni.navigateTo({url:"../setting/setting"})},showAllChannel:function(){var e=this;this.showActionSheet.show=!0,this.showActionSheet.itemList=["\u5168\u90e8\u8bbe\u5907"],o.default.getDistinctVal("warning_list","pos").then((function(t){t.forEach((function(t){e.showActionSheet.itemList.push(t.pos)}))})),plus.sqlite.selectSql({name:"warns",sql:"select id from warning_list",success:function(e){t("log","\u6240\u6709id",e," at pages/index/index.vue:312")},fail:function(e){t("log","\u5931\u8d25\u6240\u6709id",e," at pages/index/index.vue:315")}})},toSearch:function(){var t=this.searchVal.trim();this.wList=this.wList.filter((function(e){return e.pos.includes(t)||e.name.includes(t)}))},slectDevice:function(t){var e=this.showActionSheet.itemList[t.index];this.activeChannel=e,"\u5168\u90e8\u8bbe\u5907"===e?this.pullData():this.pullData("pos",e)},chooseCancel:function(){this.showActionSheet.show=!1},toDetail:function(t){o.default.updateTableData("warning_list","isRead",1,"id",t.id),getApp().globalData.curPageDetail=t,uni.navigateTo({url:"../detail/detail?id=".concat(t.id)})},clearInput:function(t){"\u5168\u90e8\u8bbe\u5907"==this.activeChannel?this.pullData():this.pullData("pos",this.activeChannel)},inputMethod:function(t){""==t.trim()&&("\u5168\u90e8\u8bbe\u5907"==this.activeChannel?this.pullData():this.pullData("pos",this.activeChannel))}}};e.default=h}).call(this,n("0de9")["default"])},"7b46":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={data:function(){return{}},props:{imgSrc:{type:String,default:""},show:{type:Boolean,default:!1}},methods:{handleClickMask:function(){this.handleClickCancel()},handleClickCancel:function(){this.$emit("hideImgPopper")}}};e.default=r},"7ec2":function(t,e,n){"use strict";n.r(e);var r=n("8d13"),i=n("8e06");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"3c349790",null,!1,r["a"],s);e["default"]=c.exports},"806b":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={name:"UniSearchBar",props:{placeholder:{type:String,default:"\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"},radius:{type:[Number,String],default:5},clearButton:{type:String,default:"auto"},cancelButton:{type:String,default:"auto"},cancelText:{type:String,default:"\u53d6\u6d88"},bgColor:{type:String,default:"#F8F8F8"},maxlength:{type:[Number,String],default:100},value:{type:[Number,String],default:""},focus:{type:Boolean,default:!1}},data:function(){return{show:!1,showSync:!1,searchVal:""}},watch:{value:{immediate:!0,handler:function(t){this.searchVal=t,t&&(this.show=!0)}},focus:{immediate:!0,handler:function(t){var e=this;t&&(this.show=!0,this.$nextTick((function(){e.showSync=!0})))}},searchVal:function(t,e){this.$emit("input",t)}},methods:{searchClick:function(){var t=this;this.show||(this.show=!0,this.$nextTick((function(){t.showSync=!0})))},clear:function(){this.$emit("clear",{value:this.searchVal}),this.searchVal=""},cancel:function(){this.$emit("cancel",{value:this.searchVal}),this.searchVal="",this.show=!1,this.showSync=!1,plus.key.hideSoftKeybord()},confirm:function(){plus.key.hideSoftKeybord(),this.$emit("confirm",{value:this.searchVal})},blur:function(){plus.key.hideSoftKeybord(),this.$emit("blur",{value:this.searchVal})},emitFocus:function(t){this.$emit("focus",t.detail)}}};e.default=r},"80a1":function(t,e,n){"use strict";n.r(e);var r=n("6857"),i=n("945f");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},8169:function(t,e,n){"use strict";n.r(e);var r=n("81c5"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"81c5":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("0477"));function i(t){return t&&t.__esModule?t:{default:t}}var o={name:"UniIcons",props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customIcons:{type:String,default:""}},data:function(){return{icons:r.default}},methods:{_onClick:function(){this.$emit("click")}}};e.default=o},8380:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={created:function(){"message"===this.type&&(this.maskShow=!1,this.childrenMsg=null)},methods:{customOpen:function(){this.childrenMsg&&this.childrenMsg.open()},customClose:function(){this.childrenMsg&&this.childrenMsg.close()}}};e.default=r},"8bbf":function(t,e){t.exports=Vue},"8d13":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:t._$s(0,"sc","ip-input-container"),attrs:{_i:0}},t._l(t._$s(1,"f",{forItems:t.segments}),(function(e,r,i,o){return n("div",{key:t._$s(1,"f",{forIndex:i,key:r}),staticClass:t._$s("1-"+o,"sc","ip-segment"),attrs:{_i:"1-"+o}},[n("input",{staticClass:t._$s("2-"+o,"sc","ip-segment-input"),attrs:{value:t._$s("2-"+o,"a-value",e),placeholder:t._$s("2-"+o,"a-placeholder",t.placeholder),disabled:t._$s("2-"+o,"a-disabled",t.disabled),_i:"2-"+o},on:{keydown:function(e){return t.onInputKeydown(e,r)},input:function(e){return t.onInput(e,r)},blur:function(e){return t.onInputBlur()},paste:function(e){return t.onPaste(e,r)}}}),n("i",{directives:[{name:"show",rawName:"v-show",value:t._$s("3-"+o,"v-show",r!=t.segments.length-1),expression:"_$s((\"3-\"+$30),'v-show',index != segments.length - 1)"}],attrs:{_i:"3-"+o}})])})),0)},o=[]},"8e06":function(t,e,n){"use strict";n.r(e);var r=n("b061"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"907c":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniNavBar:n("4f7a").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","content"),attrs:{_i:0}},[n("uni-nav-bar",{attrs:{"left-icon":"back","left-text":"\u8fd4\u56de",title:"\u8be6\u60c5",statusBar:"true",_i:1},on:{clickLeft:t.goBack}}),n("view",{directives:[{name:"show",rawName:"v-show",value:t._$s(2,"v-show",t.showVideo),expression:"_$s(2,'v-show',showVideo)"}],staticClass:t._$s(2,"sc","video-box"),attrs:{_i:2}},[n("video",{attrs:{id:"myVideo",src:t._$s(3,"a-src","http://"+t.getResourceUrl()+"/httpImage/"+t.videoUrl),_i:3}})]),n("view",{staticClass:t._$s(4,"sc","desc-box"),attrs:{_i:4}},[n("view",{staticClass:t._$s(5,"sc","first"),attrs:{_i:5}},[n("view",{staticClass:t._$s(6,"sc","time"),attrs:{_i:6}},[t._v(t._$s(6,"t0-0",t._s(t.curInfo.date))+t._$s(6,"t0-1",t._s(t.curInfo.time)))]),n("view",{staticClass:t._$s(7,"sc","level"),attrs:{_i:7}},[n("view",{staticClass:t._$s(8,"sc","level-label"),attrs:{_i:8}}),n("text",{staticClass:t._$s(9,"sc","level-text"),attrs:{_i:9}},[t._v(t._$s(9,"t0-0",t._s(t.curInfo.warningLevel)))])])]),n("view",{staticClass:t._$s(10,"sc","second"),attrs:{_i:10}},[t._v(t._$s(10,"t0-0",t._s(t.curInfo.pos)))])]),n("button",{attrs:{_i:11},on:{click:t.showImg}}),n("view",{staticClass:t._$s(12,"sc","tui-actionsheet-mask"),class:t._$s(12,"c",[t.showImgPopper.show?"tui-mask-show":""]),attrs:{_i:12},on:{click:t.handleClickCancel}},[n("image",{attrs:{src:t._$s(13,"a-src",t.showImgPopper.imgSrc),_i:13}})])],1)},o=[]},"945f":function(t,e,n){"use strict";n.r(e);var r=n("79fa"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"96c1":function(t,e,n){"use strict";n.r(e);var r=n("f231"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"99e2":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("text",{staticClass:t._$s(0,"sc","uni-icons"),class:t._$s(0,"c",[t.customIcons,t.customIcons?t.type:""]),style:t._$s(0,"s",{color:t.color,"font-size":t.size+"px"}),attrs:{_i:0},on:{click:t._onClick}},[t._v(t._$s(0,"t0-0",t._s(t.icons[t.type])))])},o=[]},"9d4d":function(t,e,n){"use strict";n.r(e);var r=n("ffd4"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"9d4e":function(t,e,n){"use strict";n.r(e);var r=n("d8c1"),i=n("16dd");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},a57b:function(t,e,n){"use strict";n.r(e);var r=n("5d55"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},a8ec:function(t,e,n){(function(e){t.exports={dbName:"warns",dbPath:"_doc/warns.db",isOpen:function(){return plus.sqlite.isOpenDatabase({name:"warns",path:"_doc/warns.db"})},openSqlite:function(){return new Promise((function(t,n){plus.sqlite.openDatabase({name:"warns",path:"_doc/warns.db",success:function(n){e("log","\u6210\u529f\u6253\u5f00\u6570\u636e\u5e93:",n," at db.js:19"),t(n)},fail:function(t){e("log","\u6253\u5f00\u6570\u636e\u5e93failed",t," at db.js:23"),n(t)}})}))},closeSqlite:function(){return new Promise((function(t,n){plus.sqlite.closeDatabase({name:"warns",success:function(n){e("log",n," at db.js:34"),t(n)},fail:function(t){e("log",t," at db.js:38"),n(t)}})}))},createTable:function(t,n){return new Promise((function(r,i){plus.sqlite.executeSql({name:"warns",sql:"CREATE TABLE if not exists ".concat(t,"(").concat(n,")"),success:function(t){e("log",t," at db.js:53"),r(t)},fail:function(t){e("log",t," at db.js:57"),i(t)}})}))},dropTable:function(t){return new Promise((function(e,n){plus.sqlite.executeSql({name:"warns",sql:"DROP TABLE ".concat(t),success:function(t){e(t)},fail:function(t){n(t)}})}))},insertTableData:function(t,e){if(void 0!==t&&void 0!==e){var n="{}"==JSON.stringify(e);return new Promise(n?function(t,e){e("\u9519\u8bef\u6dfb\u52a0")}:function(n,r){plus.sqlite.executeSql({name:"warns",sql:"insert or ignore into ".concat(t," values(").concat(e,")"),success:function(t){n(t)},fail:function(t){r(t)}})})}return new Promise((function(t,e){e("\u9519\u8bef\u6dfb\u52a0")}))},selectTableData:function(t,e,n,r,i){if(void 0!==t){if(void 0!==e&&void 0!==r)var o="select * from ".concat(t," where ").concat(e," = '").concat(n,"' and ").concat(r," = '").concat(i,"'");if(void 0!==e&&void 0==r)o="select * from ".concat(t," where ").concat(e," = '").concat(n,"'");if(void 0==e)o="select * from ".concat(t," order by unixTime desc");return new Promise((function(t,e){plus.sqlite.selectSql({name:"warns",sql:o,success:function(e){t(e)},fail:function(t){e(t)}})}))}return new Promise((function(t,e){e("\u9519\u8bef\u67e5\u8be2")}))},getDistinctVal:function(t,e){if(void 0===t||void 0===e)return new Promise((function(t,e){e("\u9519\u8bef\u67e5\u8be2")}));var n="select distinct ".concat(e," from ").concat(t);return new Promise((function(t,e){plus.sqlite.selectSql({name:"warns",sql:n,success:function(e){t(e)},fail:function(t){e(t)}})}))},deleteTableData:function(t,e,n,r,i){if(void 0!==t){if(void 0==e)var o="delete from ".concat(t);else if(void 0!==r)o="delete from ".concat(t," where ").concat(e," = '").concat(n,"' and ").concat(r," = '").concat(i,"'");else o="delete from ".concat(t," where ").concat(e," = '").concat(n,"'");return new Promise((function(t,e){plus.sqlite.executeSql({name:"warns",sql:o,success:function(e){t(e)},fail:function(t){e(t)}})}))}return new Promise((function(t,e){e("\u9519\u8bef\u5220\u9664")}))},updateTableData:function(t,e,n,r,i){var o="update ".concat(t," set ").concat(e," = ").concat(n," where ").concat(r," = '").concat(i,"'");return new Promise((function(t,e){plus.sqlite.executeSql({name:"warns",sql:o,success:function(e){t(e)},fail:function(t){e(t)}})}))},pullSQL:function(t,e){return new Promise((function(n,r){plus.sqlite.selectSql({name:"warns",sql:"select * from ".concat(t," order by id desc limit 15 offset '").concat(e,"'"),success:function(t){n(t)},fail:function(t){r(t)}})}))}}}).call(this,n("0de9")["default"])},b061:function(t,e,n){"use strict";function r(t){var e,n,r,i,o,s={};return t.setSelectionRange?(s.begin=t.selectionStart,s.end=t.selectionEnd,s.result=t.value.substring(s.begin,s.end)):document.selection&&("input"===t.tagName.toLowerCase()?(e=document.selection.createRange(),n=t.createTextRange(),n.collapse(!0),n.select(),r=document.selection.createRange(),r.setEndPoint("EndToEnd",e),s.begin=r.text.length-e.text.length,s.end=r.text.length,s.result=e.text,e.select()):"textarea"===t.tagName.toLowerCase()&&(i=document.selection.createRange(),o=i.duplicate(),o.moveToElementText(t),o.setEndPoint("EndToEnd",i),s.begin=o.text.length-i.text.length,s.end=o.text.length,s.result=i.text)),t.focus(),s}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={props:{ip:{type:String,defalut:""},item:{},placeholder:String,onChange:Function,onBlur:Function,onItemChange:Function,disabled:{type:Boolean,default:!1}},data:function(){return{segments:["","","",""]}},watch:{ip:function(t){this.syncIp(t)}},methods:{onInputKeydown:function(t,e){var n=t.keyCode||t.which,i=t.target.value;8===n||37===n?(0===i.length||0===r(t.target).end)&&e>0&&(this.$el.getElementsByTagName("input")[e-1].focus(),t.preventDefault()):39===n&&110===n&&r(t.target).end===i.length&&e<3&&this.$el.getElementsByTagName("input")[e+1].focus()},onInput:function(t,e){var n=t.target.value;t.target.value=this.segments[e];var r=Number(n);isNaN(r)||(""===n?this.segments.splice(e,1,""):r>255||r<0?this.segments.splice(e,1,255):this.segments.splice(e,1,r),(3===n.length&&e<3||"."===n[n.length-1])&&this.$el.getElementsByTagName("input")[e+1].focus())},onInputBlur:function(){var t=this;setTimeout((function(){t.$emit("on-blur",t.segments.join(".")),t.onBlur&&t.onBlur(t.segments.join(".")),t.onItemChange&&t.onItemChange(t.segments.join("."),t.item)}),50)},onPaste:function(t,e){var n=this,r=t.clipboardData.getData("text/plain"),i=r.split(".");i.forEach((function(t,r){e+r<4&&!isNaN(t)&&t>=0&&t<=255&&n.segments.splice(e+r,1,t)})),t.preventDefault()},syncIp:function(t){var e=this;t&&-1!==t.indexOf(".")&&t.split(".").map((function(t,n){return(isNaN(t)||t<0||t>255)&&(t=255),e.segments.splice(n,1,t),t}))}},mounted:function(){var t=this;this.syncIp(this.ip),this.$watch((function(){return t.segments.join(".")}),(function(e,n){e!==n&&("..."===e&&(e=""),t.onChange&&t.onChange(e))}))}};e.default=i},b67c:function(t,e,n){"use strict";n.r(e);var r=n("db85"),i=n("4aa6");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"05d37b98",null,!1,r["a"],s);e["default"]=c.exports},bbb4:function(t,e,n){"use strict";n.r(e);var r=n("e84d"),i=n("4287");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],s);e["default"]=c.exports},c245:function(t,e,n){"use strict";n.r(e);var r=n("7b46"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},c259:function(t,e,n){"use strict";n.r(e);var r=n("806b"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},cd7b:function(t,e,n){"use strict";n.r(e);var r=n("206e"),i=n("df9f");for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var s,a=n("f0c5"),c=Object(a["a"])(i["default"],r["b"],r["c"],!1,null,"6feaec62",null,!1,r["a"],s);e["default"]=c.exports},d41c:function(t,e,n){"undefined"===typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){throw n}))}))}),uni.restoreGlobal&&uni.restoreGlobal(weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),__definePage("pages/index/index",(function(){return Vue.extend(n("80a1").default)})),__definePage("pages/detail/detail",(function(){return Vue.extend(n("01cc").default)})),__definePage("pages/setting/setting",(function(){return Vue.extend(n("cd7b").default)}))},d691:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("8380"));function i(t){return t&&t.__esModule?t:{default:t}}var o={top:"top",bottom:"bottom",center:"center",message:"top",dialog:"center",share:"bottom"},s={data:function(){return{config:o,popupWidth:0,popupHeight:0}},mixins:[r.default],computed:{isDesktop:function(){return this.popupWidth>=500&&this.popupHeight>=500}},mounted:function(){var t=this,e=function(){var e=uni.getSystemInfoSync(),n=e.windowWidth,r=e.windowHeight,i=e.windowTop;t.popupWidth=n,t.popupHeight=r+i};e()}};e.default=s},d8c1:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t._$s(0,"i",t.isShow)?n("view",{ref:"ani",class:t._$s(0,"c",t.customClass),style:t._$s(0,"s",t.transformStyles),attrs:{animation:t._$s(0,"a-animation",t.animationData),_i:0},on:{click:t.onClick}},[t._t("default",null,{_i:1})],2):t._e()},o=[]},db85:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniTransition:n("9d4e").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t._$s(0,"i",t.showPopup)?n("view",{staticClass:t._$s(0,"sc","uni-popup"),class:t._$s(0,"c",[t.popupstyle,t.isDesktop?"fixforpc-z-index":""]),attrs:{_i:0},on:{touchmove:function(e){return e.stopPropagation(),e.preventDefault(),t.clear(e)}}},[t._$s(1,"i",t.maskShow)?n("uni-transition",{staticClass:t._$s(1,"sc","uni-mask--hook"),attrs:{"mode-class":["fade"],styles:t.maskClass,duration:t.duration,show:t.showTrans,_i:1},on:{click:t.onTap}}):t._e(),n("uni-transition",{attrs:{"mode-class":t.ani,styles:t.transClass,duration:t.duration,show:t.showTrans,_i:2},on:{click:t.onTap}},[n("view",{staticClass:t._$s(3,"sc","uni-popup__wrapper-box"),attrs:{_i:3},on:{click:function(e){return e.stopPropagation(),t.clear(e)}}},[t._t("default",null,{_i:4})],2)])],1):t._e()},o=[]},df9f:function(t,e,n){"use strict";n.r(e);var r=n("ec8b"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},e549:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={uniIcons:n("066e").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",{staticClass:t._$s(0,"sc","uni-navbar"),attrs:{_i:0}},[n("view",{staticClass:t._$s(1,"sc","uni-navbar__content"),class:t._$s(1,"c",{"uni-navbar--fixed":t.fixed,"uni-navbar--shadow":t.shadow,"uni-navbar--border":t.border}),style:t._$s(1,"s",{"background-color":t.backgroundColor}),attrs:{_i:1}},[t._$s(2,"i",t.statusBar)?n("status-bar",{attrs:{_i:2}}):t._e(),n("view",{staticClass:t._$s(3,"sc","uni-navbar__header uni-navbar__content_view"),style:t._$s(3,"s",{color:t.color,backgroundColor:t.backgroundColor}),attrs:{_i:3}},[n("view",{staticClass:t._$s(4,"sc","uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view"),attrs:{_i:4},on:{click:t.onClickLeft}},[t._$s(5,"i",t.leftIcon.length)?n("view",{staticClass:t._$s(5,"sc","uni-navbar__content_view"),attrs:{_i:5}},[n("uni-icons",{attrs:{color:t.color,type:t.leftIcon,size:"24",_i:6}})],1):t._e(),t._$s(7,"i",t.leftText.length)?n("view",{staticClass:t._$s(7,"sc","uni-navbar-btn-text uni-navbar__content_view"),class:t._$s(7,"c",{"uni-navbar-btn-icon-left":!t.leftIcon.length}),attrs:{_i:7}},[n("text",{style:t._$s(8,"s",{color:t.color,fontSize:"14px"}),attrs:{_i:8}},[t._v(t._$s(8,"t0-0",t._s(t.leftText)))])]):t._e(),t._t("left",null,{_i:9})],2),n("view",{staticClass:t._$s(10,"sc","uni-navbar__header-container uni-navbar__content_view"),attrs:{_i:10},on:{click:t.onClickTitle}},[t._$s(11,"i",t.title.length)?n("view",{staticClass:t._$s(11,"sc","uni-navbar__header-container-inner uni-navbar__content_view"),attrs:{_i:11}},[n("text",{staticClass:t._$s(12,"sc","uni-nav-bar-text"),style:t._$s(12,"s",{color:t.color}),attrs:{_i:12}},[t._v(t._$s(12,"t0-0",t._s(t.title)))])]):t._e(),t._t("default",null,{_i:13})],2),n("view",{staticClass:t._$s(14,"sc","uni-navbar__header-btns uni-navbar__content_view"),class:t._$s(14,"c",t.title.length?"uni-navbar__header-btns-right":""),attrs:{_i:14},on:{click:t.onClickRight}},[t._$s(15,"i",t.rightIcon.length)?n("view",{staticClass:t._$s(15,"sc","uni-navbar__content_view"),attrs:{_i:15}},[n("uni-icons",{attrs:{color:t.color,type:t.rightIcon,size:"24",_i:16}})],1):t._e(),t._$s(17,"i",t.rightText.length&&!t.rightIcon.length)?n("view",{staticClass:t._$s(17,"sc","uni-navbar-btn-text uni-navbar__content_view"),attrs:{_i:17}},[n("text",{staticClass:t._$s(18,"sc","uni-nav-bar-right-text"),attrs:{_i:18}},[t._v(t._$s(18,"t0-0",t._s(t.rightText)))])]):t._e(),t._t("right",null,{_i:19})],2)])],1),t._$s(20,"i",t.fixed)?n("view",{staticClass:t._$s(20,"sc","uni-navbar__placeholder"),attrs:{_i:20}},[t._$s(21,"i",t.statusBar)?n("status-bar",{attrs:{_i:21}}):t._e(),n("view",{staticClass:t._$s(22,"sc","uni-navbar__placeholder-view"),attrs:{_i:22}})],1):t._e()])},o=[]},e84d:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("view",[n("view",{staticClass:t._$s(1,"sc","tui-actionsheet-class tui-actionsheet"),class:t._$s(1,"c",[t.show?"tui-actionsheet-show":""]),attrs:{_i:1}},[n("view",{staticClass:t._$s(2,"sc","close-and-confirm"),attrs:{_i:2}},[n("view",{staticClass:t._$s(3,"sc","close-btn"),attrs:{_i:3},on:{click:t.handleClickMask}}),n("view",{staticClass:t._$s(4,"sc","title"),attrs:{_i:4}}),n("view",{staticClass:t._$s(5,"sc","close-btn"),attrs:{_i:5},on:{click:t.handleConfirm}})]),n("view",{class:t._$s(6,"c",[t.isCancel?"tui-operate-box":""]),attrs:{_i:6}},[t._l(t._$s(7,"f",{forItems:t.itemList}),(function(e,r,i,o){return[n("view",{key:t._$s(7,"f",{forIndex:i,keyIndex:0,key:r+"_0"}),staticClass:t._$s("8-"+o,"sc","tui-actionsheet-btn tui-actionsheet-divider"),class:t._$s("8-"+o,"c",t.curIndex==r?"item-active":""),attrs:{"data-index":t._$s("8-"+o,"a-data-index",r),_i:"8-"+o},on:{click:t.handleClickItem}},[t._v(t._$s("8-"+o,"t0-0",t._s(e)))])]}))],2)]),n("view",{staticClass:t._$s(9,"sc","tui-actionsheet-mask"),class:t._$s(9,"c",[t.show?"tui-mask-show":""]),attrs:{_i:9},on:{click:t.handleClickMask}})])},o=[]},ec8b:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n("0dd7")),i=o(n("7ec2"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){return f(t)||l(t,e)||c(t,e)||a()}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){i=!0,o=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(i)throw o}}return n}}function f(t){if(Array.isArray(t))return t}var p={components:{imagePopper:r.default,IPInput:i.default},data:function(){return{mq_ip:"",pic_ip:"",mq_port:"",pic_port:""}},mounted:function(){var e=this,n=getApp().globalData.mqUrl.split(":"),r=s(n,2);this.mq_ip=r[0],this.mq_port=r[1],t("log",this.mq_ip,this.mq_port," at pages/setting/setting.vue:62");var i=getApp().globalData.resourseUrl.split(":"),o=s(i,2);this.pic_ip=o[0],this.pic_port=o[1],t("log",this.pic_ip,this.pic_port," at pages/setting/setting.vue:64"),uni.$on("connectStatus",(function(n){t("log","connectStatus"," at pages/setting/setting.vue:66"),n.status?e.$refs.popup.open("top"):e.$refs.popup1.open("top")}))},onBackPress:function(e){t("log",e," at pages/setting/setting.vue:72"),uni.navigateTo({url:"/pages/index/index"})},methods:{goBack:function(){uni.navigateTo({url:"../index/index"})},commit:function(){uni.$emit("changeClientIP",{host:"".concat(this.sys_ip,":").concat(this.port)}),getApp().globalData.resourseUrl="".concat(this.pic_ip,":").concat(this.pic_port),this.$refs.popup.open("top")}}};e.default=p}).call(this,n("0de9")["default"])},ecdd:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={name:"tuiActionsheet",data:function(){return{curIndex:-1}},props:{maskClosable:{type:Boolean,default:!0},show:{type:Boolean,default:!1},itemList:{type:Array,default:[]},tips:{type:String,default:""},color:{type:String,default:"#9a9a9a"},size:{type:Number,default:26},isCancel:{type:Boolean,default:!0}},methods:{handleClickMask:function(){this.maskClosable&&this.handleClickCancel()},handleClickItem:function(e){if(this.show){var n=e.currentTarget.dataset;t("log",n," at components/bottomDrawer.vue:80"),this.curIndex=n.index}},handleClickCancel:function(){this.$emit("chooseCancel")},handleConfirm:function(){this.handleClickCancel(),this.$emit("slectDevice",{index:this.curIndex})}}};e.default=n}).call(this,n("0de9")["default"])},f0c5:function(t,e,n){"use strict";function r(t,e,n,r,i,o,s,a,c,u){var l,f="function"===typeof t?t.options:t;if(c){f.components||(f.components={});var p=Object.prototype.hasOwnProperty;for(var h in c)p.call(c,h)&&!p.call(f.components,h)&&(f.components[h]=c[h])}if(u&&((u.beforeCreate||(u.beforeCreate=[])).unshift((function(){this[u.__module]=this})),(f.mixins||(f.mixins=[])).push(u)),e&&(f.render=e,f.staticRenderFns=n,f._compiled=!0),r&&(f.functional=!0),o&&(f._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},f._ssrRegister=l):i&&(l=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(f.functional){f._injectStyles=l;var d=f.render;f.render=function(t,e){return l.call(e),d(t,e)}}else{var m=f.beforeCreate;f.beforeCreate=m?[].concat(m,l):[l]}return{exports:t,options:f}}n.d(e,"a",(function(){return r}))},f1ba:function(t,e,n){"use strict";n.r(e);var r=n("a57b");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);var o,s,a,c,u=n("f0c5"),l=Object(u["a"])(r["default"],o,s,!1,null,null,null,!1,a,c);e["default"]=l.exports},f231:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("5a46"));function i(t){return t&&t.__esModule?t:{default:t}}var o={name:"UniNavBar",components:{statusBar:r.default},props:{title:{type:String,default:""},leftText:{type:String,default:""},rightText:{type:String,default:""},leftIcon:{type:String,default:""},rightIcon:{type:String,default:""},fixed:{type:[Boolean,String],default:!1},color:{type:String,default:"#000000"},backgroundColor:{type:String,default:"#FFFFFF"},statusBar:{type:[Boolean,String],default:!1},shadow:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!0}},mounted:function(){uni.report&&""!==this.title&&uni.report("title",this.title)},methods:{onClickLeft:function(){this.$emit("clickLeft")},onClickRight:function(){this.$emit("clickRight")},onClickTitle:function(){this.$emit("clickTitle")}}};e.default=o},f4e4:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n("41b6");function i(t){return c(t)||a(t)||s(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function a(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function c(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={name:"uniTransition",props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:function(){return"fade"}},duration:{type:Number,default:300},styles:{type:Object,default:function(){return{}}},customClass:{type:String,default:""}},data:function(){return{isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}},watch:{show:{handler:function(t){t?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject:function(){var t=f(f({},this.styles),{},{"transition-duration":this.duration/1e3+"s"}),e="";for(var n in t){var r=this.toLine(n);e+=r+":"+t[n]+";"}return e},transformStyles:function(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created:function(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.duration&&(this.durationTime=t.duration),this.animation=(0,r.createAnimation)(Object.assign(this.config,t))},onClick:function(){this.$emit("click",{detail:this.isShow})},step:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.animation){for(var r in e)try{var o;if("object"===typeof e[r])(o=this.animation)[r].apply(o,i(e[r]));else this.animation[r](e[r])}catch(s){t("error","\u65b9\u6cd5 ".concat(r," \u4e0d\u5b58\u5728")," at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:138")}return this.animation.step(n),this}},run:function(t){this.animation&&this.animation.run(t)},open:function(){var t=this;clearTimeout(this.timer),this.transform="",this.isShow=!0;var e=this.styleInit(!1),n=e.opacity,i=e.transform;"undefined"!==typeof n&&(this.opacity=n),this.transform=i,this.$nextTick((function(){t.timer=setTimeout((function(){t.animation=(0,r.createAnimation)(t.config,t),t.tranfromInit(!1).step(),t.animation.run(),t.$emit("change",{detail:t.isShow})}),20)}))},close:function(t){var e=this;this.animation&&this.tranfromInit(!0).step().run((function(){e.isShow=!1,e.animationData=null,e.animation=null;var t=e.styleInit(!1),n=t.opacity,r=t.transform;e.opacity=n||1,e.transform=r,e.$emit("change",{detail:e.isShow})}))},styleInit:function(t){var e=this,n={transform:""},r=function(t,r){"fade"===r?n.opacity=e.animationType(t)[r]:n.transform+=e.animationType(t)[r]+" "};return"string"===typeof this.modeClass?r(t,this.modeClass):this.modeClass.forEach((function(e){r(t,e)})),n},tranfromInit:function(t){var e=this,n=function(t,n){var r=null;"fade"===n?r=t?0:1:(r=t?"-100%":"0","zoom-in"===n&&(r=t?.8:1),"zoom-out"===n&&(r=t?1.2:1),"slide-right"===n&&(r=t?"100%":"0"),"slide-bottom"===n&&(r=t?"100%":"0")),e.animation[e.animationMode()[n]](r)};return"string"===typeof this.modeClass?n(t,this.modeClass):this.modeClass.forEach((function(e){n(t,e)})),this.animation},animationType:function(t){return{fade:t?1:0,"slide-top":"translateY(".concat(t?"0":"-100%",")"),"slide-right":"translateX(".concat(t?"0":"100%",")"),"slide-bottom":"translateY(".concat(t?"0":"100%",")"),"slide-left":"translateX(".concat(t?"0":"-100%",")"),"zoom-in":"scaleX(".concat(t?1:.8,") scaleY(").concat(t?1:.8,")"),"zoom-out":"scaleX(".concat(t?1:1.2,") scaleY(").concat(t?1:1.2,")")}},animationMode:function(){return{fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}},toLine:function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}}};e.default=h}).call(this,n("0de9")["default"])},fb94:function(t,e,n){"use strict";n("d41c");var r=o(n("8bbf")),i=o(n("f1ba"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}r.default.config.productionTip=!1,i.default.mpType="app";var u=new r.default(a({},i.default));u.$mount()},fd82:function(t,e,n){(function(e,n,r){var i;(function(e){t.exports=e()})((function(){var t;return function(){function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){var u="function"==typeof i&&i;if(!c&&u)return i(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var f=n[a]={exports:{}};e[a][0].call(f.exports,(function(t){var n=e[a][1][t];return o(n||t)}),f,f.exports,t,e,n,r)}return n[a].exports}for(var s="function"==typeof i&&i,a=0;a<r.length;a++)o(r[a]);return o}return t}()({1:[function(t,n,r){(function(e,r){"use strict";var i=t("events"),o=t("./store"),s=t("mqtt-packet"),a=t("readable-stream").Writable,c=t("inherits"),u=t("reinterval"),l=t("./validations"),f=t("xtend"),p=r.setImmediate||function(t){e.nextTick(t)},h={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},d={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function m(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function _(t,e,n){t.emit("packetsend",e);var r=s.writeToStream(e,t.stream,t.options);!r&&n?t.stream.once("drain",n):n&&n()}function g(t){t&&Object.keys(t).forEach((function(e){"function"===typeof t[e].cb&&(t[e].cb(new Error("Connection closed")),delete t[e])}))}function v(t){t&&Object.keys(t).forEach((function(e){t[e].volatile&&"function"===typeof t[e].cb&&(t[e].cb(new Error("Connection closed")),delete t[e])}))}function b(t,e,n,r){t.outgoingStore.put(e,(function(i){if(i)return n&&n(i);r(),_(t,e,n)}))}function y(){}function w(t,e){var n,r=this;if(!(this instanceof w))return new w(t,e);for(n in this.options=e||{},h)"undefined"===typeof this.options[n]?this.options[n]=h[n]:this.options[n]=e[n];this.options.clientId="string"===typeof e.clientId?e.clientId:m(),this.options.customHandleAcks=5===e.protocolVersion&&e.customHandleAcks?e.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=t,this.outgoingStore=e.outgoingStore||new o,this.incomingStore=e.incomingStore||new o,this.queueQoSZero=void 0===e.queueQoSZero||e.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("close",(function(){this.connected=!1,clearTimeout(this.connackTimer)})),this.on("connect",(function(){var t=this.queue;function e(){var n=t.shift(),i=null;n&&(i=n.packet,r._sendPacket(i,(function(t){n.cb&&n.cb(t),e()})))}e()})),this.on("close",(function(){null!==r.pingTimer&&(r.pingTimer.clear(),r.pingTimer=null)})),this.on("close",this._setupReconnect),i.EventEmitter.call(this),this._setupStream()}c(w,i.EventEmitter),w.prototype._setupStream=function(){var t,n=this,r=new a,i=s.parser(this.options),o=null,c=[];function u(){if(c.length)e.nextTick(l);else{var t=o;o=null,t()}}function l(){var t=c.shift();if(t)n._handlePacket(t,u);else{var e=o;o=null,e&&e()}}if(this._clearReconnect(),this.stream=this.streamBuilder(this),i.on("packet",(function(t){c.push(t)})),r._write=function(t,e,n){o=n,i.parse(t),l()},this.stream.pipe(r),this.stream.on("error",y),this.stream.on("close",(function(){v(n.outgoing),n.emit("close")})),t=Object.create(this.options),t.cmd="connect",_(this,t),i.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.emit("error",new Error("Packet has no Authentication Method")),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"===typeof this.options.authPacket){var p=f({cmd:"auth",reasonCode:0},this.options.authPacket);_(this,p)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){n._cleanUp(!0)}),this.options.connectTimeout)},w.prototype._handlePacket=function(t,e){var n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSize<t.length)return this.emit("error",new Error("exceeding packets size "+t.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(this.emit("packetreceive",t),t.cmd){case"publish":this._handlePublish(t,e);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(t),e();break;case"pubrel":this._handlePubrel(t,e);break;case"connack":this._handleConnack(t),e();break;case"pingresp":this._handlePingresp(t),e();break;case"disconnect":this._handleDisconnect(t),e();break;default:break}},w.prototype._checkDisconnecting=function(t){return this.disconnecting&&(t?t(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},w.prototype.publish=function(t,e,n,r){var i,o=this.options;"function"===typeof n&&(r=n,n=null);var s={qos:0,retain:!1,dup:!1};if(n=f(s,n),this._checkDisconnecting(r))return this;switch(i={cmd:"publish",topic:t,payload:e,qos:n.qos,retain:n.retain,messageId:this._nextId(),dup:n.dup},5===o.protocolVersion&&(i.properties=n.properties,(!o.properties&&i.properties&&i.properties.topicAlias||n.properties&&o.properties&&(n.properties.topicAlias&&o.properties.topicAliasMaximum&&n.properties.topicAlias>o.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&n.properties.topicAlias))&&delete i.properties.topicAlias),n.qos){case 1:case 2:this.outgoing[i.messageId]={volatile:!1,cb:r||y},this._storeProcessing?(this._packetIdsDuringStoreProcessing[i.messageId]=!1,this._storePacket(i,void 0,n.cbStorePut)):this._sendPacket(i,void 0,n.cbStorePut);break;default:this._storeProcessing?this._storePacket(i,r,n.cbStorePut):this._sendPacket(i,r,n.cbStorePut);break}return this},w.prototype.subscribe=function(){for(var t,e=new Array(arguments.length),n=0;n<arguments.length;n++)e[n]=arguments[n];var r,i=[],o=e.shift(),s=o.resubscribe,a=e.pop()||y,c=e.pop(),u=this,h=this.options.protocolVersion;if(delete o.resubscribe,"string"===typeof o&&(o=[o]),"function"!==typeof a&&(c=a,a=y),r=l.validateTopics(o),null!==r)return p(a,new Error("Invalid topic "+r)),this;if(this._checkDisconnecting(a))return this;var d={qos:0};if(5===h&&(d.nl=!1,d.rap=!1,d.rh=0),c=f(d,c),Array.isArray(o)?o.forEach((function(t){if(!u._resubscribeTopics.hasOwnProperty(t)||u._resubscribeTopics[t].qos<c.qos||s){var e={topic:t,qos:c.qos};5===h&&(e.nl=c.nl,e.rap=c.rap,e.rh=c.rh,e.properties=c.properties),i.push(e)}})):Object.keys(o).forEach((function(t){if(!u._resubscribeTopics.hasOwnProperty(t)||u._resubscribeTopics[t].qos<o[t].qos||s){var e={topic:t,qos:o[t].qos};5===h&&(e.nl=o[t].nl,e.rap=o[t].rap,e.rh=o[t].rh,e.properties=c.properties),i.push(e)}})),t={cmd:"subscribe",subscriptions:i,qos:1,retain:!1,dup:!1,messageId:this._nextId()},c.properties&&(t.properties=c.properties),i.length){if(this.options.resubscribe){var m=[];i.forEach((function(t){if(u.options.reconnectPeriod>0){var e={qos:t.qos};5===h&&(e.nl=t.nl||!1,e.rap=t.rap||!1,e.rh=t.rh||0,e.properties=t.properties),u._resubscribeTopics[t.topic]=e,m.push(t.topic)}})),u.messageIdToTopic[t.messageId]=m}return this.outgoing[t.messageId]={volatile:!0,cb:function(t,e){if(!t)for(var n=e.granted,r=0;r<n.length;r+=1)i[r].qos=n[r];a(t,i)}},this._sendPacket(t),this}a(null,[])},w.prototype.unsubscribe=function(){for(var t={cmd:"unsubscribe",qos:1,messageId:this._nextId()},e=this,n=new Array(arguments.length),r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.shift(),o=n.pop()||y,s=n.pop();return"string"===typeof i&&(i=[i]),"function"!==typeof o&&(s=o,o=y),this._checkDisconnecting(o)||("string"===typeof i?t.unsubscriptions=[i]:"object"===typeof i&&i.length&&(t.unsubscriptions=i),this.options.resubscribe&&t.unsubscriptions.forEach((function(t){delete e._resubscribeTopics[t]})),"object"===typeof s&&s.properties&&(t.properties=s.properties),this.outgoing[t.messageId]={volatile:!0,cb:o},this._sendPacket(t)),this},w.prototype.end=function(){var t=this,e=arguments[0],n=arguments[1],r=arguments[2];function i(){t.disconnected=!0,t.incomingStore.close((function(){t.outgoingStore.close((function(){r&&r.apply(null,arguments),t.emit("end")}))})),t._deferredReconnect&&t._deferredReconnect()}function o(){t._cleanUp(e,p.bind(null,i),n)}return null!=e&&"boolean"===typeof e||(r=n||y,n=e,e=!1,"object"!==typeof n&&(r=n,n=null,"function"!==typeof r&&(r=y))),"object"!==typeof n&&(r=n,n=null),r=r||y,this.disconnecting||(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?this.once("outgoingEmpty",setTimeout.bind(null,o,10)):o()),this},w.prototype.removeOutgoingMessage=function(t){var e=this.outgoing[t]?this.outgoing[t].cb:null;return delete this.outgoing[t],this.outgoingStore.del({messageId:t},(function(){e(new Error("Message removed"))})),this},w.prototype.reconnect=function(t){var e=this,n=function(){t?(e.options.incomingStore=t.incomingStore,e.options.outgoingStore=t.outgoingStore):(e.options.incomingStore=null,e.options.outgoingStore=null),e.incomingStore=e.options.incomingStore||new o,e.outgoingStore=e.options.outgoingStore||new o,e.disconnecting=!1,e.disconnected=!1,e._deferredReconnect=null,e._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},w.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},w.prototype._setupReconnect=function(){var t=this;!t.disconnecting&&!t.reconnectTimer&&t.options.reconnectPeriod>0&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),t.reconnectTimer=setInterval((function(){t._reconnect()}),t.options.reconnectPeriod))},w.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},w.prototype._cleanUp=function(t,e){var n=arguments[2];if(e&&this.stream.on("close",e),t)0===this.options.reconnectPeriod&&this.options.clean&&g(this.outgoing),this.stream.destroy();else{var r=f({cmd:"disconnect"},n);this._sendPacket(r,p.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),e&&!this.connected&&(this.stream.removeListener("close",e),e())},w.prototype._sendPacket=function(t,e,n){if(n=n||y,this.connected){switch(this._shiftPingInterval(),t.cmd){case"publish":break;case"pubrel":return void b(this,t,e,n);default:return void _(this,t,e)}switch(t.qos){case 2:case 1:b(this,t,e,n);break;case 0:default:_(this,t,e);break}}else this._storePacket(t,e,n)},w.prototype._storePacket=function(t,e,n){n=n||y,0===(t.qos||0)&&this.queueQoSZero||"publish"!==t.cmd?this.queue.push({packet:t,cb:e}):t.qos>0?(e=this.outgoing[t.messageId]?this.outgoing[t.messageId].cb:null,this.outgoingStore.put(t,(function(t){if(t)return e&&e(t);n()}))):e&&e(new Error("No connection to broker"))},w.prototype._setupPingTimer=function(){var t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=u((function(){t._checkPing()}),1e3*this.options.keepalive))},w.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},w.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},w.prototype._handlePingresp=function(){this.pingResp=!0},w.prototype._handleConnack=function(t){var e=this.options,n=e.protocolVersion,r=5===n?t.reasonCode:t.returnCode;if(clearTimeout(this.connackTimer),t.properties&&(t.properties.topicAliasMaximum&&(e.properties||(e.properties={}),e.properties.topicAliasMaximum=t.properties.topicAliasMaximum),t.properties.serverKeepAlive&&e.keepalive&&(e.keepalive=t.properties.serverKeepAlive,this._shiftPingInterval()),t.properties.maximumPacketSize&&(e.properties||(e.properties={}),e.properties.maximumPacketSize=t.properties.maximumPacketSize)),0===r)this.reconnecting=!1,this._onConnect(t);else if(r>0){var i=new Error("Connection refused: "+d[r]);i.code=r,this.emit("error",i)}},w.prototype._handlePublish=function(t,e){e="undefined"!==typeof e?e:y;var n=t.topic.toString(),r=t.payload,i=t.qos,o=t.messageId,s=this,a=this.options,c=[0,16,128,131,135,144,145,151,153];switch(i){case 2:a.customHandleAcks(n,r,t,(function(n,r){return n instanceof Error||(r=n,n=null),n?s.emit("error",n):-1===c.indexOf(r)?s.emit("error",new Error("Wrong reason code for pubrec")):void(r?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:r},e):s.incomingStore.put(t,(function(){s._sendPacket({cmd:"pubrec",messageId:o},e)})))}));break;case 1:a.customHandleAcks(n,r,t,(function(i,a){return i instanceof Error||(a=i,i=null),i?s.emit("error",i):-1===c.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",n,r,t),void s.handleMessage(t,(function(t){if(t)return e&&e(t);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},e)})))}));break;case 0:this.emit("message",n,r,t),this.handleMessage(t,e);break;default:break}},w.prototype.handleMessage=function(t,e){e()},w.prototype._handleAck=function(t){var e,n=t.messageId,r=t.cmd,i=null,o=this.outgoing[n]?this.outgoing[n].cb:null,s=this;if(o){switch(r){case"pubcomp":case"puback":var a=t.reasonCode;a&&a>0&&16!==a&&(e=new Error("Publish error: "+d[a]),e.code=a,o(e,t)),delete this.outgoing[n],this.outgoingStore.del(t,o);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:n};var c=t.reasonCode;c&&c>0&&16!==c?(e=new Error("Publish error: "+d[c]),e.code=c,o(e,t)):this._sendPacket(i);break;case"suback":delete this.outgoing[n];for(var u=0;u<t.granted.length;u++)if(0!==(128&t.granted[u])){var l=this.messageIdToTopic[n];l&&l.forEach((function(t){delete s._resubscribeTopics[t]}))}o(null,t);break;case"unsuback":delete this.outgoing[n],o(null);break;default:s.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}},w.prototype._handlePubrel=function(t,e){e="undefined"!==typeof e?e:y;var n=t.messageId,r=this,i={cmd:"pubcomp",messageId:n};r.incomingStore.get(t,(function(t,n){t?r._sendPacket(i,e):(r.emit("message",n.topic,n.payload,n),r.handleMessage(n,(function(t){if(t)return e(t);r.incomingStore.del(n,y),r._sendPacket(i,e)})))}))},w.prototype._handleDisconnect=function(t){this.emit("disconnect",t)},w.prototype._nextId=function(){var t=this.nextId++;return 65536===this.nextId&&(this.nextId=1),t},w.prototype.getLastMessageId=function(){return 1===this.nextId?65535:this.nextId-1},w.prototype._resubscribe=function(t){var e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||5===this.options.protocolVersion&&!t.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion)for(var n=0;n<e.length;n++){var r={};r[e[n]]=this._resubscribeTopics[e[n]],r.resubscribe=!0,this.subscribe(r,{properties:r[e[n]].properties})}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},w.prototype._onConnect=function(t){if(this.disconnected)this.emit("connect",t);else{var e=this;this._setupPingTimer(),this._resubscribe(t),this.connected=!0,n()}function n(){var r=e.outgoingStore.createStream();function i(){e._storeProcessing=!1,e._packetIdsDuringStoreProcessing={}}function o(){r.destroy(),r=null,i()}function s(){if(r){e._storeProcessing=!0;var t,n=r.read(1);n?e._packetIdsDuringStoreProcessing[n.messageId]?s():e.disconnecting||e.reconnectTimer?r.destroy&&r.destroy():(t=e.outgoing[n.messageId]?e.outgoing[n.messageId].cb:null,e.outgoing[n.messageId]={volatile:!1,cb:function(e,n){t&&t(e,n),s()}},e._packetIdsDuringStoreProcessing[n.messageId]=!0,e._sendPacket(n)):r.once("readable",s)}}e.once("close",o),r.on("error",(function(t){i(),e.removeListener("close",o),e.emit("error",t)})),r.on("end",(function(){var r=!0;for(var s in e._packetIdsDuringStoreProcessing)if(!e._packetIdsDuringStoreProcessing[s]){r=!1;break}r?(i(),e.removeListener("close",o),e.emit("connect",t)):n()})),s()}},n.exports=w}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./store":7,"./validations":8,_process:92,events:13,inherits:80,"mqtt-packet":84,"readable-stream":108,reinterval:109,xtend:121}],2:[function(t,e,n){(function(n){"use strict";var r,i,o,s=t("readable-stream").Transform,a=t("duplexify"),c=t("base64-js"),u=!1;function l(){var t=new s;return t._write=function(t,e,n){r.sendSocketMessage({data:t.buffer,success:function(){n()},fail:function(){n(new Error)}})},t._flush=function(t){r.closeSocket({success:function(){t()}})},t}function f(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function p(t,e){var n="alis"===t.protocol?"wss":"ws",r=n+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(r=n+"://"+t.hostname+":"+t.port+t.path),"function"===typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function h(){u||(u=!0,r.onSocketOpen((function(){o.setReadable(i),o.setWritable(i),o.emit("connect")})),r.onSocketMessage((function(t){if("string"===typeof t.data){var e=c.toByteArray(t.data),r=n.from(e);i.push(r)}else{var o=new FileReader;o.addEventListener("load",(function(){var t=o.result;t=t instanceof ArrayBuffer?n.from(t):n.from(t,"utf8"),i.push(t)})),o.readAsArrayBuffer(t.data)}})),r.onSocketClose((function(){o.end(),o.destroy()})),r.onSocketError((function(t){o.destroy(t)})))}function d(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");var n="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";f(e);var s=p(e,t);return r=e.my,r.connectSocket({url:s,protocols:n}),i=l(),o=a.obj(),h(),o}e.exports=d}).call(this,t("buffer").Buffer)},{"base64-js":10,buffer:12,duplexify:17,"readable-stream":108}],3:[function(t,e,n){"use strict";var r=t("net");function i(t,e){var n,i;return e.port=e.port||1883,e.hostname=e.hostname||e.host||"localhost",n=e.port,i=e.hostname,r.createConnection(n,i)}e.exports=i},{net:11}],4:[function(t,e,n){"use strict";var r=t("tls");function i(t,e){var n;function i(r){e.rejectUnauthorized&&t.emit("error",r),n.end()}return e.port=e.port||8883,e.host=e.hostname||e.host||"localhost",e.rejectUnauthorized=!1!==e.rejectUnauthorized,delete e.path,n=r.connect(e),n.on("secureConnect",(function(){e.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",i)})),n.on("error",i),n}e.exports=i},{tls:11}],5:[function(t,e,n){(function(n){"use strict";var r=t("websocket-stream"),i=t("url"),o=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],s="browser"===n.title;function a(t,e){var n=t.protocol+"://"+t.hostname+":"+t.port+t.path;return"function"===typeof t.transformWsUrl&&(n=t.transformWsUrl(n,t,e)),n}function c(t){t.hostname||(t.hostname="localhost"),t.port||("wss"===t.protocol?t.port=443:t.port=80),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={}),s||"wss"!==t.protocol||o.forEach((function(e){t.hasOwnProperty(e)&&!t.wsOptions.hasOwnProperty(e)&&(t.wsOptions[e]=t[e])}))}function u(t,e){var n="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";c(e);var i=a(e,t);return r(i,[n],e.wsOptions)}function l(t,e){return u(t,e)}function f(t,e){if(e.hostname||(e.hostname=e.host),!e.hostname){if("undefined"===typeof document)throw new Error("Could not determine host. Specify host manually.");var n=i.parse(document.URL);e.hostname=n.hostname,e.port||(e.port=n.port)}return u(t,e)}e.exports=s?f:l}).call(this,t("_process"))},{_process:92,url:113,"websocket-stream":118}],6:[function(t,e,r){(function(r,i){"use strict";var o,s,a,c=t("readable-stream").Transform,u=t("duplexify");function l(){var t=new c;return t._write=function(t,e,n){o.send({data:t.buffer,success:function(){n()},fail:function(t){n(new Error(t))}})},t._flush=function(t){o.close({success:function(){t()}})},t}function f(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function p(t,e){var n="wxs"===t.protocol?"wss":"ws",r=n+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(r=n+"://"+t.hostname+":"+t.port+t.path),"function"===typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function h(){o.onOpen((function(){a.setReadable(s),a.setWritable(s),a.emit("connect")})),o.onMessage((function(t){var e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),s.push(e)})),o.onClose((function(){a.end(),a.destroy()})),o.onError((function(t){a.destroy(new Error(t.errMsg))}))}function d(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");var i="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";f(e);var c=p(e,t);o=n.connectSocket({url:c,protocols:i}),s=l(),a=u.obj(),a._destroy=function(t,e){o.close({success:function(){e&&e(t)}})};var d=a.destroy;return a.destroy=function(){a.destroy=d;var t=this;r.nextTick((function(){o.close({fail:function(){t._destroy(new Error)}})}))}.bind(a),h(),a}e.exports=d}).call(this,t("_process"),t("buffer").Buffer)},{_process:92,buffer:12,duplexify:17,"readable-stream":108}],7:[function(t,e,n){(function(n){"use strict";var r=t("xtend"),i=t("readable-stream").Readable,o={objectMode:!0},s={clean:!0},a=t("es6-map");function c(t){if(!(this instanceof c))return new c(t);this.options=t||{},this.options=r(s,t),this._inflights=new a}c.prototype.put=function(t,e){return this._inflights.set(t.messageId,t),e&&e(),this},c.prototype.createStream=function(){var t=new i(o),e=!1,r=[],s=0;return this._inflights.forEach((function(t,e){r.push(t)})),t._read=function(){!e&&s<r.length?this.push(r[s++]):this.push(null)},t.destroy=function(){if(!e){var t=this;e=!0,n.nextTick((function(){t.emit("close")}))}},t},c.prototype.del=function(t,e){return t=this._inflights.get(t.messageId),t?(this._inflights.delete(t.messageId),e(null,t)):e&&e(new Error("missing packet")),this},c.prototype.get=function(t,e){return t=this._inflights.get(t.messageId),t?e(null,t):e&&e(new Error("missing packet")),this},c.prototype.close=function(t){this.options.clean&&(this._inflights=null),t&&t()},e.exports=c}).call(this,t("_process"))},{_process:92,"es6-map":67,"readable-stream":108,xtend:121}],8:[function(t,e,n){"use strict";function r(t){for(var e=t.split("/"),n=0;n<e.length;n++)if("+"!==e[n]){if("#"===e[n])return n===e.length-1;if(-1!==e[n].indexOf("+")||-1!==e[n].indexOf("#"))return!1}return!0}function i(t){if(0===t.length)return"empty_topic_list";for(var e=0;e<t.length;e++)if(!r(t[e]))return t[e];return null}e.exports={validateTopics:i}},{}],9:[function(t,e,n){(function(n){"use strict";var r=t("../client"),i=t("../store"),o=t("url"),s=t("xtend"),a={};function c(t){var e;t.auth&&(e=t.auth.match(/^(.+):(.+)$/),e?(t.username=e[1],t.password=e[2]):t.username=t.auth)}function u(t,e){if("object"!==typeof t||e||(e=t,t=null),e=e||{},t){var n=o.parse(t,!0);if(null!=n.port&&(n.port=Number(n.port)),e=s(n,e),null===e.protocol)throw new Error("Missing protocol");e.protocol=e.protocol.replace(/:$/,"")}if(c(e),e.query&&"string"===typeof e.query.clientId&&(e.clientId=e.query.clientId),e.cert&&e.key){if(!e.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(e.protocol))switch(e.protocol){case"mqtt":e.protocol="mqtts";break;case"ws":e.protocol="wss";break;case"wx":e.protocol="wxs";break;case"ali":e.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+e.protocol+'"!')}}if(!a[e.protocol]){var i=-1!==["mqtts","wss"].indexOf(e.protocol);e.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(t,e){return(!i||e%2!==0)&&"function"===typeof a[t]}))[0]}if(!1===e.clean&&!e.clientId)throw new Error("Missing clientId for unclean clients");function u(t){return e.servers&&(t._reconnectCount&&t._reconnectCount!==e.servers.length||(t._reconnectCount=0),e.host=e.servers[t._reconnectCount].host,e.port=e.servers[t._reconnectCount].port,e.protocol=e.servers[t._reconnectCount].protocol?e.servers[t._reconnectCount].protocol:e.defaultProtocol,e.hostname=e.host,t._reconnectCount++),a[e.protocol](t,e)}return e.protocol&&(e.defaultProtocol=e.protocol),new r(u,e)}"browser"!==n.title?(a.mqtt=t("./tcp"),a.tcp=t("./tcp"),a.ssl=t("./tls"),a.tls=t("./tls"),a.mqtts=t("./tls")):(a.wx=t("./wx"),a.wxs=t("./wx"),a.ali=t("./ali"),a.alis=t("./ali")),a.ws=t("./ws"),a.wss=t("./ws"),e.exports=u,e.exports.connect=u,e.exports.MqttClient=r,e.exports.Store=i}).call(this,t("_process"))},{"../client":1,"../store":7,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:92,url:113,xtend:121}],10:[function(t,e,n){"use strict";n.byteLength=l,n.toByteArray=p,n.fromByteArray=m;for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function l(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r}function f(t,e,n){return 3*(e+n)/4-n}function p(t){for(var e,n=u(t),r=n[0],s=n[1],a=new o(f(t,r,s)),c=0,l=s>0?r-4:r,p=0;p<l;p+=4)e=i[t.charCodeAt(p)]<<18|i[t.charCodeAt(p+1)]<<12|i[t.charCodeAt(p+2)]<<6|i[t.charCodeAt(p+3)],a[c++]=e>>16&255,a[c++]=e>>8&255,a[c++]=255&e;return 2===s&&(e=i[t.charCodeAt(p)]<<2|i[t.charCodeAt(p+1)]>>4,a[c++]=255&e),1===s&&(e=i[t.charCodeAt(p)]<<10|i[t.charCodeAt(p+1)]<<4|i[t.charCodeAt(p+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e),a}function h(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function d(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(h(r));return i.join("")}function m(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(d(t,a,a+s>c?c:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],11:[function(t,e,n){},{}],12:[function(t,e,n){"use strict";var i=t("base64-js"),o=t("ieee754");n.Buffer=u,n.SlowBuffer=b,n.INSPECT_MAX_BYTES=50;var s=2147483647;function a(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(e){return!1}}function c(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=u.prototype,e}function u(t,e,n){if("number"===typeof t){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,n)}function l(t,e,n){if("string"===typeof t)return d(t,e);if(ArrayBuffer.isView(t))return m(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return _(t,e,n);if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);var i=g(t);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!==typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function p(t,e,n){return f(t),t<=0?c(t):void 0!==e?"string"===typeof n?c(t).fill(e,n):c(t).fill(e):c(t)}function h(t){return f(t),c(t<0?0:0|v(t))}function d(t,e){if("string"===typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|y(t,e),r=c(n),i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function m(t){for(var e=t.length<0?0:0|v(t.length),n=c(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function _(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),r.__proto__=u.prototype,r}function g(t){if(u.isBuffer(t)){var e=0|v(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!==typeof t.length||Z(t.length)?c(0):m(t):"Buffer"===t.type&&Array.isArray(t.data)?m(t.data):void 0}function v(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),u.alloc(+t)}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!==typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(t).length;default:if(i)return r?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function w(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return $(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function S(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function x(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Z(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:k(t,e,n,r,i);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):k(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function k(t,e,n,r,i){var o,s=1,a=t.length,c=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;o<a;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===c)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){for(var f=!0,p=0;p<c;p++)if(u(t,o+p)!==u(e,p)){f=!1;break}if(f)return o}return-1}function E(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=e.length;r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(Z(a))return s;t[n+s]=a}return s}function O(t,e,n,r){return G(K(e,t.length-n),t,n,r)}function I(t,e,n,r){return G(Q(e),t,n,r)}function j(t,e,n,r){return I(t,e,n,r)}function C(t,e,n,r){return G(J(e),t,n,r)}function T(t,e,n,r){return G(Y(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);var r=[],i=e;while(i<n){var o,s,a,c,u=t[i],l=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:o=t[i+1],128===(192&o)&&(c=(31&u)<<6|63&o,c>127&&(l=c));break;case 3:o=t[i+1],s=t[i+2],128===(192&o)&&128===(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s,c>2047&&(c<55296||c>57343)&&(l=c));break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a,c>65535&&c<1114112&&(l=c))}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return B(r)}n.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=a(),u.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||r("error","This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."," at utils/mqtt.min.js:1"),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),"undefined"!==typeof Symbol&&null!=Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(t,e,n){return l(t,e,n)},u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,u.alloc=function(t,e,n){return p(t,e,n)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(X(o,Uint8Array)&&(o=u.from(o)),!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)S(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)S(this,e,e+3),S(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)S(this,e,e+7),S(this,e+1,e+6),S(this,e+2,e+5),S(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?P(this,0,t):w.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,s=n-e,a=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return x(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return x(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"===typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return O(this,t,e,n);case"ascii":return I(this,t,e,n);case"latin1":case"binary":return j(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function B(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;while(r<e)n+=String.fromCharCode.apply(String,t.slice(r,r+=M));return n}function $(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function N(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function R(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=W(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function U(t,e,n){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function q(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,i){return e=+e,n>>>=0,i||q(t,e,n,4,34028234663852886e22,-34028234663852886e22),o.write(t,e,n,r,23,4),n+4}function V(t,e,n,r,i){return e=+e,n>>>=0,i||q(t,e,n,8,17976931348623157e292,-17976931348623157e292),o.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return r.__proto__=u.prototype,r},u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);var r=this[t],i=1,o=0;while(++o<e&&(i*=256))r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);var r=this[t+--e],i=1;while(e>0&&(i*=256))r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);var r=this[t],i=1,o=0;while(++o<e&&(i*=256))r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);var r=e,i=1,o=this[t+--r];while(r>0&&(i*=256))o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;D(this,t,e,n,i,0)}var o=1,s=0;this[e]=255&t;while(++s<n&&(o*=256))this[e+s]=t/o&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){var i=Math.pow(2,8*n)-1;D(this,t,e,n,i,0)}var o=n-1,s=1;this[e+o]=255&t;while(--o>=0&&(s*=256))this[e+o]=t/s&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;this[e]=255&t;while(++o<n&&(s*=256))t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);D(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;this[e+o]=255&t;while(--o>=0&&(s*=256))t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;if(this===t&&"function"===typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,n,r);else if(this===t&&n<e&&e<r)for(var o=i-1;o>=0;--o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},u.prototype.fill=function(t,e,n,r){if("string"===typeof t){if("string"===typeof e?(r=e,e=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:u.from(t,r),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var z=/[^+/0-9A-Za-z-_]/g;function H(t){if(t=t.split("=")[0],t=t.trim().replace(z,""),t.length<2)return"";while(t.length%4!==0)t+="=";return t}function W(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if(n=t.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Q(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Y(t,e){for(var n,r,i,o=[],s=0;s<t.length;++s){if((e-=2)<0)break;n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r)}return o}function J(t){return i.toByteArray(H(t))}function G(t,e,n,r){for(var i=0;i<r;++i){if(i+n>=e.length||i>=t.length)break;e[i+n]=t[i]}return i}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!==t}},{"base64-js":10,ieee754:79}],13:[function(t,e,n){var i=Object.create||E,o=Object.keys||O,s=Function.prototype.bind||I;function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var c,u=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),c=0===l.x}catch(j){c=!1}function f(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function p(t,e,n){if(e)t.call(n);else for(var r=t.length,i=x(t,r),o=0;o<r;++o)i[o].call(n)}function h(t,e,n,r){if(e)t.call(n,r);else for(var i=t.length,o=x(t,i),s=0;s<i;++s)o[s].call(n,r)}function d(t,e,n,r,i){if(e)t.call(n,r,i);else for(var o=t.length,s=x(t,o),a=0;a<o;++a)s[a].call(n,r,i)}function m(t,e,n,r,i,o){if(e)t.call(n,r,i,o);else for(var s=t.length,a=x(t,s),c=0;c<s;++c)a[c].call(n,r,i,o)}function _(t,e,n,r){if(e)t.apply(n,r);else for(var i=t.length,o=x(t,i),s=0;s<i;++s)o[s].apply(n,r)}function g(t,e,n,o){var s,a,c;if("function"!==typeof n)throw new TypeError('"listener" argument must be a function');if(a=t._events,a?(a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),c=a[e]):(a=t._events=i(null),t._eventsCount=0),c){if("function"===typeof c?c=a[e]=o?[n,c]:[c,n]:o?c.unshift(n):c.push(n),!c.warned&&(s=f(t),s&&s>0&&c.length>s)){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=c.length,"object"===typeof console&&console.warn&&r("warn","%s: %s",u.name,u.message," at utils/mqtt.min.js:1")}}else c=a[e]=n,++t._eventsCount;return t}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function b(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=s.call(v,r);return i.listener=n,r.wrapFn=i,i}function y(t,e,n){var r=t._events;if(!r)return[];var i=r[e];return i?"function"===typeof i?n?[i.listener||i]:[i]:n?k(i):x(i,i.length):[]}function w(t){var e=this._events;if(e){var n=e[t];if("function"===typeof n)return 1;if(n)return n.length}return 0}function S(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}function x(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function k(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function E(t){var e=function(){};return e.prototype=t,new e}function O(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return n}function I(t){var e=this;return function(){return e.apply(t,arguments)}}c?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!==typeof t||t<0||t!==t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):a.defaultMaxListeners=u,a.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return f(this)},a.prototype.emit=function(t){var e,n,r,i,o,s,a="error"===t;if(s=this._events,s)a=a&&null==s.error;else if(!a)return!1;if(a){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var c=new Error('Unhandled "error" event. ('+e+")");throw c.context=e,c}if(n=s[t],!n)return!1;var u="function"===typeof n;switch(r=arguments.length,r){case 1:p(n,u,this);break;case 2:h(n,u,this,arguments[1]);break;case 3:d(n,u,this,arguments[1],arguments[2]);break;case 4:m(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];_(n,u,this,i)}return!0},a.prototype.addListener=function(t,e){return g(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return g(this,t,e,!0)},a.prototype.once=function(t,e){if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,b(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,b(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,o,s,a;if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');if(r=this._events,!r)return this;if(n=r[t],!n)return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=i(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!==typeof n){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===e||n[s].listener===e){a=n[s].listener,o=s;break}if(o<0)return this;0===o?n.shift():S(n,o),1===n.length&&(r[t]=n[0]),r.removeListener&&this.emit("removeListener",t,a||e)}return this},a.prototype.removeAllListeners=function(t){var e,n,r;if(n=this._events,!n)return this;if(!n.removeListener)return 0===arguments.length?(this._events=i(null),this._eventsCount=0):n[t]&&(0===--this._eventsCount?this._events=i(null):delete n[t]),this;if(0===arguments.length){var s,a=o(n);for(r=0;r<a.length;++r)s=a[r],"removeListener"!==s&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0,this}if(e=n[t],"function"===typeof e)this.removeListener(t,e);else if(e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return y(this,t,!0)},a.prototype.rawListeners=function(t){return y(this,t,!1)},a.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):w.call(t,e)},a.prototype.listenerCount=w,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],14:[function(t,e,n){(function(t){function e(t){return Array.isArray?Array.isArray(t):"[object Array]"===_(t)}function r(t){return"boolean"===typeof t}function i(t){return null===t}function o(t){return null==t}function s(t){return"number"===typeof t}function a(t){return"string"===typeof t}function c(t){return"symbol"===typeof t}function u(t){return void 0===t}function l(t){return"[object RegExp]"===_(t)}function f(t){return"object"===typeof t&&null!==t}function p(t){return"[object Date]"===_(t)}function h(t){return"[object Error]"===_(t)||t instanceof Error}function d(t){return"function"===typeof t}function m(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function _(t){return Object.prototype.toString.call(t)}n.isArray=e,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=o,n.isNumber=s,n.isString=a,n.isSymbol=c,n.isUndefined=u,n.isRegExp=l,n.isObject=f,n.isDate=p,n.isError=h,n.isFunction=d,n.isPrimitive=m,n.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":81}],15:[function(t,e,n){"use strict";var r,i=t("es5-ext/object/copy"),o=t("es5-ext/object/normalize-options"),s=t("es5-ext/object/valid-callable"),a=t("es5-ext/object/map"),c=t("es5-ext/object/valid-callable"),u=t("es5-ext/object/valid-value"),l=Function.prototype.bind,f=Object.defineProperty,p=Object.prototype.hasOwnProperty;r=function(t,e,n){var r,o=u(e)&&c(e.value);return r=i(e),delete r.writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&p.call(this,t)?o:(e.value=l.call(o,n.resolveContext?n.resolveContext(this):this),f(this,t,e),this[t])},r},e.exports=function(t){var e=o(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,(function(t,n){return r(n,t,e)}))}},{"es5-ext/object/copy":39,"es5-ext/object/map":48,"es5-ext/object/normalize-options":49,"es5-ext/object/valid-callable":54,"es5-ext/object/valid-value":55}],16:[function(t,e,n){"use strict";var r,i=t("es5-ext/object/assign"),o=t("es5-ext/object/normalize-options"),s=t("es5-ext/object/is-callable"),a=t("es5-ext/string/#/contains");r=e.exports=function(t,e){var n,r,s,c,u;return arguments.length<2||"string"!==typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(n=s=!0,r=!1):(n=a.call(t,"c"),r=a.call(t,"e"),s=a.call(t,"w")),u={value:e,configurable:n,enumerable:r,writable:s},c?i(o(c),u):u},r.gs=function(t,e,n){var r,c,u,l;return"string"!==typeof t?(u=n,n=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==n?n=void 0:s(n)||(u=n,n=void 0):(u=e,e=n=void 0),null==t?(r=!0,c=!1):(r=a.call(t,"c"),c=a.call(t,"e")),l={get:e,set:n,configurable:r,enumerable:c},u?i(o(u),l):l}},{"es5-ext/object/assign":36,"es5-ext/object/is-callable":42,"es5-ext/object/normalize-options":49,"es5-ext/string/#/contains":56}],17:[function(t,e,n){(function(n,r){var i=t("readable-stream"),o=t("end-of-stream"),s=t("inherits"),a=t("stream-shift"),c=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),u=function(t,e){t._corked?t.once("uncork",e):e()},l=function(t,e){t._autoDestroy&&t.destroy(e)},f=function(t,e){return function(n){n?l(t,"premature close"===n.message?null:n):e&&!t._ended&&t.end()}},p=function(t,e){return t?t._writableState&&t._writableState.finished?e():t._writableState?t.end(e):(t.end(),void e()):e()},h=function(t){return new i.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},d=function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);i.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),n&&this.setReadable(n)};s(d,i.Duplex),d.obj=function(t,e,n){return n||(n={}),n.objectMode=!0,n.highWaterMark=16,new d(t,e,n)},d.prototype.cork=function(){1===++this._corked&&this.emit("cork")},d.prototype.uncork=function(){this._corked&&0===--this._corked&&this.emit("uncork")},d.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed)t&&t.destroy&&t.destroy();else if(null!==t&&!1!==t){var e=this,r=o(t,{writable:!0,readable:!1},f(this,this._forwardEnd)),i=function(){var t=e._ondrain;e._ondrain=null,t&&t()},s=function(){e._writable.removeListener("drain",i),r()};this._unwrite&&n.nextTick(i),this._writable=t,this._writable.on("drain",i),this._unwrite=s,this.uncork()}else this.end()},d.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed)t&&t.destroy&&t.destroy();else{if(null===t||!1===t)return this.push(null),void this.resume();var e=this,n=o(t,{writable:!1,readable:!0},f(this)),r=function(){e._forward()},i=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",r),e._readable2.removeListener("end",i),n()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:h(t),this._readable2.on("readable",r),this._readable2.on("end",i),this._unread=s,this._forward()}},d.prototype._read=function(){this._drained=!0,this._forward()},d.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var t;this._forwarding=!0;while(this._drained&&null!==(t=a(this._readable2)))this.destroyed||(this._drained=this.push(t));this._forwarding=!1}},d.prototype.destroy=function(t){if(!this.destroyed){this.destroyed=!0;var e=this;n.nextTick((function(){e._destroy(t)}))}},d.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},d.prototype._write=function(t,e,n){return this.destroyed?n():this._corked?u(this,this._write.bind(this,t,e,n)):t===c?this._finish(n):this._writable?void(!1===this._writable.write(t)?this._ondrain=n:n()):n()},d.prototype._finish=function(t){var e=this;this.emit("preend"),u(this,(function(){p(e._forwardEnd&&e._writable,(function(){!1===e._writableState.prefinished&&(e._writableState.prefinished=!0),e.emit("prefinish"),u(e,t)}))}))},d.prototype.end=function(t,e,n){return"function"===typeof t?this.end(null,null,t):"function"===typeof e?this.end(t,null,e):(this._ended=!0,t&&this.write(t),this._writableState.ending||this.write(c),i.Writable.prototype.end.call(this,n))},e.exports=d}).call(this,t("_process"),t("buffer").Buffer)},{_process:92,buffer:12,"end-of-stream":18,inherits:80,"readable-stream":108,"stream-shift":111}],18:[function(t,e,n){var r=t("once"),i=function(){},o=function(t){return t.setHeader&&"function"===typeof t.abort},s=function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length},a=function t(e,n,a){if("function"===typeof n)return t(e,null,n);n||(n={}),a=r(a||i);var c=e._writableState,u=e._readableState,l=n.readable||!1!==n.readable&&e.readable,f=n.writable||!1!==n.writable&&e.writable,p=function(){e.writable||h()},h=function(){f=!1,l||a.call(e)},d=function(){l=!1,f||a.call(e)},m=function(t){a.call(e,t?new Error("exited with error code: "+t):null)},_=function(t){a.call(e,t)},g=function(){return(!l||u&&u.ended)&&(!f||c&&c.ended)?void 0:a.call(e,new Error("premature close"))},v=function(){e.req.on("finish",h)};return o(e)?(e.on("complete",h),e.on("abort",g),e.req?v():e.on("request",v)):f&&!c&&(e.on("end",p),e.on("close",p)),s(e)&&e.on("exit",m),e.on("end",d),e.on("finish",h),!1!==n.error&&e.on("error",_),e.on("close",g),function(){e.removeListener("complete",h),e.removeListener("abort",g),e.removeListener("request",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",h),e.removeListener("exit",m),e.removeListener("end",d),e.removeListener("error",_),e.removeListener("close",g)}};e.exports=a},{once:90}],19:[function(t,e,n){"use strict";var r=t("../../object/valid-value");e.exports=function(){return r(this).length=0,this}},{"../../object/valid-value":55}],20:[function(t,e,n){"use strict";var r=t("../../number/is-nan"),i=t("../../number/to-pos-integer"),o=t("../../object/valid-value"),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,c=Math.abs,u=Math.floor;e.exports=function(t){var e,n,l,f;if(!r(t))return s.apply(this,arguments);for(n=i(o(this).length),l=arguments[1],l=isNaN(l)?0:l>=0?u(l):i(this.length)-u(c(l)),e=l;e<n;++e)if(a.call(this,e)&&(f=this[e],r(f)))return e;return-1}},{"../../number/is-nan":30,"../../number/to-pos-integer":34,"../../object/valid-value":55}],21:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Array.from:t("./shim")},{"./is-implemented":22,"./shim":23}],22:[function(t,e,n){"use strict";e.exports=function(){var t,e,n=Array.from;return"function"===typeof n&&(t=["raz","dwa"],e=n(t),Boolean(e&&e!==t&&"dwa"===e[1]))}},{}],23:[function(t,e,n){"use strict";var r=t("es6-symbol").iterator,i=t("../../function/is-arguments"),o=t("../../function/is-function"),s=t("../../number/to-pos-integer"),a=t("../../object/valid-callable"),c=t("../../object/valid-value"),u=t("../../object/is-value"),l=t("../../string/is-string"),f=Array.isArray,p=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;e.exports=function(t){var e,n,m,_,g,v,b,y,w,S,x=arguments[1],k=arguments[2];if(t=Object(c(t)),u(x)&&a(x),this&&this!==Array&&o(this))e=this;else{if(!x){if(i(t))return g=t.length,1!==g?Array.apply(null,t):(_=new Array(1),_[0]=t[0],_);if(f(t)){for(_=new Array(g=t.length),n=0;n<g;++n)_[n]=t[n];return _}}_=[]}if(!f(t))if(void 0!==(w=t[r])){b=a(w).call(t),e&&(_=new e),y=b.next(),n=0;while(!y.done)S=x?p.call(x,k,y.value,n):y.value,e?(h.value=S,d(_,n,h)):_[n]=S,y=b.next(),++n;g=n}else if(l(t)){for(g=t.length,e&&(_=new e),n=0,m=0;n<g;++n)S=t[n],n+1<g&&(v=S.charCodeAt(0),v>=55296&&v<=56319&&(S+=t[++n])),S=x?p.call(x,k,S,m):S,e?(h.value=S,d(_,m,h)):_[m]=S,++m;g=m}if(void 0===g)for(g=s(t.length),e&&(_=new e(g)),n=0;n<g;++n)S=x?p.call(x,k,t[n],n):t[n],e?(h.value=S,d(_,n,h)):_[n]=S;return e&&(h.value=null,_.length=g),_}},{"../../function/is-arguments":24,"../../function/is-function":25,"../../number/to-pos-integer":34,"../../object/is-value":44,"../../object/valid-callable":54,"../../object/valid-value":55,"../../string/is-string":59,"es6-symbol":73}],24:[function(t,e,n){"use strict";var r=Object.prototype.toString,i=r.call(function(){return arguments}());e.exports=function(t){return r.call(t)===i}},{}],25:[function(t,e,n){"use strict";var r=Object.prototype.toString,i=r.call(t("./noop"));e.exports=function(t){return"function"===typeof t&&r.call(t)===i}},{"./noop":26}],26:[function(t,e,n){"use strict";e.exports=function(){}},{}],27:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Math.sign:t("./shim")},{"./is-implemented":28,"./shim":29}],28:[function(t,e,n){"use strict";e.exports=function(){var t=Math.sign;return"function"===typeof t&&(1===t(10)&&-1===t(-20))}},{}],29:[function(t,e,n){"use strict";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},{}],30:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Number.isNaN:t("./shim")},{"./is-implemented":31,"./shim":32}],31:[function(t,e,n){"use strict";e.exports=function(){var t=Number.isNaN;return"function"===typeof t&&(!t({})&&t(NaN)&&!t(34))}},{}],32:[function(t,e,n){"use strict";e.exports=function(t){return t!==t}},{}],33:[function(t,e,n){"use strict";var r=t("../math/sign"),i=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?r(t)*o(i(t)):t)}},{"../math/sign":27}],34:[function(t,e,n){"use strict";var r=t("./to-integer"),i=Math.max;e.exports=function(t){return i(0,r(t))}},{"./to-integer":33}],35:[function(t,e,n){"use strict";var r=t("./valid-callable"),i=t("./valid-value"),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,c=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(n,u){var l,f=arguments[2],p=arguments[3];return n=Object(i(n)),r(u),l=a(n),p&&l.sort("function"===typeof p?o.call(p,n):void 0),"function"!==typeof t&&(t=l[t]),s.call(t,l,(function(t,r){return c.call(n,t)?s.call(u,f,n[t],t,n,r):e}))}}},{"./valid-callable":54,"./valid-value":55}],36:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":37,"./shim":38}],37:[function(t,e,n){"use strict";e.exports=function(){var t,e=Object.assign;return"function"===typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},{}],38:[function(t,e,n){"use strict";var r=t("../keys"),i=t("../valid-value"),o=Math.max;e.exports=function(t,e){var n,s,a,c=o(arguments.length,2);for(t=Object(i(t)),a=function(r){try{t[r]=e[r]}catch(i){n||(n=i)}},s=1;s<c;++s)e=arguments[s],r(e).forEach(a);if(void 0!==n)throw n;return t}},{"../keys":45,"../valid-value":55}],39:[function(t,e,n){"use strict";var r=t("../array/from"),i=t("./assign"),o=t("./valid-value");e.exports=function(t){var e=Object(o(t)),n=arguments[1],s=Object(arguments[2]);if(e!==t&&!n)return e;var a={};return n?r(n,(function(e){(s.ensure||e in t)&&(a[e]=t[e])})):i(a,t),a}},{"../array/from":21,"./assign":36,"./valid-value":55}],40:[function(t,e,n){"use strict";var r,i=Object.create;t("./set-prototype-of/is-implemented")()||(r=t("./set-prototype-of/shim")),e.exports=function(){var t,e,n;return r?1!==r.level?i:(t={},e={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(t){e[t]="__proto__"!==t?n:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(t,e),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,n){return i(null===e?t:e,n)}):i}()},{"./set-prototype-of/is-implemented":52,"./set-prototype-of/shim":53}],41:[function(t,e,n){"use strict";e.exports=t("./_iterate")("forEach")},{"./_iterate":35}],42:[function(t,e,n){"use strict";e.exports=function(t){return"function"===typeof t}},{}],43:[function(t,e,n){"use strict";var r=t("./is-value"),i={function:!0,object:!0};e.exports=function(t){return r(t)&&i[typeof t]||!1}},{"./is-value":44}],44:[function(t,e,n){"use strict";var r=t("../function/noop")();e.exports=function(t){return t!==r&&null!==t}},{"../function/noop":26}],45:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Object.keys:t("./shim")},{"./is-implemented":46,"./shim":47}],46:[function(t,e,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},{}],47:[function(t,e,n){"use strict";var r=t("../is-value"),i=Object.keys;e.exports=function(t){return i(r(t)?Object(t):t)}},{"../is-value":44}],48:[function(t,e,n){"use strict";var r=t("./valid-callable"),i=t("./for-each"),o=Function.prototype.call;e.exports=function(t,e){var n={},s=arguments[2];return r(e),i(t,(function(t,r,i,a){n[r]=o.call(e,s,t,r,i,a)})),n}},{"./for-each":41,"./valid-callable":54}],49:[function(t,e,n){"use strict";var r=t("./is-value"),i=Array.prototype.forEach,o=Object.create,s=function(t,e){var n;for(n in t)e[n]=t[n]};e.exports=function(t){var e=o(null);return i.call(arguments,(function(t){r(t)&&s(Object(t),e)})),e}},{"./is-value":44}],50:[function(t,e,n){"use strict";var r=Array.prototype.forEach,i=Object.create;e.exports=function(t){var e=i(null);return r.call(arguments,(function(t){e[t]=!0})),e}},{}],51:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Object.setPrototypeOf:t("./shim")},{"./is-implemented":52,"./shim":53}],52:[function(t,e,n){"use strict";var r=Object.create,i=Object.getPrototypeOf,o={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||r;return"function"===typeof t&&i(t(e(null),o))===o}},{}],53:[function(t,e,n){"use strict";var r,i=t("../is-object"),o=t("../valid-value"),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,c={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(t,e){if(o(t),null===e||i(e))return t;throw new TypeError("Prototype must be null or an object")},e.exports=function(t){var e,n;return t?(2===t.level?t.set?(n=t.set,e=function(t,e){return n.call(r(t,e),e),t}):e=function(t,e){return r(t,e).__proto__=e,t}:e=function t(e,n){var i;return r(e,n),i=s.call(t.nullPolyfill,e),i&&delete t.nullPolyfill.__proto__,null===n&&(n=t.nullPolyfill),e.__proto__=n,i&&a(t.nullPolyfill,"__proto__",c),e},Object.defineProperty(e,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{t=r.set,t.call(e,n)}catch(i){}if(Object.getPrototypeOf(e)===n)return{set:t,level:2}}return e.__proto__=n,Object.getPrototypeOf(e)===n?{level:2}:(e={},e.__proto__=n,Object.getPrototypeOf(e)===n&&{level:1})}()),t("../create")},{"../create":40,"../is-object":43,"../valid-value":55}],54:[function(t,e,n){"use strict";e.exports=function(t){if("function"!==typeof t)throw new TypeError(t+" is not a function");return t}},{}],55:[function(t,e,n){"use strict";var r=t("./is-value");e.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},{"./is-value":44}],56:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?String.prototype.contains:t("./shim")},{"./is-implemented":57,"./shim":58}],57:[function(t,e,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"===typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},{}],58:[function(t,e,n){"use strict";var r=String.prototype.indexOf;e.exports=function(t){return r.call(this,t,arguments[1])>-1}},{}],59:[function(t,e,n){"use strict";var r=Object.prototype.toString,i=r.call("");e.exports=function(t){return"string"===typeof t||t&&"object"===typeof t&&(t instanceof String||r.call(t)===i)||!1}},{}],60:[function(t,e,n){"use strict";var r,i=t("es5-ext/object/set-prototype-of"),o=t("es5-ext/string/#/contains"),s=t("d"),a=t("es6-symbol"),c=t("./"),u=Object.defineProperty;r=e.exports=function(t,e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");c.call(this,t),e=e?o.call(e,"key+value")?"key+value":o.call(e,"key")?"key":"value":"value",u(this,"__kind__",s("",e))},i&&i(r,c),delete r.prototype.constructor,r.prototype=Object.create(c.prototype,{_resolve:s((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),u(r.prototype,a.toStringTag,s("c","Array Iterator"))},{"./":63,d:16,"es5-ext/object/set-prototype-of":51,"es5-ext/string/#/contains":56,"es6-symbol":73}],61:[function(t,e,n){"use strict";var r=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/valid-callable"),o=t("es5-ext/string/is-string"),s=t("./get"),a=Array.isArray,c=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var n,l,f,p,h,d,m,_,g=arguments[2];if(a(t)||r(t)?n="array":o(t)?n="string":t=s(t),i(e),f=function(){p=!0},"array"!==n){if("string"!==n){l=t.next();while(!l.done){if(c.call(e,g,l.value,f),p)return;l=t.next()}}else for(d=t.length,h=0;h<d;++h)if(m=t[h],h+1<d&&(_=m.charCodeAt(0),_>=55296&&_<=56319&&(m+=t[++h])),c.call(e,g,m,f),p)break}else u.call(t,(function(t){return c.call(e,g,t,f),p}))}},{"./get":62,"es5-ext/function/is-arguments":24,"es5-ext/object/valid-callable":54,"es5-ext/string/is-string":59}],62:[function(t,e,n){"use strict";var r=t("es5-ext/function/is-arguments"),i=t("es5-ext/string/is-string"),o=t("./array"),s=t("./string"),a=t("./valid-iterable"),c=t("es6-symbol").iterator;e.exports=function(t){return"function"===typeof a(t)[c]?t[c]():r(t)?new o(t):i(t)?new s(t):new o(t)}},{"./array":60,"./string":65,"./valid-iterable":66,"es5-ext/function/is-arguments":24,"es5-ext/string/is-string":59,"es6-symbol":73}],63:[function(t,e,n){"use strict";var r,i=t("es5-ext/array/#/clear"),o=t("es5-ext/object/assign"),s=t("es5-ext/object/valid-callable"),a=t("es5-ext/object/valid-value"),c=t("d"),u=t("d/auto-bind"),l=t("es6-symbol"),f=Object.defineProperty,p=Object.defineProperties;e.exports=r=function(t,e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");p(this,{__list__:c("w",a(t)),__context__:c("w",e),__nextIndex__:c("w",0)}),e&&(s(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete r.prototype.constructor,p(r.prototype,o({_next:c((function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:c((function(){return this._createResult(this._next())})),_createResult:c((function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}})),_resolve:c((function(t){return this.__list__[t]})),_unBind:c((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:c((function(){return"[object "+(this[l.toStringTag]||"Object")+"]"}))},u({_onAdd:c((function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,n){e>=t&&(this.__redo__[n]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",c("c",[t])))})),_onDelete:c((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),-1!==e&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,n){e>t&&(this.__redo__[n]=--e)}),this)))})),_onClear:c((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(r.prototype,l.iterator,c((function(){return this})))},{d:16,"d/auto-bind":15,"es5-ext/array/#/clear":19,"es5-ext/object/assign":36,"es5-ext/object/valid-callable":54,"es5-ext/object/valid-value":55,"es6-symbol":73}],64:[function(t,e,n){"use strict";var r=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/is-value"),o=t("es5-ext/string/is-string"),s=t("es6-symbol").iterator,a=Array.isArray;e.exports=function(t){return!!i(t)&&(!!a(t)||(!!o(t)||(!!r(t)||"function"===typeof t[s])))}},{"es5-ext/function/is-arguments":24,"es5-ext/object/is-value":44,"es5-ext/string/is-string":59,"es6-symbol":73}],65:[function(t,e,n){"use strict";var r,i=t("es5-ext/object/set-prototype-of"),o=t("d"),s=t("es6-symbol"),a=t("./"),c=Object.defineProperty;r=e.exports=function(t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");t=String(t),a.call(this,t),c(this,"__length__",o("",t.length))},i&&i(r,a),delete r.prototype.constructor,r.prototype=Object.create(a.prototype,{_next:o((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:o((function(t){var e,n=this.__list__[t];return this.__nextIndex__===this.__length__?n:(e=n.charCodeAt(0),e>=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n)}))}),c(r.prototype,s.toStringTag,o("c","String Iterator"))},{"./":63,d:16,"es5-ext/object/set-prototype-of":51,"es6-symbol":73}],66:[function(t,e,n){"use strict";var r=t("./is-iterable");e.exports=function(t){if(!r(t))throw new TypeError(t+" is not iterable");return t}},{"./is-iterable":64}],67:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Map:t("./polyfill")},{"./is-implemented":68,"./polyfill":72}],68:[function(t,e,n){"use strict";e.exports=function(){var t,e,n;if("function"!==typeof Map)return!1;try{t=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch(r){return!1}return"[object Map]"===String(t)&&(3===t.size&&("function"===typeof t.clear&&("function"===typeof t.delete&&("function"===typeof t.entries&&("function"===typeof t.forEach&&("function"===typeof t.get&&("function"===typeof t.has&&("function"===typeof t.keys&&("function"===typeof t.set&&("function"===typeof t.values&&(e=t.entries(),n=e.next(),!1===n.done&&(!!n.value&&("raz"===n.value[0]&&"one"===n.value[1])))))))))))))}},{}],69:[function(t,e,n){"use strict";e.exports=function(){return"undefined"!==typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()},{}],70:[function(t,e,n){"use strict";e.exports=t("es5-ext/object/primitive-set")("key","value","key+value")},{"es5-ext/object/primitive-set":50}],71:[function(t,e,n){"use strict";var r,i=t("es5-ext/object/set-prototype-of"),o=t("d"),s=t("es6-iterator"),a=t("es6-symbol").toStringTag,c=t("./iterator-kinds"),u=Object.defineProperties,l=s.prototype._unBind;r=e.exports=function(t,e){if(!(this instanceof r))return new r(t,e);s.call(this,t.__mapKeysData__,t),e&&c[e]||(e="key+value"),u(this,{__kind__:o("",e),__values__:o("w",t.__mapValuesData__)})},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:o(r),_resolve:o((function(t){return"value"===this.__kind__?this.__values__[t]:"key"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]})),_unBind:o((function(){this.__values__=null,l.call(this)})),toString:o((function(){return"[object Map Iterator]"}))}),Object.defineProperty(r.prototype,a,o("c","Map Iterator"))},{"./iterator-kinds":70,d:16,"es5-ext/object/set-prototype-of":51,"es6-iterator":63,"es6-symbol":73}],72:[function(t,e,n){"use strict";var r,i=t("es5-ext/array/#/clear"),o=t("es5-ext/array/#/e-index-of"),s=t("es5-ext/object/set-prototype-of"),a=t("es5-ext/object/valid-callable"),c=t("es5-ext/object/valid-value"),u=t("d"),l=t("event-emitter"),f=t("es6-symbol"),p=t("es6-iterator/valid-iterable"),h=t("es6-iterator/for-of"),d=t("./lib/iterator"),m=t("./is-native-implemented"),_=Function.prototype.call,g=Object.defineProperties,v=Object.getPrototypeOf;e.exports=r=function(){var t,e,n,i=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return n=m&&s&&Map!==r?s(new Map,v(this)):this,null!=i&&p(i),g(n,{__mapKeysData__:u("c",t=[]),__mapValuesData__:u("c",e=[])}),i?(h(i,(function(n){var r=c(n)[0];n=n[1],-1===o.call(t,r)&&(t.push(r),e.push(n))}),n),n):n},m&&(s&&s(r,Map),r.prototype=Object.create(Map.prototype,{constructor:u(r)})),l(g(r.prototype,{clear:u((function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))})),delete:u((function(t){var e=o.call(this.__mapKeysData__,t);return-1!==e&&(this.__mapKeysData__.splice(e,1),this.__mapValuesData__.splice(e,1),this.emit("_delete",e,t),!0)})),entries:u((function(){return new d(this,"key+value")})),forEach:u((function(t){var e,n,r=arguments[1];a(t),e=this.entries(),n=e._next();while(void 0!==n)_.call(t,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=e._next()})),get:u((function(t){var e=o.call(this.__mapKeysData__,t);if(-1!==e)return this.__mapValuesData__[e]})),has:u((function(t){return-1!==o.call(this.__mapKeysData__,t)})),keys:u((function(){return new d(this,"key")})),set:u((function(t,e){var n,r=o.call(this.__mapKeysData__,t);return-1===r&&(r=this.__mapKeysData__.push(t)-1,n=!0),this.__mapValuesData__[r]=e,n&&this.emit("_add",r,t),this})),size:u.gs((function(){return this.__mapKeysData__.length})),values:u((function(){return new d(this,"value")})),toString:u((function(){return"[object Map]"}))})),Object.defineProperty(r.prototype,f.iterator,u((function(){return this.entries()}))),Object.defineProperty(r.prototype,f.toStringTag,u("c","Map"))},{"./is-native-implemented":69,"./lib/iterator":71,d:16,"es5-ext/array/#/clear":19,"es5-ext/array/#/e-index-of":20,"es5-ext/object/set-prototype-of":51,"es5-ext/object/valid-callable":54,"es5-ext/object/valid-value":55,"es6-iterator/for-of":61,"es6-iterator/valid-iterable":66,"es6-symbol":73,"event-emitter":78}],73:[function(t,e,n){"use strict";e.exports=t("./is-implemented")()?Symbol:t("./polyfill")},{"./is-implemented":74,"./polyfill":76}],74:[function(t,e,n){"use strict";var r={object:!0,symbol:!0};e.exports=function(){var t;if("function"!==typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(e){return!1}return!!r[typeof Symbol.iterator]&&(!!r[typeof Symbol.toPrimitive]&&!!r[typeof Symbol.toStringTag])}},{}],75:[function(t,e,n){"use strict";e.exports=function(t){return!!t&&("symbol"===typeof t||!!t.constructor&&("Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag]))}},{}],76:[function(t,e,n){"use strict";var r,i,o,s,a=t("d"),c=t("./validate-symbol"),u=Object.create,l=Object.defineProperties,f=Object.defineProperty,p=Object.prototype,h=u(null);if("function"===typeof Symbol){r=Symbol;try{String(r()),s=!0}catch(m){}}var d=function(){var t=u(null);return function(e){var n,r,i=0;while(t[e+(i||"")])++i;return e+=i||"",t[e]=!0,n="@@"+e,f(p,n,a.gs(null,(function(t){r||(r=!0,f(this,n,a(t)),r=!1)}))),n}}();o=function(t){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(t)},e.exports=i=function t(e){var n;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return s?r(e):(n=u(o.prototype),e=void 0===e?"":String(e),l(n,{__description__:a("",e),__name__:a("",d(e))}))},l(i,{for:a((function(t){return h[t]?h[t]:h[t]=i(String(t))})),keyFor:a((function(t){var e;for(e in c(t),h)if(h[e]===t)return e})),hasInstance:a("",r&&r.hasInstance||i("hasInstance")),isConcatSpreadable:a("",r&&r.isConcatSpreadable||i("isConcatSpreadable")),iterator:a("",r&&r.iterator||i("iterator")),match:a("",r&&r.match||i("match")),replace:a("",r&&r.replace||i("replace")),search:a("",r&&r.search||i("search")),species:a("",r&&r.species||i("species")),split:a("",r&&r.split||i("split")),toPrimitive:a("",r&&r.toPrimitive||i("toPrimitive")),toStringTag:a("",r&&r.toStringTag||i("toStringTag")),unscopables:a("",r&&r.unscopables||i("unscopables"))}),l(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),l(i.prototype,{toString:a((function(){return"Symbol ("+c(this).__description__+")"})),valueOf:a((function(){return c(this)}))}),f(i.prototype,i.toPrimitive,a("",(function(){var t=c(this);return"symbol"===typeof t?t:t.toString()}))),f(i.prototype,i.toStringTag,a("c","Symbol")),f(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),f(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},{"./validate-symbol":77,d:16}],77:[function(t,e,n){"use strict";var r=t("./is-symbol");e.exports=function(t){if(!r(t))throw new TypeError(t+" is not a symbol");return t}},{"./is-symbol":75}],78:[function(t,e,n){"use strict";var r,i,o,s,a,c,u,l=t("d"),f=t("es5-ext/object/valid-callable"),p=Function.prototype.apply,h=Function.prototype.call,d=Object.create,m=Object.defineProperty,_=Object.defineProperties,g=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var n;return f(e),g.call(this,"__ee__")?n=this.__ee__:(n=v.value=d(null),m(this,"__ee__",v),v.value=null),n[t]?"object"===typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),p.call(e,this,arguments)}),n.__eeOnceListener__=e,this},o=function(t,e){var n,r,i,o;if(f(e),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[t])return this;if(r=n[t],"object"===typeof r)for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},s=function(t){var e,n,r,i,o;if(g.call(this,"__ee__")&&(i=this.__ee__[t],i))if("object"===typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)p.call(r,this,o)}else switch(arguments.length){case 1:h.call(i,this);break;case 2:h.call(i,this,arguments[1]);break;case 3:h.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];p.call(i,this,o)}},a={on:r,once:i,off:o,emit:s},c={on:l(r),once:l(i),off:l(o),emit:l(s)},u=_({},c),e.exports=n=function(t){return null==t?d(u):_(Object(t),c)},n.methods=a},{d:16,"es5-ext/object/valid-callable":54}],79:[function(t,e,n){n.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,f=n?i-1:0,p=n?-1:1,h=t[e+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=u}return(h?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var s,a,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),e+=s+f>=1?p/c:p*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+h]=255&a,h+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[n+h]=255&s,h+=d,s/=256,u-=8);t[n+h-d]|=128*m}},{}],80:[function(t,e,n){"function"===typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],81:[function(t,e,n){function r(t){return!!t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function i(t){return"function"===typeof t.readFloatLE&&"function"===typeof t.slice&&r(t.slice(0,0))}e.exports=function(t){return null!=t&&(r(t)||i(t)||!!t._isBuffer)}},{}],82:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=e.exports;for(var o in i.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},i.codes={},i.types){var s=i.types[o];i.codes[s]=o}for(var a in i.CMD_SHIFT=4,i.CMD_MASK=240,i.DUP_MASK=8,i.QOS_MASK=3,i.QOS_SHIFT=1,i.RETAIN_MASK=1,i.LENGTH_MASK=127,i.LENGTH_FIN_MASK=128,i.SESSIONPRESENT_MASK=1,i.SESSIONPRESENT_HEADER=r.from([i.SESSIONPRESENT_MASK]),i.CONNACK_HEADER=r.from([i.codes["connack"]<<i.CMD_SHIFT]),i.USERNAME_MASK=128,i.PASSWORD_MASK=64,i.WILL_RETAIN_MASK=32,i.WILL_QOS_MASK=24,i.WILL_QOS_SHIFT=3,i.WILL_FLAG_MASK=4,i.CLEAN_SESSION_MASK=2,i.CONNECT_HEADER=r.from([i.codes["connect"]<<i.CMD_SHIFT]),i.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},i.propertiesCodes={},i.properties){var c=i.properties[a];i.propertiesCodes[c]=a}function u(t){return[0,1,2].map((function(e){return[0,1].map((function(n){return[0,1].map((function(o){var s=new r(1);return s.writeUInt8(i.codes[t]<<i.CMD_SHIFT|(n?i.DUP_MASK:0)|e<<i.QOS_SHIFT|o,0,!0),s}))}))}))}i.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int32",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},i.PUBLISH_HEADER=u("publish"),i.SUBSCRIBE_HEADER=u("subscribe"),i.SUBSCRIBE_OPTIONS_QOS_MASK=3,i.SUBSCRIBE_OPTIONS_NL_MASK=1,i.SUBSCRIBE_OPTIONS_NL_SHIFT=2,i.SUBSCRIBE_OPTIONS_RAP_MASK=1,i.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,i.SUBSCRIBE_OPTIONS_RH_MASK=3,i.SUBSCRIBE_OPTIONS_RH_SHIFT=4,i.SUBSCRIBE_OPTIONS_RH=[0,16,32],i.SUBSCRIBE_OPTIONS_NL=4,i.SUBSCRIBE_OPTIONS_RAP=8,i.SUBSCRIBE_OPTIONS_QOS=[0,1,2],i.UNSUBSCRIBE_HEADER=u("unsubscribe"),i.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},i.SUBACK_HEADER=r.from([i.codes["suback"]<<i.CMD_SHIFT]),i.VERSION3=r.from([3]),i.VERSION4=r.from([4]),i.VERSION5=r.from([5]),i.QOS=[0,1,2].map((function(t){return r.from([t])})),i.EMPTY={pingreq:r.from([i.codes["pingreq"]<<4,0]),pingresp:r.from([i.codes["pingresp"]<<4,0]),disconnect:r.from([i.codes["disconnect"]<<4,0])}},{"safe-buffer":110}],83:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=t("./writeToStream"),o=t("events").EventEmitter,s=t("inherits");function a(t,e){var n=new c;return i(t,n,e),n.concat()}function c(){this._array=new Array(20),this._i=0}s(c,o),c.prototype.write=function(t){return this._array[this._i++]=t,!0},c.prototype.concat=function(){var t,e,n=0,i=new Array(this._array.length),o=this._array,s=0;for(t=0;t<o.length&&void 0!==o[t];t++)"string"!==typeof o[t]?i[t]=o[t].length:i[t]=r.byteLength(o[t]),n+=i[t];for(e=r.allocUnsafe(n),t=0;t<o.length&&void 0!==o[t];t++)"string"!==typeof o[t]?(o[t].copy(e,s),s+=i[t]):(e.write(o[t],s),s+=i[t]);return e},e.exports=a},{"./writeToStream":89,events:13,inherits:80,"safe-buffer":110}],84:[function(t,e,n){"use strict";n.parser=t("./parser"),n.generate=t("./generate"),n.writeToStream=t("./writeToStream")},{"./generate":83,"./parser":88,"./writeToStream":89}],85:[function(t,e,n){var r=t("readable-stream/duplex"),i=t("util"),o=t("safe-buffer").Buffer;function s(t){if(!(this instanceof s))return new s(t);if(this._bufs=[],this.length=0,"function"==typeof t){this._callback=t;var e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)}))}else this.append(t);r.call(this)}i.inherits(s,r),s.prototype._offset=function(t){var e,n=0,r=0;if(0===t)return[0,0];for(;r<this._bufs.length;r++){if(e=n+this._bufs[r].length,t<e||r==this._bufs.length-1)return[r,t-n];n=e}},s.prototype.append=function(t){var e=0;if(o.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;e<t.length;e++)this.append(t[e]);else if(t instanceof s)for(;e<t._bufs.length;e++)this.append(t._bufs[e]);else null!=t&&("number"==typeof t&&(t=t.toString()),this._appendBuffer(o.from(t)));return this},s.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},s.prototype._write=function(t,e,n){this._appendBuffer(t),"function"==typeof n&&n()},s.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function(t){r.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype.get=function(t){return this.slice(t,t+1)[0]},s.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},s.prototype.copy=function(t,e,n,r){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof r||r>this.length)&&(r=this.length),n>=this.length)return t||o.alloc(0);if(r<=0)return t||o.alloc(0);var i,s,a=!!t,c=this._offset(n),u=r-n,l=u,f=a&&e||0,p=c[1];if(0===n&&r==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(s=0;s<this._bufs.length;s++)this._bufs[s].copy(t,f),f+=this._bufs[s].length;return t}if(l<=this._bufs[c[0]].length-p)return a?this._bufs[c[0]].copy(t,e,p,p+l):this._bufs[c[0]].slice(p,p+l);for(a||(t=o.allocUnsafe(u)),s=c[0];s<this._bufs.length;s++){if(i=this._bufs[s].length-p,!(l>i)){this._bufs[s].copy(t,f,p,p+l);break}this._bufs[s].copy(t,f,p),f+=i,l-=i,p&&(p=0)}return t},s.prototype.shallowSlice=function(t,e){t=t||0,e=e||this.length,t<0&&(t+=this.length),e<0&&(e+=this.length);var n=this._offset(t),r=this._offset(e),i=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!=n[1]&&(i[0]=i[0].slice(n[1])),new s(i)},s.prototype.toString=function(t,e,n){return this.slice(e,n).toString(t)},s.prototype.consume=function(t){while(this._bufs.length){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var t=0,e=new s;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},s.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var e in t)(function(e){s.prototype[e]=function(n){return this.slice(n,n+t[e])[e](0)}})(e)}(),e.exports=s},{"readable-stream/duplex":97,"safe-buffer":110,util:117}],86:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=65536,o={};function s(t){var e=r.allocUnsafe(2);return e.writeUInt8(t>>8,0),e.writeUInt8(255&t,1),e}function a(){for(var t=0;t<i;t++)o[t]=s(t)}function c(t){return t>=0&&t<128?1:t>=128&&t<16384?2:t>=16384&&t<2097152?3:t>=2097152&&t<268435456?4:0}function u(t){var e=0,n=0,i=c(t),o=r.allocUnsafe(i);do{e=t%128|0,t=t/128|0,t>0&&(e|=128),o.writeUInt8(e,n++)}while(t>0);return{data:o,length:i}}function l(t){var e=r.allocUnsafe(4);return e.writeUInt32BE(t,0),e}e.exports={cache:o,generateCache:a,generateNumber:s,genBufVariableByteInt:u,generate4ByteBuffer:l}},{"safe-buffer":110}],87:[function(t,e,n){function r(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}e.exports=r},{}],88:[function(t,e,n){"use strict";var r=t("bl"),i=t("inherits"),o=t("events").EventEmitter,s=t("./packet"),a=t("./constants");function c(t){if(!(this instanceof c))return new c(t);this.settings=t||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState()}i(c,o),c.prototype._resetState=function(){this.packet=new s,this.error=null,this._list=r(),this._stateCounter=0},c.prototype.parse=function(t){this.error&&this._resetState(),this._list.append(t);while((-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},c.prototype._parseHeader=function(){var t=this._list.readUInt8(0);return this.packet.cmd=a.types[t>>a.CMD_SHIFT],this.packet.retain=0!==(t&a.RETAIN_MASK),this.packet.qos=t>>a.QOS_SHIFT&a.QOS_MASK,this.packet.dup=0!==(t&a.DUP_MASK),this._list.consume(1),!0},c.prototype._parseLength=function(){var t=this._parseVarByteNum(!0);return t&&(this.packet.length=t.value,this._list.consume(t.bytes)),!!t},c.prototype._parsePayload=function(){var t=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}t=!0}return t},c.prototype._parseConnect=function(){var t,e,n,r,i,o,s={},c=this.packet;if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==t&&"MQIsdp"!==t)return this._emitError(new Error("Invalid protocolId"));if(c.protocolId=t,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(c.protocolVersion=this._list.readUInt8(this._pos),3!==c.protocolVersion&&4!==c.protocolVersion&&5!==c.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(s.username=this._list.readUInt8(this._pos)&a.USERNAME_MASK,s.password=this._list.readUInt8(this._pos)&a.PASSWORD_MASK,s.will=this._list.readUInt8(this._pos)&a.WILL_FLAG_MASK,s.will&&(c.will={},c.will.retain=0!==(this._list.readUInt8(this._pos)&a.WILL_RETAIN_MASK),c.will.qos=(this._list.readUInt8(this._pos)&a.WILL_QOS_MASK)>>a.WILL_QOS_SHIFT),c.clean=0!==(this._list.readUInt8(this._pos)&a.CLEAN_SESSION_MASK),this._pos++,c.keepalive=this._parseNum(),-1===c.keepalive)return this._emitError(new Error("Packet too short"));if(5===c.protocolVersion){var u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(c.properties=u)}if(e=this._parseString(),null===e)return this._emitError(new Error("Packet too short"));if(c.clientId=e,s.will){if(5===c.protocolVersion){var l=this._parseProperties();Object.getOwnPropertyNames(l).length&&(c.will.properties=l)}if(n=this._parseString(),null===n)return this._emitError(new Error("Cannot parse will topic"));if(c.will.topic=n,r=this._parseBuffer(),null===r)return this._emitError(new Error("Cannot parse will payload"));c.will.payload=r}if(s.username){if(o=this._parseString(),null===o)return this._emitError(new Error("Cannot parse username"));c.username=o}if(s.password){if(i=this._parseBuffer(),null===i)return this._emitError(new Error("Cannot parse password"));c.password=i}return this.settings=c,c},c.prototype._parseConnack=function(){var t=this.packet;if(this._list.length<2)return null;if(t.sessionPresent=!!(this._list.readUInt8(this._pos++)&a.SESSIONPRESENT_MASK),5===this.settings.protocolVersion?t.reasonCode=this._list.readUInt8(this._pos++):t.returnCode=this._list.readUInt8(this._pos++),-1===t.returnCode||-1===t.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}},c.prototype._parsePublish=function(){var t=this.packet;if(t.topic=this._parseString(),null===t.topic)return this._emitError(new Error("Cannot parse topic"));if(!(t.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}t.payload=this._list.slice(this._pos,t.length)}},c.prototype._parseSubscribe=function(){var t,e,n,r,i,o,s,c=this.packet;if(1!==c.qos)return this._emitError(new Error("Wrong subscribe header"));if(c.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(c.properties=u)}while(this._pos<c.length){if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse topic"));e=this._parseByte(),n=e&a.SUBSCRIBE_OPTIONS_QOS_MASK,o=0!==(e>>a.SUBSCRIBE_OPTIONS_NL_SHIFT&a.SUBSCRIBE_OPTIONS_NL_MASK),i=0!==(e>>a.SUBSCRIBE_OPTIONS_RAP_SHIFT&a.SUBSCRIBE_OPTIONS_RAP_MASK),r=e>>a.SUBSCRIBE_OPTIONS_RH_SHIFT&a.SUBSCRIBE_OPTIONS_RH_MASK,s={topic:t,qos:n},5===this.settings.protocolVersion&&(s.nl=o,s.rap=i,s.rh=r),c.subscriptions.push(s)}}},c.prototype._parseSuback=function(){var t=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}},c.prototype._parseUnsubscribe=function(){var t=this.packet;if(t.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}while(this._pos<t.length){var n;if(n=this._parseString(),null===n)return this._emitError(new Error("Cannot parse topic"));t.unsubscriptions.push(n)}}},c.prototype._parseUnsuback=function(){var t=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(5===this.settings.protocolVersion){var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e),t.granted=[];while(this._pos<this.packet.length)this.packet.granted.push(this._list.readUInt8(this._pos++))}},c.prototype._parseConfirmation=function(){var t=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion&&t.length>2){t.reasonCode=this._parseByte();var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return!0},c.prototype._parseDisconnect=function(){var t=this.packet;if(5===this.settings.protocolVersion){t.reasonCode=this._parseByte();var e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return!0},c.prototype._parseAuth=function(){var t=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));t.reasonCode=this._parseByte();var e=this._parseProperties();return Object.getOwnPropertyNames(e).length&&(t.properties=e),!0},c.prototype._parseMessageId=function(){var t=this.packet;return t.messageId=this._parseNum(),null!==t.messageId||(this._emitError(new Error("Cannot parse messageId")),!1)},c.prototype._parseString=function(t){var e,n=this._parseNum(),r=n+this._pos;return-1===n||r>this._list.length||r>this.packet.length?null:(e=this._list.toString("utf8",this._pos,r),this._pos+=n,e)},c.prototype._parseStringPair=function(){return{name:this._parseString(),value:this._parseString()}},c.prototype._parseBuffer=function(){var t,e=this._parseNum(),n=e+this._pos;return-1===e||n>this._list.length||n>this.packet.length?null:(t=this._list.slice(this._pos,n),this._pos+=e,t)},c.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var t=this._list.readUInt16BE(this._pos);return this._pos+=2,t},c.prototype._parse4ByteNum=function(){if(this._list.length-this._pos<4)return-1;var t=this._list.readUInt32BE(this._pos);return this._pos+=4,t},c.prototype._parseVarByteNum=function(t){var e,n=0,r=1,i=0,o=!0,s=this._pos?this._pos:0;while(n<5){if(e=this._list.readUInt8(s+n++),i+=r*(e&a.LENGTH_MASK),r*=128,0===(e&a.LENGTH_FIN_MASK))break;if(this._list.length<=n){o=!1;break}}return s&&(this._pos+=n),o=!!o&&(t?{bytes:n,value:i}:i),o},c.prototype._parseByte=function(){var t=this._list.readUInt8(this._pos);return this._pos++,t},c.prototype._parseByType=function(t){switch(t){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}},c.prototype._parseProperties=function(){var t=this._parseVarByteNum(),e=this._pos,n=e+t,r={};while(this._pos<n){var i=this._parseByte(),o=a.propertiesCodes[i];if(!o)return this._emitError(new Error("Unknown property")),!1;if("userProperties"!==o)r[o]=this._parseByType(a.propertiesTypes[o]);else{r[o]||(r[o]={});var s=this._parseByType(a.propertiesTypes[o]);r[o][s.name]=s.value}}return r},c.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit("packet",this.packet)),this.packet=new s,this._pos=0,!0},c.prototype._emitError=function(t){this.error=t,this.emit("error",t)},e.exports=c},{"./constants":82,"./packet":87,bl:85,events:13,inherits:80}],89:[function(t,e,n){"use strict";var r=t("./constants"),i=t("safe-buffer").Buffer,o=i.allocUnsafe(0),s=i.from([0]),a=t("./numbers"),c=t("process-nextick-args").nextTick,u=a.cache,l=a.generateNumber,f=a.generateCache,p=a.genBufVariableByteInt,h=a.generate4ByteBuffer,d=M,m=!0;function _(t,e,n){switch(e.cork&&(e.cork(),c(g,e)),m&&(m=!1,f()),t.cmd){case"connect":return v(t,e,n);case"connack":return b(t,e,n);case"publish":return y(t,e,n);case"puback":case"pubrec":case"pubrel":case"pubcomp":return w(t,e,n);case"subscribe":return S(t,e,n);case"suback":return x(t,e,n);case"unsubscribe":return k(t,e,n);case"unsuback":return E(t,e,n);case"pingreq":case"pingresp":return O(t,e,n);case"disconnect":return I(t,e,n);case"auth":return j(t,e,n);default:return e.emit("error",new Error("Unknown command")),!1}}function g(t){t.uncork()}function v(t,e,n){var o=t||{},s=o.protocolId||"MQTT",a=o.protocolVersion||4,c=o.will,u=o.clean,l=o.keepalive||0,f=o.clientId||"",p=o.username,h=o.password,m=o.properties;void 0===u&&(u=!0);var _=0;if(!s||"string"!==typeof s&&!i.isBuffer(s))return e.emit("error",new Error("Invalid protocolId")),!1;if(_+=s.length+2,3!==a&&4!==a&&5!==a)return e.emit("error",new Error("Invalid protocol version")),!1;if(_+=1,"string"!==typeof f&&!i.isBuffer(f)||!f&&4!==a||!f&&!u){if(a<4)return e.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*u===0)return e.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}else _+=f.length+2;if("number"!==typeof l||l<0||l>65535||l%1!==0)return e.emit("error",new Error("Invalid keepalive")),!1;if(_+=2,_+=1,5===a){var g=R(e,m);_+=g.length}if(c){if("object"!==typeof c)return e.emit("error",new Error("Invalid will")),!1;if(!c.topic||"string"!==typeof c.topic)return e.emit("error",new Error("Invalid will topic")),!1;if(_+=i.byteLength(c.topic)+2,c.payload){if(!(c.payload.length>=0))return e.emit("error",new Error("Invalid will payload")),!1;"string"===typeof c.payload?_+=i.byteLength(c.payload)+2:_+=c.payload.length+2;var v={};5===a&&(v=R(e,c.properties),_+=v.length)}}var b=!1;if(null!=p){if(!q(p))return e.emit("error",new Error("Invalid username")),!1;b=!0,_+=i.byteLength(p)+2}if(null!=h){if(!b)return e.emit("error",new Error("Username is required to use password")),!1;if(!q(h))return e.emit("error",new Error("Invalid password")),!1;_+=D(h)+2}e.write(r.CONNECT_HEADER),T(e,_),N(e,s),e.write(4===a?r.VERSION4:5===a?r.VERSION5:r.VERSION3);var y=0;return y|=null!=p?r.USERNAME_MASK:0,y|=null!=h?r.PASSWORD_MASK:0,y|=c&&c.retain?r.WILL_RETAIN_MASK:0,y|=c&&c.qos?c.qos<<r.WILL_QOS_SHIFT:0,y|=c?r.WILL_FLAG_MASK:0,y|=u?r.CLEAN_SESSION_MASK:0,e.write(i.from([y])),d(e,l),5===a&&g.write(),N(e,f),c&&(5===a&&v.write(),A(e,c.topic),N(e,c.payload)),null!=p&&N(e,p),null!=h&&N(e,h),!0}function b(t,e,n){var o=n?n.protocolVersion:4,a=t||{},c=5===o?a.reasonCode:a.returnCode,u=a.properties,l=2;if("number"!==typeof c)return e.emit("error",new Error("Invalid return code")),!1;var f=null;return 5===o&&(f=R(e,u),l+=f.length),e.write(r.CONNACK_HEADER),T(e,l),e.write(a.sessionPresent?r.SESSIONPRESENT_HEADER:s),e.write(i.from([c])),null!=f&&f.write(),!0}function y(t,e,n){var s=n?n.protocolVersion:4,a=t||{},c=a.qos||0,u=a.retain?r.RETAIN_MASK:0,l=a.topic,f=a.payload||o,p=a.messageId,h=a.properties,m=0;if("string"===typeof l)m+=i.byteLength(l)+2;else{if(!i.isBuffer(l))return e.emit("error",new Error("Invalid topic")),!1;m+=l.length+2}if(i.isBuffer(f)?m+=f.length:m+=i.byteLength(f),c&&"number"!==typeof p)return e.emit("error",new Error("Invalid messageId")),!1;c&&(m+=2);var _=null;return 5===s&&(_=R(e,h),m+=_.length),e.write(r.PUBLISH_HEADER[c][a.dup?1:0][u?1:0]),T(e,m),d(e,D(l)),e.write(l),c>0&&d(e,p),null!=_&&_.write(),e.write(f)}function w(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.cmd||"puback",c=s.messageId,u=s.dup&&"pubrel"===a?r.DUP_MASK:0,l=0,f=s.reasonCode,p=s.properties,h=5===o?3:2;if("pubrel"===a&&(l=1),"number"!==typeof c)return e.emit("error",new Error("Invalid messageId")),!1;var m=null;if(5===o){if(m=L(e,p,n,h),!m)return!1;h+=m.length}return e.write(r.ACKS[a][l][u][0]),T(e,h),d(e,c),5===o&&e.write(i.from([f])),null!==m&&m.write(),!0}function S(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.dup?r.DUP_MASK:0,c=s.messageId,u=s.subscriptions,l=s.properties,f=0;if("number"!==typeof c)return e.emit("error",new Error("Invalid messageId")),!1;f+=2;var p=null;if(5===o&&(p=R(e,l),f+=p.length),"object"!==typeof u||!u.length)return e.emit("error",new Error("Invalid subscriptions")),!1;for(var h=0;h<u.length;h+=1){var m=u[h].topic,_=u[h].qos;if("string"!==typeof m)return e.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if("number"!==typeof _)return e.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(5===o){var g=u[h].nl||!1;if("boolean"!==typeof g)return e.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;var v=u[h].rap||!1;if("boolean"!==typeof v)return e.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;var b=u[h].rh||0;if("number"!==typeof b||b>2)return e.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}f+=i.byteLength(m)+2+1}e.write(r.SUBSCRIBE_HEADER[1][a?1:0][0]),T(e,f),d(e,c),null!==p&&p.write();for(var y=!0,w=0;w<u.length;w++){var S,x=u[w],k=x.topic,E=x.qos,O=+x.nl,I=+x.rap,j=x.rh;A(e,k),S=r.SUBSCRIBE_OPTIONS_QOS[E],5===o&&(S|=O?r.SUBSCRIBE_OPTIONS_NL:0,S|=I?r.SUBSCRIBE_OPTIONS_RAP:0,S|=j?r.SUBSCRIBE_OPTIONS_RH[j]:0),y=e.write(i.from([S]))}return y}function x(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.messageId,c=s.granted,u=s.properties,l=0;if("number"!==typeof a)return e.emit("error",new Error("Invalid messageId")),!1;if(l+=2,"object"!==typeof c||!c.length)return e.emit("error",new Error("Invalid qos vector")),!1;for(var f=0;f<c.length;f+=1){if("number"!==typeof c[f])return e.emit("error",new Error("Invalid qos vector")),!1;l+=1}var p=null;if(5===o){if(p=L(e,u,n,l),!p)return!1;l+=p.length}return e.write(r.SUBACK_HEADER),T(e,l),d(e,a),null!==p&&p.write(),e.write(i.from(c))}function k(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.messageId,c=s.dup?r.DUP_MASK:0,u=s.unsubscriptions,l=s.properties,f=0;if("number"!==typeof a)return e.emit("error",new Error("Invalid messageId")),!1;if(f+=2,"object"!==typeof u||!u.length)return e.emit("error",new Error("Invalid unsubscriptions")),!1;for(var p=0;p<u.length;p+=1){if("string"!==typeof u[p])return e.emit("error",new Error("Invalid unsubscriptions")),!1;f+=i.byteLength(u[p])+2}var h=null;5===o&&(h=R(e,l),f+=h.length),e.write(r.UNSUBSCRIBE_HEADER[1][c?1:0][0]),T(e,f),d(e,a),null!==h&&h.write();for(var m=!0,_=0;_<u.length;_++)m=A(e,u[_]);return m}function E(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.messageId,c=s.dup?r.DUP_MASK:0,u=s.granted,l=s.properties,f=s.cmd,p=0,h=2;if("number"!==typeof a)return e.emit("error",new Error("Invalid messageId")),!1;if(5===o){if("object"!==typeof u||!u.length)return e.emit("error",new Error("Invalid qos vector")),!1;for(var m=0;m<u.length;m+=1){if("number"!==typeof u[m])return e.emit("error",new Error("Invalid qos vector")),!1;h+=1}}var _=null;if(5===o){if(_=L(e,l,n,h),!_)return!1;h+=_.length}return e.write(r.ACKS[f][p][c][0]),T(e,h),d(e,a),null!==_&&_.write(),5===o&&e.write(i.from(u)),!0}function O(t,e,n){return e.write(r.EMPTY[t.cmd])}function I(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.reasonCode,c=s.properties,u=5===o?1:0,l=null;if(5===o){if(l=L(e,c,n,u),!l)return!1;u+=l.length}return e.write(i.from([r.codes["disconnect"]<<4])),T(e,u),5===o&&e.write(i.from([a])),null!==l&&l.write(),!0}function j(t,e,n){var o=n?n.protocolVersion:4,s=t||{},a=s.reasonCode,c=s.properties,u=5===o?1:0;5!==o&&e.emit("error",new Error("Invalid mqtt version for auth packet"));var l=L(e,c,n,u);return!!l&&(u+=l.length,e.write(i.from([r.codes["auth"]<<4])),T(e,u),e.write(i.from([a])),null!==l&&l.write(),!0)}Object.defineProperty(_,"cacheNumbers",{get:function(){return d===M},set:function(t){t?(u&&0!==Object.keys(u).length||(m=!0),d=M):(m=!1,d=B)}});var C={};function T(t,e){var n=C[e];n||(n=p(e).data,e<16384&&(C[e]=n)),t.write(n)}function A(t,e){var n=i.byteLength(e);d(t,n),t.write(e,"utf8")}function P(t,e,n){A(t,e),A(t,n)}function M(t,e){return t.write(u[e])}function B(t,e){return t.write(l(e))}function $(t,e){return t.write(h(e))}function N(t,e){"string"===typeof e?A(t,e):e?(d(t,e.length),t.write(e)):d(t,0)}function R(t,e){if("object"!==typeof e||null!=e.length)return{length:1,write:function(){U(t,{},0)}};var n=0;function o(n){var o=r.propertiesTypes[n],s=e[n],a=0;switch(o){case"byte":if("boolean"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=2;break;case"int8":if("number"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=2;break;case"binary":if(s&&null===s)return t.emit("error",new Error("Invalid "+n)),!1;a+=1+i.byteLength(s)+2;break;case"int16":if("number"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=3;break;case"int32":if("number"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=5;break;case"var":if("number"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=1+p(s).length;break;case"string":if("string"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=3+i.byteLength(s.toString());break;case"pair":if("object"!==typeof s)return t.emit("error",new Error("Invalid "+n)),!1;a+=Object.getOwnPropertyNames(s).reduce((function(t,e){return t+=3+i.byteLength(e.toString())+2+i.byteLength(s[e].toString()),t}),0);break;default:return t.emit("error",new Error("Invalid property "+n)),!1}return a}if(e)for(var s in e){var a=o(s);if(!a)return!1;n+=a}var c=p(n).length;return{length:c+n,write:function(){U(t,e,n)}}}function L(t,e,n,r){var i=["reasonString","userProperties"],o=n&&n.properties&&n.properties.maximumPacketSize?n.properties.maximumPacketSize:0,s=R(t,e);if(o)while(r+s.length>o){var a=i.shift();if(!a||!e[a])return!1;delete e[a],s=R(t,e)}return s}function U(t,e,n){for(var o in T(t,n),e)if(e.hasOwnProperty(o)&&null!==e[o]){var s=e[o],a=r.propertiesTypes[o];switch(a){case"byte":t.write(i.from([r.properties[o]])),t.write(i.from([+s]));break;case"int8":t.write(i.from([r.properties[o]])),t.write(i.from([s]));break;case"binary":t.write(i.from([r.properties[o]])),N(t,s);break;case"int16":t.write(i.from([r.properties[o]])),d(t,s);break;case"int32":t.write(i.from([r.properties[o]])),$(t,s);break;case"var":t.write(i.from([r.properties[o]])),T(t,s);break;case"string":t.write(i.from([r.properties[o]])),A(t,s);break;case"pair":Object.getOwnPropertyNames(s).forEach((function(e){t.write(i.from([r.properties[o]])),P(t,e.toString(),s[e].toString())}));break;default:return t.emit("error",new Error("Invalid property "+o)),!1}}}function D(t){return t?t instanceof i?t.length:i.byteLength(t):0}function q(t){return"string"===typeof t||t instanceof i}e.exports=_},{"./constants":82,"./numbers":86,"process-nextick-args":91,"safe-buffer":110}],90:[function(t,e,n){var r=t("wrappy");function i(t){var e=function e(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function e(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:120}],91:[function(t,e,n){(function(t){"use strict";function n(e,n,r,i){if("function"!==typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:o=new Array(a-1),s=0;while(s<o.length)o[s++]=arguments[s];return t.nextTick((function(){e.apply(null,o)}))}}!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:n}:e.exports=t}).call(this,t("_process"))},{_process:92}],92:[function(t,e,n){var r,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}function u(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(function(){try{r="function"===typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"===typeof clearTimeout?clearTimeout:a}catch(t){i=a}})();var l,f=[],p=!1,h=-1;function d(){p&&l&&(p=!1,l.length?f=l.concat(f):h=-1,f.length&&m())}function m(){if(!p){var t=c(d);p=!0;var e=f.length;while(e){l=f,f=[];while(++h<e)l&&l[h].run();h=-1,e=f.length}l=null,p=!1,u(t)}}function _(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new _(t,e)),1!==f.length||p||c(m)},_.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],93:[function(n,r,i){(function(e){(function(n){var o="object"==typeof i&&i&&!i.nodeType&&i,s="object"==typeof r&&r&&!r.nodeType&&r,a="object"==typeof e&&e;a.global!==a&&a.window!==a&&a.self!==a||(n=a);var c,u,l=2147483647,f=36,p=1,h=26,d=38,m=700,_=72,g=128,v="-",b=/^xn--/,y=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-p,k=Math.floor,E=String.fromCharCode;function O(t){throw new RangeError(S[t])}function I(t,e){var n=t.length,r=[];while(n--)r[n]=e(t[n]);return r}function j(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(w,".");var i=t.split("."),o=I(i,e).join(".");return r+o}function C(t){var e,n,r=[],i=0,o=t.length;while(i<o)e=t.charCodeAt(i++),e>=55296&&e<=56319&&i<o?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function T(t){return I(t,(function(t){var e="";return t>65535&&(t-=65536,e+=E(t>>>10&1023|55296),t=56320|1023&t),e+=E(t),e})).join("")}function A(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:f}function P(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function M(t,e,n){var r=0;for(t=n?k(t/m):t>>1,t+=k(t/e);t>x*h>>1;r+=f)t=k(t/x);return k(r+(x+1)*t/(t+d))}function B(t){var e,n,r,i,o,s,a,c,u,d,m=[],b=t.length,y=0,w=g,S=_;for(n=t.lastIndexOf(v),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&O("not-basic"),m.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<b;){for(o=y,s=1,a=f;;a+=f){if(i>=b&&O("invalid-input"),c=A(t.charCodeAt(i++)),(c>=f||c>k((l-y)/s))&&O("overflow"),y+=c*s,u=a<=S?p:a>=S+h?h:a-S,c<u)break;d=f-u,s>k(l/d)&&O("overflow"),s*=d}e=m.length+1,S=M(y-o,e,0==o),k(y/e)>l-w&&O("overflow"),w+=k(y/e),y%=e,m.splice(y++,0,w)}return T(m)}function $(t){var e,n,r,i,o,s,a,c,u,d,m,b,y,w,S,x=[];for(t=C(t),b=t.length,e=g,n=0,o=_,s=0;s<b;++s)m=t[s],m<128&&x.push(E(m));r=i=x.length,i&&x.push(v);while(r<b){for(a=l,s=0;s<b;++s)m=t[s],m>=e&&m<a&&(a=m);for(y=r+1,a-e>k((l-n)/y)&&O("overflow"),n+=(a-e)*y,e=a,s=0;s<b;++s)if(m=t[s],m<e&&++n>l&&O("overflow"),m==e){for(c=n,u=f;;u+=f){if(d=u<=o?p:u>=o+h?h:u-o,c<d)break;S=c-d,w=f-d,x.push(E(P(d+S%w,0))),c=k(S/w)}x.push(E(P(c,0))),o=M(n,y,r==i),n=0,++r}++n,++e}return x.join("")}function N(t){return j(t,(function(t){return b.test(t)?B(t.slice(4).toLowerCase()):t}))}function R(t){return j(t,(function(t){return y.test(t)?"xn--"+$(t):t}))}if(c={version:"1.4.1",ucs2:{decode:C,encode:T},decode:B,encode:$,toASCII:R,toUnicode:N},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",(function(){return c}));else if(o&&s)if(r.exports==o)s.exports=c;else for(u in c)c.hasOwnProperty(u)&&(o[u]=c[u]);else n.punycode=c})(this)}).call(this,"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],94:[function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,n,o){e=e||"&",n=n||"=";var s={};if("string"!==typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var c=1e3;o&&"number"===typeof o.maxKeys&&(c=o.maxKeys);var u=t.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var f,p,h,d,m=t[l].replace(a,"%20"),_=m.indexOf(n);_>=0?(f=m.substr(0,_),p=m.substr(_+1)):(f=m,p=""),h=decodeURIComponent(f),d=decodeURIComponent(p),r(s,h)?i(s[h])?s[h].push(d):s[h]=[s[h],d]:s[h]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],95:[function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(s(t),(function(s){var a=encodeURIComponent(r(s))+n;return i(t[s])?o(t[s],(function(t){return a+encodeURIComponent(r(t))})).join(e):a+encodeURIComponent(r(t[s]))})).join(e):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},{}],96:[function(t,e,n){"use strict";n.decode=n.parse=t("./decode"),n.encode=n.stringify=t("./encode")},{"./decode":94,"./encode":95}],97:[function(t,e,n){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":98}],98:[function(t,e,n){"use strict";var r=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};e.exports=f;var o=t("core-util-is");o.inherits=t("inherits");var s=t("./_stream_readable"),a=t("./_stream_writable");o.inherits(f,s);for(var c=i(a.prototype),u=0;u<c.length;u++){var l=c[u];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(t){if(!(this instanceof f))return new f(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},{"./_stream_readable":100,"./_stream_writable":102,"core-util-is":14,inherits:80,"process-nextick-args":91}],99:[function(t,e,n){"use strict";e.exports=o;var r=t("./_stream_transform"),i=t("core-util-is");function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=t("inherits"),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},{"./_stream_transform":101,"core-util-is":14,inherits:80}],100:[function(t,n,r){(function(e,r){"use strict";var i=t("process-nextick-args");n.exports=S;var o,s=t("isarray");S.ReadableState=w;t("events").EventEmitter;var a=function(t,e){return t.listeners(e).length},c=t("./internal/streams/stream"),u=t("safe-buffer").Buffer,l=r.Uint8Array||function(){};function f(t){return u.from(t)}function p(t){return u.isBuffer(t)||t instanceof l}var h=t("core-util-is");h.inherits=t("inherits");var d=t("util"),m=void 0;m=d&&d.debuglog?d.debuglog("stream"):function(){};var _,g=t("./internal/streams/BufferList"),v=t("./internal/streams/destroy");h.inherits(S,c);var b=["error","close","destroy","pause","resume"];function y(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function w(e,n){o=o||t("./_stream_duplex"),e=e||{};var r=n instanceof o;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(_||(_=t("string_decoder/").StringDecoder),this.decoder=new _(e.encoding),this.encoding=e.encoding)}function S(e){if(o=o||t("./_stream_duplex"),!(this instanceof S))return new S(e);this._readableState=new w(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function x(t,e,n,r,i){var o,s=t._readableState;null===e?(s.reading=!1,T(t,s)):(i||(o=E(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"===typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=f(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):k(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?k(t,s,e,!1):M(t,s)):k(t,s,e,!1))):r||(s.reading=!1));return O(s)}function k(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&A(t)),M(t,e)}function E(t,e){var n;return p(e)||"string"===typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function O(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=v.destroy,S.prototype._undestroy=v.undestroy,S.prototype._destroy=function(t,e){this.push(null),e(t)},S.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof t&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=u.from(t,e),e=""),n=!0),x(this,t,e,!1,n)},S.prototype.unshift=function(t){return x(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){return _||(_=t("string_decoder/").StringDecoder),this._readableState.decoder=new _(e),this._readableState.encoding=e,this};var I=8388608;function j(t){return t>=I?t=I:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=j(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,A(t)}}function A(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(m("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(P,t):P(t))}function P(t){m("emit readable"),t.emit("readable"),U(t)}function M(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(B,t,e))}function B(t,e){var n=e.length;while(!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark){if(m("maybeReadMore read 0"),t.read(0),n===e.length)break;n=e.length}e.readingMore=!1}function $(t){return function(){var e=t._readableState;m("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,U(t))}}function N(t){m("readable nexttick read 0"),t.read(0)}function R(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(L,t,e))}function L(t,e){e.reading||(m("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),U(t),e.flowing&&!e.reading&&t.read(0)}function U(t){var e=t._readableState;m("flow",e.flowing);while(e.flowing&&null!==t.read());}function D(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=q(t,e.buffer,e.decoder),n);var n}function q(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?F(t,e):V(t,e),r}function F(t,e){var n=e.head,r=1,i=n.data;t-=i.length;while(n=n.next){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),t-=s,0===t){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function V(t,e){var n=u.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;while(r=r.next){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),t-=s,0===t){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function z(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(H,e,t))}function H(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function W(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}S.prototype.read=function(t){m("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return m("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?z(this):A(this),null;if(t=C(t,e),0===t&&e.ended)return 0===e.length&&z(this),null;var r,i=e.needReadable;return m("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&(i=!0,m("length less than watermark",i)),e.ended||e.reading?(i=!1,m("reading or ended",i)):i&&(m("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=C(n,e))),r=t>0?D(t,e):null,null===r?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&z(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(t,n){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t);break}o.pipesCount+=1,m("pipe count=%d opts=%j",o.pipesCount,n);var s=(!n||!1!==n.end)&&t!==e.stdout&&t!==e.stderr,c=s?l:w;function u(t,e){m("onunpipe"),t===r&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h())}function l(){m("onend"),t.end()}o.endEmitted?i.nextTick(c):r.once("end",c),t.on("unpipe",u);var f=$(r);t.on("drain",f);var p=!1;function h(){m("cleanup"),t.removeListener("close",v),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",u),r.removeListener("end",l),r.removeListener("end",w),r.removeListener("data",_),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}var d=!1;function _(e){m("ondata"),d=!1;var n=t.write(e);!1!==n||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==W(o.pipes,t))&&!p&&(m("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function g(e){m("onerror",e),w(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",b),w()}function b(){m("onfinish"),t.removeListener("close",v),w()}function w(){m("unpipe"),r.unpipe(t)}return r.on("data",_),y(t,"error",g),t.once("close",v),t.once("finish",b),t.emit("pipe",r),o.flowing||(m("pipe resume"),r.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=W(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},S.prototype.on=function(t,e){var n=c.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&A(this):i.nextTick(N,this))}return n},S.prototype.addListener=S.prototype.on,S.prototype.resume=function(){var t=this._readableState;return t.flowing||(m("resume"),t.flowing=!0,R(this,t)),this},S.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(m("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){if(m("wrapped data"),n.decoder&&(i=n.decoder.write(i)),(!n.objectMode||null!==i&&void 0!==i)&&(n.objectMode||i&&i.length)){var o=e.push(i);o||(r=!0,t.pause())}})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<b.length;o++)t.on(b[o],this.emit.bind(this,b[o]));return this._read=function(e){m("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=D}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./_stream_duplex":98,"./internal/streams/BufferList":103,"./internal/streams/destroy":104,"./internal/streams/stream":105,_process:92,"core-util-is":14,events:13,inherits:80,isarray:106,"process-nextick-args":91,"safe-buffer":110,"string_decoder/":107,util:11}],101:[function(t,e,n){"use strict";e.exports=s;var r=t("./_stream_duplex"),i=t("core-util-is");function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"===typeof this._flush?this._flush((function(e,n){c(t,e,n)})):c(this,null,null)}function c(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(s,r),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},{"./_stream_duplex":98,"core-util-is":14,inherits:80}],102:[function(t,n,r){(function(e,r,i){"use strict";var o=t("process-nextick-args");function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){R(e,t)}}n.exports=y;var a,c=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:o.nextTick;y.WritableState=b;var u=t("core-util-is");u.inherits=t("inherits");var l={deprecate:t("util-deprecate")},f=t("./internal/streams/stream"),p=t("safe-buffer").Buffer,h=r.Uint8Array||function(){};function d(t){return p.from(t)}function m(t){return p.isBuffer(t)||t instanceof h}var _,g=t("./internal/streams/destroy");function v(){}function b(e,n){a=a||t("./_stream_duplex"),e=e||{};var r=n instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,o=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var u=!1===e.decodeStrings;this.decodeStrings=!u,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){j(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||t("./_stream_duplex"),!_.call(y,this)&&!(this instanceof a))return new y(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),f.call(this)}function w(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}function S(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}function x(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=p.from(e,n)),e}function k(t,e,n,r,i,o){if(!n){var s=x(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var c=e.length<e.highWaterMark;if(c||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else E(t,e,!1,a,r,i,o);return c}function E(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick($,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),$(t,e))}function I(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function j(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(I(n),e)O(t,n,r,e,i);else{var o=P(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||A(t,n),r?c(C,t,n,o,i):C(t,n,o,i)}}function C(t,e,n,r){n||T(t,e),e.pendingcb--,r(),$(t,e)}function T(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function A(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;var a=0,c=!0;while(n)i[a]=n,n.isBuf||(c=!1),n=n.next,a+=1;i.allBuffers=c,E(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{while(n){var u=n.chunk,l=n.encoding,f=n.callback,p=e.objectMode?1:u.length;if(E(t,e,!1,p,u,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function P(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),$(t,e)}))}function B(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function $(t,e){var n=P(e);return n&&(B(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}function N(t,e,n){e.ending=!0,$(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function R(t,e,n){var r=t.entry;t.entry=null;while(r){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}u.inherits(y,f),b.prototype.getBuffer=function(){var t=this.bufferedRequest,e=[];while(t)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!_.call(this,t)||this===y&&(t&&t._writableState instanceof b)}})):_=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r=this._writableState,i=!1,o=!r.objectMode&&m(t);return o&&!p.isBuffer(t)&&(t=d(t)),"function"===typeof e&&(n=e,e=null),o?e="buffer":e||(e=r.defaultEncoding),"function"!==typeof n&&(n=v),r.ended?w(this,n):(o||S(this,r,t,n))&&(r.pendingcb++,i=k(this,r,o,t,e,n)),i},y.prototype.cork=function(){var t=this._writableState;t.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||A(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||N(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":98,"./internal/streams/destroy":104,"./internal/streams/stream":105,_process:92,"core-util-is":14,inherits:80,"process-nextick-args":91,"safe-buffer":110,timers:112,"util-deprecate":115}],103:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=t("safe-buffer").Buffer,o=t("util");function s(t,e,n){t.copy(e,n)}e.exports=function(){function t(){r(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";var e=this.head,n=""+e.data;while(e=e.next)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;var e=i.allocUnsafe(t>>>0),n=this.head,r=0;while(n)s(n.data,e,r),r+=n.data.length,n=n.next;return e},t}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var t=o.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":110,util:11}],104:[function(t,e,n){"use strict";var r=t("process-nextick-args");function i(t,e){var n=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(s,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(s,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(t,e){t.emit("error",e)}e.exports={destroy:i,undestroy:o}},{"process-nextick-args":91}],105:[function(t,e,n){e.exports=t("events").EventEmitter},{events:13}],106:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],107:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=r.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){if(!t)return"utf8";var e;while(1)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s(t){var e=o(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=s(t),this.encoding){case"utf16le":this.text=d,this.end=m,e=4;break;case"utf8":this.fillLast=f,e=4;break;case"base64":this.text=_,this.end=g,e=3;break;default:return this.write=v,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function c(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function u(t,e,n){var r=e.length-1;if(r<n)return 0;var i=c(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=c(e[r]),i>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=c(e[r]),i>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0))}function l(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}function f(t){var e=this.lastTotal-this.lastNeed,n=l(this,t,e);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function p(t,e){var n=u(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\ufffd":e}function d(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function m(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function _(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function g(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function v(t){return t.toString(this.encoding)}function b(t){return t&&t.length?this.write(t):""}n.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},a.prototype.end=h,a.prototype.text=p,a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":110}],108:[function(t,e,n){n=e.exports=t("./lib/_stream_readable.js"),n.Stream=n,n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":98,"./lib/_stream_passthrough.js":99,"./lib/_stream_readable.js":100,"./lib/_stream_transform.js":101,"./lib/_stream_writable.js":102}],109:[function(t,e,n){"use strict";function r(t,e,n){var r=this;this._callback=t,this._args=n,this._interval=setInterval(t,e,this._args),this.reschedule=function(t){t||(t=r._interval),r._interval&&clearInterval(r._interval),r._interval=setInterval(r._callback,t,r._args)},this.clear=function(){r._interval&&(clearInterval(r._interval),r._interval=void 0)},this.destroy=function(){r._interval&&clearInterval(r._interval),r._callback=void 0,r._interval=void 0,r._args=void 0}}function i(){if("function"!==typeof arguments[0])throw new Error("callback needed");if("number"!==typeof arguments[1])throw new Error("interval needed");var t;if(arguments.length>0){t=new Array(arguments.length-2);for(var e=0;e<t.length;e++)t[e]=arguments[e+2]}return new r(arguments[0],arguments[1],t)}e.exports=i},{}],110:[function(t,e,n){var r=t("buffer"),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,n),n.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},{buffer:12}],111:[function(t,e,n){function r(t){var e=t._readableState;return e?e.objectMode?t.read():t.read(i(e)):null}function i(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}e.exports=r},{}],112:[function(t,e,n){(function(e,r){var i=t("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,a={},c=0;function u(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new u(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new u(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n.setImmediate="function"===typeof e?e:function(t){var e=c++,r=!(arguments.length<2)&&s.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))})),e},n.clearImmediate="function"===typeof r?r:function(t){delete a[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":92,timers:112}],113:[function(t,e,n){"use strict";var r=t("punycode"),i=t("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=w,n.resolve=x,n.resolveObject=k,n.format=S,n.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r","\n","\t"],l=["{","}","|","\\","^","`"].concat(u),f=["'"].concat(l),p=["%","/","?",";","#"].concat(f),h=["/","?","#"],d=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=t("querystring");function w(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}function S(t){return i.isString(t)&&(t=w(t)),t instanceof o?t.format():o.prototype.format.call(t)}function x(t,e){return w(t,!1,!0).resolve(e)}function k(t,e){return t?w(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a),l=/\\/g;u[0]=u[0].replace(l,"/"),t=u.join(a);var w=t;if(w=w.trim(),!n&&1===t.split("#").length){var S=c.exec(w);if(S)return this.path=w,this.href=w,this.pathname=S[1],S[2]?(this.search=S[2],this.query=e?y.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var x=s.exec(w);if(x){x=x[0];var k=x.toLowerCase();this.protocol=k,w=w.substr(x.length)}if(n||x||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===w.substr(0,2);!E||x&&v[x]||(w=w.substr(2),this.slashes=!0)}if(!v[x]&&(E||x&&!b[x])){for(var O,I,j=-1,C=0;C<h.length;C++){var T=w.indexOf(h[C]);-1!==T&&(-1===j||T<j)&&(j=T)}I=-1===j?w.lastIndexOf("@"):w.lastIndexOf("@",j),-1!==I&&(O=w.slice(0,I),w=w.slice(I+1),this.auth=decodeURIComponent(O)),j=-1;for(C=0;C<p.length;C++){T=w.indexOf(p[C]);-1!==T&&(-1===j||T<j)&&(j=T)}-1===j&&(j=w.length),this.host=w.slice(0,j),w=w.slice(j),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var P=this.hostname.split(/\./),M=(C=0,P.length);C<M;C++){var B=P[C];if(B&&!B.match(m)){for(var $="",N=0,R=B.length;N<R;N++)B.charCodeAt(N)>127?$+="x":$+=B[N];if(!$.match(m)){var L=P.slice(0,C),U=P.slice(C+1),D=B.match(_);D&&(L.push(D[1]),U.unshift(D[2])),U.length&&(w="/"+U.join(".")+w),this.hostname=L.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var q=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+q,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!g[k])for(C=0,M=f.length;C<M;C++){var V=f[C];if(-1!==w.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),w=w.split(V).join(z)}}var H=w.indexOf("#");-1!==H&&(this.hash=w.substr(H),w=w.slice(0,H));var W=w.indexOf("?");if(-1!==W?(this.search=w.substr(W),this.query=w.substr(W+1),e&&(this.query=y.parse(this.query)),w=w.slice(0,W)):e&&(this.search="",this.query={}),w&&(this.pathname=w),b[k]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var K=this.search||"";this.path=q+K}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})),a=a.replace("#","%23"),e+o+n+a+r},o.prototype.resolve=function(t){return this.resolveObject(w(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var c=Object.keys(t),u=0;u<c.length;u++){var l=c[u];"protocol"!==l&&(n[l]=t[l])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!b[t.protocol]){for(var f=Object.keys(t),p=0;p<f.length;p++){var h=f[p];n[h]=t[h]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||v[t.protocol])n.pathname=t.pathname;else{var d=(t.pathname||"").split("/");while(d.length&&!(t.host=d.shift()));t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var m=n.pathname||"",_=n.search||"";n.path=m+_}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=y||g||n.host&&t.pathname,S=w,x=n.pathname&&n.pathname.split("/")||[],k=(d=t.pathname&&t.pathname.split("/")||[],n.protocol&&!b[n.protocol]);if(k&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),w=w&&(""===d[0]||""===x[0])),y)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=d;else if(d.length)x||(x=[]),x.pop(),x=x.concat(d),n.search=t.search,n.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(k){n.hostname=n.host=x.shift();var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=x.slice(-1)[0],I=(n.host||t.host||x.length>1)&&("."===O||".."===O)||""===O,j=0,C=x.length;C>=0;C--)O=x[C],"."===O?x.splice(C,1):".."===O?(x.splice(C,1),j++):j&&(x.splice(C,1),j--);if(!w&&!S)for(;j--;j)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var T=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(k){n.hostname=n.host=T?"":x.length?x.shift():"";E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return w=w||n.host&&x.length,w&&!T&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":114,punycode:93,querystring:96}],114:[function(t,e,n){"use strict";e.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],115:[function(t,n,i){(function(t){function e(t,e){if(i("noDeprecation"))return t;var n=!1;function o(){if(!n){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):r("warn",e," at utils/mqtt.min.js:1"),n=!0}return t.apply(this,arguments)}return o}function i(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}n.exports=e}).call(this,"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],116:[function(t,e,n){e.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},{}],117:[function(t,n,i){(function(e,n){var o=/%[sdj%]/g;i.format=function(t){if(!x(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,s=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}})),a=r[n];n<i;a=r[++n])y(a)||!I(a)?s+=" "+a:s+=" "+c(a);return s},i.deprecate=function(t,o){if(E(n.process))return function(){return i.deprecate(t,o).apply(this,arguments)};if(!0===e.noDeprecation)return t;var s=!1;function a(){if(!s){if(e.throwDeprecation)throw new Error(o);e.traceDeprecation?console.trace(o):r("error",o," at utils/mqtt.min.js:1"),s=!0}return t.apply(this,arguments)}return a};var s,a={};function c(t,e){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(e)?n.showHidden=e:e&&i._extend(n,e),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),p(n,t,n.depth)}function u(t,e){var n=c.styles[e];return n?"\x1b["+c.colors[n][0]+"m"+t+"\x1b["+c.colors[n][1]+"m":t}function l(t,e){return t}function f(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}function p(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==i.inspect&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return x(r)||(r=p(t,r,n)),r}var o=h(t,e);if(o)return o;var s=Object.keys(e),a=f(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),C(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(e);if(0===s.length){if(T(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(O(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(j(e))return t.stylize(Date.prototype.toString.call(e),"date");if(C(e))return d(e)}var u,l="",b=!1,y=["{","}"];if(v(e)&&(b=!0,y=["[","]"]),T(e)){var w=e.name?": "+e.name:"";l=" [Function"+w+"]"}return O(e)&&(l=" "+RegExp.prototype.toString.call(e)),j(e)&&(l=" "+Date.prototype.toUTCString.call(e)),C(e)&&(l=" "+d(e)),0!==s.length||b&&0!=e.length?n<0?O(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),u=b?m(t,e,n,a,s):s.map((function(r){return _(t,e,n,a,r,b)})),t.seen.pop(),g(u,l,y)):y[0]+l+y[1]}function h(t,e){if(E(e))return t.stylize("undefined","undefined");if(x(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return S(e)?t.stylize(""+e,"number"):b(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function m(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)N(e,String(s))?o.push(_(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(_(t,e,n,r,i,!0))})),o}function _(t,e,n,r,i,o){var s,a,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),N(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(n)?p(t,c.value,null):p(t,c.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return"  "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return"   "+t})).join("\n"))):a=t.stylize("[Circular]","special")),E(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function g(t,e,n){var r=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function v(t){return Array.isArray(t)}function b(t){return"boolean"===typeof t}function y(t){return null===t}function w(t){return null==t}function S(t){return"number"===typeof t}function x(t){return"string"===typeof t}function k(t){return"symbol"===typeof t}function E(t){return void 0===t}function O(t){return I(t)&&"[object RegExp]"===P(t)}function I(t){return"object"===typeof t&&null!==t}function j(t){return I(t)&&"[object Date]"===P(t)}function C(t){return I(t)&&("[object Error]"===P(t)||t instanceof Error)}function T(t){return"function"===typeof t}function A(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t}function P(t){return Object.prototype.toString.call(t)}function M(t){return t<10?"0"+t.toString(10):t.toString(10)}i.debuglog=function(t){if(E(s)&&(s=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(s)){var n=e.pid;a[t]=function(){var e=i.format.apply(i,arguments);r("error","%s %d: %s",t,n,e," at utils/mqtt.min.js:1")}}else a[t]=function(){};return a[t]},i.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},i.isArray=v,i.isBoolean=b,i.isNull=y,i.isNullOrUndefined=w,i.isNumber=S,i.isString=x,i.isSymbol=k,i.isUndefined=E,i.isRegExp=O,i.isObject=I,i.isDate=j,i.isError=C,i.isFunction=T,i.isPrimitive=A,i.isBuffer=t("./support/isBuffer");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $(){var t=new Date,e=[M(t.getHours()),M(t.getMinutes()),M(t.getSeconds())].join(":");return[t.getDate(),B[t.getMonth()],e].join(" ")}function N(t,e){return Object.prototype.hasOwnProperty.call(t,e)}i.log=function(){r("log","%s - %s",$(),i.format.apply(i,arguments)," at utils/mqtt.min.js:1")},i.inherits=t("inherits"),i._extend=function(t,e){if(!e||!I(e))return t;var n=Object.keys(e),r=n.length;while(r--)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./support/isBuffer":116,_process:92,inherits:80}],118:[function(t,n,r){(function(e,r){"use strict";var i=t("readable-stream").Transform,o=t("duplexify"),s=t("ws"),a=t("safe-buffer").Buffer;function c(t,e,n){var r=new i({objectMode:t.objectMode});return r._write=e,r._flush=n,r}function u(t,n,i){var u,l,f="browser"===e.title,p=!!r.WebSocket,h=f?b:v;n&&!Array.isArray(n)&&"object"===typeof n&&(i=n,n=null,("string"===typeof i.protocol||Array.isArray(i.protocol))&&(n=i.protocol)),i||(i={}),void 0===i.objectMode&&(i.objectMode=!(!0===i.binary||void 0===i.binary));var d=c(i,h,y);i.objectMode||(d._writev=O);var m=i.browserBufferSize||524288,_=i.browserBufferTimeout||1e3;"object"===typeof t?l=t:(l=p&&f?new s(t,n):new s(t,n,i),l.binaryType="arraybuffer"),l.readyState===l.OPEN?u=d:(u=o.obj(),l.onopen=w),u.socket=l,l.onclose=S,l.onerror=x,l.onmessage=k,d.on("close",E);var g=!i.objectMode;function v(t,e,n){l.readyState===l.OPEN?(g&&"string"===typeof t&&(t=a.from(t,"utf8")),l.send(t,n)):n()}function b(t,e,n){if(l.bufferedAmount>m)setTimeout(b,_,t,e,n);else{g&&"string"===typeof t&&(t=a.from(t,"utf8"));try{l.send(t)}catch(r){return n(r)}n()}}function y(t){l.close(),t()}function w(){u.setReadable(d),u.setWritable(d),u.emit("connect")}function S(){u.end(),u.destroy()}function x(t){u.destroy(t)}function k(t){var e=t.data;e=e instanceof ArrayBuffer?a.from(e):a.from(e,"utf8"),d.push(e)}function E(){l.close()}function O(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"string"===typeof t[r].chunk?n[r]=a.from(t[r],"utf8"):n[r]=t[r].chunk;this._write(a.concat(n),"binary",e)}return u}n.exports=u}).call(this,t("_process"),"undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{_process:92,duplexify:17,"readable-stream":108,"safe-buffer":110,ws:119}],119:[function(t,e,n){var r=null;"undefined"!==typeof WebSocket?r=WebSocket:"undefined"!==typeof MozWebSocket?r=MozWebSocket:"undefined"!==typeof window&&(r=window.WebSocket||window.MozWebSocket),e.exports=r},{}],120:[function(t,e,n){function r(t,e){if(t&&e)return r(t)(e);if("function"!==typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"===typeof r&&r!==i&&Object.keys(i).forEach((function(t){r[t]=i[t]})),r}}e.exports=r},{}],121:[function(t,e,n){e.exports=i;var r=Object.prototype.hasOwnProperty;function i(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t}},{}]},{},[9])(9)}))}).call(this,n("c8ba"),n("fe07")["default"],n("0de9")["default"])},fe07:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.Behavior=Ct,e.Component=jt,e.Page=Ot,e.nextTick=e.default=void 0;var r,i=o(n("8bbf"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return p(t)||f(t,e)||u(t,e)||c()}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t,e){if(t){if("string"===typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){i=!0,o=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(i)throw o}}return n}}function p(t){if(Array.isArray(t))return t}function h(t,e){t&&(e.mpOptions.data=t)}function d(e){e.components=t.__wxVueOptions.components}var m=Object.prototype.toString,_=Object.prototype.hasOwnProperty;function g(t){return"function"===typeof t}function v(t){return"[object Object]"===m.call(t)}function b(t,e){return _.call(t,e)}function y(){}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var S=/-(\w)/g,x=w((function(t){return t.replace(S,(function(t,e){return e?e.toUpperCase():""}))})),k="__data__",E={created:"onServiceCreated",attached:"onServiceAttached",ready:"mounted",moved:"moved",detached:"destroyed"},O=Object.keys(E),I={show:"onPageShow",hide:"onPageHide",resize:"onPageResize"},j=Object.keys(I),C=["onLoad","onShow","onReady","onHide","onUnload","onPullDownRefresh","onReachBottom","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function T(t,e){var n=Object.create(null);Object.keys(t).forEach((function(e){var r=t[e];g(r)&&-1===C.indexOf(e)&&(n[e]=r)})),e.methods=n}function A(t,e){Object.keys(t).forEach((function(n){-1!==C.indexOf(n)&&(e[n]=t[n])}))}function P(t){var e={mixins:[],mpOptions:{}};return d(e),h(t.data,e),T(t,e),A(t,e),e}function M(t,e){t&&(e.mpOptions.properties=t)}function B(t,e){t&&(e.mpOptions.options=t)}function $(t,e){t&&(t.$emit&&(console.warn('Method "$emit" conflicts with an existing Vue instance method'),delete t.$emit),e.methods=t)}function N(t,e){O.forEach((function(n){b(t,n)&&(e[E[n]]||(e[E[n]]=[])).push(t[n])}))}var R={"wx://form-field":{},"wx://component-export":{}};function L(t){var e=t.behaviors,n=t.definitionFilter,r=[];if(Array.isArray(e)&&e.forEach((function(e){e="string"===typeof e?R[e]:e,e.definitionFilter&&(r.push(e.definitionFilter),e.definitionFilter.call(null,t,[]))})),g(n))return function(t){n(t,r)}}function U(t,e){L(t)}function D(t){var e=t.data,n=t.methods,r=t.behaviors,i=t.properties,o={watch:{},mpOptions:{mpObservers:[]}};return h(e,o),$(n,o),F(r,o),M(i,o),N(t,o),U(t),o}var q={"wx://form-field":{beforeCreate:function(){var t=this.$options.mpOptions;t.properties||(t.properties=Object.create(null));var e=t.properties;b(e,"name")||(e.name={type:String}),b(e,"value")||(e.value={type:String})}}};function F(t,e){t&&t.forEach((function(t){"string"===typeof t?q[t]&&e.mixins.push(q[t]):e.mixins.push(D(t))}))}function V(t){return t.split(".")}function z(t){return t.split(",").map((function(t){return V(t)}))}function H(t,e){if(t){var n=e.mpOptions.mpObservers;Object.keys(t).forEach((function(e){n.push({paths:z(e),observer:t[e]})}))}}function W(t,e){0===e.indexOf("/")&&(t="");var n=t.split("/"),r=e.split("/");n.pop();while(r.length){var i=r.shift();""!==i&&"."!==i&&(".."!==i?n.push(i):n.pop())}return n.join("/")}function K(e,n){e&&(Object.keys(e).forEach((function(n){var r=e[n];r.name=n,r.target=r.target?String(r.target):W(t.__wxRoute,n)})),n.mpOptions.relations=e)}function Q(t,e){t&&(Array.isArray(t)||(t=[t]),e.mpOptions.externalClasses=t,e.mpOptions.properties||(e.mpOptions.properties=Object.create(null)),t.forEach((function(t){e.mpOptions.properties[x(t)]={type:String,value:""}})))}function Y(t,e){t&&N(t,e)}function J(t,e){t&&j.forEach((function(n){var r=t[n];g(r)&&(e[I[n]]=r)}))}function G(t){var e=t.data,n=t.options,r=t.methods,i=t.behaviors,o=t.lifetimes,s=t.observers,a=t.relations,c=t.properties,u=t.pageLifetimes,l=t.externalClasses,f={mixins:[],props:{},watch:{},mpOptions:{mpObservers:[]}};return d(f),h(e,f),B(n,f),$(r,f),F(i,f),Y(o,f),H(s,f),K(a,f),M(c,f),J(u,f),Q(l,f),N(t,f),U(t),f}function X(t,e,n,r){if(e){var i="_$".concat(t,"Handlers");(r[i]||(r[i]=[])).push((function(){e.call(r,n)}))}}function Z(t,e,n){var r="linked",i=t.name,o=n._$relationNodes||(n._$relationNodes=Object.create(null));(o[i]||(o[i]=[])).push(e),X(r,t[r],e,n)}function tt(t,e,n){var r="unlinked";X(r,t[r],e,n)}function et(t,e,n){var r=t&&t.$options.mpOptions&&t.$options.mpOptions.relations;if(!r)return[];var i=Object.keys(r).find((function(t){var i=r[t];return i.target===e&&i.type===n}));return i?[r[i],t]:[]}function nt(t,e,n){var r=n(t,t.$options.mpOptions.path),i=a(r,2),o=i[0],s=i[1];o&&(Z(o,t,s),Z(e,s,t),tt(o,t,s),tt(e,s,t))}function rt(t,e){var n=t.type;"parent"===n?nt(e,t,(function(t,e){return et(t.$parent,e,"child")})):"ancestor"===n&&nt(e,t,(function(t,e){var n=t.$parent;while(n){var r=et(n,e,"descendant");if(r.length)return r;n=n.$parent}return[]}))}function it(t){var e=t.$options.mpOptions||{},n=e.relations;n&&Object.keys(n).forEach((function(e){rt(n[e],t)}))}function ot(t,e){var n=t["_$".concat(e,"Handlers")];n&&n.forEach((function(t){return t()}))}var st={enumerable:!0,configurable:!0,get:y,set:y};function at(t,e,n){st.get=function(){return this[e][n]},st.set=function(t){this[e][n]=t},Object.defineProperty(t,n,st)}function ct(t,e,n){var r=t.replace(/\[(\d+?)\]/g,".$1").split(".");return r.reduce((function(t,n,i){if(i!==r.length-1)return"undefined"===typeof t[n]&&(t[n]={}),t[n];t[n]=e}),n),1===r.length}function ut(t,e){var n=this;v(t)&&(Object.keys(t).forEach((function(e){ct(e,t[e],n.data)&&!b(n,e)&&at(n,k,e)})),this.$forceUpdate(),g(e)&&this.$nextTick(e))}var lt=Object.prototype.toString,ft=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=lt.call(n);if("[object Array]"===r)return e=n.slice(0),e;if("[object Object]"===r){for(var i in n)e[i]=t(e[i],n[i]);return e}if("[object Date]"===r)return new Date(n.getTime());if("[object RegExp]"===r){var o=String(n),s=o.lastIndexOf("/");return new RegExp(o.slice(1,s),o.slice(s+1))}return n},pt=function(t){return ft("[object Array]"===lt.call(t)?[]:{},t)},ht=(r={},s(r,String,""),s(r,Number,0),s(r,Boolean,!1),s(r,Object,null),s(r,Array,[]),s(r,null,null),r);function dt(t){return ht[t]}function mt(t){return v(t)?b(t,"value")?t.value:dt(t.type):dt(t)}function _t(t){return v(t)?t.type:t}function gt(t,e,n,r){var i=n[t];if(void 0!==i){var o=e[t],s=_t(o);i=vt(i,s);var a=o&&o.observer;return a&&setTimeout((function(){bt(a,r,i)}),4),i}return mt(e[t])}function vt(t,e){return e===Boolean?!!t:e===String?String(t):t}function bt(t,e,n,r){try{"function"===typeof t?t.call(e,n,r):"string"===typeof t&&"function"===typeof e[t]&&e[t](n,r)}catch(i){console.error("execute observer ".concat(t," callback fail! err: ").concat(i))}}function yt(t,e){var n=t.$options.mpOptions.properties;if(n){var r=pt(t.$options.propsData)||{},i=function(i){var o=!!v(n[i])&&n[i].observer,s=gt(i,n,r,t);Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){var n=s;e===s||e!==e&&s!==s||(s=Array.isArray(e)?e.slice(0):e,o&&bt(o,t,e,n),t.$forceUpdate())}})};for(var o in n)i(o)}}function wt(t){var e=t.$options.mpOptions&&t.$options.mpOptions.properties,n=t.$options.propsData;n&&e&&Object.keys(e).forEach((function(r){b(n,r)&&(t[r]=vt(n[r],_t(e[r])))}))}function St(t){var e=JSON.parse(JSON.stringify(t.$options.mpOptions.data||{}));t[k]=e;var n={get:function(){return t[k]},set:function(e){t[k]=e}};Object.defineProperties(t,{data:n,properties:n}),t.setData=ut,yt(t,e),Object.keys(e).forEach((function(e){at(t,k,e)}))}function xt(t){var e=t.$emit;t.triggerEvent=function(n,r,i){var o={dataset:t.$el.dataset},s={target:o,currentTarget:o,detail:r,preventDefault:y,stopPropagation:y};e.call(t,n,s)},t.$emit=function(){t.triggerEvent.apply(t,arguments)},t.getRelationNodes=function(e){return(t._$relationNodes&&t._$relationNodes[e]||[]).filter((function(t){return!t._isDestroyed}))},t._$updateProperties=wt}function kt(t){var e=t.$options.watch;e&&Object.keys(e).forEach((function(n){var r=e[n];if(r.mounted){var i=t[n],o=r.handler;"string"===typeof o&&(o=t[o]),o&&o.call(t,i,i)}}))}var Et={beforeCreate:function(){this._renderProxy=this,this._$self=this,this._$noop=y},created:function(){St(this),xt(this),it(this)},mounted:function(){kt(this)},destroyed:function(){ot(this,"unlinked")}};function Ot(e){var n=P(e);n.mixins.unshift(Et),n.mpOptions.path=t.__wxRoute,t.__wxComponents[t.__wxRoute]=n}function It(t){t.onServiceAttached||(t.onServiceAttached=[]),t.onServiceAttached.push((function(){ot(this,"linked")}))}function jt(e){var n=G(e);n.mixins.unshift(Et),n.mpOptions.path=t.__wxRoute,It(n),t.__wxComponents[t.__wxRoute]=n}function Ct(t){return t}t.__wxRoute="",t.__wxComponents=Object.create(null),t.__wxVueOptions=Object.create(null);var Tt=i.default.nextTick;e.nextTick=Tt;var At=uni.__$wx__,Pt=At;e.default=Pt}).call(this,n("c8ba"))},ffd4:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("0dd7"));function i(t){return t&&t.__esModule?t:{default:t}}var o={components:{imagePopper:r.default},data:function(){return{warningLevel:1,showImgPopper:{show:!1,imgSrc:""},curInfo:{},videoUrl:"",showVideo:!0}},onBackPress:function(e){t("log",e," at pages/detail/detail.vue:52"),uni.navigateTo({url:"/pages/index/index"})},mounted:function(){var e=this;this.curInfo=getApp().globalData.curPageDetail,uni.request({url:"http://"+getApp().globalData.requestVideoUrl+"/video/"+this.curInfo.id,success:function(n){t("log","request success",n.data.data.videoUrl," at pages/detail/detail.vue:62"),e.videoUrl=n.data.data.videoUrl}})},methods:{goBack:function(){uni.navigateTo({url:"../index/index"})},showImg:function(){this.showVideo=!1,this.showImgPopper.show=!0,this.showImgPopper.imgSrc="http://"+this.getResourceUrl()+"/httpImage/"+this.curInfo.imgUrl},getResourceUrl:function(){return getApp().globalData.resourseUrl},handleClickCancel:function(){this.showImgPopper.show=!1,this.showVideo=!0}}};e.default=o}).call(this,n("0de9")["default"])}},[["fb94","app-config"]]]);