openc3-cosmos-tool-cmdtlmserver 5.10.0 → 5.10.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- "use strict";(self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[872],{4872:function(e,t,n){var r=n(8123);function c(){var e="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",t="4a33e65af05f7d08e216a604150e8920749ac334",n=new Function("return this")(),r="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",statementMap:{0:{start:{line:32,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:38,column:30}},2:{start:{line:41,column:4},end:{line:41,column:24}},3:{start:{line:44,column:4},end:{line:47,column:5}},4:{start:{line:45,column:6},end:{line:45,column:33}},5:{start:{line:46,column:6},end:{line:46,column:25}},6:{start:{line:52,column:6},end:{line:52,column:26}},7:{start:{line:57,column:6},end:{line:60,column:7}},8:{start:{line:58,column:8},end:{line:58,column:35}},9:{start:{line:59,column:8},end:{line:59,column:27}},10:{start:{line:61,column:6},end:{line:63,column:30}},11:{start:{line:62,column:8},end:{line:62,column:21}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:9},end:{line:36,column:3}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:37,column:2},end:{line:37,column:3}},loc:{start:{line:37,column:12},end:{line:39,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:12},end:{line:42,column:3}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:18},end:{line:48,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:51,column:21},end:{line:51,column:22}},loc:{start:{line:51,column:47},end:{line:53,column:5}},line:51},5:{name:"(anonymous_5)",decl:{start:{line:56,column:4},end:{line:56,column:5}},loc:{start:{line:56,column:20},end:{line:64,column:5}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:61,column:33},end:{line:61,column:34}},loc:{start:{line:61,column:39},end:{line:63,column:7}},line:61}},branchMap:{0:{loc:{start:{line:44,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},1:{loc:{start:{line:57,column:6},end:{line:60,column:7}},type:"if",locations:[{start:{line:57,column:6},end:{line:60,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4a33e65af05f7d08e216a604150e8920749ac334"},i=n[r]||(n[r]={});i[e]&&i[e].hash===t||(i[e]=a);var s=i[e];return c=function(){return s},s}c(),t.Z={props:{refreshInterval:{default:1e3}},data:function(){return c().f[0]++,c().s[0]++,{updater:null,api:null}},created:function(){c().f[1]++,c().s[1]++,this.api=new r.k},mounted:function(){c().f[2]++,c().s[2]++,this.changeUpdater()},beforeDestroy:function(){c().f[3]++,c().s[3]++,null!=this.updater?(c().b[0][0]++,c().s[4]++,clearInterval(this.updater),c().s[5]++,this.updater=null):c().b[0][1]++},watch:{refreshInterval:function(e,t){c().f[4]++,c().s[6]++,this.changeUpdater()}},methods:{changeUpdater:function(){var e=this;c().f[5]++,c().s[7]++,null!=this.updater?(c().b[1][0]++,c().s[8]++,clearInterval(this.updater),c().s[9]++,this.updater=null):c().b[1][1]++,c().s[10]++,this.updater=setInterval((function(){c().f[6]++,c().s[11]++,e.update()}),this.refreshInterval)}}}},8123:function(e,t,n){n.d(t,{k:function(){return v}});var r=n(6259),c=n(5789),a=n(6964),i=n(9502),s=n(426),o=n(7871),u=n(2261),l=(n(1372),n(1245),n(7950),n(8178),n(9529),n(8188),n(3675),n(4898),n(5825),n(7170),n(8857),n(8329),n(6279),n(427),n(171),n(7093),n(1159),n(2516),n(4349),n(5273),n(6729),n(1801),n(574),n(5787),n(9271),n(3160),n(5688),n(3157),n(3333),n(315),n(556),n(2529),n(6943),n(9224),n(1157),n(3450),n(7233),n(8673),n(5734),n(8233),n(1235),n(9644)),_=n.n(l),d=n(4091),m=new d["default"],f=_().create({baseURL:location.origin,timeout:6e4,params:{}});f.interceptors.response.use((function(e){return e}),(function(e){if(e.response){var t,n,r,c,a;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.headers["ignore-errors"]&&e.response.headers["ignore-errors"].includes(e.response.status.toString()))return Promise.reject(e);var i="HTTP ".concat(e.response.status," - ");if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(i+="".concat(e.response.statusText," ")),null!==(n=e.response)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.data&&(i+="".concat(e.response.config.data," ")),null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.message)i+="".concat(e.response.data.message);else if(null!==(c=e.response)&&void 0!==c&&null!==(c=c.data)&&void 0!==c&&c.exception)i+="".concat(e.response.data.exception);else if(null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&null!==(a=a.error)&&void 0!==a&&a.message)e.response.data.error.class&&(i+="".concat(e.response.data.error.class," ")),i+="".concat(e.response.data.error.message);else{var s;i+="".concat(null===(s=e.response)||void 0===s?void 0:s.data)}throw m.$notify&&m.$notify.serious({title:"Network error",body:i}),e}throw e}));var h=f,v=function(){function e(){(0,s.Z)(this,e),(0,u.Z)(this,"id",1)}return(0,o.Z)(e,[{key:"exec",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n){var r,i,s,o,u,l,_=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=_.length>2&&void 0!==_[2]?_[2]:{},i=_.length>3&&void 0!==_[3]?_[3]:{},s=_.length>4&&void 0!==_[4]?_[4]:6e4,e.prev=3,e.next=6,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 6:o=e.sent,o&&OpenC3Auth.setTokens(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),OpenC3Auth.login();case 13:return this.id=this.id+1,e.prev=14,r["scope"]=window.openc3Scope,e.next=18,h.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:n,id:this.id,keyword_params:r},{headers:(0,a.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},i),timeout:s});case 18:return u=e.sent,e.abrupt("return",u.data.result);case 22:throw e.prev=22,e.t1=e["catch"](14),l=new Error,e.t1.response?(l.name=e.t1.response.data.error.data.class,l.message=e.t1.response.data.error.data.message):e.t1.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l;case 27:case"end":return e.stop()}}),e,this,[[3,10],[14,22]])})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"decode_openc3_type",value:function(e){if(null!==e&&"object"===(0,r.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"ensure_offline_access",value:function(){var e=this;this.offline_access_needed().then((function(t){t&&(localStorage.openc3OfflineToken?e.set_offline_access(localStorage.openc3OfflineToken).then((function(){delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}},{key:"offline_access_needed",value:function(){return this.exec("offline_access_needed",[])}},{key:"set_offline_access",value:function(e){return this.exec("set_offline_access",[e])}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(e,t){return this.exec("map_target_to_interface",[e,t])}},{key:"connect_interface",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.length>0?this.exec("connect_interface",[e].concat(n)):this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_target_interfaces",value:function(){return this.exec("get_target_interfaces",[])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(e){return this.exec("get_tlm_cnts",[e])}},{key:"get_item",value:function(e,t,n){return this.exec("get_item",[e,t,n])}},{key:"get_parameter",value:function(e,t,n){return this.exec("get_parameter",[e,t,n])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_target_names",value:function(){return this.exec("get_target_names",[])}},{key:"get_telemetry",value:function(e,t){return this.exec("get_telemetry",[e,t])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_all_telemetry_names",value:function(e){return this.exec("get_all_telemetry_names",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n,r){var a,i,s,o,u,l=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=l.length>3&&void 0!==l[3]?l[3]:30,e.next=3,this.exec("get_tlm_packet",[t,n],{type:r,stale_time:a});case 3:if(i=e.sent,null!=i)for(s=i.length,o=null,u=0;u<s;u++)o=this.decode_openc3_type(i[u][1]),null!==o&&(i[u][1]=o);return e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"get_packet_derived_items",value:function(e,t){return this.exec("get_packet_derived_items",[e,t])}},{key:"get_tlm_buffer",value:function(e,t){return this.exec("get_tlm_buffer",[e,t])}},{key:"get_tlm_values",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t){var n,r,a,i,s,o=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:30,e.next=3,this.exec("get_tlm_values",[t],{stale_time:n},{},1e4);case 3:for(r=e.sent,a=r[0].length,i=null,s=0;s<a;s++)i=this.decode_openc3_type(r[0][s]),null!==i&&(r[0][s]=i);return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"get_limits",value:function(e,t,n){return this.exec("get_limits",[e,t,n])}},{key:"tlm",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n,r){var a,i,s,o,u=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=u.length>3&&void 0!==u[3]?u[3]:"CONVERTED",i=null,void 0!==n){e.next=8;break}return e.next=5,this.exec("tlm",[t]);case 5:i=e.sent,e.next=24;break;case 8:if(void 0!==r){e.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n)){e.next=15;break}return e.next=12,this.exec("tlm",[t],{type:n});case 12:i=e.sent,e.next=19;break;case 15:throw s=new Error,s.name="TypeError",s.message="Invalid data type ".concat(n,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),s;case 19:e.next=24;break;case 21:return e.next=23,this.exec("tlm",[t,n,r],{type:a});case 23:i=e.sent;case 24:return o=this.decode_openc3_type(i),null!==o&&(i=o),e.abrupt("return",i);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"inject_tlm",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n){var r,a,i=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:null,a=i.length>3&&void 0!==i[3]?i[3]:"CONVERTED",e.next=4,this.exec("inject_tlm",[t,n,r],{type:a});case 4:data=e.sent;case 5:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"set_tlm",value:function(e,t,n,r){return this.exec("set_tlm",[e,t,n],{type:r})}},{key:"override_tlm",value:function(e,t,n,r){return this.exec("override_tlm",[e,t,n],{type:r})}},{key:"get_overrides",value:function(){return this.exec("get_overrides")}},{key:"normalize_tlm",value:function(e,t,n,r){return this.exec("normalize_tlm",[e,t,n],{type:r})}},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_all_command_names",value:function(e){return this.exec("get_all_command_names",[e])}},{key:"get_command",value:function(e,t){return this.exec("get_command",[e,t])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,t,n,r])}},{key:"get_cmd_buffer",value:function(e,t){return this.exec("get_cmd_buffer",[e,t])}},{key:"_cmd",value:function(e,t,n,r,c){var a=null;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(a=this.encode_openc3_type(r[i]),null!==a&&(r[i]=a));return this.exec(e,[t,n,r],{},c)}},{key:"get_cmd_hazardous",value:function(e,t,n){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,n)}},{key:"cmd",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===t?this.exec("cmd",e,{},r):this._cmd("cmd",e,t,n,r)}},{key:"cmd_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,n)}},{key:"cmd_raw",value:function(e,t,n){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,n)}},{key:"cmd_raw_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,n)}},{key:"cmd_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,n)}},{key:"cmd_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,n)}},{key:"cmd_raw_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,n)}},{key:"cmd_raw_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,n)}},{key:"build_command",value:function(e,t,n){return void 0===t?this.exec("build_command",e):this._cmd("build_command",e,t,n)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,t){return this.exec("send_raw",[e,t])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,t){return this.exec("load_config",[e,t])}},{key:"save_config",value:function(e,t,n){return this.exec("save_config",[e,t,n])}},{key:"delete_config",value:function(e,t){return this.exec("delete_config",[e,t])}},{key:"enable_limits",value:function(e,t,n){return this.exec("enable_limits",[e,t,n])}},{key:"disable_limits",value:function(e,t,n){return this.exec("disable_limits",[e,t,n])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,t){return this.exec("save_setting",[e,t])}},{key:"get_metrics",value:function(){return this.exec("get_metrics",[])}},{key:"hashString",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t){var n,r,a;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return n=(new TextEncoder).encode(t),e.next=4,crypto.subtle.digest("SHA-256",n);case 4:return r=e.sent,a=new Uint8Array(r),e.abrupt("return",Array.from(a).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}()}}]);
1
+ "use strict";(self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[872],{4872:function(e,t,n){var r=n(8123);function c(){var e="/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",t="4a33e65af05f7d08e216a604150e8920749ac334",n=new Function("return this")(),r="__coverage__",a={path:"/openc3/plugins/packages/openc3-cosmos-tool-cmdtlmserver/src/tools/CmdTlmServer/Updater.js",statementMap:{0:{start:{line:32,column:4},end:{line:35,column:5}},1:{start:{line:38,column:4},end:{line:38,column:30}},2:{start:{line:41,column:4},end:{line:41,column:24}},3:{start:{line:44,column:4},end:{line:47,column:5}},4:{start:{line:45,column:6},end:{line:45,column:33}},5:{start:{line:46,column:6},end:{line:46,column:25}},6:{start:{line:52,column:6},end:{line:52,column:26}},7:{start:{line:57,column:6},end:{line:60,column:7}},8:{start:{line:58,column:8},end:{line:58,column:35}},9:{start:{line:59,column:8},end:{line:59,column:27}},10:{start:{line:61,column:6},end:{line:63,column:30}},11:{start:{line:62,column:8},end:{line:62,column:21}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:9},end:{line:36,column:3}},line:31},1:{name:"(anonymous_1)",decl:{start:{line:37,column:2},end:{line:37,column:3}},loc:{start:{line:37,column:12},end:{line:39,column:3}},line:37},2:{name:"(anonymous_2)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:12},end:{line:42,column:3}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:18},end:{line:48,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:51,column:21},end:{line:51,column:22}},loc:{start:{line:51,column:47},end:{line:53,column:5}},line:51},5:{name:"(anonymous_5)",decl:{start:{line:56,column:4},end:{line:56,column:5}},loc:{start:{line:56,column:20},end:{line:64,column:5}},line:56},6:{name:"(anonymous_6)",decl:{start:{line:61,column:33},end:{line:61,column:34}},loc:{start:{line:61,column:39},end:{line:63,column:7}},line:61}},branchMap:{0:{loc:{start:{line:44,column:4},end:{line:47,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:47,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},1:{loc:{start:{line:57,column:6},end:{line:60,column:7}},type:"if",locations:[{start:{line:57,column:6},end:{line:60,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:57}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4a33e65af05f7d08e216a604150e8920749ac334"},i=n[r]||(n[r]={});i[e]&&i[e].hash===t||(i[e]=a);var s=i[e];return c=function(){return s},s}c(),t.Z={props:{refreshInterval:{default:1e3}},data:function(){return c().f[0]++,c().s[0]++,{updater:null,api:null}},created:function(){c().f[1]++,c().s[1]++,this.api=new r.k},mounted:function(){c().f[2]++,c().s[2]++,this.changeUpdater()},beforeDestroy:function(){c().f[3]++,c().s[3]++,null!=this.updater?(c().b[0][0]++,c().s[4]++,clearInterval(this.updater),c().s[5]++,this.updater=null):c().b[0][1]++},watch:{refreshInterval:function(e,t){c().f[4]++,c().s[6]++,this.changeUpdater()}},methods:{changeUpdater:function(){var e=this;c().f[5]++,c().s[7]++,null!=this.updater?(c().b[1][0]++,c().s[8]++,clearInterval(this.updater),c().s[9]++,this.updater=null):c().b[1][1]++,c().s[10]++,this.updater=setInterval((function(){c().f[6]++,c().s[11]++,e.update()}),this.refreshInterval)}}}},8123:function(e,t,n){n.d(t,{k:function(){return v}});var r=n(6259),c=n(5789),a=n(6964),i=n(9502),s=n(426),o=n(7871),u=n(2261),l=(n(1372),n(1245),n(7950),n(8178),n(9529),n(2994),n(8188),n(3675),n(4898),n(5825),n(7170),n(8857),n(8329),n(6279),n(427),n(171),n(7093),n(1159),n(2516),n(4349),n(5273),n(6729),n(1801),n(574),n(5787),n(9271),n(3160),n(5688),n(3157),n(3333),n(315),n(556),n(2529),n(6943),n(9224),n(1157),n(3450),n(7233),n(8673),n(5734),n(8233),n(1235),n(9644)),_=n.n(l),d=n(4091),m=new d["default"],f=_().create({baseURL:location.origin,timeout:6e4,params:{}});f.interceptors.response.use((function(e){return e}),(function(e){if(e.response){var t,n,r,c,a;if(401===e.response.status&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then((function(e){e&&OpenC3Auth.setTokens()})),e.response.headers["ignore-errors"]&&e.response.headers["ignore-errors"].includes(e.response.status.toString()))return Promise.reject(e);var i="HTTP ".concat(e.response.status," - ");if(null!==(t=e.response)&&void 0!==t&&t.statusText&&(i+="".concat(e.response.statusText," ")),null!==(n=e.response)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.data&&(i+="".concat(e.response.config.data," ")),null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.message)i+="".concat(e.response.data.message);else if(null!==(c=e.response)&&void 0!==c&&null!==(c=c.data)&&void 0!==c&&c.exception)i+="".concat(e.response.data.exception);else if(null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&null!==(a=a.error)&&void 0!==a&&a.message)e.response.data.error.class&&(i+="".concat(e.response.data.error.class," ")),i+="".concat(e.response.data.error.message);else{var s;i+="".concat(null===(s=e.response)||void 0===s?void 0:s.data)}throw m.$notify&&m.$notify.serious({title:"Network error",body:i}),e}throw e}));var h=f,v=function(){function e(){(0,s.Z)(this,e),(0,u.Z)(this,"id",1)}return(0,o.Z)(e,[{key:"exec",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n){var r,i,s,o,u,l,_=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=_.length>2&&void 0!==_[2]?_[2]:{},i=_.length>3&&void 0!==_[3]?_[3]:{},s=_.length>4&&void 0!==_[4]?_[4]:6e4,e.prev=3,e.next=6,OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity);case 6:o=e.sent,o&&OpenC3Auth.setTokens(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),OpenC3Auth.login();case 13:return this.id=this.id+1,e.prev=14,r["scope"]=window.openc3Scope,e.next=18,h.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:n,id:this.id,keyword_params:r},{headers:(0,a.Z)({Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc"},i),timeout:s});case 18:return u=e.sent,e.abrupt("return",u.data.result);case 22:throw e.prev=22,e.t1=e["catch"](14),l=new Error,e.t1.response?(l.name=e.t1.response.data.error.data.class,l.message=e.t1.response.data.error.data.message):e.t1.request?(l.name="Request error",l.message="Request error, no response received"):l.name="Unknown error",l;case 27:case"end":return e.stop()}}),e,this,[[3,10],[14,22]])})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"decode_openc3_type",value:function(e){if(null!==e&&"object"===(0,r.Z)(e)&&"Float"==e.json_class&&e.raw){if("NaN"==e.raw)return NaN;if("Infinity"==e.raw)return 1/0;if("-Infinity"==e.raw)return-1/0}return null}},{key:"encode_openc3_type",value:function(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"ensure_offline_access",value:function(){var e=this;this.offline_access_needed().then((function(t){t&&(localStorage.openc3OfflineToken?e.set_offline_access(localStorage.openc3OfflineToken).then((function(){delete localStorage.openc3OfflineToken})):OpenC3Auth.getOfflineAccess())}))}},{key:"offline_access_needed",value:function(){return this.exec("offline_access_needed",[])}},{key:"set_offline_access",value:function(e){return this.exec("set_offline_access",[e])}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"map_target_to_interface",value:function(e,t){return this.exec("map_target_to_interface",[e,t])}},{key:"connect_interface",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.length>0?this.exec("connect_interface",[e].concat(n)):this.exec("connect_interface",[e])}},{key:"disconnect_interface",value:function(e){return this.exec("disconnect_interface",[e])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(e){return this.exec("connect_router",[e])}},{key:"disconnect_router",value:function(e){return this.exec("disconnect_router",[e])}},{key:"get_target_interfaces",value:function(){return this.exec("get_target_interfaces",[])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_tlm_cnts",value:function(e){return this.exec("get_tlm_cnts",[e])}},{key:"get_item",value:function(e,t,n){return this.exec("get_item",[e,t,n])}},{key:"get_parameter",value:function(e,t,n){return this.exec("get_parameter",[e,t,n])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(e){return this.exec("start_cmd_log",[e])}},{key:"start_tlm_log",value:function(e){return this.exec("start_tlm_log",[e])}},{key:"stop_cmd_log",value:function(e){return this.exec("stop_cmd_log",[e])}},{key:"stop_tlm_log",value:function(e){return this.exec("stop_tlm_log",[e])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(e){return this.exec("set_limits_set",[e])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(e){return this.exec("start_background_task",[e])}},{key:"stop_background_task",value:function(e){return this.exec("stop_background_task",[e])}},{key:"get_target",value:function(e){return this.exec("get_target",[e])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_target_names",value:function(){return this.exec("get_target_names",[])}},{key:"get_telemetry",value:function(e,t){return this.exec("get_telemetry",[e,t])}},{key:"get_all_telemetry",value:function(e){return this.exec("get_all_telemetry",[e])}},{key:"get_all_telemetry_names",value:function(e){return this.exec("get_all_telemetry_names",[e])}},{key:"get_tlm_packet",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n,r){var a,i,s,o,u,l=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=l.length>3&&void 0!==l[3]?l[3]:30,e.next=3,this.exec("get_tlm_packet",[t,n],{type:r,stale_time:a});case 3:if(i=e.sent,null!=i)for(s=i.length,o=null,u=0;u<s;u++)o=this.decode_openc3_type(i[u][1]),null!==o&&(i[u][1]=o);return e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"get_packet_derived_items",value:function(e,t){return this.exec("get_packet_derived_items",[e,t])}},{key:"get_tlm_buffer",value:function(e,t){return this.exec("get_tlm_buffer",[e,t])}},{key:"get_tlm_values",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t){var n,r,a,i,s,o=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:30,e.next=3,this.exec("get_tlm_values",[t],{stale_time:n},{},1e4);case 3:for(r=e.sent,a=r[0].length,i=null,s=0;s<a;s++)i=this.decode_openc3_type(r[0][s]),null!==i&&(r[0][s]=i);return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"get_limits",value:function(e,t,n){return this.exec("get_limits",[e,t,n])}},{key:"tlm",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n,r){var a,i,s,o,u=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=u.length>3&&void 0!==u[3]?u[3]:"CONVERTED",i=null,void 0!==n){e.next=8;break}return e.next=5,this.exec("tlm",[t]);case 5:i=e.sent,e.next=24;break;case 8:if(void 0!==r){e.next=21;break}if(!["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n)){e.next=15;break}return e.next=12,this.exec("tlm",[t],{type:n});case 12:i=e.sent,e.next=19;break;case 15:throw s=new Error,s.name="TypeError",s.message="Invalid data type ".concat(n,". Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS."),s;case 19:e.next=24;break;case 21:return e.next=23,this.exec("tlm",[t,n,r],{type:a});case 23:i=e.sent;case 24:return o=this.decode_openc3_type(i),null!==o&&(i=o),e.abrupt("return",i);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"inject_tlm",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t,n){var r,a,i=arguments;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:null,a=i.length>3&&void 0!==i[3]?i[3]:"CONVERTED",e.next=4,this.exec("inject_tlm",[t,n,r],{type:a});case 4:data=e.sent;case 5:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"set_tlm",value:function(e,t,n,r){return this.exec("set_tlm",[e,t,n],{type:r})}},{key:"override_tlm",value:function(e,t,n,r){return this.exec("override_tlm",[e,t,n],{type:r})}},{key:"get_overrides",value:function(){return this.exec("get_overrides")}},{key:"normalize_tlm",value:function(e,t,n,r){return this.exec("normalize_tlm",[e,t,n],{type:r})}},{key:"get_all_commands",value:function(e){return this.exec("get_all_commands",[e])}},{key:"get_all_command_names",value:function(e){return this.exec("get_all_command_names",[e])}},{key:"get_command",value:function(e,t){return this.exec("get_command",[e,t])}},{key:"get_cmd_cnts",value:function(e){return this.exec("get_cmd_cnts",[e])}},{key:"get_cmd_value",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[e,t,n,r])}},{key:"get_cmd_buffer",value:function(e,t){return this.exec("get_cmd_buffer",[e,t])}},{key:"_cmd",value:function(e,t,n,r,c){var a=null;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(a=this.encode_openc3_type(r[i]),null!==a&&(r[i]=a));return this.exec(e,[t,n,r],{},c)}},{key:"get_cmd_hazardous",value:function(e,t,n){return void 0===t?this.exec("get_cmd_hazardous",e):this._cmd("get_cmd_hazardous",e,t,n)}},{key:"cmd",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return void 0===t?this.exec("cmd",e,{},r):this._cmd("cmd",e,t,n,r)}},{key:"cmd_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_range_check",e):this._cmd("cmd_no_range_check",e,t,n)}},{key:"cmd_raw",value:function(e,t,n){return void 0===t?this.exec("cmd_raw",e):this._cmd("cmd_raw",e,t,n)}},{key:"cmd_raw_no_range_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_range_check",e):this._cmd("cmd_raw_no_range_check",e,t,n)}},{key:"cmd_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_no_hazardous_check",e):this._cmd("cmd_no_hazardous_check",e,t,n)}},{key:"cmd_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_no_checks",e):this._cmd("cmd_no_checks",e,t,n)}},{key:"cmd_raw_no_hazardous_check",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_hazardous_check",e):this._cmd("cmd_raw_no_hazardous_check",e,t,n)}},{key:"cmd_raw_no_checks",value:function(e,t,n){return void 0===t?this.exec("cmd_raw_no_checks",e):this._cmd("cmd_raw_no_checks",e,t,n)}},{key:"build_command",value:function(e,t,n){return void 0===t?this.exec("build_command",e):this._cmd("build_command",e,t,n)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(e,t){return this.exec("send_raw",[e,t])}},{key:"list_configs",value:function(e){return this.exec("list_configs",[e])}},{key:"load_config",value:function(e,t){return this.exec("load_config",[e,t])}},{key:"save_config",value:function(e,t,n){return this.exec("save_config",[e,t,n])}},{key:"delete_config",value:function(e,t){return this.exec("delete_config",[e,t])}},{key:"enable_limits",value:function(e,t,n){return this.exec("enable_limits",[e,t,n])}},{key:"disable_limits",value:function(e,t,n){return this.exec("disable_limits",[e,t,n])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(e){return this.exec("get_overall_limits_state",[e])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(e){return this.exec("get_setting",[e])}},{key:"get_settings",value:function(e){return this.exec("get_settings",e)}},{key:"save_setting",value:function(e,t){return this.exec("save_setting",[e,t])}},{key:"get_metrics",value:function(){return this.exec("get_metrics",[])}},{key:"hashString",value:function(){var e=(0,i.Z)((0,c.Z)().mark((function e(t){var n,r,a;return(0,c.Z)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!window.isSecureContext){e.next=7;break}return n=(new TextEncoder).encode(t),e.next=4,crypto.subtle.digest("SHA-256",n);case 4:return r=e.sent,a=new Uint8Array(r),e.abrupt("return",Array.from(a).map((function(e){return e.toString(16).padStart(2,"0")})).join(""));case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}()}}]);
2
2
  //# sourceMappingURL=872.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/872.js","mappings":"uxFAeY,OAAAA,EAAA,kBAAAC,CAAA,EAAAA,CAAA,CAAAD,IASZ,KACEE,MAAO,CACLC,gBAAiB,CACfC,QAAS,MAGbC,KAAI,WACF,OADKL,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACE,CACLC,QAAS,KACTC,IAAK,KAET,EACAC,QAAO,WAAGV,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKF,IAAM,IAAIG,EAAAA,CACjB,EACAC,QAAO,WAAGb,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACRI,KAAKG,eACP,EACAC,cAAa,WAAGf,IAAAM,EAAA,KAAAN,IAAAO,EAAA,KACM,MAAhBI,KAAKH,SAAiBR,IAAAgB,EAAA,QAAAhB,IAAAO,EAAA,KACxBU,cAAcN,KAAKH,SAAQR,IAAAO,EAAA,KAC3BI,KAAKH,QAAU,MAChBR,IAAAgB,EAAA,OACH,EACAE,MAAO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AAA,SACO+B,MAAM2E,KAAKT,GACfU,KAAI,SAAChM,GAAC,OAAKA,EAAEoC,SAAS,IAAI6J,SAAS,EAAG,IAAI,IAC1CC,KAAK,KAAG,wBAAAX,EAAA5F,OAAA,GAAAuF,EAAA,KAGd,SAAAiB,EAAAC,GAAA,OAAAnB,EAAAlF,MAAA,KAAA9B,UAAA,QAAAkI,CAAA,CArBD,MAqBCvM,CAAA,CA/nBmB,E","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/Updater.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/axios.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/openc3-api.js"],"sourcesContent":["/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\n\nexport default {\n props: {\n refreshInterval: {\n default: 1000,\n },\n },\n data() {\n return {\n updater: null,\n api: null,\n }\n },\n created() {\n this.api = new OpenC3Api()\n },\n mounted() {\n this.changeUpdater()\n },\n beforeDestroy() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n },\n watch: {\n // eslint-disable-next-line no-unused-vars\n refreshInterval: function (newVal, oldVal) {\n this.changeUpdater()\n },\n },\n methods: {\n changeUpdater() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n this.updater = setInterval(() => {\n this.update()\n }, this.refreshInterval)\n },\n },\n}\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 60000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response) {\n if (error.response.status === 401) {\n OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity, true).then(\n function (refreshed) {\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n }\n )\n }\n // Individual tools can set 'Ignore-Errors' to an error code\n // they potentially expect, e.g. '500', in which case we ignore it\n // For example in CommandSender.vue:\n // obs = this.api.cmd(targetName, commandName, paramList, {\n // 'Ignore-Errors': '500',\n // })\n if (\n error.response.headers['ignore-errors'] &&\n error.response.headers['ignore-errors'].includes(\n error.response.status.toString()\n )\n ) {\n return Promise.reject(error)\n }\n let body = `HTTP ${error.response.status} - `\n if (error.response?.statusText) {\n body += `${error.response.statusText} `\n }\n if (error.response?.config?.data) {\n body += `${error.response.config.data} `\n }\n if (error.response?.data?.message) {\n body += `${error.response.data.message}`\n } else if (error.response?.data?.exception) {\n body += `${error.response.data.exception}`\n } else if (error.response?.data?.error?.message) {\n if (error.response.data.error.class) {\n body += `${error.response.data.error.class} `\n }\n body += `${error.response.data.error.message}`\n } else {\n body += `${error.response?.data}`\n }\n if (vueInstance.$notify) {\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n } else {\n throw error\n }\n }\n)\n\nexport default axiosInstance\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from './axios.js'\n\nexport class OpenC3Api {\n id = 1\n\n constructor() {}\n\n async exec(\n method,\n params,\n kwparams = {},\n headerOptions = {},\n timeout = 60000\n ) {\n try {\n let refreshed = await OpenC3Auth.updateToken(\n OpenC3Auth.defaultMinValidity\n )\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n } catch (error) {\n OpenC3Auth.login()\n }\n this.id = this.id + 1\n try {\n kwparams['scope'] = window.openc3Scope\n const response = await axios.post(\n '/openc3-api/api',\n {\n jsonrpc: '2.0',\n method: method,\n params: params,\n id: this.id,\n keyword_params: kwparams,\n },\n {\n headers: {\n Authorization: localStorage.openc3Token,\n 'Content-Type': 'application/json-rpc',\n ...headerOptions,\n },\n timeout: timeout,\n }\n )\n // var data = response.data\n // if (data.error) {\n // var err = new Error()\n // err.name = data.error.data.class\n // err.message = data.error.data.message\n // console.log(data.error.data.backtrace.join('\\n'))\n // throw err\n // }\n return response.data.result\n } catch (error) {\n var err = new Error()\n if (error.response) {\n // The request was made and the server responded with a\n // status code that falls out of the range of 2xx\n err.name = error.response.data.error.data.class\n err.message = error.response.data.error.data.message\n } else if (error.request) {\n // The request was made but no response was received, `error.request`\n // is an instance of XMLHttpRequest in the browser and an instance\n // of http.ClientRequest in Node.js\n err.name = 'Request error'\n // NOTE: Openc3Screen.vue uses this specific message to determine\n // if the CmdTlmApi server is down. Don't change unless also changing there.\n err.message = 'Request error, no response received'\n } else {\n // Something happened in setting up the request and triggered an Error\n err.name = 'Unknown error'\n }\n throw err\n }\n }\n\n decode_openc3_type(val) {\n if (val !== null && typeof val === 'object') {\n if (val.json_class == 'Float' && val.raw) {\n if (val.raw == 'NaN') {\n return NaN\n } else if (val.raw == 'Infinity') {\n return Infinity\n } else if (val.raw == '-Infinity') {\n return -Infinity\n }\n }\n }\n return null\n }\n\n encode_openc3_type(val) {\n if (Number.isNaN(val)) {\n return { json_class: 'Float', raw: 'NaN' }\n } else if (val == Number.POSITIVE_INFINITY) {\n return { json_class: 'Float', raw: 'Infinity' }\n } else if (val == Number.NEGATIVE_INFINITY) {\n return { json_class: 'Float', raw: '-Infinity' }\n }\n return null\n }\n\n ensure_offline_access() {\n this.offline_access_needed().then((needed) => {\n if (needed) {\n if (localStorage.openc3OfflineToken) {\n this.set_offline_access(localStorage.openc3OfflineToken).then(() => {\n delete localStorage.openc3OfflineToken\n })\n } else {\n OpenC3Auth.getOfflineAccess()\n }\n }\n })\n }\n\n // ***********************************************\n // The following APIs are used by the CmdTlmServer\n // ***********************************************\n\n offline_access_needed() {\n return this.exec('offline_access_needed', [])\n }\n\n set_offline_access(offline_access_token) {\n return this.exec('set_offline_access', [offline_access_token])\n }\n\n get_all_interface_info() {\n return this.exec('get_all_interface_info', [])\n }\n\n map_target_to_interface(target_name, interface_name) {\n return this.exec('map_target_to_interface', [target_name, interface_name])\n }\n\n connect_interface(interface_name, ...interface_params) {\n if (interface_params.length > 0) {\n return this.exec('connect_interface', [\n interface_name,\n ...interface_params,\n ])\n } else {\n return this.exec('connect_interface', [interface_name])\n }\n }\n\n disconnect_interface(interface_name) {\n return this.exec('disconnect_interface', [interface_name])\n }\n\n get_all_router_info() {\n return this.exec('get_all_router_info', [])\n }\n\n connect_router(router_name) {\n return this.exec('connect_router', [router_name])\n }\n\n disconnect_router(router_name) {\n return this.exec('disconnect_router', [router_name])\n }\n\n get_target_interfaces() {\n return this.exec('get_target_interfaces', [])\n }\n\n // DEPRECATED\n get_all_target_info() {\n return this.exec('get_all_target_info', [])\n }\n\n get_tlm_cnts(target_commands) {\n return this.exec('get_tlm_cnts', [target_commands])\n }\n\n get_item(target, packet, item) {\n return this.exec('get_item', [target, packet, item])\n }\n\n get_parameter(target, packet, item) {\n return this.exec('get_parameter', [target, packet, item])\n }\n\n get_all_packet_logger_info() {\n return this.exec('get_all_packet_logger_info', [])\n }\n\n start_logging() {\n return this.exec('start_logging', [])\n }\n\n stop_logging() {\n return this.exec('stop_logging', [])\n }\n\n start_cmd_log(log_writer_name) {\n return this.exec('start_cmd_log', [log_writer_name])\n }\n\n start_tlm_log(log_writer_name) {\n return this.exec('start_tlm_log', [log_writer_name])\n }\n\n stop_cmd_log(log_writer_name) {\n return this.exec('stop_cmd_log', [log_writer_name])\n }\n\n stop_tlm_log(log_writer_name) {\n return this.exec('stop_tlm_log', [log_writer_name])\n }\n\n get_server_status() {\n return this.exec('get_server_status', [])\n }\n\n get_limits_sets() {\n return this.exec('get_limits_sets', [])\n }\n\n get_limits_set() {\n return this.exec('get_limits_set', [])\n }\n\n set_limits_set(limits_set) {\n return this.exec('set_limits_set', [limits_set])\n }\n\n get_background_tasks() {\n return this.exec('get_background_tasks', [])\n }\n\n start_background_task(name) {\n return this.exec('start_background_task', [name])\n }\n\n stop_background_task(name) {\n return this.exec('stop_background_task', [name])\n }\n\n // ***********************************************\n // End CmdTlmServer APIs\n // ***********************************************\n\n get_target(target_name) {\n return this.exec('get_target', [target_name])\n }\n\n // get_target_list is DEPRECATED\n get_target_list() {\n return this.exec('get_target_list', [])\n }\n get_target_names() {\n return this.exec('get_target_names', [])\n }\n\n get_telemetry(target_name, packet_name) {\n return this.exec('get_telemetry', [target_name, packet_name])\n }\n\n get_all_telemetry(target_name) {\n return this.exec('get_all_telemetry', [target_name])\n }\n\n get_all_telemetry_names(target_name) {\n return this.exec('get_all_telemetry_names', [target_name])\n }\n\n async get_tlm_packet(target_name, packet_name, value_type, stale_time = 30) {\n const data = await this.exec('get_tlm_packet', [target_name, packet_name], {\n type: value_type,\n stale_time: stale_time,\n })\n // Make sure data isn't null or undefined. Note this is the only valid use of == or !=\n if (data != null) {\n var len = data.length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_openc3_type(data[i][1])\n if (converted !== null) {\n data[i][1] = converted\n }\n }\n }\n return data\n }\n\n get_packet_derived_items(target_name, packet_name) {\n return this.exec('get_packet_derived_items', [target_name, packet_name])\n }\n\n get_tlm_buffer(target_name, packet_name) {\n return this.exec('get_tlm_buffer', [target_name, packet_name])\n }\n\n async get_tlm_values(items, stale_time = 30) {\n const data = await this.exec(\n 'get_tlm_values',\n [items],\n {\n stale_time: stale_time,\n },\n {},\n 10000 // 10s timeout ... should never be this long\n )\n var len = data[0].length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_openc3_type(data[0][i])\n if (converted !== null) {\n data[0][i] = converted\n }\n }\n return data\n }\n\n get_limits(target_name, packet_name, item_name) {\n return this.exec('get_limits', [target_name, packet_name, item_name])\n }\n\n async tlm(target_name, packet_name, item_name, value_type = 'CONVERTED') {\n let data = null\n // Check for the single string syntax: tlm(\"TGT PKT ITEM\")\n if (packet_name === undefined) {\n data = await this.exec('tlm', [target_name])\n // Check for the single string syntax with type: tlm(\"TGT PKT ITEM\", \"RAW\")\n } else if (item_name === undefined) {\n if (\n ['RAW', 'CONVERTED', 'FORMATTED', 'WITH_UNITS'].includes(packet_name)\n ) {\n data = await this.exec('tlm', [target_name], { type: packet_name })\n } else {\n var err = new Error()\n err.name = 'TypeError'\n err.message = `Invalid data type ${packet_name}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`\n throw err\n }\n } else {\n data = await this.exec('tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n var converted = this.decode_openc3_type(data)\n if (converted !== null) {\n data = converted\n }\n return data\n }\n\n async inject_tlm(\n target_name,\n packet_name,\n item_hash = null,\n value_type = 'CONVERTED'\n ) {\n data = await this.exec(\n 'inject_tlm',\n [target_name, packet_name, item_hash],\n {\n type: value_type,\n }\n )\n }\n\n set_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('set_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n override_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('override_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n get_overrides() {\n return this.exec('get_overrides')\n }\n\n normalize_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('normalize_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n get_all_commands(target_name) {\n return this.exec('get_all_commands', [target_name])\n }\n\n get_all_command_names(target_name) {\n return this.exec('get_all_command_names', [target_name])\n }\n\n get_command(target_name, command_name) {\n return this.exec('get_command', [target_name, command_name])\n }\n\n get_cmd_cnts(target_commands) {\n return this.exec('get_cmd_cnts', [target_commands])\n }\n\n get_cmd_value(\n target_name,\n packet_name,\n parameter_name,\n value_type = 'CONVERTED'\n ) {\n return this.exec('get_cmd_value', [\n target_name,\n packet_name,\n parameter_name,\n value_type,\n ])\n }\n\n get_cmd_buffer(target_name, packet_name) {\n return this.exec('get_cmd_buffer', [target_name, packet_name])\n }\n\n // Implementation of functionality shared by cmd methods with param_lists.\n _cmd(method, target_name, command_name, param_list, headerOptions) {\n var converted = null\n for (var key in param_list) {\n if (Object.prototype.hasOwnProperty.call(param_list, key)) {\n converted = this.encode_openc3_type(param_list[key])\n if (converted !== null) {\n param_list[key] = converted\n }\n }\n }\n return this.exec(\n method,\n [target_name, command_name, param_list],\n {},\n headerOptions\n )\n }\n\n get_cmd_hazardous(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('get_cmd_hazardous', target_name)\n } else {\n return this._cmd(\n 'get_cmd_hazardous',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd(target_name, command_name, param_list, headerOptions = {}) {\n if (command_name === undefined) {\n return this.exec('cmd', target_name, {}, headerOptions)\n } else {\n return this._cmd(\n 'cmd',\n target_name,\n command_name,\n param_list,\n headerOptions\n )\n }\n }\n\n cmd_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_raw(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw', target_name)\n } else {\n return this._cmd('cmd_raw', target_name, command_name, param_list)\n }\n }\n\n cmd_raw_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_checks', target_name)\n } else {\n return this._cmd('cmd_no_checks', target_name, command_name, param_list)\n }\n }\n\n cmd_raw_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_raw_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_checks', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_checks',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n build_command(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('build_command', target_name)\n } else {\n return this._cmd('build_command', target_name, command_name, param_list)\n }\n }\n\n get_interface_names() {\n return this.exec('get_interface_names', [])\n }\n\n send_raw(interface_name, data) {\n return this.exec('send_raw', [interface_name, data])\n }\n\n list_configs(tool) {\n return this.exec('list_configs', [tool])\n }\n\n load_config(tool, name) {\n return this.exec('load_config', [tool, name])\n }\n\n save_config(tool, name, data) {\n return this.exec('save_config', [tool, name, data])\n }\n\n delete_config(tool, name) {\n return this.exec('delete_config', [tool, name])\n }\n\n enable_limits(target, packet, item) {\n return this.exec('enable_limits', [target, packet, item])\n }\n\n disable_limits(target, packet, item) {\n return this.exec('disable_limits', [target, packet, item])\n }\n\n get_out_of_limits() {\n return this.exec('get_out_of_limits', [])\n }\n\n get_overall_limits_state(ignored) {\n return this.exec('get_overall_limits_state', [ignored])\n }\n\n list_settings() {\n return this.exec('list_settings', [])\n }\n\n get_all_settings() {\n return this.exec('get_all_settings', [])\n }\n\n get_setting(name) {\n return this.exec('get_setting', [name])\n }\n\n get_settings(array) {\n return this.exec('get_settings', array)\n }\n\n save_setting(name, data) {\n return this.exec('save_setting', [name, data])\n }\n\n get_metrics() {\n return this.exec('get_metrics', [])\n }\n\n // TODO: Currently unused but seemed like a useful function\n async hashString(string) {\n if (window.isSecureContext) {\n // Encode the string as an arrayBuffer which the subtle crypto API uses\n const arrayBuffer = new TextEncoder().encode(string)\n // Use the subtle crypto API to perform a SHA256 Sum of the array buffer\n // The resulting hash is stored in an array buffer\n const hashAsArrayBuffer = await crypto.subtle.digest(\n 'SHA-256',\n arrayBuffer\n )\n // To create a string we will get the hexadecimal value of each byte of the array buffer\n // This gets us an array where each byte of the array buffer becomes one item in the array\n const uint8ViewOfHash = new Uint8Array(hashAsArrayBuffer)\n // We then convert it to a regular array so we can convert each item to hexadecimal strings\n // Where to characters of 0-9 or a-f represent a number between 0 and 16, containing 4 bits of information, so 2 of them is 8 bits (1 byte).\n return Array.from(uint8ViewOfHash)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n }\n // else ?\n }\n}\n"],"names":["cov_18iatml2cn","actualCoverage","props","refreshInterval","default","data","f","s","updater","api","created","this","OpenC3Api","mounted","changeUpdater","beforeDestroy","b","clearInterval","watch","newVal","oldVal","methods","_this","setInterval","update","vueInstance","Vue","axiosInstance","axios","baseURL","location","origin","timeout","params","interceptors","response","use","error","_error$response","_error$response2","_error$response3","_error$response4","_error$response5","status","OpenC3Auth","updateToken","defaultMinValidity","then","refreshed","setTokens","headers","includes","toString","Promise","reject","body","concat","statusText","config","message","exception","class","_error$response6","$notify","serious","title","_classCallCheck","_defineProperty","_createClass","key","value","_exec","_asyncToGenerator","_regeneratorRuntime","mark","_callee","method","kwparams","headerOptions","err","_args","arguments","wrap","_context","prev","next","length","undefined","sent","t0","login","id","window","openc3Scope","post","jsonrpc","keyword_params","_objectSpread","Authorization","localStorage","openc3Token","abrupt","result","t1","Error","name","request","stop","exec","_x","_x2","apply","val","_typeof","json_class","raw","NaN","Infinity","Number","isNaN","POSITIVE_INFINITY","NEGATIVE_INFINITY","offline_access_needed","needed","openc3OfflineToken","set_offline_access","getOfflineAccess","offline_access_token","target_name","interface_name","_len","interface_params","Array","_key","router_name","target_commands","target","packet","item","log_writer_name","limits_set","packet_name","_get_tlm_packet","_callee2","value_type","stale_time","len","converted","i","_args2","_context2","type","decode_openc3_type","get_tlm_packet","_x3","_x4","_x5","_get_tlm_values","_callee3","items","_args3","_context3","get_tlm_values","_x6","item_name","_tlm","_callee4","_args4","_context4","tlm","_x7","_x8","_x9","_inject_tlm","_callee5","item_hash","_args5","_context5","inject_tlm","_x10","_x11","command_name","parameter_name","param_list","Object","prototype","hasOwnProperty","call","encode_openc3_type","_cmd","tool","ignored","array","_hashString","_callee6","string","arrayBuffer","hashAsArrayBuffer","uint8ViewOfHash","_context6","isSecureContext","TextEncoder","encode","crypto","subtle","digest","Uint8Array","from","map","padStart","join","hashString","_x12"],"sourceRoot":""}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EAAMpG,GACjB,OAAOM,KAAKiG,KAAK,eAAgB,CAACH,EAAMpG,GAC1C,GAAC,CAAAgE,IAAA,cAAAC,MAED,WACE,OAAO3D,KAAKiG,KAAK,cAAe,GAClC,GAEA,CAAAvC,IAAA,aAAAC,MAAA,eAAA2H,GAAAzH,EAAAA,EAAAA,IAAAC,EAAAA,EAAAA,KAAAC,MACA,SAAAwH,EAAiBC,GAAM,IAAAC,EAAAC,EAAAC,EAAA,OAAA7H,EAAAA,EAAAA,KAAAS,MAAA,SAAAqH,GAAA,eAAAA,EAAAnH,KAAAmH,EAAAlH,MAAA,WACjBO,OAAO4G,gBAAiB,CAAFD,EAAAlH,KAAA,QAIxB,OAFM+G,GAAc,IAAIK,aAAcC,OAAOP,GAE7CI,EAAAlH,KAAA,EACgCsH,OAAOC,OAAOC,OAC5C,UACAT,GACD,OAKD,OARMC,EAAiBE,EAAA/G,KAMjB8G,EAAkB,IAAIQ,WAAWT,GAEvCE,EAAAlG,OAAA,SACO+B,MAAM2E,KAAKT,GACfU,KAAI,SAAChM,GAAC,OAAKA,EAAEoC,SAAS,IAAI6J,SAAS,EAAG,IAAI,IAC1CC,KAAK,KAAG,wBAAAX,EAAA5F,OAAA,GAAAuF,EAAA,KAGd,SAAAiB,EAAAC,GAAA,OAAAnB,EAAAlF,MAAA,KAAA9B,UAAA,QAAAkI,CAAA,CArBD,MAqBCvM,CAAA,CA/nBmB,E","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/./src/tools/CmdTlmServer/Updater.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/axios.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../openc3-tool-common/src/services/openc3-api.js"],"sourcesContent":["/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n*/\n\nimport { OpenC3Api } from '@openc3/tool-common/src/services/openc3-api'\n\nexport default {\n props: {\n refreshInterval: {\n default: 1000,\n },\n },\n data() {\n return {\n updater: null,\n api: null,\n }\n },\n created() {\n this.api = new OpenC3Api()\n },\n mounted() {\n this.changeUpdater()\n },\n beforeDestroy() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n },\n watch: {\n // eslint-disable-next-line no-unused-vars\n refreshInterval: function (newVal, oldVal) {\n this.changeUpdater()\n },\n },\n methods: {\n changeUpdater() {\n if (this.updater != null) {\n clearInterval(this.updater)\n this.updater = null\n }\n this.updater = setInterval(() => {\n this.update()\n }, this.refreshInterval)\n },\n },\n}\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from 'axios'\nimport Vue from 'vue'\n\nconst vueInstance = new Vue()\n\nconst axiosInstance = axios.create({\n baseURL: location.origin,\n timeout: 60000,\n params: {},\n})\n\naxiosInstance.interceptors.response.use(\n (response) => response,\n (error) => {\n if (error.response) {\n if (error.response.status === 401) {\n OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity, true).then(\n function (refreshed) {\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n }\n )\n }\n // Individual tools can set 'Ignore-Errors' to an error code\n // they potentially expect, e.g. '500', in which case we ignore it\n // For example in CommandSender.vue:\n // obs = this.api.cmd(targetName, commandName, paramList, {\n // 'Ignore-Errors': '500',\n // })\n if (\n error.response.headers['ignore-errors'] &&\n error.response.headers['ignore-errors'].includes(\n error.response.status.toString()\n )\n ) {\n return Promise.reject(error)\n }\n let body = `HTTP ${error.response.status} - `\n if (error.response?.statusText) {\n body += `${error.response.statusText} `\n }\n if (error.response?.config?.data) {\n body += `${error.response.config.data} `\n }\n if (error.response?.data?.message) {\n body += `${error.response.data.message}`\n } else if (error.response?.data?.exception) {\n body += `${error.response.data.exception}`\n } else if (error.response?.data?.error?.message) {\n if (error.response.data.error.class) {\n body += `${error.response.data.error.class} `\n }\n body += `${error.response.data.error.message}`\n } else {\n body += `${error.response?.data}`\n }\n if (vueInstance.$notify) {\n vueInstance.$notify.serious({\n title: 'Network error',\n body,\n })\n }\n throw error\n } else {\n throw error\n }\n }\n)\n\nexport default axiosInstance\n","/*\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license\n# if purchased from OpenC3, Inc.\n*/\n\nimport axios from './axios.js'\n\nexport class OpenC3Api {\n id = 1\n\n constructor() {}\n\n async exec(\n method,\n params,\n kwparams = {},\n headerOptions = {},\n timeout = 60000\n ) {\n try {\n let refreshed = await OpenC3Auth.updateToken(\n OpenC3Auth.defaultMinValidity\n )\n if (refreshed) {\n OpenC3Auth.setTokens()\n }\n } catch (error) {\n OpenC3Auth.login()\n }\n this.id = this.id + 1\n try {\n kwparams['scope'] = window.openc3Scope\n const response = await axios.post(\n '/openc3-api/api',\n {\n jsonrpc: '2.0',\n method: method,\n params: params,\n id: this.id,\n keyword_params: kwparams,\n },\n {\n headers: {\n Authorization: localStorage.openc3Token,\n 'Content-Type': 'application/json-rpc',\n ...headerOptions,\n },\n timeout: timeout,\n }\n )\n // var data = response.data\n // if (data.error) {\n // var err = new Error()\n // err.name = data.error.data.class\n // err.message = data.error.data.message\n // console.log(data.error.data.backtrace.join('\\n'))\n // throw err\n // }\n return response.data.result\n } catch (error) {\n var err = new Error()\n if (error.response) {\n // The request was made and the server responded with a\n // status code that falls out of the range of 2xx\n err.name = error.response.data.error.data.class\n err.message = error.response.data.error.data.message\n } else if (error.request) {\n // The request was made but no response was received, `error.request`\n // is an instance of XMLHttpRequest in the browser and an instance\n // of http.ClientRequest in Node.js\n err.name = 'Request error'\n // NOTE: Openc3Screen.vue uses this specific message to determine\n // if the CmdTlmApi server is down. Don't change unless also changing there.\n err.message = 'Request error, no response received'\n } else {\n // Something happened in setting up the request and triggered an Error\n err.name = 'Unknown error'\n }\n throw err\n }\n }\n\n decode_openc3_type(val) {\n if (val !== null && typeof val === 'object') {\n if (val.json_class == 'Float' && val.raw) {\n if (val.raw == 'NaN') {\n return NaN\n } else if (val.raw == 'Infinity') {\n return Infinity\n } else if (val.raw == '-Infinity') {\n return -Infinity\n }\n }\n }\n return null\n }\n\n encode_openc3_type(val) {\n if (Number.isNaN(val)) {\n return { json_class: 'Float', raw: 'NaN' }\n } else if (val == Number.POSITIVE_INFINITY) {\n return { json_class: 'Float', raw: 'Infinity' }\n } else if (val == Number.NEGATIVE_INFINITY) {\n return { json_class: 'Float', raw: '-Infinity' }\n }\n return null\n }\n\n ensure_offline_access() {\n this.offline_access_needed().then((needed) => {\n if (needed) {\n if (localStorage.openc3OfflineToken) {\n this.set_offline_access(localStorage.openc3OfflineToken).then(() => {\n delete localStorage.openc3OfflineToken\n })\n } else {\n OpenC3Auth.getOfflineAccess()\n }\n }\n })\n }\n\n // ***********************************************\n // The following APIs are used by the CmdTlmServer\n // ***********************************************\n\n offline_access_needed() {\n return this.exec('offline_access_needed', [])\n }\n\n set_offline_access(offline_access_token) {\n return this.exec('set_offline_access', [offline_access_token])\n }\n\n get_all_interface_info() {\n return this.exec('get_all_interface_info', [])\n }\n\n map_target_to_interface(target_name, interface_name) {\n return this.exec('map_target_to_interface', [target_name, interface_name])\n }\n\n connect_interface(interface_name, ...interface_params) {\n if (interface_params.length > 0) {\n return this.exec('connect_interface', [\n interface_name,\n ...interface_params,\n ])\n } else {\n return this.exec('connect_interface', [interface_name])\n }\n }\n\n disconnect_interface(interface_name) {\n return this.exec('disconnect_interface', [interface_name])\n }\n\n get_all_router_info() {\n return this.exec('get_all_router_info', [])\n }\n\n connect_router(router_name) {\n return this.exec('connect_router', [router_name])\n }\n\n disconnect_router(router_name) {\n return this.exec('disconnect_router', [router_name])\n }\n\n get_target_interfaces() {\n return this.exec('get_target_interfaces', [])\n }\n\n // DEPRECATED\n get_all_target_info() {\n return this.exec('get_all_target_info', [])\n }\n\n get_tlm_cnts(target_commands) {\n return this.exec('get_tlm_cnts', [target_commands])\n }\n\n get_item(target, packet, item) {\n return this.exec('get_item', [target, packet, item])\n }\n\n get_parameter(target, packet, item) {\n return this.exec('get_parameter', [target, packet, item])\n }\n\n get_all_packet_logger_info() {\n return this.exec('get_all_packet_logger_info', [])\n }\n\n start_logging() {\n return this.exec('start_logging', [])\n }\n\n stop_logging() {\n return this.exec('stop_logging', [])\n }\n\n start_cmd_log(log_writer_name) {\n return this.exec('start_cmd_log', [log_writer_name])\n }\n\n start_tlm_log(log_writer_name) {\n return this.exec('start_tlm_log', [log_writer_name])\n }\n\n stop_cmd_log(log_writer_name) {\n return this.exec('stop_cmd_log', [log_writer_name])\n }\n\n stop_tlm_log(log_writer_name) {\n return this.exec('stop_tlm_log', [log_writer_name])\n }\n\n get_server_status() {\n return this.exec('get_server_status', [])\n }\n\n get_limits_sets() {\n return this.exec('get_limits_sets', [])\n }\n\n get_limits_set() {\n return this.exec('get_limits_set', [])\n }\n\n set_limits_set(limits_set) {\n return this.exec('set_limits_set', [limits_set])\n }\n\n get_background_tasks() {\n return this.exec('get_background_tasks', [])\n }\n\n start_background_task(name) {\n return this.exec('start_background_task', [name])\n }\n\n stop_background_task(name) {\n return this.exec('stop_background_task', [name])\n }\n\n // ***********************************************\n // End CmdTlmServer APIs\n // ***********************************************\n\n get_target(target_name) {\n return this.exec('get_target', [target_name])\n }\n\n // get_target_list is DEPRECATED\n get_target_list() {\n return this.exec('get_target_list', [])\n }\n get_target_names() {\n return this.exec('get_target_names', [])\n }\n\n get_telemetry(target_name, packet_name) {\n return this.exec('get_telemetry', [target_name, packet_name])\n }\n\n get_all_telemetry(target_name) {\n return this.exec('get_all_telemetry', [target_name])\n }\n\n get_all_telemetry_names(target_name) {\n return this.exec('get_all_telemetry_names', [target_name])\n }\n\n async get_tlm_packet(target_name, packet_name, value_type, stale_time = 30) {\n const data = await this.exec('get_tlm_packet', [target_name, packet_name], {\n type: value_type,\n stale_time: stale_time,\n })\n // Make sure data isn't null or undefined. Note this is the only valid use of == or !=\n if (data != null) {\n var len = data.length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_openc3_type(data[i][1])\n if (converted !== null) {\n data[i][1] = converted\n }\n }\n }\n return data\n }\n\n get_packet_derived_items(target_name, packet_name) {\n return this.exec('get_packet_derived_items', [target_name, packet_name])\n }\n\n get_tlm_buffer(target_name, packet_name) {\n return this.exec('get_tlm_buffer', [target_name, packet_name])\n }\n\n async get_tlm_values(items, stale_time = 30) {\n const data = await this.exec(\n 'get_tlm_values',\n [items],\n {\n stale_time: stale_time,\n },\n {},\n 10000 // 10s timeout ... should never be this long\n )\n var len = data[0].length\n var converted = null\n for (var i = 0; i < len; i++) {\n converted = this.decode_openc3_type(data[0][i])\n if (converted !== null) {\n data[0][i] = converted\n }\n }\n return data\n }\n\n get_limits(target_name, packet_name, item_name) {\n return this.exec('get_limits', [target_name, packet_name, item_name])\n }\n\n async tlm(target_name, packet_name, item_name, value_type = 'CONVERTED') {\n let data = null\n // Check for the single string syntax: tlm(\"TGT PKT ITEM\")\n if (packet_name === undefined) {\n data = await this.exec('tlm', [target_name])\n // Check for the single string syntax with type: tlm(\"TGT PKT ITEM\", \"RAW\")\n } else if (item_name === undefined) {\n if (\n ['RAW', 'CONVERTED', 'FORMATTED', 'WITH_UNITS'].includes(packet_name)\n ) {\n data = await this.exec('tlm', [target_name], { type: packet_name })\n } else {\n var err = new Error()\n err.name = 'TypeError'\n err.message = `Invalid data type ${packet_name}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`\n throw err\n }\n } else {\n data = await this.exec('tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n var converted = this.decode_openc3_type(data)\n if (converted !== null) {\n data = converted\n }\n return data\n }\n\n async inject_tlm(\n target_name,\n packet_name,\n item_hash = null,\n value_type = 'CONVERTED'\n ) {\n data = await this.exec(\n 'inject_tlm',\n [target_name, packet_name, item_hash],\n {\n type: value_type,\n }\n )\n }\n\n set_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('set_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n override_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('override_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n get_overrides() {\n return this.exec('get_overrides')\n }\n\n normalize_tlm(target_name, packet_name, item_name, value_type) {\n return this.exec('normalize_tlm', [target_name, packet_name, item_name], {\n type: value_type,\n })\n }\n\n get_all_commands(target_name) {\n return this.exec('get_all_commands', [target_name])\n }\n\n get_all_command_names(target_name) {\n return this.exec('get_all_command_names', [target_name])\n }\n\n get_command(target_name, command_name) {\n return this.exec('get_command', [target_name, command_name])\n }\n\n get_cmd_cnts(target_commands) {\n return this.exec('get_cmd_cnts', [target_commands])\n }\n\n get_cmd_value(\n target_name,\n packet_name,\n parameter_name,\n value_type = 'CONVERTED'\n ) {\n return this.exec('get_cmd_value', [\n target_name,\n packet_name,\n parameter_name,\n value_type,\n ])\n }\n\n get_cmd_buffer(target_name, packet_name) {\n return this.exec('get_cmd_buffer', [target_name, packet_name])\n }\n\n // Implementation of functionality shared by cmd methods with param_lists.\n _cmd(method, target_name, command_name, param_list, headerOptions) {\n var converted = null\n for (var key in param_list) {\n if (Object.prototype.hasOwnProperty.call(param_list, key)) {\n converted = this.encode_openc3_type(param_list[key])\n if (converted !== null) {\n param_list[key] = converted\n }\n }\n }\n return this.exec(\n method,\n [target_name, command_name, param_list],\n {},\n headerOptions\n )\n }\n\n get_cmd_hazardous(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('get_cmd_hazardous', target_name)\n } else {\n return this._cmd(\n 'get_cmd_hazardous',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd(target_name, command_name, param_list, headerOptions = {}) {\n if (command_name === undefined) {\n return this.exec('cmd', target_name, {}, headerOptions)\n } else {\n return this._cmd(\n 'cmd',\n target_name,\n command_name,\n param_list,\n headerOptions\n )\n }\n }\n\n cmd_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_raw(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw', target_name)\n } else {\n return this._cmd('cmd_raw', target_name, command_name, param_list)\n }\n }\n\n cmd_raw_no_range_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_range_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_range_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_no_checks', target_name)\n } else {\n return this._cmd('cmd_no_checks', target_name, command_name, param_list)\n }\n }\n\n cmd_raw_no_hazardous_check(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_hazardous_check', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_hazardous_check',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n cmd_raw_no_checks(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('cmd_raw_no_checks', target_name)\n } else {\n return this._cmd(\n 'cmd_raw_no_checks',\n target_name,\n command_name,\n param_list\n )\n }\n }\n\n build_command(target_name, command_name, param_list) {\n if (command_name === undefined) {\n return this.exec('build_command', target_name)\n } else {\n return this._cmd('build_command', target_name, command_name, param_list)\n }\n }\n\n get_interface_names() {\n return this.exec('get_interface_names', [])\n }\n\n send_raw(interface_name, data) {\n return this.exec('send_raw', [interface_name, data])\n }\n\n list_configs(tool) {\n return this.exec('list_configs', [tool])\n }\n\n load_config(tool, name) {\n return this.exec('load_config', [tool, name])\n }\n\n save_config(tool, name, data) {\n return this.exec('save_config', [tool, name, data])\n }\n\n delete_config(tool, name) {\n return this.exec('delete_config', [tool, name])\n }\n\n enable_limits(target, packet, item) {\n return this.exec('enable_limits', [target, packet, item])\n }\n\n disable_limits(target, packet, item) {\n return this.exec('disable_limits', [target, packet, item])\n }\n\n get_out_of_limits() {\n return this.exec('get_out_of_limits', [])\n }\n\n get_overall_limits_state(ignored) {\n return this.exec('get_overall_limits_state', [ignored])\n }\n\n list_settings() {\n return this.exec('list_settings', [])\n }\n\n get_all_settings() {\n return this.exec('get_all_settings', [])\n }\n\n get_setting(name) {\n return this.exec('get_setting', [name])\n }\n\n get_settings(array) {\n return this.exec('get_settings', array)\n }\n\n save_setting(name, data) {\n return this.exec('save_setting', [name, data])\n }\n\n get_metrics() {\n return this.exec('get_metrics', [])\n }\n\n // TODO: Currently unused but seemed like a useful function\n async hashString(string) {\n if (window.isSecureContext) {\n // Encode the string as an arrayBuffer which the subtle crypto API uses\n const arrayBuffer = new TextEncoder().encode(string)\n // Use the subtle crypto API to perform a SHA256 Sum of the array buffer\n // The resulting hash is stored in an array buffer\n const hashAsArrayBuffer = await crypto.subtle.digest(\n 'SHA-256',\n arrayBuffer\n )\n // To create a string we will get the hexadecimal value of each byte of the array buffer\n // This gets us an array where each byte of the array buffer becomes one item in the array\n const uint8ViewOfHash = new Uint8Array(hashAsArrayBuffer)\n // We then convert it to a regular array so we can convert each item to hexadecimal strings\n // Where to characters of 0-9 or a-f represent a number between 0 and 16, containing 4 bits of information, so 2 of them is 8 bits (1 byte).\n return Array.from(uint8ViewOfHash)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n }\n // else ?\n }\n}\n"],"names":["cov_18iatml2cn","actualCoverage","props","refreshInterval","default","data","f","s","updater","api","created","this","OpenC3Api","mounted","changeUpdater","beforeDestroy","b","clearInterval","watch","newVal","oldVal","methods","_this","setInterval","update","vueInstance","Vue","axiosInstance","axios","baseURL","location","origin","timeout","params","interceptors","response","use","error","_error$response","_error$response2","_error$response3","_error$response4","_error$response5","status","OpenC3Auth","updateToken","defaultMinValidity","then","refreshed","setTokens","headers","includes","toString","Promise","reject","body","concat","statusText","config","message","exception","class","_error$response6","$notify","serious","title","_classCallCheck","_defineProperty","_createClass","key","value","_exec","_asyncToGenerator","_regeneratorRuntime","mark","_callee","method","kwparams","headerOptions","err","_args","arguments","wrap","_context","prev","next","length","undefined","sent","t0","login","id","window","openc3Scope","post","jsonrpc","keyword_params","_objectSpread","Authorization","localStorage","openc3Token","abrupt","result","t1","Error","name","request","stop","exec","_x","_x2","apply","val","_typeof","json_class","raw","NaN","Infinity","Number","isNaN","POSITIVE_INFINITY","NEGATIVE_INFINITY","offline_access_needed","needed","openc3OfflineToken","set_offline_access","getOfflineAccess","offline_access_token","target_name","interface_name","_len","interface_params","Array","_key","router_name","target_commands","target","packet","item","log_writer_name","limits_set","packet_name","_get_tlm_packet","_callee2","value_type","stale_time","len","converted","i","_args2","_context2","type","decode_openc3_type","get_tlm_packet","_x3","_x4","_x5","_get_tlm_values","_callee3","items","_args3","_context3","get_tlm_values","_x6","item_name","_tlm","_callee4","_args4","_context4","tlm","_x7","_x8","_x9","_inject_tlm","_callee5","item_hash","_args5","_context5","inject_tlm","_x10","_x11","command_name","parameter_name","param_list","Object","prototype","hasOwnProperty","call","encode_openc3_type","_cmd","tool","ignored","array","_hashString","_callee6","string","arrayBuffer","hashAsArrayBuffer","uint8ViewOfHash","_context6","isSecureContext","TextEncoder","encode","crypto","subtle","digest","Uint8Array","from","map","padStart","join","hashString","_x12"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]=self["webpackChunk_openc3_cosmos_tool_cmdtlmserver"]||[]).push([[924],{7146:function(t,e,n){n.d(e,{ju:function(){return c},zD:function(){return w}});var i={logger:self.console,WebSocket:self.WebSocket},r={log(...t){this.enabled&&(t.push(Date.now()),i.logger.log("[ActionCable]",...t))}};const s=()=>(new Date).getTime(),o=t=>(s()-t)/1e3;class c{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=s(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),r.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=s(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),r.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=s()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,r.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=s(),r.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout((()=>{this.reconnectIfStale(),this.poll()}),this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:e}=this.constructor,n=Math.pow(1+e,Math.min(this.reconnectAttempts,10)),i=0===this.reconnectAttempts?1:e,r=i*Math.random();return 1e3*t*n*(1+r)}reconnectIfStale(){this.connectionIsStale()&&(r.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${o(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?r.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${o(this.disconnectedAt)} s`):(r.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return o(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&o(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){"visible"===document.visibilityState&&setTimeout((()=>{!this.connectionIsStale()&&this.connection.isOpen()||(r.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())}),200)}}c.staleThreshold=6,c.reconnectionBackoffRate=.15;var a={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:u,protocols:l}=a,h=l.slice(0,l.length-1),d=[].indexOf;class p{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new c(this),this.disconnected=!0}send(t){return!!this.isOpen()&&(this.webSocket.send(JSON.stringify(t)),!0)}open(){return this.isActive()?(r.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):(r.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${l}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new i.WebSocket(this.consumer.url,l),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(r.log(`Reopening WebSocket, current state is ${this.getState()}`),!this.isActive())return this.open();try{return this.close()}catch(t){r.log("Failed to reopen WebSocket",t)}finally{r.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return d.call(h,this.getProtocol())>=0}isState(...t){return d.call(t,this.getState())>=0}getState(){if(this.webSocket)for(let t in i.WebSocket)if(i.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase();return null}installEventHandlers(){for(let t in this.events){const e=this.events[t].bind(this);this.webSocket[`on${t}`]=e}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}p.reopenDelay=500,p.prototype.events={message(t){if(!this.isProtocolSupported())return;const{identifier:e,message:n,reason:i,reconnect:s,type:o}=JSON.parse(t.data);switch(o){case u.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case u.disconnect:return r.log(`Disconnecting. Reason: ${i}`),this.close({allowReconnect:s});case u.ping:return this.monitor.recordPing();case u.confirmation:return this.subscriptions.confirmSubscription(e),this.subscriptions.notify(e,"connected");case u.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",n)}},open(){if(r.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return r.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(t){if(r.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){r.log("WebSocket onerror event")}};const g=function(t,e){if(null!=e)for(let n in e){const i=e[n];t[n]=i}return t};class f{constructor(t,e={},n){this.consumer=t,this.identifier=JSON.stringify(e),g(this,n)}perform(t,e={}){return e.action=t,this.send(e)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class m{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){-1==this.pendingSubscriptions.indexOf(t)?(r.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):r.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){r.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter((e=>e!==t))}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout((()=>{this.subscriptions&&"function"===typeof this.subscriptions.subscribe&&this.pendingSubscriptions.map((t=>{r.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)}))}),500)}}class b{constructor(t){this.consumer=t,this.guarantor=new m(this),this.subscriptions=[]}create(t,e){const n=t,i="object"===typeof n?n:{channel:n},r=new f(this.consumer,i,e);return this.add(r)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map((t=>(this.forget(t),this.notify(t,"rejected"),t)))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter((e=>e!==t)),t}findAll(t){return this.subscriptions.filter((e=>e.identifier===t))}reload(){return this.subscriptions.map((t=>this.subscribe(t)))}notifyAll(t,...e){return this.subscriptions.map((n=>this.notify(n,t,...e)))}notify(t,e,...n){let i;return i="string"===typeof t?this.findAll(t):[t],i.map((t=>"function"===typeof t[e]?t[e](...n):void 0))}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){r.log(`Subscription confirmed ${t}`),this.findAll(t).map((t=>this.guarantor.forget(t)))}sendCommand(t,e){const{identifier:n}=t;return this.consumer.send({command:e,identifier:n})}}class v{constructor(t){this._url=t,this.subscriptions=new b(this),this.connection=new p(this)}get url(){return S(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}}function S(t){if("function"===typeof t&&(t=t()),t&&!/^wss?:/i.test(t)){const e=document.createElement("a");return e.href=t,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}return t}function w(t=y("url")||a.default_mount_path){return new v(t)}function y(t){const e=document.head.querySelector(`meta[name='action-cable-${t}']`);if(e)return e.getAttribute("content")}},2101:function(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},9992:function(t,e,n){var i=n(3103),r=n(5968),s=n(3718),o=r([].reverse),c=[1,2];i({target:"Array",proto:!0,forced:String(c)===String(c.reverse())},{reverse:function(){return s(this)&&(this.length=this.length),o(this)}})},9805:function(t,e,n){var i=n(3103),r=n(2991),s=n(3231),o=n(3329),c=n(9646),a=n(6554),u=n(3064),l=n(7501),h=n(2324),d=n(9563),p=n(1460),g=p("splice"),f=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!g},{splice:function(t,e){var n,i,p,g,b,v,S=r(this),w=c(S),y=s(t,w),A=arguments.length;for(0===A?n=i=0:1===A?(n=0,i=w-y):(n=A-2,i=m(f(o(e),0),w-y)),u(w+n-i),p=l(S,i),g=0;g<i;g++)b=y+g,b in S&&h(p,g,S[b]);if(p.length=i,n<i){for(g=y;g<w-i;g++)b=g+i,v=g+n,b in S?S[v]=S[b]:d(S,v);for(g=w;g>w-i+n;g--)d(S,g-1)}else if(n>i)for(g=w-i;g>y;g--)b=g+i-1,v=g+n-1,b in S?S[v]=S[b]:d(S,v);for(g=0;g<n;g++)S[g+y]=arguments[g+2];return a(S,w-i+n),p}})},1639:function(t,e,n){var i=n(3103),r=n(266),s=n(5968),o=n(8885),c=n(6733),a=n(9650),u=n(8311),l=n(3326),h=n(5300),d=n(3349),p=n(17),g=n(95),f=n(4231),m=g("replace"),b=TypeError,v=s("".indexOf),S=s("".replace),w=s("".slice),y=Math.max,A=function(t,e,n){return n>t.length?-1:""===e?n:v(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,s,g,D,C,T,N,k,$=o(this),_=0,R=0,M="";if(!a(t)){if(n=u(t),n&&(i=l(o(d(t))),!~v(i,"g")))throw b("`.replaceAll` does not allow non-global regexes");if(s=h(t,m),s)return r(s,t,$,e);if(f&&n)return S(l($),t,e)}g=l($),D=l(t),C=c(e),C||(e=l(e)),T=D.length,N=y(1,T),_=A(g,D,0);while(-1!==_)k=C?l(e(D,_,g)):p(D,g,_,[],void 0,e),M+=w(g,R,_)+k,R=_+T,_=A(g,D,_+N);return R<g.length&&(M+=w(g,R)),M}})},4908:function(t,e,n){var i=n(266),r=n(4954),s=n(1176),o=n(9650),c=n(8885),a=n(2101),u=n(3326),l=n(5300),h=n(8115);r("search",(function(t,e,n){return[function(e){var n=c(this),r=o(e)?void 0:l(e,t);return r?i(r,e,n):new RegExp(e)[t](u(n))},function(t){var i=s(this),r=u(t),o=n(e,i,r);if(o.done)return o.value;var c=i.lastIndex;a(c,0)||(i.lastIndex=0);var l=h(i,r);return a(i.lastIndex,c)||(i.lastIndex=c),null===l?-1:l.index}]}))},5488:function(t,e,n){n.d(e,{Z:function(){return c}});Math.pow(10,8);var i=6e4,r=36e5,s=n(9785),o=n(2765);function c(t,e){var n;(0,s.Z)(1,arguments);var i=(0,o.Z)(null!==(n=null===e||void 0===e?void 0:e.additionalDigits)&&void 0!==n?n:2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!==typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var r,c=d(t);if(c.date){var a=p(c.date,i);r=g(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var u,l=r.getTime(),h=0;if(c.time&&(h=m(c.time),isNaN(h)))return new Date(NaN);if(!c.timezone){var f=new Date(l+h),b=new Date(0);return b.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),b.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),b}return u=v(c.timezone),isNaN(u)?new Date(NaN):new Date(l+h+u)}var a={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},u=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,l=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,h=/^([+-])(\d{2})(?::?(\d{2}))?$/;function d(t){var e,n={},i=t.split(a.dateTimeDelimiter);if(i.length>2)return n;if(/:/.test(i[0])?e=i[0]:(n.date=i[0],e=i[1],a.timeZoneDelimiter.test(n.date)&&(n.date=t.split(a.timeZoneDelimiter)[0],e=t.substr(n.date.length,t.length))),e){var r=a.timezone.exec(e);r?(n.time=e.replace(r[1],""),n.timezone=r[1]):n.time=e}return n}function p(t,e){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=t.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,s=i[2]?parseInt(i[2]):null;return{year:null===s?r:100*s,restDateString:t.slice((i[1]||i[2]).length)}}function g(t,e){if(null===e)return new Date(NaN);var n=t.match(u);if(!n)return new Date(NaN);var i=!!n[4],r=f(n[1]),s=f(n[2])-1,o=f(n[3]),c=f(n[4]),a=f(n[5])-1;if(i)return C(e,c,a)?S(e,c,a):new Date(NaN);var l=new Date(0);return A(e,s,o)&&D(e,r)?(l.setUTCFullYear(e,s,Math.max(r,o)),l):new Date(NaN)}function f(t){return t?parseInt(t):1}function m(t){var e=t.match(l);if(!e)return NaN;var n=b(e[1]),s=b(e[2]),o=b(e[3]);return T(n,s,o)?n*r+s*i+1e3*o:NaN}function b(t){return t&&parseFloat(t.replace(",","."))||0}function v(t){if("Z"===t)return 0;var e=t.match(h);if(!e)return 0;var n="+"===e[1]?-1:1,s=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return N(s,o)?n*(s*r+o*i):NaN}function S(t,e,n){var i=new Date(0);i.setUTCFullYear(t,0,4);var r=i.getUTCDay()||7,s=7*(e-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+s),i}var w=[31,null,31,30,31,30,31,31,30,31,30,31];function y(t){return t%400===0||t%4===0&&t%100!==0}function A(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(w[e]||(y(t)?29:28))}function D(t,e){return e>=1&&e<=(y(t)?366:365)}function C(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function T(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function N(t,e){return e>=0&&e<=59}}}]);
2
+ //# sourceMappingURL=924.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/924.js","mappings":"wNAAA,IAAIA,EAAW,CACbC,OAAQC,KAAKC,QACbC,UAAWF,KAAKE,WAGdH,EAAS,CACX,GAAAI,IAAOC,GACDC,KAAKC,UACPF,EAASG,KAAKC,KAAKC,OACnBX,EAASC,OAAOI,IAAI,mBAA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","sources":["webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/core-js/internals/same-value.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/core-js/modules/es.array.reverse.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/core-js/modules/es.array.splice.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/core-js/modules/es.string.replace-all.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/core-js/modules/es.string.search.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/date-fns/esm/constants/index.js","webpack://@openc3/cosmos-tool-cmdtlmserver/../../node_modules/date-fns/esm/parseISO/index.js"],"sourcesContent":["var adapters = {\n logger: self.console,\n WebSocket: self.WebSocket\n};\n\nvar logger = {\n log(...messages) {\n if (this.enabled) {\n messages.push(Date.now());\n adapters.logger.log(\"[ActionCable]\", ...messages);\n }\n }\n};\n\nconst now = () => (new Date).getTime();\n\nconst secondsSince = time => (now() - time) / 1e3;\n\nclass ConnectionMonitor {\n constructor(connection) {\n this.visibilityDidChange = this.visibilityDidChange.bind(this);\n this.connection = connection;\n this.reconnectAttempts = 0;\n }\n start() {\n if (!this.isRunning()) {\n this.startedAt = now();\n delete this.stoppedAt;\n this.startPolling();\n addEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`);\n }\n }\n stop() {\n if (this.isRunning()) {\n this.stoppedAt = now();\n this.stopPolling();\n removeEventListener(\"visibilitychange\", this.visibilityDidChange);\n logger.log(\"ConnectionMonitor stopped\");\n }\n }\n isRunning() {\n return this.startedAt && !this.stoppedAt;\n }\n recordPing() {\n this.pingedAt = now();\n }\n recordConnect() {\n this.reconnectAttempts = 0;\n this.recordPing();\n delete this.disconnectedAt;\n logger.log(\"ConnectionMonitor recorded connect\");\n }\n recordDisconnect() {\n this.disconnectedAt = now();\n logger.log(\"ConnectionMonitor recorded disconnect\");\n }\n startPolling() {\n this.stopPolling();\n this.poll();\n }\n stopPolling() {\n clearTimeout(this.pollTimeout);\n }\n poll() {\n this.pollTimeout = setTimeout((() => {\n this.reconnectIfStale();\n this.poll();\n }), this.getPollInterval());\n }\n getPollInterval() {\n const {staleThreshold: staleThreshold, reconnectionBackoffRate: reconnectionBackoffRate} = this.constructor;\n const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10));\n const jitterMax = this.reconnectAttempts === 0 ? 1 : reconnectionBackoffRate;\n const jitter = jitterMax * Math.random();\n return staleThreshold * 1e3 * backoff * (1 + jitter);\n }\n reconnectIfStale() {\n if (this.connectionIsStale()) {\n logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`);\n this.reconnectAttempts++;\n if (this.disconnectedRecently()) {\n logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`);\n } else {\n logger.log(\"ConnectionMonitor reopening\");\n this.connection.reopen();\n }\n }\n }\n get refreshedAt() {\n return this.pingedAt ? this.pingedAt : this.startedAt;\n }\n connectionIsStale() {\n return secondsSince(this.refreshedAt) > this.constructor.staleThreshold;\n }\n disconnectedRecently() {\n return this.disconnectedAt && secondsSince(this.disconnectedAt) < this.constructor.staleThreshold;\n }\n visibilityDidChange() {\n if (document.visibilityState === \"visible\") {\n setTimeout((() => {\n if (this.connectionIsStale() || !this.connection.isOpen()) {\n logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`);\n this.connection.reopen();\n }\n }), 200);\n }\n }\n}\n\nConnectionMonitor.staleThreshold = 6;\n\nConnectionMonitor.reconnectionBackoffRate = .15;\n\nvar INTERNAL = {\n message_types: {\n welcome: \"welcome\",\n disconnect: \"disconnect\",\n ping: \"ping\",\n confirmation: \"confirm_subscription\",\n rejection: \"reject_subscription\"\n },\n disconnect_reasons: {\n unauthorized: \"unauthorized\",\n invalid_request: \"invalid_request\",\n server_restart: \"server_restart\"\n },\n default_mount_path: \"/cable\",\n protocols: [ \"actioncable-v1-json\", \"actioncable-unsupported\" ]\n};\n\nconst {message_types: message_types, protocols: protocols} = INTERNAL;\n\nconst supportedProtocols = protocols.slice(0, protocols.length - 1);\n\nconst indexOf = [].indexOf;\n\nclass Connection {\n constructor(consumer) {\n this.open = this.open.bind(this);\n this.consumer = consumer;\n this.subscriptions = this.consumer.subscriptions;\n this.monitor = new ConnectionMonitor(this);\n this.disconnected = true;\n }\n send(data) {\n if (this.isOpen()) {\n this.webSocket.send(JSON.stringify(data));\n return true;\n } else {\n return false;\n }\n }\n open() {\n if (this.isActive()) {\n logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`);\n return false;\n } else {\n logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`);\n if (this.webSocket) {\n this.uninstallEventHandlers();\n }\n this.webSocket = new adapters.WebSocket(this.consumer.url, protocols);\n this.installEventHandlers();\n this.monitor.start();\n return true;\n }\n }\n close({allowReconnect: allowReconnect} = {\n allowReconnect: true\n }) {\n if (!allowReconnect) {\n this.monitor.stop();\n }\n if (this.isOpen()) {\n return this.webSocket.close();\n }\n }\n reopen() {\n logger.log(`Reopening WebSocket, current state is ${this.getState()}`);\n if (this.isActive()) {\n try {\n return this.close();\n } catch (error) {\n logger.log(\"Failed to reopen WebSocket\", error);\n } finally {\n logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`);\n setTimeout(this.open, this.constructor.reopenDelay);\n }\n } else {\n return this.open();\n }\n }\n getProtocol() {\n if (this.webSocket) {\n return this.webSocket.protocol;\n }\n }\n isOpen() {\n return this.isState(\"open\");\n }\n isActive() {\n return this.isState(\"open\", \"connecting\");\n }\n isProtocolSupported() {\n return indexOf.call(supportedProtocols, this.getProtocol()) >= 0;\n }\n isState(...states) {\n return indexOf.call(states, this.getState()) >= 0;\n }\n getState() {\n if (this.webSocket) {\n for (let state in adapters.WebSocket) {\n if (adapters.WebSocket[state] === this.webSocket.readyState) {\n return state.toLowerCase();\n }\n }\n }\n return null;\n }\n installEventHandlers() {\n for (let eventName in this.events) {\n const handler = this.events[eventName].bind(this);\n this.webSocket[`on${eventName}`] = handler;\n }\n }\n uninstallEventHandlers() {\n for (let eventName in this.events) {\n this.webSocket[`on${eventName}`] = function() {};\n }\n }\n}\n\nConnection.reopenDelay = 500;\n\nConnection.prototype.events = {\n message(event) {\n if (!this.isProtocolSupported()) {\n return;\n }\n const {identifier: identifier, message: message, reason: reason, reconnect: reconnect, type: type} = JSON.parse(event.data);\n switch (type) {\n case message_types.welcome:\n this.monitor.recordConnect();\n return this.subscriptions.reload();\n\n case message_types.disconnect:\n logger.log(`Disconnecting. Reason: ${reason}`);\n return this.close({\n allowReconnect: reconnect\n });\n\n case message_types.ping:\n return this.monitor.recordPing();\n\n case message_types.confirmation:\n this.subscriptions.confirmSubscription(identifier);\n return this.subscriptions.notify(identifier, \"connected\");\n\n case message_types.rejection:\n return this.subscriptions.reject(identifier);\n\n default:\n return this.subscriptions.notify(identifier, \"received\", message);\n }\n },\n open() {\n logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`);\n this.disconnected = false;\n if (!this.isProtocolSupported()) {\n logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\");\n return this.close({\n allowReconnect: false\n });\n }\n },\n close(event) {\n logger.log(\"WebSocket onclose event\");\n if (this.disconnected) {\n return;\n }\n this.disconnected = true;\n this.monitor.recordDisconnect();\n return this.subscriptions.notifyAll(\"disconnected\", {\n willAttemptReconnect: this.monitor.isRunning()\n });\n },\n error() {\n logger.log(\"WebSocket onerror event\");\n }\n};\n\nconst extend = function(object, properties) {\n if (properties != null) {\n for (let key in properties) {\n const value = properties[key];\n object[key] = value;\n }\n }\n return object;\n};\n\nclass Subscription {\n constructor(consumer, params = {}, mixin) {\n this.consumer = consumer;\n this.identifier = JSON.stringify(params);\n extend(this, mixin);\n }\n perform(action, data = {}) {\n data.action = action;\n return this.send(data);\n }\n send(data) {\n return this.consumer.send({\n command: \"message\",\n identifier: this.identifier,\n data: JSON.stringify(data)\n });\n }\n unsubscribe() {\n return this.consumer.subscriptions.remove(this);\n }\n}\n\nclass SubscriptionGuarantor {\n constructor(subscriptions) {\n this.subscriptions = subscriptions;\n this.pendingSubscriptions = [];\n }\n guarantee(subscription) {\n if (this.pendingSubscriptions.indexOf(subscription) == -1) {\n logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`);\n this.pendingSubscriptions.push(subscription);\n } else {\n logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`);\n }\n this.startGuaranteeing();\n }\n forget(subscription) {\n logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`);\n this.pendingSubscriptions = this.pendingSubscriptions.filter((s => s !== subscription));\n }\n startGuaranteeing() {\n this.stopGuaranteeing();\n this.retrySubscribing();\n }\n stopGuaranteeing() {\n clearTimeout(this.retryTimeout);\n }\n retrySubscribing() {\n this.retryTimeout = setTimeout((() => {\n if (this.subscriptions && typeof this.subscriptions.subscribe === \"function\") {\n this.pendingSubscriptions.map((subscription => {\n logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`);\n this.subscriptions.subscribe(subscription);\n }));\n }\n }), 500);\n }\n}\n\nclass Subscriptions {\n constructor(consumer) {\n this.consumer = consumer;\n this.guarantor = new SubscriptionGuarantor(this);\n this.subscriptions = [];\n }\n create(channelName, mixin) {\n const channel = channelName;\n const params = typeof channel === \"object\" ? channel : {\n channel: channel\n };\n const subscription = new Subscription(this.consumer, params, mixin);\n return this.add(subscription);\n }\n add(subscription) {\n this.subscriptions.push(subscription);\n this.consumer.ensureActiveConnection();\n this.notify(subscription, \"initialized\");\n this.subscribe(subscription);\n return subscription;\n }\n remove(subscription) {\n this.forget(subscription);\n if (!this.findAll(subscription.identifier).length) {\n this.sendCommand(subscription, \"unsubscribe\");\n }\n return subscription;\n }\n reject(identifier) {\n return this.findAll(identifier).map((subscription => {\n this.forget(subscription);\n this.notify(subscription, \"rejected\");\n return subscription;\n }));\n }\n forget(subscription) {\n this.guarantor.forget(subscription);\n this.subscriptions = this.subscriptions.filter((s => s !== subscription));\n return subscription;\n }\n findAll(identifier) {\n return this.subscriptions.filter((s => s.identifier === identifier));\n }\n reload() {\n return this.subscriptions.map((subscription => this.subscribe(subscription)));\n }\n notifyAll(callbackName, ...args) {\n return this.subscriptions.map((subscription => this.notify(subscription, callbackName, ...args)));\n }\n notify(subscription, callbackName, ...args) {\n let subscriptions;\n if (typeof subscription === \"string\") {\n subscriptions = this.findAll(subscription);\n } else {\n subscriptions = [ subscription ];\n }\n return subscriptions.map((subscription => typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined));\n }\n subscribe(subscription) {\n if (this.sendCommand(subscription, \"subscribe\")) {\n this.guarantor.guarantee(subscription);\n }\n }\n confirmSubscription(identifier) {\n logger.log(`Subscription confirmed ${identifier}`);\n this.findAll(identifier).map((subscription => this.guarantor.forget(subscription)));\n }\n sendCommand(subscription, command) {\n const {identifier: identifier} = subscription;\n return this.consumer.send({\n command: command,\n identifier: identifier\n });\n }\n}\n\nclass Consumer {\n constructor(url) {\n this._url = url;\n this.subscriptions = new Subscriptions(this);\n this.connection = new Connection(this);\n }\n get url() {\n return createWebSocketURL(this._url);\n }\n send(data) {\n return this.connection.send(data);\n }\n connect() {\n return this.connection.open();\n }\n disconnect() {\n return this.connection.close({\n allowReconnect: false\n });\n }\n ensureActiveConnection() {\n if (!this.connection.isActive()) {\n return this.connection.open();\n }\n }\n}\n\nfunction createWebSocketURL(url) {\n if (typeof url === \"function\") {\n url = url();\n }\n if (url && !/^wss?:/i.test(url)) {\n const a = document.createElement(\"a\");\n a.href = url;\n a.href = a.href;\n a.protocol = a.protocol.replace(\"http\", \"ws\");\n return a.href;\n } else {\n return url;\n }\n}\n\nfunction createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n return new Consumer(url);\n}\n\nfunction getConfig(name) {\n const element = document.head.querySelector(`meta[name='action-cable-${name}']`);\n if (element) {\n return element.getAttribute(\"content\");\n }\n}\n\nexport { Connection, ConnectionMonitor, Consumer, INTERNAL, Subscription, SubscriptionGuarantor, Subscriptions, adapters, createConsumer, createWebSocketURL, getConfig, logger };\n","'use strict';\n// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = uncurryThis([].reverse);\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign -- dirty hack\n if (isArray(this)) this.length = this.length;\n return nativeReverse(this);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar setArrayLength = require('../internals/array-set-length');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar deletePropertyOrThrow = require('../internals/delete-property-or-throw');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);\n }\n doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n setArrayLength(O, len - actualDeleteCount + insertCount);\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar isCallable = require('../internals/is-callable');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isRegExp = require('../internals/is-regexp');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar getRegExpFlags = require('../internals/regexp-get-flags');\nvar getSubstitution = require('../internals/get-substitution');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar REPLACE = wellKnownSymbol('replace');\nvar $TypeError = TypeError;\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\n\nvar stringIndexOf = function (string, searchValue, fromIndex) {\n if (fromIndex > string.length) return -1;\n if (searchValue === '') return fromIndex;\n return indexOf(string, searchValue, fromIndex);\n};\n\n// `String.prototype.replaceAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.replaceall\n$({ target: 'String', proto: true }, {\n replaceAll: function replaceAll(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;\n var position = 0;\n var endOfLastMatch = 0;\n var result = '';\n if (!isNullOrUndefined(searchValue)) {\n IS_REG_EXP = isRegExp(searchValue);\n if (IS_REG_EXP) {\n flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));\n if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes');\n }\n replacer = getMethod(searchValue, REPLACE);\n if (replacer) {\n return call(replacer, searchValue, O, replaceValue);\n } else if (IS_PURE && IS_REG_EXP) {\n return replace(toString(O), searchValue, replaceValue);\n }\n }\n string = toString(O);\n searchString = toString(searchValue);\n functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n searchLength = searchString.length;\n advanceBy = max(1, searchLength);\n position = stringIndexOf(string, searchString, 0);\n while (position !== -1) {\n replacement = functionalReplace\n ? toString(replaceValue(searchString, position, string))\n : getSubstitution(searchString, string, position, [], undefined, replaceValue);\n result += stringSlice(string, endOfLastMatch, position) + replacement;\n endOfLastMatch = position + searchLength;\n position = stringIndexOf(string, searchString, position + advanceBy);\n }\n if (endOfLastMatch < string.length) {\n result += stringSlice(string, endOfLastMatch);\n }\n return result;\n }\n});\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);\n return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeSearch, rx, S);\n\n if (res.done) return res.value;\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInYear = 365.2425;\n\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInMinute = 60000;\n\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInHour = 3600000;\n\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\nexport var millisecondsInSecond = 1000;\n\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\nexport var minTime = -maxTime;\n\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var minutesInHour = 60;\n\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInQuarter = 3;\n\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var monthsInYear = 12;\n\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var quartersInYear = 4;\n\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInHour = 3600;\n\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMinute = 60;\n\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInDay = secondsInHour * 24;\n\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInWeek = secondsInDay * 7;\n\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInYear = secondsInDay * daysInYear;\n\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInMonth = secondsInYear / 12;\n\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexport var secondsInQuarter = secondsInMonth * 3;","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport default function parseISO(argument, options) {\n var _options$additionalDi;\n requiredArgs(1, arguments);\n var additionalDigits = toInteger((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2);\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n var dateStrings = splitDateString(argument);\n var date;\n if (dateStrings.date) {\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n var dirtyDate = new Date(timestamp + time);\n // js parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n var result = new Date(0);\n result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n return result;\n }\n return new Date(timestamp + time + offset);\n}\nvar patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var array = dateString.split(patterns.dateTimeDelimiter);\n var timeString;\n\n // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n if (array.length > 2) {\n return dateStrings;\n }\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(dateStrings.date.length, dateString.length);\n }\n }\n if (timeString) {\n var token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n return dateStrings;\n}\nfunction parseYear(dateString, additionalDigits) {\n var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n var captures = dateString.match(regex);\n // Invalid ISO-formatted year\n if (!captures) return {\n year: NaN,\n restDateString: ''\n };\n var year = captures[1] ? parseInt(captures[1]) : null;\n var century = captures[2] ? parseInt(captures[2]) : null;\n\n // either year or century is null, not both\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length)\n };\n}\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n var captures = dateString.match(dateRegex);\n // Invalid ISO-formatted string\n if (!captures) return new Date(NaN);\n var isWeekDate = !!captures[4];\n var dayOfYear = parseDateUnit(captures[1]);\n var month = parseDateUnit(captures[2]) - 1;\n var day = parseDateUnit(captures[3]);\n var week = parseDateUnit(captures[4]);\n var dayOfWeek = parseDateUnit(captures[5]) - 1;\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n var date = new Date(0);\n if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\nfunction parseTime(timeString) {\n var captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n var hours = parseTimeUnit(captures[1]);\n var minutes = parseTimeUnit(captures[2]);\n var seconds = parseTimeUnit(captures[3]);\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\nfunction parseTimeUnit(value) {\n return value && parseFloat(value.replace(',', '.')) || 0;\n}\nfunction parseTimezone(timezoneString) {\n if (timezoneString === 'Z') return 0;\n var captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n var sign = captures[1] === '+' ? -1 : 1;\n var hours = parseInt(captures[2]);\n var minutes = captures[3] && parseInt(captures[3]) || 0;\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\nfunction validateDate(year, month, date) {\n return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}"],"names":["adapters","logger","self","console","WebSocket","log","messages","this","enabled","push","Date","now","getTime","secondsSince","time","ConnectionMonitor","constructor","connection","visibilityDidChange","bind","reconnectAttempts","start","isRunning","startedAt","stoppedAt","startPolling","addEventListener","staleThreshold","stop","stopPolling","removeEventListener","recordPing","pingedAt","recordConnect","disconnectedAt","recordDisconnect","poll","clearTimeout","pollTimeout","setTimeout","reconnectIfStale","getPollInterval","reconnectionBackoffRate","backoff","Math","pow","min","jitterMax","jitter","random","connectionIsStale","refreshedAt","disconnectedRecently","reopen","document","visibilityState","isOpen","INTERNAL","message_types","welcome","disconnect","ping","confirmation","rejection","disconnect_reasons","unauthorized","invalid_request","server_restart","default_mount_path","protocols","supportedProtocols","slice","length","indexOf","Connection","consumer","open","subscriptions","monitor","disconnected","send","data","webSocket","JSON","stringify","isActive","getState","uninstallEventHandlers","url","installEventHandlers","close","allowReconnect","error","reopenDelay","getProtocol","protocol","isState","isProtocolSupported","call","states","state","readyState","toLowerCase","eventName","events","handler","prototype","message","event","identifier","reason","reconnect","type","parse","reload","confirmSubscription","notify","reject","notifyAll","willAttemptReconnect","extend","object","properties","key","value","Subscription","params","mixin","perform","action","command","unsubscribe","remove","SubscriptionGuarantor","pendingSubscriptions","guarantee","subscription","startGuaranteeing","forget","filter","s","stopGuaranteeing","retrySubscribing","retryTimeout","subscribe","map","Subscriptions","guarantor","create","channelName","channel","add","ensureActiveConnection","findAll","sendCommand","callbackName","args","undefined","Consumer","_url","createWebSocketURL","connect","test","a","createElement","href","replace","createConsumer","getConfig","name","element","head","querySelector","getAttribute","module","exports","Object","is","x","y","$","uncurryThis","isArray","nativeReverse","reverse","target","proto","forced","String","toObject","toAbsoluteIndex","toIntegerOrInfinity","lengthOfArrayLike","setArrayLength","doesNotExceedSafeInteger","arraySpeciesCreate","createProperty","deletePropertyOrThrow","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","max","splice","deleteCount","insertCount","actualDeleteCount","A","k","from","to","O","len","actualStart","argumentsLength","arguments","requireObjectCoercible","isCallable","isNullOrUndefined","isRegExp","toString","getMethod","getRegExpFlags","getSubstitution","wellKnownSymbol","IS_PURE","REPLACE","$TypeError","TypeError","stringSlice","stringIndexOf","string","searchValue","fromIndex","replaceAll","replaceValue","IS_REG_EXP","flags","replacer","searchString","functionalReplace","searchLength","advanceBy","replacement","position","endOfLastMatch","result","fixRegExpWellKnownSymbolLogic","anObject","sameValue","regExpExec","SEARCH","nativeSearch","maybeCallNative","regexp","searcher","RegExp","rx","S","res","done","previousLastIndex","lastIndex","index","millisecondsInMinute","millisecondsInHour","parseISO","argument","options","_options$additionalDi","requiredArgs","additionalDigits","toInteger","RangeError","NaN","date","dateStrings","splitDateString","parseYearResult","parseYear","parseDate","restDateString","year","isNaN","offset","timestamp","parseTime","timezone","dirtyDate","setFullYear","getUTCFullYear","getUTCMonth","getUTCDate","setHours","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","parseTimezone","patterns","dateTimeDelimiter","timeZoneDelimiter","dateRegex","timeRegex","timezoneRegex","dateString","timeString","array","split","substr","token","exec","regex","captures","match","parseInt","century","isWeekDate","dayOfYear","parseDateUnit","month","day","week","dayOfWeek","validateWeekDate","dayOfISOWeekYear","validateDate","validateDayOfYearDate","setUTCFullYear","hours","parseTimeUnit","minutes","seconds","validateTime","parseFloat","timezoneString","sign","validateTimezone","isoWeekYear","fourthOfJanuaryDay","getUTCDay","diff","setUTCDate","daysInMonths","isLeapYearIndex","_year","_hours"],"sourceRoot":""}