FastBee/docker/data/nginx/vue/static/js/chunk-a71a6c7c.2abf7865.js
2025-07-07 09:21:15 +08:00

11 lines
552 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a71a6c7c","chunk-2d231044","chunk-4d3d9efe","chunk-0e339b0a","chunk-74926972","chunk-180e5cca","chunk-6001dd9e","chunk-1a3a5d01","chunk-3ef87020","chunk-04943632","chunk-22d64e2c","chunk-68339b26","chunk-875a9b24","chunk-1c9bdf72","chunk-09cb2e28","chunk-688a2787","chunk-4fdc3fc4","chunk-5bd31c26","chunk-9ac2c67a","chunk-05c336e0","chunk-95b489cc","chunk-07780f6e","chunk-63b54ec6","chunk-c4fbb8a4","chunk-67af7c51","chunk-03fb653e","chunk-2ee8ac7c","chunk-722c5e57","chunk-793c42a8","chunk-46e6d1bb","chunk-2d0a45ee","chunk-2d0d6012"],{"01a2":function(e,t,i){},"01ca":function(e,t,i){"use strict";i.d(t,"h",(function(){return r})),i.d(t,"d",(function(){return n})),i.d(t,"i",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"g",(function(){return l})),i.d(t,"k",(function(){return c})),i.d(t,"c",(function(){return d})),i.d(t,"b",(function(){return u})),i.d(t,"f",(function(){return p})),i.d(t,"e",(function(){return h})),i.d(t,"j",(function(){return f}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/model/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/model/"+e,method:"get"})}function s(e){return Object(a["a"])({url:"/iot/model/permList/"+e,method:"get"})}function o(e){return Object(a["a"])({url:"/iot/model",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/iot/model/import",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/iot/model",method:"put",data:e})}function d(e){return Object(a["a"])({url:"/iot/model/"+e,method:"delete"})}function u(e){return Object(a["a"])({url:"/iot/model/cache/"+e,method:"get"})}function p(e){return Object(a["a"])({url:"/iot/model/listModbus",method:"get",params:e})}function h(e){return Object(a["a"])({url:"/iot/model/write",method:"get",params:e})}function f(e){return Object(a["a"])({url:"/iot/model/refresh?productId="+e,method:"post"})}},"05c6":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:alert:user:add"],expression:"['iot:device:alert:user:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.handleAlertUser}},[e._v(e._s(e.$t("add")))])],1),i("right-toolbar",{attrs:{showSearch:e.showSearch,search:!1},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.deviceUserList,border:!1}},[i("el-table-column",{attrs:{label:e.$t("user.index.098976-30"),align:"left",prop:"userId","min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("user.profile.index.894502-1"),align:"center",prop:"userName","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("user.index.098976-3"),align:"center",prop:"phoneNumber","min-width":"120"}}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:alert:user:remove"],expression:"['iot:device:alert:user:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(i){return e.handleDelete(t.row)}}},[e._v(" "+e._s(e.$t("del"))+" ")])]}}])})],1),i("el-dialog",{attrs:{title:e.$t("alert-user.837395-0"),visible:e.open,width:"800px"},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"permForm",attrs:{model:e.permParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{prop:"userName"}},[i("el-input",{attrs:{placeholder:e.$t("online.093480-2"),size:"small",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleUserQuery(t)}},model:{value:e.permParams.userName,callback:function(t){e.$set(e.permParams,"userName",t)},expression:"permParams.userName"}})],1),i("el-form-item",{attrs:{prop:"phonenumber"}},[i("el-input",{attrs:{placeholder:e.$t("user.index.098976-4"),size:"small",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleUserQuery(t)}},model:{value:e.permParams.phonenumber,callback:function(t){e.$set(e.permParams,"phonenumber",t)},expression:"permParams.phonenumber"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:e.handleUserQuery}},[e._v(e._s(e.$t("search")))]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("reset")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"singleTable",attrs:{data:e.UserList,"highlight-current-row":"",size:"small","row-key":e.getRowKeys,border:!1},on:{"selection-change":e.changeCheckBoxValue}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center","reserve-selection":!0}}),i("el-table-column",{attrs:{label:e.$t("user.index.098976-30"),align:"left",prop:"userId","min-width":"100"}}),i("el-table-column",{attrs:{label:e.$t("user.profile.index.894502-1"),align:"left",prop:"userName","min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("user.index.098976-3"),align:"left",prop:"phonenumber","min-width":"120"}})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{layout:"prev, pager, next",total:e.total,page:e.permParams.pageNum,limit:e.permParams.pageSize},on:{"update:page":function(t){return e.$set(e.permParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.permParams,"pageSize",t)},pagination:e.getUserList}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:user:edit"],expression:"['iot:device:user:edit']"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("confirm")))]),i("el-button",{on:{click:e.closeSelectUser}},[e._v(e._s(e.$t("close")))])],1)],1)],1)},r=[],n=i("ade3"),s=(i("d81d"),i("e9c4"),i("b64b"),i("b775"));function o(e){return Object(s["a"])({url:"/iot/deviceAlertUser/query",method:"get",params:e})}function l(e){return Object(s["a"])({url:"/iot/deviceAlertUser/list",method:"get",params:e})}function c(e){return Object(s["a"])({url:"/iot/deviceAlertUser",method:"post",data:e})}function d(e,t){return Object(s["a"])({url:"/iot/deviceAlertUser?deviceId="+e+"&userId="+t,method:"delete"})}var u={name:"alert-user",props:{device:{type:Object,default:null}},watch:{device:{handler:function(e){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.queryParams.deviceId=this.deviceInfo.deviceId,this.getList())}}},data:function(){return Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])(Object(n["a"])({total:0,open:!1,UserList:[],permParams:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,deviceId:null},loading:!0,showSearch:!0},"total",0),"deviceUserList",[]),"deviceInfo",{}),"userIds",[]),"tableData",[]),"queryParams",{pageNum:1,pageSize:999}),"form",{})},created:function(){this.queryParams.deviceId=this.device.deviceId,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,l(this.queryParams).then((function(t){e.deviceUserList=t.rows,e.total=t.total,e.loading=!1}))},getRowKeys:function(e){return e.userId},reset:function(){this.form={deviceId:null,userId:null,userName:null,phoneNumber:null},this.resetForm("form")},handleQuery:function(){this.getList()},handleUserQuery:function(){this.permParams.pageNum=1,this.getUserList()},resetQuery:function(){this.resetForm("permForm"),this.handleUserQuery()},changeCheckBoxValue:function(e){this.tableData=e},handleAlertUser:function(){this.open=!0,this.getUserList()},handleDelete:function(e){var t=this;this.$modal.confirm(this.$t("alert-user.837395-1")).then((function(){return d(e.deviceId,e.userId)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("delSuccess"))})).catch((function(){}))},getUserList:function(){var e=this;o(this.permParams).then((function(t){e.UserList=t.rows,e.total=t.total}))},resetUserQuery:function(){this.resetForm("queryForm"),this.reset()},closeSelectUser:function(){this.open=!1,this.resetUserQuery()},submitForm:function(){var e=this;this.userIds=this.tableData.map((function(e){return e.userId}));var t=JSON.parse(JSON.stringify(this.userIds)),i={userIdList:t,deviceId:this.device.deviceId};c(i).then((function(t){200==t.code?(e.$modal.msgSuccess(t.msg),e.resetUserQuery(),e.open=!1,e.getList(),e.$refs.singleTable.clearSelection()):e.$modal.msgError(t.msg)}))}}},p=u,h=i("2877"),f=Object(h["a"])(p,a,r,!1,null,null,null);t["default"]=f.exports},"06a9":function(e,t,i){"use strict";i.d(t,"d",(function(){return r})),i.d(t,"e",(function(){return n})),i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return l}));var a=i("b775");function r(e){return Object(a["a"])({url:"/data/center/deviceHistory",method:"post",data:e})}function n(e){return Object(a["a"])({url:"/data/center/sceneHistory",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/data/center/countAlertProcess",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/data/center/countAlertLevel",method:"get",params:e})}function l(e){return Object(a["a"])({url:"/data/center/countThingsModelInvoke",method:"get",params:e})}},"07ac":function(e,t,i){var a=i("23e7"),r=i("6f53").values;a({target:"Object",stat:!0},{values:function(e){return r(e)}})},"09cb":function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));i("d3b7");function a(){return new Promise((function(e,t){if("undefined"!==typeof BMap)return e(BMap),!0;window.onBMapCallback=function(){e(BMap)};var i=document.location.protocol;if("https:"==i){var a=document.createElement("meta");a.httpEquiv="Content-Security-Policy",a.content="upgrade-insecure-requests",a.onerror=t,document.head.appendChild(a)}var r=document.createElement("script");r.type="text/javascript",r.src="http://api.map.baidu.com/api?v=2.0&ak=nAtaBg9FYzav6c8P9rF9qzsWZfT8O0PD&s=1&__ec_v__=20190126&callback=onBMapCallback",r.onerror=t,document.head.appendChild(r)}))}},"0aa9":function(e,t,i){"use strict";i("dfc8")},"0b22":function(e,t,i){},"0bc2":function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/runtime/service/invokeReply",method:"post",data:e})}function n(e){return Object(a["a"])({url:"/iot/runtime/prop/get",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/iot/runtime/service/invoke",method:"post",data:e})}},"0eb6":function(e,t,i){"use strict";var a=i("23e7"),r=i("7c37"),n=i("d066"),s=i("d039"),o=i("7c73"),l=i("5c6c"),c=i("9bf2").f,d=i("cb2d"),u=i("edd0"),p=i("1a2d"),h=i("19aa"),f=i("825a"),m=i("aa1f"),v=i("e391"),g=i("cf98"),y=i("0d26"),b=i("69f3"),w=i("83ab"),_=i("c430"),x="DOMException",k="DATA_CLONE_ERR",$=n("Error"),I=n(x)||function(){try{var e=n("MessageChannel")||r("worker_threads").MessageChannel;(new e).port1.postMessage(new WeakMap)}catch(t){if(t.name==k&&25==t.code)return t.constructor}}(),S=I&&I.prototype,j=$.prototype,C=b.set,L=b.getterFor(x),P="stack"in $(x),N=function(e){return p(g,e)&&g[e].m?g[e].c:0},T=function(){h(this,O);var e=arguments.length,t=v(e<1?void 0:arguments[0]),i=v(e<2?void 0:arguments[1],"Error"),a=N(i);if(C(this,{type:x,name:i,message:t,code:a}),w||(this.name=i,this.message=t,this.code=a),P){var r=$(t);r.name=x,c(this,"stack",l(1,y(r.stack,1)))}},O=T.prototype=o(j),D=function(e){return{enumerable:!0,configurable:!0,get:e}},M=function(e){return D((function(){return L(this)[e]}))};w&&(u(O,"code",M("code")),u(O,"message",M("message")),u(O,"name",M("name"))),c(O,"constructor",l(1,T));var E=s((function(){return!(new I instanceof $)})),F=E||s((function(){return j.toString!==m||"2: 1"!==String(new I(1,2))})),A=E||s((function(){return 25!==new I(1,"DataCloneError").code})),R=E||25!==I[k]||25!==S[k],q=_?F||A||R:E;a({global:!0,constructor:!0,forced:q},{DOMException:q?T:I});var V=n(x),B=V.prototype;for(var z in F&&(_||I===V)&&d(B,"toString",m),A&&w&&I===V&&u(B,"code",D((function(){return N(f(this).name)}))),g)if(p(g,z)){var U=g[z],Q=U.s,H=l(6,U.c);p(V,Q)||c(V,Q,H),p(B,Q)||c(B,Q,H)}},"14f8":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"device-inline-video",attrs:{"element-loading-background":"#ffff"}},[i("el-row",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{gutter:10}},e._l(e.sipList,(function(t,a){return i("el-col",{key:a,staticStyle:{"margin-bottom":"10px"},attrs:{id:"deviceVideoCol",span:8}},[i("div",{staticClass:"video"},[i("player",{ref:"player_"+a,refInFor:!0,attrs:{playerinfo:{playtype:"play",deviceId:t.deviceSipId,channelId:t.channelId}}}),1===t.status?i("span",{staticClass:"status",staticStyle:{color:"#ffba00"}},[e._v(e._s(e.$t("home.notActive")))]):e._e(),2===t.status?i("span",{staticClass:"status",staticStyle:{color:"#ff4949"}},[e._v(e._s(e.$t("home.disabled")))]):e._e(),4===t.status?i("span",{staticClass:"status",staticStyle:{color:"#909399"}},[e._v(e._s(e.$t("home.offline")))]):e._e(),3===t.status?i("i",{staticClass:"el-icon-caret-right btn",on:{click:function(i){return e.handlePlay(i,t,a)}}}):e._e()],1)])})),1),0===e.total?i("el-empty",{attrs:{description:e.$t("device.inline-video.986754-0")}}):e._e(),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.pageNum,limit:e.pageSize,pageSizes:[9,18,27,36]},on:{"update:page":function(t){e.pageNum=t},"update:limit":function(t){e.pageSize=t},pagination:e.getSipList}})],1)},r=[],n=i("5530"),s=(i("fb6a"),i("d3b7"),i("159b"),i("2f62")),o=i("97d6"),l=i("e2de"),c={name:"DeviceInlineVideo",components:{player:o["default"]},props:{sipRelationList:{type:Array,default:function(){return[]}}},watch:{sidebarStatus:function(){this.calculatePlayerHeight()},sipRelationList:{handler:function(e,t){e&&0!==e.length&&(this.total=e.length,this.tempSipList=this.sipRelationList)},deep:!0}},computed:Object(n["a"])(Object(n["a"])({},Object(s["c"])({sidebarStatus:function(e){return e.app.sidebar.opened}})),{},{sipList:function(){var e=(this.pageNum-1)*this.pageSize,t=e+this.pageSize;return this.sipRelationList.slice(e,t)}}),data:function(){return{loading:!1,pageNum:1,pageSize:9,total:0,tempSipList:[]}},mounted:function(){this.calculatePlayerHeight(),window.addEventListener("resize",this.calculatePlayerHeight,!0),this.tempSipList=this.sipRelationList,this.total=this.sipRelationList.length},methods:{calculatePlayerHeight:function(){var e=this;e.loading=!0,setTimeout((function(){e.sipList&&e.sipList.forEach((function(t,i){var a=e.$refs["player_".concat(i)][0].$refs.container,r=document.getElementById("deviceVideoCol").offsetWidth;a.style.width=r?r-10+"px":"300px",a.style.height="230px"})),e.loading=!1}),100)},getSipList:function(e){this.pageNum=e.page,this.pageSize=e.limit},handlePlay:function(e,t,i){var a=this;Object(l["k"])(t.deviceSipId,t.channelId).then((function(t){200===t.code&&(a.$refs["player_".concat(i)][0].isInit||a.$refs["player_".concat(i)][0].init(),a.tempSipList[i].streamId=t.data.streamId,a.tempSipList[i].playurl=t.data.playurl,a.$refs["player_".concat(i)][0].play(t.data.playurl),e.target.style.visibility="hidden")}))},handleClose:function(){if(this.sipList&&0!==this.sipList.length){var e=this;this.sipList.forEach((function(t,i){e.tempSipList[i].streamId&&Object(l["c"])(t.deviceSipId,t.channelId,e.tempSipList[i].streamId).then((function(e){})),e.$refs["player_".concat(i)][0]&&e.$refs["player_".concat(i)][0].close()}))}}},destroyed:function(){this.handleClose()}},d=c,u=(i("0aa9"),i("2877")),p=Object(u["a"])(d,a,r,!1,null,"43305f81",null);t["default"]=p.exports},"15fd":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));i("a4d3"),i("caad"),i("2532");function a(e,t){if(null==e)return{};var i={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;i[a]=e[a]}return i}function r(e,t){if(null==e)return{};var i,r,n=a(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)i=s[r],t.includes(i)||{}.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}},"1a6c":function(e,t,i){"use strict";i("4649")},"1a8c":function(e,t,i){},"1b86":function(e,t,i){},"1c4f":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[e.isSubDev?i("el-form-item",{attrs:{label:e.$t("device.device-functionlog.399522-0"),"label-width":"120px"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-functionlog.399522-1")},on:{change:e.selectSlave},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.slaveId,callback:function(t){e.$set(e.queryParams,"slaveId",t)},expression:"queryParams.slaveId"}},e._l(e.slaveList,(function(e){return i("el-option",{key:e.slaveId,attrs:{label:e.deviceName+" ({{ $t('device.device-functionlog.399522-2') }}{slave.slaveId})",value:e.slaveId}})})),1)],1):e._e(),i("el-form-item",{attrs:{prop:"funType"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-functionlog.399522-4"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.funType,callback:function(t){e.$set(e.queryParams,"funType",t)},expression:"queryParams.funType"}},e._l(e.dict.type.iot_function_type,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{prop:"identify"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-functionlog.399522-6"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.identify,callback:function(t){e.$set(e.queryParams,"identify",t)},expression:"queryParams.identify"}})],1),i("el-form-item",[i("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":e.$t("device.device-functionlog.399522-8"),"end-placeholder":e.$t("device.device-functionlog.399522-9")},model:{value:e.daterangeTime,callback:function(t){e.daterangeTime=t},expression:"daterangeTime"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.device-functionlog.399522-10")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.device-functionlog.399522-11")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.logList,border:!1},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-27"),align:"left",prop:"modelName","min-width":"120"}}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-5"),align:"left",prop:"identify","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-12"),align:"center",prop:"funType","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_function_type,value:t.row.funType}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-13"),align:"left",prop:"funValue","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){return["bool"===t.row.dataType?i("sapn",[e._v(e._s("1"===t.row.funValue?e.$t("device.device-functionlog.399522-28"):e.$t("device.device-functionlog.399522-29")))]):i("span",[e._v(e._s(t.row.funValue))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-7"),align:"left",prop:"serialNumber","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-15"),align:"center",prop:"createTime",width:"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-functionlog.399522-16"),align:"center",prop:"resultMsg","min-width":"160"}}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:log:remove"],expression:"['iot:log:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(i){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("device.device-functionlog.399522-18")))])]}}])})],1),i("div",{staticStyle:{height:"60px"}},[i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)],1)},r=[],n=i("5530"),s=(i("d81d"),i("dc9c")),o={name:"device-func",dicts:["iot_function_type","iot_yes_no"],props:{device:{type:Object,default:null}},watch:{device:function(e){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.isSubDev=this.deviceInfo.subDeviceList&&this.deviceInfo.subDeviceList.length>0,this.queryParams.deviceId=this.deviceInfo.deviceId,this.queryParams.slaveId=this.deviceInfo.slaveId,this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.slaveList=e.subDeviceList,this.getList())}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,logList:[],title:"",open:!1,deviceInfo:{},daterangeTime:[],queryParams:{pageNum:1,pageSize:10,identify:null,funType:null,funValue:null,messageId:null,deviceName:null,serialNumber:null,mode:null,userId:null,resultMsg:null,resultCode:null,slaveId:null},form:{},isSubDev:!1,slaveList:[],rules:{identify:[{required:!0,message:this.$t("device.device-functionlog.399522-20"),trigger:"blur"}],funType:[{required:!0,message:this.$t("device.device-functionlog.399522-21"),trigger:"change"}],funValue:[{required:!0,message:this.$t("device.device-functionlog.399522-22"),trigger:"blur"}],serialNumber:[{required:!0,message:this.$t("device.device-functionlog.399522-23"),trigger:"blur"}]}}},created:function(){this.queryParams.serialNumber=this.device.serialNumber,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,null!=this.daterangeTime&&""!=this.daterangeTime?(this.queryParams.beginTime=this.daterangeTime[0],this.queryParams.endTime=this.daterangeTime[1]):(this.queryParams.beginTime="",this.queryParams.endTime=""),this.queryParams.slaveId&&(this.queryParams.serialNumber=this.queryParams.serialNumber+"_"+this.queryParams.slaveId),Object(s["b"])(this.queryParams).then((function(t){e.logList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,identify:null,funType:null,funValue:null,messageId:null,deviceName:null,serialNumber:null,mode:null,userId:null,resultMsg:null,resultCode:null,createBy:null,createTime:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleDelete:function(e){var t=this,i=e.id||this.ids;this.$modal.confirm(this.$t("device.device-functionlog.399522-24",[i])).then((function(){return Object(s["a"])(i)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("device.device-functionlog.399522-26"))})).catch((function(){}))},handleExport:function(){this.download("iot/log/export",Object(n["a"])({},this.queryParams),"log_".concat((new Date).getTime(),".xlsx"))},selectSlave:function(){}}},l=o,c=i("2877"),d=Object(c["a"])(l,a,r,!1,null,null,null);t["default"]=d.exports},"20a4":function(e,t,i){},"20f7":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"device-scada-wrap"},[e.isScada?i("div",{staticClass:"scada",style:{height:e.contentHeight+"px"}},[i(e.scadaComp,{ref:"deviceScada",tag:"component",attrs:{fullScreemTip:!1,isContextmenu:!1}})],1):i("div",[i("el-empty",{attrs:{description:e.$t("device.scada.789543-0")}})],1)])},r=[],n=i("5530"),s=(i("14d9"),{name:"DeviceScada",props:{device:{type:Object,default:null}},watch:{device:{deep:!0,handler:function(e,t){e.guid?(this.getScadaComp(),this.isScada=!0):this.isScada=!1}}},data:function(){return{isScada:!1,contentHeight:window.innerHeight,scadaComp:null}},mounted:function(){var e=this.device.guid;e?(this.getScadaComp(),this.isScada=!0):this.isScada=!1},methods:{calculateContentHeight:function(){var e=document.getElementById("deviceDetailTab").offsetHeight;this.contentHeight=parseFloat(e)},getScadaComp:function(){var e=this.device,t=e.guid,i=e.serialNumber;this.$router.push({query:Object(n["a"])(Object(n["a"])({},this.$route.query),{},{guid:t,serialNumber:i,type:1})})}}}),o=s,l=(i("46c2"),i("2877")),c=Object(l["a"])(o,a,r,!1,null,"0c1beae2",null);t["default"]=c.exports},"2f32":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"instruction-parsing"},[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"70px"}},[i("el-form-item",{attrs:{prop:"jobName"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-modbus-task.384302-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.jobName,callback:function(t){e.$set(e.queryParams,"jobName",t)},expression:"queryParams.jobName"}})],1),i("el-form-item",{attrs:{prop:"status"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-modbus-task.384302-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.dict.type.sys_job_status,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.device-modbus-task.384302-4")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.device-modbus-task.384302-5")))])],1),i("el-form-item",{staticStyle:{float:"right"}},[i("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.openEdit}},[e._v(e._s(e.$t("device.device-modbus.433390-1")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.jobList,border:!1}},[i("el-table-column",{attrs:{label:e.$t("device.device-modbus-task.384302-56"),align:"center",prop:"taskId","min-width":"100"}}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-7"),align:"center",prop:"jobName","min-width":"180"}}),i("el-table-column",{attrs:{label:e.$t("device.device-modbus-task.384302-57"),align:"center",prop:"command","min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("device.device-modbus-task.384302-58"),align:"center",prop:"status","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":0,"inactive-value":1},on:{change:function(i){return e.handleStatusChange(t.row)}},model:{value:t.row.status,callback:function(i){e.$set(t.row,"status",i)},expression:"scope.row.status"}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-modbus-task.384302-59"),align:"center",prop:"remarkStr","min-width":"110"}}),i("el-table-column",{attrs:{label:e.$t("device.device-modbus-task.384302-60"),align:"center","class-name":"small-padding fixed-width",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["modbus:job:remove"],expression:"['modbus:job:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(i){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("device.device-modbus-task.384302-61")))])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),i("el-dialog",{attrs:{title:e.editName?e.$t("device.device-modbus-task.384302-12"):e.$t("device.device-modbus-task.384302-13"),visible:e.editDialog,width:e.editName?"800":"900"},on:{"update:visible":function(t){e.editDialog=t}}},[i("div",{staticClass:"dialog-content"},[i("el-form",{attrs:{model:e.createForm,"label-position":"top"}},[i("el-form-item",{attrs:{label:e.$t("device.device-modbus-task.384302-0"),prop:"jobName"}},[i("el-input",{staticClass:"input-item",attrs:{placeholder:e.$t("device.device-modbus-task.384302-1")},model:{value:e.createForm.jobName,callback:function(t){e.$set(e.createForm,"jobName",t)},expression:"createForm.jobName"}})],1),i("el-row",{attrs:{gutter:40}},[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-modbus-task.384302-14"),prop:"path"}},[i("el-input",{staticClass:"input-item",attrs:{disabled:""},model:{value:e.createForm.path,callback:function(t){e.$set(e.createForm,"path",t)},expression:"createForm.path"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-modbus-task.384302-15"),prop:"functionCode"}},[i("el-select",{staticClass:"input-item",on:{change:e.changeNum},model:{value:e.createForm.functionCode,callback:function(t){e.$set(e.createForm,"functionCode",t)},expression:"createForm.functionCode"}},e._l(e.functionCodeList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{prop:"startPath"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"auto"}},[e._v(e._s(e.$t("device.device-modbus-task.384302-16")))]),i("el-tooltip",{attrs:{content:e.createForm.startPathSwitch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},model:{value:e.createForm.startPathSwitch,callback:function(t){e.$set(e.createForm,"startPathSwitch",t)},expression:"createForm.startPathSwitch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==e.createForm.startPathSwitch,expression:"createForm.startPathSwitch == 'Dec'"}],staticClass:"input-item",attrs:{type:"number",min:0},on:{change:function(){e.createForm.startPath16=e.int2hex(e.createForm.startPath)},input:function(){e.createForm.startPath16=e.int2hex(e.createForm.startPath)}},model:{value:e.createForm.startPath,callback:function(t){e.$set(e.createForm,"startPath",t)},expression:"createForm.startPath"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(e.createForm.startPath16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=e.createForm.startPathSwitch,expression:"createForm.startPathSwitch != 'Dec'"}],on:{input:function(){e.createForm.startPath=e.hex2int(e.createForm.startPath16)}},model:{value:e.createForm.startPath16,callback:function(t){e.$set(e.createForm,"startPath16",t)},expression:"createForm.startPath16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.createForm.startPath))])])],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!["05","06"].includes(e.createForm.functionCode),expression:"!['05', '06'].includes(createForm.functionCode)"}],attrs:{label:e.registerNumTitle,prop:"registerNum"}},[i("el-input-number",{staticClass:"input-item",attrs:{"controls-position":"right",min:0},on:{change:e.changeNum},model:{value:e.createForm.registerNum,callback:function(t){e.$set(e.createForm,"registerNum",t)},expression:"createForm.registerNum"}})],1),i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:["05","06"].includes(e.createForm.functionCode),expression:"['05', '06'].includes(createForm.functionCode)"}],attrs:{prop:"setValue"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"auto"}},[e._v(e._s(e.registerNumTitle))]),i("el-tooltip",{attrs:{content:e.createForm.setValueSwitch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},model:{value:e.createForm.setValueSwitch,callback:function(t){e.$set(e.createForm,"setValueSwitch",t)},expression:"createForm.setValueSwitch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==e.createForm.setValueSwitch,expression:"createForm.setValueSwitch == 'Dec'"}],attrs:{type:"number"},on:{change:function(){e.createForm.setValue16=e.int2hex(e.createForm.setValue)},input:function(){e.createForm.setValue16=e.int2hex(e.createForm.setValue)}},model:{value:e.createForm.setValue,callback:function(t){e.$set(e.createForm,"setValue",t)},expression:"createForm.setValue"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(e.createForm.setValue16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=e.createForm.setValueSwitch,expression:"createForm.setValueSwitch != 'Dec'"}],on:{input:function(){e.createForm.setValue=e.hex2int(e.createForm.setValue16)}},model:{value:e.createForm.setValue16,callback:function(t){e.$set(e.createForm,"setValue16",t)},expression:"createForm.setValue16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.createForm.setValue))])])],1)],1),e._l(e.registerValList,(function(t,a){return i("el-col",{directives:[{name:"show",rawName:"v-show",value:"16"==e.createForm.functionCode,expression:"createForm.functionCode == '16'"}],key:"register"+a,attrs:{span:12}},[i("el-form-item",{attrs:{prop:"registerValList"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"auto"}},[e._v("#"+e._s(a)+" "+e._s(e.$t("device.device-modbus-task.384302-17")))]),i("el-tooltip",{attrs:{content:t.switch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},on:{change:function(){e.refreshRegisterInpust(t,a)}},model:{value:t.switch,callback:function(i){e.$set(t,"switch",i)},expression:"item.switch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==t.switch,expression:"item.switch == 'Dec'"}],attrs:{type:"number",min:0},on:{change:function(){t.value16=e.int2hex(t.value),e.refreshRegisterInpust(t,a)},input:function(){t.value16=e.int2hex(t.value),e.refreshRegisterInpust(t,a)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(t.value16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=t.switch,expression:"item.switch != 'Dec'"}],on:{input:function(){t.value=e.hex2int(t.value16),e.refreshRegisterInpust(t,a)}},model:{value:t.value16,callback:function(i){e.$set(t,"value16",i)},expression:"item.value16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(t.value))])])],1)],1)})),e._l(e.IOValList,(function(t,a){return i("el-col",{directives:[{name:"show",rawName:"v-show",value:"15"==e.createForm.functionCode,expression:"createForm.functionCode == '15'"}],key:"IO"+a,attrs:{span:6}},[i("el-form-item",{attrs:{prop:"registerValList"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"auto"}},[e._v("#"+e._s(a)+" "+e._s(e.$t("device.device-modbus-task.384302-18")))])]),i("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(){e.refreshIOInpust(t,a)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1)],1)}))],2),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-2"),prop:"status"}},[i("el-radio-group",{model:{value:e.createForm.status,callback:function(t){e.$set(e.createForm,"status",t)},expression:"createForm.status"}},e._l(e.dict.type.sys_job_status,(function(t){return i("el-radio",{key:t.value,attrs:{label:Number(t.value)}},[e._v(e._s(t.label))])})),1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-modbus-task.384302-19"),prop:"cycleType"}},[i("div",{staticClass:"timer-wrap"},[i("el-radio-group",{on:{input:e.handleCycleTypeInput},model:{value:e.createForm.cycleType,callback:function(t){e.$set(e.createForm,"cycleType",t)},expression:"createForm.cycleType"}},[i("el-radio",{staticStyle:{display:"block"},attrs:{label:1}},[e._v(" "+e._s(e.$t("device.device-modbus-task.384302-20"))+" "),i("el-tooltip",{attrs:{placement:"right"}},[i("div",{attrs:{slot:"content"},slot:"content"},[e._v(" "+e._s(e.$t("device.device-modbus-task.384302-21"))+" "),i("br"),e._v(" "+e._s(e.$t("device.device-modbus-task.384302-22"))+" ")]),i("i",{staticClass:"el-icon-question",staticStyle:{color:"#909399"}})]),i("div",{staticClass:"timer-period"},[i("span",[e._v(e._s(e.$t("device.device-modbus-task.384302-23")))]),i("el-select",{staticStyle:{width:"100px","margin-left":"10px"},attrs:{size:"mini",disabled:2===e.createForm.cycleType},on:{change:e.handleCycleInterval},model:{value:e.cycles1[0].interval,callback:function(t){e.$set(e.cycles1[0],"interval",t)},expression:"cycles1[0].interval"}},e._l(e.dict.type.variable_operation_interval,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),"week"===e.cycles1[0].interval?i("el-select",{staticStyle:{width:"100px","margin-left":"5px"},attrs:{size:"mini",disabled:2===e.createForm.cycleType},model:{value:e.cycles1[0].week,callback:function(t){e.$set(e.cycles1[0],"week",t)},expression:"cycles1[0].week"}},e._l(e.dict.type.variable_operation_week,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),"month"===e.cycles1[0].interval?i("el-select",{staticStyle:{width:"100px","margin-left":"5px"},attrs:{size:"mini",disabled:2===e.createForm.cycleType},model:{value:e.cycles1[0].day,callback:function(t){e.$set(e.cycles1[0],"day",t)},expression:"cycles1[0].day"}},e._l(e.dict.type.variable_operation_day,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),"day"===e.cycles1[0].interval||"week"===e.cycles1[0].interval||"month"===e.cycles1[0].interval?i("el-select",{staticStyle:{width:"100px","margin-left":"5px"},attrs:{size:"mini",disabled:2===e.createForm.cycleType},on:{change:e.handleCycleTime},model:{value:e.cycles1[0].time,callback:function(t){e.$set(e.cycles1[0],"time",t)},expression:"cycles1[0].time"}},e._l(e.dict.type.variable_operation_time,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),i("span",{staticStyle:{"margin-left":"10px"}},[e._v(e._s(e.$t("device.device-modbus-task.384302-24")))])],1)],1)],1)],1)])],1),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.createLoading,expression:"createLoading"}]},[i("div",{staticClass:"create-title"},[i("el-button",{attrs:{type:"text"},on:{click:function(t){return t.stopPropagation(),e.encode(t)}}},[e._v(e._s(e.$t("device.device-modbus-task.384302-25")))]),i("div",{staticClass:"title-right"},[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.copyText(e.createCode)}}},[e._v(e._s(e.$t("device.device-modbus-task.384302-26")))])],1)],1),i("div",{staticClass:"create-code"},[e._v(e._s(e.createCode))])])],1),i("div",{staticClass:"dialog-btn",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:""},on:{click:function(t){e.editDialog=!1}}},[e._v(e._s(e.$t("device.device-modbus-task.384302-27")))]),i("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("confirm")))])],1)])],1)},r=[],n=i("c7eb"),s=i("1da1"),o=(i("a15b"),i("d81d"),i("14d9"),i("a434"),i("e9c4"),i("a9e3"),i("b64b"),i("cf45")),l=i("bc13"),c=i("5e6c"),d={name:"device-modbus-task",dicts:["sys_job_group","sys_job_status","variable_operation_interval","variable_operation_time","variable_operation_week","variable_operation_day","variable_operation_type"],props:{device:{type:Object,default:null}},watch:{device:{deep:!0,handler:function(e,t){e.deviceId&&e.deviceId!==t.deviceId&&(this.queryParams.subDeviceId=e.deviceId,this.deviceInfo=e,this.getList())}}},computed:{registerNumTitle:function(){switch(this.createForm.functionCode){case"01":case"02":case"15":return this.$t("device.device-modbus-task.384302-29");case"03":case"04":case"16":return this.$t("device.device-modbus-task.384302-30");case"05":return this.$t("device.device-modbus-task.384302-31");case"06":return this.$t("device.device-modbus-task.384302-32")}}},data:function(){return{format:"Hex",loading:!1,editDialog:!1,createForm:{cycleType:1,status:0},ids:[],single:!0,multiple:!0,total:0,functionCodeList:[{label:this.$t("device.device-modbus-task.384302-33"),value:"01"},{label:this.$t("device.device-modbus-task.384302-34"),value:"02"},{label:this.$t("device.device-modbus-task.384302-35"),value:"03"},{label:this.$t("device.device-modbus-task.384302-36"),value:"04"},{label:this.$t("device.device-modbus-task.384302-37"),value:"05"},{label:this.$t("device.device-modbus-task.384302-38"),value:"06"},{label:this.$t("device.device-modbus-task.384302-39"),value:"15"},{label:this.$t("device.device-modbus-task.384302-40"),value:"16"}],jobList:[],showSearch:!0,createCode:"",registerValList:[],IOValList:[],editName:!1,editNameForm:{},createLoading:!1,delDialog:!1,delItem:{},deviceInfo:{},subdeviceId:"",queryParams:{pageNum:1,pageSize:10,subDeviceId:null,subSerialNumber:null,command:null,jobId:null,status:null},cycles1:[{interval:"300",time:"",week:"",day:""}],cycles2:[{type:"day",time:"00",week:"",day:"",toType:"1",toTime:"02",toWeek:"",toDay:""}]}},methods:{getList:function(){var e=this;this.loading=!0,Object(c["g"])(this.queryParams).then((function(t){e.jobList=t.rows,e.total=t.total,e.loading=!1}))},submitForm:function(){var e=this;null!=this.createForm.taskId?Object(c["i"])(this.createForm).then((function(t){e.$modal.msgSuccess(e.$t("device.device-modbus-task.384302-62")),e.open=!1,e.getList()})):Object(c["a"])(this.createForm).then((function(t){e.$modal.msgSuccess(e.$t("device.device-modbus-task.384302-63")),e.open=!1,e.getList()}))},handleDelete:function(e){var t=this,i=e.taskId||this.ids,a={taskId:i,jobId:e.jobId};this.$modal.confirm(this.$t("device.device-modbus-task.384302-64",[i])).then((function(){return Object(c["c"])(a)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("device.device-modbus-task.384302-65"))})).catch((function(){}))},handleAdd:function(){var e=this,t={slaveId:parseInt(this.createForm.path),address:this.createForm.startPath,code:parseInt(this.createForm.functionCode),protocolCode:this.device.protocolCode,serialNumber:this.device.serialNumber};switch(this.createForm.functionCode){case"01":case"02":case"03":case"04":t.count=this.createForm.registerNum;break;case"05":case"06":t.writeData=this.createForm.setValue;break;case"15":t.count=this.createForm.registerNum;var i=this.IOValList.map((function(e){return e.value}));t.bitString=i.join("");break;case"16":t.count=this.createForm.registerNum;var a=this.registerValList.map((function(e){return e.value}));t.tenWriteData=a;break}Object(l["d"])(t).then((function(t){e.createCode=t.msg,e.handlePush()}))},handlePush:function(){var e="",t=this.cycles1.map((function(e){return"hour"===e.interval?{type:"hour"}:"day"===e.interval?{type:"day",time:e.time}:"week"===e.interval?{type:"week",week:e.week,time:e.time}:"month"===e.interval?{type:"month",day:e.day,time:e.time}:{interval:e.interval}}));e=JSON.stringify(t),this.createForm.subDeviceId=this.device.deviceId,this.createForm.subSerialNumber=this.device.serialNumber,this.createForm.command=this.createCode,this.createForm.remark=e,this.submitForm(),this.editDialog=!1},openEdit:function(){this.resetCreateForm(),this.getSlaveId(),this.editName=!1},reset:function(){this.form={taskId:null,subDeviceId:null,subSerialNumber:null,command:null,jobId:null,status:0,createBy:null,createTime:null,remark:null},this.resetForm("form")},resetCreateForm:function(){this.createForm={path:"01",functionCode:"01",startPath:0,startPath16:"0000",registerNum:1,startPathSwitch:"Dec",setValue:0,setValue16:"0000",setValueSwitch:"Dec",status:0,cycleType:1},this.createCode=""},int2hex:function(e){return Object(o["f"])(e)},hex2int:function(e){return Object(o["e"])(e)},changeNum:function(){if("16"==this.createForm.functionCode){for(var e=0;e<this.createForm.registerNum;e++){var t=this.registerValList[e];t||(this.registerValList[e]={value:0,value16:"0000",switch:"Dec"})}if(this.registerValList.length>this.createForm.registerNum){var i=this.registerValList.length-this.createForm.registerNum;this.registerValList.splice(this.createForm.registerNum,i)}}if("15"==this.createForm.functionCode){for(var a=0;a<this.createForm.registerNum;a++){var r=this.IOValList[a];r||(this.IOValList[a]={value:"0"})}if(this.IOValList.length>this.createForm.registerNum){var n=this.IOValList.length-this.createForm.registerNum;this.IOValList.splice(this.createForm.registerNum,n)}}},refreshRegisterInpust:function(e,t){this.$set(this.registerValList,t,e)},refreshIOInpust:function(e,t){this.$set(this.IOValList,t,e)},copyText:function(e){var t=Object(o["a"])(e);this.$message({type:t.type,message:t.message})},encode:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i,a,r,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:t.prev=0,e.createLoading=!0,i={slaveId:parseInt(e.createForm.path),address:e.createForm.startPath,code:parseInt(e.createForm.functionCode),protocolCode:e.device.protocolCode,serialNumber:e.device.serialNumber},t.t0=e.createForm.functionCode,t.next="01"===t.t0||"02"===t.t0||"03"===t.t0||"04"===t.t0?6:"05"===t.t0||"06"===t.t0?8:"15"===t.t0?10:"16"===t.t0?14:18;break;case 6:return i.count=e.createForm.registerNum,t.abrupt("break",18);case 8:return i.writeData=e.createForm.setValue,t.abrupt("break",18);case 10:return i.count=e.createForm.registerNum,a=e.IOValList.map((function(e){return e.value})),i.bitString=a.join(""),t.abrupt("break",18);case 14:return i.count=e.createForm.registerNum,r=e.registerValList.map((function(e){return e.value})),i.tenWriteData=r,t.abrupt("break",18);case 18:return t.next=20,Object(l["d"])(i);case 20:s=t.sent,e.createCode=s.msg,t.next=27;break;case 24:t.prev=24,t.t1=t["catch"](0),e.$message({type:"error",message:t.t1.message||e.$t("device.device-modbus-task.384302-41")});case 27:return t.prev=27,e.createLoading=!1,t.finish(27);case 30:case"end":return t.stop()}}),t,null,[[0,24,27,30]])})))()},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},getSlaveId:function(){var e=this;4===this.device.deviceType&&(this.subdeviceId=this.device.deviceId),Object(c["f"])(this.device.productId,this.subdeviceId).then((function(t){t.data?e.editDialog=!0:e.$confirm(e.$t("device.device-modbus-task.384302-66"),e.$t("device.device-modbus-task.384302-67"),{confirmButtonText:e.$t("device.device-modbus-task.384302-68"),cancelButtonText:e.$t("device.device-modbus-task.384302-69"),type:"warning"}).then((function(){})).catch((function(){e.editDialog=!1,e.$message({type:"info",message:e.$t("device.device-modbus-task.384302-70")})})),e.createForm.path=t.data}))},handleStatusChange:function(e){var t=this,i=0===e.status?this.$t("device.device-modbus-task.384302-42"):this.$t("device.device-modbus-task.384302-43");this.$modal.confirm(this.$t("device.device-modbus-task.384302-44",[i+""+e.jobId])).then((function(){return Object(c["i"])(e.taskId,e.status)})).then((function(){t.$modal.msgSuccess(i+t.$t("device.device-modbus-task.384302-45"))})).catch((function(){e.status=0===e.status?0:1}))},formatCronDisplay:function(e){var t="";if(0==e.isAdvance){var i='<br /><span style="color:#F56C6C">时间 '+e.cronExpression.substring(5,7)+":"+e.cronExpression.substring(2,4)+"</span>",a=e.cronExpression.substring(12);if("1,2,3,4,5,6,7"==a)t=this.$t("device.device-modbus-task.384302-47");else{for(var r=a.split(","),n=0;n<r.length;n++)"1"==r[n]?t+=this.$t("device.device-modbus-task.384302-48"):"2"==r[n]?t+=this.$t("device.device-modbus-task.384302-49"):"3"==r[n]?t+=this.$t("device.device-modbus-task.384302-50"):"4"==r[n]?t+=this.$t("device.device-modbus-task.384302-51"):"5"==r[n]?t+=this.$t("device.device-modbus-task.384302-52"):"6"==r[n]?t+=this.$t("device.device-modbus-task.384302-53"):"7"==r[n]&&(t+=this.$t("device.device-modbus-task.384302-54"));t=t.substring(0,t.length-1)+" "+i}}else t=this.$t("device.device-modbus-task.384302-55");return t},handleUpdate:function(e){var t=this;this.reset();var i=e.jobId||this.ids;Object(c["e"])(i).then((function(e){t.form=e.data,t.actionList=JSON.parse(t.form.actions);for(var i=0;i<t.actionList.length;i++)1==t.actionList[i].type?t.setParentAndModelData(t.actionList[i],t.thingsModel.properties):2==t.actionList[i].type&&t.setParentAndModelData(t.actionList[i],t.thingsModel.functions);if(0==t.form.isAdvance){var a=t.form.cronExpression.substring(12).split(",").map(Number);t.timerWeekValue=a,t.timerTimeValue=t.form.cronExpression.substring(5,7)+":"+t.form.cronExpression.substring(2,4)}t.open=!0,t.title=t.$t("device.device-timer.433369-71")}))},handleCustomIntervalAdd:function(){this.cycles2.push({type:"day",time:"00",week:"",day:"",toType:"1",toTime:"02",toWeek:"",toDay:""})},handleCycleTypeInput:function(e){1===e?this.cycles2=[{type:"day",time:"00",week:"",day:"",toType:"1",toTime:"02",toWeek:"",toDay:""}]:this.cycles1=[{interval:"hour",time:"",week:"",day:""}]},handleCustomIntervalDelete:function(e){this.cycles2.splice(e,1)},handleCycleInterval:function(e){"hour"===e?this.$set(this.cycles1,0,{interval:e,time:"",week:"",day:""}):"day"===e?this.$set(this.cycles1,0,{interval:e,time:"01",week:"",day:""}):"week"===e?this.$set(this.cycles1,0,{interval:e,time:"01",week:"1",day:""}):"month"===e?this.$set(this.cycles1,0,{interval:e,time:"01",week:"",day:"1"}):this.$set(this.cycles1,0,{interval:e,time:"",week:"",day:""})},handleCustomInterval:function(e,t){"day"===t?this.$set(this.cycles2,e,{type:t,time:"00",week:"",day:"",toType:"1",toTime:"02",toWeek:"",toDay:""}):"week"===t?this.$set(this.cycles2,e,{type:t,time:"00",week:"1",day:"",toType:"3",toTime:"02",toWeek:"2",toDay:""}):"month"===t&&this.$set(this.cycles2,e,{type:t,time:"00",week:"",day:"1",toType:"4",toTime:"02",toWeek:"",toDay:"2"})}},mounted:function(){var e=this.device.deviceId;e&&(this.queryParams.subDeviceId=e,this.getList()),this.resetCreateForm()}},u=d,p=(i("a04d"),i("2877")),h=Object(p["a"])(u,a,r,!1,null,"dbfb9730",null);t["default"]=h.exports},"307e":function(e,t,i){},"321e":function(e,t,i){},3398:function(e,t,i){"use strict";i("321e")},"349e":function(e,t,i){!function(t,a){e.exports=a(i("a026"),i("b311"))}(0,(function(e,t){return r={},i.m=a=[function(e,t,i){"use strict";function a(e,t,i,a,r,n,s,o){var l,c,d="function"==typeof e?e.options:e;return t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),a&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},d._ssrRegister=l):r&&(l=o?function(){r.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:r),l&&(d.functional?(d._injectStyles=l,c=d.render,d.render=function(e,t){return l.call(t),c(e,t)}):(o=d.beforeCreate,d.beforeCreate=o?[].concat(o,l):[l])),{exports:e,options:d}}i.d(t,"a",(function(){return a}))},function(e,t,i){"use strict";i.r(t);var a,r=i(2),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),s(i(29));var a=s(i(21)),r=s(i(41)),n=i(42);function s(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonViewer",components:{JsonBox:a.default},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"jv-light"},timeformat:{type:Function,default:function(e){return e.toLocaleString()}},previewMode:{type:Boolean,default:!1},showArrayIndex:{type:Boolean,default:!0},showDoubleQuotes:{type:Boolean,default:!1}},provide:function(){return{expandDepth:this.expandDepth,timeformat:this.timeformat,onKeyclick:this.onKeyclick}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},computed:{jvClass:function(){return"jv-container "+this.theme+(this.boxed?" boxed":"")},copyText:function(){var e=this.copyable;return{copyText:e.copyText||"copy",copiedText:e.copiedText||"copied!",timeout:e.timeout||2e3,align:e.align}}},watch:{value:function(){this.onResized()}},mounted:function(){var e=this;this.debounceResized=(0,n.debounce)(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable&&new r.default(this.$refs.clip,{container:this.$refs.viewer,text:function(){return JSON.stringify(e.value,null,2)}}).on("success",(function(t){e.onCopied(t)}))},methods:{onResized:function(){this.debounceResized()},debResized:function(){var e=this;this.$nextTick((function(){e.$refs.jsonBox&&(250<=e.$refs.jsonBox.$el.clientHeight?e.expandableCode=!0:e.expandableCode=!1)}))},onCopied:function(e){var t=this;this.copied||(this.copied=!0,setTimeout((function(){t.copied=!1}),this.copyText.timeout),this.$emit("copied",e))},toggleExpandCode:function(){this.expandCode=!this.expandCode},onKeyclick:function(e){this.$emit("keyclick",e)}}}},function(e,t,i){"use strict";i.r(t);var a,r=i(4),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=p(i(30)),n=p(i(31)),s=p(i(32)),o=p(i(33)),l=p(i(34)),c=p(i(35)),d=p(i(36)),u=p(i(37));function p(e){return e&&e.__esModule?e:{default:e}}t.default={name:"JsonBox",inject:["expandDepth","onKeyclick"],props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean,forceExpand:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:{type:String,default:"$"}},data:function(){return{expand:!0,forceExpandMe:this.forceExpand}},mounted:function(){this.expand=this.previewMode||!(this.depth>=this.expandDepth)||this.forceExpandMe},methods:{toggle:function(){this.expand=!this.expand,this.dispatchEvent()},toggleAll:function(){this.expand=!this.expand,this.forceExpandMe=this.expand,this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}},getPath:function(){for(var e=[this.keyName],t=this.$parent;t.depth;)t.$el.classList.contains("jv-node")&&e.push(t.keyName),t=t.$parent;return e.reverse()}},render:function(e){var t=this,i=[],p=void 0;null===this.value||void 0===this.value?p=n.default:Array.isArray(this.value)?p=c.default:"[object Date]"===Object.prototype.toString.call(this.value)?p=u.default:"object"===a(this.value)?p=l.default:"number"==typeof this.value?p=s.default:"string"==typeof this.value?p=r.default:"boolean"==typeof this.value?p=o.default:"function"==typeof this.value&&(p=d.default);var h=this.keyName&&this.value&&(Array.isArray(this.value)||"object"===a(this.value)&&"[object Date]"!==Object.prototype.toString.call(this.value));return!this.previewMode&&h&&i.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}}})),this.keyName&&i.push(e("span",{class:{"jv-key":!0},domProps:{innerText:this.showDoubleQuotes?'"'+this.keyName+'":':this.keyName+":"},on:{click:function(){t.onKeyclick(t.path)}}})),i.push(e(p,{class:{"jv-push":!0},props:{jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand,previewMode:this.previewMode,forceExpand:this.forceExpandMe,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path},on:{"update:expand":function(e){t.expand=e},"update:expandAll":function(e){t.expand=e,t.forceExpandMe=t.expand}}})),e("div",{class:{"jv-node":!0,"jv-key-node":Boolean(this.keyName)&&!h,toggle:!this.previewMode&&h}},i)}}},function(e,t,i){"use strict";i.r(t);var a,r=i(6),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=/^\w+:\/\//;t.default={name:"JsonString",props:{jsonValue:{type:String,required:!0}},data:function(){return{expand:!0,canExtend:!1}},mounted:function(){this.$refs.itemRef.offsetHeight>this.$refs.holderRef.offsetHeight&&(this.canExtend=!0)},methods:{toggle:function(){this.expand=!this.expand}},render:function(e){var t=this.jsonValue,i=a.test(t),r=void 0;return this.expand?(r={class:{"jv-item":!0,"jv-string":!0},ref:"itemRef"}).domProps=i?{innerHTML:'"'+(t='<a href="'+t+'" target="_blank" class="jv-link">'+t+"</a>").toString()+'"'}:{innerText:'"'+t.toString()+'"'}:r={class:{"jv-ellipsis":!0},on:{click:this.toggle},domProps:{innerText:"..."}},e("span",{},[this.canExtend&&e("span",{class:{"jv-toggle":!0,open:this.expand},on:{click:this.toggle}}),e("span",{class:{"jv-holder-node":!0},ref:"holderRef"}),e("span",r)])}}},function(e,t,i){"use strict";i.r(t);var a,r=i(8),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-undefined":!0},domProps:{innerText:null===t.props.jsonValue?"null":"undefined"}})}}},function(e,t,i){"use strict";i.r(t);var a,r=i(10),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(e,t){var i=t.props;t=Number.isInteger(i.jsonValue);return e("span",{class:{"jv-item":!0,"jv-number":!0,"jv-number-integer":t,"jv-number-float":!t},domProps:{innerText:i.jsonValue.toString()}})}}},function(e,t,i){"use strict";i.r(t);var a,r=i(12),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-boolean":!0},domProps:{innerText:t.props.jsonValue.toString()}})}}},function(e,t,i){"use strict";i.r(t);var a,r=i(14),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i=i(21);var a=(i=i)&&i.__esModule?i:{default:i};t.default={name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,forceExpand:Boolean,sort:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:{}}},computed:{ordered:function(){var e=this;if(!this.sort)return this.value;var t={};return Object.keys(this.value).sort().forEach((function(i){t[i]=e.value[i]})),t}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this;setTimeout((function(){t.value=e}),0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit("update:expandAll",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t,i=this,r=[];if(this.previewMode||this.keyName||r.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?i.toggleAll():i.toggle()}}})),r.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"{"}})),this.expand)for(var n in this.ordered)this.ordered.hasOwnProperty(n)&&(t=this.ordered[n],r.push(e(a.default,{key:n,props:{sort:this.sort,keyName:n,depth:this.depth+1,value:t,previewMode:this.previewMode,forceExpand:this.forceExpand,showArrayIndex:this.showArrayIndex,showDoubleQuotes:this.showDoubleQuotes,path:this.path+"."+n}})));return!this.expand&&Object.keys(this.value).length&&r.push(e("span",{class:{"jv-ellipsis":!0},on:{click:function(e){e.altKey?i.toggleAll():i.toggle()}},attrs:{title:"click to reveal object content (keys: "+Object.keys(this.ordered).join(", ")+")"},domProps:{innerText:"..."}})),r.push(e("span",{class:{"jv-item":!0,"jv-object":!0},domProps:{innerText:"}"}})),e("span",r)}}},function(e,t,i){"use strict";i.r(t);var a,r=i(16),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i=i(21);var a=(i=i)&&i.__esModule?i:{default:i};t.default={name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,forceExpand:Boolean,previewMode:Boolean,showArrayIndex:Boolean,showDoubleQuotes:Boolean,path:String},data:function(){return{value:[]}},watch:{jsonValue:function(e){this.setValue(e)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(e){var t=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;0===i&&(this.value=[]),setTimeout((function(){e.length>i&&(t.value.push(e[i]),t.setValue(e,i+1))}),0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},toggleAll:function(){this.$emit("update:expandAll",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch(e){var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(e){var t=this,i=[];return this.previewMode||this.keyName||i.push(e("span",{class:{"jv-toggle":!0,open:!!this.expand},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}}})),i.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"["}})),this.expand&&this.value.forEach((function(r,n){i.push(e(a.default,{key:n,props:{sort:t.sort,keyName:t.showArrayIndex?""+n:"",depth:t.depth+1,value:r,previewMode:t.previewMode,forceExpand:t.forceExpand,showArrayIndex:t.showArrayIndex,showDoubleQuotes:t.showDoubleQuotes,path:t.path+"."+n}}))})),!this.expand&&this.value.length&&i.push(e("span",{class:{"jv-ellipsis":!0},on:{click:function(e){e.altKey?t.toggleAll():t.toggle()}},attrs:{title:"click to reveal "+this.value.length+" hidden items"},domProps:{innerText:"..."}})),i.push(e("span",{class:{"jv-item":!0,"jv-array":!0},domProps:{innerText:"]"}})),e("span",i)}}},function(e,t,i){"use strict";i.r(t);var a,r=i(18),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(e,t){return e("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:t.props.jsonValue.toString()},domProps:{innerHTML:"&lt;function&gt;"}})}}},function(e,t,i){"use strict";i.r(t);var a,r=i(20),n=i.n(r);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);t.default=n.a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"JsonDate",inject:["timeformat"],functional:!0,props:{jsonValue:{type:Date,required:!0}},render:function(e,t){var i=t.props;t=t.injections,i=i.jsonValue;return e("span",{class:{"jv-item":!0,"jv-string":!0},domProps:{innerText:'"'+(0,t.timeformat)(i)+'"'}})}}},function(e,t,i){"use strict";i.r(t);var a,r=i(3);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);i(38);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/json-box.vue",t.default=n.exports},function(e,t,i){"use strict";function a(){var e=this,t=e.$createElement;return(t=e._self._c||t)("div",{ref:"viewer",class:e.jvClass},[e.copyable?t("div",{class:"jv-tooltip "+(e.copyText.align||"right")},[t("span",{ref:"clip",staticClass:"jv-button",class:{copied:e.copied}},[e._t("copy",(function(){return[e._v("\n "+e._s(e.copied?e.copyText.copiedText:e.copyText.copyText)+"\n ")]}),{copied:e.copied})],2)]):e._e(),e._v(" "),t("div",{staticClass:"jv-code",class:{open:e.expandCode,boxed:e.boxed}},[t("json-box",{ref:"jsonBox",attrs:{value:e.value,sort:e.sort,"preview-mode":e.previewMode,"show-array-index":e.showArrayIndex,"show-double-quotes":e.showDoubleQuotes},on:{keyclick:e.onKeyclick}})],1),e._v(" "),e.expandableCode&&e.boxed?t("div",{staticClass:"jv-more",on:{click:e.toggleExpandCode}},[t("span",{staticClass:"jv-toggle",class:{open:!!e.expandCode}})]):e._e()])}var r=[];a._withStripped=!0,i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return r}))},function(e,t,i){var a=i(39);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};i(25)(a,r),a.locals&&(e.exports=a.locals)},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",a=e[3];return a?t&&"function"==typeof btoa?(e=function(e){return e=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),e="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e),"/*# ".concat(e," */")}(a),t=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")})),[i].concat(t).concat([e]).join("\n")):[i].join("\n"):i}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,a){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(a)for(var n=0;n<this.length;n++){var s=this[n][0];null!=s&&(r[s]=!0)}for(var o=0;o<e.length;o++){var l=[].concat(e[o]);a&&r[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},function(e,t,i){var a,r,n,s={},o=(a=function(){return window&&document&&document.all&&!window.atob},function(){return r=void 0===r?a.apply(this,arguments):r}),l=(n={},function(e){if(void 0===n[e]){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}),c=null,d=0,u=[],p=i(40);function h(e,t){for(var i=0;i<e.length;i++){var a=e[i],r=s[a.id];if(r){r.refs++;for(var n=0;n<r.parts.length;n++)r.parts[n](a.parts[n]);for(;n<a.parts.length;n++)r.parts.push(b(a.parts[n],t))}else{var o=[];for(n=0;n<a.parts.length;n++)o.push(b(a.parts[n],t));s[a.id]={id:a.id,refs:1,parts:o}}}}function f(e,t){for(var i=[],a={},r=0;r<e.length;r++){var n=e[r],s=t.base?n[0]+t.base:n[0];n={css:n[1],media:n[2],sourceMap:n[3]};a[s]?a[s].parts.push(n):i.push(a[s]={id:s,parts:[n]})}return i}function m(e,t){var i=l(e.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var a=u[u.length-1];if("top"===e.insertAt)a?a.nextSibling?i.insertBefore(t,a.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),u.push(t);else if("bottom"===e.insertAt)i.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");e=l(e.insertInto+" "+e.insertAt.before),i.insertBefore(t,e)}}function v(e){null!==e.parentNode&&(e.parentNode.removeChild(e),0<=(e=u.indexOf(e))&&u.splice(e,1))}function g(e){var t=document.createElement("style");return e.attrs.type="text/css",y(t,e.attrs),m(e,t),t}function y(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}function b(e,t){var i,a,r,n,s;if(t.transform&&e.css){if(!(n=t.transform(e.css)))return function(){};e.css=n}return r=t.singleton?(s=d++,i=c=c||g(t),a=x.bind(null,i,s,!1),x.bind(null,i,s,!0)):e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=t,s=document.createElement("link"),n.attrs.type="text/css",n.attrs.rel="stylesheet",y(s,n.attrs),m(n,s),i=s,a=function(e,t,i){var a=i.css,r=i.sourceMap;i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(a=p(a)),r&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),r=new Blob([a],{type:"text/css"}),a=e.href,e.href=URL.createObjectURL(r),a&&URL.revokeObjectURL(a)}.bind(null,i,t),function(){v(i),i.href&&URL.revokeObjectURL(i.href)}):(i=g(t),a=function(e,t){var i=t.css;t=t.media;if(t&&e.setAttribute("media",t),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}.bind(null,i),function(){v(i)}),a(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||a(e=t):r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var i=f(e,t);return h(i,t),function(e){for(var a=[],r=0;r<i.length;r++){var n=i[r];(o=s[n.id]).refs--,a.push(o)}e&&h(f(e,t),t);var o;for(r=0;r<a.length;r++)if(0===(o=a[r]).refs){for(var l=0;l<o.parts.length;l++)o.parts[l]();delete s[o.id]}}};var w,_=(w=[],function(e,t){return w[e]=t,w.filter(Boolean).join("\n")});function x(e,t,i,a){i=i?"":a.css;e.styleSheet?e.styleSheet.cssText=_(t,i):(a=document.createTextNode(i),(i=e.childNodes)[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a))}},function(e,t,i){var a=i(44);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};i(25)(a,r),a.locals&&(e.exports=a.locals)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i=i(28);var a=(i=i)&&i.__esModule?i:{default:i};t.default=Object.assign(a.default,{install:function(e){e.component("JsonViewer",a.default)}})},function(e,t,i){"use strict";i.r(t);var a,r=i(22),n=i(1);for(a in n)"default"!==a&&function(e){i.d(t,e,(function(){return n[e]}))}(a);i(43);var s=i(0);r=Object(s.a)(n.default,r.a,r.b,!1,null,null,null);r.options.__file="lib/json-viewer.vue",t.default=r.exports},function(t,i){t.exports=e},function(e,t,i){"use strict";i.r(t);var a,r=i(5);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-string.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(7);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-undefined.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(9);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-number.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(11);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-boolean.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(13);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-object.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(15);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-array.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(17);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-function.vue",t.default=n.exports},function(e,t,i){"use strict";i.r(t);var a,r=i(19);for(a in r)"default"!==a&&function(e){i.d(t,e,(function(){return r[e]}))}(a);var n=i(0);n=Object(n.a)(r.default,void 0,void 0,!1,null,null,null);n.options.__file="lib/types/json-date.vue",t.default=n.exports},function(e,t,i){"use strict";i(23)},function(e,t,i){(t=i(24)(!1)).push([e.i,".jv-node{position:relative}.jv-node:after{content:','}.jv-node:last-of-type:after{content:''}.jv-node.toggle{margin-left:13px !important}.jv-node .jv-node{margin-left:25px}\n",""]),e.exports=t},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var i=t.protocol+"//"+t.host,a=i+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){t=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(t)?e:(t=0===t.indexOf("//")?t:0===t.indexOf("/")?i+t:a+t.replace(/^\.\//,""),"url("+JSON.stringify(t)+")")}))}},function(e,i){e.exports=t},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t){var i=Date.now(),a=void 0;return function(){for(var r=arguments.length,n=Array(r),s=0;s<r;s++)n[s]=arguments[s];Date.now()-i<t&&a&&clearTimeout(a),a=setTimeout((function(){e.apply(void 0,n)}),t),i=Date.now()}}},function(e,t,i){"use strict";i(26)},function(e,t,i){var a=i(24),r=i(45);i=i(46);t=a(!1),i=r(i),t.push([e.i,".jv-container{box-sizing:border-box;position:relative}.jv-container.boxed{border:1px solid #eee;border-radius:6px}.jv-container.boxed:hover{box-shadow:0 2px 7px rgba(0,0,0,0.15);border-color:transparent;position:relative}.jv-container.jv-light{background:#fff;white-space:nowrap;color:#525252;font-size:14px;font-family:Consolas, Menlo, Courier, monospace}.jv-container.jv-light .jv-ellipsis{color:#999;background-color:#eee;display:inline-block;line-height:0.9;font-size:0.9em;padding:0px 4px 2px 4px;margin:0 4px;border-radius:3px;vertical-align:2px;cursor:pointer;-webkit-user-select:none;user-select:none}.jv-container.jv-light .jv-button{color:#49b3ff}.jv-container.jv-light .jv-key{color:#111111;margin-right:4px}.jv-container.jv-light .jv-item.jv-array{color:#111111}.jv-container.jv-light .jv-item.jv-boolean{color:#fc1e70}.jv-container.jv-light .jv-item.jv-function{color:#067bca}.jv-container.jv-light .jv-item.jv-number{color:#fc1e70}.jv-container.jv-light .jv-item.jv-object{color:#111111}.jv-container.jv-light .jv-item.jv-undefined{color:#e08331}.jv-container.jv-light .jv-item.jv-string{color:#42b983;word-break:break-word;white-space:normal}.jv-container.jv-light .jv-item.jv-string .jv-link{color:#0366d6}.jv-container.jv-light .jv-code .jv-toggle:before{padding:0px 2px;border-radius:2px}.jv-container.jv-light .jv-code .jv-toggle:hover:before{background:#eee}.jv-container .jv-code{overflow:hidden;padding:30px 20px}.jv-container .jv-code.boxed{max-height:300px}.jv-container .jv-code.open{max-height:initial !important;overflow:visible;overflow-x:auto;padding-bottom:45px}.jv-container .jv-toggle{background-image:url("+i+');background-repeat:no-repeat;background-size:contain;background-position:center center;cursor:pointer;width:10px;height:10px;margin-right:2px;display:inline-block;-webkit-transition:-webkit-transform 0.1s;transition:-webkit-transform 0.1s;transition:transform 0.1s;transition:transform 0.1s, -webkit-transform 0.1s}.jv-container .jv-toggle.open{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more{position:absolute;z-index:1;bottom:0;left:0;right:0;height:40px;width:100%;text-align:center;cursor:pointer}.jv-container .jv-more .jv-toggle{position:relative;top:40%;z-index:2;color:#888;-webkit-transition:all 0.1s;transition:all 0.1s;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jv-container .jv-more .jv-toggle.open{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.jv-container .jv-more:after{content:"";width:100%;height:100%;position:absolute;bottom:0;left:0;z-index:1;background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);-webkit-transition:all 0.1s;transition:all 0.1s}.jv-container .jv-more:hover .jv-toggle{top:50%;color:#111}.jv-container .jv-more:hover:after{background:-webkit-linear-gradient(top, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%);background:linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(230,230,230,0.3) 100%)}.jv-container .jv-button{position:relative;cursor:pointer;display:inline-block;padding:5px;z-index:5}.jv-container .jv-button.copied{opacity:0.4;cursor:default}.jv-container .jv-tooltip{position:absolute}.jv-container .jv-tooltip.right{right:15px}.jv-container .jv-tooltip.left{left:15px}.jv-container .j-icon{font-size:12px}\n',""]),e.exports=t},function(e,t,i){"use strict";e.exports=function(e,t){return t=t||{},"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE2IiB3aWR0aD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIAo8cG9seWdvbiBwb2ludHM9IjAsMCA4LDggMCwxNiIKc3R5bGU9ImZpbGw6IzY2NjtzdHJva2U6cHVycGxlO3N0cm9rZS13aWR0aDowIiAvPgo8L3N2Zz4="}],i.c=r,i.d=function(e,t,a){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(a,r,function(t){return e[t]}.bind(null,r));return a},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=27);function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var a,r}))},3815:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"data-center-history-wrap"},[i("el-drawer",{attrs:{title:e.title,visible:e.drawer,size:"50%"},on:{"update:visible":function(t){e.drawer=t}}},[i("div",{staticClass:"device-wrap"},[i("el-form",{ref:"devQueryForm",attrs:{model:e.devQueryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{staticStyle:{"margin-left":"20px"},attrs:{prop:"dayDaterange"}},[i("el-date-picker",{staticStyle:{width:"340px"},attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetimerange","range-separator":"-","start-placeholder":e.$t("dataCenter.history.384934-6"),"end-placeholder":e.$t("dataCenter.history.384934-7"),"picker-options":e.pickerOptions},model:{value:e.devQueryParams.dayDaterange,callback:function(t){e.$set(e.devQueryParams,"dayDaterange",t)},expression:"devQueryParams.dayDaterange"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleDevQuery}},[e._v(e._s(e.$t("dataCenter.history.384934-8")))]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.handleDevResetQuery}},[e._v(e._s(e.$t("dataCenter.history.384934-9")))])],1)],1),i("el-row",[i("el-col",{staticStyle:{"margin-bottom":"15px"},attrs:{span:24}},[i("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{shadow:"never"}},[i("div",{attrs:{slot:"header"},slot:"header"},[i("span",[e._v(e._s(e.$t("dataCenter.history.384934-10")))]),i("span",{staticStyle:{"margin-left":"10px",color:"#f56c6c","font-size":"12px"}},[e._v(e._s(e.$t("dataCenter.history.384934-11")))])]),i("div",{staticClass:"el-table--enable-row-hover el-table--medium"},[i("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.devDatas.length,expression:"devDatas.length !== 0"}],ref:"devLineChart",staticStyle:{width:"100%",height:"480px",background:"#fff"}}),0===e.devDatas.length?i("el-empty",{staticStyle:{height:"480px"},attrs:{description:e.$t("dataCenter.history.384934-12")}}):e._e(),i("el-table",{directives:[{name:"show",rawName:"v-show",value:e.devTotal>0,expression:"devTotal > 0"}],staticStyle:{"margin-top":"50px"},attrs:{data:e.devTableList,border:!1}},[i("el-table-column",{attrs:{label:e.$t("dataCenter.history.384934-13"),prop:"time",width:"200"}}),e._l(this.devTableHeaderTemp,(function(e){return i("el-table-column",{key:e.value,attrs:{label:e.name,prop:e.value}})}))],2),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.devTotal>0,expression:"devTotal > 0"}],attrs:{autoScroll:!1,total:e.devTotal,page:e.devPageNum,limit:e.devPageSize},on:{"update:page":function(t){e.devPageNum=t},"update:limit":function(t){e.devPageSize=t}}})],1)])],1)],1)],1)])],1)},r=[],n=i("5530"),s=(i("7db0"),i("d81d"),i("fb6a"),i("b64b"),i("d3b7"),i("07ac"),i("159b"),i("c1df")),o=i.n(s),l=i("06a9"),c={name:"dataCenterHistory",props:{model:{type:Object,default:null}},data:function(){return{activeTab:"device",drawer:!1,title:"历史数据",devDeviceList:[],devIdentifierList:[],pickerOptions:{shortcuts:[{text:this.$t("dataCenter.history.384934-19"),onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-72e5),e.$emit("pick",[i,t])}},{text:this.$t("dataCenter.history.384934-20"),onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-864e5),e.$emit("pick",[i,t])}},{text:this.$t("dataCenter.history.384934-21"),onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-6048e5),e.$emit("pick",[i,t])}},{text:this.$t("dataCenter.history.384934-22"),onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-2592e6),e.$emit("pick",[i,t])}}]},devQueryParams:{deviceId:null,identifiers:[],dayDaterange:[new Date((new Date).getTime()-72e5),new Date]},loading:!1,devDatas:[],devTableComTemp:[],devTableHeaderTemp:[],devPageNum:1,devPageSize:10,devTotal:0,sceneModelList:[],sceneDeviceList:[],sceneIdentifierList:[],sceneQueryParams:{sceneModelId:null,sceneModelDeviceId:null,identifiers:[],dayDaterange:[new Date((new Date).getTime()-72e5),new Date]},sceneDatas:[],sceneTableComTemp:[],sceneTableHeaderTemp:[],scenePageNum:1,scenePageSize:10,sceneTotal:0}},mounted:function(){},computed:{devTableList:function(){var e=(this.devPageNum-1)*this.devPageSize,t=e+this.devPageSize;return this.devTableComTemp.slice(e,t)}},methods:{getDevChartDatas:function(){var e=this;this.loading=!0;var t=[{identifier:this.model.identifier,type:this.model.type}],i={deviceId:this.model.deviceId,serialNumber:this.model.serialNumber,identifierList:t,beginTime:o()(this.devQueryParams.dayDaterange[0]).format("YYYY-MM-DD HH:mm:ss"),endTime:o()(this.devQueryParams.dayDaterange[1]).format("YYYY-MM-DD HH:mm:ss")};Object(l["d"])(i).then((function(t){200===t.code&&(e.devDatas=t.data,e.formatDevTableDatas(),0!==e.devDatas.length&&setTimeout((function(){e.drawDevLine()}),500)),e.loading=!1}))},handleDevQuery:function(){this.getDevChartDatas()},handleDevResetQuery:function(){this.resetForm("devQueryForm"),this.devQueryParams.identifiers=[],this.devDatas=[],this.devTableComTemp=[],this.devTotal=0,this.handleDevQuery()},drawDevLine:function(){this.charts=this.$echarts.init(this.$refs.devLineChart),this.charts.clear(),this.charts.setOption({tooltip:{trigger:"axis"},legend:{align:"right",left:"3%",top:"15%"},grid:{top:"30%",left:"5%",right:"5%",bottom:"5%",containLabel:!0},toolbox:{feature:{dataView:{},restore:{},saveAsImage:{}}},dataZoom:[{type:"inside",start:0,end:100},{start:0,end:100}],xAxis:{type:"category",boundaryGap:!0,axisTick:{alignWithLabel:!0},data:0!==this.devDatas.length&&this.devDatas.map((function(e){return Object.keys(e)[0]}))},yAxis:{type:"value",scale:!0},series:this.getDevSeries()})},getDevSeries:function(){var e=this;return{name:this.model.identifier,type:"line",stack:this.$t("dataCenter.history.384934-23"),data:this.devDatas.map((function(t){var i=Object.values(t)[0].find((function(t){return Object.keys(t)[0]===e.model.identifier}));return Object.values(i)[0]}))}},formatDevTableDatas:function(){var e=this;this.devTableComTemp=this.devDatas.map((function(e){var t=Object.keys(e)[0],i={};return Object.values(e)[0].forEach((function(e){i[Object.keys(e)[0]]=Object.values(e)[0]})),Object(n["a"])({time:t},i)})),this.devTotal=this.devDatas.length;var t=[this.model.identifier];this.devTableHeaderTemp=t.map((function(t){return{name:e.model.identifier,value:t}}))}}},d=c,u=(i("3398"),i("2877")),p=Object(u["a"])(d,a,r,!1,null,"4b0f9386",null);t["default"]=p.exports},"3b72":function(e,t,i){"use strict";i.d(t,"d",(function(){return r})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"e",(function(){return o})),i.d(t,"b",(function(){return l}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/alertLog/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/alertLog/"+e,method:"get"})}function s(e){return Object(a["a"])({url:"/iot/alertLog",method:"post",data:e})}function o(e){return Object(a["a"])({url:"/iot/alertLog",method:"put",data:e})}function l(e){return Object(a["a"])({url:"/iot/alertLog/"+e,method:"delete"})}},"3c52":function(e,t,i){"use strict";i("01a2")},"3e92":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"device-variable"},[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{prop:"type"}},[i("el-select",{attrs:{placeholder:e.$t("device.variable-case.347856-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.type,callback:function(t){e.$set(e.queryParams,"type",t)},expression:"queryParams.type"}},e._l(e.dict.type.iot_things_type,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{prop:"modelName"}},[i("el-input",{attrs:{placeholder:e.$t("device.variable-case.347856-3"),clearable:""},model:{value:e.queryParams.modelName,callback:function(t){e.$set(e.queryParams,"modelName",t)},expression:"queryParams.modelName"}})],1),2===e.device.deviceType?i("el-form-item",{attrs:{prop:"subDeviceId"}},[i("el-select",{attrs:{placeholder:e.$t("device.variable-case.347856-17"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.subDeviceId,callback:function(t){e.subDeviceId=t},expression:"subDeviceId"}},e._l(e.subDeviceList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.variable-case.347856-4")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.handleResetQuery}},[e._v(e._s(e.$t("device.variable-case.347856-5")))]),"MODBUS-TCP"===e.device.protocolCode||"MODBUS-RTU"===e.device.protocolCode?i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.activeCollectionAll}},[e._v(" "+e._s(e.$t("device.variable-case.347856-16"))+" ")]):e._e()],1),i("el-form-item",{staticStyle:{"line-height":"28px"}},[i("el-checkbox",{staticStyle:{margin:"0px 10px"},attrs:{"true-label":1},on:{change:e.handleQuery},model:{value:e.queryParams.isMonitor,callback:function(t){e.$set(e.queryParams,"isMonitor",t)},expression:"queryParams.isMonitor"}},[i("div",{staticStyle:{color:"#606266 !important","font-size":"14px"}},[e._v(e._s(e.$t("device.running-status.866086-33")))])]),i("el-tooltip",{attrs:{content:e.$t("device.running-status.866086-34"),placement:"top"}},[i("i",{staticClass:"el-icon-question",staticStyle:{color:"#909399","font-size":"16px"}})])],1)],1),1!==e.queryParams.isMonitor?i("el-row",{attrs:{gutter:20}},e._l(e.variableList,(function(t,a){return i("el-col",{key:a,staticStyle:{"margin-bottom":"20px"},attrs:{xs:24,sm:12,md:12,lg:6,xl:4}},[i("el-card",{staticStyle:{height:"130px"},attrs:{"body-style":{padding:"20px"},shadow:"always"}},[i("el-row",{attrs:{type:"flex",gutter:10,justify:"space-between",align:"middle"}},[i("el-col",{staticStyle:{"text-align":"left","font-size":"16px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","text-shadow":"1rpx 1rpx 2rpx rgba(0, 0, 0, 0.1)"},attrs:{span:8}},[i("el-tooltip",{attrs:{content:t.identifier+" / "+t.modelName,placement:"top-start"}},[i("span",[e._v(e._s(t.modelName))])])],1),i("el-col",{staticStyle:{"text-align":"right"},attrs:{span:16}},[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("device.variable-case.347856-13"),placement:"top-start"}},["MODBUS-TCP"===e.device.protocolCode||"MODBUS-RTU"===e.device.protocolCode?i("svg-icon",{staticStyle:{color:"#007aff","margin-right":"10px",cursor:"pointer"},attrs:{"icon-class":"gather"},on:{click:function(i){return e.activeCollection(t)}}}):e._e()],1),i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:0===t.isReadonly&&3!=t.type?e.$t("device.running-status.866086-36"):e.$t("device.running-status.866086-45"),placement:"top"}},[0===t.isReadonly&&3!=t.type?i("i",{staticClass:"el-icon-position",staticStyle:{color:"#007aff","margin-right":"10px",cursor:"pointer"},on:{click:function(i){return e.editFunc(t)}}}):i("i",{staticClass:"el-icon-position",staticStyle:{color:"#909399","margin-right":"10px",cursor:"pointer"},attrs:{disabled:""}})]),i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:1===t.isHistory?e.$t("device.running-status.866086-37"):e.$t("device.running-status.866086-46"),placement:"top-start"}},[1===t.isHistory?i("svg-icon",{staticStyle:{cursor:"pointer"},attrs:{"aria-hidden":"true",iconClass:"history"},on:{click:function(i){return e.handleHistory(t)}}}):i("svg-icon",{staticStyle:{cursor:"pointer"},attrs:{"aria-hidden":"true",iconClass:"history_disable"}})],1),i("dict-tag",{staticStyle:{float:"right","margin-left":"10px","margin-top":"-2px"},attrs:{options:e.dict.type.iot_things_type,value:t.type,size:"mini"}})],1)],1),2===e.device.deviceType?i("el-row",{staticStyle:{"margin-top":"10px"},attrs:{type:"flex",gutter:10,justify:"space-between",align:"middle"}},[i("el-col",{staticStyle:{"text-align":"left","font-size":"14px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","text-shadow":"1rpx 1rpx 2rpx rgba(0, 0, 0, 0.1)"},attrs:{span:8}},[i("el-tooltip",{attrs:{content:t.deviceName,placement:"top-start"}},[i("span",[e._v(e._s(t.deviceName?t.deviceName:"-"))])])],1),i("el-col",{staticStyle:{"text-align":"right","font-size":"12px"},attrs:{span:16}},[e._v(e._s(e.$t("device.variable-case.347856-18"))+e._s(t.slaveId?t.slaveId:"-"))])],1):e._e(),i("el-row",{attrs:{type:"flex",gutter:10,justify:"space-between"}},[i("el-col",{staticStyle:{"text-align":"left"},attrs:{span:12.5}},["bool"!==t.datatype.type&&"enum"!==t.datatype.type?i("div",{staticStyle:{"font-size":"14px","margin-top":"20px",display:"inline-block"}},[e._v(e._s(t.value?t.value:"-"))]):e._e(),"bool"!==t.datatype.type&&"enum"!==t.datatype.type?i("div",{staticStyle:{"font-size":"15px",margin:"20px 0 0 5px",display:"inline-block"}},[e._v(" "+e._s(t.datatype.unit?t.datatype.unit:"")+" ")]):e._e(),"bool"==t.datatype.type?i("div",[i("div",{staticStyle:{"font-size":"14px","margin-top":"20px",display:"inline-block"}},[e._v(e._s(t.valueName?t.valueName:"--"))])]):e._e(),"enum"==t.datatype.type?i("div",[t.showWay&&"button"==t.showWay?i("div",[null!==t.valueName&&""!==t.valueName&&"-"!==t.valueName?i("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"",plain:!0,size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly||3==t.type}},[e._v(" "+e._s(t.valueName)+" ")]):e._e()],1):i("div",{staticStyle:{"font-size":"14px","margin-top":"20px",display:"inline-block"}},[e._v(" "+e._s(t.valueName?t.valueName:"--")+" ")])]):e._e()]),i("el-col",{staticStyle:{"text-align":"right"},attrs:{span:11.5}},[i("div",{staticStyle:{"font-size":"12px","margin-top":"25px",display:"inline-block"}},[e._v(" "+e._s(t.ts?t.ts:"-")+" ")])])],1)],1)],1)})),1):e._e(),1===e.queryParams.isMonitor?i("el-row",{attrs:{gutter:20}},e._l(e.chartList,(function(e,t){return i("el-col",{key:t,attrs:{xs:24,sm:12,md:12,lg:8,xl:4}},[i("el-card",{staticStyle:{"border-radius":"30px","margin-bottom":"20px"},attrs:{shadow:"hover"}},[i("div",{ref:"map",refInFor:!0,staticStyle:{height:"250px",width:"185px",margin:"0 auto"}})])],1)})),1):e._e(),0==e.total?i("el-empty",{attrs:{description:e.$t("device.device-recycle.864193-8")}}):e._e(),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize,pageSizes:[24,48,72,96]},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getVariableList}}),i("el-dialog",{attrs:{title:e.$t("device.realTime-status.099127-26"),visible:e.dialogValue,width:"480px"},on:{"update:visible":function(t){e.dialogValue=t}}},[i("el-form",[e._l(e.opationList,(function(t,a){return i("el-form-item",{key:a,attrs:{label:t.label+"","label-width":"120px"}},["integer"==t.dataTypeName||"decimal"==t.dataTypeName||"array"==t.dataTypeName&&"integer"==t.arrayType||"array"==t.dataTypeName&&"decimal"==t.arrayType?i("el-input",{staticStyle:{width:"200px"},attrs:{precision:0,controls:!1,type:"number"},on:{input:function(i){return e.justNumber(t)}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}}):e._e(),"string"==t.dataTypeName||"array"==t.dataTypeName&&"string"==t.arrayType?i("el-input",{staticStyle:{width:"230px"},attrs:{precision:0,controls:!1,placeholder:e.$t("device.running-status.866086-35"),type:"text"},on:{input:function(i){return e.justNumber(t)}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}}):e._e(),"bool"==t.dataTypeName?i("el-select",{staticStyle:{width:"230px"},on:{change:function(t){return e.changeSelect()}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}},e._l(t.options,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),"enum"==t.dataTypeName?i("div",[t.showWay&&"button"==t.showWay?i("div",e._l(t.options,(function(a){return i("el-button",{key:a.value,class:{"is-active-btn":a.value===(t.shadow||t.value)},staticStyle:{margin:"5px"},attrs:{size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly||3==t.type},on:{click:function(i){return e.enumButtonClick(e.deviceInfo,t,a.value)}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}},[e._v(" "+e._s(a.label)+" ")])})),1):i("el-select",{on:{change:function(t){return e.changeSelect()}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}},e._l(t.options,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),("integer"==t.dataTypeName||"decimal"==t.dataTypeName||"array"==t.dataTypeName&&"integer"==t.arrayType||"array"==t.dataTypeName&&"decimal"==t.arrayType)&&t.unit&&"un"!=t.unit&&"/"!=t.unit?i("span",[e._v(" ("+e._s(t.unit)+") ")]):e._e(),"integer"==t.dataTypeName||"decimal"==t.dataTypeName||"array"==t.dataTypeName&&"integer"==t.arrayType||"array"==t.dataTypeName&&"decimal"==t.arrayType?i("span",{staticStyle:{"margin-left":"5px"}},[e._v(" "+e._s(t.min)+" ~ "+e._s(t.max)+" ")]):e._e()],1)})),i("el-form-item",{staticStyle:{display:"none"}},[i("el-input",{model:{value:e.functionName,callback:function(t){e.functionName=t},expression:"functionName"}})],1)],2),i("span",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogValue=!1}}},[e._v(e._s(e.$t("cancel")))]),i("el-button",{attrs:{type:"primary",loading:e.btnLoading,disabled:!e.canSend},on:{click:e.sendService}},[e._v(e._s(e.$t("confirm")))])],1)],1),i("el-dialog",{attrs:{title:e.$t("device.variable-case.347856-15"),visible:e.centerDialogVisible,width:"380px"},on:{"update:visible":function(t){e.centerDialogVisible=t}}},[i("span",[e._v(e._s(e.$t("device.variable-case.347856-14")))]),i("span",{attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.centerDialogVisible=!1}}},[e._v(e._s(e.$t("iot.group.device-list.849593-12")))]),i("el-button",{attrs:{type:"primary"},on:{click:e.confirmCollection}},[e._v(e._s(e.$t("iot.group.device-list.849593-11")))])],1)]),i("history-list",{ref:"historyList",attrs:{model:e.modelParams}})],1)},r=[],n=i("c7eb"),s=i("1da1"),o=i("5530"),l=i("ade3"),c=(i("d81d"),i("14d9"),i("4e82"),i("b0c0"),i("d3b7"),i("07ac"),i("159b"),i("c1df")),d=i.n(c),u=i("584f"),p=i("0bc2"),h=i("67fa"),f=i("5b52"),m=i("3815"),v={name:"DeviceVariable",dicts:["iot_things_type"],components:{historyList:m["default"]},props:{device:{type:Object,default:null}},data:function(){var e;return e={loading:!0,dialogValue:!1,opationList:[],functionName:"",btnLoading:!1,canSend:!1,chooseFun:{},variableList:[],chartList:[],monitorChart:[],invokeForm:{type:""},deviceStatus:{status:"",rssi:""},total:0,modelParams:{identifier:"",modelId:"",modelName:"",modelType:"",serialNumber:"",productId:"",deviceName:""},deviceInfo:{boolList:[],enumList:[],stringList:[],integerList:[],decimalList:[],arrayList:[],thingsModels:[],chartList:[]},remoteCommand:{},rules:{firmwareType:[{required:!0,message:this.$t("device.running-status.866086-43"),trigger:"blur"}]}},Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(e,"loading",!1),"queryParams",{deviceId:null,type:null,modelName:"",pageNum:1,pageSize:24,isMonnitor:"",showSubDevice:!0}),"querySubParams",{pageNum:1,pageSize:10}),"subDeviceId",null),"subDeviceList",[]),"dialogValue",!1),"centerDialogVisible",!1),"form",{}),"canSend",!1),"btnLoading",!1),Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(e,"funVal",{}),"chooseFun",{}),"deviceInfo",{}),"serialNumber",""),"opationList",[]),"functionName",""),"variableList",[])},watch:{device:{deep:!0,handler:function(e,t){e.deviceId&&e.deviceId!==t.deviceId&&(this.deviceInfo=e,this.queryParams.deviceId=e.deviceId,this.getVariableList())}}},mounted:function(){var e=this.device,t=e.deviceId,i=e.serialNumber;t&&(this.queryParams.deviceId=t,this.serialNumber=i,this.getVariableList(),this.getSubDeviceList()),this.initData()},methods:{initData:function(){var e=this;this.$busEvent.$on("updateData",(function(t){e.updateParam(t)}))},getSubDeviceList:function(){var e=this;this.querySubParams.gwDeviceId=this.device.deviceId,Object(f["h"])(this.querySubParams).then((function(t){e.subDeviceList=t.rows.map((function(e){return{label:e.subDeviceName,value:e.subDeviceId}})),e.total=t.total,e.loading=!1}))},getVariableList:function(){var e=this;this.loading=!0,2===this.device.deviceType&&this.subDeviceId?this.queryParams.showSubDevice=!1:this.queryParams.showSubDevice=!0,this.queryParams.deviceId=this.subDeviceId?this.subDeviceId:this.device.deviceId,Object(u["s"])(this.queryParams).then((function(t){200===t.code&&(1===e.queryParams.isMonitor?(e.chartList=t.rows,e.$nextTick((function(){this.MonitorChart()}))):(e.variableList=t.rows.map((function(t){return Object(o["a"])(Object(o["a"])({},t),{},{valueName:e.getValueName(t)||"-"})})),e.variableList=e.variableList.sort((function(e,t){return t.order-e.order})),e.chartList=e.chartList.sort((function(e,t){return t.order-e.order}))),e.total=t.total),e.loading=!1}))},MonitorChart:function(){if(this.chartList&&this.chartList.length>0)for(var e=0;e<this.chartList.length;e++){var t;this.monitorChart[e]={chart:this.$echarts.init(this.$refs.map[e]),data:{id:this.chartList[e].identifier,name:this.chartList[e].modelName,value:this.chartList[e].shadow?this.chartList[e].shadow:this.chartList[e].datatype.min}},t={tooltip:{formatter:" {b} <br/> {c}"+this.chartList[e].datatype.unit},series:[{name:this.chartList[e].datatype.type,type:"gauge",min:this.chartList[e].datatype.min,max:this.chartList[e].datatype.max,colorBy:"data",splitNumber:10,radius:"100%",splitLine:{distance:4},axisLabel:{fontSize:10,distance:10},axisTick:{distance:4},axisLine:{lineStyle:{width:8,color:[[.2,"#486FF2"],[.8,"#12d09f"],[1,"#F56C6C"]],opacity:.3}},pointer:{icon:"triangle",length:"60%",width:7},progress:{show:!0,width:8},detail:{valueAnimation:!0,formatter:"{value} "+this.chartList[e].datatype.unit,offsetCenter:[0,"80%"],fontSize:20},data:[{value:this.chartList[e].shadow?this.chartList[e].shadow:this.chartList[e].datatype.min,name:this.chartList[e].modelName}],title:{offsetCenter:[0,"115%"],fontSize:16}}]},t&&this.monitorChart[e].chart.setOption(t)}},handleQuery:function(){this.queryParams.pageNum=1,this.getVariableList()},handleResetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},editFunc:function(e){var t=this;return Object(s["a"])(Object(n["a"])().mark((function i(){var a,r,s;return Object(n["a"])().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return a={deviceId:t.device.deviceId,modelId:e.modelId},i.next=3,Object(h["d"])(a);case 3:if(r=i.sent,200==r.code){i.next=7;break}return t.$message({type:"warning",message:r.msg}),i.abrupt("return");case 7:if(t.serialNumber=e.serialNumber,s="",3===t.device.status){i.next=13;break}return s=1===t.device.status?t.$t("device.device-variable.930930-0"):2===t.device.status?t.$t("device.device-variable.930930-1"):t.$t("device.device-variable.930930-2"),t.$message({type:"warning",message:s}),i.abrupt("return");case 13:t.dialogValue=!0,t.canSend=!0,t.funVal={},t.chooseFun=e,t.getOpationList(e);case 18:case"end":return i.stop()}}),i)})))()},handleHistory:function(e){1===e.isHistory&&(this.modelParams.identifier=e.identifier,this.modelParams.type=e.type,this.modelParams.deviceId=this.device.deviceId,this.modelParams.serialNumber=e.serialNumber,this.$refs.historyList.drawer=!0,this.$refs.historyList.getDevChartDatas())},getOpationList:function(e){var t=this;this.opationList=[];var i=[];this.funVal={};var a,r=e.datatype;"enum"==r.type&&(i=(null===(a=r.enumList)||void 0===a?void 0:a.map((function(e){return{label:e.text,value:e.value+""}})))||[]);"bool"==r.type&&(i=[{label:r.falseText||"",value:"0"},{label:r.trueText||"",value:"1"}]),this.opationList.push({dataTypeName:r.type,arrayType:r.arrayType,label:e.modelName,key:e.identifier,max:parseInt((null===r||void 0===r?void 0:r.max)||100),min:parseInt((null===r||void 0===r?void 0:r.min)||-100),options:i,value:e.value}),this.opationList.forEach((function(e){var i=e.value;("integer"==e.datatype||"decimal"==e.datatype||"array"==e.dataTypeName&&"integer"==e.arrayType||"array"==e.dataTypeName&&"decimal"==e.arrayType)&&(i=parseInt(i)),t.funVal[e.key]=i}))},sendService:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i,a,r,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,i=e.funVal,a={serialNumber:e.serialNumber,identifier:e.chooseFun.identifier,remoteCommand:i},e.btnLoading=!0,"MODBUS-TCP"!==e.deviceInfo.protocolCode&&"MODBUS-RTU"!==e.deviceInfo.protocolCode){t.next=9;break}return t.next=7,Object(p["c"])(a).then((function(t){200===t.code?e.$message({type:"success",message:e.$t("device.running-status.866086-25")}):e.$message.error(t.msg)}));case 7:t.next=11;break;case 9:return t.next=11,Object(p["b"])(a).then((function(t){200===t.code?e.$message({type:"success",message:e.$t("device.running-status.866086-25")}):e.$message.error(t.msg)}));case 11:r=0;case 12:if(!(r<e.variableList.length)){t.next=21;break}if(e.variableList[r].identifier!=e.chooseFun.identifier){t.next=18;break}return s=Object.values(e.funVal)[0],e.variableList[r].value=s,e.variableList[r].valueName=e.getValueName(e.variableList[r]),t.abrupt("break",21);case 18:r++,t.next=12;break;case 21:return t.prev=21,e.btnLoading=!1,e.dialogValue=!1,t.finish(21);case 25:case"end":return t.stop()}}),t,null,[[0,,21,25]])})))()},changeSelect:function(){this.$forceUpdate()},justNumber:function(e){var t=this;this.canSend=!0,this.opationList.some((function(e){if(e.max<t.funVal[e.key]||e.min>t.funVal[e.key])return t.canSend=!1,!0})),this.$forceUpdate()},handleEditVariable:function(e){var t=this;this.$prompt(this.$t("device.device-variable.930930-4"),this.$t("device.device-variable.930930-5"),{confirmButtonText:this.$t("device.device-variable.930930-6"),cancelButtonText:this.$t("device.device-variable.930930-7"),inputPattern:/\S/,inputErrorMessage:this.$t("device.device-variable.930930-8"),inputPlaceholder:e.value}).then((function(i){var a=i.value;if(3!==t.device.status){var r="";return r=1===t.device.status?t.$t("device.device-variable.930930-9"):2===t.device.status?t.$t("device.device-variable.930930-10"):t.$t("device.device-variable.930930-11"),void t.$message({type:"warning",message:r})}var n={};n[e.identifier]=a;var s={serialNumber:e.serialNumber,remoteCommand:n,identifier:e.identifier};Object(p["b"])(s).then((function(i){200===i.code?(e.ts=d()(new Date).format("YYYY-MM-DD HH:mm:ss"),e.value=a):204===i.code&&t.$message({type:"warning",message:i.msg})}))}))},handleQueryHistory:function(e){this.$router.push({path:"/dataCenter/history",query:{deviceId:this.device.deviceId,identifier:e.identifier,activeName:"device"}})},updateParam:function(e){var t=this,i=(e.serialNumber,e.productId,e.data);i&&(i=i.message,i.forEach((function(e){t.variableList.some((function(i,a){if(e.id===i.identifier){var r=t.variableList[a];return r.ts=e.ts,r.value=e.value,r.valueName=t.getValueName(i),t.$set(t.variableList,a,r),!0}}));for(var i=0;i<t.chartList.length;i++)if(console.log(e.id,t.chartList[i].identifier,"kkkkkkkkkk"),t.chartList[i].id==e.identifier){t.chartList[i].value=e.value;for(var a=0;a<t.monitorChart.length;a++)if(e.id==t.monitorChart[a].data.id){var r=[{value:t.chartList[i].value,name:t.monitorChart[a].data.name}];t.monitorChart[a].chart.setOption({series:[{data:r}]});break}}})))},getValueName:function(e){var t,i=e.value||"-";if(e.datatype)switch(e.datatype.type){case"bool":0==e.value&&(i=e.datatype.falseText),1==e.value&&(i=e.datatype.trueText);break;case"enum":null===(t=e.datatype.enumList)||void 0===t||t.some((function(t){if(t.value==e.value)return i=t.text,!0}));break}return i},activeCollection:function(e){if(3!==this.device.status){var t="";return t=1===this.device.status?this.$t("device.device-variable.930930-9"):2===this.device.status?this.$t("device.device-variable.930930-10"):this.$t("device.device-variable.930930-11"),void this.$message({type:"warning",message:t})}this.centerDialogVisible=!0,this.form.serialNumber=e.serialNumber,this.form.type=1,this.form.identifier=e.identifier,this.form.parentSerialNumber=e.parentSerialNumber},confirmCollection:function(){var e=this;Object(p["a"])(this.form).then((function(t){200==t.code&&(e.centerDialogVisible=!1)}))},activeCollectionAll:function(){if(3!==this.device.status){var e="";return e=1===this.device.status?this.$t("device.device-variable.930930-9"):2===this.device.status?this.$t("device.device-variable.930930-10"):this.$t("device.device-variable.930930-11"),void this.$message({type:"warning",message:e})}this.centerDialogVisible=!0,this.form.serialNumber=this.serialNumber,this.form.type=2}}},g=v,y=(i("73d0"),i("2877")),b=Object(y["a"])(g,a,r,!1,null,"457ff5aa",null);t["default"]=b.exports},4649:function(e,t,i){},4678:function(e,t,i){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-ps":"4c98","./ar-ps.js":"4c98","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"25548","./bs.js":"25548","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df48","./fa.js":"8df48","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b46","./gd.js":"f6b46","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98a","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98a","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e923","./kn.js":"3e923","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku-kmr":"7558","./ku-kmr.js":"7558","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(e){var t=n(e);return i(t)}function n(e){if(!i.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}r.keys=function(){return Object.keys(a)},r.resolve=n,e.exports=r,r.id="4678"},4683:function(e,t,i){},"46c2":function(e,t,i){"use strict";i("cca2")},"4c4c":function(e,t,i){"use strict";i("dcea")},"4e25":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"record-oss-list"},[e.isRecordDetail?e._e():i("div",{staticClass:"list-wrap"},[i("el-form",{ref:"queryForm",attrs:{inline:!0,"label-width":"88px"},nativeOn:{submit:function(e){e.preventDefault()}}},[i("el-form-item",{attrs:{prop:"serverId"}},[i("el-select",{attrs:{placeholder:e.$t("record.239091-1")},on:{change:e.handleMediaChange},model:{value:e.mediaServerId,callback:function(t){e.mediaServerId=t},expression:"mediaServerId"}},e._l(e.mediaServerList,(function(e){return i("el-option",{key:e.serverId,attrs:{label:e.serverId,value:e.serverId}})})),1)],1),i("el-form-item",{attrs:{prop:"serverId"}},[i("el-button",{attrs:{icon:"el-icon-search",loading:e.loading,type:"primary"},on:{click:function(t){return e.getRecordList()}}},[e._v(e._s(e.$t("search")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.recordList,border:!1}},[i("el-table-column",{attrs:{prop:"app",label:e.$t("record.239091-2"),align:"left","min-width":"150"}}),i("el-table-column",{attrs:{prop:"stream",label:e.$t("record.239091-3"),align:"left","min-width":"460"}}),i("el-table-column",{attrs:{prop:"time",label:e.$t("record.239091-4"),align:"center",width:"180"}}),i("el-table-column",{attrs:{label:e.$t("opation"),width:"100",fixed:"right",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{attrs:{size:"small",icon:"el-icon-folder-opened",type:"text"},on:{click:function(i){return e.handleRecordDetailClick(t.row)}}},[e._v(e._s(e.$t("look")))])]}}],null,!1,1425957167)})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryRecord.pageNum,limit:e.queryRecord.pageSize},on:{"update:page":function(t){return e.$set(e.queryRecord,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryRecord,"pageSize",t)},pagination:e.getRecordList}})],1),e.isRecordDetail?i("el-row",{staticClass:"item-wrap"},[i("div",{staticClass:"title-wrap"},[i("el-button",{staticClass:"top-button",attrs:{type:"info",size:"small"},on:{click:function(t){return e.handleBack()}}},[i("i",{staticClass:"el-icon-arrow-left"}),e._v(" "+e._s(e.$t("product.product-edit.473153-44"))+" ")]),i("span",{staticClass:"info-item"},[e._v(e._s(e.$t("record.239091-2"))+""+e._s(e.chooseRecord.app))]),i("span",{staticClass:"info-item"},[e._v(e._s(e.$t("record.239091-3"))+""+e._s(e.chooseRecord.stream))])],1),i("div",{staticClass:"main-wrap"},[i("el-col",{attrs:{span:6}},[i("div",{staticClass:"left-wrap"},[i("div",{staticClass:"search-wrap"},[i("el-date-picker",{staticStyle:{width:"100%"},attrs:{size:"small","picker-options":e.pickerOptions,type:"date","value-format":"yyyy-MM-dd",placeholder:e.$t("record.record-oss.80878-0")},on:{change:e.handleDateChange},model:{value:e.chooseDate,callback:function(t){e.chooseDate=t},expression:"chooseDate"}})],1),i("div",{staticClass:"node-data"},[e.detailFiles.length>0?i("ul",e._l(e.detailFiles,(function(t,a){return i("li",{key:a},[e.choosedFile!=t?i("el-tag",{on:{click:function(i){return e.handleChooseFile(t)}}},[i("i",{staticClass:"el-icon-video-camera"}),e._v(" "+e._s(t.substring(0,17))+" ")]):e._e(),e.choosedFile==t?i("el-tag",{attrs:{type:"danger"}},[i("i",{staticClass:"el-icon-video-camera"}),e._v(" "+e._s(t.substring(0,17))+" ")]):e._e(),i("a",{staticClass:"el-icon-download icon",attrs:{href:e.getFileBasePath()+"/download.html?url=file/download/"+e.chooseRecord.app+"/"+e.chooseRecord.stream+"/"+e.chooseDate+"/"+t,target:"_blank"}}),i("a",{staticClass:"el-icon-upload icon",on:{click:function(i){return e.uploadOss(t)}}})],1)})),0):e._e(),0==e.detailFiles.length?i("el-empty",{staticClass:"no-data",attrs:{"image-size":100,description:e.$t("sip.mediaServer.998535-6")}}):e._e()],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>e.queryParams.pageSize,expression:"total > queryParams.pageSize"}],staticStyle:{bottom:"61px",right:"3px",background:"transparent"},attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize,small:"",layout:"prev, pager, next","pager-count":5},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.queryRecordDetails}})],1)]),i("el-col",{attrs:{span:18}},[i("div",{staticClass:"right-wrap"},[i("player",{ref:"recordVideoPlayer",attrs:{videoUrl:e.videoUrl,height:!0}})],1)])],1)]):e._e()],1)},r=[],n=(i("99af"),i("4de4"),i("d3b7"),i("c1df")),s=i.n(n),o=i("5a6f"),l=i("6827"),c=i("6abb"),d={name:"OssReocrdList",components:{player:c["default"]},props:["device"],data:function(){var e=this;return{loading:!1,mediaServerId:null,mediaServerList:[],recordList:[],queryRecord:{pageNum:1,pageSize:10,recordApi:null},recordApi:null,isRecordDetail:!1,chooseRecord:null,dateFilesObj:[],pickerOptions:{cellClassName:function(t){var i=s()(t).format("YYYY-MM-DD");return e.dateFilesObj[i]?"data-picker-true":"data-picker-false"}},queryParams:{pageNum:1,pageSize:12},detailFiles:[],chooseDate:"",total:0,choosedFile:null,videoUrl:null,recordListStyle:{height:this.winHeight+"20px"},playerStyle:{margin:"auto","margin-bottom":"0px",height:this.winHeight+"px"},winHeight:window.innerHeight-320,deviceId:"",channelList:[],queryDate:new Date,count:1e6}},watch:{device:function(e,t){var i=e;i&&0!==i.deviceId&&(this.deviceId=this.device.serialNumber)}},mounted:function(){this.recordListStyle.height=this.winHeight+"px",this.playerStyle["height"]=this.winHeight+"px"},created:function(){this.deviceId=this.device.serialNumber,this.getMediaServerList()},methods:{getMediaServerList:function(){var e=this,t={pageNum:1,pageSize:10};Object(o["d"])(t).then((function(t){200===t.code&&(e.mediaServerList=t.rows)}))},handleMediaChange:function(e){this.total=0,this.recordList=[],this.getRecordApi(e),this.getRecordList()},getRecordApi:function(e){var t;for(t=0;t<this.mediaServerList.length;t++)if(e===this.mediaServerList[t].serverId)break;"http"==this.mediaServerList[t].protocol?this.recordApi="http://"+this.mediaServerList[t].ip+":"+this.mediaServerList[t].recordPort:"https"==this.mediaServerList[t].protocol&&(this.recordApi="https://"+this.mediaServerList[t].domainAlias+":"+this.mediaServerList[t].recordPort)},getRecordList:function(){var e=this;this.recordApi?(this.loading=!0,this.queryRecord.recordApi=this.recordApi,Object(l["b"])(this.queryRecord).then((function(t){var i=t.code,a=t.data;200===i&&(e.recordList=a.list&&0!==a.list.length?a.list.filter((function(t){return t.stream.split("_")[2]===e.deviceId})):[],e.total=a.total),e.loading=!1})).catch((function(){e.loading=!1}))):this.$modal.alertError(this.$t("record.239091-5"))},handleRecordDetailClick:function(e){this.isRecordDetail=!0,this.chooseRecord=e,this.getDateInYear()},handleBack:function(){this.isRecordDetail=!1},getDateInYear:function(){var e=this,t={recordApi:this.recordApi,app:this.chooseRecord.app,stream:this.chooseRecord.stream};Object(l["c"])(t).then((function(t){if(200===t.code&&t.data.length>0)for(var i=0;i<t.data.length;i++)e.dateFilesObj[t.data[i]]=t.data[i]}))},handleDateChange:function(){this.detailFiles=[],""!==this.channelId&&this.queryRecordDetails()},queryRecordDetails:function(){var e=this,t={recordApi:this.recordApi,app:this.chooseRecord.app,stream:this.chooseRecord.stream,startTime:this.chooseDate+" 00:00:00",endTime:this.chooseDate+" 23:59:59",pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize};Object(l["e"])(t).then((function(t){200===t.code&&(e.total=t.data.total,e.detailFiles=t.data.list)}))},handleChooseFile:function(e){this.choosedFile=e,this.videoUrl=null==e?"":"".concat(this.getFileBasePath(),"/file/download/").concat(this.chooseRecord.app,"/").concat(this.chooseRecord.stream,"/").concat(this.chooseDate,"/").concat(this.choosedFile)},getFileBasePath:function(){return this.recordApi},uploadOss:function(e){var t=this,i={recordApi:this.recordApi,file:"/"+this.chooseRecord.app+"/"+this.chooseRecord.stream+"/"+this.chooseDate+"/"+e};Object(l["h"])(i).then((function(e){200===e.code&&t.$modal.msgSuccess(t.$t("record.record-oss.80878-4"))}))}}},u=d,p=(i("a738"),i("666d"),i("2877")),h=Object(p["a"])(u,a,r,!1,null,"7fb5bc9c",null);t["default"]=h.exports},5169:function(e,t,i){"use strict";i("bdbe")},5170:function(e,t,i){},"584f":function(e,t,i){"use strict";i.d(t,"n",(function(){return r})),i.d(t,"t",(function(){return n})),i.d(t,"o",(function(){return s})),i.d(t,"p",(function(){return o})),i.d(t,"m",(function(){return l})),i.d(t,"f",(function(){return c})),i.d(t,"c",(function(){return d})),i.d(t,"g",(function(){return u})),i.d(t,"i",(function(){return p})),i.d(t,"d",(function(){return h})),i.d(t,"u",(function(){return f})),i.d(t,"q",(function(){return m})),i.d(t,"r",(function(){return v})),i.d(t,"h",(function(){return g})),i.d(t,"a",(function(){return y})),i.d(t,"v",(function(){return b})),i.d(t,"b",(function(){return w})),i.d(t,"e",(function(){return _})),i.d(t,"k",(function(){return x})),i.d(t,"l",(function(){return k})),i.d(t,"j",(function(){return $})),i.d(t,"s",(function(){return I}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/device/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/device/unAuthlist",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/iot/device/listByGroup",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/iot/device/shortList",method:"get",params:e})}function l(e){return Object(a["a"])({url:"/iot/device/all",method:"get",params:e})}function c(e){return Object(a["a"])({url:"/iot/device/"+e,method:"get"})}function d(e){return Object(a["a"])({url:"/iot/device/synchronization/"+e,method:"get"})}function u(e){return Object(a["a"])({url:"/iot/device/getDeviceBySerialNumber/"+e,method:"get"})}function p(){return Object(a["a"])({url:"/iot/device/statistic",method:"get"})}function h(e,t){return Object(a["a"])({url:"/iot/device/assignment?deptId="+e+"&deviceIds="+t,method:"post"})}function f(e,t){return Object(a["a"])({url:"/iot/device/recovery?deviceIds="+e+"&recoveryDeptId="+t,method:"post"})}function m(e){return Object(a["a"])({url:"/iot/record/list",method:"get",params:e})}function v(e){return Object(a["a"])({url:"/iot/record/list",method:"get",params:e})}function g(e){return Object(a["a"])({url:"/iot/device/runningStatus",method:"get",params:e})}function y(e){return Object(a["a"])({url:"/iot/device",method:"post",data:e})}function b(e){return Object(a["a"])({url:"/iot/device",method:"put",data:e})}function w(e){return Object(a["a"])({url:"/iot/device/"+e,method:"delete"})}function _(e){return Object(a["a"])({url:"/iot/device/generator",method:"get",params:e})}function x(e){return Object(a["a"])({url:"/iot/device/getMqttConnectData",method:"get",params:e})}function k(e){return Object(a["a"])({url:"/sip/sipconfig/auth/"+e,method:"get"})}function $(e){return Object(a["a"])({url:"/iot/device/getHttpAuthData",method:"get",params:e})}function I(e){return Object(a["a"])({url:"/iot/device/listThingsModel",method:"get",params:e})}},"5a6f":function(e,t,i){"use strict";i.d(t,"d",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"e",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"b",(function(){return l}));var a=i("b775");function r(e){return Object(a["a"])({url:"/sip/mediaserver/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/sip/mediaserver",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/sip/mediaserver",method:"put",data:e})}function o(e){return Object(a["a"])({url:"/sip/mediaserver/"+e,method:"delete"})}function l(e){return Object(a["a"])({url:"/sip/mediaserver/check",method:"get",params:e})}},"5b52":function(e,t,i){"use strict";i.d(t,"h",(function(){return r})),i.d(t,"c",(function(){return n})),i.d(t,"i",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"e",(function(){return l})),i.d(t,"g",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"f",(function(){return u})),i.d(t,"d",(function(){return p}));var a=i("b775");function r(e){return Object(a["a"])({url:"/sub/gateway/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/sub/gateway/"+e,method:"delete"})}function s(e){return Object(a["a"])({url:"/sub/gateway/subDevice",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/sub/gateway/addBatch",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/sub/gateway/editBatch",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/productModbus/gateway/list",method:"get",params:e})}function d(e){return Object(a["a"])({url:"productModbus/gateway/addBatch",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/productModbus/gateway/editBatch",method:"post",data:e})}function p(e){return Object(a["a"])({url:"/productModbus/gateway/"+e,method:"delete"})}},"5daf":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"running-status beautify-scroll-def"},[i("el-main",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"H100",staticStyle:{position:"relative"}},[!e.loading&&e.runningData.length>0?i("el-row",{staticClass:"row-list",attrs:{gutter:12}},e._l(e.runningData,(function(t,a){return i("el-col",{key:a,staticStyle:{"margin-bottom":"10px",height:"110px"},attrs:{span:6}},[i("el-card",{staticClass:"elcard",attrs:{shadow:"hover"}},[i("div",{staticClass:"head"},[i("div",{staticClass:"title"},[e._v(" "+e._s(t.name||"--")+" "),0==t.isReadonly?i("el-tooltip",{staticClass:"title_send",attrs:{content:e.$t("device.realTime-status.845353-0")}},[i("span",{staticClass:"el-icon-s-promotion",on:{click:function(i){return i.stopPropagation(),e.editFunc(t)}}},[i("span",{staticClass:"send_title"},[e._v(e._s(e.$t("device.realTime-status.845353-1")))])])]):e._e()],1),i("div",{staticClass:"name"},[i("span",{staticClass:"value_class"},[e._v(e._s(t.valueName||"-"))]),t.datatype.unit&&"un"!=t.datatype.unit?i("span",[e._v(" "+e._s(t.datatype.unit||t.datatype.unitName)+" ")]):e._e()])]),i("div",{staticClass:"card-bottom"},[e._v(e._s(e.$t("device.realTime-status.845353-2"))+e._s(t.ts||"--"))])])],1)})),1):e._e(),e.loading||0!==e.runningData.length?e._e():i("el-empty",{attrs:{"image-size":200}})],1),i("el-dialog",{attrs:{title:e.$t("device.realTime-status.845353-3"),visible:e.dialogValue,width:"30%"},on:{"update:visible":function(t){e.dialogValue=t}}},[i("el-form",{staticStyle:{height:"100%",padding:"0 20px"},attrs:{size:"mini"}},[e._l(e.opationList,(function(t,a){return i("el-form-item",{key:a,attrs:{label:t.label+"","label-width":"180px"}},["integer"==t.dataTypeName||"decimal"==t.dataTypeName?i("el-input",{staticStyle:{width:"50%"},attrs:{precision:0,controls:!1,type:"number"},on:{input:function(i){return e.justicNumber(t)}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}}):e._e(),"enum"==t.dataTypeName||"singleBoolean"==t.dataTypeName||"bool"==t.dataTypeName?i("el-select",{on:{change:function(t){return e.changeSelect()}},model:{value:e.funVal[t.key],callback:function(i){e.$set(e.funVal,t.key,i)},expression:"funVal[item.key]"}},e._l(t.options,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1):e._e(),"integer"!=t.dataTypeName&&"decimal"!=t.dataTypeName||!t.unit||"un"==t.unit||"/"==t.unit?e._e():i("span",[e._v(""+e._s(t.unit)+"")]),"integer"==t.dataTypeName||"decimal"==t.dataTypeName?i("span",{staticClass:"range"},[e._v("("+e._s(t.min)+" ~ "+e._s(t.max)+")")]):e._e()],1)})),i("el-form-item",{staticStyle:{display:"none"}},[i("el-input",{model:{value:e.functionName,callback:function(t){e.functionName=t},expression:"functionName"}})],1)],2),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogValue=!1}}},[e._v(e._s(e.$t("device.realTime-status.845353-4")))]),i("el-button",{attrs:{type:"primary",loading:e.btnLoading,disabled:!e.canSend},on:{click:e.sendService}},[e._v(e._s(e.$t("device.realTime-status.845353-5")))])],1)],1)],1)},r=[],n=(i("4de4"),i("b0c0"),i("a9e3"),i("b64b"),i("d3b7"),i("25f0"),i("8a79"),i("159b"),i("0bc2")),s={props:{device:{type:Object,default:function(){return{}}}},watch:{device:{handler:function(e){var t=this;e&&e.serialNumber&&(this.params.serialNumber=e.serialNumber,this.serialNumber=e.serialNumber,this.params.productId=e.productId,this.params.slaveId=e.slaveId,this.params.deviceId=e.deviceId,this.deviceInfo=e,this.updateDeviceStatus(this.deviceInfo),this.slaveList=e.subDeviceList,this.getSlaveList(this.deviceInfo),this.$busEvent.$on("updateData",(function(e){e.data&&e.data[0].remark&&(t.getDeviceFuncLog(),e.data[0].ts=e.data[0].remark),t.updateData(e)})),this.$busEvent.$on("updateLog",(function(e){t.getDeviceFuncLog()})),this.mqttCallback())}}},data:function(){return{activeGroup:"",groupList:[],runningData:[],loading:!1,dialogValue:!1,canSend:!1,btnLoading:!1,funVal:{},chooseFun:{},opationList:[],functionName:""}},methods:{qosChange:function(e){},payloadTypeChange:function(e){},getTime:function(){var e=new Date,t=e.getFullYear(),i=e.getMonth()+1,a=e.getDate(),r=e.getHours(),n=e.getMinutes(),s=e.getSeconds();return i=i<10?"0"+i:i,a=a<10?"0"+a:a,r=r<10?"0"+r:r,t+"-"+i+"-"+a+" "+r+":"+n+":"+s},getRuntimeStatus:function(){var e=this;getDeviceRunningStatus(this.params).then((function(t){e.runningData=t.data.thingsModels,e.runningData.forEach((function(e){"enum"==e.datatype.type?e.datatype.enumList.forEach((function(t){t.value==e.value&&(e.value=t.text)})):"bool"==e.datatype.type&&(e.value=0==e.value?e.falseText:e.trueText)})),e.functionData=e.runningData.filter((function(e){return 0==e.isReadonly}))}))},getGateway:function(){var e=this;getDeviceRunningStatus(this.params).then((function(t){e.deviceInfo.thingsModels=t.data.thingsModels}))},getSlaveList:function(){this.getRuntimeStatus(),this.getDeviceFuncLog()},selectSlave:function(){this.params.serialNumber=this.serialNumber+"_"+this.params.slaveId,this.getRuntimeStatus()},handleClick:function(){"prop"===this.thingsType?this.params.type=1:"function"===this.thingsType&&(this.params.type=2,this.functionData=this.runningData.filter((function(e){return 0==e.isReadonly})))},runtimeClick:function(){"gateway"===this.runtimeName?(this.params.serialNumber=this.serialNumber,this.slaveId=this.params.slaveId,this.params.slaveId=void 0,this.getGateway()):(this.params.serialNumber=this.serialNumber+"_"+this.slaveId,this.params.slaveId=this.slaveId,this.getRuntimeStatus())},updateParam:function(e){},editFunc:function(e){this.dialogValue=!0,this.canSend=!0,this.funVal={},this.getValueName(e),this.from=e,console.log(this.runningData)},updateDeviceStatus:function(e){3==e.status?(this.statusColor.background="#12d09f",this.title="在线模式"):1==e.isShadow?(this.statusColor.background="#486FF2",this.title="影子模式"):(this.statusColor.background="#909399",this.title="离线模式",this.shadowUnEnable=!0),this.$emit("statusEvent",this.deviceInfo.status)},getValueName:function(e){this.funVal[e.id]=e.value},sendService:function(){var e=this;console.log("下发指令",this.from.shadow);try{this.funVal[this.from.id]=this.from.shadow;var t={serialNumber:this.serialNumber,productId:this.params.productId,remoteCommand:this.funVal,identifier:this.from.id,slaveId:this.params.slaveId,modelName:this.from.name,isShadow:3!=this.device.status,type:this.from.type};Object(n["b"])(t).then((function(t){200==t.code&&(e.$message({type:"success",message:"服务调用成功!"}),e.getDeviceFuncLog())}))}finally{this.dialogValue=!1}},mqttPublish:function(e,t){var i=this,a={};a[t.id]=t.shadow;var r={serialNumber:e.serialNumber,productId:e.productId,remoteCommand:a,identifier:t.id,modelName:t.name,isShadow:3!=e.status,type:t.type};Object(n["b"])(r).then((function(e){200===e.code&&i.$message({type:"success",message:"服务调用成功!"})}))},getShowValue:function(e){var t=this;switch(this.from.datatype.type){case ENUM:var i=this.from.datatype.enumList;i.forEach((function(i){i.value===e&&(t.showValue=i.text)}));break;case INTEGER:case DECIMAL:this.showValue=e;case BOOL:this.showValue=1==e?this.from.datatype.trueText:this.from.datatype.falseText;break}},changeSelect:function(){this.$forceUpdate()},justicNumber:function(){if(this.canSend=!0,this.from.datatype.max<this.funVal[this.from.identity]||this.from.datatype.min>this.funVal[this.from.identity])return this.canSend=!1,!0;this.$forceUpdate()},getDeviceFuncLog:function(){var e=this,t={serialNumber:this.serialNumber};console.log("params --",t),funcLog(t).then((function(t){e.logList=t.rows}))},updateData:function(e){var t=this;e.data&&0!==e.data.length&&e.data.forEach((function(e){t.runningData.some((function(i,a){if(e.slaveId===i.slaveId&&e.id==i.id){var r=t.runningData[a];return r.ts=e.ts,r.value=e.value,"enum"==i.datatype.type?i.datatype.enumList.forEach((function(e){e.value==r.value&&(r.value=e.text)})):"bool"==i.datatype.type&&(r.value=0==r.value?i.datatype.falseText:i.datatype.trueText),t.$set(t.runningData,a,r),!0}}))}))},mqttCallback:function(){var e=this;this.$mqttTool.client.on("message",(function(t,i,a){var r=t.split("/"),n=(r[1],r[2]);if(i=JSON.parse(i.toString()),i&&("status"==r[3]&&(console.log("接收到【设备状态-运行】主题:",t),console.log("接收到【设备状态-运行】内容:",i),e.deviceInfo.serialNumber==n&&(e.deviceInfo.status=i.status,e.deviceInfo.isShadow=i.isShadow,e.deviceInfo.rssi=i.rssi,e.updateDeviceStatus(e.deviceInfo))),"reply"==r[4]&&e.$modal.notifySuccess(i),t.endsWith("ws/service")&&(console.log("接收到【物模型】主题1",t),console.log("接收到【物模型】内容:",i),e.deviceInfo.serialNumber==n)))for(var s=0;s<i.length;s++){for(var o=!1,l=0;l<e.deviceInfo.thingsModels.length&&!o;l++){if(e.deviceInfo.thingsModels[l].id==i[s].id){"decimal"==e.deviceInfo.thingsModels[l].datatype.type||"integer"==e.deviceInfo.thingsModels[l].datatype.type?e.deviceInfo.thingsModels[l].shadow=Number(i[s].value):e.deviceInfo.thingsModels[l].shadow=i[s].value,o=!0;break}if("object"==e.deviceInfo.thingsModels[l].datatype.type){for(var c=0;c<e.deviceInfo.thingsModels[l].datatype.params.length;c++)if(e.deviceInfo.thingsModels[l].datatype.params[c].id==i[s].id){e.deviceInfo.thingsModels[l].datatype.params[c].shadow=i[s].value,o=!0;break}}else if("array"==e.deviceInfo.thingsModels[l].datatype.type)if("object"==e.deviceInfo.thingsModels[l].datatype.arrayType)if(0==String(i[s].id).indexOf("array_"))for(var d=0;d<e.deviceInfo.thingsModels[l].datatype.arrayParams.length;d++){for(var u=0;u<e.deviceInfo.thingsModels[l].datatype.arrayParams[d].length;u++)if(e.deviceInfo.thingsModels[l].datatype.arrayParams[d][u].id==i[s].id){e.deviceInfo.thingsModels[l].datatype.arrayParams[d][u].shadow=i[s].value,o=!0;break}if(o)break}else for(var p=0;p<e.deviceInfo.thingsModels[l].datatype.arrayParams.length;p++){for(var h=0;h<e.deviceInfo.thingsModels[l].datatype.arrayParams[p].length;h++){var f=p>9?String(p):"0"+l,m="array_"+f+"_";e.deviceInfo.thingsModels[l].datatype.arrayParams[p][h].id==m+i[s].id&&(e.deviceInfo.thingsModels[l].datatype.arrayParams[p][h].shadow=i[s].value,o=!0)}if(o)break}else for(var v=0;v<e.deviceInfo.thingsModels[l].datatype.arrayModel.length;v++)if(e.deviceInfo.thingsModels[l].datatype.arrayModel[v].id==i[s].id){e.deviceInfo.thingsModels[l].datatype.arrayModel[v].shadow=i[s].value,o=!0;break}}for(var g=0;g<e.deviceInfo.chartList.length;g++){if(0==e.deviceInfo.chartList[g].id.indexOf("array_")){if(e.deviceInfo.chartList[g].id==i[s].id){e.deviceInfo.chartList[g].shadow=i[s].value;for(var y=0;y<e.monitorChart.length;y++)if(i[s].id==e.monitorChart[y].data.id){var b=[{value:i[s].value,name:e.monitorChart[y].data.name}];e.monitorChart[y].chart.setOption({series:[{data:b}]});break}}}else if(e.deviceInfo.chartList[g].id==i[s].id){e.deviceInfo.chartList[g].shadow=i[s].value;for(var w=0;w<e.monitorChart.length;w++)if(i[s].id==e.monitorChart[w].data.id){o=!0;var _=[{value:i[s].value,name:e.monitorChart[w].data.name}];e.monitorChart[w].chart.setOption({series:[{data:_}]});break}}if(o)break}}}))}}},o=s,l=(i("4c4c"),i("2877")),c=Object(l["a"])(o,a,r,!1,null,"405562f6",null);t["default"]=c.exports},"5e6c":function(e,t,i){"use strict";i.d(t,"g",(function(){return r})),i.d(t,"e",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"i",(function(){return o})),i.d(t,"c",(function(){return l})),i.d(t,"h",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"j",(function(){return u})),i.d(t,"d",(function(){return p})),i.d(t,"f",(function(){return h}));var a=i("b775");function r(e){return Object(a["a"])({url:"/modbus/job/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/modbus/job/"+e,method:"get"})}function s(e){return Object(a["a"])({url:"/modbus/job",method:"post",data:e})}function o(e,t){var i={taskId:e,status:t};return Object(a["a"])({url:"/modbus/job",method:"put",data:i})}function l(e){return Object(a["a"])({url:"/modbus/job/del",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/productModbus/job/list",method:"get",params:e})}function d(e){return Object(a["a"])({url:"/productModbus/job",method:"post",data:e})}function u(e,t){var i={taskId:e,status:t};return Object(a["a"])({url:"/productModbus/job",method:"put",data:i})}function p(e){return Object(a["a"])({url:"/productModbus/job/"+e,method:"delete"})}function h(e,t){return Object(a["a"])({url:"/productModbus/job/getSlaveId?productId="+e+"&deviceId="+t,method:"get"})}},"5f43":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"running-status"},[i("el-row",{attrs:{gutter:90}},[i("el-col",{staticClass:"status-col",attrs:{xs:24,sm:24,md:24,lg:14,xl:10}},[i("el-descriptions",{attrs:{column:1,border:""}},[i("el-descriptions-item",{attrs:{labelStyle:e.statusColor}},[i("template",{slot:"label"},[i("i",{staticClass:"el-icon-menu"}),e._v(" "+e._s(e.$t("device.running-status.866086-0"))+" ")]),i("span",{staticClass:"title"},[e._v(e._s(e.title))])],2),i("el-descriptions-item",{attrs:{labelStyle:e.statusColor}},[i("template",{slot:"label"},[i("svg-icon",{attrs:{"icon-class":"ota"}}),e._v(" "+e._s(e.$t("device.running-status.866086-1"))+" ")],1),i("el-button",{attrs:{type:"primary",size:"mini",plain:!0},on:{click:function(t){return e.viewVersion()}}},[e._v(e._s(e.$t("device.running-status.866086-44")))])],2),e._l(e.deviceInfo.thingsModels,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{labelStyle:e.statusColor}},[i("template",{slot:"label"},[i("i",{staticClass:"el-icon-open"}),e._v(" "+e._s(t.name)+" ")]),"bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{"active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"item.shadow"}})],1):e._e(),"enum"==t.datatype.type?i("div",{staticClass:"emum-wrap"},[t.datatype.showWay&&"button"==t.datatype.showWay?i("div",e._l(t.datatype.enumList,(function(a){return i("el-button",{key:a.value,staticClass:"btn",class:{"is-active-btn":a.value===t.shadow},attrs:{size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{click:function(i){return e.enumButtonClick(e.deviceInfo,t,a.value)}}},[e._v(" "+e._s(a.text)+" ")])})),1):i("el-select",{attrs:{placeholder:e.$t("device.running-status.866086-3"),disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"item.shadow"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:t.datatype.unit?e.$t("device.running-status.866086-5",[t.datatype.unit]):e.$t("device.running-status.866086-4"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"item.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e(),"decimal"==t.datatype.type?i("div",[i("div",{staticStyle:{width:"80%",float:"left"}},[i("el-slider",{attrs:{min:t.datatype.min,max:t.datatype.max,step:t.datatype.step,"format-tooltip":function(e){return e+" "+t.datatype.unit},disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"item.shadow"}})],1),i("div",{staticStyle:{width:"20%",float:"left"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"16px",padding:"1px 8px",margin:"2px 0 0 5px","border-radius":"3px"},attrs:{icon:"el-icon-s-promotion",type:"info",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}}})],1)]):e._e(),"integer"==t.datatype.type?i("div",[i("div",{staticStyle:{width:"80%",float:"left"}},[i("el-slider",{staticStyle:{"margin-left":"10px"},attrs:{min:t.datatype.min,max:t.datatype.max,step:t.datatype.step,"format-tooltip":function(e){return e+" "+t.datatype.unit},disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"item.shadow"}})],1),i("div",{staticStyle:{width:"20%",float:"left"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"16px",padding:"1px 8px",margin:"4px 0 0 10px","border-radius":"3px"},attrs:{icon:"el-icon-s-promotion",type:"info",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}}})],1)]):e._e(),"object"==t.datatype.type?i("div",[i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(t.datatype.params,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{label:t.name}},["bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{"active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}})],1):e._e(),"enum"==t.datatype.type?i("div",[t.datatype.showWay&&"button"==t.datatype.showWay?i("div",e._l(t.datatype.enumList,(function(a){return i("el-button",{key:a.value,class:{"is-active-btn":a.value===t.shadow},staticStyle:{margin:"5px"},attrs:{size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{click:function(i){return e.enumButtonClick(e.deviceInfo,t,a.value)}}},[e._v(" "+e._s(a.text)+" ")])})),1):i("el-select",{attrs:{size:"small",placeholder:e.$t("device.running-status.866086-3"),disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e(),"decimal"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e(),"integer"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e()])})),1)],1):e._e(),"array"==t.datatype.type?i("div",["object"!=t.datatype.arrayType?i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(t.datatype.arrayModel,(function(a,r){return i("el-descriptions-item",{key:r,attrs:{label:t.name+(r+1)}},["string"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{input:function(i){return e.arrayItemChange(i,t)}},model:{value:a.shadow,callback:function(t){e.$set(a,"shadow",t)},expression:"model.shadow"}},[e.shadowUnEnable&&0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(t){return e.mqttPublish(e.deviceInfo,a)}},slot:"append"})],1)],1):e._e(),"decimal"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{input:function(i){return e.arrayItemChange(i,t)}},model:{value:a.shadow,callback:function(t){e.$set(a,"shadow",t)},expression:"model.shadow"}},[e.shadowUnEnable&&0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(t){return e.mqttPublish(e.deviceInfo,a)}},slot:"append"})],1)],1):e._e(),"integer"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{input:function(i){return e.arrayItemChange(i,t)}},model:{value:a.shadow,callback:function(t){e.$set(a,"shadow",t)},expression:"model.shadow"}},[e.shadowUnEnable&&0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(t){return e.mqttPublish(e.deviceInfo,a)}},slot:"append"})],1)],1):e._e()])})),1):e._e(),"object"==t.datatype.arrayType?i("el-collapse",e._l(t.datatype.arrayParams,(function(a,r){return i("el-collapse-item",{key:r},[i("template",{slot:"title"},[i("span",{staticStyle:{color:"#666"}},[i("i",{staticClass:"el-icon-tickets"}),e._v(" "+e._s(t.name+(r+1))+" ")])]),i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(a,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{label:t.name}},["bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{"active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}})],1):e._e(),"enum"==t.datatype.type?i("div",[t.datatype.showWay&&"button"==t.datatype.showWay?i("div",e._l(t.datatype.enumList,(function(a){return i("el-button",{key:a.value,class:{"is-active-btn":a.value===t.shadow},staticStyle:{margin:"5px"},attrs:{size:"mini",disabled:e.shadowUnEnable||1==t.isReadonly},on:{click:function(i){return e.enumButtonClick(e.deviceInfo,t,a.value)}}},[e._v(" "+e._s(a.text)+" ")])})),1):i("el-select",{attrs:{placeholder:e.$t("device.running-status.866086-3"),size:"small",disabled:e.shadowUnEnable||1==t.isReadonly},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e(),"decimal"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e(),"integer"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),disabled:e.shadowUnEnable||1==t.isReadonly},model:{value:t.shadow,callback:function(i){e.$set(t,"shadow",i)},expression:"param.shadow"}},[e.shadowUnEnable||0!=t.isReadonly?e._e():i("el-button",{staticStyle:{"font-size":"20px"},attrs:{slot:"append",icon:"el-icon-s-promotion",title:e.$t("device.running-status.866086-6")},on:{click:function(i){return e.mqttPublish(e.deviceInfo,t)}},slot:"append"})],1)],1):e._e()])})),1)],2)})),1):e._e()],1):e._e()],2)}))],2),1==e.deviceInfo.isShadow&&3!=e.deviceInfo.status?i("el-descriptions",{staticStyle:{"margin-top":"30px"},attrs:{column:1,border:""}},[e.deviceInfo.thingsModels.length>0?i("template",{slot:"title"},[i("span",{staticStyle:{"font-size":"14px",color:"#606266"}},[e._v(e._s(e.$t("device.running-status.866086-9")))])]):e._e(),e._l(e.deviceInfo.thingsModels,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{labelStyle:{minWidth:"100px"}}},[i("template",{slot:"label"},[i("i",{staticClass:"el-icon-open"}),e._v(" "+e._s(t.name)+" ")]),"bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{"active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:""},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1):e._e(),"enum"==t.datatype.type?i("div",[t.datatype.showWay&&"button"==t.datatype.showWay?i("div",e._l(t.datatype.enumList,(function(t){return i("el-button",{key:t.value,staticStyle:{margin:"5px"},attrs:{size:"mini",disabled:""}},[e._v(e._s(t.text))])})),1):i("el-select",{attrs:{placeholder:e.$t("device.running-status.866086-3"),disabled:""},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),disabled:""},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1):e._e(),"decimal"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),disabled:""},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1):e._e(),"integer"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),disabled:""},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1):e._e(),"object"==t.datatype.type?i("div",[i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(t.datatype.params,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{label:t.name}},["bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{size:"mini","active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:""},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"enum"==t.datatype.type?i("div",[i("el-select",{attrs:{placeholder:e.$t("device.running-status.866086-3"),disabled:"",size:"mini"},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"decimal"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"integer"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e()])})),1)],1):e._e(),"array"==t.datatype.type?i("div",["object"!=t.datatype.arrayType?i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(t.datatype.arrayModel,(function(a,r){return i("el-descriptions-item",{key:r,attrs:{label:t.name+(r+1)}},["string"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),size:"mini",disabled:""},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"model.value"}})],1):e._e(),"decimal"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),size:"mini",disabled:""},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"model.value"}})],1):e._e(),"integer"==t.datatype.arrayType?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),size:"mini",disabled:""},model:{value:a.value,callback:function(t){e.$set(a,"value",t)},expression:"model.value"}})],1):e._e()])})),1):e._e(),"object"==t.datatype.arrayType?i("el-collapse",e._l(t.datatype.arrayParams,(function(a,r){return i("el-collapse-item",{key:r},[i("template",{slot:"title"},[i("span",{staticStyle:{color:"#666"}},[i("i",{staticClass:"el-icon-tickets"}),e._v(" "+e._s(t.name+(r+1))+" ")])]),i("el-descriptions",{attrs:{column:1,size:"mini",border:""}},e._l(a,(function(t,a){return i("el-descriptions-item",{key:a,attrs:{label:t.name}},["bool"==t.datatype.type?i("div",[i("el-switch",{staticStyle:{"min-width":"100px"},attrs:{"active-text":"","inactive-text":"","active-value":"1","inactive-value":"0",disabled:""},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"enum"==t.datatype.type?i("div",[i("el-select",{attrs:{placeholder:e.$t("device.running-status.866086-3"),disabled:"",size:"mini"},on:{change:function(i){return e.mqttPublish(e.deviceInfo,t)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}},e._l(t.datatype.enumList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.text,value:e.value}})})),1)],1):e._e(),"string"==t.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.running-status.866086-4"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"decimal"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"number",placeholder:e.$t("device.running-status.866086-7"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e(),"integer"==t.datatype.type?i("div",[i("el-input",{attrs:{type:"integer",placeholder:e.$t("device.running-status.866086-8"),disabled:"",size:"mini"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"param.value"}})],1):e._e()])})),1)],2)})),1):e._e()],1):e._e()],2)}))],2):e._e()],1),i("el-col",{attrs:{xs:24,sm:24,md:24,lg:10,xl:14}},[e.deviceInfo.chartList.length>0?i("el-row",{attrs:{gutter:20}},e._l(e.deviceInfo.chartList,(function(e,t){return i("el-col",{key:t,attrs:{xs:24,sm:12,md:12,lg:24,xl:8}},[i("el-card",{staticStyle:{"border-radius":"8px","margin-bottom":"20px"},attrs:{shadow:"hover"}},[i("div",{ref:"map",refInFor:!0,staticStyle:{height:"230px",width:"185px",margin:"0 auto","margin-bottom":"15px"}})])],1)})),1):e._e()],1)],1),i("el-dialog",{attrs:{title:e.$t("device.running-status.866086-10"),visible:e.openVersion,width:"550px","append-to-body":""},on:{"update:visible":function(t){e.openVersion=t}}},[i("el-form",{ref:"firmwareForm",attrs:{"label-width":"100px",model:e.firmwareParams,inline:!0,rules:e.rules}},[i("el-form-item",{attrs:{label:e.$t("device.running-status.866086-38"),prop:"firmwareType"}},[i("el-select",{staticStyle:{width:"350px"},attrs:{placeholder:e.$t("firmware.index.222541-51"),disabled:""},on:{change:e.handleVersionInputChange},model:{value:e.deviceInfo.firmwareType,callback:function(t){e.$set(e.deviceInfo,"firmwareType",t)},expression:"deviceInfo.firmwareType"}},e._l(e.firmwareTypeList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("device.running-status.866086-39"),prop:""}},[i("el-input",{staticStyle:{width:"350px"},attrs:{placeholder:e.$t("device.running-status.866086-40"),disabled:""},model:{value:e.deviceInfo.firmwareVersion,callback:function(t){e.$set(e.deviceInfo,"firmwareVersion",t)},expression:"deviceInfo.firmwareVersion"}},[i("template",{slot:"prepend"},[e._v("Version")])],2)],1)],1),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("el-tooltip",{attrs:{effect:"dark",content:e.$t("device.running-status.866086-41"),placement:"top-start"}},[i("el-button",{attrs:{type:"primary",disabled:3!==e.device.status},on:{click:e.getLatestFirmware}},[e._v(e._s(e.$t("device.running-status.866086-42")))])],1),i("el-button",{on:{click:e.cancel1}},[e._v(e._s(e.$t("cancel")))])],1)],1),i("el-dialog",{attrs:{title:e.$t("device.running-status.866086-10"),visible:e.openFirmware,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.openFirmware=t}}},[null==e.firmware?i("div",{staticStyle:{"text-align":"center","font-size":"16px"}},[i("i",{staticClass:"el-icon-success",staticStyle:{color:"#67c23a"}}),e._v(" "+e._s(e.$t("device.running-status.866086-11"))+" ")]):e._e(),null!=e.firmware&&e.deviceInfo.firmwareVersion<e.firmware.version?i("el-descriptions",{attrs:{column:1,border:"",size:"large",labelStyle:{width:"150px","font-weight":"bold"}}},[i("template",{slot:"title"},[i("el-link",{attrs:{icon:"el-icon-success",type:"success",underline:!1}},[e._v(e._s(e.$t("device.running-status.866086-12")))])],1),i("el-descriptions-item",{attrs:{label:e.$t("device.running-status.866086-13")}},[e._v(e._s(e.firmware.firmwareName))]),i("el-descriptions-item",{attrs:{label:e.$t("device.device-edit.148398-4")}},[e._v(e._s(e.firmware.productName))]),i("el-descriptions-item",{attrs:{label:e.$t("device.device-edit.148398-12")}},[e._v("Version "+e._s(e.firmware.version))]),i("el-descriptions-item",{attrs:{label:e.$t("device.running-status.866086-16")}},[i("el-link",{attrs:{href:e.getDownloadUrl(e.firmware.filePath),underline:!1,type:"primary"}},[e._v(e._s(e.getDownloadUrl(e.firmware.filePath)))])],1),i("el-descriptions-item",{attrs:{label:e.$t("device.running-status.866086-17")}},[e._v(e._s(e.firmware.remark))])],2):e._e(),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[null!=e.firmware&&e.deviceInfo.firmwareVersion<e.firmware.version?i("el-button",{attrs:{type:"success"},on:{click:e.otaUpgrade}},[e._v(e._s(e.$t("device.running-status.866086-18")))]):e._e(),i("el-button",{on:{click:e.cancel}},[e._v(e._s(e.$t("cancel")))])],1)],1)],1)},r=[],n=i("c7eb"),s=i("1da1"),o=i("5530"),l=i("15fd"),c=(i("d81d"),i("4e82"),i("b0c0"),i("a9e3"),i("814a")),d=i("0bc2"),u=i("67fa"),p=["firmwareVersion","wirelessVersion","firmwareType"],h={name:"running-status",props:{device:{type:Object,default:null}},watch:{device:{handler:function(e){e&&0!=e.deviceId&&e&&0!=e.deviceId&&(this.deviceInfo=e,this.updateDeviceStatus(this.deviceInfo),this.$nextTick((function(){this.MonitorChart()})),this.deviceInfo.thingsModels&&this.deviceInfo.thingsModels.length>0&&(this.deviceInfo.thingsModels=this.device.thingsModels.sort((function(e,t){return t.order-e.order}))),this.deviceInfo.chartList&&this.deviceInfo.chartList.length>0&&(this.deviceInfo.chartList=this.deviceInfo.chartList.sort((function(e,t){return t.order-e.order}))))}}},data:function(){return{title:"设备控制 ",shadowUnEnable:!1,statusColor:{background:"#67C23A",color:"#fff",minWidth:"100px"},firmware:{},openFirmware:!1,loading:!0,deviceInfo:{boolList:[],enumList:[],stringList:[],integerList:[],decimalList:[],arrayList:[],thingsModels:[],chartList:[]},firmwareParams:{firmwareType:"",versionInput:""},monitorChart:[{chart:{},data:{id:"",name:"",value:""}}],openVersion:!1,firmwareTypeList:[{label:this.$t("firmware.index.222541-52"),value:1},{label:"HTTP",value:2}],remoteCommand:{},rules:{firmwareType:[{required:!0,message:this.$t("device.running-status.866086-43"),trigger:"blur"}]}}},mounted:function(){this.handleDeviceChange(this.device);var e=this.device,t=e.deviceId;e.serialNumber;t&&(this.initDataStatus(),this.initData())},methods:{handleDeviceChange:function(e){var t=this;if(e&&0!=e.deviceId&&this.device.thingsModels){var i=e.firmwareVersion,a=e.wirelessVersion,r=e.firmwareType,n=Object(l["a"])(e,p),s=Object(o["a"])({version:1===r?i:a,firmwareType:r},n);this.deviceInfo=s,this.updateDeviceStatus(this.deviceInfo),this.$nextTick((function(){t.MonitorChart()})),this.deviceInfo.thingsModels=this.deviceInfo.thingsModels.sort((function(e,t){return t.order-e.order})),this.deviceInfo.chartList=this.deviceInfo.chartList.sort((function(e,t){return t.order-e.order}))}},initData:function(){var e=this;this.$busEvent.$on("updateData",(function(t){e.updateParam(t)}))},initDataStatus:function(){var e=this;this.$busEvent.$on("updateStatus",(function(t){e.updateStatus(t)}))},updateStatus:function(e){var t=e.serialNumber,i=(e.productId,e.data);i&&this.deviceInfo.serialNumber==t&&(this.deviceInfo.status=i.status,this.deviceInfo.isShadow=i.isShadow,this.deviceInfo.rssi=i.rssi,this.updateDeviceStatus(this.deviceInfo))},updateParam:function(e){e.serialNumber,e.productId;var t=e.data,i=!1;if(t=t.message,t)for(var a=0;a<t.length;a++){for(var r=0;r<this.deviceInfo.thingsModels.length&&!i;r++){if(this.deviceInfo.thingsModels[r].id==t[a].id){var n=this.deviceInfo.thingsModels[r];"decimal"==this.deviceInfo.thingsModels[r].datatype.type||"integer"==this.deviceInfo.thingsModels[r].datatype.type?n.shadow=Number(t[a].value):n.shadow=t[a].value}if("object"==this.deviceInfo.thingsModels[r].datatype.type){for(var s=0;s<this.deviceInfo.thingsModels[r].datatype.params.length;s++)if(this.deviceInfo.thingsModels[r].datatype.params[s].id==t[a].id){this.deviceInfo.thingsModels[r].datatype.params[s].shadow=t[a].value,i=!0;break}}else if("array"==this.deviceInfo.thingsModels[r].datatype.type)if("object"==this.deviceInfo.thingsModels[r].datatype.arrayType)if(0==String(t[a].id).indexOf("array_"))for(var o=0;o<this.deviceInfo.thingsModels[r].datatype.arrayParams.length;o++){for(var l=0;l<this.deviceInfo.thingsModels[r].datatype.arrayParams[o].length;l++)if(this.deviceInfo.thingsModels[r].datatype.arrayParams[o][l].id==t[a].id){this.deviceInfo.thingsModels[r].datatype.arrayParams[o][l].shadow=t[a].value,i=!0;break}if(i)break}else for(var c=0;c<this.deviceInfo.thingsModels[r].datatype.arrayParams.length;c++)for(var d=0;d<this.deviceInfo.thingsModels[r].datatype.arrayParams[c].length;d++){var u=c>9?String(c):"0"+r,p="array_"+u+"_";this.deviceInfo.thingsModels[r].datatype.arrayParams[c][d].id==p+t[a].id&&(this.deviceInfo.thingsModels[r].datatype.arrayParams[c][d].shadow=t[a].value)}else for(var h=0;h<this.deviceInfo.thingsModels[r].datatype.arrayModel.length;h++)if(this.deviceInfo.thingsModels[r].datatype.arrayModel[h].id==t[a].id){this.deviceInfo.thingsModels[r].datatype.arrayModel[h].shadow=t[a].value;break}}for(var f=0;f<this.deviceInfo.chartList.length;f++){if(0==this.deviceInfo.chartList[f].id.indexOf("array_")){if(this.deviceInfo.chartList[f].id==t[a].id){this.deviceInfo.chartList[f].shadow=t[a].value;for(var m=0;m<this.monitorChart.length;m++)if(t[a].id==this.monitorChart[m].data.id){var v=[{value:this.deviceInfo.chartList[f].shadow,name:this.monitorChart[m].data.name}];this.monitorChart[m].chart.setOption({series:[{data:v}]});break}}}else if(this.deviceInfo.chartList[f].id==t[a].id){this.deviceInfo.chartList[f].shadow=t[a].value;for(var g=0;g<this.monitorChart.length;g++)if(t[a].id==this.monitorChart[g].data.id){var y=[{value:this.deviceInfo.chartList[f].shadow,name:this.monitorChart[g].data.name}];this.monitorChart[g].chart.setOption({series:[{data:y}]});break}}if(i)break}}},mqttPublish:function(e,t){var i=this;return Object(s["a"])(Object(n["a"])().mark((function a(){var r,s,o,l;return Object(n["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r={},r[t.id]=t.shadow,s={deviceId:e.deviceId,modelId:t.modelId},a.next=5,Object(u["d"])(s);case 5:if(o=a.sent,200==o.code){a.next=9;break}return i.$message({type:"warning",message:o.msg}),a.abrupt("return");case 9:if(l={serialNumber:e.serialNumber,productId:e.productId,remoteCommand:r,identifier:t.id,modelName:t.name,isShadow:3!=e.status,type:t.type},3===i.device.status||1===i.device.isShadow){a.next=14;break}return 1===i.device.status?title=i.$t("device.device-variable.930930-0"):2===i.device.status?title=i.$t("device.device-variable.930930-1"):title=i.$t("device.device-variable.930930-2"),i.$message({type:"warning",message:title}),a.abrupt("return");case 14:if("MODBUS-TCP"!==i.deviceInfo.protocolCode&&"MODBUS-RTU"!==i.deviceInfo.protocolCode||3!==i.device.status){a.next=19;break}return a.next=17,Object(d["c"])(l).then((function(e){200===e.code?i.$message({type:"success",message:i.$t("device.running-status.866086-25")}):i.$message.error(e.msg)}));case 17:a.next=21;break;case 19:return a.next=21,Object(d["b"])(l).then((function(e){200===e.code?i.$message({type:"success",message:i.$t("device.running-status.866086-25")}):i.$message.error(e.msg)}));case 21:case"end":return a.stop()}}),a)})))()},enumButtonClick:function(e,t,i){t.shadow=i,this.mqttPublish(e,t)},viewVersion:function(){this.openVersion=!0,this.firmwareParams.firmwareType=1,this.firmwareParams.versionInput="",this.handleVersionInputChange()},handleVersionInputChange:function(){1==this.firmwareParams.firmwareType?this.firmwareParams.versionInput="Version"+this.device.firmwareVersion:this.firmwareParams.versionInput="Version"+this.device.wirelessVersion},cancel1:function(){this.openVersion=!1},updateDeviceStatus:function(e){3==e.status?(this.statusColor.background="#12d09f",this.title=this.$t("device.running-status.866086-26"),this.shadowUnEnable=!1):1==e.isShadow?(this.statusColor.background="#486FF2",this.title=this.$t("device.running-status.866086-27"),this.shadowUnEnable=!1):(this.statusColor.background="#909399",this.title=this.$t("device.running-status.866086-28"),this.shadowUnEnable=!0),this.$emit("statusEvent",this.deviceInfo.status)},arrayItemChange:function(e,t){for(var i="",a=0;a<t.datatype.arrayCount;a++)i+=t.datatype.arrayModel[a].shadow+",";i=i.substring(0,i.length-1),t.shadow=i},arrayInputChange:function(e,t){var i=e.split(",");if(i.length!=t.datatype.arrayCount)this.$modal.alertWarning(this.$t("device.running-status.866086-29")+t.datatype.arrayCount+this.$t("device.running-status.866086-30"));else for(var a=0;a<t.datatype.arrayCount;a++)t.datatype.arrayModel[a].shadow=i[a]},otaUpgrade:function(){var e=this,t="/"+this.deviceInfo.productId+"/"+this.deviceInfo.serialNumber+"/ota/get",i='{"version":'+this.firmware.version+',"downloadUrl":"'+this.getDownloadUrl(this.firmware.filePath)+'"}';this.$mqttTool.publish(t,i,this.$t("device.running-status.866086-31")).then((function(t){e.$modal.notifySuccess(t)})).catch((function(t){e.$modal.notifyError(t)})),this.openFirmware=!1},getLatestFirmware:function(){var e=this,t=this.deviceInfo,i=t.deviceId,a=t.firmwareType;Object(c["d"])(i,a).then((function(t){200===t.code&&(e.firmware=t.data,e.openFirmware=!0)}))},cancel:function(){this.openFirmware=!1},getDownloadUrl:function(e){return window.location.origin+"/prod-api"+e},MonitorChart:function(){for(var e=0;e<this.deviceInfo.chartList.length;e++){var t;this.monitorChart[e]={chart:this.$echarts.init(this.$refs.map[e]),data:{id:this.deviceInfo.chartList[e].id,name:this.deviceInfo.chartList[e].name,value:this.deviceInfo.chartList[e].shadow?this.deviceInfo.chartList[e].shadow:this.deviceInfo.chartList[e].datatype.min}},t={tooltip:{formatter:" {b} <br/> {c}"+this.deviceInfo.chartList[e].datatype.unit},series:[{name:this.deviceInfo.chartList[e].datatype.type,type:"gauge",min:this.deviceInfo.chartList[e].datatype.min,max:this.deviceInfo.chartList[e].datatype.max,colorBy:"data",splitNumber:10,radius:"100%",splitLine:{distance:4},axisLabel:{fontSize:10,distance:10},axisTick:{distance:4},axisLine:{lineStyle:{width:8,color:[[.2,"#409EFF"],[.8,"#12d09f"],[1,"#F56C6C"]],opacity:.3}},pointer:{icon:"triangle",length:"60%",width:7},progress:{show:!0,width:8},detail:{valueAnimation:!0,formatter:"{value} "+this.deviceInfo.chartList[e].datatype.unit,offsetCenter:[0,"80%"],fontSize:20},data:[{value:this.deviceInfo.chartList[e].shadow?this.deviceInfo.chartList[e].shadow:this.deviceInfo.chartList[e].datatype.min,name:this.deviceInfo.chartList[e].name}],title:{offsetCenter:[0,"115%"],fontSize:16}}]},t&&this.monitorChart[e].chart.setOption(t)}}}},f=h,m=(i("d854"),i("2877")),v=Object(m["a"])(f,a,r,!1,null,"53fe5367",null);t["default"]=v.exports},"61f4":function(e,t,i){"use strict";i("ce65")},"658f5":function(e,t,i){!function(t,i){e.exports=i()}(0,(function(){return function(e){var t={};function i(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,a){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(a,r,function(t){return e[t]}.bind(null,r));return a},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/",i(i.s=13)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}e.exports=function(e,t,a){return t&&i(e.prototype,t),a&&i(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function i(t){return e.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){e.exports=i(14)()},function(e,t,i){"use strict";i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"c",(function(){return h}));var a=i(0),r=i.n(a),n=i(1),s=i.n(n);function o(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=Number(e)?3:0)}var l=function(){function e(t){r()(this,e),this.mode=u.MODE_8BIT_BYTE,this.parsedData=[],this.data=t;for(var i=[],a=0,n=this.data.length;a<n;a++){var s=[],o=this.data.charCodeAt(a);o>65536?(s[0]=240|(1835008&o)>>>18,s[1]=128|(258048&o)>>>12,s[2]=128|(4032&o)>>>6,s[3]=128|63&o):o>2048?(s[0]=224|(61440&o)>>>12,s[1]=128|(4032&o)>>>6,s[2]=128|63&o):o>128?(s[0]=192|(1984&o)>>>6,s[1]=128|63&o):s[0]=o,i.push(s)}this.parsedData=Array.prototype.concat.apply([],i),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}return s()(e,[{key:"getLength",value:function(){return this.parsedData.length}},{key:"write",value:function(e){for(var t=0,i=this.parsedData.length;t<i;t++)e.put(this.parsedData[t],8)}}]),e}(),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.L;r()(this,e),this.moduleCount=0,this.dataList=[],this.typeNumber=t,this.errorCorrectLevel=i,this.moduleCount=0,this.dataList=[]}return s()(e,[{key:"addData",value:function(e){if(this.typeNumber<=0)this.typeNumber=function(e,t){for(var i=1,a=o(e),r=0,n=y.length;r<n;r++){var s=0;switch(t){case d.L:s=y[r][0];break;case d.M:s=y[r][1];break;case d.Q:s=y[r][2];break;case d.H:s=y[r][3]}if(a<=s)break;i++}if(i>y.length)throw new Error("Too long data");return i}(e,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error("Invalid QR version: ".concat(this.typeNumber));if(!function(e,t,i){var a=o(t),r=e-1,n=0;switch(i){case d.L:n=y[r][0];break;case d.M:n=y[r][1];break;case d.Q:n=y[r][2];break;case d.H:n=y[r][3]}return a<=n}(this.typeNumber,e,this.errorCorrectLevel))throw new Error("Data is too long for QR version: ".concat(this.typeNumber))}var t=new l(e);this.dataList.push(t),this.dataCache=void 0}},{key:"isDark",value:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error("".concat(e,",").concat(t));return this.modules[e][t]}},{key:"getModuleCount",value:function(){return this.moduleCount}},{key:"make",value:function(){this.makeImpl(!1,this.getBestMaskPattern())}},{key:"makeImpl",value:function(t,i){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var a=0;a<this.moduleCount;a++){this.modules[a]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[a][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,i),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=e.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,i)}},{key:"setupPositionProbePattern",value:function(e,t){for(var i=-1;i<=7;i++)if(!(e+i<=-1||this.moduleCount<=e+i))for(var a=-1;a<=7;a++)t+a<=-1||this.moduleCount<=t+a||(this.modules[e+i][t+a]=0<=i&&i<=6&&(0==a||6==a)||0<=a&&a<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=a&&a<=4)}},{key:"getBestMaskPattern",value:function(){if(Number.isInteger(this.maskPattern)&&Object.values(p).includes(this.maskPattern))return this.maskPattern;for(var e=0,t=0,i=0;i<8;i++){this.makeImpl(!0,i);var a=h.getLostPoint(this);(0==i||e>a)&&(e=a,t=i)}return t}},{key:"setupTimingPattern",value:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)}},{key:"setupPositionAdjustPattern",value:function(){for(var e=h.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var i=0;i<e.length;i++){var a=e[t],r=e[i];if(null==this.modules[a][r])for(var n=-2;n<=2;n++)for(var s=-2;s<=2;s++)this.modules[a+n][r+s]=-2==n||2==n||-2==s||2==s||0==n&&0==s}}},{key:"setupTypeNumber",value:function(e){for(var t=h.getBCHTypeNumber(this.typeNumber),i=0;i<18;i++){var a=!e&&1==(t>>i&1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=a}for(i=0;i<18;i++)a=!e&&1==(t>>i&1),this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=a}},{key:"setupTypeInfo",value:function(e,t){for(var i=this.errorCorrectLevel<<3|t,a=h.getBCHTypeInfo(i),r=0;r<15;r++){var n=!e&&1==(a>>r&1);r<6?this.modules[r][8]=n:r<8?this.modules[r+1][8]=n:this.modules[this.moduleCount-15+r][8]=n}for(r=0;r<15;r++)n=!e&&1==(a>>r&1),r<8?this.modules[8][this.moduleCount-r-1]=n:r<9?this.modules[8][15-r-1+1]=n:this.modules[8][15-r-1]=n;this.modules[this.moduleCount-8][8]=!e}},{key:"mapData",value:function(e,t){for(var i=-1,a=this.moduleCount-1,r=7,n=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var o=0;o<2;o++)if(null==this.modules[a][s-o]){var l=!1;n<e.length&&(l=1==(e[n]>>>r&1)),h.getMask(t,a,s-o)&&(l=!l),this.modules[a][s-o]=l,-1==--r&&(n++,r=7)}if((a+=i)<0||this.moduleCount<=a){a-=i,i=-i;break}}}}],[{key:"createData",value:function(t,i,a){for(var r=v.getRSBlocks(t,i),n=new g,s=0;s<a.length;s++){var o=a[s];n.put(o.mode,4),n.put(o.getLength(),h.getLengthInBits(o.mode,t)),o.write(n)}var l=0;for(s=0;s<r.length;s++)l+=r[s].dataCount;if(n.getLengthInBits()>8*l)throw new Error("code length overflow. (".concat(n.getLengthInBits(),">").concat(8*l,")"));for(n.getLengthInBits()+4<=8*l&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*l||(n.put(e.PAD0,8),n.getLengthInBits()>=8*l));)n.put(e.PAD1,8);return e.createBytes(n,r)}},{key:"createBytes",value:function(e,t){for(var i=0,a=0,r=0,n=new Array(t.length),s=new Array(t.length),o=0;o<t.length;o++){var l=t[o].dataCount,c=t[o].totalCount-l;a=Math.max(a,l),r=Math.max(r,c),n[o]=new Array(l);for(var d=0;d<n[o].length;d++)n[o][d]=255&e.buffer[d+i];i+=l;var u=h.getErrorCorrectPolynomial(c),p=new m(n[o],u.getLength()-1).mod(u);for(s[o]=new Array(u.getLength()-1),d=0;d<s[o].length;d++){var f=d+p.getLength()-s[o].length;s[o][d]=f>=0?p.get(f):0}}var v=0;for(d=0;d<t.length;d++)v+=t[d].totalCount;var g=new Array(v),y=0;for(d=0;d<a;d++)for(o=0;o<t.length;o++)d<n[o].length&&(g[y++]=n[o][d]);for(d=0;d<r;d++)for(o=0;o<t.length;o++)d<s[o].length&&(g[y++]=s[o][d]);return g}}]),e}();c.PAD0=236,c.PAD1=17;var d={L:1,M:0,Q:3,H:2},u={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},p={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},h=function(){function e(){r()(this,e)}return s()(e,null,[{key:"getBCHTypeInfo",value:function(t){for(var i=t<<10;e.getBCHDigit(i)-e.getBCHDigit(e.G15)>=0;)i^=e.G15<<e.getBCHDigit(i)-e.getBCHDigit(e.G15);return(t<<10|i)^e.G15_MASK}},{key:"getBCHTypeNumber",value:function(t){for(var i=t<<12;e.getBCHDigit(i)-e.getBCHDigit(e.G18)>=0;)i^=e.G18<<e.getBCHDigit(i)-e.getBCHDigit(e.G18);return t<<12|i}},{key:"getBCHDigit",value:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t}},{key:"getPatternPosition",value:function(t){return e.PATTERN_POSITION_TABLE[t-1]}},{key:"getMask",value:function(e,t,i){switch(e){case p.PATTERN000:return(t+i)%2==0;case p.PATTERN001:return t%2==0;case p.PATTERN010:return i%3==0;case p.PATTERN011:return(t+i)%3==0;case p.PATTERN100:return(Math.floor(t/2)+Math.floor(i/3))%2==0;case p.PATTERN101:return t*i%2+t*i%3==0;case p.PATTERN110:return(t*i%2+t*i%3)%2==0;case p.PATTERN111:return(t*i%3+(t+i)%2)%2==0;default:throw new Error("bad maskPattern:".concat(e))}}},{key:"getErrorCorrectPolynomial",value:function(e){for(var t=new m([1],0),i=0;i<e;i++)t=t.multiply(new m([1,f.gexp(i)],0));return t}},{key:"getLengthInBits",value:function(e,t){if(1<=t&&t<10)switch(e){case u.MODE_NUMBER:return 10;case u.MODE_ALPHA_NUM:return 9;case u.MODE_8BIT_BYTE:case u.MODE_KANJI:return 8;default:throw new Error("mode:".concat(e))}else if(t<27)switch(e){case u.MODE_NUMBER:return 12;case u.MODE_ALPHA_NUM:return 11;case u.MODE_8BIT_BYTE:return 16;case u.MODE_KANJI:return 10;default:throw new Error("mode:".concat(e))}else{if(!(t<41))throw new Error("type:".concat(t));switch(e){case u.MODE_NUMBER:return 14;case u.MODE_ALPHA_NUM:return 13;case u.MODE_8BIT_BYTE:return 16;case u.MODE_KANJI:return 12;default:throw new Error("mode:".concat(e))}}}},{key:"getLostPoint",value:function(e){for(var t=e.getModuleCount(),i=0,a=0;a<t;a++)for(var r=0;r<t;r++){for(var n=0,s=e.isDark(a,r),o=-1;o<=1;o++)if(!(a+o<0||t<=a+o))for(var l=-1;l<=1;l++)r+l<0||t<=r+l||0==o&&0==l||s==e.isDark(a+o,r+l)&&n++;n>5&&(i+=3+n-5)}for(a=0;a<t-1;a++)for(r=0;r<t-1;r++){var c=0;e.isDark(a,r)&&c++,e.isDark(a+1,r)&&c++,e.isDark(a,r+1)&&c++,e.isDark(a+1,r+1)&&c++,0!=c&&4!=c||(i+=3)}for(a=0;a<t;a++)for(r=0;r<t-6;r++)e.isDark(a,r)&&!e.isDark(a,r+1)&&e.isDark(a,r+2)&&e.isDark(a,r+3)&&e.isDark(a,r+4)&&!e.isDark(a,r+5)&&e.isDark(a,r+6)&&(i+=40);for(r=0;r<t;r++)for(a=0;a<t-6;a++)e.isDark(a,r)&&!e.isDark(a+1,r)&&e.isDark(a+2,r)&&e.isDark(a+3,r)&&e.isDark(a+4,r)&&!e.isDark(a+5,r)&&e.isDark(a+6,r)&&(i+=40);var d=0;for(r=0;r<t;r++)for(a=0;a<t;a++)e.isDark(a,r)&&d++;return i+Math.abs(100*d/t/t-50)/5*10}}]),e}();h.PATTERN_POSITION_TABLE=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],h.G15=1335,h.G18=7973,h.G15_MASK=21522;var f=function(){function e(){r()(this,e)}return s()(e,null,[{key:"glog",value:function(t){if(t<1)throw new Error("glog(".concat(t,")"));return e.LOG_TABLE[t]}},{key:"gexp",value:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e.EXP_TABLE[t]}}]),e}();f.EXP_TABLE=new Array(256),f.LOG_TABLE=new Array(256),f._constructor=function(){for(var e=0;e<8;e++)f.EXP_TABLE[e]=1<<e;for(e=8;e<256;e++)f.EXP_TABLE[e]=f.EXP_TABLE[e-4]^f.EXP_TABLE[e-5]^f.EXP_TABLE[e-6]^f.EXP_TABLE[e-8];for(e=0;e<255;e++)f.LOG_TABLE[f.EXP_TABLE[e]]=e}();var m=function(){function e(t,i){if(r()(this,e),null==t.length)throw new Error("".concat(t.length,"/").concat(i));for(var a=0;a<t.length&&0==t[a];)a++;this.num=new Array(t.length-a+i);for(var n=0;n<t.length-a;n++)this.num[n]=t[n+a]}return s()(e,[{key:"get",value:function(e){return this.num[e]}},{key:"getLength",value:function(){return this.num.length}},{key:"multiply",value:function(t){for(var i=new Array(this.getLength()+t.getLength()-1),a=0;a<this.getLength();a++)for(var r=0;r<t.getLength();r++)i[a+r]^=f.gexp(f.glog(this.get(a))+f.glog(t.get(r)));return new e(i,0)}},{key:"mod",value:function(t){if(this.getLength()-t.getLength()<0)return this;for(var i=f.glog(this.get(0))-f.glog(t.get(0)),a=new Array(this.getLength()),r=0;r<this.getLength();r++)a[r]=this.get(r);for(r=0;r<t.getLength();r++)a[r]^=f.gexp(f.glog(t.get(r))+i);return new e(a,0).mod(t)}}]),e}(),v=function(){function e(t,i){r()(this,e),this.totalCount=t,this.dataCount=i}return s()(e,null,[{key:"getRSBlocks",value:function(t,i){var a=e.getRsBlockTable(t,i);if(null==a)throw new Error("bad rs block @ typeNumber:".concat(t,"/errorCorrectLevel:").concat(i));for(var r=a.length/3,n=[],s=0;s<r;s++)for(var o=a[3*s+0],l=a[3*s+1],c=a[3*s+2],d=0;d<o;d++)n.push(new e(l,c));return n}},{key:"getRsBlockTable",value:function(t,i){switch(i){case d.L:return e.RS_BLOCK_TABLE[4*(t-1)+0];case d.M:return e.RS_BLOCK_TABLE[4*(t-1)+1];case d.Q:return e.RS_BLOCK_TABLE[4*(t-1)+2];case d.H:return e.RS_BLOCK_TABLE[4*(t-1)+3];default:return}}}]),e}();v.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];var g=function(){function e(){r()(this,e),this.buffer=[],this.length=0}return s()(e,[{key:"get",value:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)}},{key:"put",value:function(e,t){for(var i=0;i<t;i++)this.putBit(1==(e>>>t-i-1&1))}},{key:"getLengthInBits",value:function(){return this.length}},{key:"putBit",value:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}]),e}(),y=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]]},function(e,t,i){"use strict";(function(e){i.d(t,"b",(function(){return l})),i.d(t,"a",(function(){return c}));var a=i(2),r=i.n(a);function n(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function s(e,t){for(var i,a="",r=0,n=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)i=e.charCodeAt(o);else{if(47===i)break;i=47}if(47===i){if(n===o-1||1===s);else if(n!==o-1&&2===s){if(a.length<2||2!==r||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2))if(a.length>2){var l=a.lastIndexOf("/");if(l!==a.length-1){-1===l?(a="",r=0):r=(a=a.slice(0,l)).length-1-a.lastIndexOf("/"),n=o,s=0;continue}}else if(2===a.length||1===a.length){a="",r=0,n=o,s=0;continue}t&&(a.length>0?a+="/..":a="..",r=2)}else a.length>0?a+="/"+e.slice(n+1,o):a=e.slice(n+1,o),r=o-n-1;n=o,s=0}else 46===i&&-1!==s?++s:s=-1}return a}var o={resolve:function(){for(var t,i="",a=!1,r=arguments.length-1;r>=-1&&!a;r--){var o;r>=0?o=arguments[r]:(void 0===t&&(t=e.cwd()),o=t),n(o),0!==o.length&&(i=o+"/"+i,a=47===o.charCodeAt(0))}return i=s(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(n(e),0===e.length)return".";var t=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=s(e,!t)).length||t||(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return n(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];n(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":o.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t)return"";if((e=o.resolve(e))===(t=o.resolve(t)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,r=a-i,s=1;s<t.length&&47===t.charCodeAt(s);++s);for(var l=t.length-s,c=r<l?r:l,d=-1,u=0;u<=c;++u){if(u===c){if(l>c){if(47===t.charCodeAt(s+u))return t.slice(s+u+1);if(0===u)return t.slice(s+u)}else r>c&&(47===e.charCodeAt(i+u)?d=u:0===u&&(d=0));break}var p=e.charCodeAt(i+u);if(p!==t.charCodeAt(s+u))break;47===p&&(d=u)}var h="";for(u=i+d+1;u<=a;++u)u!==a&&47!==e.charCodeAt(u)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(s+d):(s+=d,47===t.charCodeAt(s)&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,a=-1,r=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!r){a=s;break}}else r=!1;return-1===a?i?"/":".":i&&1===a?"//":e.slice(0,a)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');n(e);var i,a=0,r=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(47===c){if(!s){a=i+1;break}}else-1===l&&(s=!1,l=i+1),o>=0&&(c===t.charCodeAt(o)?-1==--o&&(r=i):(o=-1,r=l))}return a===r?r=l:-1===r&&(r=e.length),e.slice(a,r)}for(i=e.length-1;i>=0;--i)if(47===e.charCodeAt(i)){if(!s){a=i+1;break}}else-1===r&&(s=!1,r=i+1);return-1===r?"":e.slice(a,r)},extname:function(e){n(e);for(var t=-1,i=0,a=-1,r=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===a&&(r=!1,a=o+1),46===l?-1===t?t=o:1!==s&&(s=1):-1!==t&&(s=-1);else if(!r){i=o+1;break}}return-1===t||-1===a||0===s||1===s&&t===a-1&&t===i+1?"":e.slice(t,a)},format:function(e){if(null===e||"object"!==r()(e))throw new TypeError('The "pathObject" argument must be of type Object. Received type '+r()(e));return function(e,t){var i=t.dir||t.root,a=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+a:i+e+a:a}("/",e)},parse:function(e){n(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var i,a=e.charCodeAt(0),r=47===a;r?(t.root="/",i=1):i=0;for(var s=-1,o=0,l=-1,c=!0,d=e.length-1,u=0;d>=i;--d)if(47!==(a=e.charCodeAt(d)))-1===l&&(c=!1,l=d+1),46===a?-1===s?s=d:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){o=d+1;break}return-1===s||-1===l||0===u||1===u&&s===l-1&&s===o+1?-1!==l&&(t.base=t.name=0===o&&r?e.slice(1,l):e.slice(o,l)):(0===o&&r?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(o,s),t.base=e.slice(o,l)),t.ext=e.slice(s,l)),o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o;var l=o.extname,c=o.basename}).call(this,i(19))},function(e,t){function i(e,t,i,a,r,n,s){try{var o=e[n](s),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(a,r)}e.exports=function(e){return function(){var t=this,a=arguments;return new Promise((function(r,n){var s=e.apply(t,a);function o(e){i(s,r,n,o,l,"next",e)}function l(e){i(s,r,n,o,l,"throw",e)}o(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"b",(function(){return b})),i.d(t,"a",(function(){return _}));const a=(e,t,i={},r=i)=>{if(Array.isArray(t))t.forEach(t=>a(e,t,i,r));else if("function"==typeof t)t(e,i,r,a);else{const n=Object.keys(t)[0];Array.isArray(t[n])?(r[n]={},a(e,t[n],i,r[n])):r[n]=t[n](e,i,r,a)}return i},r=(e,t)=>(i,a,r,n)=>{t(i,a,r)&&n(i,e,a,r)},n=(e=0)=>t=>t.data[t.pos+e],s=e=>t=>t.data.subarray(t.pos,t.pos+=e),o=e=>t=>t.data.subarray(t.pos,t.pos+e),l=e=>t=>Array.from(s(e)(t)).map(e=>String.fromCharCode(e)).join(""),c=e=>t=>{const i=s(2)(t);return e?(i[1]<<8)+i[0]:(i[0]<<8)+i[1]},d=(e,t)=>(i,a,r)=>{const n="function"==typeof t?t(i,a,r):t,o=s(e),l=new Array(n);for(var c=0;c<n;c++)l[c]=o(i);return l},u=e=>t=>{const i=(e=>e.data[e.pos++])(t),a=new Array(8);for(var r=0;r<8;r++)a[7-r]=!!(i&1<<r);return Object.keys(e).reduce((t,i)=>{const r=e[i];return r.length?t[i]=((e,t,i)=>{for(var a=0,r=0;r<i;r++)a+=e[t+r]&&2**(i-r-1);return a})(a,r.index,r.length):t[i]=a[r.index],t},{})};var p={blocks:e=>{const t=[],i=e.data.length;for(var a=0,r=(e=>e.data[e.pos++])(e);0!==r&&r;r=(e=>e.data[e.pos++])(e)){if(e.pos+r>=i){const r=i-e.pos;t.push(s(r)(e)),a+=r;break}t.push(s(r)(e)),a+=r}const n=new Uint8Array(a);for(var o=0,l=0;l<t.length;l++)n.set(t[l],o),o+=t[l].length;return n}};const h=r({gce:[{codes:s(2)},{byteSize:e=>e.data[e.pos++]},{extras:u({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:c(!0)},{transparentColorIndex:e=>e.data[e.pos++]},{terminator:e=>e.data[e.pos++]}]},e=>{var t=o(2)(e);return 33===t[0]&&249===t[1]}),f=r({image:[{code:e=>e.data[e.pos++]},{descriptor:[{left:c(!0)},{top:c(!0)},{width:c(!0)},{height:c(!0)},{lct:u({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},r({lct:d(3,(e,t,i)=>Math.pow(2,i.descriptor.lct.size+1))},(e,t,i)=>i.descriptor.lct.exists),{data:[{minCodeSize:e=>e.data[e.pos++]},p]}]},e=>44===n()(e)),m=r({text:[{codes:s(2)},{blockSize:e=>e.data[e.pos++]},{preData:(e,t,i)=>s(i.text.blockSize)(e)},p]},e=>{var t=o(2)(e);return 33===t[0]&&1===t[1]}),v=r({application:[{codes:s(2)},{blockSize:e=>e.data[e.pos++]},{id:(e,t,i)=>l(i.blockSize)(e)},p]},e=>{var t=o(2)(e);return 33===t[0]&&255===t[1]}),g=r({comment:[{codes:s(2)},p]},e=>{var t=o(2)(e);return 33===t[0]&&254===t[1]});var y=[{header:[{signature:l(3)},{version:l(3)}]},{lsd:[{width:c(!0)},{height:c(!0)},{gct:u({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:e=>e.data[e.pos++]},{pixelAspectRatio:e=>e.data[e.pos++]}]},r({gct:d(3,(e,t)=>Math.pow(2,t.lsd.gct.size+1))},(e,t)=>t.lsd.gct.exists),{frames:((e,t)=>(i,a,r,n)=>{const s=[];let o=i.pos;for(;t(i,a,r);){const t={};if(n(i,e,a,t),i.pos===o)break;o=i.pos,s.push(t)}return s})([h,v,g,f,m],e=>{var t=n()(e);return 33===t||44===t})}],b=function(e){var t=new Uint8Array(e);return a({data:t,pos:0},y)},w=function(e,t,i){if(e.image){var a=e.image,r=a.descriptor.width*a.descriptor.height,n=function(e,t,i){var a,r,n,s,o,l,c,d,u,p,h,f,m,v,g,y,b=i,w=new Array(i),_=new Array(4096),x=new Array(4096),k=new Array(4097);for(o=1+(r=1<<(p=e)),a=r+2,c=-1,n=(1<<(s=p+1))-1,d=0;d<r;d++)_[d]=0,x[d]=d;for(h=f=m=v=g=y=0,u=0;u<b;){if(0===v){if(f<s){h+=t[y]<<f,f+=8,y++;continue}if(d=h&n,h>>=s,f-=s,d>a||d==o)break;if(d==r){n=(1<<(s=p+1))-1,a=r+2,c=-1;continue}if(-1==c){k[v++]=x[d],c=d,m=d;continue}for(l=d,d==a&&(k[v++]=m,d=c);d>r;)k[v++]=x[d],d=_[d];m=255&x[d],k[v++]=m,a<4096&&(_[a]=c,x[a]=m,0==(++a&n)&&a<4096&&(s++,n+=a)),c=l}v--,w[g++]=k[v],u++}for(u=g;u<b;u++)w[u]=0;return w}(a.data.minCodeSize,a.data.blocks,r);a.descriptor.lct.interlaced&&(n=function(e,t){for(var i=new Array(e.length),a=e.length/t,r=function(a,r){var n=e.slice(r*t,(r+1)*t);i.splice.apply(i,[a*t,t].concat(n))},n=[0,4,2,1],s=[8,8,4,2],o=0,l=0;l<4;l++)for(var c=n[l];c<a;c+=s[l])r(c,o),o++;return i}(n,a.descriptor.width));var s={pixels:n,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return a.descriptor.lct&&a.descriptor.lct.exists?s.colorTable=a.lct:s.colorTable=t,e.gce&&(s.delay=10*(e.gce.delay||10),s.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(s.transparentIndex=e.gce.transparentColorIndex)),i&&(s.patch=function(e){for(var t=e.pixels.length,i=new Uint8ClampedArray(4*t),a=0;a<t;a++){var r=4*a,n=e.pixels[a],s=e.colorTable[n];i[r]=s[0],i[r+1]=s[1],i[r+2]=s[2],i[r+3]=n!==e.transparentIndex?255:0}return i}(s)),s}console.warn("gif frame does not have associated image.")},_=function(e,t){return e.frames.filter((function(e){return e.image})).map((function(i){return w(i,e.gct,t)}))}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return y}));var a=i(2),r=i.n(a),n=i(0),s=i.n(n),o=i(1),l=i.n(o),c=i(3),d=i.n(c),u=i(10),p=i(7),h=i(4),f=i(12),m=function(e,t,i,a){return new(i||(i=Promise))((function(r,n){function s(e){try{l(a.next(e))}catch(e){n(e)}}function o(e){try{l(a.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,o)}l((a=a.apply(e,t||[])).next())}))},v=u.a.Canvas;function g(e){if(e)return new Promise((function(i,a){if("data"==e.slice(0,4)){var r=new Image;return r.onload=function(){i(r),t(r)},r.onerror=function(){a("Image load error"),t(r)},void(r.src=e)}var n=new Image;n.setAttribute("crossOrigin","Anonymous"),n.onload=function(){i(n)},n.onerror=function(){a("Image load error")},n.src=e}));function t(e){e.onload=null,e.onerror=null}}var y=function(){function t(e){s()(this,t);var i=Object.assign({},e);if(Object.keys(t.defaultOptions).forEach((function(e){e in i||Object.defineProperty(i,e,{value:t.defaultOptions[e],enumerable:!0,writable:!0})})),i.components?"object"===r()(i.components)&&Object.keys(t.defaultComponentOptions).forEach((function(e){e in i.components?Object.defineProperty(i.components,e,{value:Object.assign(Object.assign({},t.defaultComponentOptions[e]),i.components[e]),enumerable:!0,writable:!0}):Object.defineProperty(i.components,e,{value:t.defaultComponentOptions[e],enumerable:!0,writable:!0})})):i.components=t.defaultComponentOptions,null!==i.dotScale&&void 0!==i.dotScale){if(i.dotScale<=0||i.dotScale>1)throw new Error("dotScale should be in range (0, 1].");i.components.data.scale=i.dotScale,i.components.timing.scale=i.dotScale,i.components.alignment.scale=i.dotScale}this.options=i,this.canvas=new v(e.size,e.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new h.a(-1,this.options.correctLevel),Number.isInteger(this.options.maskPattern)&&(this.qrCode.maskPattern=this.options.maskPattern),Number.isInteger(this.options.version)&&(this.qrCode.typeNumber=this.options.version),this.qrCode.addData(this.options.text),this.qrCode.make()}return l()(t,[{key:"draw",value:function(){var e=this;return new Promise((function(t){return e._draw().then(t)}))}},{key:"_clear",value:function(){this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}},{key:"_draw",value:function(){var i,a,r,n,s,o,l,c,u,y,w,_,x,k,$,I,S,j,C;return m(this,void 0,void 0,d.a.mark((function m(){var L,P,N,T,O,D,M,E,F,A,R,q,V,B,z,U,Q,H,G,W,Y,J,K,Z,X,ee,te,ie,ae,re,ne,se,oe,le,ce,de,ue,pe,he,fe,me,ve,ge,ye,be,we,_e,xe,ke,$e,Ie,Se,je,Ce,Le,Pe,Ne,Te,Oe,De,Me,Ee,Fe,Ae,Re,qe,Ve,Be,ze,Ue,Qe,He;return d.a.wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(L=null===(i=this.qrCode)||void 0===i?void 0:i.moduleCount,P=this.options.size,((N=this.options.margin)<0||2*N>=P)&&(N=0),T=Math.ceil(N),O=P-2*N,D=this.options.whiteMargin,M=this.options.backgroundDimming,E=Math.ceil(O/L),R=new v(A=(F=E*L)+2*T,A),q=R.getContext("2d"),this._clear(),q.save(),q.translate(T,T),V=new v(A,A),B=V.getContext("2d"),z=null,U=[],!this.options.gifBackground){d.next=47;break}if(Q=Object(p.b)(this.options.gifBackground),z=Q,U=Object(p.a)(Q,!0),!this.options.autoColor){d.next=45;break}H=0,G=0,W=0,Y=0,J=0;case 28:if(!(J<U[0].colorTable.length)){d.next=41;break}if(!((K=U[0].colorTable[J])[0]>200||K[1]>200||K[2]>200)){d.next=32;break}return d.abrupt("continue",38);case 32:if(0!==K[0]||0!==K[1]||0!==K[2]){d.next=34;break}return d.abrupt("continue",38);case 34:Y++,H+=K[0],G+=K[1],W+=K[2];case 38:J++,d.next=28;break;case 41:H=~~(H/Y),G=~~(G/Y),W=~~(W/Y),this.options.colorDark="rgb(".concat(H,",").concat(G,",").concat(W,")");case 45:d.next=61;break;case 47:if(!this.options.backgroundImage){d.next=58;break}return d.next=50,g(this.options.backgroundImage);case 50:Z=d.sent,this.options.autoColor&&(X=t._getAverageRGB(Z),this.options.colorDark="rgb(".concat(X.r,",").concat(X.g,",").concat(X.b,")")),B.drawImage(Z,0,0,Z.width,Z.height,0,0,A,A),B.rect(0,0,A,A),B.fillStyle=M,B.fill(),d.next=61;break;case 58:B.rect(0,0,A,A),B.fillStyle=this.options.colorLight,B.fill();case 61:for(ee=h.c.getPatternPosition(this.qrCode.typeNumber),te=(null===(r=null===(a=this.options.components)||void 0===a?void 0:a.data)||void 0===r?void 0:r.scale)||.4,ie=.5*(1-te),ae=0;ae<L;ae++)for(re=0;re<L;re++){for(ne=this.qrCode.isDark(ae,re),se=6==ae&&re>=8&&re<=L-8||6==re&&ae>=8&&ae<=L-8,oe=re<8&&(ae<8||ae>=L-8)||re>=L-8&&ae<8||se,le=1;le<ee.length-1;le++)oe=oe||ae>=ee[le]-2&&ae<=ee[le]+2&&re>=ee[le]-2&&re<=ee[le]+2;ce=re*E+(oe?0:ie*E),de=ae*E+(oe?0:ie*E),q.strokeStyle=ne?this.options.colorDark:this.options.colorLight,q.lineWidth=.5,q.fillStyle=ne?this.options.colorDark:this.options.colorLight,0===ee.length?oe||q.fillRect(ce,de,(oe?1:te)*E,(oe?1:te)*E):(ue=re<L-4&&re>=L-4-5&&ae<L-4&&ae>=L-4-5,oe||ue||q.fillRect(ce,de,(oe?1:te)*E,(oe?1:te)*E))}if(pe=ee[ee.length-1],he=this.options.colorLight,q.fillStyle=he,q.fillRect(0,0,8*E,8*E),q.fillRect(0,(L-8)*E,8*E,8*E),q.fillRect((L-8)*E,0,8*E,8*E),(null===(s=null===(n=this.options.components)||void 0===n?void 0:n.timing)||void 0===s?void 0:s.protectors)&&(q.fillRect(8*E,6*E,(L-8-8)*E,E),q.fillRect(6*E,8*E,E,(L-8-8)*E)),(null===(l=null===(o=this.options.components)||void 0===o?void 0:o.cornerAlignment)||void 0===l?void 0:l.protectors)&&t._drawAlignProtector(q,pe,pe,E),!(null===(u=null===(c=this.options.components)||void 0===c?void 0:c.alignment)||void 0===u?void 0:u.protectors)){d.next=99;break}fe=0;case 75:if(!(fe<ee.length)){d.next=99;break}me=0;case 77:if(!(me<ee.length)){d.next=96;break}if(ve=ee[me],ge=ee[fe],6!==ve||6!==ge&&ge!==pe){d.next=84;break}return d.abrupt("continue",93);case 84:if(6!==ge||6!==ve&&ve!==pe){d.next=88;break}return d.abrupt("continue",93);case 88:if(ve!==pe||ge!==pe){d.next=92;break}return d.abrupt("continue",93);case 92:t._drawAlignProtector(q,ve,ge,E);case 93:me++,d.next=77;break;case 96:fe++,d.next=75;break;case 99:for(q.fillStyle=this.options.colorDark,q.fillRect(0,0,7*E,E),q.fillRect((L-7)*E,0,7*E,E),q.fillRect(0,6*E,7*E,E),q.fillRect((L-7)*E,6*E,7*E,E),q.fillRect(0,(L-7)*E,7*E,E),q.fillRect(0,(L-7+6)*E,7*E,E),q.fillRect(0,0,E,7*E),q.fillRect(6*E,0,E,7*E),q.fillRect((L-7)*E,0,E,7*E),q.fillRect((L-7+6)*E,0,E,7*E),q.fillRect(0,(L-7)*E,E,7*E),q.fillRect(6*E,(L-7)*E,E,7*E),q.fillRect(2*E,2*E,3*E,3*E),q.fillRect((L-7+2)*E,2*E,3*E,3*E),q.fillRect(2*E,(L-7+2)*E,3*E,3*E),ye=(null===(w=null===(y=this.options.components)||void 0===y?void 0:y.timing)||void 0===w?void 0:w.scale)||.4,be=.5*(1-ye),we=0;we<L-8;we+=2)t._drawDot(q,8+we,6,E,be,ye),t._drawDot(q,6,8+we,E,be,ye);_e=(null===(x=null===(_=this.options.components)||void 0===_?void 0:_.cornerAlignment)||void 0===x?void 0:x.scale)||.4,xe=.5*(1-_e),t._drawAlign(q,pe,pe,E,xe,_e,this.options.colorDark,(null===($=null===(k=this.options.components)||void 0===k?void 0:k.cornerAlignment)||void 0===$?void 0:$.protectors)||!1),ke=(null===(S=null===(I=this.options.components)||void 0===I?void 0:I.alignment)||void 0===S?void 0:S.scale)||.4,$e=.5*(1-ke),Ie=0;case 124:if(!(Ie<ee.length)){d.next=148;break}Se=0;case 126:if(!(Se<ee.length)){d.next=145;break}if(je=ee[Se],Ce=ee[Ie],6!==je||6!==Ce&&Ce!==pe){d.next=133;break}return d.abrupt("continue",142);case 133:if(6!==Ce||6!==je&&je!==pe){d.next=137;break}return d.abrupt("continue",142);case 137:if(je!==pe||Ce!==pe){d.next=141;break}return d.abrupt("continue",142);case 141:t._drawAlign(q,je,Ce,E,$e,ke,this.options.colorDark,(null===(C=null===(j=this.options.components)||void 0===j?void 0:j.alignment)||void 0===C?void 0:C.protectors)||!1);case 142:Se++,d.next=126;break;case 145:Ie++,d.next=124;break;case 148:if(D&&(q.fillStyle=this.options.backgroundColor,q.fillRect(-T,-T,A,T),q.fillRect(-T,F,A,T),q.fillRect(F,-T,T,A),q.fillRect(-T,-T,T,A)),!this.options.logoImage){d.next=179;break}return d.next=152,g(this.options.logoImage);case 152:Le=d.sent,Pe=this.options.logoScale,Ne=this.options.logoMargin,Te=this.options.logoCornerRadius,(Pe<=0||Pe>=1)&&(Pe=.2),Ne<0&&(Ne=0),Te<0&&(Te=0),Me=De=.5*(A-(Oe=F*Pe)),q.restore(),q.fillStyle=this.options.logoBackgroundColor,q.save(),t._prepareRoundedCornerClip(q,De-Ne,Me-Ne,Oe+2*Ne,Oe+2*Ne,Te+Ne),q.clip(),Ee=q.globalCompositeOperation,q.globalCompositeOperation="destination-out",q.fill(),q.globalCompositeOperation=Ee,q.restore(),q.save(),t._prepareRoundedCornerClip(q,De,Me,Oe,Oe,Te),q.clip(),q.drawImage(Le,De,Me,Oe,Oe),q.restore(),q.save(),q.translate(T,T);case 179:if(!z){d.next=191;break}if(U.forEach((function(e){Fe||((Fe=new f.a(P,P)).setDelay(e.delay),Fe.setRepeat(0));var t=e.dims,i=t.width,a=t.height;Ae||(Ae=new v(i,a),(Re=Ae.getContext("2d")).rect(0,0,Ae.width,Ae.height),Re.fillStyle="#ffffff",Re.fill()),qe&&Be&&i===qe.width&&a===qe.height||(qe=new v(i,a),Ve=qe.getContext("2d"),Be=Ve.createImageData(i,a)),Be.data.set(e.patch),Ve.putImageData(Be,0,0),Re.drawImage(qe.getContext("2d").canvas,e.dims.left,e.dims.top);var r=new v(A,A),n=r.getContext("2d");n.drawImage(Ae.getContext("2d").canvas,0,0,A,A),n.rect(0,0,A,A),n.fillStyle=M,n.fill(),n.drawImage(R.getContext("2d").canvas,0,0,A,A);var s=new v(P,P),o=s.getContext("2d");o.drawImage(r.getContext("2d").canvas,0,0,P,P),Fe.addFrame(o.getImageData(0,0,s.width,s.height).data)})),Fe){d.next=183;break}throw new Error("No frames.");case 183:if(Fe.finish(),!b(this.canvas)){d.next=188;break}return ze=Fe.stream().toFlattenUint8Array(),Ue=ze.reduce((function(e,t){return e+String.fromCharCode(t)}),""),d.abrupt("return",Promise.resolve("data:image/gif;base64,".concat(window.btoa(Ue))));case 188:return d.abrupt("return",Promise.resolve(e.from(Fe.stream().toFlattenUint8Array())));case 191:if(B.drawImage(R.getContext("2d").canvas,0,0,A,A),q.drawImage(V.getContext("2d").canvas,-T,-T,A,A),Qe=new v(P,P),Qe.getContext("2d").drawImage(R.getContext("2d").canvas,0,0,P,P),this.canvas=Qe,He=this.options.gifBackground?"gif":"png",!b(this.canvas)){d.next=200;break}return d.abrupt("return",Promise.resolve(this.canvas.toDataURL(He)));case 200:return d.abrupt("return",Promise.resolve(this.canvas.toBuffer(He)));case 201:case"end":return d.stop()}}),m,this)})))}}],[{key:"_prepareRoundedCornerClip",value:function(e,t,i,a,r,n){e.beginPath(),e.moveTo(t,i),e.arcTo(t+a,i,t+a,i+r,n),e.arcTo(t+a,i+r,t,i+r,n),e.arcTo(t,i+r,t,i,n),e.arcTo(t,i,t+a,i,n),e.closePath()}},{key:"_getAverageRGB",value:function(e){var t,i,a={r:0,g:0,b:0},r=-4,n={r:0,g:0,b:0},s=0;i=e.naturalHeight||e.height,t=e.naturalWidth||e.width;var o,l=new v(t,i).getContext("2d");if(!l)return a;l.drawImage(e,0,0);try{o=l.getImageData(0,0,t,i)}catch(e){return a}for(;(r+=20)<o.data.length;)o.data[r]>200||o.data[r+1]>200||o.data[r+2]>200||(++s,n.r+=o.data[r],n.g+=o.data[r+1],n.b+=o.data[r+2]);return n.r=~~(n.r/s),n.g=~~(n.g/s),n.b=~~(n.b/s),n}},{key:"_drawDot",value:function(e,t,i,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;e.fillRect((t+r)*a,(i+r)*a,n*a,n*a)}},{key:"_drawAlignProtector",value:function(e,t,i,a){e.clearRect((t-2)*a,(i-2)*a,5*a,5*a),e.fillRect((t-2)*a,(i-2)*a,5*a,5*a)}},{key:"_drawAlign",value:function(e,i,a,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=e.fillStyle;e.fillStyle=o,new Array(4).fill(0).map((function(o,l){t._drawDot(e,i-2+l,a-2,r,n,s),t._drawDot(e,i+2,a-2+l,r,n,s),t._drawDot(e,i+2-l,a+2,r,n,s),t._drawDot(e,i-2,a+2-l,r,n,s)})),t._drawDot(e,i,a,r,n,s),l||(e.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map((function(o,l){t._drawDot(e,i-1+l,a-1,r,n,s),t._drawDot(e,i+1,a-1+l,r,n,s),t._drawDot(e,i+1-l,a+1,r,n,s),t._drawDot(e,i-1,a+1-l,r,n,s)}))),e.fillStyle=c}}]),t}();function b(e){try{return e instanceof HTMLElement}catch(t){return"object"===r()(e)&&1===e.nodeType&&"object"===r()(e.style)&&"object"===r()(e.ownerDocument)}}y.CorrectLevel=h.b,y.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},y.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:h.b.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:y.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"}}).call(this,i(15).Buffer)},function(e,t,i){"use strict";var a=i(11);const{asBuffer:r,asDownload:n,asZipDownload:s,atScale:o,options:l}=a.a,c=Symbol.for("toDataURL"),{CanvasRenderingContext2D:d,CanvasGradient:u,CanvasPattern:p,Image:h,ImageData:f,Path2D:m,DOMMatrix:v,DOMRect:g,DOMPoint:y}=window,b={Canvas:class{constructor(e,t){let i=document.createElement("canvas"),a=[];for(var[d,u]of(Object.defineProperty(i,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>r(i,"image/png"),jpg:()=>r(i,"image/jpeg"),pages:()=>a.concat(i).map(e=>e.getContext("2d"))})))Object.defineProperty(i,d,{get:u});return Object.assign(i,{width:e,height:t,newPage(...e){var{width:t,height:r}=i,n=Object.assign(document.createElement("canvas"),{width:t,height:r});n.getContext("2d").drawImage(i,0,0),a.push(n);var[t,r]=e.length?e:[t,r];return Object.assign(i,{width:t,height:r}).getContext("2d")},saveAs(e,t){t="number"==typeof t?{quality:t}:t;let i=l(this.pages,{filename:e,...t}),{pattern:a,padding:r,mime:c,quality:d,matte:u,density:p,archive:h}=i,f=o(i.pages,p);return null==r?n(f[0],c,d,u,e):s(f,c,d,u,h,a,r)},toBuffer(e="png",t={}){t="number"==typeof t?{quality:t}:t;let i=l(this.pages,{extension:e,...t}),{mime:a,quality:n,matte:s,pages:c,density:d}=i,u=o(c,d,s)[0];return r(u,a,n,s)},[c]:i.toDataURL.bind(i),toDataURL(e="png",t={}){t="number"==typeof t?{quality:t}:t;let a=l(this.pages,{extension:e,...t}),{mime:r,quality:n,matte:s,pages:d,density:u}=a,p=o(d,u,s)[0],h=p[p===i?c:"toDataURL"](r,n);return Promise.resolve(h)}})}},loadImage:e=>new Promise((t,i)=>Object.assign(new h,{crossOrigin:"Anonymous",onload:t,onerror:i,src:e})),CanvasRenderingContext2D:d,CanvasGradient:u,CanvasPattern:p,Image:h,ImageData:f,Path2D:m,DOMMatrix:v,DOMRect:g,DOMPoint:y};t.a=b},function(e,t,i){"use strict";(function(e){var a=i(5);class r{constructor(){let t=void 0===e,i="image/png",a="image/jpeg",r="application/pdf",n="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:t?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:t?{png:i,jpg:a,jpeg:"image/jpeg",webp:"image/webp"}:{png:i,jpg:a,jpeg:"image/jpeg",pdf:r,svg:n},mimes:t?{[i]:"png",[a]:"jpg","image/webp":"webp"}:{[i]:"png",[a]:"jpg",[r]:"pdf",[n]:"svg"}})}toMime(e){return this.formats[(e||"").replace(/^\./,"").toLowerCase()]}fromMime(e){return this.mimes[e]}}class n{static for(e){return(new n).append(e).get()}constructor(){this.crc=-1}get(){return~this.crc}append(e){for(var t=0|this.crc,i=this.table,a=0,r=0|e.length;a<r;a++)t=t>>>8^i[255&(t^e[a])];return this.crc=t,this}}function s(e){let t=new Uint8Array(e),i=new DataView(t.buffer),a={array:t,view:i,size:e,set8:(e,t)=>(i.setUint8(e,t),a),set16:(e,t)=>(i.setUint16(e,t,!0),a),set32:(e,t)=>(i.setUint32(e,t,!0),a),bytes:(e,i)=>(t.set(i,e),a)};return a}n.prototype.table=(()=>{var e,t,i,a=[];for(e=0;e<256;e++){for(i=e,t=0;t<8;t++)i=1&i?i>>>1^3988292384:i>>>1;a[e]=i}return a})();class o{constructor(e){let t=new Date;Object.assign(this,{directory:e,offset:0,files:[],time:(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,date:(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate()}),this.add(e)}async add(e,t){let i=!t,a=o.encoder.encode(`${this.directory}/${i?"":e}`),r=new Uint8Array(i?0:await t.arrayBuffer()),l=30+a.length,c=l+r.length,{offset:d}=this,u=s(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,n.for(r)).set32(14,r.length).set32(18,r.length).set16(22,a.length);d+=l;let p=s(l+r.length+16).set32(0,67324752).bytes(4,u.array).bytes(30,a).bytes(l,r);d+=r.length,p.set32(c,134695760).bytes(c+4,u.array.slice(10,22)),d+=16,this.files.push({offset:d,folder:i,name:a,header:u,payload:p}),this.offset=d}toBuffer(){let e=this.files.reduce((e,{name:t})=>46+t.length+e,0),t=s(e+22),i=0;for(var{offset:a,name:r,header:n,folder:o}of this.files)t.set32(i,33639248).set16(i+4,20).bytes(i+6,n.array).set8(i+38,o?16:0).set32(i+42,a).bytes(i+46,r),i+=46+r.length;t.set32(i,101010256).set16(i+8,this.files.length).set16(i+10,this.files.length).set32(i+12,e).set32(i+16,this.offset);let l=new Uint8Array(this.offset+t.size),c=0;for(var{payload:d}of this.files)l.set(d.array,c),c+=d.size;return l.set(t.array,c),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}o.encoder=new TextEncoder;const l=(e,t,i,a)=>{if(a){let{width:t,height:i}=e,r=Object.assign(document.createElement("canvas"),{width:t,height:i}),n=r.getContext("2d");n.fillStyle=a,n.fillRect(0,0,t,i),n.drawImage(e,0,0),e=r}return new Promise((a,r)=>e.toBlob(a,t,i))},c=(e,t)=>{const i=window.URL.createObjectURL(t),a=document.createElement("a");a.style.display="none",a.href=i,a.setAttribute("download",e),void 0===a.download&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>window.URL.revokeObjectURL(i),100)},d={asBuffer:(...e)=>l(...e).then(e=>e.arrayBuffer()),asDownload:async(e,t,i,a,r)=>{c(r,await l(e,t,i,a))},asZipDownload:async(e,t,i,r,n,s,d)=>{let u=Object(a.a)(n,".zip")||"archive",p=new o(u);await Promise.all(e.map(async(e,a)=>{let n=(e=>s.replace("{}",String(e+1).padStart(d,"0")))(a);await p.add(n,await l(e,t,i,r))})),c(u+".zip",p.blob)},atScale:(e,t,i)=>e.map(e=>{if(1==t&&!i)return e.canvas;let a=document.createElement("canvas"),r=a.getContext("2d"),n=e.canvas?e.canvas:e;return a.width=n.width*t,a.height=n.height*t,i&&(r.fillStyle=i,r.fillRect(0,0,a.width,a.height)),r.scale(t,t),r.drawImage(n,0,0),a}),options:function(e,{filename:t="",extension:i="",format:n,page:s,quality:o,matte:l,density:c,outline:d,archive:u}={}){var{fromMime:p,toMime:h,expected:f}=new r,m=(u=u||"canvas",n||i.replace(/@\d+x$/i,"")||Object(a.b)(t)),v=(n=p(h(m)||m),h(n)),g=e.length;if(!m)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!n)throw new Error(`Unsupported file format "${m}" (expected ${f})`);if(!g)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let y,b,w=t.replace(/{(\d*)}/g,(e,t)=>(b=!0,t=parseInt(t,10),y=isFinite(t)?t:isFinite(y)?y:-1,"{}")),_=s>0?s-1:s<0?g+s:void 0;if(isFinite(_)&&_<0||_>=g)throw new RangeError(1==g?`Canvas only has a page 1 (${_} is out of bounds)`:`Canvas has pages 1${g} (${_} is out of bounds)`);if(e=isFinite(_)?[e[_]]:b||"pdf"==n?e:e.slice(-1),void 0===o)o=.92;else if("number"!=typeof o||!isFinite(o)||o<0||o>1)throw new TypeError("The quality option must be an number in the 0.01.0 range");if(void 0===c){let e=(i||Object(a.a)(t,m)).match(/@(\d+)x$/i);c=e?parseInt(e[1],10):1}else if("number"!=typeof c||!Number.isInteger(c)||c<1)throw new TypeError("The density option must be a non-negative integer");return void 0===d?d=!0:"svg"==n&&(d=!!d),{filename:t,pattern:w,format:n,mime:v,pages:e,padding:y,quality:o,matte:l,density:c,outline:d,archive:u}}};t.a=d}).call(this,i(8))},function(e,t,i){"use strict";var a=function(e,t){var i,a,r,n,s;function o(e,t,a,r,n){i[t][0]-=e*(i[t][0]-a)/1024,i[t][1]-=e*(i[t][1]-r)/1024,i[t][2]-=e*(i[t][2]-n)/1024}function l(e,t,a,r,n){for(var o,l,c=Math.abs(t-e),d=Math.min(t+e,256),u=t+1,p=t-1,h=1;u<d||p>c;)l=s[h++],u<d&&((o=i[u++])[0]-=l*(o[0]-a)/(1<<18),o[1]-=l*(o[1]-r)/(1<<18),o[2]-=l*(o[2]-n)/(1<<18)),p>c&&((o=i[p--])[0]-=l*(o[0]-a)/(1<<18),o[1]-=l*(o[1]-r)/(1<<18),o[2]-=l*(o[2]-n)/(1<<18))}function c(e,t,a){var s,o,l,c,d,u=~(1<<31),p=u,h=-1,f=h;for(s=0;s<256;s++)o=i[s],(l=Math.abs(o[0]-e)+Math.abs(o[1]-t)+Math.abs(o[2]-a))<u&&(u=l,h=s),(c=l-(r[s]>>12))<p&&(p=c,f=s),d=n[s]>>10,n[s]-=d,r[s]+=d<<10;return n[h]+=64,r[h]-=65536,f}this.buildColormap=function(){!function(){var e,t;for(i=[],a=new Int32Array(256),r=new Int32Array(256),n=new Int32Array(256),s=new Int32Array(32),e=0;e<256;e++)t=(e<<12)/256,i[e]=new Float64Array([t,t,t,0]),n[e]=256,r[e]=0}(),function(){var i,a,r,n,d,u,p=e.length,h=30+(t-1)/3,f=p/(3*t),m=~~(f/100),v=1024,g=2048,y=g>>6;for(y<=1&&(y=0),i=0;i<y;i++)s[i]=v*(256*(y*y-i*i)/(y*y));p<1509?(t=1,a=3):a=p%499!=0?1497:p%491!=0?1473:p%487!=0?1461:1509;var b=0;for(i=0;i<f;)if(o(v,u=c(r=(255&e[b])<<4,n=(255&e[b+1])<<4,d=(255&e[b+2])<<4),r,n,d),0!==y&&l(y,u,r,n,d),(b+=a)>=p&&(b-=p),0===m&&(m=1),++i%m==0)for(v-=v/h,(y=(g-=g/30)>>6)<=1&&(y=0),u=0;u<y;u++)s[u]=v*(256*(y*y-u*u)/(y*y))}(),function(){for(var e=0;e<256;e++)i[e][0]>>=4,i[e][1]>>=4,i[e][2]>>=4,i[e][3]=e}(),function(){var e,t,r,n,s,o,l=0,c=0;for(e=0;e<256;e++){for(s=e,o=(r=i[e])[1],t=e+1;t<256;t++)(n=i[t])[1]<o&&(s=t,o=n[1]);if(n=i[s],e!=s&&(t=n[0],n[0]=r[0],r[0]=t,t=n[1],n[1]=r[1],r[1]=t,t=n[2],n[2]=r[2],r[2]=t,t=n[3],n[3]=r[3],r[3]=t),o!=l){for(a[l]=c+e>>1,t=l+1;t<o;t++)a[t]=e;l=o,c=e}}for(a[l]=c+255>>1,t=l+1;t<256;t++)a[t]=255}()},this.getColormap=function(){for(var e=[],t=[],a=0;a<256;a++)t[i[a][3]]=a;for(var r=0,n=0;n<256;n++){var s=t[n];e[r++]=i[s][0],e[r++]=i[s][1],e[r++]=i[s][2]}return e},this.lookupRGB=function(e,t,r){for(var n,s,o,l=1e3,c=-1,d=a[t],u=d-1;d<256||u>=0;)d<256&&((o=(s=i[d])[1]-t)>=l?d=256:(d++,o<0&&(o=-o),(n=s[0]-e)<0&&(n=-n),(o+=n)<l&&((n=s[2]-r)<0&&(n=-n),(o+=n)<l&&(l=o,c=s[3])))),u>=0&&((o=t-(s=i[u])[1])>=l?u=-1:(u--,o<0&&(o=-o),(n=s[0]-e)<0&&(n=-n),(o+=n)<l&&((n=s[2]-r)<0&&(n=-n),(o+=n)<l&&(l=o,c=s[3]))));return c}},r=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],n=function(e,t,i,a){var n,s,o,l,c,d,u,p,h,f=Math.max(2,a),m=new Uint8Array(256),v=new Int32Array(5003),g=new Int32Array(5003),y=0,b=0,w=!1;function _(e,t){m[s++]=e,s>=254&&$(t)}function x(e){k(5003),b=c+2,w=!0,j(c,e)}function k(e){for(var t=0;t<e;++t)v[t]=-1}function $(e){s>0&&(e.writeByte(s),e.writeBytes(m,0,s),s=0)}function I(e){return(1<<e)-1}function S(){return 0===u?-1:(--u,255&i[p++])}function j(e,t){for(n&=r[y],y>0?n|=e<<y:n=e,y+=h;y>=8;)_(255&n,t),n>>=8,y-=8;if((b>o||w)&&(w?(o=I(h=l),w=!1):(++h,o=12==h?4096:I(h))),e==d){for(;y>0;)_(255&n,t),n>>=8,y-=8;$(t)}}this.encode=function(i){i.writeByte(f),u=e*t,p=0,function(e,t){var i,a,r,n,u,p;for(w=!1,o=I(h=l=e),d=1+(c=1<<e-1),b=c+2,s=0,n=S(),p=0,i=5003;i<65536;i*=2)++p;p=8-p,k(5003),j(c,t);e:for(;-1!=(a=S());)if(i=(a<<12)+n,v[r=a<<p^n]!==i){if(v[r]>=0){u=5003-r,0===r&&(u=1);do{if((r-=u)<0&&(r+=5003),v[r]===i){n=g[r];continue e}}while(v[r]>=0)}j(n,t),n=a,b<4096?(g[r]=b++,v[r]=i):x(t)}else n=g[r];j(n,t),j(d,t)}(f+1,i),i.writeByte(0)}};function s(){this.page=-1,this.pages=[],this.newPage()}s.pageSize=4096,s.charMap={};for(var o=0;o<256;o++)s.charMap[o]=String.fromCharCode(o);function l(e,t){this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new s}s.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(s.pageSize),this.cursor=0},s.prototype.getData=function(){for(var e="",t=0;t<this.pages.length;t++)for(var i=0;i<s.pageSize;i++)e+=s.charMap[this.pages[t][i]];return e},s.prototype.toFlattenUint8Array=function(){for(var e=[],t=0;t<this.pages.length;t++)if(t===this.pages.length-1){var i=Uint8Array.from(this.pages[t].slice(0,this.cursor));e.push(i)}else e.push(this.pages[t]);var a=new Uint8Array(e.reduce((function(e,t){return e+t.length}),0));return e.reduce((function(e,t){return a.set(t,e),e+t.length}),0),a},s.prototype.writeByte=function(e){this.cursor>=s.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=e},s.prototype.writeUTFBytes=function(e){for(var t=e.length,i=0;i<t;i++)this.writeByte(e.charCodeAt(i))},s.prototype.writeBytes=function(e,t,i){for(var a=i||e.length,r=t||0;r<a;r++)this.writeByte(e[r])},l.prototype.setDelay=function(e){this.delay=Math.round(e/10)},l.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},l.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},l.prototype.setRepeat=function(e){this.repeat=e},l.prototype.setTransparent=function(e){this.transparent=e},l.prototype.addFrame=function(e){this.image=e,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeHeader(),this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.globalPalette||this.writePalette(),this.writePixels(),this.firstFrame=!1},l.prototype.finish=function(){this.out.writeByte(59)},l.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},l.prototype.setDither=function(e){!0===e&&(e="FloydSteinberg"),this.dither=e},l.prototype.setGlobalPalette=function(e){this.globalPalette=e},l.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},l.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},l.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new a(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},l.prototype.indexPixels=function(e){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var i=0,a=0;a<t;a++){var r=this.findClosestRGB(255&this.pixels[i++],255&this.pixels[i++],255&this.pixels[i++]);this.usedEntry[r]=!0,this.indexedPixels[a]=r}},l.prototype.ditherPixels=function(e,t){var i={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!e||!i[e])throw"Unknown dithering kernel: "+e;var a=i[e],r=0,n=this.height,s=this.width,o=this.pixels,l=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var c=0;c<n;c++){t&&(l*=-1);for(var d=1==l?0:s-1,u=1==l?s:0;d!==u;d+=l){var p=3*(r=c*s+d),h=o[p],f=o[p+1],m=o[p+2];p=this.findClosestRGB(h,f,m),this.usedEntry[p]=!0,this.indexedPixels[r]=p,p*=3;for(var v=h-this.colorTab[p],g=f-this.colorTab[p+1],y=m-this.colorTab[p+2],b=1==l?0:a.length-1,w=1==l?a.length:0;b!==w;b+=l){var _=a[b][1],x=a[b][2];if(_+d>=0&&_+d<s&&x+c>=0&&x+c<n){var k=a[b][0];p=r+_+x*s,o[p*=3]=Math.max(0,Math.min(255,o[p]+v*k)),o[p+1]=Math.max(0,Math.min(255,o[p+1]+g*k)),o[p+2]=Math.max(0,Math.min(255,o[p+2]+y*k))}}}}},l.prototype.findClosest=function(e,t){return this.findClosestRGB((16711680&e)>>16,(65280&e)>>8,255&e,t)},l.prototype.findClosestRGB=function(e,t,i,a){if(null===this.colorTab)return-1;if(this.neuQuant&&!a)return this.neuQuant.lookupRGB(e,t,i);for(var r=0,n=16777216,s=this.colorTab.length,o=0,l=0;o<s;l++){var c=e-(255&this.colorTab[o++]),d=t-(255&this.colorTab[o++]),u=i-(255&this.colorTab[o++]),p=c*c+d*d+u*u;(!a||this.usedEntry[l])&&p<n&&(n=p,r=l)}return r},l.prototype.getImagePixels=function(){var e=this.width,t=this.height;this.pixels=new Uint8Array(e*t*3);for(var i=this.image,a=0,r=0,n=0;n<t;n++)for(var s=0;s<e;s++)this.pixels[r++]=i[a++],this.pixels[r++]=i[a++],this.pixels[r++]=i[a++],a++},l.prototype.writeGraphicCtrlExt=function(){var e,t;this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4),null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&this.dispose),t<<=2,this.out.writeByte(0|t|e),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},l.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},l.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},l.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},l.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.out.writeByte(0)},l.prototype.writeShort=function(e){this.out.writeByte(255&e),this.out.writeByte(e>>8&255)},l.prototype.writePixels=function(){new n(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},l.prototype.stream=function(){return this.out},t.a=l},function(e,t,i){e.exports=i(20)},function(e,t,i){var a=i(2).default;function r(){"use strict";
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},i=Object.prototype,n=i.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function d(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,i){return e[t]=i}}function u(e,t,i,a){var r=t&&t.prototype instanceof f?t:f,n=Object.create(r.prototype),s=new S(a||[]);return n._invoke=function(e,t,i){var a="suspendedStart";return function(r,n){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw n;return C()}for(i.method=r,i.arg=n;;){var s=i.delegate;if(s){var o=k(s,i);if(o){if(o===h)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var l=p(e,t,i);if("normal"===l.type){if(a=i.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(a="completed",i.method="throw",i.arg=l.arg)}}}(e,i,s),n}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h={};function f(){}function m(){}function v(){}var g={};d(g,o,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==i&&n.call(b,o)&&(g=b);var w=v.prototype=f.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var i;this._invoke=function(r,s){function o(){return new t((function(i,o){!function i(r,s,o,l){var c=p(e[r],e,s);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==a(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,o,l)}),(function(e){i("throw",e,o,l)})):t.resolve(u).then((function(e){d.value=e,o(d)}),(function(e){return i("throw",e,o,l)}))}l(c.arg)}(r,s,i,o)}))}return i=i?i.then(o,o):o()}}function k(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var a=p(i,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,h;var r=a.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function j(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:C}}function C(){return{value:void 0,done:!0}}return m.prototype=v,d(w,"constructor",v),d(v,"constructor",m),m.displayName=d(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,d(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},_(x.prototype),d(x.prototype,l,(function(){return this})),t.AsyncIterator=x,t.async=function(e,i,a,r,n){void 0===n&&(n=Promise);var s=new x(u(e,i,a,r),n);return t.isGeneratorFunction(i)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},_(w),d(w,c,"Generator"),d(w,o,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var a=t.pop();if(a in e)return i.value=a,i.done=!1,i}return i.done=!0,i}},t.values=j,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,a){return s.type="throw",s.arg=e,t.next=i,a&&(t.method="next",t.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var o=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(o&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(o){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var r=a;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=e,s.arg=t,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),I(i),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var a=i.completion;if("throw"===a.type){var r=a.arg;I(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:j(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var a=i(16),r=i(17),n=i(18);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return c(this,e,t,i)}function c(e,t,i,a){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,i,a){if(t.byteLength,i<0||t.byteLength<i)throw new RangeError("'offset' is out of bounds");if(t.byteLength<i+(a||0))throw new RangeError("'length' is out of bounds");return t=void 0===i&&void 0===a?new Uint8Array(t):void 0===a?new Uint8Array(t,i):new Uint8Array(t,i,a),l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=p(e,t),e}(e,t,i,a):"string"==typeof t?function(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var a=0|f(t,i),r=(e=o(e,a)).write(t,i);return r!==a&&(e=e.slice(0,r)),e}(e,t,i):function(e,t){if(l.isBuffer(t)){var i=0|h(t.length);return 0===(e=o(e,i)).length||t.copy(e,0,0,i),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(a=t.length)!=a?o(e,0):p(e,t);if("Buffer"===t.type&&n(t.data))return p(e,t.data)}var a;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t){if(d(t),e=o(e,t<0?0:0|h(t)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function p(e,t){var i=t.length<0?0:0|h(t.length);e=o(e,i);for(var a=0;a<i;a+=1)e[a]=255&t[a];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return V(e).length;default:if(a)return q(e).length;t=(""+t).toLowerCase(),a=!0}}function m(e,t,i){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,i);case"utf8":case"utf-8":return S(this,t,i);case"ascii":return j(this,t,i);case"latin1":case"binary":return C(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,i);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function v(e,t,i){var a=e[t];e[t]=e[i],e[i]=a}function g(e,t,i,a,r){if(0===e.length)return-1;if("string"==typeof i?(a=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=l.from(t,a)),l.isBuffer(t))return 0===t.length?-1:y(e,t,i,a,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):y(e,[t],i,a,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,i,a,r){var n,s=1,o=e.length,l=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,i/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){var d=-1;for(n=i;n<o;n++)if(c(e,n)===c(t,-1===d?0:n-d)){if(-1===d&&(d=n),n-d+1===l)return d*s}else-1!==d&&(n-=n-d),d=-1}else for(i+l>o&&(i=o-l),n=i;n>=0;n--){for(var u=!0,p=0;p<l;p++)if(c(e,n+p)!==c(t,p)){u=!1;break}if(u)return n}return-1}function b(e,t,i,a){i=Number(i)||0;var r=e.length-i;a?(a=Number(a))>r&&(a=r):a=r;var n=t.length;if(n%2!=0)throw new TypeError("Invalid hex string");a>n/2&&(a=n/2);for(var s=0;s<a;++s){var o=parseInt(t.substr(2*s,2),16);if(isNaN(o))return s;e[i+s]=o}return s}function w(e,t,i,a){return B(q(t,e.length-i),e,i,a)}function _(e,t,i,a){return B(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,a)}function x(e,t,i,a){return _(e,t,i,a)}function k(e,t,i,a){return B(V(t),e,i,a)}function $(e,t,i,a){return B(function(e,t){for(var i,a,r,n=[],s=0;s<e.length&&!((t-=2)<0);++s)i=e.charCodeAt(s),a=i>>8,r=i%256,n.push(r),n.push(a);return n}(t,e.length-i),e,i,a)}function I(e,t,i){return 0===t&&i===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,i))}function S(e,t,i){i=Math.min(e.length,i);for(var a=[],r=t;r<i;){var n,s,o,l,c=e[r],d=null,u=c>239?4:c>223?3:c>191?2:1;if(r+u<=i)switch(u){case 1:c<128&&(d=c);break;case 2:128==(192&(n=e[r+1]))&&(l=(31&c)<<6|63&n)>127&&(d=l);break;case 3:n=e[r+1],s=e[r+2],128==(192&n)&&128==(192&s)&&(l=(15&c)<<12|(63&n)<<6|63&s)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:n=e[r+1],s=e[r+2],o=e[r+3],128==(192&n)&&128==(192&s)&&128==(192&o)&&(l=(15&c)<<18|(63&n)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(d=l)}null===d?(d=65533,u=1):d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|1023&d),a.push(d),r+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var i="",a=0;a<t;)i+=String.fromCharCode.apply(String,e.slice(a,a+=4096));return i}(a)}function j(e,t,i){var a="";i=Math.min(e.length,i);for(var r=t;r<i;++r)a+=String.fromCharCode(127&e[r]);return a}function C(e,t,i){var a="";i=Math.min(e.length,i);for(var r=t;r<i;++r)a+=String.fromCharCode(e[r]);return a}function L(e,t,i){var a=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>a)&&(i=a);for(var r="",n=t;n<i;++n)r+=R(e[n]);return r}function P(e,t,i){for(var a=e.slice(t,i),r="",n=0;n<a.length;n+=2)r+=String.fromCharCode(a[n]+256*a[n+1]);return r}function N(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,i,a,r,n){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<n)throw new RangeError('"value" argument is out of bounds');if(i+a>e.length)throw new RangeError("Index out of range")}function O(e,t,i,a){t<0&&(t=65535+t+1);for(var r=0,n=Math.min(e.length-i,2);r<n;++r)e[i+r]=(t&255<<8*(a?r:1-r))>>>8*(a?r:1-r)}function D(e,t,i,a){t<0&&(t=4294967295+t+1);for(var r=0,n=Math.min(e.length-i,4);r<n;++r)e[i+r]=t>>>8*(a?r:3-r)&255}function M(e,t,i,a,r,n){if(i+a>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function E(e,t,i,a,n){return n||M(e,0,i,4),r.write(e,t,i,a,23,4),i+4}function F(e,t,i,a,n){return n||M(e,0,i,8),r.write(e,t,i,a,52,8),i+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,i){return c(null,e,t,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,i){return function(e,t,i,a){return d(t),t<=0?o(e,t):void 0!==i?"string"==typeof a?o(e,t).fill(i,a):o(e,t).fill(i):o(e,t)}(null,e,t,i)},l.allocUnsafe=function(e){return u(null,e)},l.allocUnsafeSlow=function(e){return u(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var i=e.length,a=t.length,r=0,n=Math.min(i,a);r<n;++r)if(e[r]!==t[r]){i=e[r],a=t[r];break}return i<a?-1:a<i?1:0},l.isEncoding=function(e){switch(String(e).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}},l.concat=function(e,t){if(!n(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var a=l.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var s=e[i];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(a,r),r+=s.length}return a},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):m.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,i,a,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),t<0||i>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&t>=i)return 0;if(a>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var n=(r>>>=0)-(a>>>=0),s=(i>>>=0)-(t>>>=0),o=Math.min(n,s),c=this.slice(a,r),d=e.slice(t,i),u=0;u<o;++u)if(c[u]!==d[u]){n=c[u],s=d[u];break}return n<s?-1:s<n?1:0},l.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},l.prototype.indexOf=function(e,t,i){return g(this,e,t,i,!0)},l.prototype.lastIndexOf=function(e,t,i){return g(this,e,t,i,!1)},l.prototype.write=function(e,t,i,a){if(void 0===t)a="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)a=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(i)?(i|=0,void 0===a&&(a="utf8")):(a=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var n=!1;;)switch(a){case"hex":return b(this,e,t,i);case"utf8":case"utf-8":return w(this,e,t,i);case"ascii":return _(this,e,t,i);case"latin1":case"binary":return x(this,e,t,i);case"base64":return k(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,t,i);default:if(n)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),n=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.prototype.slice=function(e,t){var i,a=this.length;if((e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(t=void 0===t?a:~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=l.prototype;else{var r=t-e;i=new l(r,void 0);for(var n=0;n<r;++n)i[n]=this[n+e]}return i},l.prototype.readUIntLE=function(e,t,i){e|=0,t|=0,i||N(e,t,this.length);for(var a=this[e],r=1,n=0;++n<t&&(r*=256);)a+=this[e+n]*r;return a},l.prototype.readUIntBE=function(e,t,i){e|=0,t|=0,i||N(e,t,this.length);for(var a=this[e+--t],r=1;t>0&&(r*=256);)a+=this[e+--t]*r;return a},l.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||N(e,t,this.length);for(var a=this[e],r=1,n=0;++n<t&&(r*=256);)a+=this[e+n]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||N(e,t,this.length);for(var a=t,r=1,n=this[e+--a];a>0&&(r*=256);)n+=this[e+--a]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,i,a){e=+e,t|=0,i|=0,a||T(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,n=0;for(this[t]=255&e;++n<i&&(r*=256);)this[t+n]=e/r&255;return t+i},l.prototype.writeUIntBE=function(e,t,i,a){e=+e,t|=0,i|=0,a||T(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,n=1;for(this[t+r]=255&e;--r>=0&&(n*=256);)this[t+r]=e/n&255;return t+i},l.prototype.writeUInt8=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,i,a){if(e=+e,t|=0,!a){var r=Math.pow(2,8*i-1);T(this,e,t,i,r-1,-r)}var n=0,s=1,o=0;for(this[t]=255&e;++n<i&&(s*=256);)e<0&&0===o&&0!==this[t+n-1]&&(o=1),this[t+n]=(e/s>>0)-o&255;return t+i},l.prototype.writeIntBE=function(e,t,i,a){if(e=+e,t|=0,!a){var r=Math.pow(2,8*i-1);T(this,e,t,i,r-1,-r)}var n=i-1,s=1,o=0;for(this[t+n]=255&e;--n>=0&&(s*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/s>>0)-o&255;return t+i},l.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,i){return E(this,e,t,!0,i)},l.prototype.writeFloatBE=function(e,t,i){return E(this,e,t,!1,i)},l.prototype.writeDoubleLE=function(e,t,i){return F(this,e,t,!0,i)},l.prototype.writeDoubleBE=function(e,t,i){return F(this,e,t,!1,i)},l.prototype.copy=function(e,t,i,a){if(i||(i=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<i&&(a=i),a===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-i&&(a=e.length-t+i);var r,n=a-i;if(this===e&&i<t&&t<a)for(r=n-1;r>=0;--r)e[r+t]=this[r+i];else if(n<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<n;++r)e[r+t]=this[r+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+n),t);return n},l.prototype.fill=function(e,t,i,a){if("string"==typeof e){if("string"==typeof t?(a=t,t=0,i=this.length):"string"==typeof i&&(a=i,i=this.length),1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!l.isEncoding(a))throw new TypeError("Unknown encoding: "+a)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var n;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(n=t;n<i;++n)this[n]=e;else{var s=l.isBuffer(e)?e:q(new l(e,a).toString()),o=s.length;for(n=0;n<i-t;++n)this[n+t]=s[n%o]}return this};var A=/[^+\/0-9A-Za-z-_]/g;function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var i;t=t||1/0;for(var a=e.length,r=null,n=[],s=0;s<a;++s){if((i=e.charCodeAt(s))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(s+1===a){(t-=3)>-1&&n.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&n.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&n.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;n.push(i)}else if(i<2048){if((t-=2)<0)break;n.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;n.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return n}function V(e){return a.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(A,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,i,a){for(var r=0;r<a&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}}).call(this,i(8))},function(e,t,i){"use strict";t.byteLength=function(e){var t=c(e),i=t[0],a=t[1];return 3*(i+a)/4-a},t.toByteArray=function(e){var t,i,a=c(e),s=a[0],o=a[1],l=new n(function(e,t,i){return 3*(t+i)/4-i}(0,s,o)),d=0,u=o>0?s-4:s;for(i=0;i<u;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],l[d++]=t>>16&255,l[d++]=t>>8&255,l[d++]=255&t;return 2===o&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,l[d++]=255&t),1===o&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t),l},t.fromByteArray=function(e){for(var t,i=e.length,r=i%3,n=[],s=0,o=i-r;s<o;s+=16383)n.push(d(e,s,s+16383>o?o:s+16383));return 1===r?(t=e[i-1],n.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],n.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),n.join("")};for(var a=[],r=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o<l;++o)a[o]=s[o],r[s.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function d(e,t,i){for(var r,n,s=[],o=t;o<i;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(a[(n=r)>>18&63]+a[n>>12&63]+a[n>>6&63]+a[63&n]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
t.read=function(e,t,i,a,r){var n,s,o=8*r-a-1,l=(1<<o)-1,c=l>>1,d=-7,u=i?r-1:0,p=i?-1:1,h=e[t+u];for(u+=p,n=h&(1<<-d)-1,h>>=-d,d+=o;d>0;n=256*n+e[t+u],u+=p,d-=8);for(s=n&(1<<-d)-1,n>>=-d,d+=a;d>0;s=256*s+e[t+u],u+=p,d-=8);if(0===n)n=1-c;else{if(n===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,a),n-=c}return(h?-1:1)*s*Math.pow(2,n-a)},t.write=function(e,t,i,a,r,n){var s,o,l,c=8*n-r-1,d=(1<<c)-1,u=d>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=a?0:n-1,f=a?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=d?(o=0,s=d):s+u>=1?(o=(t*l-1)*Math.pow(2,r),s+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,r),s=0));r>=8;e[i+h]=255&o,h+=f,o/=256,r-=8);for(s=s<<r|o,c+=r;c>0;e[i+h]=255&s,h+=f,s/=256,c-=8);e[i+h-f]|=128*m}},function(e,t){var i={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},function(e,t){var i,a,r=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(e){if(i===setTimeout)return setTimeout(e,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:n}catch(e){i=n}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var l,c=[],d=!1,u=-1;function p(){d&&l&&(d=!1,l.length?c=l.concat(c):u=-1,c.length&&h())}function h(){if(!d){var e=o(p);d=!0;for(var t=c.length;t;){for(l=c,c=[];++u<t;)l&&l[u].run();u=-1,t=c.length}l=null,d=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];c.push(new f(e,t)),1!==c.length||d||o(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,i){"use strict";i.r(t);var a=i(6),r=i.n(a),n=i(3),s=i.n(n);function o(e){return""===e?e:"true"===e||"1"==e}var l=function(e,t){return new Promise((function(t,i){var a=new XMLHttpRequest;a.responseType="blob",a.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(a.response)},a.open("GET",e),a.send()}))},c=i(9),d=function(e,t,i,a,r,n,s,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=i,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=o?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}({props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data:function(){return{imgUrl:""}},watch:{$props:{deep:!0,handler:function(){this.main()}}},mounted:function(){this.main()},methods:{main:function(){var e=this;return r()(s.a.mark((function t(){var i,a,r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.gifBgSrc){t.next=7;break}return t.next=3,l(e.gifBgSrc);case 3:return i=t.sent,a=e.logoSrc,e.render(void 0,a,i),t.abrupt("return");case 7:r=e.bgSrc,n=e.logoSrc,e.render(r,n);case 10:case"end":return t.stop()}}),t)})))()},render:function(e,t,i){var a=this;return r()(s.a.mark((function r(){var n;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=a,new c.a({gifBackground:i,text:n.text,size:n.size,margin:n.margin,colorDark:n.colorDark,colorLight:n.colorLight,backgroundColor:n.backgroundColor,backgroundImage:e,backgroundDimming:n.backgroundDimming,logoImage:t,logoScale:n.logoScale,logoBackgroundColor:n.logoBackgroundColor,correctLevel:n.correctLevel,logoMargin:n.logoMargin,logoCornerRadius:n.logoCornerRadius,whiteMargin:o(n.whiteMargin),dotScale:n.dotScale,autoColor:o(n.autoColor),binarize:o(n.binarize),binarizeThreshold:n.binarizeThreshold,components:n.components}).draw().then((function(e){a.imgUrl=e,n.callback&&n.callback(e,n.qid)}));case 2:case"end":return r.stop()}}),r)})))()}}},(function(){var e=this.$createElement,t=this._self._c||e;return this.bindElement?t("img",{staticStyle:{display:"inline-block"},attrs:{src:this.imgUrl}}):this._e()}),[],!1,null,null,null).exports;d.install=function(e){return e.component(d.name,d)};var u=d,p=[u];"undefined"!=typeof window&&window.Vue&&function(e){p.map((function(t){e.component(t.name,t)}))}(window.Vue),t.default=u}])}))},"666d":function(e,t,i){"use strict";i("1a8c")},"67dd":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"sip-channel"},[i("el-row",{staticClass:"mb8",attrs:{gutter:10}},[i("right-toolbar",{attrs:{showSearch:e.showSearch,search:!1},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.channelList,border:!1}},[i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-0"),align:"left",prop:"deviceSipId","min-width":"180"}}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-1"),align:"left",prop:"channelSipId","min-width":"180"}}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-5"),align:"center",prop:"status",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.sip_gen_status,value:t.row.status}})]}}])}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-2"),align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.isVideoChannel(t.row)?i("el-image",{staticStyle:{width:"60px"},attrs:{src:e.getSnap(t.row),"preview-src-list":e.getBigSnap(t.row),fit:"contain"}},[i("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[i("i",{staticClass:"el-icon-picture-outline"})])]):e._e()]}}])}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-3"),align:"left",prop:"channelName","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-4"),align:"left",prop:"model","min-width":"130"}}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-9"),align:"center",prop:"streamPush","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.streamPush?i("el-tag",{attrs:{type:"info"}},[e._v(e._s(e.$t("sip.channel.998532-10")))]):e._e(),1===t.row.streamPush?i("el-tag",[e._v(e._s(e.$t("sip.channel.998532-11")))]):e._e()]}}])}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-12"),align:"center",prop:"streamRecord","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.streamRecord?i("el-tag",{attrs:{type:"info"}},[e._v(e._s(e.$t("sip.channel.998532-13")))]):e._e(),1===t.row.streamRecord?i("el-tag",[e._v(e._s(e.$t("sip.channel.998532-14")))]):e._e()]}}])}),i("el-table-column",{attrs:{label:e.$t("sip.channel.998532-15"),align:"center",prop:"videoRecord","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.videoRecord?i("el-tag",{attrs:{type:"info"}},[e._v(e._s(e.$t("sip.channel.998532-16")))]):e._e(),1===t.row.videoRecord?i("el-tag",[e._v(e._s(e.$t("sip.channel.998532-17")))]):e._e()]}}])}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center",width:"100","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{attrs:{size:"small",type:"text",icon:"el-icon-video-play",disabled:3!==t.row.status},on:{click:function(i){return e.sendDevicePush(t.row)}}},[e._v(e._s(e.$t("sip.channel.998532-6")))])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)},r=[],n=i("e2de"),s={name:"Channel",dicts:["video_type","channel_type","sip_gen_status"],props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.queryParams.deviceSipId=this.deviceInfo.serialNumber)}},data:function(){return{loadSnap:{},deviceInfo:{},loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,channelList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,deviceSipId:null},form:{}}},created:function(){this.queryParams.deviceSipId=this.device.serialNumber,this.getList()},methods:{sendDevicePush:function(e){var t={tabName:"sipPlayer",channelId:e.channelSipId};this.$emit("playerEvent",t),console.log("通知设备推流:"+e.deviceSipId+" : "+e.channelSipId)},getList:function(){var e=this;this.loading=!0,Object(n["g"])(this.queryParams).then((function(t){console.log(t),e.channelList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={channelId:null,channelSipId:null,deviceSipId:null,channelName:null,manufacture:null,model:null,owner:null,civilcode:null,block:null,address:null,parentid:null,ipaddress:null,port:null,password:null,ptztype:null,ptztypetext:null,status:0,longitude:null,latitude:null,streamid:null,subcount:null,parental:1,hasaudio:1},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},handleUpdate:function(e){var t=this;this.reset();var i=e.channelId||this.ids;Object(n["e"])(i).then((function(e){t.form=e.data,t.open=!0,t.title=t.$t("sip.channel.998532-7")}))},handleDelete:function(e){var t=this,i=e.channelId||this.ids;this.$modal.confirm(this.$t("sip.channel.998532-8",[i])).then((function(){return Object(n["d"])(i)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("sip.channel.998532-18"))})).catch((function(){}))},getSnap:function(e){return console.log("getSnap:/prod-api/profile/snap/"+e.deviceSipId+"_"+e.channelSipId+".jpg"),"/prod-api/profile/snap/"+e.deviceSipId+"_"+e.channelSipId+".jpg"},getBigSnap:function(e){return[this.getSnap(e)]},isVideoChannel:function(e){var t=e.channelSipId.substring(10,13);return!("111"!==t&&"112"!==t&&"118"!==t&&"131"!==t&&"132"!==t)}}},o=s,l=(i("8e08"),i("2877")),c=Object(l["a"])(o,a,r,!1,null,"33db2bca",null);t["default"]=c.exports},"67fa":function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"f",(function(){return o})),i.d(t,"b",(function(){return l})),i.d(t,"d",(function(){return c}));var a=i("b775");function r(e){return Object(a["a"])({url:"/order/control/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/order/control/"+e,method:"get"})}function s(e){return Object(a["a"])({url:"/order/control",method:"post",data:e})}function o(e){return Object(a["a"])({url:"/order/control",method:"put",data:e})}function l(e){return Object(a["a"])({url:"/order/control/"+e,method:"delete"})}function c(e){return Object(a["a"])({url:"/order/control/get",method:"get",params:e})}},6827:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return s})),i.d(t,"e",(function(){return o})),i.d(t,"d",(function(){return l})),i.d(t,"g",(function(){return c})),i.d(t,"f",(function(){return d})),i.d(t,"h",(function(){return u}));var a=i("b775");function r(e,t,i){return Object(a["a"])({url:"/sip/record/devquery/"+e+"/"+t,method:"get",params:i})}function n(e){return Object(a["a"])({url:"/sip/record/serverRecord/list",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/sip/record/serverRecord/date/list",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/sip/record/serverRecord/file/list",method:"get",params:e})}function l(e){return Object(a["a"])({url:"/sip/record/serverRecord/device/list",method:"get",params:e})}function c(e,t){return Object(a["a"])({url:"/sip/record/play/"+e+"/"+t,method:"get"})}function d(e,t,i){return Object(a["a"])({url:"/sip/record/download/"+e+"/"+t,method:"get",params:i})}function u(e){return Object(a["a"])({url:"/sip/record/upload",method:"get",params:e})}},"6abb":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{attrs:{id:"easyplayer"}})},r=[],n={name:"player",data:function(){return{easyPlayer:null}},props:["videoUrl","error","hasaudio","height"],mounted:function(){var e=this,t=decodeURIComponent(this.$route.params.url);this.$nextTick((function(){"undefined"==typeof e.videoUrl&&(e.videoUrl=t),console.log("初始化时的地址为: "+e.videoUrl),e.play(e.videoUrl)}))},watch:{videoUrl:function(e,t){this.play(e)},immediate:!0},methods:{play:function(e){console.log(this.height),null!=this.easyPlayer&&this.easyPlayer.destroy(),"undefined"==typeof this.height&&(this.height=!1),this.easyPlayer=new WasmPlayer(null,"easyplayer",this.eventcallbacK,{Height:this.height}),this.easyPlayer.play(e,1)},pause:function(){this.easyPlayer.destroy(),this.easyPlayer=null}},destroyed:function(){this.easyPlayer.destroy()}},s=n,o=(i("93db"),i("2877")),l=Object(o["a"])(s,a,r,!1,null,null,null);t["default"]=l.exports},"6f53":function(e,t,i){var a=i("83ab"),r=i("e330"),n=i("df75"),s=i("fc6a"),o=i("d1e7").f,l=r(o),c=r([].push),d=function(e){return function(t){var i,r=s(t),o=n(r),d=o.length,u=0,p=[];while(d>u)i=o[u++],a&&!l(r,i)||c(p,e?[i,r[i]]:r[i]);return p}};e.exports={entries:d(!0),values:d(!1)}},7168:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{prop:"logType"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-log.798283-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.logType,callback:function(t){e.$set(e.queryParams,"logType",t)},expression:"queryParams.logType"}},e._l(e.dict.type.iot_event_type,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{prop:"identify"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-log.798283-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.identify,callback:function(t){e.$set(e.queryParams,"identify",t)},expression:"queryParams.identify"}})],1),i("el-form-item",[i("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":e.$t("device.device-log.798283-5"),"end-placeholder":e.$t("device.device-log.798283-6")},model:{value:e.daterangeTime,callback:function(t){e.daterangeTime=t},expression:"daterangeTime"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.device-log.798283-7")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.device-log.798283-8")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.deviceLogList,border:!1}},[i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-9"),align:"center",prop:"logType","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_event_type,value:t.row.logType}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-10"),align:"center",prop:"logType","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.mode?i("el-tag",{attrs:{type:"primary"}},[e._v(e._s(e.$t("device.device-log.798283-11")))]):2==t.row.mode?i("el-tag",{attrs:{type:"success"}},[e._v(e._s(e.$t("device.device-log.798283-12")))]):i("el-tag",{attrs:{type:"info"}},[e._v(e._s(e.$t("device.device-log.798283-13")))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-14"),align:"center",prop:"createTime",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.createTime))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-2"),align:"left",prop:"identify","min-width":"120"}}),i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-15"),align:"left",prop:"logValue","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{domProps:{innerHTML:e._s(e.formatValueDisplay(t.row))}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-log.798283-16"),align:"left",prop:"remark","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(null==t.row.remark?e.$t("device.device-log.798283-17"):t.row.remark)+" ")]}}])})],1),i("div",{staticStyle:{height:"60px"}},[i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1)],1)},r=[],n=i("5530"),s=(i("b0c0"),i("a9e3"),i("b775"));function o(e){return Object(s["a"])({url:"/iot/event/list",method:"get",params:e})}var l={name:"DeviceLog",dicts:["iot_event_type","iot_yes_no"],props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.getList(),this.thingsModel=this.deviceInfo.cacheThingsModel)}},mounted:function(){this.deviceInfo=this.device,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.getList(),this.thingsModel=this.deviceInfo.cacheThingsModel)},data:function(){return{thingsModel:{},loading:!0,showSearch:!0,total:0,deviceLogList:[],queryParams:{pageNum:1,pageSize:10,logType:null,logValue:null,deviceId:null,serialNumber:null,deviceName:null,identify:null,isMonitor:null},daterangeTime:[]}},created:function(){this.queryParams.serialNumber=this.device.serialNumber,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,o(this.addDateRange(this.queryParams,this.daterangeTime)).then((function(t){e.deviceLogList=t.rows,e.total=t.total,e.loading=!1}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.daterangeTime=[],this.handleQuery()},handleExport:function(){this.download("iot/event/export",Object(n["a"])({},this.queryParams),"eventLog_".concat((new Date).getTime(),".xlsx"))},formatValueDisplay:function(e){if(1==e.logType){var t=this.getThingsModelItem(1,e.identify);if(""!=t)return(t.parentName?"["+t.parentName+(t.arrayIndex?t.arrayIndex:"")+"] ":"")+t.name+' <span style="color:#486FF2;">'+this.getThingsModelItemValue(t,e.logValue)+" "+(void 0!=t.datatype.unit?t.datatype.unit:"")+"</span>"}else if(2==e.logType){var i=this.getThingsModelItem(2,e.identify);if(""!=i)return(i.parentName?"["+i.parentName+(i.arrayIndex?i.arrayIndex:"")+"] ":"")+i.name+' <span style="color:#486FF2">'+this.getThingsModelItemValue(i,e.logValue)+" "+(void 0!=i.datatype.unit?i.datatype.unit:"")+"</span>"}else{if(3==e.logType){var a=this.getThingsModelItem(3,e.identify);return""!=a?(a.parentName?"["+a.parentName+(a.arrayIndex?a.arrayIndex:"")+"] ":"")+a.name+' <span style="color:#486FF2">'+this.getThingsModelItemValue(a,e.logValue)+" "+(void 0!=a.datatype.unit?a.datatype.unit:"")+"</span>":e.logValue}if(4==e.logType)return'<span style="font-weight:bold">设备升级</span>';if(5==e.logType)return'<span style="font-weight:bold">设备上线</span>';if(6==e.logType)return'<span style="font-weight:bold">设备离线</span>'}return""},getThingsModelItemValue:function(e,t){if("bool"==e.datatype.type){if("0"==t)return e.datatype.falseText;if("1"==t)return e.datatype.trueText}else if("enum"==e.datatype.type)for(var i=0;i<e.datatype.enumList.length;i++)if(t==e.datatype.enumList[i].value)return e.datatype.enumList[i].text;return t},getThingsModelItem:function(e,t){if(1==e&&this.thingsModel.properties)for(var i=0;i<this.thingsModel.properties.length;i++){if(this.thingsModel.properties[i].id==t)return this.thingsModel.properties[i];if("object"==this.thingsModel.properties[i].datatype.type)for(var a=0;a<this.thingsModel.properties[i].datatype.params.length;a++)if(this.thingsModel.properties[i].datatype.params[a].id==t)return this.thingsModel.properties[i].datatype.params[a].parentName=this.thingsModel.properties[i].name,this.thingsModel.properties[i].datatype.params[a];if("array"==this.thingsModel.properties[i].datatype.type&&this.thingsModel.properties[i].datatype.arrayType)if("object"==this.thingsModel.properties[i].datatype.arrayType){var r=t,n=0;t.indexOf("array_")>-1&&(n=t.substring(6,8),r=t.substring(9));for(var s=0;s<this.thingsModel.properties[i].datatype.params.length;s++)if(this.thingsModel.properties[i].datatype.params[s].id==r)return this.thingsModel.properties[i].datatype.params[s].arrayIndex=Number(n)+1,this.thingsModel.properties[i].datatype.params[s].parentName=this.thingsModel.properties[i].name,this.thingsModel.properties[i].datatype.params[s]}else for(var o=0;o<this.thingsModel.properties[i].datatype.arrayCount.length;o++)if(this.thingsModel.properties[i].id==realIdentity)return this.thingsModel.properties[i].arrayIndex=Number(arrayIndex)+1,this.thingsModel.properties[i].parentName=this.$t("device.device-log.798283-21"),this.thingsModel.properties[i]}else if(2==e&&this.thingsModel.functions)for(var l=0;l<this.thingsModel.functions.length;l++){if(this.thingsModel.functions[l].id==t)return this.thingsModel.functions[l];if("object"==this.thingsModel.functions[l].datatype.type)for(var c=0;c<this.thingsModel.functions[l].datatype.params.length;c++)if(this.thingsModel.functions[l].datatype.params[c].id==t)return this.thingsModel.functions[l].datatype.params[c].parentName=this.thingsModel.functions[l].name,this.thingsModel.functions[l].datatype.params[c];if("array"==this.thingsModel.functions[l].datatype.type&&this.thingsModel.functions[l].datatype.arrayType){var d=t,u=0;if(t.indexOf("array_")>-1&&(u=t.substring(6,8),d=t.substring(9)),"object"==this.thingsModel.functions[l].datatype.arrayType){for(var p=0;p<this.thingsModel.functions[l].datatype.params.length;p++)if(this.thingsModel.functions[l].datatype.params[p].id==d)return this.thingsModel.functions[l].datatype.params[p].arrayIndex=Number(u)+1,this.thingsModel.functions[l].datatype.params[p].parentName=this.thingsModel.functions[l].name,this.thingsModel.functions[l].datatype.params[p]}else for(var h=0;h<this.thingsModel.functions[l].datatype.arrayCount.length;h++)if(this.thingsModel.functions[l].id==d)return this.thingsModel.functions[l].arrayIndex=Number(u)+1,this.thingsModel.functions[l].parentName=this.$t("device.device-log.798283-21"),this.thingsModel.functions[l]}}else if(3==e&&this.thingsModel.events)for(var f=0;f<this.thingsModel.events.length;f++)if(this.thingsModel.events[f].id==t)return this.thingsModel.events[f];return""}}},c=l,d=i("2877"),u=Object(d["a"])(c,a,r,!1,null,null,null);t["default"]=u.exports},"73d0":function(e,t,i){"use strict";i("ed90")},"7a72":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"device-timer-wrap"},[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"70px"}},[i("el-form-item",{attrs:{prop:"jobName"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-timer.433369-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.jobName,callback:function(t){e.$set(e.queryParams,"jobName",t)},expression:"queryParams.jobName"}})],1),i("el-form-item",{attrs:{prop:"status"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-timer.433369-3"),clearable:""},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.dict.type.sys_job_status,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.device-timer.433369-4")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.device-timer.433369-5")))])],1)],1),i("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:add"],expression:"['iot:device:timer:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"small"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("add")))])],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:remove"],expression:"['iot:device:timer:remove']"}],attrs:{plain:"",icon:"el-icon-delete",size:"small",disabled:e.multiple},on:{click:e.handleDelete}},[e._v(e._s(e.$t("del")))])],1),i("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.jobList,border:!1},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-7"),align:"left",prop:"jobName","show-overflow-tooltip":!0,"min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-8"),align:"left",prop:"cronText","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{domProps:{innerHTML:e._s(e.formatCronDisplay(t.row))}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-9"),align:"left",prop:"cronExpression","show-overflow-tooltip":!0,"min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-10"),align:"left",prop:"actions","show-overflow-tooltip":!0,"min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{staticStyle:{overflow:"hidden","white-space":"nowrap"},domProps:{innerHTML:e._s(e.formatActionsDisplay(t.row.actions))}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-timer.433369-11"),align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-switch",{attrs:{"active-value":0,"inactive-value":1},on:{change:function(i){return e.handleStatusChange(t.row)}},model:{value:t.row.status,callback:function(i){e.$set(t.row,"status",i)},expression:"scope.row.status"}})]}}])}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center",width:"280"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:query"],expression:"['iot:device:timer:query']"}],attrs:{size:"small",type:"text",icon:"el-icon-view"},on:{click:function(i){return e.handleUpdate(t.row)}}},[e._v(e._s(e.$t("device.device-timer.433369-14")))]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:query"],expression:"['iot:device:timer:query']"}],attrs:{size:"small",type:"text",icon:"el-icon-caret-right"},on:{click:function(i){return e.handleView(t.row)}}},[e._v(e._s(e.$t("device.device-timer.433369-15")))]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:remove"],expression:"['iot:device:timer:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(i){return e.handleDelete(t.row)}}},[e._v(e._s(e.$t("device.device-timer.433369-16")))]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:execute"],expression:"['iot:device:timer:execute']"}],attrs:{size:"small",type:"text",icon:"el-icon-caret-right"},on:{click:function(i){return e.handleRun(t.row)}}},[e._v(e._s(e.$t("device.device-timer.433369-17")))])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),i("el-dialog",{staticClass:"device-timer-config-dialog",attrs:{title:e.title,visible:e.open,width:"800px","append-to-body":"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-0"),prop:"jobName"}},[i("el-input",{staticStyle:{width:"280px"},attrs:{placeholder:e.$t("device.device-timer.433369-1")},model:{value:e.form.jobName,callback:function(t){e.$set(e.form,"jobName",t)},expression:"form.jobName"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-18"),prop:"timerTimeValue"}},[i("el-time-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"HH:mm",format:"HH:mm",placeholder:e.$t("device.device-timer.433369-19"),disabled:1==e.form.isAdvance},on:{change:e.timeChange},model:{value:e.timerTimeValue,callback:function(t){e.timerTimeValue=t},expression:"timerTimeValue"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-20"),prop:"timerWeek"}},[i("el-row",[i("el-col",{attrs:{span:18}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("device.device-timer.433369-21"),multiple:"",disabled:1==e.form.isAdvance},on:{change:e.weekChange},model:{value:e.timerWeekValue,callback:function(t){e.timerWeekValue=t},expression:"timerWeekValue"}},e._l(e.timerWeeks,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-22"),prop:"cron"}},[i("el-row",[i("el-col",{attrs:{span:18}},[i("el-input",{attrs:{placeholder:e.$t("device.device-timer.433369-23"),disabled:0==e.form.isAdvance},model:{value:e.form.cronExpression,callback:function(t){e.$set(e.form,"cronExpression",t)},expression:"form.cronExpression"}},[i("template",{slot:"append"},[i("el-button",{attrs:{type:"primary",disabled:0==e.form.isAdvance},on:{click:e.handleShowCron}},[e._v(" "+e._s(e.$t("device.device-timer.433369-24"))+" "),i("i",{staticClass:"el-icon-time el-icon--right"})])],1)],2)],1),i("el-col",{attrs:{span:4,offset:1}},[i("el-checkbox",{attrs:{"true-label":1,"false-label":0},on:{change:e.customerCronChange},model:{value:e.form.isAdvance,callback:function(t){e.$set(e.form,"isAdvance",t)},expression:"form.isAdvance"}},[e._v(e._s(e.$t("device.device-timer.433369-25")))])],1)],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-2"),prop:"status"}},[i("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.dict.type.sys_job_status,(function(t){return i("el-radio",{key:t.value,attrs:{label:Number(t.value)}},[e._v(e._s(t.label))])})),1)],1),i("div",{staticStyle:{height:"1px","background-color":"#ddd",margin:"0 0 20px 0"}}),i("el-form-item",{staticClass:"action-wrap",attrs:{label:e.$t("device.device-timer.433369-26"),prop:"actions"}},[e._l(e.actionList,(function(t,a){return i("div",{key:a+"action",staticClass:"item-wrap"},[i("el-row",{attrs:{gutter:16}},[i("el-col",{attrs:{span:5}},[i("el-select",{attrs:{placeholder:e.$t("device.device-timer.433369-27"),size:"small"},on:{change:function(t){return e.handleActionTypeChange(t,a)}},model:{value:t.type,callback:function(i){e.$set(t,"type",i)},expression:"actionItem.type"}},e._l(e.modelTypes,(function(e,t){return i("el-option",{key:t+"type",attrs:{label:e.label,value:e.value}})})),1)],1),i("el-col",{attrs:{span:10}},[1==t.type?i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("device.device-timer.433369-28"),size:"small"},on:{change:function(t){return e.handleActionParentModelChange(t,a)}},model:{value:t.parentId,callback:function(i){e.$set(t,"parentId",i)},expression:"actionItem.parentId"}},e._l(e.thingsModel.properties,(function(e,t){return i("el-option",{key:t+"property",attrs:{label:e.name,value:e.id}})})),1):2==t.type?i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("device.device-timer.433369-28"),size:"small"},on:{change:function(t){return e.handleActionParentModelChange(t,a)}},model:{value:t.parentId,callback:function(i){e.$set(t,"parentId",i)},expression:"actionItem.parentId"}},e._l(e.thingsModel.functions,(function(e,t){return i("el-option",{key:t+"func",attrs:{label:e.name,value:e.id}})})),1):e._e()],1),i("div",{staticClass:"delete-wrap"},[0!==a?i("el-button",{staticStyle:{padding:"5px"},attrs:{size:"small",plain:"",type:"danger",icon:"el-icon-delete"},on:{click:function(t){return e.handleRemoveActionItem(a)}}},[e._v(" "+e._s(e.$t("device.device-timer.433369-16"))+" ")]):e._e()],1)],1),i("el-row",{attrs:{gutter:16}},[t.parentModel&&"array"===t.parentModel.datatype.type?i("el-col",{attrs:{span:5}},[i("el-select",{attrs:{placeholder:e.$t("device.device-timer.433369-21"),size:"small"},on:{change:function(t){return e.handleActionIndexChange(t,a)}},model:{value:t.arrayIndex,callback:function(i){e.$set(t,"arrayIndex",i)},expression:"actionItem.arrayIndex"}},e._l(t.parentModel.datatype.arrayModel,(function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),t.parentModel&&"array"===t.parentModel.datatype.type&&"object"===t.parentModel.datatype.arrayType?i("el-col",{attrs:{span:5}},[i("el-select",{attrs:{placeholder:e.$t("device.device-timer.433369-21"),size:"small"},on:{change:function(t){return e.handleActionModelChange(t,a)}},model:{value:t.id,callback:function(i){e.$set(t,"id",i)},expression:"actionItem.id"}},e._l(t.parentModel.datatype.params,(function(e,t){return i("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),t.parentModel&&"object"===t.parentModel.datatype.type?i("el-col",{attrs:{span:5}},[i("el-select",{attrs:{placeholder:e.$t("device.device-timer.433369-21"),size:"small"},on:{change:function(t){return e.handleActionModelChange(t,a)}},model:{value:t.id,callback:function(i){e.$set(t,"id",i)},expression:"actionItem.id"}},e._l(t.parentModel.datatype.params,(function(e,t){return i("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1):e._e(),t.model?i("el-col",{attrs:{span:10}},["integer"==t.model.datatype.type||"decimal"==t.model.datatype.type?i("div",[i("el-input",{staticStyle:{"vertical-align":"baseline"},attrs:{placeholder:e.$t("device.device-timer.433369-29"),max:t.model.datatype.max,min:t.model.datatype.min,type:"number",size:"small"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"actionItem.value"}},[i("template",{slot:"append"},[e._v(e._s(t.model.datatype.unit))])],2)],1):"bool"==t.model.datatype.type?i("div",[i("el-switch",{staticStyle:{"vertical-align":"baseline"},attrs:{"active-text":t.model.datatype.trueText,"inactive-text":t.model.datatype.falseText,"active-value":1,"inactive-value":0},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"actionItem.value"}})],1):"enum"==t.model.datatype.type?i("div",[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("device.device-timer.433369-21"),size:"small"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"actionItem.value"}},e._l(t.model.datatype.enumList,(function(e,t){return i("el-option",{key:t+"things",attrs:{label:e.text,value:e.value}})})),1)],1):"string"==t.model.datatype.type?i("div",[i("el-input",{attrs:{placeholder:e.$t("device.device-timer.433369-30"),max:t.model.datatype.maxLength,size:"small"},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"actionItem.value"}})],1):e._e()]):e._e()],1)],1)})),i("div",[e._v(" + "),i("a",{staticStyle:{color:"#486ff2"},on:{click:function(t){return e.handleAddActionItem()}}},[e._v(e._s(e.$t("device.device-timer.433369-31")))])])],2)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:add"],expression:"['iot:device:timer:add']"},{name:"show",rawName:"v-show",value:!e.form.jobId,expression:"!form.jobId"}],attrs:{type:"primary",loading:e.submitButtonLoading},on:{click:e.handleSubmitForm}},[e._v(e._s(e.$t("device.device-timer.433369-32")))]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:timer:edit"],expression:"['iot:device:timer:edit']"},{name:"show",rawName:"v-show",value:e.form.jobId,expression:"form.jobId"}],attrs:{type:"primary",loading:e.submitButtonLoading},on:{click:e.handleSubmitForm}},[e._v(e._s(e.$t("device.device-timer.433369-33")))]),i("el-button",{on:{click:e.handleCancel}},[e._v(e._s(e.$t("cancel")))])],1)],1),i("el-dialog",{staticClass:"scrollbar",attrs:{title:e.$t("device.device-timer.433369-35"),visible:e.openCron,"append-to-body":"","destroy-on-close":""},on:{"update:visible":function(t){e.openCron=t}}},[i("crontab",{staticStyle:{"padding-bottom":"80px"},attrs:{expression:e.expression},on:{hide:function(t){e.openCron=!1},fill:e.crontabFill}})],1),i("el-dialog",{attrs:{title:e.$t("device.device-timer.433369-15"),visible:e.openView,width:"700px","append-to-body":""},on:{"update:visible":function(t){e.openView=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,"label-width":"120px",size:"mini"}},[i("el-row",[i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-36")}},[e._v(e._s(e.form.jobId))]),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-37")}},[e._v(e._s(e.form.jobName))])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-38")}},[e._v(e._s(e.jobGroupFormat(e.form)))]),i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-39")}},[e._v(e._s(e.form.createTime))])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-40")}},[0==e.form.concurrent?i("div",[e._v(e._s(e.$t("device.device-timer.433369-41")))]):1==e.form.concurrent?i("div",[e._v(e._s(e.$t("device.device-timer.433369-42")))]):e._e()])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-43")}},[e._v(e._s(e.form.cronExpression))])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-44")}},[0==e.form.misfirePolicy?i("div",[e._v(e._s(e.$t("device.device-timer.433369-45")))]):1==e.form.misfirePolicy?i("div",[e._v(e._s(e.$t("device.device-timer.433369-46")))]):2==e.form.misfirePolicy?i("div",[e._v(e._s(e.$t("device.device-timer.433369-17")))]):3==e.form.misfirePolicy?i("div",[e._v(e._s(e.$t("device.device-timer.433369-47")))]):e._e()])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-48")}},[e._v(e._s(e.parseTime(e.form.nextValidTime)))])],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-49")}},[0==e.form.status?i("div",[e._v(e._s(e.$t("device.device-timer.433369-50")))]):1==e.form.status?i("div",[e._v(e._s(e.$t("device.device-timer.433369-51")))]):e._e()])],1),i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:e.$t("device.device-timer.433369-52")}},[i("div",{staticStyle:{border:"1px solid #ddd",padding:"10px","border-radius":"5px",width:"465px"},domProps:{innerHTML:e._s(e.formatActionsDisplay(e.form.actions))}})])],1)],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.openView=!1}}},[e._v(e._s(e.$t("device.device-timer.433369-53")))])],1)],1)],1)},r=[],n=i("5530"),s=(i("99af"),i("4de4"),i("7db0"),i("d81d"),i("14d9"),i("fb6a"),i("4e82"),i("a434"),i("b0c0"),i("e9c4"),i("a9e3"),i("b64b"),i("d3b7"),i("b775"));function o(e){return Object(s["a"])({url:"/iot/job/list",method:"get",params:e})}function l(e){return Object(s["a"])({url:"/iot/job/"+e,method:"get"})}function c(e){return Object(s["a"])({url:"/iot/job",method:"post",data:e})}function d(e){return Object(s["a"])({url:"/iot/job",method:"put",data:e})}function u(e){return Object(s["a"])({url:"/iot/job/"+e,method:"delete"})}function p(e,t){var i={jobId:e,status:t};return Object(s["a"])({url:"/iot/job/changeStatus",method:"put",data:i})}function h(e,t){var i={jobId:e,jobGroup:t};return Object(s["a"])({url:"/iot/job/run",method:"put",data:i})}var f=i("bdd0"),m={components:{Crontab:f["a"]},name:"device-timer",dicts:["sys_job_group","sys_job_status"],props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.initThingsModel()}},data:function(){return{deviceInfo:{},actionList:[],thingsModel:{},loading:!1,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,jobList:[],timerWeeks:[{value:1,label:"周一"},{value:2,label:"周二"},{value:3,label:"周三"},{value:4,label:"周四"},{value:5,label:"周五"},{value:6,label:"周六"},{value:7,label:"周日"}],timerWeekValue:[],timerTimeValue:"",title:"",open:!1,openView:!1,openCron:!1,expression:"",submitButtonLoading:!1,queryParams:{pageNum:1,pageSize:10,deviceId:0,jobName:void 0,jobGroup:void 0,status:void 0},modelTypes:[{value:1,label:this.$t("device.device-timer.433369-61")},{value:2,label:this.$t("device.device-timer.433369-62")}],form:{},rules:{jobName:[{required:!0,message:this.$t("device.device-timer.433369-63"),trigger:"blur"}]}}},created:function(){this.getList(),this.deviceInfo=this.device,this.initThingsModel()},methods:{initThingsModel:function(){this.deviceInfo&&0!==this.deviceInfo.deviceId&&(this.thingsModel=this.formatArrayIndex(this.deviceInfo.cacheThingsModel),this.thingsModel.properties&&0!==this.thingsModel.properties.length&&(this.thingsModel.properties=this.thingsModel.properties.filter((function(e){return e.datatype.params&&0!==e.datatype.params.length&&(e.datatype.params=e.datatype.params.filter((function(e){return 0==e.isMonitor&&0==e.isReadonly}))),0==e.isMonitor&&0==e.isReadonly}))),this.thingsModel.functions&&0!==this.thingsModel.functions.length&&(this.thingsModel.functions=this.thingsModel.functions.filter((function(e){return e.datatype.params&&0!==e.datatype.params.length&&(e.datatype.params=e.datatype.params.filter((function(e){return 0==e.isMonitor&&0==e.isReadonly}))),0==e.isMonitor&&0==e.isReadonly}))),this.queryParams.deviceId=this.deviceInfo.deviceId)},getList:function(){var e=this;this.loading=!0,o(this.queryParams).then((function(t){e.jobList=t.rows,e.total=t.total,e.loading=!1}))},jobGroupFormat:function(e,t){return this.selectDictLabel(this.dict.type.sys_job_group,e.jobGroup)},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.jobId})),this.single=1!=e.length,this.multiple=!e.length},handleStatusChange:function(e){var t=this,i=0===e.status?this.$t("device.device-timer.433369-12"):this.$t("device.device-timer.433369-64");this.$modal.confirm(this.$t("device.device-timer.433369-65",[i+'""'+e.jobName])).then((function(){return p(e.jobId,e.status)})).then((function(){t.$modal.msgSuccess(i+t.$t("device.device-timer.433369-67"))})).catch((function(){e.status=0===e.status?1:0}))},handleRun:function(e){var t=this;this.$modal.confirm(this.$t("device.device-timer.433369-68",[e.jobName])).then((function(){return h(e.jobId,e.jobGroup)})).then((function(){t.$modal.msgSuccess(t.$t("device.device-timer.433369-69"))})).catch((function(){}))},handleView:function(e){var t=this;l(e.jobId).then((function(e){t.form=e.data,t.openView=!0}))},handleShowCron:function(){this.expression=this.form.cronExpression,this.openCron=!0},crontabFill:function(e){this.form.cronExpression=e},handleAdd:function(){this.reset(),this.open=!0,this.title=this.$t("device.device-timer.433369-70")},handleCancel:function(){this.open=!1,this.reset()},reset:function(){this.form={jobId:void 0,jobName:void 0,cronExpression:void 0,status:0,jobGroup:"DEFAULT",misfirePolicy:2,concurrent:1,isAdvance:0,jobType:1,productId:0,productName:"",sceneId:0,alertId:0,actions:""},this.submitButtonLoading=!1,this.timerWeekValue=[1,2,3,4,5,6,7],this.timerTimeValue="",this.actionList=[{id:"",name:"",value:"",valueName:"",type:1,parentId:"",parentName:"",arrayIndex:"",arrayIndexName:"",model:null}],this.resetForm("form")},handleUpdate:function(e){var t=this;this.reset();var i=e.jobId||this.ids;l(i).then((function(e){t.form=e.data,t.actionList=JSON.parse(t.form.actions);for(var i=0;i<t.actionList.length;i++)1==t.actionList[i].type?t.setParentAndModelData(t.actionList[i],t.thingsModel.properties):2==t.actionList[i].type&&t.setParentAndModelData(t.actionList[i],t.thingsModel.functions);if(0==t.form.isAdvance){var a=t.form.cronExpression.substring(12).split(",").map(Number);t.timerWeekValue=a.map((function(e){return 1===e?7:e-1})),t.timerTimeValue=t.form.cronExpression.substring(5,7)+":"+t.form.cronExpression.substring(2,4)}t.open=!0,t.title=t.$t("device.device-timer.433369-71")}))},setParentAndModelData:function(e,t){for(var i=0;i<t.length;i++)if(e.parentId==t[i].id){if(e.parentModel=t[i],"object"===e.parentModel.datatype.type)for(var a=0;a<e.parentModel.datatype.params.length;a++)e.id==e.parentModel.datatype.params[a].id&&(e.model=e.parentModel.datatype.params[a]);else if("object"===e.parentModel.datatype.arrayType&&"array"===e.parentModel.datatype.type){-1!=e.id.indexOf("array_")&&(e.id=e.id.substring(9));for(var r=0;r<e.parentModel.datatype.params.length;r++)e.id==e.parentModel.datatype.params[r].id&&(e.model=e.parentModel.datatype.params[r])}else"object"!==e.parentModel.datatype.arrayType&&"array"===e.parentModel.datatype.type?(-1!=e.id.indexOf("array_")&&(e.id=e.id.substring(9)),e.model={datatype:{type:e.parentModel.datatype.arrayType,maxLength:-1,min:-1,max:-1,unit:this.$t("device.device-timer.433369-72")}}):e.model=e.parentModel;break}},handleDelete:function(e){var t=this,i=e.jobId||this.ids;this.$modal.confirm(this.$t("device.device-timer.433369-73",[i])).then((function(){return u(i)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("device.device-timer.433369-75"))})).catch((function(){}))},handleExport:function(){this.download("iot/job/export",Object(n["a"])({},this.queryParams),"job_".concat((new Date).getTime(),".xlsx"))},weekChange:function(e){this.gentCronExpression()},timeChange:function(e){this.gentCronExpression()},customerCronChange:function(e){0==e&&this.gentCronExpression()},gentCronExpression:function(){var e="00",t="00";null!=this.timerTimeValue&&""!=this.timerTimeValue&&(e=this.timerTimeValue.substring(0,2),t=this.timerTimeValue.substring(3));var i="*";if(this.timerWeekValue.length>0){for(var a=this.timerWeekValue.slice().sort(),r=0;r<a.length;r++)7==a[r]?a[r]=1:a[r]=a[r]+1;console.log(a),i=a}this.form.cronExpression="0 "+t+" "+e+" ? * "+i},formatCronDisplay:function(e){var t="";if(0==e.isAdvance){var i='<br /><span style="color:#F56C6C">时间 '+e.cronExpression.substring(5,7)+":"+e.cronExpression.substring(2,4)+"</span>",a=e.cronExpression.substring(12);if("1,2,3,4,5,6,7"==a)t="每天 "+i;else{for(var r=a.split(","),n=0;n<r.length;n++)"2"==r[n]?t+=this.$t("device.device-timer.433369-78"):"3"==r[n]?t+=this.$t("device.device-timer.433369-79"):"4"==r[n]?t+=this.$t("device.device-timer.433369-80"):"5"==r[n]?t+=this.$t("device.device-timer.433369-81"):"6"==r[n]?t+=this.$t("device.device-timer.433369-82"):"7"==r[n]?t+=this.$t("device.device-timer.433369-83"):"1"==r[n]&&(t+=this.$t("device.device-timer.433369-84"));t=t.substring(0,t.length-1)+" "+i}}else t=this.$t("device.device-timer.433369-85");return t},formatActionsDisplay:function(e){if(null!=e&&""!=e){for(var t=JSON.parse(e),i="",a=0;a<t.length;a++)t[a].arrayIndexName?i+="".concat(t[a].parentName," >> ").concat(t[a].arrayIndexName," >> ").concat(t[a].name,' <span style="color:#F56C6C"> ').concat(t[a].valueName?t[a].valueName:t[a].value,"</span><br />"):t[a].parentName!==t[a].name?i+="".concat(t[a].parentName," >> ").concat(t[a].name,' <span style="color:#F56C6C">').concat(t[a].valueName?t[a].valueName:t[a].value,"</span><br />"):i+="".concat(t[a].name,' <span style="color:#F56C6C">').concat(t[a].valueName?t[a].valueName:t[a].value,"</span><br />");return""==i?this.$t("device.device-timer.433369-86"):i}},formatArrayIndex:function(e){var t=Object(n["a"])({},e);for(var i in t)t[i]=t[i].map((function(e){if("array"===e.datatype.type){for(var t=[],i=0;i<e.datatype.arrayCount;i++){var a=i>9?String(i):"0"+i;e.datatype.arrayType,t.push({id:a,name:e.name+" "+(i+1)})}e.datatype.arrayModel=t}return e}));return t},handleAddActionItem:function(){this.actionList.push({id:"",name:"",value:"",valueName:"",type:1,parentId:"",parentName:"",arrayIndex:"",arrayIndexName:"",model:null})},handleRemoveActionItem:function(e){this.actionList.splice(e,1)},handleActionTypeChange:function(e,t){this.actionList[t].id="",this.actionList[t].name="",this.actionList[t].value="",this.actionList[t].valueName="",this.actionList[t].parentId="",this.actionList[t].parentName="",this.actionList[t].arrayIndex="",this.actionList[t].arrayIndexName="",this.actionList[t].parentModel=null,this.actionList[t].model=null},handleActionIndexChange:function(e,t){this.actionList[t].arrayIndexName=this.actionList[t].parentModel.datatype.arrayModel.find((function(t){return t.id==e})).name,this.actionList[t].value="","object"===this.actionList[t].parentModel.datatype.arrayType&&(this.actionList[t].id="",this.actionList[t].name="")},handleActionParentModelChange:function(e,t){this.actionList[t].model=null,this.actionList[t].value="",this.actionList[t].arrayIndex="",this.actionList[t].arrayIndexName="";var i=[];1==this.actionList[t].type?i=this.thingsModel.properties:2==this.actionList[t].type&&(i=this.thingsModel.functions);for(var a=0;a<i.length;a++)if(i[a].id==e){this.actionList[t].parentName=i[a].name,this.actionList[t].parentModel=i[a],"object"===i[a].datatype.type||"array"===i[a].datatype.type&&"object"===i[a].datatype.arrayType?(this.actionList[t].id="",this.actionList[t].name=""):"array"===i[a].datatype.type&&"object"!==i[a].datatype.arrayType?(this.actionList[t].id=i[a].id,this.actionList[t].name=i[a].name,this.actionList[t].model={datatype:{type:i[a].datatype.arrayType,maxLength:-1,min:-1,max:-1,unit:this.$t("device.device-timer.433369-72")}}):(this.actionList[t].id=i[a].id,this.actionList[t].name=i[a].name,this.actionList[t].model=i[a]);break}},handleActionModelChange:function(e,t){this.actionList[t].value="";var i=null;"array"!==this.actionList[t].parentModel.datatype.type&&"object"!==this.actionList[t].parentModel.datatype.type||(i=this.actionList[t].parentModel.datatype.params.find((function(t){return t.id==e})),this.actionList[t].name=i.name,this.actionList[t].model=i)},handleSubmitForm:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var i=[];if(0==e.form.isAdvance){if(""==e.timerTimeValue||null==e.timerTimeValue)return void e.$modal.alertError(e.$t("device.device-timer.433369-87"));if(null==e.timerWeekValue||""==e.timerWeekValue)return void e.$modal.alertError(e.$t("device.device-timer.433369-88"))}else if(1==e.form.isAdvance&&""==e.form.cronExpression)return void e.$modal.alertError(e.$t("device.device-timer.433369-89"));for(var a,r=function(){if(""===e.actionList[n].value)return e.$modal.alertError(e.$t("device.device-timer.433369-90")),{v:void 0};var t=e.actionList[n];""!=t.arrayIndex?(t.arrayIndex,t.id):t.id;var a="";a="bool"===t.model.datatype.type?1===t.value?t.model.datatype.trueText:t.model.datatype.falseText:"enum"===t.model.datatype.type?t.model.datatype.enumList.find((function(e){return e.value===t.value})).text:"",i[n]={type:t.type,id:t.id,name:t.name,value:t.value,valueName:a,parentId:t.parentId,parentName:t.parentName,arrayIndex:t.arrayIndex,arrayIndexName:t.arrayIndexName,deviceId:e.deviceInfo.deviceId,deviceName:e.deviceInfo.deviceName}},n=0;n<e.actionList.length;n++)if(a=r(),a)return a.v;e.form.actions=JSON.stringify(i),e.form.deviceId=e.deviceInfo.deviceId,e.form.deviceName=e.deviceInfo.deviceName,e.form.serialNumber=e.deviceInfo.serialNumber,e.form.productId=e.deviceInfo.productId,e.form.productName=e.deviceInfo.productName,e.form.protocolCode=e.deviceInfo.protocolCode,e.submitButtonLoading=!0,void 0!=e.form.jobId?d(e.form).then((function(){e.$modal.msgSuccess(e.$t("device.device-timer.433369-91")),e.submitButtonLoading=!1,e.open=!1,e.getList()})):c(e.form).then((function(){e.$modal.msgSuccess(e.$t("device.device-timer.433369-92")),e.submitButtonLoading=!1,e.open=!1,e.getList()}))}}))}}},v=m,g=(i("1a6c"),i("2877")),y=Object(g["a"])(v,a,r,!1,null,"7e84fff5",null);t["default"]=y.exports},"7bce":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{prop:"alertName"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-alert.309509-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.alertName,callback:function(t){e.$set(e.queryParams,"alertName",t)},expression:"queryParams.alertName"}})],1),i("el-form-item",{attrs:{prop:"alertLevel"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-alert.309509-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.alertLevel,callback:function(t){e.$set(e.queryParams,"alertLevel",t)},expression:"queryParams.alertLevel"}},e._l(e.dict.type.iot_alert_level,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{prop:"status"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-alert.309509-5"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.dict.type.iot_process_status,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.device-alert.309509-6")))]),i("el-button",{attrs:{icon:"el-icon-refresh"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.device-alert.309509-7")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.alertLogList,border:!1},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-0"),align:"left",prop:"alertName","min-width":"160"}}),i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-2"),align:"center",prop:"alertLevel","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_alert_level,value:t.row.alertLevel}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-8"),align:"left",prop:"createBy","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-9"),align:"center",prop:"createTime",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d} {h}:{i}:{s}")))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-10"),align:"left",prop:"detail","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{domProps:{innerHTML:e._s(e.formatDetail(t.row.detail))}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-alert.309509-11"),align:"center",prop:"status","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_process_status,value:t.row.status}})]}}])}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("device.device-alert.309509-12"),align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:alertLog:edit"],expression:"['iot:alertLog:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(i){return e.handleUpdate(t.row)}}},[e._v(e._s(e.$t("device.device-alert.309509-13")))])]}}])})],1),i("div",{staticStyle:{height:"60px"}},[i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}})],1),i("el-dialog",{attrs:{title:e.title,visible:e.open,width:"550px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("device.device-alert.309509-14"),prop:"remark"}},[i("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",placeholder:e.$t("device.device-alert.309509-15"),autosize:{minRows:4,maxRows:6}},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("device.device-alert.309509-16")))]),i("el-button",{on:{click:e.cancel}},[e._v(e._s(e.$t("device.device-alert.309509-17")))])],1)],1)],1)},r=[],n=(i("d81d"),i("b64b"),i("3b72")),s={name:"DeviceAlertLog",dicts:["iot_alert_level","iot_process_status"],props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.getList())}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,alertLogList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,alertName:null,alertLevel:null,status:null,productId:null,productName:null,serialNumber:null,deviceName:null},form:{},rules:{remark:[{required:!0,message:this.$t("device.device-alert.309509-18"),trigger:"blur"}]}}},created:function(){this.queryParams.serialNumber=this.device.serialNumber,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(n["d"])(this.queryParams).then((function(t){e.alertLogList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={alertLogId:null,alertName:null,alertLevel:null,status:null,productId:null,productName:null,deviceId:null,deviceName:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.alertLogId})),this.single=1!==e.length,this.multiple=!e.length},handleUpdate:function(e){var t=this;this.reset();var i=e.alertLogId||this.ids;Object(n["c"])(i).then((function(e){t.form=e.data,t.open=!0,t.title=t.$t("device.device-alert.309509-19")}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.alertLogId?Object(n["e"])(e.form).then((function(t){e.$modal.msgSuccess(e.$t("device.device-alert.309509-20")),e.open=!1,e.getList()})):Object(n["a"])(e.form).then((function(t){e.$modal.msgSuccess(e.$t("device.device-alert.309509-21")),e.open=!1,e.getList()})))}))},formatDetail:function(e){if(null!=e&&""!=e){var t=JSON.parse(e),i='id<span style="color:#F56C6C">'+t.id+"</span><br />";return i=i+'value<span style="color:#F56C6C">'+t.value+"</span><br />",i=i+'remark<span style="color:#F56C6C">'+t.remark+"</span>",i}}}},o=s,l=i("2877"),c=Object(l["a"])(o,a,r,!1,null,null,null);t["default"]=c.exports},"7c37":function(e,t,i){var a=i("605d");e.exports=function(e){try{if(a)return Function('return require("'+e+'")')()}catch(t){}}},8076:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"player-webrtc"},[i("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:10}},[i("el-col",{attrs:{span:1.5}},[i("el-select",{attrs:{placeholder:e.$t("views.components.player.webrtc.08878-1"),clearable:""},on:{change:function(t){return e.changeChannel()}},model:{value:e.channelId,callback:function(t){e.channelId=t},expression:"channelId"}},e._l(e.channelList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),i("div",{staticClass:"trank-wrap"},[i("el-button",{staticClass:"btn",attrs:{type:e.getBroadcastStatus(),disabled:-2===e.broadcastStatus||""===e.channelId,circle:"",icon:"el-icon-microphone"},on:{click:function(t){return e.broadcastStatusClick()}}}),i("div",{staticClass:"title-wrap"},[-2===e.broadcastStatus?i("span",[e._v(e._s(e.$t("views.components.player.webrtc.08878-2")))]):e._e(),-1===e.broadcastStatus?i("span",[e._v(e._s(e.$t("views.components.player.webrtc.08878-3")))]):e._e(),0===e.broadcastStatus?i("span",[e._v(e._s(e.$t("views.components.player.webrtc.08878-4")))]):e._e(),1===e.broadcastStatus?i("span",[e._v(e._s(e.$t("views.components.player.webrtc.08878-5")))]):e._e()])],1)],1)},r=[],n=(i("caad"),i("d81d"),i("2532"),i("e2de")),s={name:"webrtc",components:{},props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo.channelId&&(this.channelId=this.deviceInfo.channelId),this.deviceInfo&&0!==this.deviceInfo.deviceId&&(this.queryParams.deviceSipId=this.deviceInfo.serialNumber,this.deviceId=this.device.serialNumber)}},data:function(){return{deviceInfo:null,deviceId:"",channelId:"",broadcastMode:!0,broadcastRtc:null,broadcastStatus:-1,channelList:[],queryParams:{pageNum:1,pageSize:10,deviceSipId:null,channelSipId:null}}},created:function(){this.queryParams.deviceSipId=this.device.serialNumber,this.deviceId=this.device.serialNumber,this.getList()},destroyed:function(){},methods:{getList:function(){var e=this;Object(n["g"])(this.queryParams).then((function(t){e.channelList=t.rows.map((function(e){return{value:e.channelSipId,label:e.channelName}})),console.log(e.channelList)}))},changeChannel:function(){},getBroadcastStatus:function(){return-2==this.broadcastStatus||-1==this.broadcastStatus?"primary":0==this.broadcastStatus?"warning":1==this.broadcastStatus?"danger":void 0},broadcastStatusClick:function(){var e=this;-1==this.broadcastStatus?(this.broadcastStatus=0,Object(n["f"])(this.deviceId,this.channelId).then((function(t){if(console.log(t),200===t.code){var i=t.data;document.location.protocol.includes("https")?e.startwebrtc(i.rtcs):e.startwebrtc(i.rtc)}else e.$message({showClose:!0,message:t.msg,type:"error"})}))):1===this.broadcastStatus&&(this.broadcastStatus=-1,this.broadcastRtc.close())},startwebrtc:function(e){var t=this;this.broadcastRtc=new ZLMRTCClient.Endpoint({debug:!0,zlmsdpUrl:e,simulecast:!1,useCamera:!1,audioEnable:!0,videoEnable:!1,recvOnly:!1}),this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_NOT_SUPPORT,(function(e){console.error("不支持webrtc",e),t.$message({showClose:!0,message:t.$t("views.components.player.webrtc.08878-6"),type:"error"}),t.broadcastStatus=-1})),this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ICE_CANDIDATE_ERROR,(function(e){console.error("ICE 协商出错"),t.$message({showClose:!0,message:t.$t("views.components.player.webrtc.08878-7"),type:"error"}),t.broadcastStatus=-1})),this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_OFFER_ANWSER_EXCHANGE_FAILED,(function(e){console.error("offer anwser 交换失败",e),t.$message({showClose:!0,message:t.$t("views.components.player.webrtc.08878-8")+e,type:"error"}),t.broadcastStatus=-1})),this.broadcastRtc.on(ZLMRTCClient.Events.WEBRTC_ON_CONNECTION_STATE_CHANGE,(function(e){console.log("状态改变",e),"connecting"===e?t.broadcastStatus=0:"connected"===e?(t.broadcastStatus=1,Object(n["j"])(t.deviceId,t.channelId).then((function(e){200===e.code&&console.log("开始推流!")}))):"disconnected"===e&&(t.broadcastStatus=-1)})),this.broadcastRtc.on(ZLMRTCClient.Events.CAPTURE_STREAM_FAILED,(function(e){console.log("捕获流失败",e),t.$message({showClose:!0,message:t.$t("views.components.player.webrtc.08878-9")+e,type:"error"}),t.broadcastStatus=-1}))},stopBroadcast:function(){var e=this;this.broadcastRtc.close(),this.broadcastStatus=-1,Object(n["l"])(this.deviceId,this.channelId).then((function(t){200==t.code?(e.broadcastStatus=-1,e.broadcastRtc.close()):e.$message({showClose:!0,message:t.msg,type:"error"})}))}}},o=s,l=(i("3c52"),i("2877")),c=Object(l["a"])(o,a,r,!1,null,"d3a31448",null);t["default"]=c.exports},"814a":function(e,t,i){"use strict";i.d(t,"e",(function(){return r})),i.d(t,"f",(function(){return n})),i.d(t,"d",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return l})),i.d(t,"g",(function(){return c})),i.d(t,"b",(function(){return d}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/firmware/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/firmware/upGradeVersionList",method:"get",params:e})}function s(e,t){return Object(a["a"])({url:"/iot/firmware/getLatest?deviceId="+e+"&firmwareType="+t,method:"get"})}function o(e){return Object(a["a"])({url:"/iot/firmware/"+e,method:"get"})}function l(e){return Object(a["a"])({url:"/iot/firmware",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/iot/firmware",method:"put",data:e})}function d(e){return Object(a["a"])({url:"/iot/firmware/"+e,method:"delete"})}},"81b2":function(e,t,i){var a=i("23e7"),r=i("d066"),n=i("e330"),s=i("d039"),o=i("577e"),l=i("1a2d"),c=i("d6d6"),d=i("b917").ctoi,u=/[^\d+/a-z]/i,p=/[\t\n\f\r ]+/g,h=/[=]+$/,f=r("atob"),m=String.fromCharCode,v=n("".charAt),g=n("".replace),y=n(u.exec),b=s((function(){return""!==f(" ")})),w=!s((function(){f("a")})),_=!b&&!w&&!s((function(){f()})),x=!b&&!w&&1!==f.length;a({global:!0,enumerable:!0,forced:b||w||_||x},{atob:function(e){if(c(arguments.length,1),_||x)return f(e);var t,i,a=g(o(e),p,""),n="",s=0,b=0;if(a.length%4==0&&(a=g(a,h,"")),a.length%4==1||y(u,a))throw new(r("DOMException"))("The string is not correctly encoded","InvalidCharacterError");while(t=v(a,s++))l(d,t)&&(i=b%4?64*i+d[t]:d[t],b++%4&&(n+=m(255&i>>(-2*b&6))));return n}})},"86d9":function(e,t,i){"use strict";i("f4ed")},"8a79":function(e,t,i){"use strict";var a=i("23e7"),r=i("e330"),n=i("06cf").f,s=i("50c4"),o=i("577e"),l=i("5a34"),c=i("1d80"),d=i("ab13"),u=i("c430"),p=r("".endsWith),h=r("".slice),f=Math.min,m=d("endsWith"),v=!u&&!m&&!!function(){var e=n(String.prototype,"endsWith");return e&&!e.writable}();a({target:"String",proto:!0,forced:!v&&!m},{endsWith:function(e){var t=o(c(this));l(e);var i=arguments.length>1?arguments[1]:void 0,a=t.length,r=void 0===i?a:f(s(i),a),n=o(e);return p?p(t,n,r):h(t,r-n.length,r)===n}})},"8bd4":function(e,t,i){var a=i("d066"),r=i("d44e"),n="DOMException";r(a(n),n)},"8e08":function(e,t,i){"use strict";i("1b86")},9377:function(e,t,i){},"93db":function(e,t,i){"use strict";i("9377")},9467:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:e.title,visible:e.open,width:"550px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"createForm",attrs:{model:e.createForm,"label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("sip.sipidGen.998538-0")}},[i("el-cascader",{staticStyle:{width:"350px"},attrs:{options:e.cityOptions,"change-on-select":""},on:{change:e.changeProvince},model:{value:e.createForm.city,callback:function(t){e.$set(e.createForm,"city",t)},expression:"createForm.city"}})],1),i("el-form-item",{attrs:{label:e.$t("sip.index.998533-9"),prop:"deviceType"}},[i("el-select",{staticStyle:{width:"350px"},attrs:{placeholder:e.$t("sip.index.998533-14")},model:{value:e.createForm.deviceType,callback:function(t){e.$set(e.createForm,"deviceType",t)},expression:"createForm.deviceType"}},e._l(e.dict.type.video_type,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("sip.index.998533-15"),prop:"channelType"}},[i("el-select",{staticStyle:{width:"350px"},attrs:{placeholder:e.$t("sip.index.998533-16")},model:{value:e.createForm.channelType,callback:function(t){e.$set(e.createForm,"channelType",t)},expression:"createForm.channelType"}},e._l(e.dict.type.channel_type,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("sip.index.998533-20"),prop:"createNum"}},[i("el-input-number",{staticStyle:{width:"350px"},attrs:{"controls-position":"right",placeholder:e.$t("sip.index.998533-19"),type:"number"},model:{value:e.createForm.createNum,callback:function(t){e.$set(e.createForm,"createNum",t)},expression:"createForm.createNum"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(e._s(e.$t("sip.index.998533-21")))]),i("el-button",{on:{click:e.closeDialog}},[e._v(e._s(e.$t("cancel")))])],1)],1)},r=[],n=i("ef6c"),s=i("e2de"),o={name:"SipidDialog",dicts:["video_type","channel_type"],props:{product:{type:Object,default:null}},data:function(){return{loading:!0,title:this.$t("sip.sipidGen.998538-1"),total:0,open:!1,createForm:{city:"",deviceType:"",channelType:"",createNum:1},cityOptions:n["regionData"],city:"",cityCode:""}},created:function(){},methods:{changeProvince:function(e){if(e&&null!=e[0]&&null!=e[1]&&null!=e[2]){var t=n["CodeToText"][e[0]]+"/"+n["CodeToText"][e[1]]+"/"+n["CodeToText"][e[2]];this.createForm.citycode=t}},submitForm:function(){var e=this;this.createForm.createNum<1?this.$modal.alertError(this.$t("sip.index.998533-42")):(this.createForm.productId=this.product.productId,this.createForm.productName=this.product.productName,this.createForm.tenantId=this.product.tenantId,this.createForm.tenantName=this.product.tenantName,this.createForm.deviceSipId=this.createForm.city[2]+"0000"+this.createForm.deviceType+"0",this.createForm.channelSipId=this.createForm.city[2]+"0000"+this.createForm.channelType+"0",""!==this.createForm.deviceType&&""!==this.createForm.channelType&&3===this.createForm.city.length?Object(s["a"])(this.createForm.createNum,this.createForm).then((function(t){if(200===t.code){var i=t.data;e.$emit("addGenEvent",i),e.$modal.msgSuccess(e.$t("sip.sipidGen.998538-2"))}e.open=!1})):this.$message({type:"error",message:this.$t("sip.sipidGen.998538-3")}))},closeDialog:function(){this.open=!1}}},l=o,c=i("2877"),d=Object(c["a"])(l,a,r,!1,null,"aa9c31e2",null);t["default"]=d.exports},9626:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"device-sub-container"},[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[i("el-form-item",[i("el-button",{attrs:{plain:"",type:"primary",icon:"el-icon-plus",size:"small"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("device.sub.083943-0")))])],1),i("el-form-item",[i("el-button",{attrs:{plain:"",type:"danger",icon:"el-icon-delete",size:"small",disabled:0==this.ids.length},on:{click:e.handleDelete}},[e._v(e._s(e.$t("device.sub.083943-1")))])],1),i("el-form-item",[i("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("refresh")))]),i("span",{staticStyle:{"font-size":"12px","margin-left":"10px"}},[e._v(e._s(e.$t("device.device-sub.299018-28")))])],1),e.isSet?e._e():i("el-form-item",{staticStyle:{float:"right"}},[i("el-button",{attrs:{plain:"",type:"primary",icon:"el-icon-edit",size:"small"},on:{click:e.setSubDeviceAddress}},[e._v(e._s(e.$t("device.sub.083943-2")))])],1),e.isSet?i("el-form-item",{staticStyle:{float:"right"}},[i("el-button",{attrs:{plain:"",type:"primary",icon:"el-icon-edit",size:"small"},on:{click:e.saveSetting}},[e._v(e._s(e.$t("save")))])],1):e._e(),e.isSet?i("el-form-item",{staticStyle:{float:"right"}},[i("el-button",{attrs:{plain:"",type:"info",icon:"el-icon-edit",size:"small"},on:{click:e.cancelSetting}},[e._v(e._s(e.$t("cancel")))])],1):e._e()],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.deviceList,border:!1},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-1"),align:"center",prop:"subDeviceName"}}),i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-7"),align:"center",prop:"subDeviceNo"}}),i("el-table-column",{attrs:{label:e.$t("device.sub.083943-3"),align:"center",prop:"slaveId",width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-input",{staticStyle:{width:"120px","text-align":"center"},attrs:{disabled:!e.isSet,size:"small",placeholder:e.$t("device.sub.083943-2")},model:{value:t.row.slaveId,callback:function(i){e.$set(t.row,"slaveId",i)},expression:"scope.row.slaveId"}})]}}])}),i("el-table-column",{attrs:{label:e.$t("creatTime"),align:"center",prop:"createTime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d}")))])]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),i("subDeviceList",{ref:"subDeviceList",attrs:{gateway:e.gateway},on:{addSuccess:e.addSuccess}})],1)},r=[],n=(i("d81d"),i("5b52")),s=i("ea2a"),o={name:"device-sub",props:{device:{type:Object,default:null}},components:{subDeviceList:s["default"]},dicts:["iot_device_status"],data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,deviceList:[],deviceInfo:{},title:"",open:!1,queryParams:{pageNum:1,pageSize:10},form:{},gateway:{},isSet:!1}},watch:{device:{handler:function(e){this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.gateway.gwDeviceId=this.deviceInfo.deviceId,this.queryParams.gwDeviceId=this.deviceInfo.deviceId,this.getList())}}},methods:{getList:function(){var e=this;Object(n["h"])(this.queryParams).then((function(t){e.deviceList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,gwDeviceId:null,subDeviceId:null,slaveId:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null},this.resetForm("form")},resetQuery:function(){this.resetForm("queryForm"),this.getList()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.$refs.subDeviceList.openDeviceList=!0,this.$refs.subDeviceList.getList()},handleDelete:function(e){var t=this,i=e.deviceId||this.ids;this.$modal.confirm(this.$t("device.device-sub.299018-26",[i])).then((function(){return Object(n["c"])(i)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("device.device-sub.299018-27"))})).catch((function(){}))},setSubDeviceAddress:function(){this.isSet=!this.isSet},saveSetting:function(){var e=this;this.isSet=!this.isSet,Object(n["e"])(this.deviceList).then((function(t){e.getList(),e.$modal.msgSuccess(e.$t("saveSuccess"))}))},cancelSetting:function(){this.isSet=!this.isSet},addSuccess:function(){this.getList()}}},l=o,c=(i("dd9f"),i("2877")),d=Object(c["a"])(l,a,r,!1,null,"34ce6ac9",null);t["default"]=d.exports},"97d6":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"root"},[i("div",{staticClass:"container-shell"},[i("div",{ref:"container",attrs:{id:"container"}})])])},r=[],n=i("c7eb"),s=i("1da1"),o=(i("a9e3"),i("ac1f"),i("00b4"),i("f5a7")),l={},c={name:"player",props:{playerinfo:{type:Object,default:null}},mounted:function(){console.log(this._uid)},watch:{playerinfo:function(e,t){console.log("playerinfo 发生变化"),this.playinfo=e,this.playinfo&&""!==this.playinfo.playtype&&(this.playtype=this.playinfo.playtype)}},jessibuca:null,data:function(){return{isPlaybackPause:!1,useWebGPU:!1,isInit:!1,playinfo:{},playtype:"play",operateBtns:{fullscreen:!0,zoom:!0,play:!0,audio:!0}}},beforeDestroy:function(){},created:function(){this.playinfo=this.playerinfo,this.playinfo&&""!==this.playinfo.playtype&&(this.playtype=this.playinfo.playtype),this.init()},methods:{init:function(){var e=this,t="gpu"in navigator;t?(console.log("支持webGPU"),this.useWebGPU=!0):(console.log("暂不支持webGPU降级到webgl渲染"),this.useWebGPU=!1);var i=this.isMobile()||this.isPad();i&&window.VConsole&&new window.VConsole,this.$nextTick((function(){e.initplayer()}))},initplayer:function(){this.isPlaybackPause=!1,this.initconf(),l[this._uid]=new window.JessibucaPro({container:this.$refs.container,decoder:"/js/jessibuca-pro/decoder-pro.js",videoBuffer:Number(.2),isResize:!1,useWCS:!1,useMSE:!1,useSIMD:!0,wcsUseVideoRender:!1,loadingText:"加载中",debug:!1,debugLevel:"debug",showBandwidth:!0,showPlaybackOperate:!0,operateBtns:this.operateBtns,forceNoOffscreen:!0,isNotMute:!0,showPerformance:!1,playbackForwardMaxRateDecodeIFrame:4,useWebGPU:this.useWebGPU});var e=l[this._uid];this.initcallback(e),this.isInit=!0},initconf:function(){"play"===this.playtype?this.operateBtns.ptz=!0:this.operateBtns.ptz=!1},initcallback:function(e){var t=this;e.on("error",(function(e){console.log("jessibuca error"),console.log(e)})),e.on("playFailedAndPaused",(function(e,t,i){console.log("playFailedAndPaused",e,i)})),e.on("visibilityChange",(function(e){!0===e?console.log("visibilityChange true"):console.log("visibilityChange false")})),e.on("pause",(function(e){console.log("pause success!"),console.log(e)})),e.on("play",(function(e){console.log("play!"),console.log(e)})),e.on("loading",(function(e){console.log("loading success!"),console.log(e)})),e.on("stats",(function(e){console.log("stats is",e)})),e.on("timeout",(function(e){console.log("timeout:",e)})),e.on("playbackPreRateChange",(function(t){e.forward(t)}));var i=0,a=0;e.on("timeUpdate",(function(e){a=parseInt(e/6e4),i!==a&&i++})),e.on(JessibucaPro.EVENTS.ptz,(function(e){console.log("ptz arrow",e),t.handlePtz(e)})),e.on("crashLog",(function(e){console.log("crashLog is",e)}))},registercallback:function(e,t){l[this._uid]&&l[this._uid].on(e,t)},isMobile:function(){return/iphone|ipad|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())},isPad:function(){return/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase())},play:function(e){l[this._uid]&&l[this._uid].play(e)},pause:function(){l[this._uid]&&l[this._uid].pause()},replay:function(e){var t=this;l[this._uid]?l[this._uid].destroy().then((function(){t.initplayer(),t.play(e)})):(this.initplayer(),this.play(e))},handlePtz:function(e){var t=0,i=0;"left"===e?t=2:"right"===e?t=1:"up"===e?i=1:"down"===e&&(i=2);var a={leftRight:t,upDown:i,moveSpeed:125};this.playinfo&&""!==this.playinfo.playtype&&Object(o["c"])(this.playinfo.deviceId,this.playinfo.channelId,a).then(function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(t){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},playback:function(e,t){l[this._uid]&&(l[this._uid].playback(e,{playList:t,fps:25,showControl:!0,isUseFpsRender:!0,isCacheBeforeDecodeForFpsRender:!1,supportWheel:!0}),this.isPlaybackPause=!1)},playbackPause:function(){l[this._uid]&&(l[this._uid].playbackPause(),this.isPlaybackPause=!0)},replayback:function(e,t){var i=this;l[this._uid]?l[this._uid].destroy().then((function(){i.initplayer(),i.playback(e,t)})):(this.initplayer(),this.playback(e,t))},setPlaybackStartTime:function(e){l[this._uid]&&l[this._uid].setPlaybackStartTime(e)},destroy:function(){var e=this;l[this._uid]&&l[this._uid].destroy().then((function(){e.initplayer()}))},close:function(){l[this._uid]&&l[this._uid].close()}}},d=c,u=(i("5169"),i("2877")),p=Object(u["a"])(d,a,r,!1,null,"5072a715",null);t["default"]=p.exports},"9b9c":function(e,t,i){"use strict";i.d(t,"g",(function(){return r})),i.d(t,"h",(function(){return n})),i.d(t,"f",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"i",(function(){return l})),i.d(t,"e",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"c",(function(){return p}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/product/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/product/shortList",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/iot/product/"+e,method:"get"})}function o(e){return Object(a["a"])({url:"/iot/product",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/iot/product",method:"put",data:e})}function c(e){return Object(a["a"])({url:"/iot/product/deviceCount/"+e,method:"get"})}function d(e){return Object(a["a"])({url:"/iot/product/status",method:"put",data:e})}function u(e){return Object(a["a"])({url:"/iot/product/"+e,method:"delete"})}function p(e){return Object(a["a"])({url:"/iot/product/copy?productId="+e,method:"post"})}},a035:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return n}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/deviceLog/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/deviceLog/history",method:"get",params:e})}},a04d:function(e,t,i){"use strict";i("4683")},a738:function(e,t,i){"use strict";i("20a4")},aa1f:function(e,t,i){"use strict";var a=i("83ab"),r=i("d039"),n=i("825a"),s=i("7c73"),o=i("e391"),l=Error.prototype.toString,c=r((function(){if(a){var e=s(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==l.call(e))return!0}return"2: 1"!==l.call({message:1,name:2})||"Error"!==l.call({})}));e.exports=c?function(){var e=n(this),t=o(e.name,"Error"),i=o(e.message);return t?i?t+": "+i:t:i}:l},b52e:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-row",{staticClass:"mb8",attrs:{gutter:10}},[i("right-toolbar",{attrs:{showSearch:e.showSearch,search:!1},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.deviceUserList,border:!1},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-1"),align:"center",prop:"userId",width:"100"}}),i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-2"),align:"left",prop:"userName","min-width":"140"}}),i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-3"),align:"center",prop:"phonenumber",width:"150"}}),i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-4"),align:"center",prop:"isOwner",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.isOwner?i("el-tag",{attrs:{type:"primary"}},[e._v(e._s(e.$t("device.device-user.037521-5")))]):i("el-tag",{attrs:{type:"success"}},[e._v(e._s(e.$t("device.device-user.037521-6")))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-7"),align:"center",prop:"createTime",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(e.parseTime(t.row.createTime,"{y}-{m}-{d}")))])]}}])}),i("el-table-column",{attrs:{label:e.$t("device.device-user.037521-8"),align:"left",prop:"remark","header-align":"center","min-width":"150"}}),i("el-table-column",{attrs:{fixed:"right",label:e.$t("opation"),align:"center","class-name":"small-padding fixed-width",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.isOwner&&1==e.deviceInfo.isOwner?i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:user:query"],expression:"['iot:device:user:query']"}],attrs:{size:"small",type:"text",icon:"el-icon-view"},on:{click:function(i){return e.handleUpdate(t.row)}}},[e._v(" "+e._s(e.$t("device.device-user.037521-10"))+" ")]):e._e(),0==t.row.isOwner&&1==e.deviceInfo.isOwner?i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:user:remove"],expression:"['iot:device:user:remove']"}],attrs:{size:"small",type:"text",icon:"el-icon-delete"},on:{click:function(i){return e.handleDelete(t.row)}}},[e._v(" "+e._s(e.$t("device.device-user.037521-11"))+" ")]):e._e()]}}])})],1),i("el-dialog",{attrs:{title:e.$t("device.device-user.037521-12"),visible:e.open,width:"800px"},on:{"update:visible":function(t){e.open=t}}},[i("div",{staticStyle:{"margin-top":"-50px"}},[i("el-divider")],1),1==e.type?i("el-form",{ref:"queryForm",attrs:{model:e.permParams,rules:e.rules,inline:!0,"label-width":"80px"}},[i("el-form-item",{attrs:{label:e.$t("device.device-user.037521-3"),prop:"phonenumber"}},[i("el-input",{staticStyle:{width:"240px"},attrs:{type:"text",placeholder:e.$t("device.device-user.037521-13"),minlength:"10",clearable:"",size:"small","show-word-limit":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.permParams.phonenumber,callback:function(t){e.$set(e.permParams,"phonenumber",t)},expression:"permParams.phonenumber"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.userQuery}},[e._v(e._s(e.$t("device.device-user.037521-14")))])],1)],1):e._e(),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.permsLoading,expression:"permsLoading"}],staticStyle:{"background-color":"#f8f8f9","line-height":"28px"}},[e.message?i("div",{staticStyle:{padding:"20px"}},[e._v(e._s(e.message))]):e._e(),e.form.userId?i("div",{staticStyle:{padding:"15px"}},[i("div",{staticStyle:{"font-weight":"bold","line-height":"28px"}},[e._v(e._s(e.$t("device.device-user.037521-15")))]),i("span",{staticStyle:{width:"80px",display:"inline-block"}},[e._v(e._s(e.$t("device.device-user.037521-16")))]),i("span",[e._v(e._s(e.form.userId))]),i("br"),i("span",{staticStyle:{width:"80px",display:"inline-block"}},[e._v(e._s(e.$t("device.device-user.037521-3"))+"")]),i("span",[e._v(e._s(e.form.phonenumber))]),i("br"),i("span",{staticStyle:{width:"80px",display:"inline-block"}},[e._v(e._s(e.$t("device.device-user.037521-2"))+"")]),i("span",[e._v(e._s(e.form.userName))]),i("br"),i("div",{staticStyle:{"font-weight":"bold",margin:"15px 0 10px"}},[e._v(e._s(e.$t("device.device-user.037521-19")))]),i("el-table",{ref:"multipleTable",attrs:{data:e.sharePermissionList,"highlight-current-row":"",size:"mini"},on:{select:e.handleSelectionChange,"select-all":e.handleSelectionAll}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{key:"modelName",attrs:{label:e.$t("device.device-user.037521-20"),align:"center",prop:"modelName"}}),i("el-table-column",{key:"identifier",attrs:{label:e.$t("device.device-user.037521-21"),align:"center",prop:"identifier"}}),i("el-table-column",{key:"remark",attrs:{label:e.$t("device.device-edit.148398-17"),align:"left","min-width":"100","header-align":"center",prop:"remark"}})],1),i("div",{staticStyle:{"font-weight":"bold",margin:"15px 0 10px"}},[e._v(e._s(e.$t("device.device-edit.148398-17")))]),i("el-input",{attrs:{type:"textarea",placeholder:e.$t("plzInput"),rows:"2"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1):e._e()]),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:user:edit"],expression:"['iot:device:user:edit']"}],attrs:{type:"primary",disabled:!e.form.userId||!e.deviceInfo.deviceId},on:{click:e.submitForm}},[e._v(e._s(e.$t("device.device-user.037521-24")))]),i("el-button",{on:{click:e.closeSelectUser}},[e._v(e._s(e.$t("device.device-user.037521-25")))])],1)],1)],1)},r=[],n=i("c7eb"),s=i("1da1"),o=(i("99af"),i("a15b"),i("d81d"),i("01ca")),l=i("b775");function c(e){return Object(l["a"])({url:"/iot/share/list",method:"get",params:e})}function d(e){return Object(l["a"])({url:"/iot/share/shareUser",method:"get",params:e})}function u(e,t){return Object(l["a"])({url:"/iot/share/detail?deviceId="+e+"&userId="+t,method:"get"})}function p(e){return Object(l["a"])({url:"/iot/share",method:"post",data:e})}function h(e){return Object(l["a"])({url:"/iot/share",method:"put",data:e})}function f(e){return Object(l["a"])({url:"/iot/share",method:"delete",data:e})}var m={name:"device-user",dicts:["iot_yes_no"],props:{device:{type:Object,default:null}},watch:{device:{deep:!0,handler:function(e,t){e.deviceId&&e.deviceId!==t.deviceId&&(this.deviceInfo=e,this.queryParams.deviceId=e.deviceId,this.getList())}}},data:function(){return{type:1,message:"",permsLoading:!1,showSearch:!0,sharePermissionList:[],open:!1,permParams:{userName:void 0,phonenumber:void 0,deviceId:null},rules:{phonenumber:[{required:!0,message:this.$t("device.device-user.037521-26"),trigger:"blur"},{min:11,max:11,message:this.$t("device.device-user.037521-27"),trigger:"blur"}]},loading:!0,total:0,deviceUserList:[],deviceInfo:{},queryParams:{pageNum:1,pageSize:10,deviceName:null,userName:null,userId:null,tenantName:null,isOwner:null},form:{}}},created:function(){this.queryParams.deviceId=this.device.deviceId,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,c(this.queryParams).then((function(t){e.deviceUserList=t.rows,e.total=t.total,e.loading=!1}))},reset:function(){this.form={deviceId:null,userId:null,deviceName:null,userName:null,perms:null,phonenumber:null,remark:null},this.sharePermissionList=[],this.message="",this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},handleUpdate:function(e){var t=this;this.reset(),this.type=2,u(e.deviceId,e.userId).then((function(e){t.form=e.data,t.getPermissionList(),t.open=!0}))},shareDevice:function(){this.type=1,this.open=!0,this.form={}},handleDelete:function(e){var t=this,i={deviceId:e.deviceId,userId:e.userId};this.$modal.confirm(this.$t("device.device-user.037521-28")).then((function(){return f(i)})).then((function(){t.getList(),t.$modal.msgSuccess(t.$t("device.device-user.037521-29"))})).catch((function(){}))},userQuery:function(){var e=this;this.$refs["queryForm"].validate((function(t){t&&(e.reset(),e.getShareUser())}))},getShareUser:function(){var e=this;this.permsLoading=!0,this.deviceInfo.deviceId?(this.permParams.deviceId=this.deviceInfo.deviceId,d(this.permParams).then((function(t){t.data?(e.form=t.data,e.getPermissionList()):(e.permsLoading=!1,e.message=e.$t("device.device-user.037521-31"))}))):this.$modal.alert(this.$t("device.device-user.037521-30"))},getPermissionList:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=[],e.form.perms&&(i=e.form.perms.split(",")),Object(o["i"])(e.deviceInfo.productId).then((function(t){if(e.sharePermissionList=[{identifier:"ota",modelName:e.$t("device.device-user.037521-32"),remark:e.$t("device.device-user.037521-33")},{identifier:"timer",modelName:e.$t("device.device-user.037521-34"),remark:e.$t("device.device-user.037521-35")},{identifier:"log",modelName:e.$t("device.device-user.037521-36"),remark:e.$t("device.device-user.037521-37")},{identifier:"monitor",modelName:e.$t("device.device-user.037521-38"),remark:e.$t("device.device-user.037521-39")},{identifier:"statistic",modelName:e.$t("device.device-user.037521-40"),remark:e.$t("device.device-user.037521-41")}],e.sharePermissionList=e.sharePermissionList.concat(t.data),i.length>0)for(var a=function(t){for(var a=0;a<i.length;a++)if(e.sharePermissionList[t].identifier==i[a]){e.$nextTick((function(){e.$refs.multipleTable.toggleRowSelection(e.sharePermissionList[t],!0)}));break}},r=0;r<e.sharePermissionList.length;r++)a(r);e.permsLoading=!1}));case 3:case"end":return t.stop()}}),t)})))()},resetUserQuery:function(){this.resetForm("queryForm"),this.reset()},closeSelectUser:function(){this.open=!1,this.resetUserQuery()},handleSelectionChange:function(e){this.form.perms=e.map((function(e){return e.identifier})).join(",")},handleSelectionAll:function(e){this.form.perms=e.map((function(e){return e.identifier})).join(",")},submitForm:function(){var e=this;2==this.type?h(this.form).then((function(t){e.$modal.msgSuccess(e.$t("device.device-user.037521-42")),e.resetUserQuery(),e.open=!1,e.getList()})):1==this.type&&(this.form.deviceId=this.deviceInfo.deviceId,this.form.deviceName=this.deviceInfo.deviceName,p(this.form).then((function(t){e.$modal.msgSuccess(e.$t("device.device-user.037521-43")),e.resetUserQuery(),e.open=!1,e.getList()})))}}},v=m,g=i("2877"),y=Object(g["a"])(v,a,r,!1,null,null,null);t["default"]=y.exports},b7ef:function(e,t,i){"use strict";var a=i("23e7"),r=i("da84"),n=i("d066"),s=i("5c6c"),o=i("9bf2").f,l=i("1a2d"),c=i("19aa"),d=i("7156"),u=i("e391"),p=i("cf98"),h=i("0d26"),f=i("83ab"),m=i("c430"),v="DOMException",g=n("Error"),y=n(v),b=function(){c(this,w);var e=arguments.length,t=u(e<1?void 0:arguments[0]),i=u(e<2?void 0:arguments[1],"Error"),a=new y(t,i),r=g(t);return r.name=v,o(a,"stack",s(1,h(r.stack,1))),d(a,this,b),a},w=b.prototype=y.prototype,_="stack"in g(v),x="stack"in new y(1,2),k=y&&f&&Object.getOwnPropertyDescriptor(r,v),$=!!k&&!(k.writable&&k.configurable),I=_&&!$&&!x;a({global:!0,constructor:!0,forced:m||I},{DOMException:I?b:y});var S=n(v),j=S.prototype;if(j.constructor!==S)for(var C in m||o(j,"constructor",s(1,S)),p)if(l(p,C)){var L=p[C],P=L.s;l(S,P)||o(S,P,s(6,L.c))}},b917:function(e,t){for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a={},r=0;r<66;r++)a[i.charAt(r)]=r;e.exports={itoc:i,ctoi:a}},bc13:function(e,t,i){"use strict";i.d(t,"d",(function(){return r})),i.d(t,"e",(function(){return n})),i.d(t,"f",(function(){return s})),i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return l})),i.d(t,"b",(function(){return c}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/message/encode",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/message/post",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/iot/preferences/list",method:"get",params:e})}function o(e){return Object(a["a"])({url:"/iot/preferences",method:"post",data:e})}function l(e){return Object(a["a"])({url:"/iot/preferences",method:"put",data:e})}function c(e){return Object(a["a"])({url:"/iot/preferences/".concat(e.id),method:"DELETE"})}},bdbe:function(e,t,i){},cca2:function(e,t,i){},ce65:function(e,t,i){},cf45:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"d",(function(){return o})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return p})),i.d(t,"e",(function(){return h})),i.d(t,"f",(function(){return f}));var a=i("c7eb"),r=(i("2909"),i("b85c"),i("1da1")),n=i("53ca"),s=(i("d9e2"),i("99af"),i("7db0"),i("a15b"),i("d81d"),i("14d9"),i("fb6a"),i("c19f"),i("ace4"),i("b0c0"),i("b64b"),i("d3b7"),i("ac1f"),i("25f0"),i("3ca3"),i("466d"),i("5319"),i("5cc6"),i("907a"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("986a"),i("1d02"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),i("1b3b"),i("3d71"),i("c6e3"),i("81b2"),i("159b"),i("ddb0"),i("0eb6"),i("b7ef"),i("8bd4"),i("2b3d"),i("bf19"),i("9861"),function(e){if("object"==Object(n["a"])(e)){var t=Array.isArray(e)?[]:{};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e[i]&&"object"==Object(n["a"])(e[i])?t[i]=s(e[i]):t[i]=e[i]);return t}return e});function o(e,t){var i;if(!e)return null;i=new Date(e),t=t||"Y.M.D h:m";var a=i.getFullYear(),r=i.getMonth()+1;r=r>=10?r:"0"+r;var n=i.getDate();n=n>=10?n:"0"+n;var s=i.getHours();s=s>=10?s:"0"+s;var o=i.getMinutes();o=o>=10?o:"0"+o;var l=i.getSeconds();return l=l>=10?l:"0"+l,t.replace("Y",a).replace("M",r).replace("D",n).replace("h",s).replace("m",o).replace("s",l)}function l(e,t){return c.apply(this,arguments)}function c(){return c=Object(r["a"])(Object(a["a"])().mark((function e(t,i){var r,n,s;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,d(t);case 2:if(r=e.sent,r){e.next=5;break}throw new Error({code:401});case 5:n=window.URL.createObjectURL(t),s=document.createElement("a"),s.download=i||"下载文件",s.style.display="none",s.href=n,document.body.appendChild(s),s.click(),document.body.removeChild(s);case 13:case"end":return e.stop()}}),e)}))),c.apply(this,arguments)}function d(e){return u.apply(this,arguments)}function u(){return u=Object(r["a"])(Object(a["a"])().mark((function e(t){var i;return Object(a["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.text();case 3:return i=e.sent,JSON.parse(i),e.abrupt("return",!1);case 8:return e.prev=8,e.t0=e["catch"](0),e.abrupt("return",!0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),u.apply(this,arguments)}function p(e){var t=document.createElement("input");return t.setAttribute("readonly","readonly"),t.value=e,document.body.appendChild(t),t.setSelectionRange(0,t.value.length),t.select(),document.execCommand("copy"),document.body.removeChild(t)?{type:"success",message:"复制成功"}:{type:"error",message:"复制失败"}}function h(e){var t=parseInt(e,16).toString(2),i=4*e.length;if(t.length<i)while(t.length<i)t="0"+t;if("0"==t.substring(0,1)){var a=parseInt(t,2);return a}var r="",n=parseInt(t,2)-1;return t=n.toString(2),r=t.substring(1,i),r=r.replace(/0/g,"z"),r=r.replace(/1/g,"0"),r=r.replace(/z/g,"1"),n=-parseInt(r,2),n}function f(e){var t="string"==typeof e?parseInt(e,10):e,i="",a=4,r=15;if(t>=0)i=t.toString(16).toLocaleLowerCase();else{var n=(-t-1).toString(2),s="000000000000000";n=s.slice(0,r-n.length)+n,n=n.replace(/0/g,"z"),n=n.replace(/1/g,"0"),n=n.replace(/z/g,"1"),i=parseInt("1"+n,2).toString(16).toLocaleLowerCase()}if(i.length!=a){var o="0000";i=o.slice(0,a-i.length)+i}return i.toUpperCase()}},cf98:function(e,t){e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},d854:function(e,t,i){"use strict";i("5170")},dc9c:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return n}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/log/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/log/"+e,method:"delete"})}},dcea:function(e,t,i){},dd50:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form",{attrs:{inline:!0,"label-width":"78px"}},[i("el-form-item",[i("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:e.$t("device.device-monitor.817489-1"),placement:"top"}},[i("el-input",{staticStyle:{width:"218px"},attrs:{placeholder:e.$t("device.device-monitor.817489-2"),type:"number",clearable:""},model:{value:e.monitorInterval,callback:function(t){e.monitorInterval=t},expression:"monitorInterval"}})],1)],1),i("el-form-item",[i("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:e.$t("device.device-monitor.817489-4"),placement:"top"}},[i("el-input",{staticStyle:{width:"218px"},attrs:{placeholder:e.$t("device.device-monitor.817489-5"),type:"number",clearable:""},model:{value:e.monitorNumber,callback:function(t){e.monitorNumber=t},expression:"monitorNumber"}})],1)],1),i("el-form-item",[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:service:invoke"],expression:"['iot:service:invoke']"}],attrs:{type:"primary",icon:"el-icon-video-play"},on:{click:function(t){return e.beginMonitor()}}},[e._v(" "+e._s(e.$t("device.device-monitor.817489-6"))+" ")]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:service:invoke"],expression:"['iot:service:invoke']"}],attrs:{icon:"el-icon-video-pause"},on:{click:function(t){return e.stopMonitor()}}},[e._v(e._s(e.$t("device.device-monitor.817489-7")))])],1)],1),i("el-row",{directives:[{name:"loading",rawName:"v-loading",value:e.chartLoading,expression:"chartLoading"}],attrs:{gutter:20,"element-loading-text":e.$t("device.device-monitor.817489-8"),"element-loading-spinner":"el-icon-loading"}},e._l(e.monitorThings,(function(e,t){return i("el-col",{key:t,staticStyle:{"margin-bottom":"20px"},attrs:{span:12}},[i("el-card",{attrs:{shadow:"hover","body-style":{paddingTop:"10px",marginBottom:"-20px"}}},[i("div",{ref:"monitor",refInFor:!0,staticStyle:{height:"210px",padding:"0"}})])],1)})),1)],1)},r=[],n=(i("14d9"),i("b0c0"),i("a9e3"),i("b680"),i("b64b"),i("d3b7"),i("25f0"),i("c1df")),s=i.n(n),o={name:"DeviceMonitor",props:{device:{type:Object,default:null}},watch:{device:function(e,t){if(this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&this.device.monitorList){this.monitorThings=this.deviceInfo.monitorList,this.dataList=[];for(var i=0;i<this.monitorThings.length;i++)this.dataList.push({id:this.monitorThings[i].id,name:this.monitorThings[i].name,data:[]});this.$nextTick((function(){this.getMonitorChart()})),this.mqttCallback()}}},mounted:function(){this.handleDeviceChange(this.device)},data:function(){return{monitorInterval:1e3,monitorNumber:60,chart:[],dataList:[],monitorThings:[],chartLoading:!1,deviceInfo:{}}},created:function(){},methods:{handleDeviceChange:function(e){if(e&&0!=e.deviceId&&e.monitorList&&e.monitorList.length>0){this.monitorThings=e.monitorList,this.dataList=[];for(var t=0;t<this.monitorThings.length;t++)this.dataList.push({id:this.monitorThings[t].id,name:this.monitorThings[t].name,data:[]});this.$nextTick((function(){this.getMonitorChart()})),this.mqttCallback()}},mqttPublish:function(e,t){var i=this,a="",r="";4==t.type&&(a="/"+e.productId+"/"+e.serialNumber+"/monitor/get",r='{"count":'+t.value+',"interval":'+this.monitorInterval+"}",""!=a&&this.$mqttTool.publish(a,r,t.name).then((function(e){i.$modal.notifySuccess(e)})).catch((function(e){i.$modal.notifyError(e)})))},mqttCallback:function(){var e=this;this.$mqttTool.client.on("message",(function(t,i,a){var r=t.split("/"),n=(r[1],r[2]);if(i=JSON.parse(i.toString()),i&&("status"==r[3]&&(console.log(e.$t("device.device-monitor.817489-9"),t),console.log(e.$t("device.device-monitor.817489-10"),i),e.deviceInfo.serialNumber==n&&(e.deviceInfo.status=i.status,e.deviceInfo.isShadow=i.isShadow,e.deviceInfo.rssi=i.rssi)),"monitor"==r[3])){console.log(e.$t("device.device-monitor.817489-11"),t),console.log(e.$t("device.device-monitor.817489-12"),i),e.chartLoading=!1;for(var o=0;o<i.length;o++)for(var l=i[o].value,c=i[o].id,d=i[o].remark,u=s()(Number(d)).format("YYYY-MM-DD HH:mm:ss"),p=0;p<e.dataList.length;p++){if(c==e.dataList[p].id){e.dataList[p].length>50&&e.dataList[p].shift(),e.dataList[p].data.push([d?u:e.getTime(),l]),e.chart[p].setOption({series:[{data:e.dataList[p].data}]});break}if(0==e.dataList[p].id.indexOf("array_")){var h=e.dataList[p].id.substring(6,8),f=e.dataList[p].id.substring(9);if(f==c){var m=l.split(",");e.dataList[p].length>50&&e.dataList[p].shift(),e.dataList[p].data.push([d?u:e.getTime(),m[h]]),e.chart[p].setOption({series:[{data:e.dataList[p].data}]});break}}}}}))},beginMonitor:function(){if(3==this.deviceInfo.status){for(var e=0;e<this.dataList.length;e++)this.dataList[e].data=[];(this.monitorInterval<500||this.monitorInterval>1e4)&&this.$modal.alertError(this.$t("device.device-monitor.817489-14")),(0==this.monitorNumber||this.monitorNumber>300)&&this.$modal.alertError(this.$t("device.device-monitor.817489-15"));var t={};t.name=this.$t("device.device-monitor.817489-16"),t.value=this.monitorNumber,t.type=4,this.mqttPublish(this.deviceInfo,t),this.chartLoading=!0}else this.$modal.alertError(this.$t("device.device-monitor.817489-13"))},stopMonitor:function(){if(3==this.deviceInfo.status){this.chartLoading=!1;var e={};e.name=this.$t("device.device-monitor.817489-17"),e.value=0,e.type=4,this.mqttPublish(this.deviceInfo,e)}else this.$modal.alertError(this.$t("device.device-monitor.817489-13"))},getMonitorChart:function(){for(var e=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],t=0;t<this.monitorThings.length;t++){var i;this.$refs.monitor[t].style.width=document.documentElement.clientWidth/2-194+"px",this.chart[t]=this.$echarts.init(this.$refs.monitor[t]),i={title:{left:"center",text:this.monitorThings[t].name+" (单位 "+(void 0!=this.monitorThings[t].datatype.unit?this.monitorThings[t].datatype.unit:this.$t("device.device-monitor.817489-19"))+"",textStyle:{fontSize:14}},grid:{top:"50px",left:"20px",right:"20px",bottom:"10px",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{animation:!0}},xAxis:{type:"time",show:!1,splitLine:{show:!1}},yAxis:{type:"value",boundaryGap:[0,"100%"],splitLine:{show:!0},scale:!0,axisLabel:{formatter:function(e,t){return e.toFixed(2)}}},series:[{name:this.monitorThings[t].name,type:"line",symbol:"none",sampling:"lttb",itemStyle:{color:t>9?e[0]:e[t]},areaStyle:{},data:[]}]},i&&this.chart[t].setOption(i)}},getTime:function(){var e=new Date,t=e.getFullYear(),i=e.getMonth()+1,a=e.getDate(),r=e.getHours(),n=e.getMinutes(),s=e.getSeconds();return i=i<10?"0"+i:i,a=a<10?"0"+a:a,r=r<10?"0"+r:r,t+"-"+i+"-"+a+" "+r+":"+n+":"+s}}},l=o,c=i("2877"),d=Object(c["a"])(l,a,r,!1,null,null,null);t["default"]=d.exports},dd9f:function(e,t,i){"use strict";i("307e")},dfc8:function(e,t,i){},e1f3:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"instruction-parsing"},[i("el-row",[i("el-col",{staticClass:"left",attrs:{span:16}},[i("div",{staticClass:"head"},[i("span",{staticStyle:{color:"#909399"}},[e._v(e._s(e.$t("device.instruction-parsing.830424-0")))]),i("span",[e._v(e._s(e.device.serialNumber))]),i("el-dropdown",{staticStyle:{"margin-left":"auto"}},[i("span",{staticClass:"el-dropdown-link"},[e._v(" "+e._s(e.format)+" "),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.formatList,(function(t,a){return i("el-dropdown-item",{key:a,attrs:{disabled:0!==a}},[e._v(e._s(t))])})),1)],1)],1),i("div",{staticClass:"content"},e._l(e.logList,(function(t,a){return i("div",{key:a,staticClass:"item-class",class:{"send-class":0==t.type,"receive-class":1==t.type,"report-class":2==t.type}},[i("div",{staticClass:"item-head"},[i("div",[e._v(" "+e._s(0==t.type?e.$t("device.instruction-parsing.830424-1"):1==t.type?e.$t("device.instruction-parsing.830424-2"):e.$t("device.instruction-parsing.830424-3"))+" ")]),i("div",{staticClass:"head-time"},[e._v(e._s(t.time))]),0==t.type||t.analysis?e._e():i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"item.loading"}],staticClass:"analysis-btn right-btn",on:{click:function(i){return i.stopPropagation(),e.analysisData(t,a)}}},[e._v(" "+e._s(e.$t("device.instruction-parsing.830424-4"))+" ")]),0!=t.type&&t.analysis?i("div",{staticClass:"analysised right-btn"},[e._v(" "+e._s(e.$t("device.instruction-parsing.830424-5"))+" ")]):e._e()]),i("div",{staticClass:"item-content"},[i("div",{staticClass:"content-value"},[e._v(e._s(t.value))])]),0!=t.type&&t.analysis?i("div",{staticClass:"analysis-data"},[i("div",{staticClass:"data-col left-col"},[i("div",{staticClass:"label"},[e._v(e._s(e.$t("device.instruction-parsing.830424-6")))]),i("div",{staticClass:"value"},[e._v(e._s(t.analysisVal.name||"--"))])]),i("div",{staticClass:"data-col right-col"},[i("div",{staticClass:"label"},[e._v(e._s(e.$t("device.instruction-parsing.830424-7")))]),i("div",{staticClass:"value"},[e._v(e._s(t.analysisVal.id||"--"))])]),i("div",{staticClass:"data-col left-col"},[i("div",{staticClass:"label"},[e._v(e._s(e.$t("device.instruction-parsing.830424-8")))]),i("div",{staticClass:"value"},[e._v(e._s(t.analysisVal.value||"--"))])]),t.analysisList.length>1?i("div",{staticClass:"data-col right-col"},[i("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(i){return i.stopPropagation(),e.openMore(t)}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-9")))])],1):e._e()]):e._e()])})),0),i("div",{staticClass:"bottom"},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:e.$t("device.instruction-parsing.830424-10")},model:{value:e.sendVal,callback:function(t){e.sendVal=t},expression:"sendVal"}},[i("el-select",{attrs:{slot:"prepend",placeholder:e.$t("device.instruction-parsing.830424-11")},slot:"prepend",model:{value:e.dataType,callback:function(t){e.dataType=t},expression:"dataType"}},[i("el-option",{attrs:{label:"hex",value:"hex"}}),i("el-option",{attrs:{label:"json",value:"json"}})],1)],1),i("el-button",{staticClass:"send-btn",attrs:{round:"",type:"primary",size:"mini"},on:{click:function(t){return t.stopPropagation(),e.sendMessage(t)}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-14")))])],1)]),i("el-col",{staticClass:"right",attrs:{span:8}},[i("div",{staticClass:"head right-head"},[e._v(e._s(e.$t("device.instruction-parsing.830424-15")))]),i("div",{staticClass:"content"},e._l(e.quickParsing,(function(t,a){return i("div",{key:a,staticClass:"quick-item",on:{click:function(i){return i.stopPropagation(),e.quickClick(t)},contextmenu:function(i){return i.preventDefault(),e.onContextmenu(i,t)}}},[e._v(" "+e._s(t.name)+" ")])})),0),i("div",{staticClass:"right-bottom",on:{click:function(t){return t.stopPropagation(),e.openEdit(t)}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-16")))])])],1),i("el-dialog",{attrs:{title:e.editName?e.$t("device.instruction-parsing.830424-17"):e.$t("device.instruction-parsing.830424-18"),visible:e.editDialog,width:e.editName?"550px":"600px"},on:{"update:visible":function(t){e.editDialog=t}}},[i("div",{directives:[{name:"show",rawName:"v-show",value:!e.editName,expression:"!editName"}],staticClass:"dialog-content"},[i("el-form",{attrs:{model:e.createForm,"label-position":"top"}},[i("el-row",{attrs:{gutter:40}},[i("el-col",{attrs:{span:24}},[i("el-form-item",{attrs:{label:e.$t("device.instruction-parsing.830424-19"),prop:"path"}},[i("el-input",{attrs:{type:"number"},model:{value:e.createForm.path,callback:function(t){e.$set(e.createForm,"path",t)},expression:"createForm.path"}})],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.instruction-parsing.830424-20"),prop:"start"}},[i("el-select",{staticStyle:{width:"100%"},on:{change:e.changeNum},model:{value:e.createForm.start,callback:function(t){e.$set(e.createForm,"start",t)},expression:"createForm.start"}},e._l(e.startList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{label:e.$t("device.instruction-parsing.830424-21"),prop:"functionCode"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{disabled:"0xFFAA"==e.createForm.start},on:{change:e.changeNum},model:{value:e.createForm.functionCode,callback:function(t){e.$set(e.createForm,"functionCode",t)},expression:"createForm.functionCode"}},e._l(e.functionCodeList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{attrs:{prop:"startPath"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"6px"}},[e._v(e._s(e.$t("device.instruction-parsing.830424-22")))]),i("el-tooltip",{attrs:{content:e.createForm.startPathSwitch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},model:{value:e.createForm.startPathSwitch,callback:function(t){e.$set(e.createForm,"startPathSwitch",t)},expression:"createForm.startPathSwitch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==e.createForm.startPathSwitch,expression:"createForm.startPathSwitch == 'Dec'"}],staticStyle:{width:"100%"},attrs:{type:"number",min:0},on:{change:function(){e.createForm.startPath16=e.int2hex(e.createForm.startPath)},input:function(){e.createForm.startPath16=e.int2hex(e.createForm.startPath)}},model:{value:e.createForm.startPath,callback:function(t){e.$set(e.createForm,"startPath",t)},expression:"createForm.startPath"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(e.createForm.startPath16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=e.createForm.startPathSwitch,expression:"createForm.startPathSwitch != 'Dec'"}],staticStyle:{width:"100%"},on:{input:function(){e.createForm.startPath=e.hex2int(e.createForm.startPath16)}},model:{value:e.createForm.startPath16,callback:function(t){e.$set(e.createForm,"startPath16",t)},expression:"createForm.startPath16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.createForm.startPath))])])],1)],1),i("el-col",{attrs:{span:12}},[i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!["05","06"].includes(e.createForm.functionCode),expression:"!['05', '06'].includes(createForm.functionCode)"}],attrs:{label:e.registerNumTitle,prop:"registerNum"}},[i("el-input-number",{staticStyle:{width:"100%"},attrs:{"controls-position":"right",min:0},on:{change:e.changeNum},model:{value:e.createForm.registerNum,callback:function(t){e.$set(e.createForm,"registerNum",t)},expression:"createForm.registerNum"}})],1),i("el-form-item",{directives:[{name:"show",rawName:"v-show",value:["05","06"].includes(e.createForm.functionCode),expression:"['05', '06'].includes(createForm.functionCode)"}],attrs:{prop:"setValue"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"auto"}},[e._v(e._s(e.registerNumTitle))]),i("el-tooltip",{attrs:{content:e.createForm.setValueSwitch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},model:{value:e.createForm.setValueSwitch,callback:function(t){e.$set(e.createForm,"setValueSwitch",t)},expression:"createForm.setValueSwitch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==e.createForm.setValueSwitch,expression:"createForm.setValueSwitch == 'Dec'"}],staticStyle:{width:"100%"},attrs:{type:"number"},on:{change:function(){e.createForm.setValue16=e.int2hex(e.createForm.setValue)},input:function(){e.createForm.setValue16=e.int2hex(e.createForm.setValue)}},model:{value:e.createForm.setValue,callback:function(t){e.$set(e.createForm,"setValue",t)},expression:"createForm.setValue"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(e.createForm.setValue16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=e.createForm.setValueSwitch,expression:"createForm.setValueSwitch != 'Dec'"}],staticStyle:{width:"100%"},on:{input:function(){e.createForm.setValue=e.hex2int(e.createForm.setValue16)}},model:{value:e.createForm.setValue16,callback:function(t){e.$set(e.createForm,"setValue16",t)},expression:"createForm.setValue16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(e.createForm.setValue))])])],1)],1),e._l(e.registerValList,(function(t,a){return i("el-col",{directives:[{name:"show",rawName:"v-show",value:"16"==e.createForm.functionCode,expression:"createForm.functionCode == '16'"}],key:"register"+a,attrs:{span:12}},[i("el-form-item",{attrs:{prop:"registerValList"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"6px"}},[e._v("#"+e._s(a)+" "+e._s(e.$t("device.instruction-parsing.830424-23")))]),i("el-tooltip",{attrs:{content:t.switch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},on:{change:function(){e.refreshRegisterInpust(t,a)}},model:{value:t.switch,callback:function(i){e.$set(t,"switch",i)},expression:"item.switch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==t.switch,expression:"item.switch == 'Dec'"}],staticStyle:{width:"100%"},attrs:{type:"number",min:0},on:{change:function(){t.value16=e.int2hex(t.value),e.refreshRegisterInpust(t,a)},input:function(){t.value16=e.int2hex(t.value),e.refreshRegisterInpust(t,a)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(t.value16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=t.switch,expression:"item.switch != 'Dec'"}],staticStyle:{width:"100%"},on:{input:function(){t.value=e.hex2int(t.value16),e.refreshRegisterInpust(t,a)}},model:{value:t.value16,callback:function(i){e.$set(t,"value16",i)},expression:"item.value16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(t.value))])])],1)],1)})),e._l(e.reportValList,(function(t,a){return i("el-col",{directives:[{name:"show",rawName:"v-show",value:"0xFFAA"==e.createForm.start,expression:"createForm.start == '0xFFAA'"}],key:"report"+a,attrs:{span:12}},[i("el-form-item",{attrs:{prop:"reportValList"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"6px"}},[e._v("#"+e._s(a)+" "+e._s(e.$t("device.instruction-parsing.830424-24")))]),i("el-tooltip",{attrs:{content:t.switch,placement:"top"}},[i("el-switch",{attrs:{size:"mini","active-color":"#13ce66","inactive-color":"#ff4949","active-value":"Dec","inactive-value":"Hex"},on:{change:function(){e.refreshReportValList(t,a)}},model:{value:t.switch,callback:function(i){e.$set(t,"switch",i)},expression:"item.switch"}})],1)],1),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"==t.switch,expression:"item.switch == 'Dec'"}],staticStyle:{width:"100%"},attrs:{type:"number",min:0},on:{change:function(){t.value16=e.int2hex(t.value),e.refreshReportValList(t,a)},input:function(){t.value16=e.int2hex(t.value),e.refreshReportValList(t,a)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v("0x"+e._s(t.value16))])]),i("el-input",{directives:[{name:"show",rawName:"v-show",value:"Dec"!=t.switch,expression:"item.switch != 'Dec'"}],staticStyle:{width:"100%"},on:{input:function(){t.value=e.hex2int(t.value16),e.refreshReportValList(t,a)}},model:{value:t.value16,callback:function(i){e.$set(t,"value16",i)},expression:"item.value16"}},[i("div",{attrs:{slot:"append"},slot:"append"},[e._v(e._s(t.value))])])],1)],1)})),e._l(e.IOValList,(function(t,a){return i("el-col",{directives:[{name:"show",rawName:"v-show",value:"15"==e.createForm.functionCode,expression:"createForm.functionCode == '15'"}],key:"IO"+a,attrs:{span:6}},[i("el-form-item",{attrs:{prop:"registerValList"}},[i("div",{staticClass:"form-item-label",attrs:{slot:"label"},slot:"label"},[i("div",{staticStyle:{"margin-right":"6px"}},[e._v("#"+e._s(a)+" "+e._s(e.$t("device.instruction-parsing.830424-25")))])]),i("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(){e.refreshIOInpust(t,a)}},model:{value:t.value,callback:function(i){e.$set(t,"value",i)},expression:"item.value"}})],1)],1)}))],2)],1),i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.createLoading,expression:"createLoading"}]},[i("div",{staticClass:"create-title"},[i("el-button",{attrs:{type:"text",icon:"el-icon-check"},on:{click:function(t){return t.stopPropagation(),e.encode(t)}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-26")))]),i("div",{staticClass:"title-right"},[i("el-button",{attrs:{type:"",size:"mini",disabled:!e.canSend},on:{click:function(t){return e.openEditName({command:e.createCode})}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-27")))]),i("el-button",{attrs:{type:"primary",disabled:!e.canSend,size:"mini"},on:{click:function(t){return e.copyText(e.createCode)}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-28")))])],1)],1),i("div",{staticClass:"create-code"},[e._v(e._s(e.createCode))])])],1),i("div",{directives:[{name:"show",rawName:"v-show",value:e.editName,expression:"editName"}],staticClass:"dialog-content"},[i("el-form",{attrs:{model:e.editNameForm,"label-width":"100px"}},[i("el-form-item",{attrs:{label:e.$t("device.instruction-parsing.830424-29")}},[i("el-input",{staticStyle:{width:"350px"},attrs:{placeholder:e.$t("device.instruction-parsing.830424-30")},model:{value:e.editNameForm.name,callback:function(t){e.$set(e.editNameForm,"name",t)},expression:"editNameForm.name"}})],1),i("el-form-item",{attrs:{label:e.$t("device.instruction-parsing.830424-31")}},[i("el-input",{staticStyle:{width:"350px"},attrs:{disabled:!0},model:{value:e.editNameForm.command,callback:function(t){e.$set(e.editNameForm,"command",t)},expression:"editNameForm.command"}})],1)],1)],1),i("div",{staticClass:"dialog-btn",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{directives:[{name:"loading",rawName:"v-loading",value:e.saveLoading,expression:"saveLoading"}],attrs:{type:"primary",disabled:!e.canSend},on:{click:e.confrimBtn}},[e._v(e._s(e.$t("device.instruction-parsing.830424-33")))]),i("el-button",{attrs:{type:""},on:{click:function(t){e.editDialog=!1}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-32")))])],1)]),i("el-dialog",{attrs:{visible:e.delDialog,title:e.$t("device.instruction-parsing.830424-34"),width:"420px"},on:{"update:visible":function(t){e.delDialog=t}}},[i("div",{staticStyle:{padding:"20px"}},[e._v(e._s(e.$t("device.instruction-parsing.830424-35"))+e._s(e.delItem.name)+e._s(e.$t("device.instruction-parsing.830424-36")))]),i("div",{staticClass:"dialog-btn",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.delQuick}},[e._v(e._s(e.$t("device.instruction-parsing.830424-38")))]),i("el-button",{attrs:{type:""},on:{click:function(t){e.delDialog=!1}}},[e._v(e._s(e.$t("device.instruction-parsing.830424-37")))])],1)]),i("el-dialog",{attrs:{title:e.$t("device.instruction-parsing.830424-39"),width:"700px",visible:e.moreDialog},on:{"update:visible":function(t){e.moreDialog=t}}},[i("div",{staticClass:"dialog-content"},[i("el-table",{attrs:{data:e.analysisList,height:"400",border:!1}},[i("el-table-column",{attrs:{type:"index",label:e.$t("device.instruction-parsing.830424-40"),align:"center","min-width":"100"}}),i("el-table-column",{attrs:{prop:"name",label:e.$t("device.instruction-parsing.830424-41"),align:"left","min-width":"160"}}),i("el-table-column",{attrs:{prop:"id",label:e.$t("device.instruction-parsing.830424-42"),align:"left","min-width":"120"}}),i("el-table-column",{attrs:{prop:"value",label:e.$t("device.instruction-parsing.830424-43"),align:"left","min-width":"120"}})],1)],1)])],1)},r=[],n=i("c7eb"),s=i("1da1"),o=(i("a15b"),i("d81d"),i("14d9"),i("a434"),i("b0c0"),i("cf45")),l=i("bc13"),c={props:{device:{type:Object,default:null}},created:function(){this.getPreferencesList()},watch:{device:function(){this.getPreferencesList()}},computed:{registerNumTitle:function(){switch(this.createForm.functionCode){case"01":case"02":case"15":return this.$t("device.instruction-parsing.830424-44");case"03":case"04":case"16":return this.$t("device.instruction-parsing.830424-45");case"05":return this.$t("device.instruction-parsing.830424-46");case"06":return this.$t("device.instruction-parsing.830424-47")}}},data:function(){return{format:"Hex",formatList:["Hex","JSON","Plaintext"],logList:[],sendVal:"",topic:"/function/get",dataType:"hex",quickParsing:[],editDialog:!1,createForm:{},functionCodeList:[{label:this.$t("device.instruction-parsing.830424-48"),value:"01"},{label:this.$t("device.instruction-parsing.830424-49"),value:"02"},{label:this.$t("device.instruction-parsing.830424-50"),value:"03"},{label:this.$t("device.instruction-parsing.830424-51"),value:"04"},{label:this.$t("device.instruction-parsing.830424-52"),value:"05"},{label:this.$t("device.instruction-parsing.830424-53"),value:"06"},{label:this.$t("device.instruction-parsing.830424-54"),value:"15"},{label:this.$t("device.instruction-parsing.830424-55"),value:"16"}],startList:[{label:this.$t("device.instruction-parsing.830424-56"),value:"0xFFDD"},{label:this.$t("device.instruction-parsing.830424-57"),value:"0xFFAA"}],createCode:"",registerValList:[],reportValList:[],IOValList:[],editName:!1,editNameForm:{},createLoading:!1,delDialog:!1,delItem:{},analysisList:[],moreDialog:!1,saveLoading:!1,canSend:!1}},methods:{openEdit:function(){this.resetCreateForm(),this.editName=!1,this.editDialog=!0,this.canSend=!1},openMore:function(e){this.analysisList=e.analysisList||[],this.moreDialog=!0},openEditName:function(e){this.editNameForm={name:e.name||"",command:e.command},this.editName=!0,this.editDialog=!0},resetCreateForm:function(){this.createForm={path:"01",functionCode:"01",startPath:0,startPath16:"0000",registerNum:1,startPathSwitch:"Dec",setValue:0,setValue16:"0000",setValueSwitch:"Dec",start:"0xFFDD"},this.createCode=""},int2hex:function(e){return Object(o["f"])(e)},hex2int:function(e){return Object(o["e"])(e)},changeNum:function(){if("0xFFAA"==this.createForm.start){for(var e=0;e<this.createForm.registerNum;e++){var t=this.reportValList[e];t||(this.reportValList[e]={value:0,value16:"0000",switch:"Dec"})}if(this.registerValList.length>this.createForm.reportValList){var i=this.reportValList.length-this.createForm.reportValList;this.registerValList.splice(this.createForm.reportValList,i)}this.createForm.functionCode="03"}else{if("16"==this.createForm.functionCode){for(var a=0;a<this.createForm.registerNum;a++){var r=this.registerValList[a];r||(this.registerValList[a]={value:0,value16:"0000",switch:"Dec"})}if(this.registerValList.length>this.createForm.registerNum){var n=this.registerValList.length-this.createForm.registerNum;this.registerValList.splice(this.createForm.registerNum,n)}}if("15"==this.createForm.functionCode){for(var s=0;s<this.createForm.registerNum;s++){var o=this.IOValList[s];o||(this.IOValList[s]={value:"0"})}if(this.IOValList.length>this.createForm.registerNum){var l=this.IOValList.length-this.createForm.registerNum;this.IOValList.splice(this.createForm.registerNum,l)}}}},refreshRegisterInpust:function(e,t){this.$set(this.registerValList,t,e)},refreshReportValList:function(e,t){this.$set(this.reportValList,t,e)},refreshIOInpust:function(e,t){this.$set(this.IOValList,t,e)},confrimBtn:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.editName){t.next=19;break}if(t.prev=1,e.saveLoading=!0,!e.editNameForm.id){t.next=8;break}return t.next=6,Object(l["c"])({command:e.editNameForm.command,name:e.editNameForm.name,serialNumber:e.device.serialNumber,id:e.editNameForm.id});case 6:t.next=10;break;case 8:return t.next=10,Object(l["a"])({command:e.editNameForm.command,name:e.editNameForm.name,serialNumber:e.device.serialNumber});case 10:e.$message({type:"success",message:"".concat(e.editNameForm.id?e.$t("device.instruction-parsing.830424-58"):e.$t("device.instruction-parsing.830424-59")+e.$t("device.instruction-parsing.830424-60"))}),e.getPreferencesList(),t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](1),e.$message({type:"error",message:t.t0.message||"".concat(e.editNameForm.id?e.$t("device.instruction-parsing.830424-58"):e.$t("device.instruction-parsing.830424-59")+e.$t("device.instruction-parsing.830424-61"))});case 17:t.next=20;break;case 19:e.sendVal=e.createCode;case 20:e.saveLoading=!1,e.editDialog=!1;case 22:case"end":return t.stop()}}),t,null,[[1,14]])})))()},getPreferencesList:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i,a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l["f"])({serialNumber:e.device.serialNumber});case 3:i=t.sent,a=i.rows,e.quickParsing=a,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log("🚀 ~ getPreferencesList ~ err:",t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()},quickClick:function(e){this.sendVal=e.command},copyText:function(e){var t=Object(o["a"])(e);this.$message({type:t.type,message:t.message})},encode:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i,a,r,s,o;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.createLoading=!0,i={slaveId:parseInt(e.createForm.path),address:e.createForm.startPath,code:parseInt(e.createForm.functionCode),start:e.createForm.start,protocolCode:e.device.protocolCode,serialNumber:e.device.serialNumber},"0xFFAA"!=e.createForm.start){t.next=10;break}i.address=e.createForm.startPath,i.bitCount=2*e.createForm.registerNum,a=e.reportValList.map((function(e){return e.value})),i.data=a,t.next=25;break;case 10:t.t0=e.createForm.functionCode,t.next="01"===t.t0||"02"===t.t0||"03"===t.t0||"04"===t.t0?13:"05"===t.t0||"06"===t.t0?15:"15"===t.t0?17:"16"===t.t0?21:25;break;case 13:return i.count=e.createForm.registerNum,t.abrupt("break",25);case 15:return i.writeData=e.createForm.setValue,t.abrupt("break",25);case 17:return i.count=e.createForm.registerNum,r=e.IOValList.map((function(e){return e.value})),i.bitString=r.join(""),t.abrupt("break",25);case 21:return i.count=e.createForm.registerNum,s=e.registerValList.map((function(e){return e.value})),i.tenWriteData=s,t.abrupt("break",25);case 25:return t.next=27,Object(l["d"])(i);case 27:o=t.sent,e.createCode=o.msg,t.next=34;break;case 31:t.prev=31,t.t1=t["catch"](0),e.$message({type:"error",message:t.t1.message||e.$t("device.instruction-parsing.830424-62")});case 34:return t.prev=34,e.createLoading=!1,e.canSend=!0,t.finish(34);case 38:case"end":return t.stop()}}),t,null,[[0,31,34,38]])})))()},sendMessage:function(){var e=this;try{if(!this.sendVal)throw{message:this.$t("device.instruction-parsing.830424-63")};Object(l["e"])({message:this.sendVal,serialNumber:this.device.serialNumber,topicName:this.topic,dataType:this.dataType}).then((function(t){e.logList.push({type:0,time:Object(o["d"])(new Date),value:e.sendVal,loading:!1,analysis:!1,analysisList:[]})}))}catch(t){this.$message({type:"error",message:t.message||this.$t("device.instruction-parsing.830424-64")})}},analysisData:function(e,t){try{if(e.loading=!0,e.analysis=!0,!e.analysisList[0])throw{message:this.$t("device.instruction-parsing.830424-65")};e.analysisVal={name:e.analysisList[0].name,value:e.analysisList[0].value,id:e.analysisList[0].id}}catch(i){this.$message({type:"error",message:i.message||this.$t("device.instruction-parsing.830424-66")})}finally{e.loading=!1}},onContextmenu:function(e,t){var i=this,a=[{label:this.$t("device.instruction-parsing.830424-67"),icon:"iconfont el-icon-edit-outline",onClick:function(){i.editNameForm=Object(o["b"])(t),i.editName=!0,i.editDialog=!0}},{label:this.$t("device.instruction-parsing.830424-68"),icon:"iconfont el-icon-delete",onClick:function(){i.delItem=t,i.delDialog=!0}}];return this.$contextmenu({items:a,event:e,zIndex:3,minWidth:230}),!1},delQuick:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l["b"])(e.delItem);case 3:e.$message({type:"success",message:e.$t("device.instruction-parsing.830424-69")}),e.delDialog=!1,e.getPreferencesList(),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),e.$message({type:"error",message:t.t0.message||e.$t("device.instruction-parsing.830424-70")});case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}},mounted:function(){var e=this;this.resetCreateForm(),this.$busEvent.$on("updateData",(function(t){var i=t.serialNumber,a=(t.productId,t.data);i==e.device.serialNumber&&e.logList.push({type:2,time:Object(o["d"])(new Date),value:a.sources,loading:!1,analysis:!1,analysisList:a.message})}))},beforeDestroy:function(){this.$busEvent.$off("updateMqttMessage")}},d=c,u=(i("86d9"),i("2877")),p=Object(u["a"])(d,a,r,!1,null,"55634bb7",null);t["default"]=p.exports},e2de:function(e,t,i){"use strict";i.d(t,"g",(function(){return r})),i.d(t,"e",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"d",(function(){return o})),i.d(t,"k",(function(){return l})),i.d(t,"h",(function(){return c})),i.d(t,"c",(function(){return d})),i.d(t,"i",(function(){return u})),i.d(t,"b",(function(){return p})),i.d(t,"f",(function(){return h})),i.d(t,"j",(function(){return f})),i.d(t,"l",(function(){return m}));var a=i("b775");function r(e){return Object(a["a"])({url:"/sip/channel/list",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/sip/channel/"+e,method:"get"})}function s(e,t){return Object(a["a"])({url:"/sip/channel/"+e,method:"post",data:t})}function o(e){return Object(a["a"])({url:"/sip/channel/"+e,method:"delete"})}function l(e,t){return Object(a["a"])({url:"/sip/player/play/"+e+"/"+t,method:"get"})}function c(e,t,i){return Object(a["a"])({url:"/sip/player/playback/"+e+"/"+t,method:"get",params:i})}function d(e,t,i){return Object(a["a"])({url:"/sip/player/closeStream/"+e+"/"+t+"/"+i,method:"get"})}function u(e,t,i,r){return Object(a["a"])({url:"/sip/player/playbackSeek/"+e+"/"+t+"/"+i,method:"get",params:r})}function p(e){return Object(a["a"])({url:"/iot/relation/addOrUp",method:"post",data:e})}function h(e,t){return Object(a["a"])({url:"/sip/talk/getPushUrl/"+e+"/"+t,method:"get"})}function f(e,t){return Object(a["a"])({url:"/sip/talk/broadcast/"+e+"/"+t,method:"get"})}function m(e,t){return Object(a["a"])({url:"/sip/talk/broadcast/stop/"+e+"/"+t,method:"get"})}},e51f:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:e.$t("device.product-list.058448-0"),visible:e.open,width:"910px"},on:{"update:visible":function(t){e.open=t}}},[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"},nativeOn:{submit:function(e){e.preventDefault()}}},[i("el-form-item",{attrs:{prop:"productName"}},[i("el-input",{attrs:{placeholder:e.$t("device.product-list.058448-2"),clearable:"",size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.productName,callback:function(t){e.$set(e.queryParams,"productName",t)},expression:"queryParams.productName"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"small"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("device.product-list.058448-3")))]),i("el-button",{attrs:{icon:"el-icon-refresh",size:"small"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("device.product-list.058448-4")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"singleTable",attrs:{data:e.productList,"highlight-current-row":"",size:"small",border:!1},on:{"row-click":e.rowClick}},[i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-6"),width:"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[i("input",{attrs:{type:"radio",name:"product"},domProps:{checked:e.row.isSelect}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.allot-record.155854-2"),align:"left",prop:"productName","min-width":"180"}}),i("el-table-column",{attrs:{label:e.$t("device.product-list.058448-6"),align:"left",prop:"categoryName","min-width":"150"}}),i("el-table-column",{attrs:{label:e.$t("device.product-list.058448-7"),align:"left",prop:"tenantName","min-width":"100"}}),i("el-table-column",{attrs:{label:e.$t("device.product-list.058448-8"),align:"center",prop:"status",width:"70"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.isAuthorize?i("el-tag",{attrs:{type:"success"}},[e._v(e._s(e.$t("device.product-list.058448-9")))]):e._e(),0==t.row.isAuthorize?i("el-tag",{attrs:{type:"info"}},[e._v(e._s(e.$t("device.product-list.058448-10")))]):e._e()]}}])}),i("el-table-column",{attrs:{label:e.$t("device.product-list.058448-11"),align:"center",prop:"status","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_vertificate_method,value:t.row.vertificateMethod}})]}}])}),i("el-table-column",{attrs:{label:e.$t("device.product-list.058448-12"),align:"center",prop:"networkMethod","min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("dict-tag",{attrs:{options:e.dict.type.iot_network_method,value:t.row.networkMethod}})]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{layout:"prev, pager, next",total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.confirmSelectProduct}},[e._v(e._s(e.$t("device.product-list.058448-14")))]),i("el-button",{attrs:{type:"info"},on:{click:e.closeDialog}},[e._v(e._s(e.$t("device.product-list.058448-15")))])],1)],1)},r=[],n=(i("a9e3"),i("9b9c")),s={name:"ProductList",dicts:["iot_vertificate_method","iot_network_method"],props:{productId:{type:Number,default:0},showSenior:{type:Boolean,default:!0}},data:function(){return{loading:!0,total:0,open:!1,productList:[],product:{},queryParams:{pageNum:1,pageSize:10,productName:null,categoryId:null,categoryName:null,tenantId:null,tenantName:null,isSys:null,status:2,deviceType:null,networkMethod:null}}},created:function(){},methods:{getList:function(){var e=this;this.loading=!0,this.queryParams.showSenior=this.showSenior,Object(n["g"])(this.queryParams).then((function(t){for(var i=0;i<t.rows.length;i++)t.rows[i].isSelect=!1;e.productList=t.rows,e.total=t.total,0!=e.productId&&e.setRadioSelected(e.productId),e.loading=!1}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},rowClick:function(e){null!=e&&(this.setRadioSelected(e.productId),this.product=e)},setRadioSelected:function(e){for(var t=0;t<this.productList.length;t++)this.productList[t].productId==e?this.productList[t].isSelect=!0:this.productList[t].isSelect=!1},confirmSelectProduct:function(){this.$emit("productEvent",this.product),this.open=!1},closeDialog:function(){this.open=!1}}},o=s,l=i("2877"),c=Object(l["a"])(o,a,r,!1,null,null,null);t["default"]=c.exports},e626:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"device-edit"},[i("el-card",{staticClass:"top-card",attrs:{"body-style":{padding:"26px 20px"}}},[i("div",{staticClass:"title-wrap"},[i("el-button",{staticClass:"top-button",attrs:{type:"info",size:"small"},on:{click:function(t){return e.goBack()}}},[i("i",{staticClass:"el-icon-arrow-left"}),e._v(" "+e._s(e.$t("product.product-edit.473153-44"))+" ")]),i("span",{staticClass:"info-item"},[e._v(e._s(e.$t("device.device-edit.148398-1"))+""+e._s(e.form.deviceName))]),i("span",{staticClass:"info-item"},[e._v(e._s(e.$t("device.device-edit.148398-7"))+""+e._s(e.form.serialNumber))]),e.form.status?i("span",{staticClass:"info-item"},[e._v(" "+e._s(e.$t("device.device-edit.148398-83"))+" "),i("span",{staticClass:"status",style:{color:e.statusColor}},[i("span",{staticClass:"dot",style:{backgroundColor:e.statusColor}}),1==e.form.status?i("span",[e._v(e._s(e.$t("home.notActive")))]):e._e(),2==e.form.status?i("span",[e._v(e._s(e.$t("home.disabled")))]):e._e(),3==e.form.status?i("span",[e._v(e._s(e.$t("home.onLine")))]):e._e(),4==e.form.status?i("span",[e._v(e._s(e.$t("home.offline")))]):e._e()])]):e._e(),i("span",{staticClass:"info-item"},[e._v(e._s(e.$t("device.device-edit.148398-4"))+""+e._s(e.form.productName))])],1)]),i("el-card",{staticStyle:{"padding-bottom":"100px"}},[i("el-tabs",{staticClass:"custom-tabs",staticStyle:{"min-height":"400px"},attrs:{id:"deviceDetailTab","tab-position":"top",lazy:""},on:{"tab-click":e.tabChange},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[i("el-tab-pane",{attrs:{name:"basic"}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-0")))]),i("el-form",{ref:"form",staticClass:"basic-span",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[i("el-row",{attrs:{gutter:100}},[i("el-col",{attrs:{xs:24,sm:24,md:24,lg:12,xl:8}},[i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-1"),prop:"deviceName"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-2")},model:{value:e.form.deviceName,callback:function(t){e.$set(e.form,"deviceName",t)},expression:"form.deviceName"}},[0!=e.form.deviceId?i("el-button",{attrs:{slot:"append"},on:{click:e.openSummaryDialog},slot:"append"},[e._v(e._s(e.$t("device.device-edit.148398-3")))]):e._e()],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-4"),prop:"productName"}},[i("el-input",{attrs:{readonly:"",placeholder:e.$t("device.device-edit.148398-5"),disabled:1!=e.form.status},model:{value:e.form.productName,callback:function(t){e.$set(e.form,"productName",t)},expression:"form.productName"}},[i("el-button",{attrs:{slot:"append",disabled:1!=e.form.status},on:{click:function(t){return e.selectProduct()}},slot:"append"},[e._v(e._s(e.$t("device.device-edit.148398-6")))])],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-7"),prop:"serialNumber"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-8"),maxlength:"32",disabled:1!=e.form.status,readonly:3===e.form.deviceType},model:{value:e.form.serialNumber,callback:function(t){e.$set(e.form,"serialNumber",t)},expression:"form.serialNumber"}},[3!==e.form.deviceType?i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:add"],expression:"['iot:device:add']"}],attrs:{slot:"append",loading:e.genDisabled,disabled:1!=e.form.status},on:{click:e.generateNum},slot:"append"},[e._v(" "+e._s(e.$t("device.device-edit.148398-9"))+" ")]):e._e(),3===e.form.deviceType?i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:add"],expression:"['iot:device:add']"}],attrs:{slot:"append",disabled:1!=e.form.status},on:{click:function(t){return e.genSipID()}},slot:"append"},[e._v(" "+e._s(e.$t("device.device-edit.148398-9"))+" ")]):e._e()],1),e.openServerTip?i("el-alert",{staticClass:"alert-wrap",attrs:{type:"info","show-icon":"",description:e.$t("device.device-edit.148398-10")}}):e._e()],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-12"),prop:"firmwareVersion"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-13"),type:"number",step:"0.1",readonly:1!=e.form.status||3===e.form.deviceType},model:{value:e.form.firmwareVersion,callback:function(t){e.$set(e.form,"firmwareVersion",t)},expression:"form.firmwareVersion"}},[i("template",{slot:"prepend"},[e._v("Version")]),i("template",{slot:"append"},[e._v(e._s(1===e.form.firmwareType?e.$t("firmware.index.222541-52"):e.$t("firmware.index.222541-53")))])],2)],1),3!==e.form.deviceType?i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-15"),prop:"isShadow"}},[i("el-radio-group",{model:{value:e.form.isShadow,callback:function(t){e.$set(e.form,"isShadow",t)},expression:"form.isShadow"}},[i("el-radio",{attrs:{label:1}},[e._v(e._s(e.$t("device.device-edit.148398-85")))]),i("el-radio",{attrs:{label:0}},[e._v(e._s(e.$t("device.device-edit.148398-86")))])],1)],1):e._e(),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-32"),prop:"rssi"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-33"),readonly:""},model:{value:e.form.rssi,callback:function(t){e.$set(e.form,"rssi",t)},expression:"form.rssi"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-17"),prop:"remark"}},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},placeholder:e.$t("device.device-edit.148398-18")},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),i("el-col",{attrs:{xs:24,sm:24,md:24,lg:12,xl:8}},[i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-19"),prop:"locationWay"}},[i("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("device.device-edit.148398-20"),clearable:""},model:{value:e.form.locationWay,callback:function(t){e.$set(e.form,"locationWay",t)},expression:"form.locationWay"}},e._l(e.dict.type.iot_location_way,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:Number(e.value)}})})),1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-21"),prop:"longitude"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-22"),type:"number",disabled:3!==e.form.locationWay},model:{value:e.form.longitude,callback:function(t){e.$set(e.form,"longitude",t)},expression:"form.longitude"}},[i("el-link",{attrs:{slot:"append",underline:!1,href:"https://api.map.baidu.com/lbsapi/getpoint/index.html",target:"_blank",disabled:3!=e.form.locationWay},slot:"append"},[e._v(" "+e._s(e.$t("device.device-edit.148398-23"))+" ")])],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-24"),prop:"latitude"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-25"),type:"number",disabled:3!==e.form.locationWay},model:{value:e.form.latitude,callback:function(t){e.$set(e.form,"latitude",t)},expression:"form.latitude"}},[i("el-link",{attrs:{slot:"append",underline:!1,href:"https://api.map.baidu.com/lbsapi/getpoint/index.html",target:"_blank",disabled:3!=e.form.locationWay},slot:"append"},[e._v(" "+e._s(e.$t("device.device-edit.148398-23"))+" ")])],1)],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-26"),prop:"networkAddress"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-27"),disabled:3!==e.form.locationWay},model:{value:e.form.networkAddress,callback:function(t){e.$set(e.form,"networkAddress",t)},expression:"form.networkAddress"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-28"),prop:"networkIp"}},[i("el-input",{attrs:{placeholder:e.$t("device.device-edit.148398-29"),readonly:""},model:{value:e.form.networkIp,callback:function(t){e.$set(e.form,"networkIp",t)},expression:"form.networkIp"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-30"),prop:"activeTime"}},[i("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:e.$t("device.device-edit.148398-31"),readonly:""},model:{value:e.form.activeTime,callback:function(t){e.$set(e.form,"activeTime",t)},expression:"form.activeTime"}})],1),"MQTT"===e.form.transport?i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-16"),prop:"deviceStatus"}},[i("el-switch",{attrs:{"active-text":"","inactive-text":"",disabled:1===e.form.status,"active-value":1,"inactive-value":0},model:{value:e.deviceStatus,callback:function(t){e.deviceStatus=t},expression:"deviceStatus"}})],1):e._e(),0!=e.form.deviceId?i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-34"),prop:"remark"}},[i("el-button",{attrs:{size:"mini",disabled:"MQTT"!==this.form.transport&&"TCP"!==this.form.transport&&"HTTP"!==this.form.transport&&"GB28181"!==this.form.transport},on:{click:function(t){return e.handleViewMqtt()}}},[e._v(" "+e._s(e.$t("device.device-edit.148398-35"))+" ")]),i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openCodeDialog()}}},[e._v(e._s(e.$t("device.device-edit.148398-36")))])],1):e._e()],1),0!=e.form.deviceId?i("el-col",{attrs:{xs:24,sm:24,md:24,lg:12,xl:8}},[i("div",{staticStyle:{border:"1px solid #dfe4ed","border-radius":"5px",padding:"5px","margin-left":"20px"}},[i("div",{staticStyle:{height:"435px",width:"100%"},attrs:{id:"map"}},[e._v(e._s(e.$t("device.device-edit.148398-37")))])])]):e._e()],1)],1),i("el-form",{staticStyle:{"margin-top":"70px"},attrs:{"label-width":"100px"}},[i("el-form-item",{staticStyle:{"text-align":"center","margin-left":"-100px","margin-top":"10px"}},[i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:edit"],expression:"['iot:device:edit']"},{name:"show",rawName:"v-show",value:0!=e.form.deviceId,expression:"form.deviceId != 0"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("update"))+" ")]),i("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:add"],expression:"['iot:device:add']"},{name:"show",rawName:"v-show",value:0==e.form.deviceId,expression:"form.deviceId == 0"}],attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("add"))+" ")])],1)],1),i("product-list",{ref:"productList",attrs:{productId:e.form.productId},on:{productEvent:function(t){return e.getProductData(t)}}}),i("sipid",{ref:"sipidGen",attrs:{product:e.form},on:{addGenEvent:function(t){return e.getSipIDData(t)}}})],1),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"runningStatus"}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-42")))]),i("running-status",{ref:"runningStatus",attrs:{device:e.form},on:{statusEvent:function(t){return e.getDeviceStatusData(t)}}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"variable",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-74")))]),i("device-variable",{ref:"deviceVariable",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"instructionParsing",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-76")))]),i("instruction-parsing",{ref:"instructionParsing",attrs:{device:e.form}})],1):e._e(),2!=e.form.deviceType||"MODBUS-RTU"!=e.form.protocolCode&&"MODBUS-TCP"!=e.form.protocolCode&&"MODBUS-JSON-HP"!=e.form.protocolCode&&"MODBUS-JSON-ZQWL"!=e.form.protocolCode?e._e():i("el-tab-pane",{attrs:{name:"deviceSub",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-43")))]),i("device-sub",{ref:"deviceSub",attrs:{device:e.form}})],1),!0===e.form.canConfigPoll?i("el-tab-pane",{attrs:{name:"deviceModbusTask",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-77")))]),i("device-modbus-task",{ref:"deviceModbusTask",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType&&1==e.isShowScada?i("el-tab-pane",{attrs:{name:"scada",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-73")))]),i("device-scada",{ref:"deviceScada",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"deviceMonitor",disabled:0==e.form.deviceId}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-51")))]),i("device-monitor",{ref:"deviceMonitor",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"deviceStastic",disabled:0==e.form.deviceId}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-52")))]),i("device-statistic",{ref:"deviceStatistic",attrs:{device:e.form}})],1):e._e(),3===e.form.deviceType?i("el-tab-pane",{attrs:{name:"sipChannel",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-44")))]),i("channel",{ref:"Channel",attrs:{device:e.form},on:{playerEvent:function(t){return e.getPlayerData(t)}}})],1):e._e(),3===e.form.deviceType?i("el-tab-pane",{attrs:{name:"sipPlayer",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-45")))]),i("device-live-stream",{ref:"deviceLiveStream",attrs:{device:e.form}})],1):e._e(),3===e.form.deviceType?i("el-tab-pane",{attrs:{name:"sipVideo",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-46")))]),i("deviceVideo",{ref:"deviceVideo",attrs:{device:e.form}})],1):e._e(),3===e.form.deviceType?i("el-tab-pane",{attrs:{name:"ossRecord",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-79")))]),i("oss-record-list",{ref:"OssRecord",attrs:{device:e.form}})],1):e._e(),3===e.form.deviceType?i("el-tab-pane",{attrs:{name:"sipTalk",disabled:0==e.form.deviceId}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-82")))]),i("siptalk",{ref:"siptalk",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"deviceTimer",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-47")))]),i("device-timer",{ref:"deviceTimer",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"deviceLog",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-49")))]),i("device-log",{ref:"deviceLog",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"deviceFuncLog",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-50")))]),i("device-func",{ref:"deviceFuncLog",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:alert:user:list"],expression:"['iot:device:alert:user:list']"}],attrs:{name:"alertUser",disabled:0==e.form.deviceId}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-80")))]),i("alert-user",{ref:"alertUser",attrs:{device:e.form}})],1):e._e(),3!==e.form.deviceType?i("el-tab-pane",{attrs:{name:"inlineVideo",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-75")))]),i("device-inline-video",{ref:"deviceInlineVideo",attrs:{sipRelationList:e.form.sipRelationVOList}})],1):e._e(),i("el-tab-pane",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:alertLog:list"],expression:"['iot:alertLog:list']"}],attrs:{name:"deviceAlert",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-81")))]),i("device-alert",{ref:"deviceAlert",attrs:{device:e.form}})],1),i("el-tab-pane",{attrs:{name:"deviceUser",disabled:0==e.form.deviceId,lazy:""}},[i("span",{attrs:{slot:"label"},slot:"label"},[e._v(e._s(e.$t("device.device-edit.148398-48")))]),i("device-user",{ref:"deviceUser",attrs:{device:e.form},on:{userEvent:function(t){return e.getUserData(t)}}})],1)],1),i("el-dialog",{attrs:{title:e.$t("device.device-edit.148398-54"),visible:e.openSummary,width:"700px","append-to-body":""},on:{"update:visible":function(t){e.openSummary=t}}},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:14}},[i("div",{staticStyle:{border:"1px solid #ccc",height:"234px",width:"360px",overflow:"scroll"}},[i("json-viewer",{staticStyle:{"margin-top":"5px",cursor:"pointer"},attrs:{value:e.summary,"expand-depth":10,copyable:""},scopedSlots:e._u([{key:"copy",fn:function(){return[e._v(e._s(e.$t("device.device-edit.148398-55")))]},proxy:!0}])})],1)]),i("el-col",{attrs:{span:10}},[i("div",{staticStyle:{border:"1px solid #ccc",width:"220px","text-align":"center","margin-left":"20px"}},[i("vue-qr",{attrs:{text:e.qrText,size:200}}),i("div",{staticStyle:{"padding-bottom":"10px"}},[e._v(e._s(e.$t("device.device-edit.148398-56")))])],1)])],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.closeSummaryDialog}},[e._v(e._s(e.$t("device.device-edit.148398-57")))])],1)],1),i("el-dialog",{attrs:{visible:e.openCode,width:"300px","append-to-body":""},on:{"update:visible":function(t){e.openCode=t}}},[i("div",{staticStyle:{border:"1px solid #ccc",width:"220px","text-align":"center",margin:"0 auto","margin-top":"-15px"}},[i("vue-qr",{attrs:{text:e.qrText,size:200}}),i("div",{staticStyle:{"padding-bottom":"10px"}},[e._v(e._s(e.$t("device.device-edit.148398-56")))])],1)]),i("el-dialog",{attrs:{title:e.$t("device.device-edit.148398-58"),visible:e.openViewMqtt,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.openViewMqtt=t}}},["MQTT"==this.form.transport?i("el-form",{ref:"listQuery",attrs:{model:e.listQuery,rules:e.rules,"label-width":"120px"}},[i("el-form-item",{attrs:{label:"clientId",prop:"clientId"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{disabled:""},model:{value:e.listQuery.clientId,callback:function(t){e.$set(e.listQuery,"clientId",t)},expression:"listQuery.clientId"}})],1),i("el-form-item",{attrs:{label:"username",prop:"username"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{disabled:""},model:{value:e.listQuery.username,callback:function(t){e.$set(e.listQuery,"username",t)},expression:"listQuery.username"}})],1),i("el-form-item",{attrs:{label:"passwd",prop:"passwd"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.passwd,callback:function(t){e.$set(e.listQuery,"passwd",t)},expression:"listQuery.passwd"}})],1),i("el-form-item",{attrs:{label:"subscribeTopic",prop:"subscribeTopic"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.subscribeTopic,callback:function(t){e.$set(e.listQuery,"subscribeTopic",t)},expression:"listQuery.subscribeTopic"}})],1),i("el-form-item",{attrs:{label:"reportTopic",prop:"reportTopic"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.reportTopic,callback:function(t){e.$set(e.listQuery,"reportTopic",t)},expression:"listQuery.reportTopic"}})],1),i("el-form-item",{attrs:{label:"port",prop:"port"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.port,callback:function(t){e.$set(e.listQuery,"port",t)},expression:"listQuery.port"}})],1)],1):e._e(),"TCP"==this.form.transport?i("el-form",{ref:"listQuery",attrs:{model:e.listQuery,rules:e.rules,"label-width":"120px"}},[i("el-form-item",{attrs:{label:"enrollPackage",prop:"enrollPackage"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.enrollPackage,callback:function(t){e.$set(e.listQuery,"enrollPackage",t)},expression:"listQuery.enrollPackage"}})],1),i("el-form-item",{attrs:{label:"port",prop:"port"}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.listQuery.port,callback:function(t){e.$set(e.listQuery,"port",t)},expression:"listQuery.port"}})],1)],1):e._e(),"HTTP"==this.form.transport?i("el-form",{ref:"httpForm",attrs:{model:e.httpForm,rules:e.rules,"label-width":"120px"}},[i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-91")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.httpForm.type,callback:function(t){e.$set(e.httpForm,"type",t)},expression:"httpForm.type"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-92")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.httpForm.username,callback:function(t){e.$set(e.httpForm,"username",t)},expression:"httpForm.username"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-93")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.httpForm.password,callback:function(t){e.$set(e.httpForm,"password",t)},expression:"httpForm.password"}})],1)],1):e._e(),"GB28181"==this.form.transport?i("el-form",{ref:"GBform",attrs:{model:e.GBform,rules:e.rules,"label-width":"120px"}},[i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-87")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.GBform.domainAlias,callback:function(t){e.$set(e.GBform,"domainAlias",t)},expression:"GBform.domainAlias"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-88")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.GBform.serverSipid,callback:function(t){e.$set(e.GBform,"serverSipid",t)},expression:"GBform.serverSipid"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-89")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.GBform.password,callback:function(t){e.$set(e.GBform,"password",t)},expression:"GBform.password"}})],1),i("el-form-item",{attrs:{label:e.$t("device.device-edit.148398-90")}},[i("el-input",{staticStyle:{width:"400px"},attrs:{clearable:"",disabled:""},model:{value:e.GBform.port,callback:function(t){e.$set(e.GBform,"port",t)},expression:"GBform.port"}})],1)],1):e._e(),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{staticClass:"btns",attrs:{type:"primary"},on:{click:function(t){return e.doCopy(2)}}},[e._v(e._s(e.$t("device.device-edit.148398-59")))]),i("el-button",{on:{click:e.closeSummaryDialog}},[e._v(e._s(e.$t("device.device-edit.148398-57")))])],1)],1)],1)],1)},r=[],n=i("c7eb"),s=i("1da1"),o=(i("99af"),i("caad"),i("d81d"),i("14d9"),i("a434"),i("c19f"),i("ace4"),i("b0c0"),i("e9c4"),i("a9e3"),i("b64b"),i("d3b7"),i("ac1f"),i("00b4"),i("25f0"),i("8a79"),i("2532"),i("5cc6"),i("907a"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("986a"),i("1d02"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),i("1b3b"),i("3d71"),i("c6e3"),i("159b"),i("0b22"),i("349e")),l=i.n(o),c=i("e51f"),d=i("7168"),u=i("7bce"),p=i("05c6"),h=i("b52e"),f=i("5f43"),m=i("dd50"),v=i("f14e"),g=i("e1f3"),y=i("2f32"),b=i("7a72"),w=i("67dd"),_=i("97d6"),x=i("f5fc"),k=i("8076"),$=i("4e25"),I=i("ecd9"),S=i("9467"),j=i("20f7"),C=i("3e92"),L=i("14f8"),P=i("1c4f"),N=i("9626"),T=i("658f5"),O=i.n(T),D=i("09cb"),M=i("584f"),E=i("01ca"),F=i("5daf"),A=i("f5de"),R=i("83d6"),q={name:"DeviceEdit",dicts:["iot_device_status","iot_location_way"],components:{RealTimeStatus:F["default"],DeviceFunc:P["default"],deviceLog:d["default"],deviceAlert:u["default"],deviceUser:h["default"],alertUser:p["default"],deviceMonitor:m["default"],deviceStatistic:v["default"],runningStatus:f["default"],productList:c["default"],deviceTimer:b["default"],deviceFuncLog:P["default"],deviceVideo:x["default"],siptalk:k["default"],OssRecordList:$["default"],player:_["default"],deviceLiveStream:I["default"],deviceSub:N["default"],JsonViewer:l.a,vueQr:O.a,channel:w["default"],sipid:S["default"],deviceScada:j["default"],deviceVariable:C["default"],instructionParsing:g["default"],deviceModbusTask:y["default"],deviceInlineVideo:L["default"]},watch:{activeName:function(e){"deviceStastic"==e&&this.$nextTick((function(){}))}},computed:{deviceStatus:{set:function(e){this.form.status=1==e?2:this.oldDeviceStatus},get:function(){return 2==this.form.status?1:0}},statusColor:function(){switch(this.form.status){case 1:return"#ffba00";case 2:return"#f56c6c";case 3:return"#67c23a";case 4:return"#909399";default:return"#f56c6c"}}},data:function(){return{qrText:"fastbee",openSummary:!1,openCode:!1,openViewMqtt:!1,genDisabled:!1,activeName:"basic",mqttList:[],loading:!0,oldDeviceStatus:null,deviceId:"",channelId:"",form:{productId:0,status:1,locationWay:1,firmwareType:1,firmwareVersion:1,serialNumber:"",deviceType:1,isSimulate:0},listQuery:{clientId:0,username:"",passwd:"",port:""},GBform:{domainAlias:"",serverSipid:"",password:"",port:""},httpForm:{type:"",username:"",password:""},openServerTip:!1,serverType:1,summary:[],baseUrl:"/prod-api",map:null,mk:null,latitude:"",longitude:"",isShowScada:R["a"].isShowScada,rules:{deviceName:[{required:!0,message:this.$t("device.device-edit.148398-60"),trigger:"blur"},{min:2,max:32,message:this.$t("device.device-edit.148398-61"),trigger:"blur"}],productName:[{required:!0,message:this.$t("device.device-edit.148398-67"),trigger:"blur"}],serialNumber:[{required:!0,message:this.$t("device.device-edit.148398-65"),trigger:"blur"}],firmwareVersion:[{required:!0,message:this.$t("device.device-edit.148398-62"),trigger:"blur"}]},isMediaDevice:!1}},created:function(){var e=this.$route.query.activeName;null!=e&&""!=e&&(this.activeName=e),this.form.deviceId=this.$route.query&&this.$route.query.deviceId,0!=this.form.deviceId&&this.getDevice(this.form.deviceId)},activated:function(){var e=this.$route.query.activeName;null!=e&&""!=e&&(this.activeName=e)},destroyed:function(){this.mqttUnSubscribe(this.form)},methods:{connectMqtt:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(null!=e.$mqttTool.client){t.next=3;break}return t.next=3,e.$mqttTool.connect(e.vuex_token);case 3:e.mqttCallback();case 4:case"end":return t.stop()}}),t)})))()},mqttCallback:function(){var e=this;this.$mqttTool.client.on("message",(function(t,i,a){var r=t.split("/"),n=(r[1],r[2]);if(i instanceof Uint8Array){var s=new TextDecoder("utf-8"),o=s.decode(i);i=o}console.log("🚀 ~ this.$mqttTool.client.on ~ message:",i),console.log("🚀 ~ this.$mqttTool.client.on ~ topics:",t),i=JSON.parse(i.toString()),i&&("status"!=r[3]&&"status"!=r[2]||(e.$busEvent.$emit("updateStatus",{serialNumber:r[2],productId:e.form.productId,data:i}),console.log("接收到【设备状态-详情】主题:",t),console.log("接收到【设备状态-详情】内容:",i),e.form.serialNumber==n&&(e.oldDeviceStatus=i.status,e.form.status=i.status,e.form.isShadow=i.isShadow,e.form.rssi=i.rssi)),t.endsWith("ws/service")&&e.$busEvent.$emit("updateData",{serialNumber:r[2],productId:e.form.productId,data:i}),t.endsWith("service/reply")&&e.$busEvent.$emit("updateLog",{serialNumber:r[2],productId:e.form.productId,data:i}),t.endsWith("message/post")&&e.$busEvent.$emit("updateMqttMessage",{serialNumber:r[2],data:i}))}))},getMqttTopics:function(e){var t="/ws/service",i="/status/post",a="/function/post",r="/monitor/post",n="/service/reply",s="/message/post",o=[t,i,a,r,n,s];return o.map((function(t){return"/".concat(e.productId,"/").concat(e.serialNumber).concat(t)}))},getDeviceStatusData:function(e){this.form.status=e},mqttUnSubscribe:function(e){var t=this.getMqttTopics(e);this.$mqttTool.unsubscribe(t)},mqttSubscribe:function(e){var t=this.getMqttTopics(e);this.$mqttTool.subscribe(t)},getPlayerData:function(e){var t=this;this.activeName=e.tabName,this.channelId=e.channelId,this.$nextTick((function(){t.channelId&&(t.$refs.deviceLiveStream.channelId=t.channelId,t.$refs.deviceLiveStream.changeChannel())}))},tabChange:function(e){var t=this;if(this.$nextTick((function(){3==t.form.deviceType&&"deviceReturn"!=e.name&&("sipPlayer"===e.name?(t.$refs.deviceVideo&&t.$refs.deviceVideo.destroy&&t.$refs.deviceVideo.destroy(),t.channelId&&(t.$refs.deviceLiveStream&&void 0!==t.$refs.deviceLiveStream.channelId&&(t.$refs.deviceLiveStream.channelId=t.channelId),t.$refs.deviceLiveStream.changeChannel()),void 0!==t.$refs.deviceLiveStream.channelId&&t.$refs.deviceLiveStream.changeChannel()):"sipVideo"===e.name?(t.$refs.deviceLiveStream&&t.$refs.deviceLiveStream.destroy&&t.$refs.deviceLiveStream.destroy(),t.$refs.deviceVideo&&void 0!==t.$refs.deviceVideo.channelId&&t.$refs.deviceVideo.queryDate&&t.$refs.deviceVideo.loadDevRecord()):"sipChannel"===e.name&&t.$nextTick((function(){t.$refs.Channel.getList()})),"sipPlayer"!==e.name&&t.$refs.deviceLiveStream&&t.$refs.deviceLiveStream.playing&&t.$refs.deviceLiveStream.closeDestroy(!1),"sipVideo"!==e.name&&t.$refs.deviceVideo&&t.$refs.deviceVideo.playing&&t.$refs.deviceVideo.closeDestroy())})),this.$nextTick((function(){"deviceStastic"===e.name?t.$refs.deviceStatistic.getListHistory():"deviceTimer"===e.name?t.$refs.deviceTimer.getList():"deviceSub"===e.name&&t.form.serialNumber&&(t.$refs.deviceSub.queryParams.gwDeviceId=t.form.deviceId,t.$refs.deviceSub.gateway.gwDeviceId=t.form.deviceId,t.$refs.deviceSub.getList())})),3!==this.form.deviceType&&("inlineVideo"!==e.name&&this.$refs.deviceInlineVideo&&this.$refs.deviceInlineVideo.handleClose(),"scada"!==e.name)){var i=this.$refs.deviceScada||{};if(i&&i.$refs&&i.$refs.deviceScada){var a=i.$refs.deviceScada;a.$refs&&a.$refs.spirit&&a.$refs.spirit.forEach((function(e){e.$vnode.tag.includes("ViewInlineVideo")&&e.handleCloseJessibuca()}))}}},deviceSynchronization:function(){var e=this;Object(M["c"])(this.form.serialNumber).then(function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(i){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getCacheThingsModdel(i.data.productId);case 2:return i.data.cacheThingsModel=t.sent,t.next=5,e.getDeviceStatus(e.form);case 5:i.data.thingsModels=t.sent,e.formatThingsModel(i.data),e.form=i.data,e.activeName="runningStatus",e.oldDeviceStatus=e.form.status,e.loadMap();case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getDevice:function(e){var t=this;Object(M["f"])(e).then(function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(i){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.form.protocolCode=i.data.protocolCode,t.getDeviceStatusWitchThingsModel(i);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},getCacheThingsModdel:function(e){return new Promise((function(t,i){Object(E["b"])(e).then((function(e){t(JSON.parse(e.data))})).catch((function(e){i(e)}))}))},getDeviceStatus:function(e){var t={deviceId:e.deviceId,slaveId:e.slaveId};return new Promise((function(e,i){Object(M["h"])(t).then((function(t){e(t.data.thingsModels)})).catch((function(e){i(e)}))}))},formatThingsModel:function(e){e.chartList=[],e.monitorList=[],e.staticList=[];for(var t=0;t<e.thingsModels.length;t++)if("integer"!=e.thingsModels[t].datatype.type&&"decimal"!=e.thingsModels[t].datatype.type||(""==e.thingsModels[t].shadow?e.thingsModels[t].shadow=Number(e.thingsModels[t].datatype.min):e.thingsModels[t].shadow=Number(e.thingsModels[t].shadow)),"array"==e.thingsModels[t].datatype.type){if("object"==e.thingsModels[t].datatype.arrayType&&e.thingsModels[t].datatype.arrayParams.length>0)for(var i=0;i<e.thingsModels[t].datatype.arrayParams.length;i++)for(var a=0;a<e.thingsModels[t].datatype.arrayParams[i].length;a++){var r=i>9?String(i):"0"+i,n="array_"+r+"_";e.thingsModels[t].datatype.arrayParams[i][a].id=n+e.thingsModels[t].datatype.arrayParams[i][a].id,1==e.thingsModels[t].datatype.arrayParams[i][a].isChart&&(e.thingsModels[t].datatype.arrayParams[i][a].name="["+e.thingsModels[t].name+(i+1)+"] "+e.thingsModels[t].datatype.arrayParams[i][a].name,e.thingsModels[t].datatype.arrayParams[i][a].datatype.arrayType="object",e.chartList.push(e.thingsModels[t].datatype.arrayParams[i][a]),1==e.thingsModels[t].datatype.arrayParams[i][a].isHistory&&e.staticList.push(e.thingsModels[t].datatype.arrayParams[i][a]),1==e.thingsModels[t].datatype.arrayParams[i][a].isMonitor&&e.monitorList.push(e.thingsModels[t].datatype.arrayParams[i][a]),e.thingsModels[t].datatype.arrayParams[i].splice(a--,1))}else if(e.thingsModels[t].datatype.arrayCount>0)for(var s=""!=e.thingsModels[t].value?e.thingsModels[t].value.split(","):[],o=""!=e.thingsModels[t].shadow?e.thingsModels[t].shadow.split(","):[],l=0;l<e.thingsModels[t].datatype.arrayCount;l++){e.thingsModels[t].datatype.arrayModel||(e.thingsModels[t].datatype.arrayModel=[]);var c=l>9?String(l):"0"+l,d="array_"+c+"_";e.thingsModels[t].datatype.arrayModel[l]={id:d+e.thingsModels[t].id,name:e.thingsModels[t].name,type:e.thingsModels[t].type,isReadonly:e.thingsModels[t].isReadonly,value:s[l]?s[l]:"",shadow:o[l]?o[l]:""}}}else if("object"==e.thingsModels[t].datatype.type&&e.thingsModels[t].datatype.params.length>0)for(var u=0;u<e.thingsModels[t].datatype.params.length;u++)1==e.thingsModels[t].datatype.params[u].isChart&&(e.thingsModels[t].datatype.params[u].name="["+e.thingsModels[t].name+"] "+e.thingsModels[t].datatype.params[u].name,e.chartList.push(e.thingsModels[t].datatype.params[u]),1==e.thingsModels[t].datatype.params[u].isHistory&&e.staticList.push(e.thingsModels[t].datatype.params[u]),1==e.thingsModels[t].datatype.params[u].isMonitor&&e.monitorList.push(e.thingsModels[t].datatype.params[u]),e.thingsModels[t].datatype.params.splice(u--,1));else 1==e.thingsModels[t].isChart&&(e.chartList.push(e.thingsModels[t]),1==e.thingsModels[t].isHistory&&e.staticList.push(e.thingsModels[t]),1==e.thingsModels[t].isMonitor&&e.monitorList.push(e.thingsModels[t]),e.thingsModels.splice(t--,1))},loadMap:function(){var e=this;this.$nextTick((function(){Object(D["a"])().then((function(){e.getmap()}))}))},goBack:function(){var e={path:"/iot/device",query:{t:Date.now(),pageNum:this.$route.query.pageNum}};this.$tab.closeOpenPage(e),this.reset()},reset:function(){this.form={deviceId:0,deviceName:null,productId:null,productName:null,userId:null,userName:null,tenantId:null,tenantName:null,serialNumber:"",firmwareType:1,firmwareVersion:1,status:1,rssi:null,networkAddress:null,networkIp:null,longitude:null,latitude:null,activeTime:null,createBy:null,createTime:null,updateBy:null,updateTime:null,remark:null,locationWay:1,clientId:0},this.deviceStatus=0,this.resetForm("form")},submitForm:function(){var e=this;return Object(s["a"])(Object(n["a"])().mark((function t(){var i;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(null!=e.form.serialNumber&&0!=e.form.serialNumber){t.next=3;break}return e.$modal.alertError(e.$t("device.device-edit.148398-65")),t.abrupt("return");case 3:if(i=/^[0-9a-zA-Z]+$/,i.test(e.form.serialNumber)){t.next=7;break}return e.$modal.alertError(e.$t("device.device-edit.148398-66")),t.abrupt("return");case 7:if(null!=e.form.productId&&0!=e.form.productId){t.next=10;break}return e.$modal.alertError(e.$t("device.device-edit.148398-67")),t.abrupt("return");case 10:e.$refs["form"].validate((function(t){t&&(0!=e.form.deviceId?Object(M["v"])(e.form).then((function(t){if(0==t.data)e.$modal.alertError(t.msg);else if(e.$modal.alertSuccess(e.$t("device.device-edit.148398-68")),e.form=JSON.parse(JSON.stringify(e.form)),e.loadMap(),2===e.form.status){var i={clientId:e.form.serialNumber};Object(A["a"])(i).then((function(e){}))}})):Object(M["a"])(e.form).then(function(){var t=Object(s["a"])(Object(n["a"])().mark((function t(i){return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getDeviceStatusWitchThingsModel(i);case 2:null==e.form.deviceId||0==e.form.deviceId?e.$modal.alertError(e.$t("device.device-edit.148398-69")):(2==e.form.status&&(e.deviceStatus=1),e.$modal.alertSuccess(e.$t("device.device-edit.148398-70")),e.loadMap());case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))}));case 11:case"end":return t.stop()}}),t)})))()},getDeviceStatusWitchThingsModel:function(e){var t=this;return Object(s["a"])(Object(n["a"])().mark((function i(){return Object(n["a"])().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,t.getCacheThingsModdel(e.data.productId);case 2:return e.data.cacheThingsModel=i.sent,i.next=5,t.getDeviceStatus(e.data);case 5:e.data.thingsModels=i.sent,t.formatThingsModel(e.data),t.form=e.data,null!=t.form.summary&&""!=t.form.summary&&(t.summary=JSON.parse(t.form.summary)),t.oldDeviceStatus=t.form.status,t.loadMap(),t.connectMqtt(),t.mqttSubscribe(t.form);case 13:case"end":return i.stop()}}),i)})))()},selectProduct:function(){this.$refs.productList.open=!0,this.$refs.productList.getList()},genSipID:function(){this.$refs.sipidGen.open=!0},getProductData:function(e){this.form.productId=e.productId,this.form.productName=e.productName,this.form.deviceType=e.deviceType,this.form.protocolCode=e.protocolCode,this.form.tenantId=e.tenantId,this.form.tenantName=e.tenantName,"TCP"===e.transport?(this.openServerTip=!0,this.serverType=3):(this.openServerTip=!1,this.serverType=1)},getSipIDData:function(e){this.form.serialNumber=e},getUserData:function(e){},openSummaryDialog:function(){var e={type:1,deviceNumber:this.form.serialNumber,productId:this.form.productId};this.qrText=JSON.stringify(e),this.openSummary=!0},closeSummaryDialog:function(){this.openSummary=!1,this.openViewMqtt=!1},doCopy:function(){var e=document.createElement("input");"MQTT"==this.form.transport?e.value="{clientId:"+this.listQuery.clientId+",username:"+this.listQuery.username+",passwd:"+this.listQuery.passwd+",subscribeTopic:"+this.listQuery.subscribeTopic+",reportTopic:"+this.listQuery.reportTopic+",port:"+this.listQuery.port+"}":"TCP"==this.form.transport?e.value="{enrollPackage:"+this.listQuery.enrollPackage+",port:"+this.listQuery.port+"}":"HTTP"==this.form.transport&&(e.value="{type:"+this.httpForm.type+",username:"+this.httpForm.username+",password:"+this.httpForm.password+"}"),"GB28181"==this.form.transport&&(e.value="{domainAlias:"+this.GBform.domainAlias+",serverSipid:"+this.GBform.serverSipid+",password:"+this.GBform.password+",port:"+this.GBform.port+"}"),document.body.appendChild(e),e.select(),document.execCommand("Copy"),document.body.removeChild(e),this.$message.success(this.$t("device.device-edit.148398-71"))},openCodeDialog:function(){var e={type:1,deviceNumber:this.form.serialNumber,productId:this.form.productId,productName:this.form.productName};this.qrText=JSON.stringify(e),this.openCode=!0},getmap:function(){this.map=new BMap.Map("map");var e=null;e=null!=this.form.longitude&&""!=this.form.longitude&&null!=this.form.latitude&&""!=this.form.latitude?new BMap.Point(this.form.longitude,this.form.latitude):new BMap.Point(116.404,39.915),this.map.centerAndZoom(e,19),this.map.enableScrollWheelZoom(!0),this.map.addControl(new BMap.NavigationControl),this.mk=new BMap.Marker(e),this.map.addOverlay(this.mk),this.map.panTo(e)},generateNum:function(){var e=this;if(this.form.productId&&0!=this.form.productId){this.genDisabled=!0;var t={type:this.serverType};Object(M["e"])(t).then((function(t){e.form.serialNumber=t.data,e.genDisabled=!1}))}else this.$modal.alertError(this.$t("device.device-edit.148398-72"))},handleViewMqtt:function(){var e=this;if(this.openViewMqtt=!0,this.loading=!0,"MQTT"===this.form.transport||"TCP"===this.form.transport){var t={deviceId:this.form.deviceId};Object(M["k"])(t).then((function(t){200==t.code&&(e.listQuery=t.data,e.loading=!1)}))}else if("GB28181"===this.form.transport){var i=this.form.deviceId;Object(M["l"])(i).then((function(t){200==t.code&&(e.GBform=t.data,e.loading=!1)}))}else if("HTTP"===this.form.transport){var a={deviceId:this.form.deviceId};Object(M["j"])(a).then((function(t){200==t.code&&(e.httpForm=t.data,e.loading=!1)}))}}}},V=q,B=(i("61f4"),i("2877")),z=Object(B["a"])(V,a,r,!1,null,"125cda2c",null);t["default"]=z.exports},ea2a:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:e.$t("device.sub-device-list.323213-0"),visible:e.openDeviceList,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.openDeviceList=t}}},[i("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[i("el-form-item",{attrs:{label:e.$t("device.index.105953-20"),prop:"serialNumber"}},[i("el-input",{attrs:{placeholder:e.$t("device.sub-device-list.323213-1"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.serialNumber,callback:function(t){e.$set(e.queryParams,"serialNumber",t)},expression:"queryParams.serialNumber"}})],1),i("el-form-item",{attrs:{label:e.$t("device.sub-device-list.323213-2"),prop:"deviceName"}},[i("el-input",{attrs:{placeholder:e.$t("device.sub-device-list.323213-3"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.deviceName,callback:function(t){e.$set(e.queryParams,"deviceName",t)},expression:"queryParams.deviceName"}})],1),i("el-form-item",{staticStyle:{float:"right"}},[i("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v(e._s(e.$t("refresh")))]),i("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v(e._s(e.$t("search")))])],1)],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.gatewayList},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),i("el-table-column",{attrs:{label:"ID",align:"center",prop:"deviceId"}}),i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-7"),align:"center",prop:"serialNumber"}}),i("el-table-column",{attrs:{label:e.$t("device.device-edit.148398-1"),align:"center",prop:"deviceName"}})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:e.handleDeviceSelected}},[e._v(e._s(e.$t("confirm")))]),i("el-button",{on:{click:e.closeSelectDeviceList}},[e._v(e._s(e.$t("cancel")))])],1)],1)},r=[],n=(i("d81d"),i("5b52")),s={name:"sub-device-list",props:{gateway:{type:Object,default:null}},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,gatewayList:[],title:"",open:!1,openDeviceList:!1,queryParams:{pageNum:1,pageSize:10,deviceName:null,serialNumber:null},form:{}}},created:function(){},watch:{gateway:{handler:function(){this.queryParams.pageNum=1,this.getList()},immediate:!0}},methods:{getList:function(){var e=this;this.loading=!0,Object(n["i"])(this.queryParams).then((function(t){e.gatewayList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={deviceId:null,deviceName:null,serialNumber:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.deviceId})),this.single=1!==e.length,this.multiple=!e.length},closeSelectDeviceList:function(){this.openDeviceList=!1},handleDeviceSelected:function(){var e=this;this.gateway.subDeviceIds=this.ids,Object(n["a"])(this.gateway).then((function(t){e.$modal.msgSuccess(e.$t("device.sub-device-list.323213-4")),e.openDeviceList=!1,e.$emit("addSuccess")}))}}},o=s,l=i("2877"),c=Object(l["a"])(o,a,r,!1,null,null,null);t["default"]=c.exports},ecd9:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:1.5}},[i("el-select",{attrs:{placeholder:e.$t("views.components.player.deviceLiveStream.48750-1")},on:{change:function(t){return e.changeChannel()}},model:{value:e.channelId,callback:function(t){e.channelId=t},expression:"channelId"}},e._l(e.channelList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-col",{staticStyle:{"line-height":"36px"},attrs:{span:1.5}},[i("span",{staticStyle:{"font-size":"14px"}},[e._v(e._s(e.$t("views.components.player.deviceLiveStream.48750-2"))+"")]),i("el-switch",{attrs:{disabled:""===e.channelId},on:{change:e.startPushStream},model:{value:e.pushStream,callback:function(t){e.pushStream=t},expression:"pushStream"}})],1),i("el-col",{staticStyle:{"line-height":"36px"},attrs:{span:1.5}},[i("span",{staticStyle:{"font-size":"14px"}},[e._v(e._s(e.$t("views.components.player.deviceLiveStream.48750-3"))+"")]),i("el-switch",{attrs:{disabled:""===e.channelId},on:{change:e.startPlayRecord},model:{value:e.playrecord,callback:function(t){e.playrecord=t},expression:"playrecord"}})],1)],1),i("player",{ref:"player",attrs:{playerinfo:e.playinfo}})],1)},r=[],n=(i("d81d"),i("97d6")),s=i("e2de"),o=i("6827"),l={name:"device-live-stream",components:{player:n["default"]},props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo.channelId&&(this.channelId=this.deviceInfo.channelId,this.changeChannel()),this.deviceInfo&&0!==this.deviceInfo.deviceId&&(this.queryParams.deviceSipId=this.deviceInfo.serialNumber,this.deviceId=this.device.serialNumber)}},data:function(){return{deviceInfo:{},deviceId:"",channelId:"",streamId:"",ssrc:"",playurl:"",playinfo:{playtype:"play"},playrecord:!1,playrecording:!1,playing:!1,pushStream:!1,retrycount:0,channelList:[],queryParams:{pageNum:1,pageSize:10,deviceSipId:null,channelSipId:null}}},created:function(){this.queryParams.deviceSipId=this.device.serialNumber,this.deviceId=this.device.serialNumber,this.getList(),this.playinfo={playtype:"play",deviceId:this.device.serialNumber}},beforeDestroy:function(){console.log("beforeDestroy"),this.closeDestroy(!1)},methods:{getList:function(){var e=this;this.loading=!0,Object(s["g"])(this.queryParams).then((function(t){e.channelList=t.rows.map((function(e){return{value:e.channelSipId,label:e.channelName}})),console.log(e.channelList)}))},changeChannel:function(){this.playinfo.channelId=this.channelId,this.startPlayer()},TimeoutCallback:function(){var e=this;this.closeDestroy(!1),this.retrycount=0,setTimeout((function(){e.startPlayer()}),1e3)},startPushStream:function(){this.channelId?(console.log("推流状态: ["+this.pushStream+"]"),this.pushStream?this.startPlayer():this.closeDestroy(!0)):console.log("开始通道: ["+this.channelId+"]")},startPlayRecord:function(){var e=this;console.log("录像状态: ["+this.playrecord+"]"),this.closeDestroy(!0),setTimeout((function(){e.startPlayer()}),500)},startPlayer:function(){var e=this;this.channelId?(this.deviceId=this.queryParams.deviceSipId,this.playing&&this.closeDestroy(!1),this.$refs.player.registercallback("loadingTimeout",this.TimeoutCallback),this.$refs.player.registercallback("delayTimeout",this.TimeoutCallback),this.playrecord?Object(o["g"])(this.deviceId,this.channelId).then((function(t){console.log("开始录像:"+e.deviceId+" : "+e.channelId);var i=t.data;e.streamId=i.streamId,e.playurl=i.playurl,e.$refs.player.play(e.playurl),e.playing=!0,e.playrecording=!0,e.pushStream=!0})):Object(s["k"])(this.deviceId,this.channelId).then((function(t){console.log("开始推流: ["+e.channelId+"]");var i=t.data;e.streamId=i.streamId,e.playurl=i.playurl,e.$refs.player.play(e.playurl),e.playing=!0,e.playrecording=!1,e.pushStream=!0}))):console.log("直播录像通道: ["+this.channelId+"]")},closeStream:function(e){var t=this;if(e)this.playing&&this.streamId&&(console.log("强制关闭推流: ["+this.streamId+"]"),Object(s["c"])(this.deviceId,this.channelId,this.streamId).then((function(e){t.streamId="",t.ssrc="",t.playurl="",t.pushStream=!1})),this.playing=!1,this.playrecording=!1);else{if(!0===this.playrecording)return;this.playing&&this.streamId&&(console.log("关闭推流: ["+this.streamId+"]"),Object(s["c"])(this.deviceId,this.channelId,this.streamId).then((function(e){t.streamId="",t.ssrc="",t.playurl="",t.pushStream=!1})),this.playing=!1,this.playrecording=!1)}},closeDestroy:function(e){this.closeStream(e),this.$refs.player.destroy()},destroy:function(){this.$refs.player.destroy()}}},c=l,d=i("2877"),u=Object(d["a"])(c,a,r,!1,null,null,null);t["default"]=u.exports},ed90:function(e,t,i){},ef6c:function(e,t,i){!function(t,i){e.exports=i()}(window,(function(){return function(e){var t={};function i(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,a){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(a,r,function(t){return e[t]}.bind(null,r));return a},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=10)}([function(e,t,i){"use strict";var a=i(3),r="object"==typeof self&&self&&self.Object===Object&&self,n=a.a||r||Function("return this")();t.a=n},function(e,t,i){e.exports=i(8)},function(e,i,a){"use strict";(function(e){var r=a(3),n=t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n&&r.a.process,l=function(){try{var e=s&&s.require&&s.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();i.a=l}).call(this,a(5)(e))},function(e,t,i){"use strict";(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.a=i}).call(this,i(9))},function(e,i,a){"use strict";(function(e){var r=a(0),n=a(6),s=t&&!t.nodeType&&t,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,l=o&&o.exports===s?r.a.Buffer:void 0,c=(l?l.isBuffer:void 0)||n.a;i.a=c}).call(this,a(5)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,i){"use strict";t.a=function(){return!1}},function(e,i,a){"use strict";(function(e){var r=a(0),n=t&&!t.nodeType&&t,s=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===n?r.a.Buffer:void 0,l=o?o.allocUnsafe:void 0;i.a=function(e,t){if(t)return e.slice();var i=e.length,a=l?l(i):new e.constructor(i);return e.copy(a),a}}).call(this,a(5)(e))},function(e){e.exports={86:{11e4:"北京市",12e4:"天津市",13e4:"河北省",14e4:"山西省",15e4:"内蒙古自治区",21e4:"辽宁省",22e4:"吉林省",23e4:"黑龙江省",31e4:"上海市",32e4:"江苏省",33e4:"浙江省",34e4:"安徽省",35e4:"福建省",36e4:"江西省",37e4:"山东省",41e4:"河南省",42e4:"湖北省",43e4:"湖南省",44e4:"广东省",45e4:"广西壮族自治区",46e4:"海南省",5e5:"重庆市",51e4:"四川省",52e4:"贵州省",53e4:"云南省",54e4:"西藏自治区",61e4:"陕西省",62e4:"甘肃省",63e4:"青海省",64e4:"宁夏回族自治区",65e4:"新疆维吾尔自治区",71e4:"台湾省",81e4:"香港特别行政区",82e4:"澳门特别行政区"},11e4:{110100:"市辖区"},110100:{110101:"东城区",110102:"西城区",110105:"朝阳区",110106:"丰台区",110107:"石景山区",110108:"海淀区",110109:"门头沟区",110111:"房山区",110112:"通州区",110113:"顺义区",110114:"昌平区",110115:"大兴区",110116:"怀柔区",110117:"平谷区",110118:"密云区",110119:"延庆区"},12e4:{120100:"市辖区"},120100:{120101:"和平区",120102:"河东区",120103:"河西区",120104:"南开区",120105:"河北区",120106:"红桥区",120110:"东丽区",120111:"西青区",120112:"津南区",120113:"北辰区",120114:"武清区",120115:"宝坻区",120116:"滨海新区",120117:"宁河区",120118:"静海区",120119:"蓟州区"},13e4:{130100:"石家庄市",130200:"唐山市",130300:"秦皇岛市",130400:"邯郸市",130500:"邢台市",130600:"保定市",130700:"张家口市",130800:"承德市",130900:"沧州市",131e3:"廊坊市",131100:"衡水市"},130100:{130101:"市辖区",130102:"长安区",130104:"桥西区",130105:"新华区",130107:"井陉矿区",130108:"裕华区",130109:"藁城区",130110:"鹿泉区",130111:"栾城区",130121:"井陉县",130123:"正定县",130125:"行唐县",130126:"灵寿县",130127:"高邑县",130128:"深泽县",130129:"赞皇县",130130:"无极县",130131:"平山县",130132:"元氏县",130133:"赵县",130171:"石家庄高新技术产业开发区",130172:"石家庄循环化工园区",130181:"辛集市",130183:"晋州市",130184:"新乐市"},130200:{130201:"市辖区",130202:"路南区",130203:"路北区",130204:"古冶区",130205:"开平区",130207:"丰南区",130208:"丰润区",130209:"曹妃甸区",130224:"滦南县",130225:"乐亭县",130227:"迁西县",130229:"玉田县",130271:"河北唐山芦台经济开发区",130272:"唐山市汉沽管理区",130273:"唐山高新技术产业开发区",130274:"河北唐山海港经济开发区",130281:"遵化市",130283:"迁安市",130284:"滦州市"},130300:{130301:"市辖区",130302:"海港区",130303:"山海关区",130304:"北戴河区",130306:"抚宁区",130321:"青龙满族自治县",130322:"昌黎县",130324:"卢龙县",130371:"秦皇岛市经济技术开发区",130372:"北戴河新区"},130400:{130401:"市辖区",130402:"邯山区",130403:"丛台区",130404:"复兴区",130406:"峰峰矿区",130407:"肥乡区",130408:"永年区",130423:"临漳县",130424:"成安县",130425:"大名县",130426:"涉县",130427:"磁县",130430:"邱县",130431:"鸡泽县",130432:"广平县",130433:"馆陶县",130434:"魏县",130435:"曲周县",130471:"邯郸经济技术开发区",130473:"邯郸冀南新区",130481:"武安市"},130500:{130501:"市辖区",130502:"桥东区",130503:"桥西区",130521:"邢台县",130522:"临城县",130523:"内丘县",130524:"柏乡县",130525:"隆尧县",130526:"任县",130527:"南和县",130528:"宁晋县",130529:"巨鹿县",130530:"新河县",130531:"广宗县",130532:"平乡县",130533:"威县",130534:"清河县",130535:"临西县",130571:"河北邢台经济开发区",130581:"南宫市",130582:"沙河市"},130600:{130601:"市辖区",130602:"竞秀区",130606:"莲池区",130607:"满城区",130608:"清苑区",130609:"徐水区",130623:"涞水县",130624:"阜平县",130626:"定兴县",130627:"唐县",130628:"高阳县",130629:"容城县",130630:"涞源县",130631:"望都县",130632:"安新县",130633:"易县",130634:"曲阳县",130635:"蠡县",130636:"顺平县",130637:"博野县",130638:"雄县",130671:"保定高新技术产业开发区",130672:"保定白沟新城",130681:"涿州市",130682:"定州市",130683:"安国市",130684:"高碑店市"},130700:{130701:"市辖区",130702:"桥东区",130703:"桥西区",130705:"宣化区",130706:"下花园区",130708:"万全区",130709:"崇礼区",130722:"张北县",130723:"康保县",130724:"沽源县",130725:"尚义县",130726:"蔚县",130727:"阳原县",130728:"怀安县",130730:"怀来县",130731:"涿鹿县",130732:"赤城县",130771:"张家口经济开发区",130772:"张家口市察北管理区",130773:"张家口市塞北管理区"},130800:{130801:"市辖区",130802:"双桥区",130803:"双滦区",130804:"鹰手营子矿区",130821:"承德县",130822:"兴隆县",130824:"滦平县",130825:"隆化县",130826:"丰宁满族自治县",130827:"宽城满族自治县",130828:"围场满族蒙古族自治县",130871:"承德高新技术产业开发区",130881:"平泉市"},130900:{130901:"市辖区",130902:"新华区",130903:"运河区",130921:"沧县",130922:"青县",130923:"东光县",130924:"海兴县",130925:"盐山县",130926:"肃宁县",130927:"南皮县",130928:"吴桥县",130929:"献县",130930:"孟村回族自治县",130971:"河北沧州经济开发区",130972:"沧州高新技术产业开发区",130973:"沧州渤海新区",130981:"泊头市",130982:"任丘市",130983:"黄骅市",130984:"河间市"},131e3:{131001:"市辖区",131002:"安次区",131003:"广阳区",131022:"固安县",131023:"永清县",131024:"香河县",131025:"大城县",131026:"文安县",131028:"大厂回族自治县",131071:"廊坊经济技术开发区",131081:"霸州市",131082:"三河市"},131100:{131101:"市辖区",131102:"桃城区",131103:"冀州区",131121:"枣强县",131122:"武邑县",131123:"武强县",131124:"饶阳县",131125:"安平县",131126:"故城县",131127:"景县",131128:"阜城县",131171:"河北衡水高新技术产业开发区",131172:"衡水滨湖新区",131182:"深州市"},14e4:{140100:"太原市",140200:"大同市",140300:"阳泉市",140400:"长治市",140500:"晋城市",140600:"朔州市",140700:"晋中市",140800:"运城市",140900:"忻州市",141e3:"临汾市",141100:"吕梁市"},140100:{140101:"市辖区",140105:"小店区",140106:"迎泽区",140107:"杏花岭区",140108:"尖草坪区",140109:"万柏林区",140110:"晋源区",140121:"清徐县",140122:"阳曲县",140123:"娄烦县",140171:"山西转型综合改革示范区",140181:"古交市"},140200:{140201:"市辖区",140212:"新荣区",140213:"平城区",140214:"云冈区",140215:"云州区",140221:"阳高县",140222:"天镇县",140223:"广灵县",140224:"灵丘县",140225:"浑源县",140226:"左云县",140271:"山西大同经济开发区"},140300:{140301:"市辖区",140302:"城区",140303:"矿区",140311:"郊区",140321:"平定县",140322:"盂县"},140400:{140401:"市辖区",140403:"潞州区",140404:"上党区",140405:"屯留区",140406:"潞城区",140423:"襄垣县",140425:"平顺县",140426:"黎城县",140427:"壶关县",140428:"长子县",140429:"武乡县",140430:"沁县",140431:"沁源县",140471:"山西长治高新技术产业园区"},140500:{140501:"市辖区",140502:"城区",140521:"沁水县",140522:"阳城县",140524:"陵川县",140525:"泽州县",140581:"高平市"},140600:{140601:"市辖区",140602:"朔城区",140603:"平鲁区",140621:"山阴县",140622:"应县",140623:"右玉县",140671:"山西朔州经济开发区",140681:"怀仁市"},140700:{140701:"市辖区",140702:"榆次区",140721:"榆社县",140722:"左权县",140723:"和顺县",140724:"昔阳县",140725:"寿阳县",140726:"太谷县",140727:"祁县",140728:"平遥县",140729:"灵石县",140781:"介休市"},140800:{140801:"市辖区",140802:"盐湖区",140821:"临猗县",140822:"万荣县",140823:"闻喜县",140824:"稷山县",140825:"新绛县",140826:"绛县",140827:"垣曲县",140828:"夏县",140829:"平陆县",140830:"芮城县",140881:"永济市",140882:"河津市"},140900:{140901:"市辖区",140902:"忻府区",140921:"定襄县",140922:"五台县",140923:"代县",140924:"繁峙县",140925:"宁武县",140926:"静乐县",140927:"神池县",140928:"五寨县",140929:"岢岚县",140930:"河曲县",140931:"保德县",140932:"偏关县",140971:"五台山风景名胜区",140981:"原平市"},141e3:{141001:"市辖区",141002:"尧都区",141021:"曲沃县",141022:"翼城县",141023:"襄汾县",141024:"洪洞县",141025:"古县",141026:"安泽县",141027:"浮山县",141028:"吉县",141029:"乡宁县",141030:"大宁县",141031:"隰县",141032:"永和县",141033:"蒲县",141034:"汾西县",141081:"侯马市",141082:"霍州市"},141100:{141101:"市辖区",141102:"离石区",141121:"文水县",141122:"交城县",141123:"兴县",141124:"临县",141125:"柳林县",141126:"石楼县",141127:"岚县",141128:"方山县",141129:"中阳县",141130:"交口县",141181:"孝义市",141182:"汾阳市"},15e4:{150100:"呼和浩特市",150200:"包头市",150300:"乌海市",150400:"赤峰市",150500:"通辽市",150600:"鄂尔多斯市",150700:"呼伦贝尔市",150800:"巴彦淖尔市",150900:"乌兰察布市",152200:"兴安盟",152500:"锡林郭勒盟",152900:"阿拉善盟"},150100:{150101:"市辖区",150102:"新城区",150103:"回民区",150104:"玉泉区",150105:"赛罕区",150121:"土默特左旗",150122:"托克托县",150123:"和林格尔县",150124:"清水河县",150125:"武川县",150171:"呼和浩特金海工业园区",150172:"呼和浩特经济技术开发区"},150200:{150201:"市辖区",150202:"东河区",150203:"昆都仑区",150204:"青山区",150205:"石拐区",150206:"白云鄂博矿区",150207:"九原区",150221:"土默特右旗",150222:"固阳县",150223:"达尔罕茂明安联合旗",150271:"包头稀土高新技术产业开发区"},150300:{150301:"市辖区",150302:"海勃湾区",150303:"海南区",150304:"乌达区"},150400:{150401:"市辖区",150402:"红山区",150403:"元宝山区",150404:"松山区",150421:"阿鲁科尔沁旗",150422:"巴林左旗",150423:"巴林右旗",150424:"林西县",150425:"克什克腾旗",150426:"翁牛特旗",150428:"喀喇沁旗",150429:"宁城县",150430:"敖汉旗"},150500:{150501:"市辖区",150502:"科尔沁区",150521:"科尔沁左翼中旗",150522:"科尔沁左翼后旗",150523:"开鲁县",150524:"库伦旗",150525:"奈曼旗",150526:"扎鲁特旗",150571:"通辽经济技术开发区",150581:"霍林郭勒市"},150600:{150601:"市辖区",150602:"东胜区",150603:"康巴什区",150621:"达拉特旗",150622:"准格尔旗",150623:"鄂托克前旗",150624:"鄂托克旗",150625:"杭锦旗",150626:"乌审旗",150627:"伊金霍洛旗"},150700:{150701:"市辖区",150702:"海拉尔区",150703:"扎赉诺尔区",150721:"阿荣旗",150722:"莫力达瓦达斡尔族自治旗",150723:"鄂伦春自治旗",150724:"鄂温克族自治旗",150725:"陈巴尔虎旗",150726:"新巴尔虎左旗",150727:"新巴尔虎右旗",150781:"满洲里市",150782:"牙克石市",150783:"扎兰屯市",150784:"额尔古纳市",150785:"根河市"},150800:{150801:"市辖区",150802:"临河区",150821:"五原县",150822:"磴口县",150823:"乌拉特前旗",150824:"乌拉特中旗",150825:"乌拉特后旗",150826:"杭锦后旗"},150900:{150901:"市辖区",150902:"集宁区",150921:"卓资县",150922:"化德县",150923:"商都县",150924:"兴和县",150925:"凉城县",150926:"察哈尔右翼前旗",150927:"察哈尔右翼中旗",150928:"察哈尔右翼后旗",150929:"四子王旗",150981:"丰镇市"},152200:{152201:"乌兰浩特市",152202:"阿尔山市",152221:"科尔沁右翼前旗",152222:"科尔沁右翼中旗",152223:"扎赉特旗",152224:"突泉县"},152500:{152501:"二连浩特市",152502:"锡林浩特市",152522:"阿巴嘎旗",152523:"苏尼特左旗",152524:"苏尼特右旗",152525:"东乌珠穆沁旗",152526:"西乌珠穆沁旗",152527:"太仆寺旗",152528:"镶黄旗",152529:"正镶白旗",152530:"正蓝旗",152531:"多伦县",152571:"乌拉盖管委会"},152900:{152921:"阿拉善左旗",152922:"阿拉善右旗",152923:"额济纳旗",152971:"内蒙古阿拉善经济开发区"},21e4:{210100:"沈阳市",210200:"大连市",210300:"鞍山市",210400:"抚顺市",210500:"本溪市",210600:"丹东市",210700:"锦州市",210800:"营口市",210900:"阜新市",211e3:"辽阳市",211100:"盘锦市",211200:"铁岭市",211300:"朝阳市",211400:"葫芦岛市"},210100:{210101:"市辖区",210102:"和平区",210103:"沈河区",210104:"大东区",210105:"皇姑区",210106:"铁西区",210111:"苏家屯区",210112:"浑南区",210113:"沈北新区",210114:"于洪区",210115:"辽中区",210123:"康平县",210124:"法库县",210181:"新民市"},210200:{210201:"市辖区",210202:"中山区",210203:"西岗区",210204:"沙河口区",210211:"甘井子区",210212:"旅顺口区",210213:"金州区",210214:"普兰店区",210224:"长海县",210281:"瓦房店市",210283:"庄河市"},210300:{210301:"市辖区",210302:"铁东区",210303:"铁西区",210304:"立山区",210311:"千山区",210321:"台安县",210323:"岫岩满族自治县",210381:"海城市"},210400:{210401:"市辖区",210402:"新抚区",210403:"东洲区",210404:"望花区",210411:"顺城区",210421:"抚顺县",210422:"新宾满族自治县",210423:"清原满族自治县"},210500:{210501:"市辖区",210502:"平山区",210503:"溪湖区",210504:"明山区",210505:"南芬区",210521:"本溪满族自治县",210522:"桓仁满族自治县"},210600:{210601:"市辖区",210602:"元宝区",210603:"振兴区",210604:"振安区",210624:"宽甸满族自治县",210681:"东港市",210682:"凤城市"},210700:{210701:"市辖区",210702:"古塔区",210703:"凌河区",210711:"太和区",210726:"黑山县",210727:"义县",210781:"凌海市",210782:"北镇市"},210800:{210801:"市辖区",210802:"站前区",210803:"西市区",210804:"鲅鱼圈区",210811:"老边区",210881:"盖州市",210882:"大石桥市"},210900:{210901:"市辖区",210902:"海州区",210903:"新邱区",210904:"太平区",210905:"清河门区",210911:"细河区",210921:"阜新蒙古族自治县",210922:"彰武县"},211e3:{211001:"市辖区",211002:"白塔区",211003:"文圣区",211004:"宏伟区",211005:"弓长岭区",211011:"太子河区",211021:"辽阳县",211081:"灯塔市"},211100:{211101:"市辖区",211102:"双台子区",211103:"兴隆台区",211104:"大洼区",211122:"盘山县"},211200:{211201:"市辖区",211202:"银州区",211204:"清河区",211221:"铁岭县",211223:"西丰县",211224:"昌图县",211281:"调兵山市",211282:"开原市"},211300:{211301:"市辖区",211302:"双塔区",211303:"龙城区",211321:"朝阳县",211322:"建平县",211324:"喀喇沁左翼蒙古族自治县",211381:"北票市",211382:"凌源市"},211400:{211401:"市辖区",211402:"连山区",211403:"龙港区",211404:"南票区",211421:"绥中县",211422:"建昌县",211481:"兴城市"},22e4:{220100:"长春市",220200:"吉林市",220300:"四平市",220400:"辽源市",220500:"通化市",220600:"白山市",220700:"松原市",220800:"白城市",222400:"延边朝鲜族自治州"},220100:{220101:"市辖区",220102:"南关区",220103:"宽城区",220104:"朝阳区",220105:"二道区",220106:"绿园区",220112:"双阳区",220113:"九台区",220122:"农安县",220171:"长春经济技术开发区",220172:"长春净月高新技术产业开发区",220173:"长春高新技术产业开发区",220174:"长春汽车经济技术开发区",220182:"榆树市",220183:"德惠市"},220200:{220201:"市辖区",220202:"昌邑区",220203:"龙潭区",220204:"船营区",220211:"丰满区",220221:"永吉县",220271:"吉林经济开发区",220272:"吉林高新技术产业开发区",220273:"吉林中国新加坡食品区",220281:"蛟河市",220282:"桦甸市",220283:"舒兰市",220284:"磐石市"},220300:{220301:"市辖区",220302:"铁西区",220303:"铁东区",220322:"梨树县",220323:"伊通满族自治县",220381:"公主岭市",220382:"双辽市"},220400:{220401:"市辖区",220402:"龙山区",220403:"西安区",220421:"东丰县",220422:"东辽县"},220500:{220501:"市辖区",220502:"东昌区",220503:"二道江区",220521:"通化县",220523:"辉南县",220524:"柳河县",220581:"梅河口市",220582:"集安市"},220600:{220601:"市辖区",220602:"浑江区",220605:"江源区",220621:"抚松县",220622:"靖宇县",220623:"长白朝鲜族自治县",220681:"临江市"},220700:{220701:"市辖区",220702:"宁江区",220721:"前郭尔罗斯蒙古族自治县",220722:"长岭县",220723:"乾安县",220771:"吉林松原经济开发区",220781:"扶余市"},220800:{220801:"市辖区",220802:"洮北区",220821:"镇赉县",220822:"通榆县",220871:"吉林白城经济开发区",220881:"洮南市",220882:"大安市"},222400:{222401:"延吉市",222402:"图们市",222403:"敦化市",222404:"珲春市",222405:"龙井市",222406:"和龙市",222424:"汪清县",222426:"安图县"},23e4:{230100:"哈尔滨市",230200:"齐齐哈尔市",230300:"鸡西市",230400:"鹤岗市",230500:"双鸭山市",230600:"大庆市",230700:"伊春市",230800:"佳木斯市",230900:"七台河市",231e3:"牡丹江市",231100:"黑河市",231200:"绥化市",232700:"大兴安岭地区"},230100:{230101:"市辖区",230102:"道里区",230103:"南岗区",230104:"道外区",230108:"平房区",230109:"松北区",230110:"香坊区",230111:"呼兰区",230112:"阿城区",230113:"双城区",230123:"依兰县",230124:"方正县",230125:"宾县",230126:"巴彦县",230127:"木兰县",230128:"通河县",230129:"延寿县",230183:"尚志市",230184:"五常市"},230200:{230201:"市辖区",230202:"龙沙区",230203:"建华区",230204:"铁锋区",230205:"昂昂溪区",230206:"富拉尔基区",230207:"碾子山区",230208:"梅里斯达斡尔族区",230221:"龙江县",230223:"依安县",230224:"泰来县",230225:"甘南县",230227:"富裕县",230229:"克山县",230230:"克东县",230231:"拜泉县",230281:"讷河市"},230300:{230301:"市辖区",230302:"鸡冠区",230303:"恒山区",230304:"滴道区",230305:"梨树区",230306:"城子河区",230307:"麻山区",230321:"鸡东县",230381:"虎林市",230382:"密山市"},230400:{230401:"市辖区",230402:"向阳区",230403:"工农区",230404:"南山区",230405:"兴安区",230406:"东山区",230407:"兴山区",230421:"萝北县",230422:"绥滨县"},230500:{230501:"市辖区",230502:"尖山区",230503:"岭东区",230505:"四方台区",230506:"宝山区",230521:"集贤县",230522:"友谊县",230523:"宝清县",230524:"饶河县"},230600:{230601:"市辖区",230602:"萨尔图区",230603:"龙凤区",230604:"让胡路区",230605:"红岗区",230606:"大同区",230621:"肇州县",230622:"肇源县",230623:"林甸县",230624:"杜尔伯特蒙古族自治县",230671:"大庆高新技术产业开发区"},230700:{230701:"市辖区",230717:"伊美区",230718:"乌翠区",230719:"友好区",230722:"嘉荫县",230723:"汤旺县",230724:"丰林县",230725:"大箐山县",230726:"南岔县",230751:"金林区",230781:"铁力市"},230800:{230801:"市辖区",230803:"向阳区",230804:"前进区",230805:"东风区",230811:"郊区",230822:"桦南县",230826:"桦川县",230828:"汤原县",230881:"同江市",230882:"富锦市",230883:"抚远市"},230900:{230901:"市辖区",230902:"新兴区",230903:"桃山区",230904:"茄子河区",230921:"勃利县"},231e3:{231001:"市辖区",231002:"东安区",231003:"阳明区",231004:"爱民区",231005:"西安区",231025:"林口县",231071:"牡丹江经济技术开发区",231081:"绥芬河市",231083:"海林市",231084:"宁安市",231085:"穆棱市",231086:"东宁市"},231100:{231101:"市辖区",231102:"爱辉区",231123:"逊克县",231124:"孙吴县",231181:"北安市",231182:"五大连池市",231183:"嫩江市"},231200:{231201:"市辖区",231202:"北林区",231221:"望奎县",231222:"兰西县",231223:"青冈县",231224:"庆安县",231225:"明水县",231226:"绥棱县",231281:"安达市",231282:"肇东市",231283:"海伦市"},232700:{232701:"漠河市",232721:"呼玛县",232722:"塔河县",232761:"加格达奇区",232762:"松岭区",232763:"新林区",232764:"呼中区"},31e4:{310100:"市辖区"},310100:{310101:"黄浦区",310104:"徐汇区",310105:"长宁区",310106:"静安区",310107:"普陀区",310109:"虹口区",310110:"杨浦区",310112:"闵行区",310113:"宝山区",310114:"嘉定区",310115:"浦东新区",310116:"金山区",310117:"松江区",310118:"青浦区",310120:"奉贤区",310151:"崇明区"},32e4:{320100:"南京市",320200:"无锡市",320300:"徐州市",320400:"常州市",320500:"苏州市",320600:"南通市",320700:"连云港市",320800:"淮安市",320900:"盐城市",321e3:"扬州市",321100:"镇江市",321200:"泰州市",321300:"宿迁市"},320100:{320101:"市辖区",320102:"玄武区",320104:"秦淮区",320105:"建邺区",320106:"鼓楼区",320111:"浦口区",320113:"栖霞区",320114:"雨花台区",320115:"江宁区",320116:"六合区",320117:"溧水区",320118:"高淳区"},320200:{320201:"市辖区",320205:"锡山区",320206:"惠山区",320211:"滨湖区",320213:"梁溪区",320214:"新吴区",320281:"江阴市",320282:"宜兴市"},320300:{320301:"市辖区",320302:"鼓楼区",320303:"云龙区",320305:"贾汪区",320311:"泉山区",320312:"铜山区",320321:"丰县",320322:"沛县",320324:"睢宁县",320371:"徐州经济技术开发区",320381:"新沂市",320382:"邳州市"},320400:{320401:"市辖区",320402:"天宁区",320404:"钟楼区",320411:"新北区",320412:"武进区",320413:"金坛区",320481:"溧阳市"},320500:{320501:"市辖区",320505:"虎丘区",320506:"吴中区",320507:"相城区",320508:"姑苏区",320509:"吴江区",320571:"苏州工业园区",320581:"常熟市",320582:"张家港市",320583:"昆山市",320585:"太仓市"},320600:{320601:"市辖区",320602:"崇川区",320611:"港闸区",320612:"通州区",320623:"如东县",320671:"南通经济技术开发区",320681:"启东市",320682:"如皋市",320684:"海门市",320685:"海安市"},320700:{320701:"市辖区",320703:"连云区",320706:"海州区",320707:"赣榆区",320722:"东海县",320723:"灌云县",320724:"灌南县",320771:"连云港经济技术开发区",320772:"连云港高新技术产业开发区"},320800:{320801:"市辖区",320803:"淮安区",320804:"淮阴区",320812:"清江浦区",320813:"洪泽区",320826:"涟水县",320830:"盱眙县",320831:"金湖县",320871:"淮安经济技术开发区"},320900:{320901:"市辖区",320902:"亭湖区",320903:"盐都区",320904:"大丰区",320921:"响水县",320922:"滨海县",320923:"阜宁县",320924:"射阳县",320925:"建湖县",320971:"盐城经济技术开发区",320981:"东台市"},321e3:{321001:"市辖区",321002:"广陵区",321003:"邗江区",321012:"江都区",321023:"宝应县",321071:"扬州经济技术开发区",321081:"仪征市",321084:"高邮市"},321100:{321101:"市辖区",321102:"京口区",321111:"润州区",321112:"丹徒区",321171:"镇江新区",321181:"丹阳市",321182:"扬中市",321183:"句容市"},321200:{321201:"市辖区",321202:"海陵区",321203:"高港区",321204:"姜堰区",321271:"泰州医药高新技术产业开发区",321281:"兴化市",321282:"靖江市",321283:"泰兴市"},321300:{321301:"市辖区",321302:"宿城区",321311:"宿豫区",321322:"沭阳县",321323:"泗阳县",321324:"泗洪县",321371:"宿迁经济技术开发区"},33e4:{330100:"杭州市",330200:"宁波市",330300:"温州市",330400:"嘉兴市",330500:"湖州市",330600:"绍兴市",330700:"金华市",330800:"衢州市",330900:"舟山市",331e3:"台州市",331100:"丽水市"},330100:{330101:"市辖区",330102:"上城区",330103:"下城区",330104:"江干区",330105:"拱墅区",330106:"西湖区",330108:"滨江区",330109:"萧山区",330110:"余杭区",330111:"富阳区",330112:"临安区",330122:"桐庐县",330127:"淳安县",330182:"建德市"},330200:{330201:"市辖区",330203:"海曙区",330205:"江北区",330206:"北仑区",330211:"镇海区",330212:"鄞州区",330213:"奉化区",330225:"象山县",330226:"宁海县",330281:"余姚市",330282:"慈溪市"},330300:{330301:"市辖区",330302:"鹿城区",330303:"龙湾区",330304:"瓯海区",330305:"洞头区",330324:"永嘉县",330326:"平阳县",330327:"苍南县",330328:"文成县",330329:"泰顺县",330371:"温州经济技术开发区",330381:"瑞安市",330382:"乐清市",330383:"龙港市"},330400:{330401:"市辖区",330402:"南湖区",330411:"秀洲区",330421:"嘉善县",330424:"海盐县",330481:"海宁市",330482:"平湖市",330483:"桐乡市"},330500:{330501:"市辖区",330502:"吴兴区",330503:"南浔区",330521:"德清县",330522:"长兴县",330523:"安吉县"},330600:{330601:"市辖区",330602:"越城区",330603:"柯桥区",330604:"上虞区",330624:"新昌县",330681:"诸暨市",330683:"嵊州市"},330700:{330701:"市辖区",330702:"婺城区",330703:"金东区",330723:"武义县",330726:"浦江县",330727:"磐安县",330781:"兰溪市",330782:"义乌市",330783:"东阳市",330784:"永康市"},330800:{330801:"市辖区",330802:"柯城区",330803:"衢江区",330822:"常山县",330824:"开化县",330825:"龙游县",330881:"江山市"},330900:{330901:"市辖区",330902:"定海区",330903:"普陀区",330921:"岱山县",330922:"嵊泗县"},331e3:{331001:"市辖区",331002:"椒江区",331003:"黄岩区",331004:"路桥区",331022:"三门县",331023:"天台县",331024:"仙居县",331081:"温岭市",331082:"临海市",331083:"玉环市"},331100:{331101:"市辖区",331102:"莲都区",331121:"青田县",331122:"缙云县",331123:"遂昌县",331124:"松阳县",331125:"云和县",331126:"庆元县",331127:"景宁畲族自治县",331181:"龙泉市"},34e4:{340100:"合肥市",340200:"芜湖市",340300:"蚌埠市",340400:"淮南市",340500:"马鞍山市",340600:"淮北市",340700:"铜陵市",340800:"安庆市",341e3:"黄山市",341100:"滁州市",341200:"阜阳市",341300:"宿州市",341500:"六安市",341600:"亳州市",341700:"池州市",341800:"宣城市"},340100:{340101:"市辖区",340102:"瑶海区",340103:"庐阳区",340104:"蜀山区",340111:"包河区",340121:"长丰县",340122:"肥东县",340123:"肥西县",340124:"庐江县",340171:"合肥高新技术产业开发区",340172:"合肥经济技术开发区",340173:"合肥新站高新技术产业开发区",340181:"巢湖市"},340200:{340201:"市辖区",340202:"镜湖区",340203:"弋江区",340207:"鸠江区",340208:"三山区",340221:"芜湖县",340222:"繁昌县",340223:"南陵县",340225:"无为县",340271:"芜湖经济技术开发区",340272:"安徽芜湖长江大桥经济开发区"},340300:{340301:"市辖区",340302:"龙子湖区",340303:"蚌山区",340304:"禹会区",340311:"淮上区",340321:"怀远县",340322:"五河县",340323:"固镇县",340371:"蚌埠市高新技术开发区",340372:"蚌埠市经济开发区"},340400:{340401:"市辖区",340402:"大通区",340403:"田家庵区",340404:"谢家集区",340405:"八公山区",340406:"潘集区",340421:"凤台县",340422:"寿县"},340500:{340501:"市辖区",340503:"花山区",340504:"雨山区",340506:"博望区",340521:"当涂县",340522:"含山县",340523:"和县"},340600:{340601:"市辖区",340602:"杜集区",340603:"相山区",340604:"烈山区",340621:"濉溪县"},340700:{340701:"市辖区",340705:"铜官区",340706:"义安区",340711:"郊区",340722:"枞阳县"},340800:{340801:"市辖区",340802:"迎江区",340803:"大观区",340811:"宜秀区",340822:"怀宁县",340825:"太湖县",340826:"宿松县",340827:"望江县",340828:"岳西县",340871:"安徽安庆经济开发区",340881:"桐城市",340882:"潜山市"},341e3:{341001:"市辖区",341002:"屯溪区",341003:"黄山区",341004:"徽州区",341021:"歙县",341022:"休宁县",341023:"黟县",341024:"祁门县"},341100:{341101:"市辖区",341102:"琅琊区",341103:"南谯区",341122:"来安县",341124:"全椒县",341125:"定远县",341126:"凤阳县",341171:"苏滁现代产业园",341172:"滁州经济技术开发区",341181:"天长市",341182:"明光市"},341200:{341201:"市辖区",341202:"颍州区",341203:"颍东区",341204:"颍泉区",341221:"临泉县",341222:"太和县",341225:"阜南县",341226:"颍上县",341271:"阜阳合肥现代产业园区",341272:"阜阳经济技术开发区",341282:"界首市"},341300:{341301:"市辖区",341302:"埇桥区",341321:"砀山县",341322:"萧县",341323:"灵璧县",341324:"泗县",341371:"宿州马鞍山现代产业园区",341372:"宿州经济技术开发区"},341500:{341501:"市辖区",341502:"金安区",341503:"裕安区",341504:"叶集区",341522:"霍邱县",341523:"舒城县",341524:"金寨县",341525:"霍山县"},341600:{341601:"市辖区",341602:"谯城区",341621:"涡阳县",341622:"蒙城县",341623:"利辛县"},341700:{341701:"市辖区",341702:"贵池区",341721:"东至县",341722:"石台县",341723:"青阳县"},341800:{341801:"市辖区",341802:"宣州区",341821:"郎溪县",341823:"泾县",341824:"绩溪县",341825:"旌德县",341871:"宣城市经济开发区",341881:"宁国市",341882:"广德市"},35e4:{350100:"福州市",350200:"厦门市",350300:"莆田市",350400:"三明市",350500:"泉州市",350600:"漳州市",350700:"南平市",350800:"龙岩市",350900:"宁德市"},350100:{350101:"市辖区",350102:"鼓楼区",350103:"台江区",350104:"仓山区",350105:"马尾区",350111:"晋安区",350112:"长乐区",350121:"闽侯县",350122:"连江县",350123:"罗源县",350124:"闽清县",350125:"永泰县",350128:"平潭县",350181:"福清市"},350200:{350201:"市辖区",350203:"思明区",350205:"海沧区",350206:"湖里区",350211:"集美区",350212:"同安区",350213:"翔安区"},350300:{350301:"市辖区",350302:"城厢区",350303:"涵江区",350304:"荔城区",350305:"秀屿区",350322:"仙游县"},350400:{350401:"市辖区",350402:"梅列区",350403:"三元区",350421:"明溪县",350423:"清流县",350424:"宁化县",350425:"大田县",350426:"尤溪县",350427:"沙县",350428:"将乐县",350429:"泰宁县",350430:"建宁县",350481:"永安市"},350500:{350501:"市辖区",350502:"鲤城区",350503:"丰泽区",350504:"洛江区",350505:"泉港区",350521:"惠安县",350524:"安溪县",350525:"永春县",350526:"德化县",350527:"金门县",350581:"石狮市",350582:"晋江市",350583:"南安市"},350600:{350601:"市辖区",350602:"芗城区",350603:"龙文区",350622:"云霄县",350623:"漳浦县",350624:"诏安县",350625:"长泰县",350626:"东山县",350627:"南靖县",350628:"平和县",350629:"华安县",350681:"龙海市"},350700:{350701:"市辖区",350702:"延平区",350703:"建阳区",350721:"顺昌县",350722:"浦城县",350723:"光泽县",350724:"松溪县",350725:"政和县",350781:"邵武市",350782:"武夷山市",350783:"建瓯市"},350800:{350801:"市辖区",350802:"新罗区",350803:"永定区",350821:"长汀县",350823:"上杭县",350824:"武平县",350825:"连城县",350881:"漳平市"},350900:{350901:"市辖区",350902:"蕉城区",350921:"霞浦县",350922:"古田县",350923:"屏南县",350924:"寿宁县",350925:"周宁县",350926:"柘荣县",350981:"福安市",350982:"福鼎市"},36e4:{360100:"南昌市",360200:"景德镇市",360300:"萍乡市",360400:"九江市",360500:"新余市",360600:"鹰潭市",360700:"赣州市",360800:"吉安市",360900:"宜春市",361e3:"抚州市",361100:"上饶市"},360100:{360101:"市辖区",360102:"东湖区",360103:"西湖区",360104:"青云谱区",360105:"湾里区",360111:"青山湖区",360112:"新建区",360121:"南昌县",360123:"安义县",360124:"进贤县"},360200:{360201:"市辖区",360202:"昌江区",360203:"珠山区",360222:"浮梁县",360281:"乐平市"},360300:{360301:"市辖区",360302:"安源区",360313:"湘东区",360321:"莲花县",360322:"上栗县",360323:"芦溪县"},360400:{360401:"市辖区",360402:"濂溪区",360403:"浔阳区",360404:"柴桑区",360423:"武宁县",360424:"修水县",360425:"永修县",360426:"德安县",360428:"都昌县",360429:"湖口县",360430:"彭泽县",360481:"瑞昌市",360482:"共青城市",360483:"庐山市"},360500:{360501:"市辖区",360502:"渝水区",360521:"分宜县"},360600:{360601:"市辖区",360602:"月湖区",360603:"余江区",360681:"贵溪市"},360700:{360701:"市辖区",360702:"章贡区",360703:"南康区",360704:"赣县区",360722:"信丰县",360723:"大余县",360724:"上犹县",360725:"崇义县",360726:"安远县",360727:"龙南县",360728:"定南县",360729:"全南县",360730:"宁都县",360731:"于都县",360732:"兴国县",360733:"会昌县",360734:"寻乌县",360735:"石城县",360781:"瑞金市"},360800:{360801:"市辖区",360802:"吉州区",360803:"青原区",360821:"吉安县",360822:"吉水县",360823:"峡江县",360824:"新干县",360825:"永丰县",360826:"泰和县",360827:"遂川县",360828:"万安县",360829:"安福县",360830:"永新县",360881:"井冈山市"},360900:{360901:"市辖区",360902:"袁州区",360921:"奉新县",360922:"万载县",360923:"上高县",360924:"宜丰县",360925:"靖安县",360926:"铜鼓县",360981:"丰城市",360982:"樟树市",360983:"高安市"},361e3:{361001:"市辖区",361002:"临川区",361003:"东乡区",361021:"南城县",361022:"黎川县",361023:"南丰县",361024:"崇仁县",361025:"乐安县",361026:"宜黄县",361027:"金溪县",361028:"资溪县",361030:"广昌县"},361100:{361101:"市辖区",361102:"信州区",361103:"广丰区",361104:"广信区",361123:"玉山县",361124:"铅山县",361125:"横峰县",361126:"弋阳县",361127:"余干县",361128:"鄱阳县",361129:"万年县",361130:"婺源县",361181:"德兴市"},37e4:{370100:"济南市",370200:"青岛市",370300:"淄博市",370400:"枣庄市",370500:"东营市",370600:"烟台市",370700:"潍坊市",370800:"济宁市",370900:"泰安市",371e3:"威海市",371100:"日照市",371300:"临沂市",371400:"德州市",371500:"聊城市",371600:"滨州市",371700:"菏泽市"},370100:{370101:"市辖区",370102:"历下区",370103:"市中区",370104:"槐荫区",370105:"天桥区",370112:"历城区",370113:"长清区",370114:"章丘区",370115:"济阳区",370116:"莱芜区",370117:"钢城区",370124:"平阴县",370126:"商河县",370171:"济南高新技术产业开发区"},370200:{370201:"市辖区",370202:"市南区",370203:"市北区",370211:"黄岛区",370212:"崂山区",370213:"李沧区",370214:"城阳区",370215:"即墨区",370271:"青岛高新技术产业开发区",370281:"胶州市",370283:"平度市",370285:"莱西市"},370300:{370301:"市辖区",370302:"淄川区",370303:"张店区",370304:"博山区",370305:"临淄区",370306:"周村区",370321:"桓台县",370322:"高青县",370323:"沂源县"},370400:{370401:"市辖区",370402:"市中区",370403:"薛城区",370404:"峄城区",370405:"台儿庄区",370406:"山亭区",370481:"滕州市"},370500:{370501:"市辖区",370502:"东营区",370503:"河口区",370505:"垦利区",370522:"利津县",370523:"广饶县",370571:"东营经济技术开发区",370572:"东营港经济开发区"},370600:{370601:"市辖区",370602:"芝罘区",370611:"福山区",370612:"牟平区",370613:"莱山区",370634:"长岛县",370671:"烟台高新技术产业开发区",370672:"烟台经济技术开发区",370681:"龙口市",370682:"莱阳市",370683:"莱州市",370684:"蓬莱市",370685:"招远市",370686:"栖霞市",370687:"海阳市"},370700:{370701:"市辖区",370702:"潍城区",370703:"寒亭区",370704:"坊子区",370705:"奎文区",370724:"临朐县",370725:"昌乐县",370772:"潍坊滨海经济技术开发区",370781:"青州市",370782:"诸城市",370783:"寿光市",370784:"安丘市",370785:"高密市",370786:"昌邑市"},370800:{370801:"市辖区",370811:"任城区",370812:"兖州区",370826:"微山县",370827:"鱼台县",370828:"金乡县",370829:"嘉祥县",370830:"汶上县",370831:"泗水县",370832:"梁山县",370871:"济宁高新技术产业开发区",370881:"曲阜市",370883:"邹城市"},370900:{370901:"市辖区",370902:"泰山区",370911:"岱岳区",370921:"宁阳县",370923:"东平县",370982:"新泰市",370983:"肥城市"},371e3:{371001:"市辖区",371002:"环翠区",371003:"文登区",371071:"威海火炬高技术产业开发区",371072:"威海经济技术开发区",371073:"威海临港经济技术开发区",371082:"荣成市",371083:"乳山市"},371100:{371101:"市辖区",371102:"东港区",371103:"岚山区",371121:"五莲县",371122:"莒县",371171:"日照经济技术开发区"},371300:{371301:"市辖区",371302:"兰山区",371311:"罗庄区",371312:"河东区",371321:"沂南县",371322:"郯城县",371323:"沂水县",371324:"兰陵县",371325:"费县",371326:"平邑县",371327:"莒南县",371328:"蒙阴县",371329:"临沭县",371371:"临沂高新技术产业开发区",371372:"临沂经济技术开发区",371373:"临沂临港经济开发区"},371400:{371401:"市辖区",371402:"德城区",371403:"陵城区",371422:"宁津县",371423:"庆云县",371424:"临邑县",371425:"齐河县",371426:"平原县",371427:"夏津县",371428:"武城县",371471:"德州经济技术开发区",371472:"德州运河经济开发区",371481:"乐陵市",371482:"禹城市"},371500:{371501:"市辖区",371502:"东昌府区",371503:"茌平区",371521:"阳谷县",371522:"莘县",371524:"东阿县",371525:"冠县",371526:"高唐县",371581:"临清市"},371600:{371601:"市辖区",371602:"滨城区",371603:"沾化区",371621:"惠民县",371622:"阳信县",371623:"无棣县",371625:"博兴县",371681:"邹平市"},371700:{371701:"市辖区",371702:"牡丹区",371703:"定陶区",371721:"曹县",371722:"单县",371723:"成武县",371724:"巨野县",371725:"郓城县",371726:"鄄城县",371728:"东明县",371771:"菏泽经济技术开发区",371772:"菏泽高新技术开发区"},41e4:{410100:"郑州市",410200:"开封市",410300:"洛阳市",410400:"平顶山市",410500:"安阳市",410600:"鹤壁市",410700:"新乡市",410800:"焦作市",410900:"濮阳市",411e3:"许昌市",411100:"漯河市",411200:"三门峡市",411300:"南阳市",411400:"商丘市",411500:"信阳市",411600:"周口市",411700:"驻马店市",419e3:"省直辖县级行政区划"},410100:{410101:"市辖区",410102:"中原区",410103:"二七区",410104:"管城回族区",410105:"金水区",410106:"上街区",410108:"惠济区",410122:"中牟县",410171:"郑州经济技术开发区",410172:"郑州高新技术产业开发区",410173:"郑州航空港经济综合实验区",410181:"巩义市",410182:"荥阳市",410183:"新密市",410184:"新郑市",410185:"登封市"},410200:{410201:"市辖区",410202:"龙亭区",410203:"顺河回族区",410204:"鼓楼区",410205:"禹王台区",410212:"祥符区",410221:"杞县",410222:"通许县",410223:"尉氏县",410225:"兰考县"},410300:{410301:"市辖区",410302:"老城区",410303:"西工区",410304:"瀍河回族区",410305:"涧西区",410306:"吉利区",410311:"洛龙区",410322:"孟津县",410323:"新安县",410324:"栾川县",410325:"嵩县",410326:"汝阳县",410327:"宜阳县",410328:"洛宁县",410329:"伊川县",410371:"洛阳高新技术产业开发区",410381:"偃师市"},410400:{410401:"市辖区",410402:"新华区",410403:"卫东区",410404:"石龙区",410411:"湛河区",410421:"宝丰县",410422:"叶县",410423:"鲁山县",410425:"郏县",410471:"平顶山高新技术产业开发区",410472:"平顶山市城乡一体化示范区",410481:"舞钢市",410482:"汝州市"},410500:{410501:"市辖区",410502:"文峰区",410503:"北关区",410505:"殷都区",410506:"龙安区",410522:"安阳县",410523:"汤阴县",410526:"滑县",410527:"内黄县",410571:"安阳高新技术产业开发区",410581:"林州市"},410600:{410601:"市辖区",410602:"鹤山区",410603:"山城区",410611:"淇滨区",410621:"浚县",410622:"淇县",410671:"鹤壁经济技术开发区"},410700:{410701:"市辖区",410702:"红旗区",410703:"卫滨区",410704:"凤泉区",410711:"牧野区",410721:"新乡县",410724:"获嘉县",410725:"原阳县",410726:"延津县",410727:"封丘县",410771:"新乡高新技术产业开发区",410772:"新乡经济技术开发区",410773:"新乡市平原城乡一体化示范区",410781:"卫辉市",410782:"辉县市",410783:"长垣市"},410800:{410801:"市辖区",410802:"解放区",410803:"中站区",410804:"马村区",410811:"山阳区",410821:"修武县",410822:"博爱县",410823:"武陟县",410825:"温县",410871:"焦作城乡一体化示范区",410882:"沁阳市",410883:"孟州市"},410900:{410901:"市辖区",410902:"华龙区",410922:"清丰县",410923:"南乐县",410926:"范县",410927:"台前县",410928:"濮阳县",410971:"河南濮阳工业园区",410972:"濮阳经济技术开发区"},411e3:{411001:"市辖区",411002:"魏都区",411003:"建安区",411024:"鄢陵县",411025:"襄城县",411071:"许昌经济技术开发区",411081:"禹州市",411082:"长葛市"},411100:{411101:"市辖区",411102:"源汇区",411103:"郾城区",411104:"召陵区",411121:"舞阳县",411122:"临颍县",411171:"漯河经济技术开发区"},411200:{411201:"市辖区",411202:"湖滨区",411203:"陕州区",411221:"渑池县",411224:"卢氏县",411271:"河南三门峡经济开发区",411281:"义马市",411282:"灵宝市"},411300:{411301:"市辖区",411302:"宛城区",411303:"卧龙区",411321:"南召县",411322:"方城县",411323:"西峡县",411324:"镇平县",411325:"内乡县",411326:"淅川县",411327:"社旗县",411328:"唐河县",411329:"新野县",411330:"桐柏县",411371:"南阳高新技术产业开发区",411372:"南阳市城乡一体化示范区",411381:"邓州市"},411400:{411401:"市辖区",411402:"梁园区",411403:"睢阳区",411421:"民权县",411422:"睢县",411423:"宁陵县",411424:"柘城县",411425:"虞城县",411426:"夏邑县",411471:"豫东综合物流产业聚集区",411472:"河南商丘经济开发区",411481:"永城市"},411500:{411501:"市辖区",411502:"浉河区",411503:"平桥区",411521:"罗山县",411522:"光山县",411523:"新县",411524:"商城县",411525:"固始县",411526:"潢川县",411527:"淮滨县",411528:"息县",411571:"信阳高新技术产业开发区"},411600:{411601:"市辖区",411602:"川汇区",411603:"淮阳区",411621:"扶沟县",411622:"西华县",411623:"商水县",411624:"沈丘县",411625:"郸城县",411627:"太康县",411628:"鹿邑县",411671:"河南周口经济开发区",411681:"项城市"},411700:{411701:"市辖区",411702:"驿城区",411721:"西平县",411722:"上蔡县",411723:"平舆县",411724:"正阳县",411725:"确山县",411726:"泌阳县",411727:"汝南县",411728:"遂平县",411729:"新蔡县",411771:"河南驻马店经济开发区"},419e3:{419001:"济源市"},42e4:{420100:"武汉市",420200:"黄石市",420300:"十堰市",420500:"宜昌市",420600:"襄阳市",420700:"鄂州市",420800:"荆门市",420900:"孝感市",421e3:"荆州市",421100:"黄冈市",421200:"咸宁市",421300:"随州市",422800:"恩施土家族苗族自治州",429e3:"省直辖县级行政区划"},420100:{420101:"市辖区",420102:"江岸区",420103:"江汉区",420104:"硚口区",420105:"汉阳区",420106:"武昌区",420107:"青山区",420111:"洪山区",420112:"东西湖区",420113:"汉南区",420114:"蔡甸区",420115:"江夏区",420116:"黄陂区",420117:"新洲区"},420200:{420201:"市辖区",420202:"黄石港区",420203:"西塞山区",420204:"下陆区",420205:"铁山区",420222:"阳新县",420281:"大冶市"},420300:{420301:"市辖区",420302:"茅箭区",420303:"张湾区",420304:"郧阳区",420322:"郧西县",420323:"竹山县",420324:"竹溪县",420325:"房县",420381:"丹江口市"},420500:{420501:"市辖区",420502:"西陵区",420503:"伍家岗区",420504:"点军区",420505:"猇亭区",420506:"夷陵区",420525:"远安县",420526:"兴山县",420527:"秭归县",420528:"长阳土家族自治县",420529:"五峰土家族自治县",420581:"宜都市",420582:"当阳市",420583:"枝江市"},420600:{420601:"市辖区",420602:"襄城区",420606:"樊城区",420607:"襄州区",420624:"南漳县",420625:"谷城县",420626:"保康县",420682:"老河口市",420683:"枣阳市",420684:"宜城市"},420700:{420701:"市辖区",420702:"梁子湖区",420703:"华容区",420704:"鄂城区"},420800:{420801:"市辖区",420802:"东宝区",420804:"掇刀区",420822:"沙洋县",420881:"钟祥市",420882:"京山市"},420900:{420901:"市辖区",420902:"孝南区",420921:"孝昌县",420922:"大悟县",420923:"云梦县",420981:"应城市",420982:"安陆市",420984:"汉川市"},421e3:{421001:"市辖区",421002:"沙市区",421003:"荆州区",421022:"公安县",421023:"监利县",421024:"江陵县",421071:"荆州经济技术开发区",421081:"石首市",421083:"洪湖市",421087:"松滋市"},421100:{421101:"市辖区",421102:"黄州区",421121:"团风县",421122:"红安县",421123:"罗田县",421124:"英山县",421125:"浠水县",421126:"蕲春县",421127:"黄梅县",421171:"龙感湖管理区",421181:"麻城市",421182:"武穴市"},421200:{421201:"市辖区",421202:"咸安区",421221:"嘉鱼县",421222:"通城县",421223:"崇阳县",421224:"通山县",421281:"赤壁市"},421300:{421301:"市辖区",421303:"曾都区",421321:"随县",421381:"广水市"},422800:{422801:"恩施市",422802:"利川市",422822:"建始县",422823:"巴东县",422825:"宣恩县",422826:"咸丰县",422827:"来凤县",422828:"鹤峰县"},429e3:{429004:"仙桃市",429005:"潜江市",429006:"天门市",429021:"神农架林区"},43e4:{430100:"长沙市",430200:"株洲市",430300:"湘潭市",430400:"衡阳市",430500:"邵阳市",430600:"岳阳市",430700:"常德市",430800:"张家界市",430900:"益阳市",431e3:"郴州市",431100:"永州市",431200:"怀化市",431300:"娄底市",433100:"湘西土家族苗族自治州"},430100:{430101:"市辖区",430102:"芙蓉区",430103:"天心区",430104:"岳麓区",430105:"开福区",430111:"雨花区",430112:"望城区",430121:"长沙县",430181:"浏阳市",430182:"宁乡市"},430200:{430201:"市辖区",430202:"荷塘区",430203:"芦淞区",430204:"石峰区",430211:"天元区",430212:"渌口区",430223:"攸县",430224:"茶陵县",430225:"炎陵县",430271:"云龙示范区",430281:"醴陵市"},430300:{430301:"市辖区",430302:"雨湖区",430304:"岳塘区",430321:"湘潭县",430371:"湖南湘潭高新技术产业园区",430372:"湘潭昭山示范区",430373:"湘潭九华示范区",430381:"湘乡市",430382:"韶山市"},430400:{430401:"市辖区",430405:"珠晖区",430406:"雁峰区",430407:"石鼓区",430408:"蒸湘区",430412:"南岳区",430421:"衡阳县",430422:"衡南县",430423:"衡山县",430424:"衡东县",430426:"祁东县",430471:"衡阳综合保税区",430472:"湖南衡阳高新技术产业园区",430473:"湖南衡阳松木经济开发区",430481:"耒阳市",430482:"常宁市"},430500:{430501:"市辖区",430502:"双清区",430503:"大祥区",430511:"北塔区",430522:"新邵县",430523:"邵阳县",430524:"隆回县",430525:"洞口县",430527:"绥宁县",430528:"新宁县",430529:"城步苗族自治县",430581:"武冈市",430582:"邵东市"},430600:{430601:"市辖区",430602:"岳阳楼区",430603:"云溪区",430611:"君山区",430621:"岳阳县",430623:"华容县",430624:"湘阴县",430626:"平江县",430671:"岳阳市屈原管理区",430681:"汨罗市",430682:"临湘市"},430700:{430701:"市辖区",430702:"武陵区",430703:"鼎城区",430721:"安乡县",430722:"汉寿县",430723:"澧县",430724:"临澧县",430725:"桃源县",430726:"石门县",430771:"常德市西洞庭管理区",430781:"津市市"},430800:{430801:"市辖区",430802:"永定区",430811:"武陵源区",430821:"慈利县",430822:"桑植县"},430900:{430901:"市辖区",430902:"资阳区",430903:"赫山区",430921:"南县",430922:"桃江县",430923:"安化县",430971:"益阳市大通湖管理区",430972:"湖南益阳高新技术产业园区",430981:"沅江市"},431e3:{431001:"市辖区",431002:"北湖区",431003:"苏仙区",431021:"桂阳县",431022:"宜章县",431023:"永兴县",431024:"嘉禾县",431025:"临武县",431026:"汝城县",431027:"桂东县",431028:"安仁县",431081:"资兴市"},431100:{431101:"市辖区",431102:"零陵区",431103:"冷水滩区",431121:"祁阳县",431122:"东安县",431123:"双牌县",431124:"道县",431125:"江永县",431126:"宁远县",431127:"蓝山县",431128:"新田县",431129:"江华瑶族自治县",431171:"永州经济技术开发区",431172:"永州市金洞管理区",431173:"永州市回龙圩管理区"},431200:{431201:"市辖区",431202:"鹤城区",431221:"中方县",431222:"沅陵县",431223:"辰溪县",431224:"溆浦县",431225:"会同县",431226:"麻阳苗族自治县",431227:"新晃侗族自治县",431228:"芷江侗族自治县",431229:"靖州苗族侗族自治县",431230:"通道侗族自治县",431271:"怀化市洪江管理区",431281:"洪江市"},431300:{431301:"市辖区",431302:"娄星区",431321:"双峰县",431322:"新化县",431381:"冷水江市",431382:"涟源市"},433100:{433101:"吉首市",433122:"泸溪县",433123:"凤凰县",433124:"花垣县",433125:"保靖县",433126:"古丈县",433127:"永顺县",433130:"龙山县",433173:"湖南永顺经济开发区"},44e4:{440100:"广州市",440200:"韶关市",440300:"深圳市",440400:"珠海市",440500:"汕头市",440600:"佛山市",440700:"江门市",440800:"湛江市",440900:"茂名市",441200:"肇庆市",441300:"惠州市",441400:"梅州市",441500:"汕尾市",441600:"河源市",441700:"阳江市",441800:"清远市",441900:"东莞市",442e3:"中山市",445100:"潮州市",445200:"揭阳市",445300:"云浮市"},440100:{440101:"市辖区",440103:"荔湾区",440104:"越秀区",440105:"海珠区",440106:"天河区",440111:"白云区",440112:"黄埔区",440113:"番禺区",440114:"花都区",440115:"南沙区",440117:"从化区",440118:"增城区"},440200:{440201:"市辖区",440203:"武江区",440204:"浈江区",440205:"曲江区",440222:"始兴县",440224:"仁化县",440229:"翁源县",440232:"乳源瑶族自治县",440233:"新丰县",440281:"乐昌市",440282:"南雄市"},440300:{440301:"市辖区",440303:"罗湖区",440304:"福田区",440305:"南山区",440306:"宝安区",440307:"龙岗区",440308:"盐田区",440309:"龙华区",440310:"坪山区",440311:"光明区"},440400:{440401:"市辖区",440402:"香洲区",440403:"斗门区",440404:"金湾区"},440500:{440501:"市辖区",440507:"龙湖区",440511:"金平区",440512:"濠江区",440513:"潮阳区",440514:"潮南区",440515:"澄海区",440523:"南澳县"},440600:{440601:"市辖区",440604:"禅城区",440605:"南海区",440606:"顺德区",440607:"三水区",440608:"高明区"},440700:{440701:"市辖区",440703:"蓬江区",440704:"江海区",440705:"新会区",440781:"台山市",440783:"开平市",440784:"鹤山市",440785:"恩平市"},440800:{440801:"市辖区",440802:"赤坎区",440803:"霞山区",440804:"坡头区",440811:"麻章区",440823:"遂溪县",440825:"徐闻县",440881:"廉江市",440882:"雷州市",440883:"吴川市"},440900:{440901:"市辖区",440902:"茂南区",440904:"电白区",440981:"高州市",440982:"化州市",440983:"信宜市"},441200:{441201:"市辖区",441202:"端州区",441203:"鼎湖区",441204:"高要区",441223:"广宁县",441224:"怀集县",441225:"封开县",441226:"德庆县",441284:"四会市"},441300:{441301:"市辖区",441302:"惠城区",441303:"惠阳区",441322:"博罗县",441323:"惠东县",441324:"龙门县"},441400:{441401:"市辖区",441402:"梅江区",441403:"梅县区",441422:"大埔县",441423:"丰顺县",441424:"五华县",441426:"平远县",441427:"蕉岭县",441481:"兴宁市"},441500:{441501:"市辖区",441502:"城区",441521:"海丰县",441523:"陆河县",441581:"陆丰市"},441600:{441601:"市辖区",441602:"源城区",441621:"紫金县",441622:"龙川县",441623:"连平县",441624:"和平县",441625:"东源县"},441700:{441701:"市辖区",441702:"江城区",441704:"阳东区",441721:"阳西县",441781:"阳春市"},441800:{441801:"市辖区",441802:"清城区",441803:"清新区",441821:"佛冈县",441823:"阳山县",441825:"连山壮族瑶族自治县",441826:"连南瑶族自治县",441881:"英德市",441882:"连州市"},441900:{441900003:"东城街道",441900004:"南城街道",441900005:"万江街道",441900006:"莞城街道",441900101:"石碣镇",441900102:"石龙镇",441900103:"茶山镇",441900104:"石排镇",441900105:"企石镇",441900106:"横沥镇",441900107:"桥头镇",441900108:"谢岗镇",441900109:"东坑镇",441900110:"常平镇",441900111:"寮步镇",441900112:"樟木头镇",441900113:"大朗镇",441900114:"黄江镇",441900115:"清溪镇",441900116:"塘厦镇",441900117:"凤岗镇",441900118:"大岭山镇",441900119:"长安镇",441900121:"虎门镇",441900122:"厚街镇",441900123:"沙田镇",441900124:"道滘镇",441900125:"洪梅镇",441900126:"麻涌镇",441900127:"望牛墩镇",441900128:"中堂镇",441900129:"高埗镇",441900401:"松山湖",441900402:"东莞港",441900403:"东莞生态园"},442e3:{442000001:"石岐街道",442000002:"东区街道",442000003:"中山港街道",442000004:"西区街道",442000005:"南区街道",442000006:"五桂山街道",442000100:"小榄镇",442000101:"黄圃镇",442000102:"民众镇",442000103:"东凤镇",442000104:"东升镇",442000105:"古镇镇",442000106:"沙溪镇",442000107:"坦洲镇",442000108:"港口镇",442000109:"三角镇",442000110:"横栏镇",442000111:"南头镇",442000112:"阜沙镇",442000113:"南朗镇",442000114:"三乡镇",442000115:"板芙镇",442000116:"大涌镇",442000117:"神湾镇"},445100:{445101:"市辖区",445102:"湘桥区",445103:"潮安区",445122:"饶平县"},445200:{445201:"市辖区",445202:"榕城区",445203:"揭东区",445222:"揭西县",445224:"惠来县",445281:"普宁市"},445300:{445301:"市辖区",445302:"云城区",445303:"云安区",445321:"新兴县",445322:"郁南县",445381:"罗定市"},45e4:{450100:"南宁市",450200:"柳州市",450300:"桂林市",450400:"梧州市",450500:"北海市",450600:"防城港市",450700:"钦州市",450800:"贵港市",450900:"玉林市",451e3:"百色市",451100:"贺州市",451200:"河池市",451300:"来宾市",451400:"崇左市"},450100:{450101:"市辖区",450102:"兴宁区",450103:"青秀区",450105:"江南区",450107:"西乡塘区",450108:"良庆区",450109:"邕宁区",450110:"武鸣区",450123:"隆安县",450124:"马山县",450125:"上林县",450126:"宾阳县",450127:"横县"},450200:{450201:"市辖区",450202:"城中区",450203:"鱼峰区",450204:"柳南区",450205:"柳北区",450206:"柳江区",450222:"柳城县",450223:"鹿寨县",450224:"融安县",450225:"融水苗族自治县",450226:"三江侗族自治县"},450300:{450301:"市辖区",450302:"秀峰区",450303:"叠彩区",450304:"象山区",450305:"七星区",450311:"雁山区",450312:"临桂区",450321:"阳朔县",450323:"灵川县",450324:"全州县",450325:"兴安县",450326:"永福县",450327:"灌阳县",450328:"龙胜各族自治县",450329:"资源县",450330:"平乐县",450332:"恭城瑶族自治县",450381:"荔浦市"},450400:{450401:"市辖区",450403:"万秀区",450405:"长洲区",450406:"龙圩区",450421:"苍梧县",450422:"藤县",450423:"蒙山县",450481:"岑溪市"},450500:{450501:"市辖区",450502:"海城区",450503:"银海区",450512:"铁山港区",450521:"合浦县"},450600:{450601:"市辖区",450602:"港口区",450603:"防城区",450621:"上思县",450681:"东兴市"},450700:{450701:"市辖区",450702:"钦南区",450703:"钦北区",450721:"灵山县",450722:"浦北县"},450800:{450801:"市辖区",450802:"港北区",450803:"港南区",450804:"覃塘区",450821:"平南县",450881:"桂平市"},450900:{450901:"市辖区",450902:"玉州区",450903:"福绵区",450921:"容县",450922:"陆川县",450923:"博白县",450924:"兴业县",450981:"北流市"},451e3:{451001:"市辖区",451002:"右江区",451003:"田阳区",451022:"田东县",451023:"平果县",451024:"德保县",451026:"那坡县",451027:"凌云县",451028:"乐业县",451029:"田林县",451030:"西林县",451031:"隆林各族自治县",451081:"靖西市"},451100:{451101:"市辖区",451102:"八步区",451103:"平桂区",451121:"昭平县",451122:"钟山县",451123:"富川瑶族自治县"},451200:{451201:"市辖区",451202:"金城江区",451203:"宜州区",451221:"南丹县",451222:"天峨县",451223:"凤山县",451224:"东兰县",451225:"罗城仫佬族自治县",451226:"环江毛南族自治县",451227:"巴马瑶族自治县",451228:"都安瑶族自治县",451229:"大化瑶族自治县"},451300:{451301:"市辖区",451302:"兴宾区",451321:"忻城县",451322:"象州县",451323:"武宣县",451324:"金秀瑶族自治县",451381:"合山市"},451400:{451401:"市辖区",451402:"江州区",451421:"扶绥县",451422:"宁明县",451423:"龙州县",451424:"大新县",451425:"天等县",451481:"凭祥市"},46e4:{460100:"海口市",460200:"三亚市",460300:"三沙市",460400:"儋州市",469e3:"省直辖县级行政区划"},460100:{460101:"市辖区",460105:"秀英区",460106:"龙华区",460107:"琼山区",460108:"美兰区"},460200:{460201:"市辖区",460202:"海棠区",460203:"吉阳区",460204:"天涯区",460205:"崖州区"},460300:{460321:"西沙群岛",460322:"南沙群岛",460323:"中沙群岛的岛礁及其海域"},460400:{460400100:"那大镇",460400101:"和庆镇",460400102:"南丰镇",460400103:"大成镇",460400104:"雅星镇",460400105:"兰洋镇",460400106:"光村镇",460400107:"木棠镇",460400108:"海头镇",460400109:"峨蔓镇",460400111:"王五镇",460400112:"白马井镇",460400113:"中和镇",460400114:"排浦镇",460400115:"东成镇",460400116:"新州镇",460400499:"洋浦经济开发区",460400500:"华南热作学院"},469e3:{469001:"五指山市",469002:"琼海市",469005:"文昌市",469006:"万宁市",469007:"东方市",469021:"定安县",469022:"屯昌县",469023:"澄迈县",469024:"临高县",469025:"白沙黎族自治县",469026:"昌江黎族自治县",469027:"乐东黎族自治县",469028:"陵水黎族自治县",469029:"保亭黎族苗族自治县",469030:"琼中黎族苗族自治县"},5e5:{500100:"市辖区",500200:"县"},500100:{500101:"万州区",500102:"涪陵区",500103:"渝中区",500104:"大渡口区",500105:"江北区",500106:"沙坪坝区",500107:"九龙坡区",500108:"南岸区",500109:"北碚区",500110:"綦江区",500111:"大足区",500112:"渝北区",500113:"巴南区",500114:"黔江区",500115:"长寿区",500116:"江津区",500117:"合川区",500118:"永川区",500119:"南川区",500120:"璧山区",500151:"铜梁区",500152:"潼南区",500153:"荣昌区",500154:"开州区",500155:"梁平区",500156:"武隆区"},500200:{500229:"城口县",500230:"丰都县",500231:"垫江县",500233:"忠县",500235:"云阳县",500236:"奉节县",500237:"巫山县",500238:"巫溪县",500240:"石柱土家族自治县",500241:"秀山土家族苗族自治县",500242:"酉阳土家族苗族自治县",500243:"彭水苗族土家族自治县"},51e4:{510100:"成都市",510300:"自贡市",510400:"攀枝花市",510500:"泸州市",510600:"德阳市",510700:"绵阳市",510800:"广元市",510900:"遂宁市",511e3:"内江市",511100:"乐山市",511300:"南充市",511400:"眉山市",511500:"宜宾市",511600:"广安市",511700:"达州市",511800:"雅安市",511900:"巴中市",512e3:"资阳市",513200:"阿坝藏族羌族自治州",513300:"甘孜藏族自治州",513400:"凉山彝族自治州"},510100:{510101:"市辖区",510104:"锦江区",510105:"青羊区",510106:"金牛区",510107:"武侯区",510108:"成华区",510112:"龙泉驿区",510113:"青白江区",510114:"新都区",510115:"温江区",510116:"双流区",510117:"郫都区",510121:"金堂县",510129:"大邑县",510131:"蒲江县",510132:"新津县",510181:"都江堰市",510182:"彭州市",510183:"邛崃市",510184:"崇州市",510185:"简阳市"},510300:{510301:"市辖区",510302:"自流井区",510303:"贡井区",510304:"大安区",510311:"沿滩区",510321:"荣县",510322:"富顺县"},510400:{510401:"市辖区",510402:"东区",510403:"西区",510411:"仁和区",510421:"米易县",510422:"盐边县"},510500:{510501:"市辖区",510502:"江阳区",510503:"纳溪区",510504:"龙马潭区",510521:"泸县",510522:"合江县",510524:"叙永县",510525:"古蔺县"},510600:{510601:"市辖区",510603:"旌阳区",510604:"罗江区",510623:"中江县",510681:"广汉市",510682:"什邡市",510683:"绵竹市"},510700:{510701:"市辖区",510703:"涪城区",510704:"游仙区",510705:"安州区",510722:"三台县",510723:"盐亭县",510725:"梓潼县",510726:"北川羌族自治县",510727:"平武县",510781:"江油市"},510800:{510801:"市辖区",510802:"利州区",510811:"昭化区",510812:"朝天区",510821:"旺苍县",510822:"青川县",510823:"剑阁县",510824:"苍溪县"},510900:{510901:"市辖区",510903:"船山区",510904:"安居区",510921:"蓬溪县",510923:"大英县",510981:"射洪市"},511e3:{511001:"市辖区",511002:"市中区",511011:"东兴区",511024:"威远县",511025:"资中县",511071:"内江经济开发区",511083:"隆昌市"},511100:{511101:"市辖区",511102:"市中区",511111:"沙湾区",511112:"五通桥区",511113:"金口河区",511123:"犍为县",511124:"井研县",511126:"夹江县",511129:"沐川县",511132:"峨边彝族自治县",511133:"马边彝族自治县",511181:"峨眉山市"},511300:{511301:"市辖区",511302:"顺庆区",511303:"高坪区",511304:"嘉陵区",511321:"南部县",511322:"营山县",511323:"蓬安县",511324:"仪陇县",511325:"西充县",511381:"阆中市"},511400:{511401:"市辖区",511402:"东坡区",511403:"彭山区",511421:"仁寿县",511423:"洪雅县",511424:"丹棱县",511425:"青神县"},511500:{511501:"市辖区",511502:"翠屏区",511503:"南溪区",511504:"叙州区",511523:"江安县",511524:"长宁县",511525:"高县",511526:"珙县",511527:"筠连县",511528:"兴文县",511529:"屏山县"},511600:{511601:"市辖区",511602:"广安区",511603:"前锋区",511621:"岳池县",511622:"武胜县",511623:"邻水县",511681:"华蓥市"},511700:{511701:"市辖区",511702:"通川区",511703:"达川区",511722:"宣汉县",511723:"开江县",511724:"大竹县",511725:"渠县",511771:"达州经济开发区",511781:"万源市"},511800:{511801:"市辖区",511802:"雨城区",511803:"名山区",511822:"荥经县",511823:"汉源县",511824:"石棉县",511825:"天全县",511826:"芦山县",511827:"宝兴县"},511900:{511901:"市辖区",511902:"巴州区",511903:"恩阳区",511921:"通江县",511922:"南江县",511923:"平昌县",511971:"巴中经济开发区"},512e3:{512001:"市辖区",512002:"雁江区",512021:"安岳县",512022:"乐至县"},513200:{513201:"马尔康市",513221:"汶川县",513222:"理县",513223:"茂县",513224:"松潘县",513225:"九寨沟县",513226:"金川县",513227:"小金县",513228:"黑水县",513230:"壤塘县",513231:"阿坝县",513232:"若尔盖县",513233:"红原县"},513300:{513301:"康定市",513322:"泸定县",513323:"丹巴县",513324:"九龙县",513325:"雅江县",513326:"道孚县",513327:"炉霍县",513328:"甘孜县",513329:"新龙县",513330:"德格县",513331:"白玉县",513332:"石渠县",513333:"色达县",513334:"理塘县",513335:"巴塘县",513336:"乡城县",513337:"稻城县",513338:"得荣县"},513400:{513401:"西昌市",513422:"木里藏族自治县",513423:"盐源县",513424:"德昌县",513425:"会理县",513426:"会东县",513427:"宁南县",513428:"普格县",513429:"布拖县",513430:"金阳县",513431:"昭觉县",513432:"喜德县",513433:"冕宁县",513434:"越西县",513435:"甘洛县",513436:"美姑县",513437:"雷波县"},52e4:{520100:"贵阳市",520200:"六盘水市",520300:"遵义市",520400:"安顺市",520500:"毕节市",520600:"铜仁市",522300:"黔西南布依族苗族自治州",522600:"黔东南苗族侗族自治州",522700:"黔南布依族苗族自治州"},520100:{520101:"市辖区",520102:"南明区",520103:"云岩区",520111:"花溪区",520112:"乌当区",520113:"白云区",520115:"观山湖区",520121:"开阳县",520122:"息烽县",520123:"修文县",520181:"清镇市"},520200:{520201:"钟山区",520203:"六枝特区",520221:"水城县",520281:"盘州市"},520300:{520301:"市辖区",520302:"红花岗区",520303:"汇川区",520304:"播州区",520322:"桐梓县",520323:"绥阳县",520324:"正安县",520325:"道真仡佬族苗族自治县",520326:"务川仡佬族苗族自治县",520327:"凤冈县",520328:"湄潭县",520329:"余庆县",520330:"习水县",520381:"赤水市",520382:"仁怀市"},520400:{520401:"市辖区",520402:"西秀区",520403:"平坝区",520422:"普定县",520423:"镇宁布依族苗族自治县",520424:"关岭布依族苗族自治县",520425:"紫云苗族布依族自治县"},520500:{520501:"市辖区",520502:"七星关区",520521:"大方县",520522:"黔西县",520523:"金沙县",520524:"织金县",520525:"纳雍县",520526:"威宁彝族回族苗族自治县",520527:"赫章县"},520600:{520601:"市辖区",520602:"碧江区",520603:"万山区",520621:"江口县",520622:"玉屏侗族自治县",520623:"石阡县",520624:"思南县",520625:"印江土家族苗族自治县",520626:"德江县",520627:"沿河土家族自治县",520628:"松桃苗族自治县"},522300:{522301:"兴义市",522302:"兴仁市",522323:"普安县",522324:"晴隆县",522325:"贞丰县",522326:"望谟县",522327:"册亨县",522328:"安龙县"},522600:{522601:"凯里市",522622:"黄平县",522623:"施秉县",522624:"三穗县",522625:"镇远县",522626:"岑巩县",522627:"天柱县",522628:"锦屏县",522629:"剑河县",522630:"台江县",522631:"黎平县",522632:"榕江县",522633:"从江县",522634:"雷山县",522635:"麻江县",522636:"丹寨县"},522700:{522701:"都匀市",522702:"福泉市",522722:"荔波县",522723:"贵定县",522725:"瓮安县",522726:"独山县",522727:"平塘县",522728:"罗甸县",522729:"长顺县",522730:"龙里县",522731:"惠水县",522732:"三都水族自治县"},53e4:{530100:"昆明市",530300:"曲靖市",530400:"玉溪市",530500:"保山市",530600:"昭通市",530700:"丽江市",530800:"普洱市",530900:"临沧市",532300:"楚雄彝族自治州",532500:"红河哈尼族彝族自治州",532600:"文山壮族苗族自治州",532800:"西双版纳傣族自治州",532900:"大理白族自治州",533100:"德宏傣族景颇族自治州",533300:"怒江傈僳族自治州",533400:"迪庆藏族自治州"},530100:{530101:"市辖区",530102:"五华区",530103:"盘龙区",530111:"官渡区",530112:"西山区",530113:"东川区",530114:"呈贡区",530115:"晋宁区",530124:"富民县",530125:"宜良县",530126:"石林彝族自治县",530127:"嵩明县",530128:"禄劝彝族苗族自治县",530129:"寻甸回族彝族自治县",530181:"安宁市"},530300:{530301:"市辖区",530302:"麒麟区",530303:"沾益区",530304:"马龙区",530322:"陆良县",530323:"师宗县",530324:"罗平县",530325:"富源县",530326:"会泽县",530381:"宣威市"},530400:{530401:"市辖区",530402:"红塔区",530403:"江川区",530422:"澄江县",530423:"通海县",530424:"华宁县",530425:"易门县",530426:"峨山彝族自治县",530427:"新平彝族傣族自治县",530428:"元江哈尼族彝族傣族自治县"},530500:{530501:"市辖区",530502:"隆阳区",530521:"施甸县",530523:"龙陵县",530524:"昌宁县",530581:"腾冲市"},530600:{530601:"市辖区",530602:"昭阳区",530621:"鲁甸县",530622:"巧家县",530623:"盐津县",530624:"大关县",530625:"永善县",530626:"绥江县",530627:"镇雄县",530628:"彝良县",530629:"威信县",530681:"水富市"},530700:{530701:"市辖区",530702:"古城区",530721:"玉龙纳西族自治县",530722:"永胜县",530723:"华坪县",530724:"宁蒗彝族自治县"},530800:{530801:"市辖区",530802:"思茅区",530821:"宁洱哈尼族彝族自治县",530822:"墨江哈尼族自治县",530823:"景东彝族自治县",530824:"景谷傣族彝族自治县",530825:"镇沅彝族哈尼族拉祜族自治县",530826:"江城哈尼族彝族自治县",530827:"孟连傣族拉祜族佤族自治县",530828:"澜沧拉祜族自治县",530829:"西盟佤族自治县"},530900:{530901:"市辖区",530902:"临翔区",530921:"凤庆县",530922:"云县",530923:"永德县",530924:"镇康县",530925:"双江拉祜族佤族布朗族傣族自治县",530926:"耿马傣族佤族自治县",530927:"沧源佤族自治县"},532300:{532301:"楚雄市",532322:"双柏县",532323:"牟定县",532324:"南华县",532325:"姚安县",532326:"大姚县",532327:"永仁县",532328:"元谋县",532329:"武定县",532331:"禄丰县"},532500:{532501:"个旧市",532502:"开远市",532503:"蒙自市",532504:"弥勒市",532523:"屏边苗族自治县",532524:"建水县",532525:"石屏县",532527:"泸西县",532528:"元阳县",532529:"红河县",532530:"金平苗族瑶族傣族自治县",532531:"绿春县",532532:"河口瑶族自治县"},532600:{532601:"文山市",532622:"砚山县",532623:"西畴县",532624:"麻栗坡县",532625:"马关县",532626:"丘北县",532627:"广南县",532628:"富宁县"},532800:{532801:"景洪市",532822:"勐海县",532823:"勐腊县"},532900:{532901:"大理市",532922:"漾濞彝族自治县",532923:"祥云县",532924:"宾川县",532925:"弥渡县",532926:"南涧彝族自治县",532927:"巍山彝族回族自治县",532928:"永平县",532929:"云龙县",532930:"洱源县",532931:"剑川县",532932:"鹤庆县"},533100:{533102:"瑞丽市",533103:"芒市",533122:"梁河县",533123:"盈江县",533124:"陇川县"},533300:{533301:"泸水市",533323:"福贡县",533324:"贡山独龙族怒族自治县",533325:"兰坪白族普米族自治县"},533400:{533401:"香格里拉市",533422:"德钦县",533423:"维西傈僳族自治县"},54e4:{540100:"拉萨市",540200:"日喀则市",540300:"昌都市",540400:"林芝市",540500:"山南市",540600:"那曲市",542500:"阿里地区"},540100:{540101:"市辖区",540102:"城关区",540103:"堆龙德庆区",540104:"达孜区",540121:"林周县",540122:"当雄县",540123:"尼木县",540124:"曲水县",540127:"墨竹工卡县",540171:"格尔木藏青工业园区",540172:"拉萨经济技术开发区",540173:"西藏文化旅游创意园区",540174:"达孜工业园区"},540200:{540202:"桑珠孜区",540221:"南木林县",540222:"江孜县",540223:"定日县",540224:"萨迦县",540225:"拉孜县",540226:"昂仁县",540227:"谢通门县",540228:"白朗县",540229:"仁布县",540230:"康马县",540231:"定结县",540232:"仲巴县",540233:"亚东县",540234:"吉隆县",540235:"聂拉木县",540236:"萨嘎县",540237:"岗巴县"},540300:{540302:"卡若区",540321:"江达县",540322:"贡觉县",540323:"类乌齐县",540324:"丁青县",540325:"察雅县",540326:"八宿县",540327:"左贡县",540328:"芒康县",540329:"洛隆县",540330:"边坝县"},540400:{540402:"巴宜区",540421:"工布江达县",540422:"米林县",540423:"墨脱县",540424:"波密县",540425:"察隅县",540426:"朗县"},540500:{540501:"市辖区",540502:"乃东区",540521:"扎囊县",540522:"贡嘎县",540523:"桑日县",540524:"琼结县",540525:"曲松县",540526:"措美县",540527:"洛扎县",540528:"加查县",540529:"隆子县",540530:"错那县",540531:"浪卡子县"},540600:{540602:"色尼区",540621:"嘉黎县",540622:"比如县",540623:"聂荣县",540624:"安多县",540625:"申扎县",540626:"索县",540627:"班戈县",540628:"巴青县",540629:"尼玛县",540630:"双湖县"},542500:{542521:"普兰县",542522:"札达县",542523:"噶尔县",542524:"日土县",542525:"革吉县",542526:"改则县",542527:"措勤县"},61e4:{610100:"西安市",610200:"铜川市",610300:"宝鸡市",610400:"咸阳市",610500:"渭南市",610600:"延安市",610700:"汉中市",610800:"榆林市",610900:"安康市",611e3:"商洛市"},610100:{610101:"市辖区",610102:"新城区",610103:"碑林区",610104:"莲湖区",610111:"灞桥区",610112:"未央区",610113:"雁塔区",610114:"阎良区",610115:"临潼区",610116:"长安区",610117:"高陵区",610118:"鄠邑区",610122:"蓝田县",610124:"周至县"},610200:{610201:"市辖区",610202:"王益区",610203:"印台区",610204:"耀州区",610222:"宜君县"},610300:{610301:"市辖区",610302:"渭滨区",610303:"金台区",610304:"陈仓区",610322:"凤翔县",610323:"岐山县",610324:"扶风县",610326:"眉县",610327:"陇县",610328:"千阳县",610329:"麟游县",610330:"凤县",610331:"太白县"},610400:{610401:"市辖区",610402:"秦都区",610403:"杨陵区",610404:"渭城区",610422:"三原县",610423:"泾阳县",610424:"乾县",610425:"礼泉县",610426:"永寿县",610428:"长武县",610429:"旬邑县",610430:"淳化县",610431:"武功县",610481:"兴平市",610482:"彬州市"},610500:{610501:"市辖区",610502:"临渭区",610503:"华州区",610522:"潼关县",610523:"大荔县",610524:"合阳县",610525:"澄城县",610526:"蒲城县",610527:"白水县",610528:"富平县",610581:"韩城市",610582:"华阴市"},610600:{610601:"市辖区",610602:"宝塔区",610603:"安塞区",610621:"延长县",610622:"延川县",610625:"志丹县",610626:"吴起县",610627:"甘泉县",610628:"富县",610629:"洛川县",610630:"宜川县",610631:"黄龙县",610632:"黄陵县",610681:"子长市"},610700:{610701:"市辖区",610702:"汉台区",610703:"南郑区",610722:"城固县",610723:"洋县",610724:"西乡县",610725:"勉县",610726:"宁强县",610727:"略阳县",610728:"镇巴县",610729:"留坝县",610730:"佛坪县"},610800:{610801:"市辖区",610802:"榆阳区",610803:"横山区",610822:"府谷县",610824:"靖边县",610825:"定边县",610826:"绥德县",610827:"米脂县",610828:"佳县",610829:"吴堡县",610830:"清涧县",610831:"子洲县",610881:"神木市"},610900:{610901:"市辖区",610902:"汉滨区",610921:"汉阴县",610922:"石泉县",610923:"宁陕县",610924:"紫阳县",610925:"岚皋县",610926:"平利县",610927:"镇坪县",610928:"旬阳县",610929:"白河县"},611e3:{611001:"市辖区",611002:"商州区",611021:"洛南县",611022:"丹凤县",611023:"商南县",611024:"山阳县",611025:"镇安县",611026:"柞水县"},62e4:{620100:"兰州市",620200:"嘉峪关市",620300:"金昌市",620400:"白银市",620500:"天水市",620600:"武威市",620700:"张掖市",620800:"平凉市",620900:"酒泉市",621e3:"庆阳市",621100:"定西市",621200:"陇南市",622900:"临夏回族自治州",623e3:"甘南藏族自治州"},620100:{620101:"市辖区",620102:"城关区",620103:"七里河区",620104:"西固区",620105:"安宁区",620111:"红古区",620121:"永登县",620122:"皋兰县",620123:"榆中县",620171:"兰州新区"},620200:{620201:"市辖区"},620300:{620301:"市辖区",620302:"金川区",620321:"永昌县"},620400:{620401:"市辖区",620402:"白银区",620403:"平川区",620421:"靖远县",620422:"会宁县",620423:"景泰县"},620500:{620501:"市辖区",620502:"秦州区",620503:"麦积区",620521:"清水县",620522:"秦安县",620523:"甘谷县",620524:"武山县",620525:"张家川回族自治县"},620600:{620601:"市辖区",620602:"凉州区",620621:"民勤县",620622:"古浪县",620623:"天祝藏族自治县"},620700:{620701:"市辖区",620702:"甘州区",620721:"肃南裕固族自治县",620722:"民乐县",620723:"临泽县",620724:"高台县",620725:"山丹县"},620800:{620801:"市辖区",620802:"崆峒区",620821:"泾川县",620822:"灵台县",620823:"崇信县",620825:"庄浪县",620826:"静宁县",620881:"华亭市"},620900:{620901:"市辖区",620902:"肃州区",620921:"金塔县",620922:"瓜州县",620923:"肃北蒙古族自治县",620924:"阿克塞哈萨克族自治县",620981:"玉门市",620982:"敦煌市"},621e3:{621001:"市辖区",621002:"西峰区",621021:"庆城县",621022:"环县",621023:"华池县",621024:"合水县",621025:"正宁县",621026:"宁县",621027:"镇原县"},621100:{621101:"市辖区",621102:"安定区",621121:"通渭县",621122:"陇西县",621123:"渭源县",621124:"临洮县",621125:"漳县",621126:"岷县"},621200:{621201:"市辖区",621202:"武都区",621221:"成县",621222:"文县",621223:"宕昌县",621224:"康县",621225:"西和县",621226:"礼县",621227:"徽县",621228:"两当县"},622900:{622901:"临夏市",622921:"临夏县",622922:"康乐县",622923:"永靖县",622924:"广河县",622925:"和政县",622926:"东乡族自治县",622927:"积石山保安族东乡族撒拉族自治县"},623e3:{623001:"合作市",623021:"临潭县",623022:"卓尼县",623023:"舟曲县",623024:"迭部县",623025:"玛曲县",623026:"碌曲县",623027:"夏河县"},63e4:{630100:"西宁市",630200:"海东市",632200:"海北藏族自治州",632300:"黄南藏族自治州",632500:"海南藏族自治州",632600:"果洛藏族自治州",632700:"玉树藏族自治州",632800:"海西蒙古族藏族自治州"},630100:{630101:"市辖区",630102:"城东区",630103:"城中区",630104:"城西区",630105:"城北区",630121:"大通回族土族自治县",630122:"湟中县",630123:"湟源县"},630200:{630202:"乐都区",630203:"平安区",630222:"民和回族土族自治县",630223:"互助土族自治县",630224:"化隆回族自治县",630225:"循化撒拉族自治县"},632200:{632221:"门源回族自治县",632222:"祁连县",632223:"海晏县",632224:"刚察县"},632300:{632321:"同仁县",632322:"尖扎县",632323:"泽库县",632324:"河南蒙古族自治县"},632500:{632521:"共和县",632522:"同德县",632523:"贵德县",632524:"兴海县",632525:"贵南县"},632600:{632621:"玛沁县",632622:"班玛县",632623:"甘德县",632624:"达日县",632625:"久治县",632626:"玛多县"},632700:{632701:"玉树市",632722:"杂多县",632723:"称多县",632724:"治多县",632725:"囊谦县",632726:"曲麻莱县"},632800:{632801:"格尔木市",632802:"德令哈市",632803:"茫崖市",632821:"乌兰县",632822:"都兰县",632823:"天峻县",632857:"大柴旦行政委员会"},64e4:{640100:"银川市",640200:"石嘴山市",640300:"吴忠市",640400:"固原市",640500:"中卫市"},640100:{640101:"市辖区",640104:"兴庆区",640105:"西夏区",640106:"金凤区",640121:"永宁县",640122:"贺兰县",640181:"灵武市"},640200:{640201:"市辖区",640202:"大武口区",640205:"惠农区",640221:"平罗县"},640300:{640301:"市辖区",640302:"利通区",640303:"红寺堡区",640323:"盐池县",640324:"同心县",640381:"青铜峡市"},640400:{640401:"市辖区",640402:"原州区",640422:"西吉县",640423:"隆德县",640424:"泾源县",640425:"彭阳县"},640500:{640501:"市辖区",640502:"沙坡头区",640521:"中宁县",640522:"海原县"},65e4:{650100:"乌鲁木齐市",650200:"克拉玛依市",650400:"吐鲁番市",650500:"哈密市",652300:"昌吉回族自治州",652700:"博尔塔拉蒙古自治州",652800:"巴音郭楞蒙古自治州",652900:"阿克苏地区",653e3:"克孜勒苏柯尔克孜自治州",653100:"喀什地区",653200:"和田地区",654e3:"伊犁哈萨克自治州",654200:"塔城地区",654300:"阿勒泰地区",659e3:"自治区直辖县级行政区划"},650100:{650101:"市辖区",650102:"天山区",650103:"沙依巴克区",650104:"新市区",650105:"水磨沟区",650106:"头屯河区",650107:"达坂城区",650109:"米东区",650121:"乌鲁木齐县"},650200:{650201:"市辖区",650202:"独山子区",650203:"克拉玛依区",650204:"白碱滩区",650205:"乌尔禾区"},650400:{650402:"高昌区",650421:"鄯善县",650422:"托克逊县"},650500:{650502:"伊州区",650521:"巴里坤哈萨克自治县",650522:"伊吾县"},652300:{652301:"昌吉市",652302:"阜康市",652323:"呼图壁县",652324:"玛纳斯县",652325:"奇台县",652327:"吉木萨尔县",652328:"木垒哈萨克自治县"},652700:{652701:"博乐市",652702:"阿拉山口市",652722:"精河县",652723:"温泉县"},652800:{652801:"库尔勒市",652822:"轮台县",652823:"尉犁县",652824:"若羌县",652825:"且末县",652826:"焉耆回族自治县",652827:"和静县",652828:"和硕县",652829:"博湖县",652871:"库尔勒经济技术开发区"},652900:{652901:"阿克苏市",652922:"温宿县",652923:"库车县",652924:"沙雅县",652925:"新和县",652926:"拜城县",652927:"乌什县",652928:"阿瓦提县",652929:"柯坪县"},653e3:{653001:"阿图什市",653022:"阿克陶县",653023:"阿合奇县",653024:"乌恰县"},653100:{653101:"喀什市",653121:"疏附县",653122:"疏勒县",653123:"英吉沙县",653124:"泽普县",653125:"莎车县",653126:"叶城县",653127:"麦盖提县",653128:"岳普湖县",653129:"伽师县",653130:"巴楚县",653131:"塔什库尔干塔吉克自治县"},653200:{653201:"和田市",653221:"和田县",653222:"墨玉县",653223:"皮山县",653224:"洛浦县",653225:"策勒县",653226:"于田县",653227:"民丰县"},654e3:{654002:"伊宁市",654003:"奎屯市",654004:"霍尔果斯市",654021:"伊宁县",654022:"察布查尔锡伯自治县",654023:"霍城县",654024:"巩留县",654025:"新源县",654026:"昭苏县",654027:"特克斯县",654028:"尼勒克县"},654200:{654201:"塔城市",654202:"乌苏市",654221:"额敏县",654223:"沙湾县",654224:"托里县",654225:"裕民县",654226:"和布克赛尔蒙古自治县"},654300:{654301:"阿勒泰市",654321:"布尔津县",654322:"富蕴县",654323:"福海县",654324:"哈巴河县",654325:"青河县",654326:"吉木乃县"},659e3:{659001:"石河子市",659002:"阿拉尔市",659003:"图木舒克市",659004:"五家渠市",659006:"铁门关市"},71e4:{710100:"台北市",710200:"高雄市",710300:"基隆市",710400:"台中市",710500:"台南市",710600:"新竹市",710700:"嘉义市"},710100:{710101:"内湖区",710102:"南港区",710103:"中正区",710104:"松山区",710105:"信义区",710106:"大安区",710107:"中山区",710108:"文山区",710109:"大同区",710110:"万华区",710111:"士林区",710112:"北投区"},710200:{710201:"新兴区",710202:"前金区",710203:"芩雅区",710204:"盐埕区",710205:"鼓山区",710206:"旗津区",710207:"前镇区",710208:"三民区",710209:"左营区",710210:"楠梓区",710211:"小港区"},710300:{710301:"仁爱区",710302:"信义区",710303:"中正区",710304:"暖暖区",710305:"安乐区",710307:"七堵区"},710400:{710301:"中区",710302:"东区",710303:"南区",710304:"西区",710305:"北区",710306:"北屯区",710307:"西屯区",710308:"南屯区"},710500:{710501:"中西区",710502:"东区",710503:"南区",710504:"北区",710505:"安平区",710506:"安南区"},710600:{710601:"东区",710602:"北区",710603:"香山区"},710700:{710701:"东区",710702:"西区"},81e4:{810001:"中西區",810002:"灣仔區",810003:"東區",810004:"南區",810005:"油尖旺區",810006:"深水埗區",810007:"九龍城區",810008:"黃大仙區",810009:"觀塘區",810010:"荃灣區",810011:"屯門區",810012:"元朗區",810013:"北區",810014:"大埔區",810015:"西貢區",810016:"沙田區",810017:"葵青區",810018:"離島區"},82e4:{820001:"花地瑪堂區",820002:"花王堂區",820003:"望德堂區",820004:"大堂區",820005:"風順堂區",820006:"嘉模堂區",820007:"路氹填海區",820008:"聖方濟各堂區"}}},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t);var a=i(1),r=i.n(a),n=function(){this.__data__=[],this.size=0},s=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var i=e.length;i--;)if(s(e[i][0],t))return i;return-1},l=Array.prototype.splice,c=function(e){var t=this.__data__,i=o(t,e);return!(i<0||(i==t.length-1?t.pop():l.call(t,i,1),--this.size,0))},d=function(e){var t=this.__data__,i=o(t,e);return i<0?void 0:t[i][1]},u=function(e){return o(this.__data__,e)>-1},p=function(e,t){var i=this.__data__,a=o(i,e);return a<0?(++this.size,i.push([e,t])):i[a][1]=t,this};function h(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}h.prototype.clear=n,h.prototype.delete=c,h.prototype.get=d,h.prototype.has=u,h.prototype.set=p;var f,m=h,v=function(){this.__data__=new m,this.size=0},g=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},y=function(e){return this.__data__.get(e)},b=function(e){return this.__data__.has(e)},w=i(0),_=w.a.Symbol,x=Object.prototype,k=x.hasOwnProperty,$=x.toString,I=_?_.toStringTag:void 0,S=function(e){var t=k.call(e,I),i=e[I];try{e[I]=void 0;var a=!0}catch(e){}var r=$.call(e);return a&&(t?e[I]=i:delete e[I]),r},j=Object.prototype.toString,C=function(e){return j.call(e)},L="[object Null]",P="[object Undefined]",N=_?_.toStringTag:void 0,T=function(e){return null==e?void 0===e?P:L:N&&N in Object(e)?S(e):C(e)},O=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},D="[object AsyncFunction]",M="[object Function]",E="[object GeneratorFunction]",F="[object Proxy]",A=function(e){if(!O(e))return!1;var t=T(e);return t==M||t==E||t==D||t==F},R=w.a["__core-js_shared__"],q=(f=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",V=function(e){return!!q&&q in e},B=Function.prototype.toString,z=function(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""},U=/^\[object .+?Constructor\]$/,Q=Function.prototype,H=Object.prototype,G=Q.toString,W=H.hasOwnProperty,Y=RegExp("^"+G.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),J=function(e){return!(!O(e)||V(e))&&(A(e)?Y:U).test(z(e))},K=function(e,t){return null==e?void 0:e[t]},Z=function(e,t){var i=K(e,t);return J(i)?i:void 0},X=Z(w.a,"Map"),ee=Z(Object,"create"),te=function(){this.__data__=ee?ee(null):{},this.size=0},ie=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ae="__lodash_hash_undefined__",re=Object.prototype.hasOwnProperty,ne=function(e){var t=this.__data__;if(ee){var i=t[e];return i===ae?void 0:i}return re.call(t,e)?t[e]:void 0},se=Object.prototype.hasOwnProperty,oe=function(e){var t=this.__data__;return ee?void 0!==t[e]:se.call(t,e)},le="__lodash_hash_undefined__",ce=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=ee&&void 0===t?le:t,this};function de(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}de.prototype.clear=te,de.prototype.delete=ie,de.prototype.get=ne,de.prototype.has=oe,de.prototype.set=ce;var ue=de,pe=function(){this.size=0,this.__data__={hash:new ue,map:new(X||m),string:new ue}},he=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},fe=function(e,t){var i=e.__data__;return he(t)?i["string"==typeof t?"string":"hash"]:i.map},me=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},ve=function(e){return fe(this,e).get(e)},ge=function(e){return fe(this,e).has(e)},ye=function(e,t){var i=fe(this,e),a=i.size;return i.set(e,t),this.size+=i.size==a?0:1,this};function be(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var a=e[t];this.set(a[0],a[1])}}be.prototype.clear=pe,be.prototype.delete=me,be.prototype.get=ve,be.prototype.has=ge,be.prototype.set=ye;var we=be,_e=200,xe=function(e,t){var i=this.__data__;if(i instanceof m){var a=i.__data__;if(!X||a.length<_e-1)return a.push([e,t]),this.size=++i.size,this;i=this.__data__=new we(a)}return i.set(e,t),this.size=i.size,this};function ke(e){var t=this.__data__=new m(e);this.size=t.size}ke.prototype.clear=v,ke.prototype.delete=g,ke.prototype.get=y,ke.prototype.has=b,ke.prototype.set=xe;var $e=ke,Ie=function(e,t){for(var i=-1,a=null==e?0:e.length;++i<a&&!1!==t(e[i],i,e););return e},Se=function(){try{var e=Z(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),je=function(e,t,i){"__proto__"==t&&Se?Se(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i},Ce=Object.prototype.hasOwnProperty,Le=function(e,t,i){var a=e[t];Ce.call(e,t)&&s(a,i)&&(void 0!==i||t in e)||je(e,t,i)},Pe=function(e,t,i,a){var r=!i;i||(i={});for(var n=-1,s=t.length;++n<s;){var o=t[n],l=a?a(i[o],e[o],o,i,e):void 0;void 0===l&&(l=e[o]),r?je(i,o,l):Le(i,o,l)}return i},Ne=function(e,t){for(var i=-1,a=Array(e);++i<e;)a[i]=t(i);return a},Te=function(e){return null!=e&&"object"==typeof e},Oe="[object Arguments]",De=function(e){return Te(e)&&T(e)==Oe},Me=Object.prototype,Ee=Me.hasOwnProperty,Fe=Me.propertyIsEnumerable,Ae=De(function(){return arguments}())?De:function(e){return Te(e)&&Ee.call(e,"callee")&&!Fe.call(e,"callee")},Re=Array.isArray,qe=i(4),Ve=9007199254740991,Be=/^(?:0|[1-9]\d*)$/,ze=function(e,t){var i=typeof e;return!!(t=null==t?Ve:t)&&("number"==i||"symbol"!=i&&Be.test(e))&&e>-1&&e%1==0&&e<t},Ue=9007199254740991,Qe=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ue},He={};He["[object Float32Array]"]=He["[object Float64Array]"]=He["[object Int8Array]"]=He["[object Int16Array]"]=He["[object Int32Array]"]=He["[object Uint8Array]"]=He["[object Uint8ClampedArray]"]=He["[object Uint16Array]"]=He["[object Uint32Array]"]=!0,He["[object Arguments]"]=He["[object Array]"]=He["[object ArrayBuffer]"]=He["[object Boolean]"]=He["[object DataView]"]=He["[object Date]"]=He["[object Error]"]=He["[object Function]"]=He["[object Map]"]=He["[object Number]"]=He["[object Object]"]=He["[object RegExp]"]=He["[object Set]"]=He["[object String]"]=He["[object WeakMap]"]=!1;var Ge=function(e){return Te(e)&&Qe(e.length)&&!!He[T(e)]},We=function(e){return function(t){return e(t)}},Ye=i(2),Je=Ye.a&&Ye.a.isTypedArray,Ke=Je?We(Je):Ge,Ze=Object.prototype.hasOwnProperty,Xe=function(e,t){var i=Re(e),a=!i&&Ae(e),r=!i&&!a&&Object(qe.a)(e),n=!i&&!a&&!r&&Ke(e),s=i||a||r||n,o=s?Ne(e.length,String):[],l=o.length;for(var c in e)!t&&!Ze.call(e,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||n&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ze(c,l))||o.push(c);return o},et=Object.prototype,tt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||et)},it=function(e,t){return function(i){return e(t(i))}},at=it(Object.keys,Object),rt=Object.prototype.hasOwnProperty,nt=function(e){if(!tt(e))return at(e);var t=[];for(var i in Object(e))rt.call(e,i)&&"constructor"!=i&&t.push(i);return t},st=function(e){return null!=e&&Qe(e.length)&&!A(e)},ot=function(e){return st(e)?Xe(e):nt(e)},lt=function(e,t){return e&&Pe(t,ot(t),e)},ct=function(e){var t=[];if(null!=e)for(var i in Object(e))t.push(i);return t},dt=Object.prototype.hasOwnProperty,ut=function(e){if(!O(e))return ct(e);var t=tt(e),i=[];for(var a in e)("constructor"!=a||!t&&dt.call(e,a))&&i.push(a);return i},pt=function(e){return st(e)?Xe(e,!0):ut(e)},ht=function(e,t){return e&&Pe(t,pt(t),e)},ft=i(7),mt=function(e,t){var i=-1,a=e.length;for(t||(t=Array(a));++i<a;)t[i]=e[i];return t},vt=function(e,t){for(var i=-1,a=null==e?0:e.length,r=0,n=[];++i<a;){var s=e[i];t(s,i,e)&&(n[r++]=s)}return n},gt=function(){return[]},yt=Object.prototype.propertyIsEnumerable,bt=Object.getOwnPropertySymbols,wt=bt?function(e){return null==e?[]:(e=Object(e),vt(bt(e),(function(t){return yt.call(e,t)})))}:gt,_t=function(e,t){return Pe(e,wt(e),t)},xt=function(e,t){for(var i=-1,a=t.length,r=e.length;++i<a;)e[r+i]=t[i];return e},kt=it(Object.getPrototypeOf,Object),$t=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)xt(t,wt(e)),e=kt(e);return t}:gt,It=function(e,t){return Pe(e,$t(e),t)},St=function(e,t,i){var a=t(e);return Re(e)?a:xt(a,i(e))},jt=function(e){return St(e,ot,wt)},Ct=function(e){return St(e,pt,$t)},Lt=Z(w.a,"DataView"),Pt=Z(w.a,"Promise"),Nt=Z(w.a,"Set"),Tt=Z(w.a,"WeakMap"),Ot=z(Lt),Dt=z(X),Mt=z(Pt),Et=z(Nt),Ft=z(Tt),At=T;(Lt&&"[object DataView]"!=At(new Lt(new ArrayBuffer(1)))||X&&"[object Map]"!=At(new X)||Pt&&"[object Promise]"!=At(Pt.resolve())||Nt&&"[object Set]"!=At(new Nt)||Tt&&"[object WeakMap]"!=At(new Tt))&&(At=function(e){var t=T(e),i="[object Object]"==t?e.constructor:void 0,a=i?z(i):"";if(a)switch(a){case Ot:return"[object DataView]";case Dt:return"[object Map]";case Mt:return"[object Promise]";case Et:return"[object Set]";case Ft:return"[object WeakMap]"}return t});var Rt=At,qt=Object.prototype.hasOwnProperty,Vt=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&qt.call(e,"index")&&(i.index=e.index,i.input=e.input),i},Bt=w.a.Uint8Array,zt=function(e){var t=new e.constructor(e.byteLength);return new Bt(t).set(new Bt(e)),t},Ut=function(e,t){var i=t?zt(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)},Qt=/\w*$/,Ht=function(e){var t=new e.constructor(e.source,Qt.exec(e));return t.lastIndex=e.lastIndex,t},Gt=_?_.prototype:void 0,Wt=Gt?Gt.valueOf:void 0,Yt=function(e){return Wt?Object(Wt.call(e)):{}},Jt=function(e,t){var i=t?zt(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)},Kt="[object Boolean]",Zt="[object Date]",Xt="[object Map]",ei="[object Number]",ti="[object RegExp]",ii="[object Set]",ai="[object String]",ri="[object Symbol]",ni="[object ArrayBuffer]",si="[object DataView]",oi="[object Float32Array]",li="[object Float64Array]",ci="[object Int8Array]",di="[object Int16Array]",ui="[object Int32Array]",pi="[object Uint8Array]",hi="[object Uint8ClampedArray]",fi="[object Uint16Array]",mi="[object Uint32Array]",vi=function(e,t,i){var a=e.constructor;switch(t){case ni:return zt(e);case Kt:case Zt:return new a(+e);case si:return Ut(e,i);case oi:case li:case ci:case di:case ui:case pi:case hi:case fi:case mi:return Jt(e,i);case Xt:return new a;case ei:case ai:return new a(e);case ti:return Ht(e);case ii:return new a;case ri:return Yt(e)}},gi=Object.create,yi=function(){function e(){}return function(t){if(!O(t))return{};if(gi)return gi(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}(),bi=function(e){return"function"!=typeof e.constructor||tt(e)?{}:yi(kt(e))},wi="[object Map]",_i=function(e){return Te(e)&&Rt(e)==wi},xi=Ye.a&&Ye.a.isMap,ki=xi?We(xi):_i,$i="[object Set]",Ii=function(e){return Te(e)&&Rt(e)==$i},Si=Ye.a&&Ye.a.isSet,ji=Si?We(Si):Ii,Ci=1,Li=2,Pi=4,Ni="[object Arguments]",Ti="[object Function]",Oi="[object GeneratorFunction]",Di="[object Object]",Mi={};Mi[Ni]=Mi["[object Array]"]=Mi["[object ArrayBuffer]"]=Mi["[object DataView]"]=Mi["[object Boolean]"]=Mi["[object Date]"]=Mi["[object Float32Array]"]=Mi["[object Float64Array]"]=Mi["[object Int8Array]"]=Mi["[object Int16Array]"]=Mi["[object Int32Array]"]=Mi["[object Map]"]=Mi["[object Number]"]=Mi[Di]=Mi["[object RegExp]"]=Mi["[object Set]"]=Mi["[object String]"]=Mi["[object Symbol]"]=Mi["[object Uint8Array]"]=Mi["[object Uint8ClampedArray]"]=Mi["[object Uint16Array]"]=Mi["[object Uint32Array]"]=!0,Mi["[object Error]"]=Mi[Ti]=Mi["[object WeakMap]"]=!1;var Ei=function e(t,i,a,r,n,s){var o,l=i&Ci,c=i&Li,d=i&Pi;if(a&&(o=n?a(t,r,n,s):a(t)),void 0!==o)return o;if(!O(t))return t;var u=Re(t);if(u){if(o=Vt(t),!l)return mt(t,o)}else{var p=Rt(t),h=p==Ti||p==Oi;if(Object(qe.a)(t))return Object(ft.a)(t,l);if(p==Di||p==Ni||h&&!n){if(o=c||h?{}:bi(t),!l)return c?It(t,ht(o,t)):_t(t,lt(o,t))}else{if(!Mi[p])return n?t:{};o=vi(t,p,l)}}s||(s=new $e);var f=s.get(t);if(f)return f;s.set(t,o),ji(t)?t.forEach((function(r){o.add(e(r,i,a,r,t,s))})):ki(t)&&t.forEach((function(r,n){o.set(n,e(r,i,a,n,t,s))}));var m=d?c?Ct:jt:c?keysIn:ot,v=u?void 0:m(t);return Ie(v||t,(function(r,n){v&&(r=t[n=r]),Le(o,n,e(r,i,a,n,t,s))})),o},Fi=1,Ai=4,Ri=function(e){return Ei(e,Fi|Ai)};i.d(t,"provinceAndCityData",(function(){return Ui})),i.d(t,"regionData",(function(){return zi})),i.d(t,"provinceAndCityDataPlus",(function(){return la})),i.d(t,"regionDataPlus",(function(){return ma})),i.d(t,"CodeToText",(function(){return qi})),i.d(t,"TextToCode",(function(){return Vi}));var qi={},Vi={},Bi=r.a[86],zi=[],Ui=[];for(var Qi in qi[""]="全部",Bi)zi.push({value:Qi,label:Bi[Qi]}),qi[Qi]=Bi[Qi],Vi[Bi[Qi]]={code:Qi},Vi[Bi[Qi]]["全部"]={code:""};for(var Hi=0,Gi=zi.length;Hi<Gi;Hi++){var Wi=zi[Hi].value,Yi=zi[Hi].label,Ji=[];for(var Ki in r.a[Wi])Ji.push({value:Ki,label:r.a[Wi][Ki]}),qi[Ki]=r.a[Wi][Ki],Vi[Yi][r.a[Wi][Ki]]={code:Ki},Vi[Yi][r.a[Wi][Ki]]["全部"]={code:""};Ji.length&&(zi[Hi].children=Ji)}Ui=Ri(zi);for(var Zi=0,Xi=zi.length;Zi<Xi;Zi++){var ea=zi[Zi].children,ta=zi[Zi].label;if(ea)for(var ia=0,aa=ea.length;ia<aa;ia++){var ra=ea[ia].value,na=ea[ia].label,sa=[];for(var oa in r.a[ra])sa.push({value:oa,label:r.a[ra][oa]}),qi[oa]=r.a[ra][oa],Vi[ta][na][r.a[ra][oa]]={code:oa};sa.length&&(ea[ia].children=sa)}}var la=Ri(Ui);la.unshift({value:"",label:"全部"});for(var ca=0,da=la.length;ca<da;ca++){var ua=la[ca].children;if(ua&&ua.length){ua.unshift({value:"",label:"全部"});for(var pa=0,ha=ua.length;pa<ha;pa++){var fa=ua[pa].children;fa&&fa.length&&fa.unshift({value:"",label:"全部"})}}}var ma=Ri(zi);ma.unshift({value:"",label:"全部"});for(var va=0,ga=ma.length;va<ga;va++){var ya=ma[va].children;if(ya&&ya.length){ya.unshift({value:"",label:"全部"});for(var ba=0,wa=ya.length;ba<wa;ba++){var _a=ya[ba].children;_a&&_a.length&&_a.unshift({value:"",label:"全部"})}}}}])}))},f14e:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"75px"}},[e.isSubDev?i("el-form-item",{attrs:{"label-width":"120px"}},[i("el-select",{attrs:{placeholder:e.$t("device.device-statistic.932674-1")},on:{change:e.selectSlave},model:{value:e.queryParams.slaveId,callback:function(t){e.$set(e.queryParams,"slaveId",t)},expression:"queryParams.slaveId"}},e._l(e.slaveList,(function(e){return i("el-option",{key:e.slaveId,attrs:{label:e.deviceName+" ("+e.slaveId+")",value:e.slaveId}})})),1)],1):e._e(),i("el-form-item",[i("el-date-picker",{staticStyle:{width:"240px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":e.$t("device.device-statistic.932674-3"),"end-placeholder":e.$t("device.device-statistic.932674-4")},model:{value:e.daterangeTime,callback:function(t){e.daterangeTime=t},expression:"daterangeTime"}})],1),i("el-form-item",[i("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.getListHistory}},[e._v(e._s(e.$t("search")))])],1)],1),e._l(e.staticList,(function(t,a){return i("div",{key:a,staticStyle:{"margin-bottom":"30px"}},[i("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{shadow:"hover","body-style":{padding:"10px 0px",overflow:"auto"}}},[i("div",{ref:"statisticMap",refInFor:!0,staticStyle:{height:"300px",width:"1080px"}})])],1)}))],2)},r=[],n=(i("4de4"),i("14d9"),i("4e82"),i("b0c0"),i("b680"),i("b64b"),i("d3b7"),i("a035")),s={name:"device-statistic",props:{device:{type:Object,default:null}},watch:{device:{handler:function(e){var t=this;this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&(this.isSubDev=this.deviceInfo.subDeviceList&&this.deviceInfo.subDeviceList.length>0,this.queryParams.slaveId=this.deviceInfo.slaveId,this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.slaveList=e.subDeviceList,this.isSubDev?this.staticList=this.deviceInfo.cacheThingsModel["properties"].filter((function(e){return e.tempSlaveId==t.queryParams.slaveId})):(this.staticList=this.deviceInfo.staticList,this.staticList=this.staticList.sort((function(e,t){return t.order-e.order}))),this.$nextTick((function(){this.getStatistic()})))}}},data:function(){return{loading:!0,deviceInfo:{},staticList:[],chart:[],daterangeTime:[this.getTime(),this.getTime()],queryParams:{serialNumber:null,identity:"",slaveId:void 0},arrayData:[],slaveList:[],isSubDev:!1}},mounted:function(){this.handleDeviceChange(this.device)},methods:{handleDeviceChange:function(e){var t=this;this.deviceInfo=e,this.deviceInfo&&0!=this.deviceInfo.deviceId&&this.staticList.length>0&&(this.isSubDev=this.deviceInfo.subDeviceList&&this.deviceInfo.subDeviceList.length>0,this.queryParams.slaveId=this.deviceInfo.slaveId,this.queryParams.serialNumber=this.deviceInfo.serialNumber,this.slaveList=this.deviceInfo.subDeviceList,this.isSubDev?this.staticList=this.deviceInfo.cacheThingsModel["properties"].filter((function(e){return e.tempSlaveId==t.queryParams.slaveId})):(this.staticList=this.deviceInfo.staticList,this.staticList=this.staticList.sort((function(e,t){return t.order-e.order}))),this.$nextTick((function(){this.getStatistic()})))},getTime:function(){var e=new Date,t=e.getFullYear(),i=e.getMonth()+1,a=e.getDate();return i=i<10?"0"+i:i,a=a<10?"0"+a:a,t+"-"+i+"-"+a},getListHistory:function(){var e=this;this.loading=!0,this.queryParams.serialNumber=this.deviceInfo.serialNumber,null!=this.daterangeTime&&""!=this.daterangeTime?(this.queryParams.beginTime=this.daterangeTime[0]+" 00:00:00",this.queryParams.endTime=this.daterangeTime[1]+" 23:59:59"):(this.queryParams.beginTime=this.getTime()+" 00:00:00",this.queryParams.endTime=this.getTime()+" 23:59:59"),this.queryParams.productId=this.deviceInfo.productId,Object(n["b"])(this.queryParams).then((function(t){if(t.data&&0===Object.keys(t.data).length){for(var i=0;i<e.staticList.length;i++)e.chart[i].setOption({series:[{data:[]}]});e.loading=!1}else for(var a in t.data)for(var r=0;r<e.staticList.length;r++)if(a==e.staticList[r].id){for(var n=[],s=0;s<t.data[a].length;s++){var o=[];o[0]=t.data[a][s].time,o[1]=t.data[a][s].value,n.push(o)}e.chart[r].setOption({series:[{data:n}]})}e.loading=!1}))},getStatistic:function(){for(var e=["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],t=0;t<this.staticList.length;t++){var i;this.$refs.statisticMap[t].style.width=document.documentElement.clientWidth-304+"px",this.chart[t]=this.$echarts.init(this.$refs.statisticMap[t]),i={animationDurationUpdate:3e3,tooltip:{trigger:"axis"},title:{left:"center",text:this.staticList[t].name+"统计 (单位 "+(this.staticList[t].datatype&&void 0!=this.staticList[t].datatype.unit?this.staticList[t].datatype.unit:this.$t("device.device-statistic.932674-7"))+""},grid:{top:"80px",left:"40px",right:"20px",bottom:"60px",containLabel:!0},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"time"},yAxis:{type:"value",scale:!0,axisLabel:{formatter:function(e,t){return e.toFixed(2)}}},dataZoom:[{type:"inside",start:0,end:100},{start:0,end:100}],series:[{name:this.staticList[t].name,type:"line",symbol:"none",sampling:"lttb",itemStyle:{color:t>9?e[0]:e[t]},areaStyle:{},data:[]}]},i&&this.chart[t].setOption(i)}},selectSlave:function(){var e=this;this.staticList=this.deviceInfo.cacheThingsModel["properties"].filter((function(t){return t.tempSlaveId==e.queryParams.slaveId})),this.$nextTick((function(){this.getStatistic(),this.getListHistory()}))}}},o=s,l=i("2877"),c=Object(l["a"])(o,a,r,!1,null,null,null);t["default"]=c.exports},f4ed:function(e,t,i){},f5a7:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"c",(function(){return s}));var a=i("b775");function r(e){return Object(a["a"])({url:"/sip/device/listchannel/"+e,method:"get"})}function n(e){return Object(a["a"])({url:"/sip/device/sipid/"+e,method:"delete"})}function s(e,t,i){return Object(a["a"])({url:"/sip/ptz/direction/"+e+"/"+t,method:"post",data:i})}},f5de:function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s})),i.d(t,"d",(function(){return o}));var a=i("b775");function r(e){return Object(a["a"])({url:"/iot/mqtt/clients",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/mqtt/client/out",method:"get",params:e})}function s(){return Object(a["a"])({url:"/bashBoard/stats",method:"get"})}function o(e){return Object(a["a"])({url:"/bashBoard/metrics",method:"get",params:e})}},f5fc:function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-row",{staticStyle:{"margin-bottom":"16px"},attrs:{gutter:20}},[i("el-col",{attrs:{span:1.5}},[i("el-select",{staticStyle:{width:"190px"},attrs:{placeholder:e.$t("views.components.player.deviceLiveStream.48750-1")},on:{change:e.changeChannel},model:{value:e.channelId,callback:function(t){e.channelId=t},expression:"channelId"}},e._l(e.channelList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),i("el-col",{attrs:{span:1.5}},[i("el-date-picker",{staticStyle:{width:"150px","margin-right":"10px"},attrs:{type:"date","value-format":"yyyy-MM-dd",clearable:"",placeholder:e.$t("views.components.player.deviceVideo.808340-3")},model:{value:e.queryDate,callback:function(t){e.queryDate=t},expression:"queryDate"}})],1),i("el-col",{staticStyle:{"margin-right":"30px"},attrs:{span:1.5}},[i("el-button",{attrs:{type:"primary",title:e.$t("views.components.player.deviceVideo.808340-4"),disabled:""===e.channelId||!e.queryDate},on:{click:function(t){return e.loadDevRecord()}}},[i("i",{staticClass:"el-icon-video-camera"}),e._v(" "+e._s(e.$t("views.components.player.deviceVideo.808340-5"))+" ")])],1),i("el-col",{attrs:{span:1.5}},[i("el-time-picker",{staticStyle:{width:"210px","margin-right":"10px"},attrs:{"is-range":"","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":e.$t("views.components.player.deviceVideo.808340-7"),"start-placeholder":e.$t("views.components.player.deviceVideo.808340-8"),"end-placeholder":e.$t("views.components.player.deviceVideo.808340-9"),placeholder:e.$t("views.components.player.deviceVideo.808340-10"),disabled:""===e.channelId||!e.queryDate},on:{change:e.timePickerChange},model:{value:e.timeRange,callback:function(t){e.timeRange=t},expression:"timeRange"}})],1),i("el-col",{attrs:{span:1.5}},[i("el-button",{attrs:{type:"primary",title:e.$t("views.components.player.deviceVideo.808340-11"),disabled:""===e.channelId||!e.timeRange},on:{click:function(t){return e.downloadRecord()}}},[i("i",{staticClass:"el-icon-download"}),e._v(" "+e._s(e.$t("views.components.player.deviceVideo.808340-12"))+" ")])],1)],1),i("player",{ref:"playbacker",attrs:{playerinfo:e.playinfo}})],1)},r=[],n=(i("d81d"),i("d3b7"),i("97d6")),s=i("e2de"),o=i("6827"),l={name:"DeviceVideo",components:{player:n["default"]},data:function(){return{deviceId:"",channelId:"",streamId:"",ssrc:"",playurl:"",queryDate:"",playing:!1,vodData:{},hisData:[],playinfo:{},channelList:[],playbackinfo:{},timeRange:null,startTime:null,endTime:null,queryParams:{pageNum:1,pageSize:10,deviceSipId:null,channelSipId:null}}},props:{device:{type:Object,default:null}},watch:{device:function(e,t){this.deviceInfo=e,this.deviceInfo&&0!==this.deviceInfo.deviceId&&(this.queryParams.deviceSipId=this.deviceInfo.serialNumber,this.deviceId=this.device.serialNumber)}},created:function(){this.queryParams.deviceSipId=this.device.serialNumber,this.deviceId=this.device.serialNumber,this.getList(),this.playinfo={playtype:"playback",deviceId:this.device.serialNumber}},beforeDestroy:function(){this.closeStream()},methods:{getList:function(){var e=this;this.loading=!0,Object(s["g"])(this.queryParams).then((function(t){e.channelList=t.rows.map((function(e){return{value:e.channelSipId,label:e.channelName}}))}))},changeChannel:function(){this.playinfo.channelId=this.channelId},initUrl:function(e){e?(this.streamId=e.ssrc,this.ssrc=e.ssrc,this.playurl=e.playurl):(this.streamId="",this.ssrc="",this.playurl="")},getBeijingTime:function(e){var t=288e5,i=new Date(new Date(e).getTime()-t);return i.getTime()},loadDevRecord:function(){var e=this;if(this.$refs.playbacker.registercallback("playbackSeek",this.seekPlay),""!==this.queryDate&&null!==this.queryDate){if(this.deviceId&&this.channelId){var t=this.getBeijingTime(this.queryDate),i=t/1e3,a=Math.floor((t+864e5-1)/1e3),r={start:i,end:a};this.vodData={start:i,end:a,base:i},this.setTime(this.queryDate+" 00:00:00",this.queryDate+" 23:59:59"),Object(o["a"])(this.deviceId,this.channelId,r).then((function(t){if(e.hisData=t.data.recordItems,t.data.recordItems){var r=e.hisData.length;r>0?(e.hisData[0].start<i?(e.hisData[0].start=i,e.vodData.start=i):e.vodData.start=e.hisData[0].start,0!==e.hisData[0].end&&e.hisData[0].end<a&&(e.vodData.end=e.hisData[0].end),e.playback()):e.$message({type:"warning",message:e.$t("views.components.player.deviceVideo.808340-14")})}else e.$message({type:"warning",message:e.$t("views.components.player.deviceVideo.808340-14")})}))}}else this.$message.error(this.$t("views.components.player.deviceVideo.808340-13"))},playback:function(){var e=this,t={start:this.vodData.start,end:this.vodData.end};this.ssrc?Object(s["c"])(this.deviceId,this.channelId,this.ssrc).then((function(i){Object(s["h"])(e.deviceId,e.channelId,t).then((function(t){e.initUrl(t.data)})).finally((function(){e.triggerPlay(e.hisData)}))})):Object(s["h"])(this.deviceId,this.channelId,t).then((function(t){e.initUrl(t.data)})).finally((function(){e.triggerPlay(e.hisData)}))},triggerPlay:function(e){this.$refs.playbacker.playback(this.playurl,e),this.playing=!0},seekPlay:function(e){console.log("seekPlay: ["+e+"]");var t=this.vodData.base+3600*e.hour+60*e.min+e.second;console.log("curTime: ["+t+"]"),console.log("start: ["+this.vodData.start+"]");var i=t-this.vodData.start;if(console.log("seekRange: ["+i+"]"),this.ssrc){var a={seek:i},r=this,n=(new Date).setHours(e.hour,e.min,e.second,0);Object(s["i"])(this.deviceId,this.channelId,this.streamId,a).then((function(e){console.log("setPlaybackStartTime: ["+t+"]"),console.log("setPlaybackStartTime: ["+n+"]"),r.$refs.playbacker.setPlaybackStartTime(1e3*t)}))}},closeStream:function(){var e=this;this.playing&&this.streamId&&(console.log("关闭推流: ["+this.playing+"]"),console.log("关闭推流: ["+this.streamId+"]"),Object(s["c"])(this.deviceId,this.channelId,this.streamId).then((function(t){e.streamId="",e.ssrc="",e.playurl="",e.playing=!1})))},destroy:function(){this.playing&&this.streamId&&this.$refs.playbacker.destroy()},closeDestroy:function(){this.closeStream(),this.destroy()},timePickerChange:function(e){this.setTime(e[0],e[1])},setTime:function(e,t){this.startTime=e,this.endTime=t,this.timeRange=[e,t]},downloadRecord:function(){var e=this,t=new Date(this.startTime).getTime()/1e3,i=new Date(this.endTime).getTime()/1e3,a={startTime:t,endTime:i,speed:"4"};Object(o["f"])(this.deviceId,this.channelId,a).then((function(t){console.log("开始转存到流服务器:"+e.deviceId+" : "+e.channelId),200===t.code&&e.$message({type:"success",message:e.$t("views.components.player.deviceVideo.808340-15")})}))}}},c=l,d=i("2877"),u=Object(d["a"])(c,a,r,!1,null,null,null);t["default"]=u.exports}}]);