cosmosc2-tool-calendar 5.0.2.pre.beta2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ (self["webpackChunk_cosmosc2_tool_calendar"]=self["webpackChunk_cosmosc2_tool_calendar"]||[]).push([[172],{2172:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Vt}});var i=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("top-bar",{attrs:{title:n.title}}),t("v-container",{attrs:{dense:""}},[t("v-row",[t("v-col",{staticClass:"pa-1"},[t("calendar-toolbar",{attrs:{timelines:n.timelines,events:n.calendarEvents},on:{action:n.actionHandler},model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}})],1)],1),t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"}},[t("mini-calendar",{model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}}),t("v-divider",{staticClass:"my-1"}),t("calendar-selector",{attrs:{timelines:n.timelines},model:{value:n.selectedCalendars,callback:function(e){n.selectedCalendars=e},expression:"selectedCalendars"}})],1),t("v-col",{staticClass:"pa-1"},[t("event-calendar",{ref:"eventCalendar",attrs:{events:n.calendarEvents},model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}})],1)],1)],1)],1)},l=[],a=t(8373),o=t(6711),s=(t(8188),t(1939),t(8178),t(5342),t(4769),t(9529),t(1235),t(9228),t(9949),t(2501),t(9805),t(8995),t(9490)),r=(t(5047),t(9644)),c=t.n(r),u=t(4091),m=new u["default"],d=c().create({baseURL:location.origin,timeout:1e4,params:{}});d.interceptors.response.use((function(n){return n}),(function(n){if(401===n.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var e,t,i,l,a,o,s,r="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.message)r+="".concat(n.response.data.message);else if(null!==(i=n.response)&&void 0!==i&&null!==(l=i.data)&&void 0!==l&&l.exception)r+="".concat(n.response.data.exception);else if(null!==(a=n.response)&&void 0!==a&&null!==(o=a.data)&&void 0!==o&&null!==(s=o.error)&&void 0!==s&&s.message)n.response.data.error.class&&(r+="".concat(n.response.data.error.class," ")),r+="".concat(n.response.data.error.message);else{var c;r+="".concat(null===(c=n.response)||void 0===c?void 0:c.data)}m.$notify.serious({title:"Network error",body:r})}throw n}));var A=d,v=function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t){var i,l,a,o,s,r,c,u,m,d=arguments;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=d.length>2&&void 0!==d[2]?d[2]:{},l=i.data,a=i.params,o=void 0===a?{}:a,s=i.headers,r=i.noAuth,c=void 0!==r&&r,u=i.noScope,m=void 0!==u&&u,c){n.next=11;break}return n.prev=2,n.next=5,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),CosmosAuth.login();case 10:s["Authorization"]=localStorage.cosmosToken;case 11:return m||o["scope"]||(o["scope"]=localStorage.scope),n.abrupt("return",A({method:e,url:t,data:l,params:o,headers:s}));case 13:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}(),p={Accept:"application/json"},h=(0,a.Z)((0,a.Z)({},p),{},{"Content-Type":"application/json"}),C={get:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,i=e.headers,l=void 0===i?p:i,a=e.noScope,o=e.noAuth;return v("get",n,{params:t,headers:l,noScope:a,noAuth:o})},put:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,i=e.params,l=e.headers,a=void 0===l?h:l,o=e.noScope,s=e.noAuth;return v("put",n,{data:t,params:i,headers:a,noScope:o,noAuth:s})},post:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,i=e.params,l=e.headers,a=void 0===l?h:l,o=e.noScope,s=e.noAuth;return v("post",n,{data:t,params:i,headers:a,noScope:o,noAuth:s})},delete:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,i=e.headers,l=void 0===i?p:i,a=e.noScope,o=e.noAuth;return v("delete",n,{params:t,headers:l,noScope:a,noAuth:o})}},f=t(6330),y=t(2209),b=t(5563),g=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/cosmos-api/cable";(0,f.Z)(this,n),this._cable=b.createConsumer(e)}return(0,y.Z)(n,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(n,e){var t=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return CosmosAuth.updateToken(CosmosAuth.defaultMinValidity).then((function(){return t._cable.subscriptions.create((0,a.Z)({channel:n,scope:e,token:localStorage.cosmosToken},l),i)}))}}]),n}(),_=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("mounting-portal",{attrs:{"mount-to":"#cosmos-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[n._l(n.menus,(function(e,i){return t("v-menu",{key:i,attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(i){var l=i.on,a=i.attrs;return[t("v-btn",n._g(n._b({staticClass:"mx-1",attrs:{outlined:"","data-test":n.formatDT(n.title+" "+e.label)}},"v-btn",a,!1),l),[t("span",{domProps:{textContent:n._s(e.label)}}),t("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)]}}],null,!0)},[t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:e.radioGroup,"hide-details":"",dense:""}},[n._l(e.items,(function(i,l){return[i.divider?t("v-divider",{key:l}):t("v-list-item",{key:l,attrs:{disabled:i.disabled,"data-test":n.formatDT(n.title+" "+e.label+" "+i.label)},on:{click:i.command}},[i.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:i.label,value:i.label}})],1):n._e(),i.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:i.label,value:i.label},model:{value:n.checked,callback:function(e){n.checked=e},expression:"checked"}})],1):n._e(),i.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:i.disabled},domProps:{textContent:n._s(i.icon)}})],1):n._e(),i.radio||i.checkbox?n._e():t("v-list-item-title",{style:"cursor: pointer;"+(i.disabled?"opacity: 0.2":""),domProps:{textContent:n._s(i.label)}})],1)]}))],2)],1)],1)})),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer")],2)])},w=[],x=(t(7950),t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()}}}),T=x,k=(t(7162),t(3287)),E=(0,k.Z)(T,_,w,!1,null,"e3bb7458",null),D=E.exports,S=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-sheet",{staticClass:"mt-1",attrs:{height:"800"}},[t("v-calendar",{ref:"mainCalendar",attrs:{color:"primary",events:n.events,"event-color":n.getEventColor,type:n.type},on:{"click:event":n.showEvent,"click:more":n.viewDay,"click:date":n.viewDay},scopedSlots:n._u([{key:"day-body",fn:function(e){var i=e.date,l=e.week;return[t("div",{staticClass:"v-current-time",class:{first:i===l[0].date},style:{top:n.nowY}})]}}]),model:{value:n.focus,callback:function(e){n.focus=e},expression:"focus"}}),t("v-menu",{attrs:{"close-on-content-click":!1,activator:n.selectedElement},model:{value:n.selectedOpen,callback:function(e){n.selectedOpen=e},expression:"selectedOpen"}},[t("event-dialog",{attrs:{event:n.selectedEvent,utc:n.utc},on:{close:n.close},model:{value:n.selectedOpen,callback:function(e){n.selectedOpen=e},expression:"selectedOpen"}})],1)],1)],1)},M=[],F=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card",{attrs:{width:"400"}},["activity"===n.type?t("div",[t("activity-event-form",{attrs:{"activity-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e(),"narrative"===n.type?t("div",[t("narration-event-form",{attrs:{"narrative-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e(),"metadata"===n.type?t("div",[t("metadata-event-form",{attrs:{"metadata-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e()])],1)},N=[],I=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",[t("span",{domProps:{textContent:n._s(n.activityEvent.name)}}),t("v-spacer"),t("v-icon",[n._v(" "+n._s(n.activityBadgeIcon)+" ")])],1),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.activityEvent.start,n.utc))+" ")]),t("br"),t("span",[n._v(" "+n._s(n._f("dateTime")(n.activityEvent.end,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-col",{staticClass:"pa-0"},[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left",attrs:{width:"100"}},[n._v("Fulfilled")]),t("td",{domProps:{textContent:n._s(n.activityFulfillment)}})]),t("tr",[t("th",{staticClass:"text-left",domProps:{textContent:n._s(n.activityKind)}}),t("td",{domProps:{textContent:n._s(n.activityData[n.activityKind])}})]),n.showEnv?t("tr",[t("th",{staticClass:"text-left"},[n._v("ENV")]),t("td",{domProps:{textContent:n._s(n.activityEnvironment)}})]):n._e()])])],1)],1),t("v-row",[t("v-col",[t("activity-event-timeline",{attrs:{"activity-events":n.activityEvents,utc:n.utc}})],1)],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",[n.activityEvent.fulfillment?n._e():t("div",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"update-activity"},on:{click:n.updateDialog}},[t("v-icon",[n._v(" mdi-pencil ")])],1)],1)]}}],null,!1,3672295435)},[t("span",[n._v(" Update ")])])],1),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"delete-activity"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("activity-update-dialog",{attrs:{activity:n.activityEvent.activity},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},O=[];t(8319);function R(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timeFilters.js",e="24417ba1900466472943e1835e886b0d8932ef86",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timeFilters.js",statementMap:{0:{start:{line:23,column:6},end:{line:27,column:7}},1:{start:{line:24,column:8},end:{line:24,column:46}},2:{start:{line:26,column:8},end:{line:26,column:49}},3:{start:{line:30,column:6},end:{line:34,column:7}},4:{start:{line:31,column:8},end:{line:31,column:32}},5:{start:{line:33,column:8},end:{line:33,column:35}},6:{start:{line:39,column:6},end:{line:43,column:7}},7:{start:{line:40,column:8},end:{line:40,column:33}},8:{start:{line:42,column:8},end:{line:42,column:36}},9:{start:{line:47,column:19},end:{line:47,column:37}},10:{start:{line:48,column:18},end:{line:48,column:43}},11:{start:{line:49,column:18},end:{line:49,column:38}},12:{start:{line:51,column:19},end:{line:51,column:44}},13:{start:{line:52,column:8},end:{line:52,column:44}},14:{start:{line:54,column:19},end:{line:54,column:37}},15:{start:{line:55,column:20},end:{line:55,column:44}},16:{start:{line:56,column:18},end:{line:56,column:37}},17:{start:{line:57,column:19},end:{line:57,column:39}},18:{start:{line:58,column:21},end:{line:58,column:43}},19:{start:{line:59,column:21},end:{line:59,column:43}},20:{start:{line:60,column:18},end:{line:60,column:45}},21:{start:{line:62,column:8},end:{line:64,column:47}},22:{start:{line:65,column:6},end:{line:65,column:90}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:22,column:10},end:{line:22,column:11}},loc:{start:{line:22,column:30},end:{line:28,column:5}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:29,column:14},end:{line:29,column:15}},loc:{start:{line:29,column:34},end:{line:35,column:5}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:38,column:4},end:{line:38,column:5}},loc:{start:{line:38,column:32},end:{line:44,column:5}},line:38},3:{name:"(anonymous_3)",decl:{start:{line:45,column:4},end:{line:45,column:5}},loc:{start:{line:45,column:26},end:{line:66,column:5}},line:45},4:{name:"pad",decl:{start:{line:50,column:15},end:{line:50,column:18}},loc:{start:{line:50,column:24},end:{line:53,column:7}},line:50}},branchMap:{0:{loc:{start:{line:23,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:23,column:6},end:{line:27,column:7}},{start:{line:25,column:13},end:{line:27,column:7}}],line:23},1:{loc:{start:{line:30,column:6},end:{line:34,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:34,column:7}},{start:{line:32,column:13},end:{line:34,column:7}}],line:30},2:{loc:{start:{line:39,column:6},end:{line:43,column:7}},type:"if",locations:[{start:{line:39,column:6},end:{line:43,column:7}},{start:{line:41,column:13},end:{line:43,column:7}}],line:39},3:{loc:{start:{line:49,column:18},end:{line:49,column:38}},type:"cond-expr",locations:[{start:{line:49,column:29},end:{line:49,column:32}},{start:{line:49,column:35},end:{line:49,column:38}}],line:49},4:{loc:{start:{line:52,column:16},end:{line:52,column:36}},type:"cond-expr",locations:[{start:{line:52,column:28},end:{line:52,column:31}},{start:{line:52,column:34},end:{line:52,column:36}}],line:52},5:{loc:{start:{line:62,column:8},end:{line:64,column:47}},type:"cond-expr",locations:[{start:{line:63,column:12},end:{line:63,column:19}},{start:{line:64,column:12},end:{line:64,column:47}}],line:62}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"24417ba1900466472943e1835e886b0d8932ef86"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return R=function(){return o},o}R();var $={filters:{time:function(n,e){return R().f[0]++,R().s[0]++,e?(R().b[0][0]++,R().s[1]++,n.toUTCString().split(" ")[4]):(R().b[0][1]++,R().s[2]++,n.toLocaleString().split(" ")[1])},dateTime:function(n,e){return R().f[1]++,R().s[3]++,e?(R().b[1][0]++,R().s[4]++,n.toISOString()):(R().b[1][1]++,R().s[5]++,n.toLocaleString())}},methods:{generateDateTime:function(n,e){return R().f[2]++,R().s[6]++,e?(R().b[2][0]++,R().s[7]++,n.toISOString()):(R().b[2][1]++,R().s[8]++,n.toLocaleString())},toIsoString:function(n){R().f[3]++;var e=(R().s[9]++,new Date(n)),t=(R().s[10]++,-e.getTimezoneOffset()),i=(R().s[11]++,t>=0?(R().b[3][0]++,"+"):(R().b[3][1]++,"-"));function l(n){R().f[4]++;var e=(R().s[12]++,Math.floor(Math.abs(n)));return R().s[13]++,(e<10?(R().b[4][0]++,"0"):(R().b[4][1]++,""))+e}var a=(R().s[14]++,e.getFullYear()),o=(R().s[15]++,l(e.getMonth()+1)),s=(R().s[16]++,l(e.getDate())),r=(R().s[17]++,l(e.getHours())),c=(R().s[18]++,l(e.getMinutes())),u=(R().s[19]++,l(e.getSeconds())),m=(R().s[20]++,l(e.getMilliseconds())),d=(R().s[21]++,"utc"===this.utcOrLocal?(R().b[5][0]++,"00:00"):(R().b[5][1]++,"".concat(l(t/60),":").concat(l(t%60))));return R().s[22]++,"".concat(a,"-").concat(o,"-").concat(s,"T").concat(r,":").concat(c,":").concat(u,".").concat(m).concat(i).concat(d)}}},U=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-timeline",{attrs:{"align-top":"",dense:""}},n._l(n.events,(function(e){return t("div",{key:e.event+e.time},[t("v-timeline-item",{attrs:{small:"",color:n.genColor(e),icon:n.genIcon(e)}},[t("v-row",{staticClass:"pt-1"},[t("v-col",[t("strong",{domProps:{textContent:n._s(e.event)}}),t("i",[n._v(" "+n._s(n._f("dateTime")(e.time,n.utc))+" ")]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.message,expression:"event.message"}],staticClass:"text-caption"},[n._v(" "+n._s(e.message)+" ")])])],1)],1)],1)})),0)},L=[];t(3450);function P(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventTimeline.vue",e="d8ec5b418b4f4375913e113ba7dadbb194d9c196",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventTimeline.vue",statementMap:{0:{start:{line:56,column:4},end:{line:58,column:5}},1:{start:{line:62,column:6},end:{line:64,column:8}},2:{start:{line:63,column:8},end:{line:63,column:64}},3:{start:{line:67,column:6},end:{line:88,column:7}},4:{start:{line:93,column:6},end:{line:93,column:43}},5:{start:{line:96,column:6},end:{line:96,column:78}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:55,column:2},end:{line:55,column:3}},loc:{start:{line:55,column:9},end:{line:59,column:3}},line:55},1:{name:"(anonymous_1)",decl:{start:{line:61,column:12},end:{line:61,column:13}},loc:{start:{line:61,column:24},end:{line:65,column:5}},line:61},2:{name:"(anonymous_2)",decl:{start:{line:62,column:37},end:{line:62,column:38}},loc:{start:{line:62,column:44},end:{line:64,column:7}},line:62},3:{name:"(anonymous_3)",decl:{start:{line:66,column:12},end:{line:66,column:13}},loc:{start:{line:66,column:24},end:{line:89,column:5}},line:66},4:{name:"(anonymous_4)",decl:{start:{line:92,column:4},end:{line:92,column:5}},loc:{start:{line:92,column:20},end:{line:94,column:5}},line:92},5:{name:"(anonymous_5)",decl:{start:{line:95,column:4},end:{line:95,column:5}},loc:{start:{line:95,column:19},end:{line:97,column:5}},line:95}},branchMap:{0:{loc:{start:{line:96,column:13},end:{line:96,column:78}},type:"cond-expr",locations:[{start:{line:96,column:28},end:{line:96,column:46}},{start:{line:96,column:49},end:{line:96,column:78}}],line:96}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["ActivityEventTimeline.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityEventTimeline.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-timeline align-top dense>\n <div v-for=\"event in events\" :key=\"event.event + event.time\">\n <v-timeline-item small :color=\"genColor(event)\" :icon=\"genIcon(event)\">\n <v-row class=\"pt-1\">\n <v-col>\n <strong v-text=\"event.event\" />\n <i>\n {{ event.time | dateTime(utc) }}\n </i>\n <div v-show=\"event.message\" class=\"text-caption\">\n {{ event.message }}\n </div>\n </v-col>\n </v-row>\n </v-timeline-item>\n </div>\n </v-timeline>\n</template>\n\n<script>\nimport TimeFilters from '@/tools/Calendar/Filters/timeFilters.js'\n\nexport default {\n mixins: [TimeFilters],\n props: {\n activityEvents: {\n type: Array,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n events: function () {\n return this.activityEvents.map((e) => {\n return { event: e.event, time: new Date(e.time * 1000) }\n })\n },\n states: function () {\n return {\n completed: {\n icon: 'mdi-check-circle',\n color: 'success',\n },\n failed: {\n icon: 'mdi-alert',\n color: 'error',\n },\n updated: {\n icon: 'mdi-alert-circle',\n color: 'purple',\n },\n queued: {\n icon: 'mdi-alert-circle',\n color: 'warning',\n },\n created: {\n icon: 'mdi-check-circle',\n color: 'success',\n },\n }\n },\n },\n methods: {\n genColor(event) {\n return this.states[event.event].color\n },\n genIcon(event) {\n return event.commit ? 'mdi-content-save' : this.states[event.event].icon\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d8ec5b418b4f4375913e113ba7dadbb194d9c196"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return P=function(){return o},o}P();var q={mixins:[$],props:{activityEvents:{type:Array,required:!0},utc:{type:Boolean,required:!0}},data:function(){return P().f[0]++,P().s[0]++,{showUpdateDialog:!1}},computed:{events:function(){return P().f[1]++,P().s[1]++,this.activityEvents.map((function(n){return P().f[2]++,P().s[2]++,{event:n.event,time:new Date(1e3*n.time)}}))},states:function(){return P().f[3]++,P().s[3]++,{completed:{icon:"mdi-check-circle",color:"success"},failed:{icon:"mdi-alert",color:"error"},updated:{icon:"mdi-alert-circle",color:"purple"},queued:{icon:"mdi-alert-circle",color:"warning"},created:{icon:"mdi-check-circle",color:"success"}}}},methods:{genColor:function(n){return P().f[4]++,P().s[4]++,this.states[n.event].color},genIcon:function(n){return P().f[5]++,P().s[5]++,n.commit?(P().b[0][0]++,"mdi-content-save"):(P().b[0][1]++,this.states[n.event].icon)}}},H=q,Z=(0,k.Z)(H,U,L,!1,null,null,null),j=Z.exports,G=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateActivity.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v(" Update activity: "+n._s(n.activity.name)+"/"+n._s(n.activity.start)+" ")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-activity-icon"},on:{click:n.cancelActivity}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"activity-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"activity-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"activity-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"activity-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",[t("v-spacer"),t("v-btn",{attrs:{"data-test":"update-activity-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Activity type Input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-select",{attrs:{items:n.types,label:"Activity Type"},model:{value:n.kind,callback:function(e){n.kind=e},expression:"kind"}}),"COMMAND"===n.kind?t("div",[t("v-text-field",{attrs:{type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline run commands with cmd_no_hazardous_check","data-test":"activity-cmd"},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}})],1):"SCRIPT"===n.kind?t("div",[t("script-chooser",{staticClass:"my-1",on:{file:n.fileHandler},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}}),t("environment-chooser",{staticClass:"my-2",on:{selected:n.selectedHandler},model:{value:n.activityEnvironment,callback:function(e){n.activityEnvironment=e},expression:"activityEnvironment"}})],1):t("div",[t("span",{staticClass:"ma-2"},[n._v(" No required input ")])]),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-activity-cancel-btn"},on:{click:n.cancelActivity}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-activity-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateActivity.apply(null,arguments)}}},[n._v(" Update ")])],1)],1)])],1)],1)],1)])],1)},B=[],Y=t(5881),V=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("span",[n._v(" Select from Cosmos environment variables ")])]),t("v-row",{staticClass:"ma-0"},[t("v-select",{attrs:{"persistent-hint":"","return-object":"",label:"Select Environment Options",hint:"Inject Environment Variables",items:n.environmentItems},on:{change:n.addEnvironmentItem},scopedSlots:n._u([{key:"selection",fn:function(){return[t("div",[t("span",[n._v(" Select Environment Options ")])])]},proxy:!0},{key:"item",fn:function(e){var i=e.item;return[t("div",[t("span",{domProps:{textContent:n._s(i.key+"="+i.value)}})])]}}]),model:{value:n.deadSelect,callback:function(e){n.deadSelect=e},expression:"deadSelect"}})],1),t("div",{staticClass:"mt-2"}),t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")]),t("th",{staticClass:"text-right"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"new-metadata-icon"},on:{click:n.newEnvironment}},[n._v(" mdi-plus ")])],1)]}}])},[t("span",[n._v(" Add Environment ")])])],1)]),n._l(n.selected,(function(e,i){return[t("tr",{key:"tr-"+i},[t("td",[t("v-text-field",{attrs:{dense:"",type:"text",readonly:e.readonly,"data-test":"key-"+i},model:{value:e.key,callback:function(t){n.$set(e,"key",t)},expression:"env.key"}})],1),t("td",[t("v-text-field",{attrs:{dense:"",type:"text",readonly:e.readonly,"data-test":"value-"+i},model:{value:e.value,callback:function(t){n.$set(e,"value",t)},expression:"env.value"}})],1),t("td",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,a=e.attrs;return[t("div",n._g(n._b({},"div",a,!1),l),[t("v-icon",{attrs:{"data-test":"remove-env-icon-"+i},on:{click:function(e){return n.rm(i)}}},[n._v(" mdi-delete ")])],1)]}}],null,!0)},[t("span",[n._v(" Delete Environment ")])])],1)])]}))],2)])],1)},W=[],K={props:{value:{type:Array,required:!0}},data:function(){return{deadSelect:null,environmentOptions:[]}},mounted:function(){this.getEnvironment()},computed:{selected:{get:function(){return this.value},set:function(n){this.$emit("input",n)}},environmentItems:function(){var n=this;return this.environmentOptions.filter((function(e){return!n.selected.find((function(n){return n.key===e.key}))}))}},methods:{getEnvironment:function(){var n=this;C.get("/cosmos-api/environment").then((function(e){n.environmentOptions=e.data}))},addEnvironmentItem:function(n){this.selected.push({key:n.key,value:n.value,readonly:!0});var e=this.environmentOptions.findIndex((function(e){return e.key===n.key&&e.value===n.value}));this.environmentOptions.splice(e,e>=0?1:0),this.deadSelect=null},newEnvironment:function(){this.selected.push({key:"",value:"",readonly:!1})},rm:function(n){var e=this.selected.splice(n,1)[0];e&&e.readonly&&this.environmentOptions.push(e)}}},J=K,z=(0,k.Z)(J,V,W,!1,null,null,null),Q=z.exports,X=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("span",[n._v(" Select Cosmos script ")])]),t("v-row",{staticClass:"my-2"},[t("v-autocomplete",{staticClass:"mx-4",attrs:{"cache-items":"",flat:"","hide-no-data":"","hide-details":"","solo-inverted":"",label:"Select a script",loading:n.loading,items:n.items,"search-input":n.search},on:{"update:searchInput":function(e){n.search=e},"update:search-input":function(e){n.search=e}},model:{value:n.selected,callback:function(e){n.selected=e},expression:"selected"}})],1)],1)},nn=[],en=(t(4083),{props:{value:String},data:function(){return{loading:!1,search:"",selected:this.value,scripts:[],items:[]}},created:function(){var n=this;this.loading=!0,C.get("/script-api/scripts").then((function(e){n.scripts=e.data,n.items=e.data})).catch((function(e){n.$emit("error",{type:"error",text:"Failed to connect to Cosmos. ".concat(e),error:e})})),this.selected=this.value?this.value:null,this.loading=!1},watch:{selected:function(n,e){n!==e&&this.$emit("file",n)},search:function(n){n&&n!==this.selected&&this.querySelections(n)}},methods:{querySelections:function(n){var e=this;this.loading=!0,setTimeout((function(){e.items=e.scripts.filter((function(e){return(e||"").toLowerCase().indexOf((n||"").toLowerCase())>-1})),e.loading=!1}),500)}}}),tn=en,ln=(0,k.Z)(tn,X,nn,!1,null,null,null),an=ln.exports;function on(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityUpdateDialog.vue",e="6903b2509226021776678f3560d62d2bf4656b9d",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityUpdateDialog.vue",statementMap:{0:{start:{line:207,column:4},end:{line:221,column:5}},1:{start:{line:219,column:29},end:{line:219,column:50}},2:{start:{line:225,column:6},end:{line:225,column:25}},3:{start:{line:230,column:18},end:{line:230,column:28}},4:{start:{line:231,column:20},end:{line:231,column:69}},5:{start:{line:232,column:19},end:{line:232,column:66}},6:{start:{line:233,column:6},end:{line:235,column:7}},7:{start:{line:234,column:8},end:{line:234,column:93}},8:{start:{line:236,column:6},end:{line:238,column:7}},9:{start:{line:237,column:8},end:{line:237,column:68}},10:{start:{line:239,column:6},end:{line:241,column:7}},11:{start:{line:240,column:8},end:{line:240,column:64}},12:{start:{line:242,column:6},end:{line:242,column:17}},13:{start:{line:245,column:6},end:{line:247,column:7}},14:{start:{line:246,column:8},end:{line:246,column:48}},15:{start:{line:248,column:6},end:{line:248,column:17}},16:{start:{line:252,column:8},end:{line:252,column:25}},17:{start:{line:255,column:8},end:{line:255,column:34}},18:{start:{line:261,column:6},end:{line:263,column:7}},19:{start:{line:262,column:8},end:{line:262,column:14}},20:{start:{line:264,column:6},end:{line:264,column:27}},21:{start:{line:265,column:6},end:{line:265,column:28}},22:{start:{line:268,column:20},end:{line:268,column:56}},23:{start:{line:269,column:20},end:{line:269,column:55}},24:{start:{line:270,column:6},end:{line:270,column:50}},25:{start:{line:271,column:6},end:{line:271,column:48}},26:{start:{line:272,column:6},end:{line:272,column:49}},27:{start:{line:273,column:6},end:{line:273,column:47}},28:{start:{line:274,column:6},end:{line:274,column:50}},29:{start:{line:275,column:6},end:{line:275,column:64}},30:{start:{line:276,column:6},end:{line:276,column:63}},31:{start:{line:279,column:6},end:{line:279,column:46}},32:{start:{line:282,column:6},end:{line:282,column:53}},33:{start:{line:285,column:6},end:{line:285,column:28}},34:{start:{line:289,column:20},end:{line:291,column:7}},35:{start:{line:292,column:19},end:{line:294,column:7}},36:{start:{line:295,column:19},end:{line:295,column:42}},37:{start:{line:296,column:17},end:{line:296,column:58}},38:{start:{line:297,column:6},end:{line:297,column:36}},39:{start:{line:298,column:20},end:{line:298,column:38}},40:{start:{line:299,column:21},end:{line:299,column:40}},41:{start:{line:300,column:6},end:{line:310,column:8}},42:{start:{line:303,column:29},end:{line:305,column:9}},43:{start:{line:306,column:8},end:{line:309,column:10}},44:{start:{line:311,column:6},end:{line:311,column:25}},45:{start:{line:312,column:6},end:{line:312,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:206,column:2},end:{line:206,column:3}},loc:{start:{line:206,column:9},end:{line:222,column:3}},line:206},1:{name:"(anonymous_1)",decl:{start:{line:219,column:18},end:{line:219,column:19}},loc:{start:{line:219,column:29},end:{line:219,column:50}},line:219},2:{name:"(anonymous_2)",decl:{start:{line:224,column:10},end:{line:224,column:11}},loc:{start:{line:224,column:22},end:{line:226,column:5}},line:224},3:{name:"(anonymous_3)",decl:{start:{line:229,column:15},end:{line:229,column:16}},loc:{start:{line:229,column:27},end:{line:243,column:5}},line:229},4:{name:"(anonymous_4)",decl:{start:{line:244,column:15},end:{line:244,column:16}},loc:{start:{line:244,column:27},end:{line:249,column:5}},line:244},5:{name:"(anonymous_5)",decl:{start:{line:251,column:6},end:{line:251,column:7}},loc:{start:{line:251,column:12},end:{line:253,column:7}},line:251},6:{name:"(anonymous_6)",decl:{start:{line:254,column:6},end:{line:254,column:7}},loc:{start:{line:254,column:17},end:{line:256,column:7}},line:254},7:{name:"(anonymous_7)",decl:{start:{line:260,column:16},end:{line:260,column:17}},loc:{start:{line:260,column:37},end:{line:266,column:5}},line:260},8:{name:"(anonymous_8)",decl:{start:{line:267,column:18},end:{line:267,column:19}},loc:{start:{line:267,column:30},end:{line:277,column:5}},line:267},9:{name:"(anonymous_9)",decl:{start:{line:278,column:17},end:{line:278,column:18}},loc:{start:{line:278,column:34},end:{line:280,column:5}},line:278},10:{name:"(anonymous_10)",decl:{start:{line:281,column:21},end:{line:281,column:22}},loc:{start:{line:281,column:38},end:{line:283,column:5}},line:281},11:{name:"(anonymous_11)",decl:{start:{line:284,column:20},end:{line:284,column:21}},loc:{start:{line:284,column:32},end:{line:286,column:5}},line:284},12:{name:"(anonymous_12)",decl:{start:{line:287,column:20},end:{line:287,column:21}},loc:{start:{line:287,column:32},end:{line:313,column:5}},line:287},13:{name:"(anonymous_13)",decl:{start:{line:302,column:14},end:{line:302,column:15}},loc:{start:{line:302,column:28},end:{line:310,column:7}},line:302}},branchMap:{0:{loc:{start:{line:219,column:29},end:{line:219,column:50}},type:"binary-expr",locations:[{start:{line:219,column:29},end:{line:219,column:36}},{start:{line:219,column:40},end:{line:219,column:50}}],line:219},1:{loc:{start:{line:233,column:6},end:{line:235,column:7}},type:"if",locations:[{start:{line:233,column:6},end:{line:235,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:233},2:{loc:{start:{line:236,column:6},end:{line:238,column:7}},type:"if",locations:[{start:{line:236,column:6},end:{line:238,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:236},3:{loc:{start:{line:239,column:6},end:{line:241,column:7}},type:"if",locations:[{start:{line:239,column:6},end:{line:241,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:239},4:{loc:{start:{line:245,column:6},end:{line:247,column:7}},type:"if",locations:[{start:{line:245,column:6},end:{line:247,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:245},5:{loc:{start:{line:245,column:10},end:{line:245,column:55}},type:"binary-expr",locations:[{start:{line:245,column:10},end:{line:245,column:33}},{start:{line:245,column:37},end:{line:245,column:55}}],line:245},6:{loc:{start:{line:261,column:6},end:{line:263,column:7}},type:"if",locations:[{start:{line:261,column:6},end:{line:263,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:261},7:{loc:{start:{line:279,column:26},end:{line:279,column:46}},type:"cond-expr",locations:[{start:{line:279,column:34},end:{line:279,column:39}},{start:{line:279,column:42},end:{line:279,column:46}}],line:279},8:{loc:{start:{line:282,column:33},end:{line:282,column:53}},type:"cond-expr",locations:[{start:{line:282,column:41},end:{line:282,column:46}},{start:{line:282,column:49},end:{line:282,column:53}}],line:282}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,sources:["ActivityUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog v-model="show" width="600">\n <v-card>\n <form v-on:submit.prevent="updateActivity">\n <v-system-bar>\n <v-spacer />\n <span>\n Update activity: {{ activity.name }}/{{ activity.start }}\n </span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-activity-icon" @click="cancelActivity">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-3">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="update-activity-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n\n <v-stepper-step editable step="2">\n Activity type Input\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-3">\n <v-select v-model="kind" :items="types" label="Activity Type" />\n <div v-if="kind === \'COMMAND\'">\n <v-text-field\n v-model="activityData"\n type="text"\n label="Command Input"\n placeholder="INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0"\n prefix="cmd(\'"\n suffix="\')"\n hint="Timeline run commands with cmd_no_hazardous_check"\n data-test="activity-cmd"\n />\n </div>\n <div v-else-if="kind === \'SCRIPT\'">\n <script-chooser\n class="my-1"\n v-model="activityData"\n @file="fileHandler"\n />\n <environment-chooser\n class="my-2"\n v-model="activityEnvironment"\n @selected="selectedHandler"\n />\n </div>\n <div v-else>\n <span class="ma-2"> No required input </span>\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="cancelActivity"\n outlined\n class="mx-2"\n data-test="update-activity-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateActivity"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-activity-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Update\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentChooser from \'@cosmosc2/tool-common/src/components/EnvironmentChooser\'\nimport ScriptChooser from \'@cosmosc2/tool-common/src/components/ScriptChooser\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\n\nexport default {\n components: {\n EnvironmentChooser,\n ScriptChooser,\n },\n props: {\n activity: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n kind: \'\',\n types: [\'COMMAND\', \'SCRIPT\', \'RESERVE\'],\n activityData: \'\',\n activityEnvironment: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n this.updateValues()\n },\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Activity must have different start and stop times.\'\n }\n if (now > start) {\n return \'Invalid start time. Activity must be in the future.\'\n }\n if (start > stop) {\n return \'Invalid start time. Activity start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (this.kind !== \'RESERVE\' && !this.activityData) {\n return \'No data is selected or inputted\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n changeKind: function (inputKind) {\n if (inputKind === this.kind) {\n return\n }\n this.kind = inputKind\n this.activityData = \'\'\n },\n updateValues: function () {\n const sDate = new Date(this.activity.start * 1000)\n const eDate = new Date(this.activity.stop * 1000)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.stopDate = format(eDate, \'yyyy-MM-dd\')\n this.stopTime = format(eDate, \'HH:mm:ss\')\n this.kind = this.activity.kind.toUpperCase()\n this.activityData = this.activity.data[this.activity.kind]\n this.activityEnvironment = this.activity.data.environment\n },\n fileHandler: function (event) {\n this.activityData = event ? event : null\n },\n selectedHandler: function (event) {\n this.activityEnvironment = event ? event : null\n },\n cancelActivity: function () {\n this.show = !this.show\n },\n updateActivity: function () {\n // Call the api to update the activity\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const kind = this.kind.toLowerCase()\n let data = { environment: this.activityEnvironment }\n data[kind] = this.activityData\n const tName = this.activity.name\n const aStart = this.activity.start\n Api.put(`/cosmos-api/timeline/${tName}/activity/${aStart}`, {\n data: { start, stop, kind, data },\n }).then((response) => {\n const activityTime = this.generateDateTime(\n new Date(response.data.start * 1000)\n )\n this.$notify.normal({\n title: \'Updated Activity\',\n body: `${activityTime} (${response.data.start}) on timeline: ${response.data.name}`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6903b2509226021776678f3560d62d2bf4656b9d"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return on=function(){return o},o}on();var sn={components:{EnvironmentChooser:Q,ScriptChooser:an},props:{activity:{type:Object,required:!0},value:Boolean},mixins:[$],data:function(){return on().f[0]++,on().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:function(n){return on().f[1]++,on().s[1]++,on().b[0][0]++,!!n||(on().b[0][1]++,"Required")}}}},watch:{show:function(){on().f[2]++,on().s[2]++,this.updateValues()}},computed:{timeError:function(){on().f[3]++;var n=(on().s[3]++,new Date),e=(on().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),t=(on().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return on().s[6]++,e===t?(on().b[1][0]++,on().s[7]++,"Invalid start, stop time. Activity must have different start and stop times."):(on().b[1][1]++,on().s[8]++,n>e?(on().b[2][0]++,on().s[9]++,"Invalid start time. Activity must be in the future."):(on().b[2][1]++,on().s[10]++,e>t?(on().b[3][0]++,on().s[11]++,"Invalid start time. Activity start before stop."):(on().b[3][1]++,on().s[12]++,null)))},typeError:function(){return on().f[4]++,on().s[13]++,on().b[5][0]++,"RESERVE"===this.kind||(on().b[5][1]++,this.activityData)?(on().b[4][1]++,on().s[15]++,null):(on().b[4][0]++,on().s[14]++,"No data is selected or inputted")},show:{get:function(){return on().f[5]++,on().s[16]++,this.value},set:function(n){on().f[6]++,on().s[17]++,this.$emit("input",n)}}},methods:{changeKind:function(n){if(on().f[7]++,on().s[18]++,n===this.kind)return on().b[6][0]++,void on().s[19]++;on().b[6][1]++,on().s[20]++,this.kind=n,on().s[21]++,this.activityData=""},updateValues:function(){on().f[8]++;var n=(on().s[22]++,new Date(1e3*this.activity.start)),e=(on().s[23]++,new Date(1e3*this.activity.stop));on().s[24]++,this.startDate=(0,Y.Z)(n,"yyyy-MM-dd"),on().s[25]++,this.startTime=(0,Y.Z)(n,"HH:mm:ss"),on().s[26]++,this.stopDate=(0,Y.Z)(e,"yyyy-MM-dd"),on().s[27]++,this.stopTime=(0,Y.Z)(e,"HH:mm:ss"),on().s[28]++,this.kind=this.activity.kind.toUpperCase(),on().s[29]++,this.activityData=this.activity.data[this.activity.kind],on().s[30]++,this.activityEnvironment=this.activity.data.environment},fileHandler:function(n){on().f[9]++,on().s[31]++,this.activityData=n?(on().b[7][0]++,n):(on().b[7][1]++,null)},selectedHandler:function(n){on().f[10]++,on().s[32]++,this.activityEnvironment=n?(on().b[8][0]++,n):(on().b[8][1]++,null)},cancelActivity:function(){on().f[11]++,on().s[33]++,this.show=!this.show},updateActivity:function(){var n=this;on().f[12]++;var e=(on().s[34]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(on().s[35]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),i=(on().s[36]++,this.kind.toLowerCase()),l=(on().s[37]++,{environment:this.activityEnvironment});on().s[38]++,l[i]=this.activityData;var a=(on().s[39]++,this.activity.name),o=(on().s[40]++,this.activity.start);on().s[41]++,C.put("/cosmos-api/timeline/".concat(a,"/activity/").concat(o),{data:{start:e,stop:t,kind:i,data:l}}).then((function(e){on().f[13]++;var t=(on().s[42]++,n.generateDateTime(new Date(1e3*e.data.start)));on().s[43]++,n.$notify.normal({title:"Updated Activity",body:"".concat(t," (").concat(e.data.start,") on timeline: ").concat(e.data.name)})})),on().s[44]++,this.$emit("close"),on().s[45]++,this.show=!this.show}}},rn=sn,cn=(t(2084),(0,k.Z)(rn,G,B,!1,null,"6c8065d7",null)),un=cn.exports;function mn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventForm.vue",e="bc1daacf3f4fb326f50dffbd7f6da6ef93a6dd61",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventForm.vue",statementMap:{0:{start:{line:134,column:4},end:{line:136,column:5}},1:{start:{line:140,column:6},end:{line:140,column:76}},2:{start:{line:143,column:6},end:{line:145,column:28}},3:{start:{line:148,column:6},end:{line:148,column:52}},4:{start:{line:151,column:6},end:{line:151,column:45}},5:{start:{line:154,column:6},end:{line:154,column:45}},6:{start:{line:157,column:6},end:{line:157,column:57}},7:{start:{line:160,column:6},end:{line:160,column:47}},8:{start:{line:163,column:6},end:{line:166,column:7}},9:{start:{line:169,column:16},end:{line:169,column:74}},10:{start:{line:170,column:6},end:{line:170,column:24}},11:{start:{line:175,column:6},end:{line:175,column:25}},12:{start:{line:178,column:6},end:{line:178,column:52}},13:{start:{line:181,column:27},end:{line:181,column:74}},14:{start:{line:182,column:28},end:{line:182,column:61}},15:{start:{line:183,column:27},end:{line:183,column:59}},16:{start:{line:184,column:6},end:{line:211,column:10}},17:{start:{line:193,column:10},end:{line:195,column:11}},18:{start:{line:198,column:10},end:{line:201,column:12}},19:{start:{line:202,column:10},end:{line:202,column:29}},20:{start:{line:205,column:10},end:{line:210,column:11}},21:{start:{line:206,column:12},end:{line:209,column:14}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:9},end:{line:137,column:3}},line:133},1:{name:"(anonymous_1)",decl:{start:{line:139,column:24},end:{line:139,column:25}},loc:{start:{line:139,column:36},end:{line:141,column:5}},line:139},2:{name:"(anonymous_2)",decl:{start:{line:142,column:23},end:{line:142,column:24}},loc:{start:{line:142,column:35},end:{line:146,column:5}},line:142},3:{name:"(anonymous_3)",decl:{start:{line:147,column:25},end:{line:147,column:26}},loc:{start:{line:147,column:37},end:{line:149,column:5}},line:147},4:{name:"(anonymous_4)",decl:{start:{line:150,column:18},end:{line:150,column:19}},loc:{start:{line:150,column:30},end:{line:152,column:5}},line:150},5:{name:"(anonymous_5)",decl:{start:{line:153,column:18},end:{line:153,column:19}},loc:{start:{line:153,column:30},end:{line:155,column:5}},line:153},6:{name:"(anonymous_6)",decl:{start:{line:156,column:25},end:{line:156,column:26}},loc:{start:{line:156,column:37},end:{line:158,column:5}},line:156},7:{name:"(anonymous_7)",decl:{start:{line:159,column:20},end:{line:159,column:21}},loc:{start:{line:159,column:32},end:{line:161,column:5}},line:159},8:{name:"(anonymous_8)",decl:{start:{line:162,column:13},end:{line:162,column:14}},loc:{start:{line:162,column:25},end:{line:167,column:5}},line:162},9:{name:"(anonymous_9)",decl:{start:{line:168,column:16},end:{line:168,column:17}},loc:{start:{line:168,column:28},end:{line:171,column:5}},line:168},10:{name:"(anonymous_10)",decl:{start:{line:174,column:11},end:{line:174,column:12}},loc:{start:{line:174,column:23},end:{line:176,column:5}},line:174},11:{name:"(anonymous_11)",decl:{start:{line:177,column:18},end:{line:177,column:19}},loc:{start:{line:177,column:30},end:{line:179,column:5}},line:177},12:{name:"(anonymous_12)",decl:{start:{line:180,column:18},end:{line:180,column:19}},loc:{start:{line:180,column:30},end:{line:212,column:5}},line:180},13:{name:"(anonymous_13)",decl:{start:{line:192,column:14},end:{line:192,column:15}},loc:{start:{line:192,column:26},end:{line:196,column:9}},line:192},14:{name:"(anonymous_14)",decl:{start:{line:197,column:14},end:{line:197,column:15}},loc:{start:{line:197,column:28},end:{line:203,column:9}},line:197},15:{name:"(anonymous_15)",decl:{start:{line:204,column:15},end:{line:204,column:16}},loc:{start:{line:204,column:26},end:{line:211,column:9}},line:204}},branchMap:{0:{loc:{start:{line:140,column:13},end:{line:140,column:76}},type:"cond-expr",locations:[{start:{line:140,column:55},end:{line:140,column:64}},{start:{line:140,column:67},end:{line:140,column:76}}],line:140},1:{loc:{start:{line:143,column:13},end:{line:145,column:28}},type:"cond-expr",locations:[{start:{line:144,column:10},end:{line:144,column:28}},{start:{line:145,column:10},end:{line:145,column:28}}],line:143},2:{loc:{start:{line:164,column:8},end:{line:165,column:63}},type:"binary-expr",locations:[{start:{line:164,column:8},end:{line:164,column:52}},{start:{line:165,column:8},end:{line:165,column:63}}],line:164},3:{loc:{start:{line:205,column:10},end:{line:210,column:11}},type:"if",locations:[{start:{line:205,column:10},end:{line:210,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:205}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,sources:["ActivityEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+GA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title>\n <span v-text="activityEvent.name" />\n <v-spacer />\n <v-icon>\n {{ activityBadgeIcon }}\n </v-icon>\n </v-card-title>\n <v-card-subtitle>\n <span>\n {{ activityEvent.start | dateTime(utc) }}\n </span>\n <br />\n <span>\n {{ activityEvent.end | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-col class="pa-0">\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left" width="100">Fulfilled</th>\n <td v-text="activityFulfillment" />\n </tr>\n <tr>\n <th class="text-left" v-text="activityKind" />\n <td v-text="activityData[activityKind]" />\n </tr>\n <tr v-if="showEnv">\n <th class="text-left">ENV</th>\n <td v-text="activityEnvironment" />\n </tr>\n </tbody>\n </v-simple-table>\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <activity-event-timeline\n :activity-events="activityEvents"\n :utc="utc"\n />\n </v-col>\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions>\n <div v-if="!activityEvent.fulfillment">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-activity" @click="updateDialog">\n <v-icon> mdi-pencil </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n </div>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-activity" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <activity-update-dialog\n v-model="showUpdateDialog"\n :activity="activityEvent.activity"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ActivityEventTimeline from \'@/tools/Calendar/Forms/ActivityEventTimeline\'\nimport ActivityUpdateDialog from \'@/tools/Calendar/Dialogs/ActivityUpdateDialog\'\n\nexport default {\n components: {\n ActivityEventTimeline,\n ActivityUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n activityEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n activityBadgeColor: function () {\n return this.activityEvent.activity.fulfillment ? \'#4caf50\' : \'#ff5252\'\n },\n activityBadgeIcon: function () {\n return this.activityEvent.activity.fulfillment\n ? \'mdi-check-circle\'\n : \'mdi-close-circle\'\n },\n activityFulfillment: function () {\n return this.activityEvent.activity.fulfillment\n },\n activityData: function () {\n return this.activityEvent.activity.data\n },\n activityKind: function () {\n return this.activityEvent.activity.kind\n },\n activityEnvironment: function () {\n return this.activityEvent.activity.data.environment\n },\n activityEvents: function () {\n return this.activityEvent.activity.events\n },\n showEnv: function () {\n return (\n this.activityEvent.activity.data.environment &&\n this.activityEvent.activity.data.environment.length > 0\n )\n },\n updated_at: function () {\n const v = parseInt(this.activityEvent.activity.updated_at / 1000000)\n return new Date(v)\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const activityTime = this.generateDateTime(this.activityEvent.start)\n const activityStart = this.activityEvent.activity.start\n const timelineName = this.activityEvent.activity.name\n this.$dialog\n .confirm(\n `Are you sure you want to remove activity: ${activityTime} (${activityStart}) from timeline: ${timelineName}`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(\n `/cosmos-api/timeline/${timelineName}/activity/${activityStart}`\n )\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Activity from Timeline\',\n body: `Deleted activity: ${activityTime} (${activityStart}) from timeline: ${timelineName}`,\n })\n this.$emit(\'close\')\n })\n .catch((error) => {\n if (error) {\n this.$notify.error({\n title: \'Failed to Deleted Activity from Timeline\',\n body: `Failed to delete activity ${activityStart} from timeline: ${timelineName}. Error: ${error}`,\n })\n }\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bc1daacf3f4fb326f50dffbd7f6da6ef93a6dd61"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return mn=function(){return o},o}mn();var dn={components:{ActivityEventTimeline:j,ActivityUpdateDialog:un},mixins:[$],props:{activityEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return mn().f[0]++,mn().s[0]++,{showUpdateDialog:!1}},computed:{activityBadgeColor:function(){return mn().f[1]++,mn().s[1]++,this.activityEvent.activity.fulfillment?(mn().b[0][0]++,"#4caf50"):(mn().b[0][1]++,"#ff5252")},activityBadgeIcon:function(){return mn().f[2]++,mn().s[2]++,this.activityEvent.activity.fulfillment?(mn().b[1][0]++,"mdi-check-circle"):(mn().b[1][1]++,"mdi-close-circle")},activityFulfillment:function(){return mn().f[3]++,mn().s[3]++,this.activityEvent.activity.fulfillment},activityData:function(){return mn().f[4]++,mn().s[4]++,this.activityEvent.activity.data},activityKind:function(){return mn().f[5]++,mn().s[5]++,this.activityEvent.activity.kind},activityEnvironment:function(){return mn().f[6]++,mn().s[6]++,this.activityEvent.activity.data.environment},activityEvents:function(){return mn().f[7]++,mn().s[7]++,this.activityEvent.activity.events},showEnv:function(){return mn().f[8]++,mn().s[8]++,mn().b[2][0]++,this.activityEvent.activity.data.environment&&(mn().b[2][1]++,this.activityEvent.activity.data.environment.length>0)},updated_at:function(){mn().f[9]++;var n=(mn().s[9]++,parseInt(this.activityEvent.activity.updated_at/1e6));return mn().s[10]++,new Date(n)}},methods:{close:function(){mn().f[10]++,mn().s[11]++,this.$emit("close")},updateDialog:function(){mn().f[11]++,mn().s[12]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;mn().f[12]++;var e=(mn().s[13]++,this.generateDateTime(this.activityEvent.start)),t=(mn().s[14]++,this.activityEvent.activity.start),i=(mn().s[15]++,this.activityEvent.activity.name);mn().s[16]++,this.$dialog.confirm("Are you sure you want to remove activity: ".concat(e," (").concat(t,") from timeline: ").concat(i),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return mn().f[13]++,mn().s[17]++,C["delete"]("/cosmos-api/timeline/".concat(i,"/activity/").concat(t))})).then((function(l){mn().f[14]++,mn().s[18]++,n.$notify.normal({title:"Deleted Activity from Timeline",body:"Deleted activity: ".concat(e," (").concat(t,") from timeline: ").concat(i)}),mn().s[19]++,n.$emit("close")})).catch((function(e){mn().f[15]++,mn().s[20]++,e?(mn().b[3][0]++,mn().s[21]++,n.$notify.error({title:"Failed to Deleted Activity from Timeline",body:"Failed to delete activity ".concat(t," from timeline: ").concat(i,". Error: ").concat(e)})):mn().b[3][1]++}))}}},An=dn,vn=(t(3424),(0,k.Z)(An,I,O,!1,null,"e57e7e4c",null)),pn=vn.exports,hn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",{domProps:{textContent:n._s(n.title)}}),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.metadataEvent.start,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-col",{staticClass:"pa-0"},[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")])]),n._l(n.metadataValues,(function(e,i){return[t("tr",{key:"tr-"+i},[t("td",{staticClass:"text-left"},[t("span",{domProps:{textContent:n._s(e.key)}})]),t("td",{staticClass:"text-left"},[t("span",{domProps:{textContent:n._s(e.value)}})])])]}))],2)])],1)],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",{staticClass:"pa-1"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"update-metadata"},on:{click:n.updateDialog}},[t("v-icon",[n._v("mdi-pencil")])],1)],1)]}}])},[t("span",[n._v(" Update ")])]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"delete-metadata"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("metadata-update-dialog",{attrs:{"metadata-obj":n.metadataEvent.metadata},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},Cn=[],fn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateMetadata.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Update Chronicle Metadata")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-metadata-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.targets,label:"Target"},model:{value:n.target,callback:function(e){n.target=e},expression:"target"}}),t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-metadata-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Metadata input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",{staticStyle:{"min-height":"200px"}},[t("metadata-input-form",{model:{value:n.metadata,callback:function(e){n.metadata=e},expression:"metadata"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-metadata-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-metadata-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateMetadata.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},yn=[],bn=(t(3108),t(570)),gn=t(7475),_n=t(3696),wn=(t(1372),t(1245),function(){function n(){(0,f.Z)(this,n),(0,_n.Z)(this,"id",1)}return(0,y.Z)(n,[{key:"exec",value:function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t){var i,l,a,o=arguments;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=o.length>2&&void 0!==o[2]?o[2]:{},n.prev=1,n.next=4,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 4:n.next=9;break;case 6:n.prev=6,n.t0=n["catch"](1),CosmosAuth.login();case 9:return this.id=this.id+1,n.prev=10,i["scope"]=localStorage.scope,n.next=14,A.post("/cosmos-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.cosmosToken,"Content-Type":"application/json-rpc"}});case 14:return l=n.sent,n.abrupt("return",l.data.result);case 18:throw n.prev=18,n.t1=n["catch"](10),a=new Error,n.t1.response?(a.name=n.t1.response.data.error.data.class,a.message=n.t1.response.data.error.data.message):n.t1.request?(a.name="Request error",a.message="Request error, no response received"):a.name="Unknown error",a;case 23:case"end":return n.stop()}}),n,this,[[1,6],[10,18]])})));function e(e,t){return n.apply(this,arguments)}return e}()},{key:"decode_cosmos_type",value:function(n){if(null!==n&&"object"===(0,gn.Z)(n)&&"Float"==n.json_class&&n.raw){if("NaN"==n.raw)return NaN;if("Infinity"==n.raw)return 1/0;if("-Infinity"==n.raw)return-1/0}return null}},{key:"encode_cosmos_type",value:function(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"connect_interface",value:function(n){return this.exec("connect_interface",[n])}},{key:"disconnect_interface",value:function(n){return this.exec("disconnect_interface",[n])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(n){return this.exec("connect_router",[n])}},{key:"disconnect_router",value:function(n){return this.exec("disconnect_router",[n])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_all_cmd_info",value:function(){return this.exec("get_all_cmd_info",[])}},{key:"get_all_tlm_info",value:function(){return this.exec("get_all_tlm_info",[])}},{key:"get_item",value:function(n,e,t){return this.exec("get_item",[n,e,t])}},{key:"get_parameter",value:function(n,e,t){return this.exec("get_parameter",[n,e,t])}},{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(n){return this.exec("start_cmd_log",[n])}},{key:"start_tlm_log",value:function(n){return this.exec("start_tlm_log",[n])}},{key:"stop_cmd_log",value:function(n){return this.exec("stop_cmd_log",[n])}},{key:"stop_tlm_log",value:function(n){return this.exec("stop_tlm_log",[n])}},{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(n){return this.exec("set_limits_set",[n])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(n){return this.exec("start_background_task",[n])}},{key:"stop_background_task",value:function(n){return this.exec("stop_background_task",[n])}},{key:"get_oldest_logfile",value:function(){return this.exec("get_oldest_logfile",[])}},{key:"get_target",value:function(n){return this.exec("get_target",[n])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(n,e){return this.exec("get_telemetry",[n,e])}},{key:"get_all_telemetry",value:function(n){return this.exec("get_all_telemetry",[n])}},{key:"get_tlm_packet",value:function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t,i){var l,a,o,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("get_tlm_packet",[e,t],{type:i});case 2:if(l=n.sent,null!=l)for(a=l.length,o=null,s=0;s<a;s++)o=this.decode_cosmos_type(l[s][1]),null!==o&&(l[s][1]=o);return n.abrupt("return",l);case 5:case"end":return n.stop()}}),n,this)})));function e(e,t,i){return n.apply(this,arguments)}return e}()},{key:"get_packet_derived_items",value:function(n,e){return this.exec("get_packet_derived_items",[n,e])}},{key:"get_tlm_buffer",value:function(n,e){return this.exec("get_tlm_buffer",[n,e])}},{key:"get_tlm_values",value:function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e){var t,i,l,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("get_tlm_values",[e]);case 2:for(t=n.sent,i=t[0].length,l=null,a=0;a<i;a++)l=this.decode_cosmos_type(t[0][a]),null!==l&&(t[0][a]=l);return n.abrupt("return",t);case 7:case"end":return n.stop()}}),n,this)})));function e(e){return n.apply(this,arguments)}return e}()},{key:"get_limits",value:function(n,e,t){return this.exec("get_limits",[n,e,t])}},{key:"tlm",value:function(){var n=(0,s.Z)(regeneratorRuntime.mark((function n(e,t,i){var l,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("tlm",[e,t,i]);case 2:return l=n.sent,a=this.decode_cosmos_type(l),null!==a&&(0,bn.Z)("data"),n.abrupt("return",l);case 6:case"end":return n.stop()}}),n,this)})));function e(e,t,i){return n.apply(this,arguments)}return e}()},{key:"get_all_commands",value:function(n){return this.exec("get_all_commands",[n])}},{key:"get_command",value:function(n,e){return this.exec("get_command",[n,e])}},{key:"get_cmd_value",value:function(n,e,t){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[n,e,t,i])}},{key:"get_cmd_buffer",value:function(n,e){return this.exec("get_cmd_buffer",[n,e])}},{key:"_cmd",value:function(n,e,t,i){var l=null;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(l=this.encode_cosmos_type(i[a]),null!==l&&(i[a]=l));return this.exec(n,[e,t,i])}},{key:"get_cmd_hazardous",value:function(n,e,t){return void 0===e?this.exec("get_cmd_hazardous",n):this._cmd("get_cmd_hazardous",n,e,t)}},{key:"cmd",value:function(n,e,t){return void 0===e?this.exec("cmd",n):this._cmd("cmd",n,e,t)}},{key:"cmd_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_range_check",n):this._cmd("cmd_no_range_check",n,e,t)}},{key:"cmd_raw",value:function(n,e,t){return void 0===e?this.exec("cmd_raw",n):this._cmd("cmd_raw",n,e,t)}},{key:"cmd_raw_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_range_check",n):this._cmd("cmd_raw_no_range_check",n,e,t)}},{key:"cmd_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_hazardous_check",n):this._cmd("cmd_no_hazardous_check",n,e,t)}},{key:"cmd_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_no_checks",n):this._cmd("cmd_no_checks",n,e,t)}},{key:"cmd_raw_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_hazardous_check",n):this._cmd("cmd_raw_no_hazardous_check",n,e,t)}},{key:"cmd_raw_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_checks",n):this._cmd("cmd_raw_no_checks",n,e,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(n,e){return this.exec("send_raw",[n,e])}},{key:"list_configs",value:function(n){return this.exec("list_configs",[n])}},{key:"load_config",value:function(n,e){return this.exec("load_config",[n,e])}},{key:"save_config",value:function(n,e,t){return this.exec("save_config",[n,e,t])}},{key:"delete_config",value:function(n,e){return this.exec("delete_config",[n,e])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(n){return this.exec("get_overall_limits_state",[n])}},{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(n){return this.exec("get_setting",[n])}},{key:"get_settings",value:function(n){return this.exec("get_settings",n)}},{key:"save_setting",value:function(n,e){return this.exec("save_setting",[n,e])}}]),n}()),xn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-select",{attrs:{items:n.swatches,label:"Color"},scopedSlots:n._u([{key:"selection",fn:function(e){var i=e.item;return[t("div",[t("v-badge",{attrs:{inline:"",color:i}},[t("span",{domProps:{textContent:n._s(i)}})])],1)]}},{key:"item",fn:function(e){var i=e.item;return[t("div",[t("v-badge",{attrs:{inline:"",color:i}},[t("span",{domProps:{textContent:n._s(i)}})])],1)]}}]),model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1)},Tn=[];function kn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ColorSelectForm.vue",e="995b0e83bb39dfd948cb9f56dd7d9f3a8100edf3",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ColorSelectForm.vue",statementMap:{0:{start:{line:51,column:4},end:{line:51,column:13}},1:{start:{line:56,column:8},end:{line:56,column:25}},2:{start:{line:59,column:8},end:{line:59,column:34}},3:{start:{line:63,column:6},end:{line:76,column:7}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:9},end:{line:52,column:3}},line:50},1:{name:"(anonymous_1)",decl:{start:{line:55,column:6},end:{line:55,column:7}},loc:{start:{line:55,column:12},end:{line:57,column:7}},line:55},2:{name:"(anonymous_2)",decl:{start:{line:58,column:6},end:{line:58,column:7}},loc:{start:{line:58,column:17},end:{line:60,column:7}},line:58},3:{name:"(anonymous_3)",decl:{start:{line:62,column:14},end:{line:62,column:15}},loc:{start:{line:62,column:26},end:{line:77,column:5}},line:62}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0,2:0,3:0},b:{},inputSourceMap:{version:3,sources:["ColorSelectForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ColorSelectForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-select v-model=\"color\" :items=\"swatches\" label=\"Color\">\n <template v-slot:selection=\"{ item }\">\n <div>\n <v-badge inline :color=\"item\">\n <span v-text=\"item\" />\n </v-badge>\n </div>\n </template>\n <template v-slot:item=\"{ item }\">\n <div>\n <v-badge inline :color=\"item\">\n <span v-text=\"item\" />\n </v-badge>\n </div>\n </template>\n </v-select>\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: String,\n required: true,\n },\n },\n data() {\n return {}\n },\n computed: {\n color: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n swatches: function () {\n return [\n '#005a8f',\n '#003784',\n '#8F3400',\n '#df1368',\n '#ff5252',\n '#df323b',\n '#9f0010',\n '#2d9437',\n '#004700',\n '#db7200',\n '#802700',\n '#0f2941',\n ]\n },\n },\n methods: {},\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"995b0e83bb39dfd948cb9f56dd7d9f3a8100edf3"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return kn=function(){return o},o}kn();var En={components:{},props:{value:{type:String,required:!0}},data:function(){return kn().f[0]++,kn().s[0]++,{}},computed:{color:{get:function(){return kn().f[1]++,kn().s[1]++,this.value},set:function(n){kn().f[2]++,kn().s[2]++,this.$emit("input",n)}},swatches:function(){return kn().f[3]++,kn().s[3]++,["#005a8f","#003784","#8F3400","#df1368","#ff5252","#df323b","#9f0010","#2d9437","#004700","#db7200","#802700","#0f2941"]}},methods:{}},Dn=En,Sn=(0,k.Z)(Dn,xn,Tn,!1,null,null,null),Mn=Sn.exports,Fn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")]),t("th",{staticClass:"text-right"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"new-metadata-icon"},on:{click:n.newMetadata}},[n._v(" mdi-plus ")])],1)]}}])},[t("span",[n._v(" New Metadata ")])])],1)]),n._l(n.metadata,(function(e,i){return[t("tr",{key:"tr-"+i},[t("td",[t("v-text-field",{attrs:{type:"text",dense:"","data-test":"key-"+i},model:{value:e.key,callback:function(t){n.$set(e,"key",t)},expression:"meta.key"}})],1),t("td",[t("v-text-field",{attrs:{type:"text",dense:"","data-test":"value-"+i},model:{value:e.value,callback:function(t){n.$set(e,"value",t)},expression:"meta.value"}})],1),t("td",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,a=e.attrs;return[t("div",n._g(n._b({},"div",a,!1),l),[t("v-icon",{attrs:{"data-test":"delete-metadata-icon-"+i},on:{click:function(e){return n.rm(i)}}},[n._v(" mdi-delete ")])],1)]}}],null,!0)},[t("span",[n._v(" Delete Metadata ")])])],1)])]}))],2)])],1)},Nn=[];function In(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataInputForm.vue",e="6ddd216607570368cb9c05b6e9aef180321355c2",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataInputForm.vue",statementMap:{0:{start:{line:90,column:4},end:{line:90,column:13}},1:{start:{line:95,column:8},end:{line:95,column:25}},2:{start:{line:98,column:8},end:{line:98,column:34}},3:{start:{line:104,column:6},end:{line:107,column:8}},4:{start:{line:110,column:6},end:{line:110,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:89,column:2},end:{line:89,column:3}},loc:{start:{line:89,column:9},end:{line:91,column:3}},line:89},1:{name:"(anonymous_1)",decl:{start:{line:94,column:6},end:{line:94,column:7}},loc:{start:{line:94,column:12},end:{line:96,column:7}},line:94},2:{name:"(anonymous_2)",decl:{start:{line:97,column:6},end:{line:97,column:7}},loc:{start:{line:97,column:17},end:{line:99,column:7}},line:97},3:{name:"(anonymous_3)",decl:{start:{line:103,column:17},end:{line:103,column:18}},loc:{start:{line:103,column:29},end:{line:108,column:5}},line:103},4:{name:"(anonymous_4)",decl:{start:{line:109,column:8},end:{line:109,column:9}},loc:{start:{line:109,column:25},end:{line:111,column:5}},line:109}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},inputSourceMap:{version:3,sources:["MetadataInputForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataInputForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left">Key</th>\n <th class="text-left">Value</th>\n <th class="text-right">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="new-metadata-icon" @click="newMetadata">\n mdi-plus\n </v-icon>\n </div>\n </template>\n <span> New Metadata </span>\n </v-tooltip>\n </th>\n </tr>\n <template v-for="(meta, i) in metadata">\n <tr :key="`tr-${i}`">\n <td>\n <v-text-field\n v-model="meta.key"\n type="text"\n dense\n :data-test="`key-${i}`"\n />\n </td>\n <td>\n <v-text-field\n v-model="meta.value"\n type="text"\n dense\n :data-test="`value-${i}`"\n />\n </td>\n <td>\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon\n :data-test="`delete-metadata-icon-${i}`"\n @click="rm(i)"\n >\n mdi-delete\n </v-icon>\n </div>\n </template>\n <span> Delete Metadata </span>\n </v-tooltip>\n </td>\n </tr>\n </template>\n </tbody>\n </v-simple-table>\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: Array,\n required: true,\n },\n },\n data() {\n return {}\n },\n computed: {\n metadata: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n newMetadata: function () {\n this.metadata.push({\n key: \'\',\n value: \'\',\n })\n },\n rm: function (index) {\n this.metadata.splice(index, 1)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ddd216607570368cb9c05b6e9aef180321355c2"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return In=function(){return o},o}In();var On={components:{},props:{value:{type:Array,required:!0}},data:function(){return In().f[0]++,In().s[0]++,{}},computed:{metadata:{get:function(){return In().f[1]++,In().s[1]++,this.value},set:function(n){In().f[2]++,In().s[2]++,this.$emit("input",n)}}},methods:{newMetadata:function(){In().f[3]++,In().s[3]++,this.metadata.push({key:"",value:""})},rm:function(n){In().f[4]++,In().s[4]++,this.metadata.splice(n,1)}}},Rn=On,$n=(0,k.Z)(Rn,Fn,Nn,!1,null,null,null),Un=$n.exports;function Ln(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataUpdateDialog.vue",e="ec93f91f025701f2258a261778819a9f737f60be",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataUpdateDialog.vue",statementMap:{0:{start:{line:164,column:4},end:{line:177,column:5}},1:{start:{line:175,column:29},end:{line:175,column:50}},2:{start:{line:181,column:6},end:{line:183,column:7}},3:{start:{line:182,column:8},end:{line:182,column:27}},4:{start:{line:187,column:4},end:{line:187,column:24}},5:{start:{line:191,column:6},end:{line:193,column:7}},6:{start:{line:192,column:8},end:{line:192,column:59}},7:{start:{line:194,column:18},end:{line:194,column:28}},8:{start:{line:195,column:20},end:{line:195,column:69}},9:{start:{line:196,column:6},end:{line:198,column:7}},10:{start:{line:197,column:8},end:{line:197,column:61}},11:{start:{line:199,column:6},end:{line:199,column:17}},12:{start:{line:202,column:6},end:{line:204,column:7}},13:{start:{line:203,column:8},end:{line:203,column:60}},14:{start:{line:205,column:28},end:{line:207,column:7}},15:{start:{line:206,column:18},end:{line:206,column:54}},16:{start:{line:208,column:6},end:{line:210,column:7}},17:{start:{line:209,column:8},end:{line:209,column:67}},18:{start:{line:211,column:6},end:{line:211,column:17}},19:{start:{line:215,column:8},end:{line:215,column:25}},20:{start:{line:218,column:8},end:{line:218,column:34}},21:{start:{line:224,column:20},end:{line:224,column:52}},22:{start:{line:225,column:6},end:{line:225,column:50}},23:{start:{line:226,column:6},end:{line:226,column:48}},24:{start:{line:227,column:6},end:{line:229,column:8}},25:{start:{line:228,column:8},end:{line:228,column:62}},26:{start:{line:230,column:6},end:{line:230,column:41}},27:{start:{line:231,column:6},end:{line:231,column:43}},28:{start:{line:234,column:6},end:{line:237,column:8}},29:{start:{line:235,column:8},end:{line:235,column:27}},30:{start:{line:236,column:8},end:{line:236,column:48}},31:{start:{line:240,column:20},end:{line:240,column:30}},32:{start:{line:241,column:23},end:{line:244,column:12}},33:{start:{line:242,column:8},end:{line:242,column:43}},34:{start:{line:243,column:8},end:{line:243,column:21}},35:{start:{line:245,column:20},end:{line:247,column:7}},36:{start:{line:248,column:21},end:{line:248,column:32}},37:{start:{line:249,column:6},end:{line:256,column:8}},38:{start:{line:252,column:8},end:{line:255,column:10}},39:{start:{line:257,column:6},end:{line:257,column:25}},40:{start:{line:258,column:6},end:{line:258,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:163,column:2},end:{line:163,column:3}},loc:{start:{line:163,column:9},end:{line:178,column:3}},line:163},1:{name:"(anonymous_1)",decl:{start:{line:175,column:18},end:{line:175,column:19}},loc:{start:{line:175,column:29},end:{line:175,column:50}},line:175},2:{name:"(anonymous_2)",decl:{start:{line:180,column:10},end:{line:180,column:11}},loc:{start:{line:180,column:22},end:{line:184,column:5}},line:180},3:{name:"(anonymous_3)",decl:{start:{line:186,column:11},end:{line:186,column:12}},loc:{start:{line:186,column:23},end:{line:188,column:3}},line:186},4:{name:"(anonymous_4)",decl:{start:{line:190,column:15},end:{line:190,column:16}},loc:{start:{line:190,column:27},end:{line:200,column:5}},line:190},5:{name:"(anonymous_5)",decl:{start:{line:201,column:15},end:{line:201,column:16}},loc:{start:{line:201,column:27},end:{line:212,column:5}},line:201},6:{name:"(anonymous_6)",decl:{start:{line:206,column:8},end:{line:206,column:9}},loc:{start:{line:206,column:18},end:{line:206,column:54}},line:206},7:{name:"(anonymous_7)",decl:{start:{line:214,column:6},end:{line:214,column:7}},loc:{start:{line:214,column:12},end:{line:216,column:7}},line:214},8:{name:"(anonymous_8)",decl:{start:{line:217,column:6},end:{line:217,column:7}},loc:{start:{line:217,column:17},end:{line:219,column:7}},line:217},9:{name:"(anonymous_9)",decl:{start:{line:223,column:18},end:{line:223,column:19}},loc:{start:{line:223,column:30},end:{line:232,column:5}},line:223},10:{name:"(anonymous_10)",decl:{start:{line:227,column:65},end:{line:227,column:66}},loc:{start:{line:227,column:72},end:{line:229,column:7}},line:227},11:{name:"(anonymous_11)",decl:{start:{line:233,column:19},end:{line:233,column:20}},loc:{start:{line:233,column:31},end:{line:238,column:5}},line:233},12:{name:"(anonymous_12)",decl:{start:{line:234,column:45},end:{line:234,column:46}},loc:{start:{line:234,column:55},end:{line:237,column:7}},line:234},13:{name:"(anonymous_13)",decl:{start:{line:239,column:20},end:{line:239,column:21}},loc:{start:{line:239,column:32},end:{line:259,column:5}},line:239},14:{name:"(anonymous_14)",decl:{start:{line:241,column:44},end:{line:241,column:45}},loc:{start:{line:241,column:65},end:{line:244,column:7}},line:241},15:{name:"(anonymous_15)",decl:{start:{line:251,column:14},end:{line:251,column:15}},loc:{start:{line:251,column:28},end:{line:256,column:7}},line:251}},branchMap:{0:{loc:{start:{line:175,column:29},end:{line:175,column:50}},type:"binary-expr",locations:[{start:{line:175,column:29},end:{line:175,column:36}},{start:{line:175,column:40},end:{line:175,column:50}}],line:175},1:{loc:{start:{line:181,column:6},end:{line:183,column:7}},type:"if",locations:[{start:{line:181,column:6},end:{line:183,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:181},2:{loc:{start:{line:191,column:6},end:{line:193,column:7}},type:"if",locations:[{start:{line:191,column:6},end:{line:193,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:191},3:{loc:{start:{line:196,column:6},end:{line:198,column:7}},type:"if",locations:[{start:{line:196,column:6},end:{line:198,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:196},4:{loc:{start:{line:202,column:6},end:{line:204,column:7}},type:"if",locations:[{start:{line:202,column:6},end:{line:204,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:202},5:{loc:{start:{line:206,column:18},end:{line:206,column:54}},type:"binary-expr",locations:[{start:{line:206,column:18},end:{line:206,column:33}},{start:{line:206,column:37},end:{line:206,column:54}}],line:206},6:{loc:{start:{line:208,column:6},end:{line:210,column:7}},type:"if",locations:[{start:{line:208,column:6},end:{line:210,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:208}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,sources:["MetadataUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6IA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="updateMetadata">\n <v-system-bar>\n <v-spacer />\n <span>Update Chronicle Metadata</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-metadata-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-select v-model="target" :items="targets" label="Target" />\n <color-select-form v-model="color" />\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="start-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-metadata-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2"> Metadata input </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div style="min-height: 200px">\n <metadata-input-form v-model="metadata" />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="update-metadata-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateMetadata"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-metadata-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { CosmosApi } from \'@cosmosc2/tool-common/src/services/cosmos-api\'\n\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\nimport MetadataInputForm from \'@/tools/Calendar/Forms/MetadataInputForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n MetadataInputForm,\n },\n props: {\n metadataObj: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n scope: localStorage.scope,\n dialogStep: 1,\n target: \'\',\n targets: [],\n startDate: \'\',\n startTime: \'\',\n utcOrLocal: \'loc\',\n color: \'\',\n metadata: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n if (this.show) {\n this.updateValues()\n }\n },\n },\n mounted: function () {\n this.updateTargets()\n },\n computed: {\n timeError: function () {\n if (!this.target) {\n return \'Metadata must be associated with a target.\'\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n if (now < start) {\n return \'Invalid start time. Can not be in the future\'\n }\n return null\n },\n typeError: function () {\n if (this.metadata.length < 1) {\n return \'Please enter a value in the metadata table.\'\n }\n const emptyKeyValue = this.metadata.find(\n (meta) => meta.key === \'\' || meta.value === \'\'\n )\n if (emptyKeyValue) {\n return \'Missing or empty key, value in the metadata table.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n const sDate = new Date(this.metadataObj.start)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.metadata = Object.keys(this.metadataObj.metadata).map((k) => {\n return { key: k, value: this.metadataObj.metadata[k] }\n })\n this.color = this.metadataObj.color\n this.target = this.metadataObj.target\n },\n updateTargets: function () {\n new CosmosApi().get_target_list().then((data) => {\n this.targets = data\n this.targets.unshift(localStorage.scope)\n })\n },\n updateMetadata: function () {\n const color = this.color\n const metadata = this.metadata.reduce((result, element) => {\n result[element.key] = element.value\n return result\n }, {})\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const target = this.target\n Api.put(`/cosmos-api/metadata/${this.metadataObj.start}`, {\n data: { start, color, target, metadata },\n }).then((response) => {\n this.$notify.normal({\n title: \'Updated Chronicle Metadata\',\n body: `Metadata updated: (${response.data.start})`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ec93f91f025701f2258a261778819a9f737f60be"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Ln=function(){return o},o}Ln();var Pn={components:{ColorSelectForm:Mn,MetadataInputForm:Un},props:{metadataObj:{type:Object,required:!0},value:Boolean},mixins:[$],data:function(){return Ln().f[0]++,Ln().s[0]++,{scope:localStorage.scope,dialogStep:1,target:"",targets:[],startDate:"",startTime:"",utcOrLocal:"loc",color:"",metadata:[],rules:{required:function(n){return Ln().f[1]++,Ln().s[1]++,Ln().b[0][0]++,!!n||(Ln().b[0][1]++,"Required")}}}},watch:{show:function(){Ln().f[2]++,Ln().s[2]++,this.show?(Ln().b[1][0]++,Ln().s[3]++,this.updateValues()):Ln().b[1][1]++}},mounted:function(){Ln().f[3]++,Ln().s[4]++,this.updateTargets()},computed:{timeError:function(){if(Ln().f[4]++,Ln().s[5]++,!this.target)return Ln().b[2][0]++,Ln().s[6]++,"Metadata must be associated with a target.";Ln().b[2][1]++;var n=(Ln().s[7]++,new Date),e=(Ln().s[8]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime)));return Ln().s[9]++,n<e?(Ln().b[3][0]++,Ln().s[10]++,"Invalid start time. Can not be in the future"):(Ln().b[3][1]++,Ln().s[11]++,null)},typeError:function(){if(Ln().f[5]++,Ln().s[12]++,this.metadata.length<1)return Ln().b[4][0]++,Ln().s[13]++,"Please enter a value in the metadata table.";Ln().b[4][1]++;var n=(Ln().s[14]++,this.metadata.find((function(n){return Ln().f[6]++,Ln().s[15]++,Ln().b[5][0]++,""===n.key||(Ln().b[5][1]++,""===n.value)})));return Ln().s[16]++,n?(Ln().b[6][0]++,Ln().s[17]++,"Missing or empty key, value in the metadata table."):(Ln().b[6][1]++,Ln().s[18]++,null)},show:{get:function(){return Ln().f[7]++,Ln().s[19]++,this.value},set:function(n){Ln().f[8]++,Ln().s[20]++,this.$emit("input",n)}}},methods:{updateValues:function(){var n=this;Ln().f[9]++;var e=(Ln().s[21]++,new Date(this.metadataObj.start));Ln().s[22]++,this.startDate=(0,Y.Z)(e,"yyyy-MM-dd"),Ln().s[23]++,this.startTime=(0,Y.Z)(e,"HH:mm:ss"),Ln().s[24]++,this.metadata=Object.keys(this.metadataObj.metadata).map((function(e){return Ln().f[10]++,Ln().s[25]++,{key:e,value:n.metadataObj.metadata[e]}})),Ln().s[26]++,this.color=this.metadataObj.color,Ln().s[27]++,this.target=this.metadataObj.target},updateTargets:function(){var n=this;Ln().f[11]++,Ln().s[28]++,(new wn).get_target_list().then((function(e){Ln().f[12]++,Ln().s[29]++,n.targets=e,Ln().s[30]++,n.targets.unshift(localStorage.scope)}))},updateMetadata:function(){var n=this;Ln().f[13]++;var e=(Ln().s[31]++,this.color),t=(Ln().s[32]++,this.metadata.reduce((function(n,e){return Ln().f[14]++,Ln().s[33]++,n[e.key]=e.value,Ln().s[34]++,n}),{})),i=(Ln().s[35]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),l=(Ln().s[36]++,this.target);Ln().s[37]++,C.put("/cosmos-api/metadata/".concat(this.metadataObj.start),{data:{start:i,color:e,target:l,metadata:t}}).then((function(e){Ln().f[15]++,Ln().s[38]++,n.$notify.normal({title:"Updated Chronicle Metadata",body:"Metadata updated: (".concat(e.data.start,")")})})),Ln().s[39]++,this.$emit("close"),Ln().s[40]++,this.show=!this.show}}},qn=Pn,Hn=(t(5564),(0,k.Z)(qn,fn,yn,!1,null,"7a27607c",null)),Zn=Hn.exports;function jn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataEventForm.vue",e="09112deb8bb6effe3c0541048b7d89fb5ccb93db",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataEventForm.vue",statementMap:{0:{start:{line:114,column:4},end:{line:116,column:5}},1:{start:{line:120,column:23},end:{line:120,column:59}},2:{start:{line:121,column:6},end:{line:123,column:8}},3:{start:{line:122,column:8},end:{line:122,column:45}},4:{start:{line:126,column:16},end:{line:126,column:74}},5:{start:{line:127,column:6},end:{line:127,column:24}},6:{start:{line:130,column:6},end:{line:130,column:89}},7:{start:{line:135,column:6},end:{line:135,column:25}},8:{start:{line:138,column:6},end:{line:138,column:52}},9:{start:{line:141,column:28},end:{line:141,column:61}},10:{start:{line:142,column:25},end:{line:145,column:7}},11:{start:{line:146,column:6},end:{line:171,column:10}},12:{start:{line:155,column:10},end:{line:155,column:68}},13:{start:{line:158,column:10},end:{line:161,column:12}},14:{start:{line:162,column:10},end:{line:162,column:29}},15:{start:{line:165,column:10},end:{line:170,column:11}},16:{start:{line:166,column:12},end:{line:169,column:14}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:113,column:2},end:{line:113,column:3}},loc:{start:{line:113,column:9},end:{line:117,column:3}},line:113},1:{name:"(anonymous_1)",decl:{start:{line:119,column:20},end:{line:119,column:21}},loc:{start:{line:119,column:32},end:{line:124,column:5}},line:119},2:{name:"(anonymous_2)",decl:{start:{line:121,column:39},end:{line:121,column:40}},loc:{start:{line:121,column:46},end:{line:123,column:7}},line:121},3:{name:"(anonymous_3)",decl:{start:{line:125,column:16},end:{line:125,column:17}},loc:{start:{line:125,column:28},end:{line:128,column:5}},line:125},4:{name:"(anonymous_4)",decl:{start:{line:129,column:11},end:{line:129,column:12}},loc:{start:{line:129,column:23},end:{line:131,column:5}},line:129},5:{name:"(anonymous_5)",decl:{start:{line:134,column:11},end:{line:134,column:12}},loc:{start:{line:134,column:23},end:{line:136,column:5}},line:134},6:{name:"(anonymous_6)",decl:{start:{line:137,column:18},end:{line:137,column:19}},loc:{start:{line:137,column:30},end:{line:139,column:5}},line:137},7:{name:"(anonymous_7)",decl:{start:{line:140,column:18},end:{line:140,column:19}},loc:{start:{line:140,column:30},end:{line:172,column:5}},line:140},8:{name:"(anonymous_8)",decl:{start:{line:154,column:14},end:{line:154,column:15}},loc:{start:{line:154,column:26},end:{line:156,column:9}},line:154},9:{name:"(anonymous_9)",decl:{start:{line:157,column:14},end:{line:157,column:15}},loc:{start:{line:157,column:28},end:{line:163,column:9}},line:157},10:{name:"(anonymous_10)",decl:{start:{line:164,column:15},end:{line:164,column:16}},loc:{start:{line:164,column:26},end:{line:171,column:9}},line:164}},branchMap:{0:{loc:{start:{line:165,column:10},end:{line:170,column:11}},type:"if",locations:[{start:{line:165,column:10},end:{line:170,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:165}},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,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["MetadataEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title v-text="title" />\n <v-card-subtitle>\n <span>\n {{ metadataEvent.start | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-col class="pa-0">\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left">Key</th>\n <th class="text-left">Value</th>\n </tr>\n <template v-for="(value, i) in metadataValues">\n <tr :key="`tr-${i}`">\n <td class="text-left">\n <span v-text="value.key" />\n </td>\n <td class="text-left">\n <span v-text="value.value" />\n </td>\n </tr>\n </template>\n </tbody>\n </v-simple-table>\n </v-col>\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions class="pa-1">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-metadata" @click="updateDialog">\n <v-icon>mdi-pencil</v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-metadata" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <metadata-update-dialog\n v-model="showUpdateDialog"\n :metadata-obj="metadataEvent.metadata"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport MetadataUpdateDialog from \'@/tools/Calendar/Dialogs/MetadataUpdateDialog\'\n\nexport default {\n components: {\n MetadataUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n metadataEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n metadataValues: function () {\n const metadata = this.metadataEvent.metadata.metadata\n return Object.keys(metadata).map((k) => {\n return { key: k, value: metadata[k] }\n })\n },\n updated_at: function () {\n const v = parseInt(this.metadataEvent.metadata.updated_at / 1000000)\n return new Date(v)\n },\n title: function () {\n return `${this.metadataEvent.metadata.target}, ${this.metadataEvent.metadata.type}`\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const metadataStart = this.metadataEvent.metadata.start\n const eventStart = this.generateDateTime(\n this.metadataEvent.start,\n this.utc\n )\n this.$dialog\n .confirm(\n `Are you sure you want to remove metadata: ${eventStart} (${metadataStart})`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(`/cosmos-api/metadata/${metadataStart}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Metadata\',\n body: `Deleted metadata: ${eventStart} (${metadataStart})`,\n })\n this.$emit(\'close\')\n })\n .catch((error) => {\n if (error) {\n this.$notify.error({\n title: \'Failed to Delete Metadata\',\n body: `Failed to delete metadata ${metadataStart}. Error: ${error}`,\n })\n }\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"09112deb8bb6effe3c0541048b7d89fb5ccb93db"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return jn=function(){return o},o}jn();var Gn={components:{MetadataUpdateDialog:Zn},mixins:[$],props:{metadataEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return jn().f[0]++,jn().s[0]++,{showUpdateDialog:!1}},computed:{metadataValues:function(){jn().f[1]++;var n=(jn().s[1]++,this.metadataEvent.metadata.metadata);return jn().s[2]++,Object.keys(n).map((function(e){return jn().f[2]++,jn().s[3]++,{key:e,value:n[e]}}))},updated_at:function(){jn().f[3]++;var n=(jn().s[4]++,parseInt(this.metadataEvent.metadata.updated_at/1e6));return jn().s[5]++,new Date(n)},title:function(){return jn().f[4]++,jn().s[6]++,"".concat(this.metadataEvent.metadata.target,", ").concat(this.metadataEvent.metadata.type)}},methods:{close:function(){jn().f[5]++,jn().s[7]++,this.$emit("close")},updateDialog:function(){jn().f[6]++,jn().s[8]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;jn().f[7]++;var e=(jn().s[9]++,this.metadataEvent.metadata.start),t=(jn().s[10]++,this.generateDateTime(this.metadataEvent.start,this.utc));jn().s[11]++,this.$dialog.confirm("Are you sure you want to remove metadata: ".concat(t," (").concat(e,")"),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return jn().f[8]++,jn().s[12]++,C["delete"]("/cosmos-api/metadata/".concat(e))})).then((function(i){jn().f[9]++,jn().s[13]++,n.$notify.normal({title:"Deleted Metadata",body:"Deleted metadata: ".concat(t," (").concat(e,")")}),jn().s[14]++,n.$emit("close")})).catch((function(t){jn().f[10]++,jn().s[15]++,t?(jn().b[0][0]++,jn().s[16]++,n.$notify.error({title:"Failed to Delete Metadata",body:"Failed to delete metadata ".concat(e,". Error: ").concat(t)})):jn().b[0][1]++}))}}},Bn=Gn,Yn=(t(965),(0,k.Z)(Bn,hn,Cn,!1,null,"764f7879",null)),Vn=Yn.exports,Wn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",{domProps:{textContent:n._s(n.narrativeEvent.name)}}),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.narrativeEvent.start,n.utc))+" ")]),t("br"),t("span",[n._v(" "+n._s(n._f("dateTime")(n.narrativeEvent.end,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-textarea",{attrs:{readonly:"",rows:"6",value:n.description}})],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",{staticClass:"pa-1"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"update-narration"},on:{click:n.updateDialog}},[t("v-icon",[n._v("mdi-pencil")])],1)],1)]}}])},[t("span",[n._v(" Update ")])]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"delete-narration"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("narration-update-dialog",{attrs:{narrative:n.narrativeEvent.narrative},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},Kn=[],Jn=(t(4115),t(634),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateNarrative.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Update Chronicle Narrative")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-narrative-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"narrative-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"narrative-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"narrative-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"narrative-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"update-narrative-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Input Description ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",[t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1),t("div",[t("v-text-field",{attrs:{type:"text",label:"Narrative Description","data-test":"update-narrative-description"},model:{value:n.description,callback:function(e){n.description=e},expression:"description"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-narrative-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-narrative-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateNarrative.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)}),zn=[];function Qn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NarrationUpdateDialog.vue",e="91ec1900a989de8bfe42c883e0f2351a78170903",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NarrationUpdateDialog.vue",statementMap:{0:{start:{line:190,column:4},end:{line:202,column:5}},1:{start:{line:200,column:29},end:{line:200,column:50}},2:{start:{line:206,column:6},end:{line:206,column:25}},3:{start:{line:211,column:18},end:{line:211,column:28}},4:{start:{line:212,column:20},end:{line:212,column:69}},5:{start:{line:213,column:19},end:{line:213,column:66}},6:{start:{line:214,column:6},end:{line:216,column:7}},7:{start:{line:215,column:8},end:{line:215,column:95}},8:{start:{line:217,column:6},end:{line:219,column:7}},9:{start:{line:218,column:8},end:{line:218,column:65}},10:{start:{line:220,column:6},end:{line:220,column:17}},11:{start:{line:223,column:6},end:{line:225,column:7}},12:{start:{line:224,column:8},end:{line:224,column:65}},13:{start:{line:226,column:6},end:{line:226,column:17}},14:{start:{line:230,column:8},end:{line:230,column:25}},15:{start:{line:233,column:8},end:{line:233,column:34}},16:{start:{line:239,column:6},end:{line:239,column:25}},17:{start:{line:240,column:20},end:{line:240,column:57}},18:{start:{line:241,column:20},end:{line:241,column:56}},19:{start:{line:242,column:6},end:{line:242,column:50}},20:{start:{line:243,column:6},end:{line:243,column:48}},21:{start:{line:244,column:6},end:{line:244,column:49}},22:{start:{line:245,column:6},end:{line:245,column:47}},23:{start:{line:246,column:6},end:{line:246,column:39}},24:{start:{line:247,column:6},end:{line:247,column:51}},25:{start:{line:250,column:20},end:{line:252,column:7}},26:{start:{line:253,column:19},end:{line:255,column:7}},27:{start:{line:256,column:20},end:{line:256,column:30}},28:{start:{line:257,column:26},end:{line:257,column:42}},29:{start:{line:258,column:6},end:{line:269,column:8}},30:{start:{line:262,column:10},end:{line:264,column:39}},31:{start:{line:265,column:8},end:{line:268,column:10}},32:{start:{line:270,column:6},end:{line:270,column:25}},33:{start:{line:271,column:6},end:{line:271,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:189,column:2},end:{line:189,column:3}},loc:{start:{line:189,column:9},end:{line:203,column:3}},line:189},1:{name:"(anonymous_1)",decl:{start:{line:200,column:18},end:{line:200,column:19}},loc:{start:{line:200,column:29},end:{line:200,column:50}},line:200},2:{name:"(anonymous_2)",decl:{start:{line:205,column:10},end:{line:205,column:11}},loc:{start:{line:205,column:22},end:{line:207,column:5}},line:205},3:{name:"(anonymous_3)",decl:{start:{line:210,column:15},end:{line:210,column:16}},loc:{start:{line:210,column:27},end:{line:221,column:5}},line:210},4:{name:"(anonymous_4)",decl:{start:{line:222,column:15},end:{line:222,column:16}},loc:{start:{line:222,column:27},end:{line:227,column:5}},line:222},5:{name:"(anonymous_5)",decl:{start:{line:229,column:6},end:{line:229,column:7}},loc:{start:{line:229,column:12},end:{line:231,column:7}},line:229},6:{name:"(anonymous_6)",decl:{start:{line:232,column:6},end:{line:232,column:7}},loc:{start:{line:232,column:17},end:{line:234,column:7}},line:232},7:{name:"(anonymous_7)",decl:{start:{line:238,column:18},end:{line:238,column:19}},loc:{start:{line:238,column:30},end:{line:248,column:5}},line:238},8:{name:"(anonymous_8)",decl:{start:{line:249,column:21},end:{line:249,column:22}},loc:{start:{line:249,column:33},end:{line:272,column:5}},line:249},9:{name:"(anonymous_9)",decl:{start:{line:260,column:14},end:{line:260,column:15}},loc:{start:{line:260,column:28},end:{line:269,column:7}},line:260}},branchMap:{0:{loc:{start:{line:200,column:29},end:{line:200,column:50}},type:"binary-expr",locations:[{start:{line:200,column:29},end:{line:200,column:36}},{start:{line:200,column:40},end:{line:200,column:50}}],line:200},1:{loc:{start:{line:214,column:6},end:{line:216,column:7}},type:"if",locations:[{start:{line:214,column:6},end:{line:216,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},2:{loc:{start:{line:217,column:6},end:{line:219,column:7}},type:"if",locations:[{start:{line:217,column:6},end:{line:219,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:217},3:{loc:{start:{line:223,column:6},end:{line:225,column:7}},type:"if",locations:[{start:{line:223,column:6},end:{line:225,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:223},4:{loc:{start:{line:262,column:10},end:{line:264,column:39}},type:"cond-expr",locations:[{start:{line:263,column:14},end:{line:263,column:64}},{start:{line:264,column:14},end:{line:264,column:39}}],line:262}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,sources:["NarrationUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NarrationUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="updateNarrative">\n <v-system-bar>\n <v-spacer />\n <span>Update Chronicle Narrative</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon\n data-test="close-narrative-icon"\n @click="show = !show"\n >\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="update-narrative-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Input Description\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div>\n <color-select-form v-model="color" />\n </div>\n <div>\n <v-text-field\n v-model="description"\n type="text"\n label="Narrative Description"\n data-test="update-narrative-description"\n />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="update-narrative-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateNarrative"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-narrative-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n },\n props: {\n narrative: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n description: \'\',\n color: \'\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n this.updateValues()\n },\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Narrations must have different start and stop times.\'\n }\n if (start > stop) {\n return \'Invalid start time. Narration start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (!this.description) {\n return \'A description is required for a valid narrative.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n const sDate = new Date(this.narrative.start * 1000)\n const eDate = new Date(this.narrative.stop * 1000)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.stopDate = format(eDate, \'yyyy-MM-dd\')\n this.stopTime = format(eDate, \'HH:mm:ss\')\n this.color = this.narrative.color\n this.description = this.narrative.description\n },\n updateNarrative: function () {\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const color = this.color\n const description = this.description\n Api.put(`/cosmos-api/narrative/${this.narrative.start}`, {\n data: { start, stop, color, description },\n }).then((response) => {\n const desc =\n response.data.description.length > 16\n ? `${response.data.description.substring(0, 16)}...`\n : response.data.description\n this.$notify.normal({\n title: \'Updated Chronicle Narrative\',\n body: `Narrative updated: (${response.data.start}): "${desc}"`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"91ec1900a989de8bfe42c883e0f2351a78170903"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Qn=function(){return o},o}Qn();var Xn={components:{ColorSelectForm:Mn},props:{narrative:{type:Object,required:!0},value:Boolean},mixins:[$],data:function(){return Qn().f[0]++,Qn().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",description:"",color:"",rules:{required:function(n){return Qn().f[1]++,Qn().s[1]++,Qn().b[0][0]++,!!n||(Qn().b[0][1]++,"Required")}}}},watch:{show:function(){Qn().f[2]++,Qn().s[2]++,this.updateValues()}},computed:{timeError:function(){Qn().f[3]++;Qn().s[3]++,new Date;var n=(Qn().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),e=(Qn().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Qn().s[6]++,n===e?(Qn().b[1][0]++,Qn().s[7]++,"Invalid start, stop time. Narrations must have different start and stop times."):(Qn().b[1][1]++,Qn().s[8]++,n>e?(Qn().b[2][0]++,Qn().s[9]++,"Invalid start time. Narration start before stop."):(Qn().b[2][1]++,Qn().s[10]++,null))},typeError:function(){return Qn().f[4]++,Qn().s[11]++,this.description?(Qn().b[3][1]++,Qn().s[13]++,null):(Qn().b[3][0]++,Qn().s[12]++,"A description is required for a valid narrative.")},show:{get:function(){return Qn().f[5]++,Qn().s[14]++,this.value},set:function(n){Qn().f[6]++,Qn().s[15]++,this.$emit("input",n)}}},methods:{updateValues:function(){Qn().f[7]++,Qn().s[16]++,this.dialogStep=1;var n=(Qn().s[17]++,new Date(1e3*this.narrative.start)),e=(Qn().s[18]++,new Date(1e3*this.narrative.stop));Qn().s[19]++,this.startDate=(0,Y.Z)(n,"yyyy-MM-dd"),Qn().s[20]++,this.startTime=(0,Y.Z)(n,"HH:mm:ss"),Qn().s[21]++,this.stopDate=(0,Y.Z)(e,"yyyy-MM-dd"),Qn().s[22]++,this.stopTime=(0,Y.Z)(e,"HH:mm:ss"),Qn().s[23]++,this.color=this.narrative.color,Qn().s[24]++,this.description=this.narrative.description},updateNarrative:function(){var n=this;Qn().f[8]++;var e=(Qn().s[25]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Qn().s[26]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),i=(Qn().s[27]++,this.color),l=(Qn().s[28]++,this.description);Qn().s[29]++,C.put("/cosmos-api/narrative/".concat(this.narrative.start),{data:{start:e,stop:t,color:i,description:l}}).then((function(e){Qn().f[9]++;var t=(Qn().s[30]++,e.data.description.length>16?(Qn().b[4][0]++,"".concat(e.data.description.substring(0,16),"...")):(Qn().b[4][1]++,e.data.description));Qn().s[31]++,n.$notify.normal({title:"Updated Chronicle Narrative",body:"Narrative updated: (".concat(e.data.start,'): "').concat(t,'"')})})),Qn().s[32]++,this.$emit("close"),Qn().s[33]++,this.show=!this.show}}},ne=Xn,ee=(t(9814),(0,k.Z)(ne,Jn,zn,!1,null,"77b41112",null)),te=ee.exports;function ie(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/NarrationEventForm.vue",e="ea0befcaf8fafd773f7fcadf54e1afdd6aa60037",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/NarrationEventForm.vue",statementMap:{0:{start:{line:99,column:4},end:{line:101,column:5}},1:{start:{line:105,column:16},end:{line:105,column:76}},2:{start:{line:106,column:6},end:{line:106,column:24}},3:{start:{line:109,column:6},end:{line:109,column:54}},4:{start:{line:114,column:6},end:{line:114,column:25}},5:{start:{line:117,column:6},end:{line:117,column:52}},6:{start:{line:120,column:29},end:{line:120,column:64}},7:{start:{line:121,column:25},end:{line:124,column:7}},8:{start:{line:125,column:6},end:{line:142,column:10}},9:{start:{line:134,column:10},end:{line:134,column:70}},10:{start:{line:137,column:10},end:{line:140,column:12}},11:{start:{line:141,column:10},end:{line:141,column:29}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:98,column:2},end:{line:98,column:3}},loc:{start:{line:98,column:9},end:{line:102,column:3}},line:98},1:{name:"(anonymous_1)",decl:{start:{line:104,column:16},end:{line:104,column:17}},loc:{start:{line:104,column:28},end:{line:107,column:5}},line:104},2:{name:"(anonymous_2)",decl:{start:{line:108,column:17},end:{line:108,column:18}},loc:{start:{line:108,column:29},end:{line:110,column:5}},line:108},3:{name:"(anonymous_3)",decl:{start:{line:113,column:11},end:{line:113,column:12}},loc:{start:{line:113,column:23},end:{line:115,column:5}},line:113},4:{name:"(anonymous_4)",decl:{start:{line:116,column:18},end:{line:116,column:19}},loc:{start:{line:116,column:30},end:{line:118,column:5}},line:116},5:{name:"(anonymous_5)",decl:{start:{line:119,column:18},end:{line:119,column:19}},loc:{start:{line:119,column:30},end:{line:143,column:5}},line:119},6:{name:"(anonymous_6)",decl:{start:{line:133,column:14},end:{line:133,column:15}},loc:{start:{line:133,column:26},end:{line:135,column:9}},line:133},7:{name:"(anonymous_7)",decl:{start:{line:136,column:14},end:{line:136,column:15}},loc:{start:{line:136,column:28},end:{line:142,column:9}},line:136}},branchMap:{},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,7:0},b:{},inputSourceMap:{version:3,sources:["NarrationEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NarrationEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title v-text="narrativeEvent.name" />\n <v-card-subtitle>\n <span>\n {{ narrativeEvent.start | dateTime(utc) }}\n </span>\n <br />\n <span>\n {{ narrativeEvent.end | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-textarea readonly rows="6" :value="description" />\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions class="pa-1">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-narration" @click="updateDialog">\n <v-icon>mdi-pencil</v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-narration" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <narration-update-dialog\n v-model="showUpdateDialog"\n :narrative="narrativeEvent.narrative"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport NarrationUpdateDialog from \'@/tools/Calendar/Dialogs/NarrationUpdateDialog\'\n\nexport default {\n components: {\n NarrationUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n narrativeEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n updated_at: function () {\n const v = parseInt(this.narrativeEvent.narrative.updated_at / 1000000)\n return new Date(v)\n },\n description: function () {\n return this.narrativeEvent.narrative.description\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const narrationStart = this.narrativeEvent.narrative.start\n const eventStart = this.generateDateTime(\n this.narrativeEvent.start,\n this.utc\n )\n this.$dialog\n .confirm(\n `Are you sure you want to remove narration: ${eventStart} (${narrationStart})`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(`/cosmos-api/narrative/${narrationStart}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Narration\',\n body: `Deleted narration: ${eventStart} (${narrationStart})`,\n })\n this.$emit(\'close\')\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ea0befcaf8fafd773f7fcadf54e1afdd6aa60037"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return ie=function(){return o},o}ie();var le={components:{NarrationUpdateDialog:te},mixins:[$],props:{narrativeEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return ie().f[0]++,ie().s[0]++,{showUpdateDialog:!1}},computed:{updated_at:function(){ie().f[1]++;var n=(ie().s[1]++,parseInt(this.narrativeEvent.narrative.updated_at/1e6));return ie().s[2]++,new Date(n)},description:function(){return ie().f[2]++,ie().s[3]++,this.narrativeEvent.narrative.description}},methods:{close:function(){ie().f[3]++,ie().s[4]++,this.$emit("close")},updateDialog:function(){ie().f[4]++,ie().s[5]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;ie().f[5]++;var e=(ie().s[6]++,this.narrativeEvent.narrative.start),t=(ie().s[7]++,this.generateDateTime(this.narrativeEvent.start,this.utc));ie().s[8]++,this.$dialog.confirm("Are you sure you want to remove narration: ".concat(t," (").concat(e,")"),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return ie().f[6]++,ie().s[9]++,C["delete"]("/cosmos-api/narrative/".concat(e))})).then((function(i){ie().f[7]++,ie().s[10]++,n.$notify.normal({title:"Deleted Narration",body:"Deleted narration: ".concat(t," (").concat(e,")")}),ie().s[11]++,n.$emit("close")}))}}},ae=le,oe=(t(9891),(0,k.Z)(ae,Wn,Kn,!1,null,"077c1902",null)),se=oe.exports;function re(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventDialog.vue",e="24d6b7448f6da92898ba9991a62265aa0555ded2",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventDialog.vue",statementMap:{0:{start:{line:75,column:6},end:{line:75,column:46}},1:{start:{line:79,column:8},end:{line:79,column:25}},2:{start:{line:82,column:8},end:{line:82,column:34}},3:{start:{line:88,column:6},end:{line:88,column:28}},4:{start:{line:89,column:6},end:{line:89,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:74,column:10},end:{line:74,column:11}},loc:{start:{line:74,column:22},end:{line:76,column:5}},line:74},1:{name:"(anonymous_1)",decl:{start:{line:78,column:6},end:{line:78,column:7}},loc:{start:{line:78,column:12},end:{line:80,column:7}},line:78},2:{name:"(anonymous_2)",decl:{start:{line:81,column:6},end:{line:81,column:7}},loc:{start:{line:81,column:17},end:{line:83,column:7}},line:81},3:{name:"(anonymous_3)",decl:{start:{line:87,column:11},end:{line:87,column:12}},loc:{start:{line:87,column:28},end:{line:90,column:5}},line:87}},branchMap:{0:{loc:{start:{line:75,column:13},end:{line:75,column:46}},type:"cond-expr",locations:[{start:{line:75,column:26},end:{line:75,column:41}},{start:{line:75,column:44},end:{line:75,column:46}}],line:75}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["EventDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card width="400">\n <div v-if="type === \'activity\'">\n <activity-event-form\n :activity-event="event"\n :utc="utc"\n @close="close"\n />\n </div>\n <div v-if="type === \'narrative\'">\n <narration-event-form\n :narrative-event="event"\n :utc="utc"\n @close="close"\n />\n </div>\n <div v-if="type === \'metadata\'">\n <metadata-event-form\n :metadata-event="event"\n :utc="utc"\n @close="close"\n />\n </div>\n </v-card>\n </div>\n</template>\n\n<script>\nimport ActivityEventForm from \'@/tools/Calendar/Forms/ActivityEventForm\'\nimport MetadataEventForm from \'@/tools/Calendar/Forms/MetadataEventForm\'\nimport NarrationEventForm from \'@/tools/Calendar/Forms/NarrationEventForm\'\n\nexport default {\n components: {\n ActivityEventForm,\n MetadataEventForm,\n NarrationEventForm,\n },\n props: {\n event: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n value: {\n type: Boolean,\n required: true,\n },\n },\n computed: {\n type: function () {\n return this.event ? this.event.type : \'\'\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n close: function (event) {\n this.show = !this.show\n this.$emit(\'close\')\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"24d6b7448f6da92898ba9991a62265aa0555ded2"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return re=function(){return o},o}re();var ce={components:{ActivityEventForm:pn,MetadataEventForm:Vn,NarrationEventForm:se},props:{event:{type:Object,required:!0},utc:{type:Boolean,required:!0},value:{type:Boolean,required:!0}},computed:{type:function(){return re().f[0]++,re().s[0]++,this.event?(re().b[0][0]++,this.event.type):(re().b[0][1]++,"")},show:{get:function(){return re().f[1]++,re().s[1]++,this.value},set:function(n){re().f[2]++,re().s[2]++,this.$emit("input",n)}}},methods:{close:function(n){re().f[3]++,re().s[3]++,this.show=!this.show,re().s[4]++,this.$emit("close")}}},ue=ce,me=(0,k.Z)(ue,F,N,!1,null,null,null),de=me.exports;t(4870),t(3985);function Ae(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timelineFilters.js",e="735513b612ae5923f0d4b382886b28a365a567f4",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timelineFilters.js",statementMap:{0:{start:{line:19,column:21},end:{line:26,column:1}},1:{start:{line:20,column:2},end:{line:25,column:3}},2:{start:{line:28,column:21},end:{line:38,column:1}},3:{start:{line:29,column:2},end:{line:37,column:3}},4:{start:{line:40,column:26},end:{line:49,column:1}},5:{start:{line:41,column:2},end:{line:48,column:6}},6:{start:{line:42,column:26},end:{line:42,column:54}},7:{start:{line:44,column:23},end:{line:44,column:61}},8:{start:{line:45,column:6},end:{line:47,column:8}},9:{start:{line:46,column:8},end:{line:46,column:47}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:19,column:21},end:{line:19,column:22}},loc:{start:{line:19,column:53},end:{line:26,column:1}},line:19},1:{name:"(anonymous_1)",decl:{start:{line:28,column:21},end:{line:28,column:22}},loc:{start:{line:28,column:51},end:{line:38,column:1}},line:28},2:{name:"(anonymous_2)",decl:{start:{line:40,column:26},end:{line:40,column:27}},loc:{start:{line:40,column:67},end:{line:49,column:1}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:42,column:12},end:{line:42,column:13}},loc:{start:{line:42,column:26},end:{line:42,column:54}},line:42},4:{name:"(anonymous_4)",decl:{start:{line:43,column:13},end:{line:43,column:14}},loc:{start:{line:43,column:31},end:{line:48,column:5}},line:43},5:{name:"(anonymous_5)",decl:{start:{line:45,column:37},end:{line:45,column:38}},loc:{start:{line:45,column:51},end:{line:47,column:7}},line:45}},branchMap:{0:{loc:{start:{line:24,column:16},end:{line:24,column:47}},type:"binary-expr",locations:[{start:{line:24,column:16},end:{line:24,column:41}},{start:{line:24,column:45},end:{line:24,column:47}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"735513b612ae5923f0d4b382886b28a365a567f4"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Ae=function(){return o},o}Ae(),Ae().s[0]++;var ve=function(n,e){return Ae().f[0]++,Ae().s[1]++,{name:n.name,color:n.color,messages:n.messages,activities:(Ae().b[0][0]++,e[n.name]||(Ae().b[0][1]++,[]))}};Ae().s[2]++;var pe=function(n,e){return Ae().f[1]++,Ae().s[3]++,{name:"".concat(e.name," ").concat(e.kind),start:new Date(1e3*e.start),end:new Date(1e3*e.stop),color:n.color,type:"activity",timed:!0,activity:e}};Ae().s[4]++;var he=function(n,e){return Ae().f[2]++,Ae().s[5]++,n.filter((function(n){return Ae().f[3]++,Ae().s[6]++,"timeline"===n.type})).flatMap((function(n){Ae().f[4]++;var t=(Ae().s[7]++,ve(n,e));return Ae().s[8]++,t.activities.map((function(n){return Ae().f[5]++,Ae().s[9]++,pe(t,n)}))}))};function Ce(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/chronicleFilters.js",e="4907f54b2e5d6a7406726f4b594b6009022e442e",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/chronicleFilters.js",statementMap:{0:{start:{line:20,column:21},end:{line:27,column:1}},1:{start:{line:21,column:2},end:{line:26,column:3}},2:{start:{line:29,column:27},end:{line:43,column:1}},3:{start:{line:31,column:4},end:{line:33,column:25}},4:{start:{line:34,column:2},end:{line:42,column:3}},5:{start:{line:45,column:26},end:{line:55,column:1}},6:{start:{line:46,column:2},end:{line:54,column:3}},7:{start:{line:57,column:27},end:{line:70,column:1}},8:{start:{line:58,column:2},end:{line:69,column:6}},9:{start:{line:59,column:26},end:{line:59,column:55}},10:{start:{line:61,column:23},end:{line:61,column:61}},11:{start:{line:62,column:6},end:{line:68,column:8}},12:{start:{line:63,column:8},end:{line:67,column:9}},13:{start:{line:64,column:10},end:{line:64,column:51}},14:{start:{line:66,column:10},end:{line:66,column:52}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:20,column:21},end:{line:20,column:22}},loc:{start:{line:20,column:53},end:{line:27,column:1}},line:20},1:{name:"(anonymous_1)",decl:{start:{line:29,column:27},end:{line:29,column:28}},loc:{start:{line:29,column:55},end:{line:43,column:1}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:45,column:26},end:{line:45,column:27}},loc:{start:{line:45,column:53},end:{line:55,column:1}},line:45},3:{name:"(anonymous_3)",decl:{start:{line:57,column:27},end:{line:57,column:28}},loc:{start:{line:57,column:68},end:{line:70,column:1}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:59,column:12},end:{line:59,column:13}},loc:{start:{line:59,column:26},end:{line:59,column:55}},line:59},5:{name:"(anonymous_5)",decl:{start:{line:60,column:13},end:{line:60,column:14}},loc:{start:{line:60,column:31},end:{line:69,column:5}},line:60},6:{name:"(anonymous_6)",decl:{start:{line:62,column:37},end:{line:62,column:38}},loc:{start:{line:62,column:48},end:{line:68,column:7}},line:62}},branchMap:{0:{loc:{start:{line:25,column:16},end:{line:25,column:47}},type:"binary-expr",locations:[{start:{line:25,column:16},end:{line:25,column:41}},{start:{line:25,column:45},end:{line:25,column:47}}],line:25},1:{loc:{start:{line:31,column:4},end:{line:33,column:25}},type:"cond-expr",locations:[{start:{line:32,column:8},end:{line:32,column:50}},{start:{line:33,column:8},end:{line:33,column:25}}],line:31},2:{loc:{start:{line:63,column:8},end:{line:67,column:9}},type:"if",locations:[{start:{line:63,column:8},end:{line:67,column:9}},{start:{line:65,column:15},end:{line:67,column:9}}],line:63}},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,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4907f54b2e5d6a7406726f4b594b6009022e442e"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Ce=function(){return o},o}Ce(),Ce().s[0]++;var fe=function(n,e){return Ce().f[0]++,Ce().s[1]++,{name:n.name,type:n.type,messages:n.messages,chronicles:(Ce().b[0][0]++,e[n.name]||(Ce().b[0][1]++,[]))}};Ce().s[2]++;var ye=function(n,e){Ce().f[1]++;var t=(Ce().s[3]++,e.description.length>16?(Ce().b[1][0]++,"".concat(e.description.substring(0,16),"...")):(Ce().b[1][1]++,e.description));return Ce().s[4]++,{name:t,start:new Date(1e3*e.start),end:new Date(1e3*e.stop),color:e.color,type:e.type,timed:!0,narrative:e}};Ce().s[5]++;var be=function(n,e){return Ce().f[2]++,Ce().s[6]++,{name:"".concat(e.target," ").concat(n.name),start:new Date(e.start),end:new Date(e.start),color:e.color,type:e.type,timed:!0,metadata:e}};Ce().s[7]++;var ge=function(n,e){return Ce().f[3]++,Ce().s[8]++,n.filter((function(n){return Ce().f[4]++,Ce().s[9]++,"chronicle"===n.type})).flatMap((function(n){Ce().f[5]++;var t=(Ce().s[10]++,fe(n,e));return Ce().s[11]++,t.chronicles.map((function(n){return Ce().f[6]++,Ce().s[12]++,"metadata"===t.name?(Ce().b[2][0]++,Ce().s[13]++,be(t,n)):(Ce().b[2][1]++,Ce().s[14]++,ye(t,n))}))}))};function _e(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/EventCalendar.vue",e="49f9aeaad0edf9a3c89949aa1f23c373cfad5e58",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/EventCalendar.vue",statementMap:{0:{start:{line:91,column:4},end:{line:98,column:5}},1:{start:{line:102,column:6},end:{line:104,column:7}},2:{start:{line:103,column:8},end:{line:103,column:45}},3:{start:{line:109,column:6},end:{line:109,column:36}},4:{start:{line:112,column:6},end:{line:112,column:79}},5:{start:{line:116,column:8},end:{line:116,column:29}},6:{start:{line:119,column:8},end:{line:119,column:58}},7:{start:{line:124,column:8},end:{line:124,column:31}},8:{start:{line:127,column:8},end:{line:127,column:60}},9:{start:{line:132,column:8},end:{line:132,column:30}},10:{start:{line:135,column:8},end:{line:135,column:59}},11:{start:{line:140,column:8},end:{line:140,column:25}},12:{start:{line:143,column:8},end:{line:143,column:34}},13:{start:{line:148,column:4},end:{line:148,column:21}},14:{start:{line:149,column:4},end:{line:149,column:23}},15:{start:{line:150,column:4},end:{line:150,column:21}},16:{start:{line:151,column:4},end:{line:151,column:26}},17:{start:{line:155,column:6},end:{line:155,column:21}},18:{start:{line:158,column:6},end:{line:158,column:21}},19:{start:{line:161,column:6},end:{line:161,column:31}},20:{start:{line:162,column:6},end:{line:162,column:31}},21:{start:{line:165,column:6},end:{line:165,column:30}},22:{start:{line:165,column:21},end:{line:165,column:30}},23:{start:{line:166,column:19},end:{line:166,column:50}},24:{start:{line:167,column:6},end:{line:171,column:7}},25:{start:{line:168,column:8},end:{line:168,column:33}},26:{start:{line:170,column:8},end:{line:170,column:36}},27:{start:{line:174,column:6},end:{line:174,column:24}},28:{start:{line:177,column:6},end:{line:179,column:11}},29:{start:{line:182,column:19},end:{line:182,column:40}},30:{start:{line:183,column:20},end:{line:183,column:56}},31:{start:{line:184,column:6},end:{line:184,column:34}},32:{start:{line:187,column:6},end:{line:187,column:58}},33:{start:{line:187,column:24},end:{line:187,column:46}},34:{start:{line:190,column:19},end:{line:196,column:7}},35:{start:{line:191,column:8},end:{line:191,column:34}},36:{start:{line:192,column:8},end:{line:192,column:49}},37:{start:{line:193,column:8},end:{line:195,column:9}},38:{start:{line:194,column:10},end:{line:194,column:65}},39:{start:{line:194,column:39},end:{line:194,column:63}},40:{start:{line:197,column:6},end:{line:202,column:7}},41:{start:{line:198,column:8},end:{line:198,column:33}},42:{start:{line:199,column:8},end:{line:199,column:72}},43:{start:{line:199,column:36},end:{line:199,column:71}},44:{start:{line:199,column:64},end:{line:199,column:70}},45:{start:{line:201,column:8},end:{line:201,column:14}},46:{start:{line:203,column:6},end:{line:203,column:35}},47:{start:{line:206,column:6},end:{line:206,column:50}},48:{start:{line:209,column:6},end:{line:209,column:52}},49:{start:{line:212,column:6},end:{line:216,column:7}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:90,column:2},end:{line:90,column:3}},loc:{start:{line:90,column:9},end:{line:99,column:3}},line:90},1:{name:"(anonymous_1)",decl:{start:{line:101,column:12},end:{line:101,column:13}},loc:{start:{line:101,column:24},end:{line:105,column:5}},line:101},2:{name:"(anonymous_2)",decl:{start:{line:108,column:9},end:{line:108,column:10}},loc:{start:{line:108,column:21},end:{line:110,column:5}},line:108},3:{name:"(anonymous_3)",decl:{start:{line:111,column:10},end:{line:111,column:11}},loc:{start:{line:111,column:22},end:{line:113,column:5}},line:111},4:{name:"(anonymous_4)",decl:{start:{line:115,column:6},end:{line:115,column:7}},loc:{start:{line:115,column:12},end:{line:117,column:7}},line:115},5:{name:"(anonymous_5)",decl:{start:{line:118,column:6},end:{line:118,column:7}},loc:{start:{line:118,column:17},end:{line:120,column:7}},line:118},6:{name:"(anonymous_6)",decl:{start:{line:123,column:6},end:{line:123,column:7}},loc:{start:{line:123,column:12},end:{line:125,column:7}},line:123},7:{name:"(anonymous_7)",decl:{start:{line:126,column:6},end:{line:126,column:7}},loc:{start:{line:126,column:17},end:{line:128,column:7}},line:126},8:{name:"(anonymous_8)",decl:{start:{line:131,column:6},end:{line:131,column:7}},loc:{start:{line:131,column:12},end:{line:133,column:7}},line:131},9:{name:"(anonymous_9)",decl:{start:{line:134,column:6},end:{line:134,column:7}},loc:{start:{line:134,column:17},end:{line:136,column:7}},line:134},10:{name:"(anonymous_10)",decl:{start:{line:139,column:6},end:{line:139,column:7}},loc:{start:{line:139,column:12},end:{line:141,column:7}},line:139},11:{name:"(anonymous_11)",decl:{start:{line:142,column:6},end:{line:142,column:7}},loc:{start:{line:142,column:17},end:{line:144,column:7}},line:142},12:{name:"(anonymous_12)",decl:{start:{line:147,column:2},end:{line:147,column:3}},loc:{start:{line:147,column:12},end:{line:152,column:3}},line:147},13:{name:"(anonymous_13)",decl:{start:{line:154,column:10},end:{line:154,column:11}},loc:{start:{line:154,column:22},end:{line:156,column:5}},line:154},14:{name:"(anonymous_14)",decl:{start:{line:157,column:10},end:{line:157,column:11}},loc:{start:{line:157,column:22},end:{line:159,column:5}},line:157},15:{name:"(anonymous_15)",decl:{start:{line:160,column:11},end:{line:160,column:12}},loc:{start:{line:160,column:23},end:{line:163,column:5}},line:160},16:{name:"(anonymous_16)",decl:{start:{line:164,column:22},end:{line:164,column:23}},loc:{start:{line:164,column:42},end:{line:172,column:5}},line:164},17:{name:"(anonymous_17)",decl:{start:{line:173,column:19},end:{line:173,column:20}},loc:{start:{line:173,column:36},end:{line:175,column:5}},line:173},18:{name:"(anonymous_18)",decl:{start:{line:176,column:20},end:{line:176,column:21}},loc:{start:{line:176,column:32},end:{line:180,column:5}},line:176},19:{name:"(anonymous_19)",decl:{start:{line:181,column:18},end:{line:181,column:19}},loc:{start:{line:181,column:30},end:{line:185,column:5}},line:181},20:{name:"(anonymous_20)",decl:{start:{line:186,column:16},end:{line:186,column:17}},loc:{start:{line:186,column:28},end:{line:188,column:5}},line:186},21:{name:"(anonymous_21)",decl:{start:{line:187,column:18},end:{line:187,column:19}},loc:{start:{line:187,column:24},end:{line:187,column:46}},line:187},22:{name:"(anonymous_22)",decl:{start:{line:189,column:15},end:{line:189,column:16}},loc:{start:{line:189,column:49},end:{line:204,column:5}},line:189},23:{name:"(anonymous_23)",decl:{start:{line:190,column:19},end:{line:190,column:20}},loc:{start:{line:190,column:25},end:{line:196,column:7}},line:190},24:{name:"(anonymous_24)",decl:{start:{line:193,column:30},end:{line:193,column:31}},loc:{start:{line:194,column:10},end:{line:194,column:65}},line:194},25:{name:"(anonymous_25)",decl:{start:{line:194,column:32},end:{line:194,column:33}},loc:{start:{line:194,column:39},end:{line:194,column:63}},line:194},26:{name:"(anonymous_26)",decl:{start:{line:199,column:30},end:{line:199,column:31}},loc:{start:{line:199,column:36},end:{line:199,column:71}},line:199},27:{name:"(anonymous_27)",decl:{start:{line:199,column:58},end:{line:199,column:59}},loc:{start:{line:199,column:64},end:{line:199,column:70}},line:199},28:{name:"(anonymous_28)",decl:{start:{line:205,column:17},end:{line:205,column:18}},loc:{start:{line:205,column:29},end:{line:207,column:5}},line:205},29:{name:"(anonymous_29)",decl:{start:{line:208,column:18},end:{line:208,column:19}},loc:{start:{line:208,column:30},end:{line:210,column:5}},line:208},30:{name:"(anonymous_30)",decl:{start:{line:211,column:13},end:{line:211,column:14}},loc:{start:{line:211,column:33},end:{line:217,column:5}},line:211}},branchMap:{0:{loc:{start:{line:102,column:6},end:{line:104,column:7}},type:"if",locations:[{start:{line:102,column:6},end:{line:104,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:102},1:{loc:{start:{line:112,column:13},end:{line:112,column:79}},type:"cond-expr",locations:[{start:{line:112,column:26},end:{line:112,column:69}},{start:{line:112,column:72},end:{line:112,column:79}}],line:112},2:{loc:{start:{line:165,column:6},end:{line:165,column:30}},type:"if",locations:[{start:{line:165,column:6},end:{line:165,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:165},3:{loc:{start:{line:167,column:6},end:{line:171,column:7}},type:"if",locations:[{start:{line:167,column:6},end:{line:171,column:7}},{start:{line:169,column:13},end:{line:171,column:7}}],line:167},4:{loc:{start:{line:177,column:13},end:{line:179,column:11}},type:"cond-expr",locations:[{start:{line:178,column:10},end:{line:178,column:66}},{start:{line:179,column:10},end:{line:179,column:11}}],line:177},5:{loc:{start:{line:197,column:6},end:{line:202,column:7}},type:"if",locations:[{start:{line:197,column:6},end:{line:202,column:7}},{start:{line:200,column:13},end:{line:202,column:7}}],line:197}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,sources:["EventCalendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventCalendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-sheet height="800" class="mt-1">\n <v-calendar\n v-model="focus"\n ref="mainCalendar"\n color="primary"\n :events="events"\n :event-color="getEventColor"\n :type="type"\n @click:event="showEvent"\n @click:more="viewDay"\n @click:date="viewDay"\n >\n \x3c!---\n <template v-slot:event="{ event }">\n <div class="mr-1">\n <span class="font-weight-bold" v-text="event.name" />\n <br />\n <span>{{ event.start | time(calendarConfiguration.utc) }}</span>\n </div>\n </template>\n ---\x3e\n <template v-slot:day-body="{ date, week }">\n <div\n class="v-current-time"\n :class="{ first: date === week[0].date }"\n :style="{ top: nowY }"\n />\n </template>\n </v-calendar>\n <v-menu\n v-model="selectedOpen"\n :close-on-content-click="false"\n :activator="selectedElement"\n >\n <event-dialog\n v-model="selectedOpen"\n :event="selectedEvent"\n :utc="utc"\n @close="close"\n />\n </v-menu>\n </v-sheet>\n \x3c!-- MENUS --\x3e\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport EventDialog from \'@/tools/Calendar/Dialogs/EventDialog\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport { getTimelineEvents } from \'@/tools/Calendar/Filters/timelineFilters.js\'\nimport { getChronicleEvents } from \'@/tools/Calendar/Filters/chronicleFilters.js\'\n\nexport default {\n components: {\n EventDialog,\n },\n mixins: [TimeFilters],\n props: {\n events: {\n type: Array,\n required: true,\n },\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n selectedEvent: null,\n selectedElement: null,\n selectedOpen: false,\n showCreateDialog: false,\n showEventDialog: false,\n showUpdateDialog: false,\n }\n },\n watch: {\n events: function () {\n if (this.ready) {\n this.$refs.mainCalendar.checkChange()\n }\n },\n },\n computed: {\n cal: function () {\n return this.$refs.mainCalendar\n },\n nowY: function () {\n return this.ready ? this.cal.timeToY(this.cal.times.now) + \'px\' : \'-10px\'\n },\n utc: {\n get() {\n return this.value.utc\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, utc: value }) // input is the default event when using v-model\n },\n },\n focus: {\n get() {\n return this.value.focus\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, focus: value }) // input is the default event when using v-model\n },\n },\n type: {\n get() {\n return this.value.type\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, type: value }) // input is the default event when using v-model\n },\n },\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n mounted() {\n this.ready = true\n this.scrollToTime()\n this.updateTime()\n this.cal.checkChange()\n },\n methods: {\n prev: function () {\n this.cal.prev()\n },\n next: function () {\n this.cal.next()\n },\n close: function () {\n this.selectedOpen = false\n this.selectedEvent = null\n },\n generateDateTime: function (activity) {\n if (!activity) return \'\'\n const date = new Date(activity.start * 1000)\n if (this.displayTimeInUtc) {\n return date.toUTCString()\n } else {\n return date.toLocaleString() // TODO: support other locales besides en-US\n }\n },\n getEventColor: function (event) {\n return event.color\n },\n getCurrentTime: function () {\n return this.ready\n ? this.cal.times.now.hour * 60 + this.cal.times.now.minute\n : 0\n },\n scrollToTime: function () {\n const time = this.getCurrentTime()\n const first = Math.max(0, time - (time % 30) - 30)\n this.cal.scrollToTime(first)\n },\n updateTime: function () {\n setInterval(() => this.cal.updateTimes(), 60 * 1000)\n },\n showEvent: function ({ nativeEvent, event }) {\n const open = () => {\n this.selectedEvent = event\n this.selectedElement = nativeEvent.target\n requestAnimationFrame(() =>\n requestAnimationFrame(() => (this.selectedOpen = true))\n )\n }\n if (this.selectedOpen) {\n this.selectedOpen = false\n requestAnimationFrame(() => requestAnimationFrame(() => open()))\n } else {\n open()\n }\n nativeEvent.stopPropagation()\n },\n eventDialog: function () {\n this.showEventDialog = !this.showEventDialog\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n viewDay: function ({ date }) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n type: \'day\',\n focus: date,\n }\n },\n },\n}\n<\/script>\n\n<style scoped lang="scss">\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n.v-current-time {\n height: 2px;\n background-color: #ea4335;\n position: absolute;\n left: -1px;\n right: 0;\n pointer-events: none;\n\n &.first::before {\n content: \'\';\n position: absolute;\n background-color: #ea4335;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n margin-top: -5px;\n margin-left: -6.5px;\n }\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"49f9aeaad0edf9a3c89949aa1f23c373cfad5e58"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return _e=function(){return o},o}_e();var we={components:{EventDialog:de},mixins:[$],props:{events:{type:Array,required:!0},value:{type:Object,required:!0}},data:function(){return _e().f[0]++,_e().s[0]++,{selectedEvent:null,selectedElement:null,selectedOpen:!1,showCreateDialog:!1,showEventDialog:!1,showUpdateDialog:!1}},watch:{events:function(){_e().f[1]++,_e().s[1]++,this.ready?(_e().b[0][0]++,_e().s[2]++,this.$refs.mainCalendar.checkChange()):_e().b[0][1]++}},computed:{cal:function(){return _e().f[2]++,_e().s[3]++,this.$refs.mainCalendar},nowY:function(){return _e().f[3]++,_e().s[4]++,this.ready?(_e().b[1][0]++,this.cal.timeToY(this.cal.times.now)+"px"):(_e().b[1][1]++,"-10px")},utc:{get:function(){return _e().f[4]++,_e().s[5]++,this.value.utc},set:function(n){_e().f[5]++,_e().s[6]++,this.$emit("input",(0,a.Z)((0,a.Z)({},this.value),{},{utc:n}))}},focus:{get:function(){return _e().f[6]++,_e().s[7]++,this.value.focus},set:function(n){_e().f[7]++,_e().s[8]++,this.$emit("input",(0,a.Z)((0,a.Z)({},this.value),{},{focus:n}))}},type:{get:function(){return _e().f[8]++,_e().s[9]++,this.value.type},set:function(n){_e().f[9]++,_e().s[10]++,this.$emit("input",(0,a.Z)((0,a.Z)({},this.value),{},{type:n}))}},calendarConfiguration:{get:function(){return _e().f[10]++,_e().s[11]++,this.value},set:function(n){_e().f[11]++,_e().s[12]++,this.$emit("input",n)}}},mounted:function(){_e().f[12]++,_e().s[13]++,this.ready=!0,_e().s[14]++,this.scrollToTime(),_e().s[15]++,this.updateTime(),_e().s[16]++,this.cal.checkChange()},methods:{prev:function(){_e().f[13]++,_e().s[17]++,this.cal.prev()},next:function(){_e().f[14]++,_e().s[18]++,this.cal.next()},close:function(){_e().f[15]++,_e().s[19]++,this.selectedOpen=!1,_e().s[20]++,this.selectedEvent=null},generateDateTime:function(n){if(_e().f[16]++,_e().s[21]++,!n)return _e().b[2][0]++,_e().s[22]++,"";_e().b[2][1]++;var e=(_e().s[23]++,new Date(1e3*n.start));return _e().s[24]++,this.displayTimeInUtc?(_e().b[3][0]++,_e().s[25]++,e.toUTCString()):(_e().b[3][1]++,_e().s[26]++,e.toLocaleString())},getEventColor:function(n){return _e().f[17]++,_e().s[27]++,n.color},getCurrentTime:function(){return _e().f[18]++,_e().s[28]++,this.ready?(_e().b[4][0]++,60*this.cal.times.now.hour+this.cal.times.now.minute):(_e().b[4][1]++,0)},scrollToTime:function(){_e().f[19]++;var n=(_e().s[29]++,this.getCurrentTime()),e=(_e().s[30]++,Math.max(0,n-n%30-30));_e().s[31]++,this.cal.scrollToTime(e)},updateTime:function(){var n=this;_e().f[20]++,_e().s[32]++,setInterval((function(){return _e().f[21]++,_e().s[33]++,n.cal.updateTimes()}),6e4)},showEvent:function(n){var e=this,t=n.nativeEvent,i=n.event;_e().f[22]++,_e().s[34]++;var l=function(){_e().f[23]++,_e().s[35]++,e.selectedEvent=i,_e().s[36]++,e.selectedElement=t.target,_e().s[37]++,requestAnimationFrame((function(){return _e().f[24]++,_e().s[38]++,requestAnimationFrame((function(){return _e().f[25]++,_e().s[39]++,e.selectedOpen=!0}))}))};_e().s[40]++,this.selectedOpen?(_e().b[5][0]++,_e().s[41]++,this.selectedOpen=!1,_e().s[42]++,requestAnimationFrame((function(){return _e().f[26]++,_e().s[43]++,requestAnimationFrame((function(){return _e().f[27]++,_e().s[44]++,l()}))}))):(_e().b[5][1]++,_e().s[45]++,l()),_e().s[46]++,t.stopPropagation()},eventDialog:function(){_e().f[28]++,_e().s[47]++,this.showEventDialog=!this.showEventDialog},updateDialog:function(){_e().f[29]++,_e().s[48]++,this.showUpdateDialog=!this.showUpdateDialog},viewDay:function(n){var e=n.date;_e().f[30]++,_e().s[49]++,this.calendarConfiguration=(0,a.Z)((0,a.Z)({},this.calendarConfiguration),{},{type:"day",focus:e})}}},xe=we,Te=(t(4067),(0,k.Z)(xe,S,M,!1,null,"8cfd7c66",null)),ke=Te.exports,Ee=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-toolbar",{staticClass:"my-1"},[t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{"data-test":"create-event",outlined:""}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-plus-box ")]),t("span",[n._v(" Create ")]),t("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"narrative"},on:{click:function(e){n.showNarrationCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-calendar-clock ")]),t("v-list-item-title",[n._v(" Chronicle Narration ")])],1),t("v-list-item",{attrs:{"data-test":"metadata"},on:{click:function(e){n.showMetadataCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-calendar-check ")]),t("v-list-item-title",[n._v(" Chronicle Metadata ")])],1),t("v-list-item",{attrs:{"data-test":"activity"},on:{click:function(e){n.showActivityCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-calendar-question ")]),t("v-list-item-title",[n._v(" Timeline Activity ")])],1)],1)],1),t("v-btn",{staticClass:"mx-3",attrs:{outlined:"","data-test":"today"},on:{click:n.setToday}},[n._v(" Today ")]),t("v-btn",{attrs:{fab:"",text:"",small:"","data-test":"prev"},on:{click:n.prev}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-left ")])],1),t("v-btn",{attrs:{fab:"",text:"",small:"","data-test":"next"},on:{click:n.next}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-right ")])],1),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer"),t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{staticClass:"mx-2",attrs:{icon:"","data-test":"settings"}},[t("v-icon",[n._v(" mdi-cog ")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"refresh"},on:{click:n.refresh}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-refresh ")]),t("v-list-item-title",[n._v(" Refresh Display ")])],1),t("v-list-item",{attrs:{"data-test":"show-table"},on:{click:n.showTable}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-timetable ")]),t("v-list-item-title",[n._v(" Show Table Display ")])],1),t("v-list-item",{attrs:{"data-test":"display-utc-time"},on:{click:n.updateTime}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-clock ")]),t("v-list-item-title",[n._v(" Toggle UTC Display ")])],1),t("v-list-item",{attrs:{"data-test":"download-event-list"},on:{click:n.downloadEvents}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-download ")]),t("v-list-item-title",[n._v(" Download Event List ")])],1)],1)],1),t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{outlined:"","data-test":"change-type",width:"125"}},[t("span",[n._v(n._s(n.typeToLabel[n.type]))]),t("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"type-day"},on:{click:function(e){return n.updateType("day")}}},[t("v-list-item-title",[n._v(" Day ")])],1),t("v-list-item",{attrs:{"data-test":"type-four-day"},on:{click:function(e){return n.updateType("4day")}}},[t("v-list-item-title",[n._v("4 Days")])],1),t("v-list-item",{attrs:{"data-test":"type-week"},on:{click:function(e){return n.updateType("week")}}},[t("v-list-item-title",[n._v(" Week ")])],1)],1)],1)],1),n.showEventTableDialog?t("event-list-dialog",{attrs:{events:n.events,utc:n.utc},model:{value:n.showEventTableDialog,callback:function(e){n.showEventTableDialog=e},expression:"showEventTableDialog"}}):n._e(),n.showMetadataCreateDialog?t("metadata-create-dialog",{model:{value:n.showMetadataCreateDialog,callback:function(e){n.showMetadataCreateDialog=e},expression:"showMetadataCreateDialog"}}):n._e(),n.showNarrationCreateDialog?t("narration-create-dialog",{model:{value:n.showNarrationCreateDialog,callback:function(e){n.showNarrationCreateDialog=e},expression:"showNarrationCreateDialog"}}):n._e(),n.showActivityCreateDialog?t("activity-create-dialog",{attrs:{timelines:n.timelines},model:{value:n.showActivityCreateDialog,callback:function(e){n.showActivityCreateDialog=e},expression:"showActivityCreateDialog"}}):n._e()],1)},De=[],Se=(t(6710),t(8673),t(6886),t(4121),t(523),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Events")]),t("v-spacer")],1),t("v-data-table",{staticClass:"mt-1",attrs:{"item-key":"eventId",headers:n.eventHeaders,items:n.listData},scopedSlots:n._u([{key:"no-data",fn:function(){return[t("span",[n._v(" No events ")])]},proxy:!0}]),model:{value:n.selected,callback:function(e){n.selected=e},expression:"selected"}})],1)],1)}),Me=[];function Fe(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventListDialog.vue",e="1111c91456f3c78ea1694384ed61c7486217d209",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventListDialog.vue",statementMap:{0:{start:{line:65,column:4},end:{line:73,column:5}},1:{start:{line:77,column:6},end:{line:77,column:33}},2:{start:{line:77,column:24},end:{line:77,column:33}},3:{start:{line:78,column:20},end:{line:78,column:21}},4:{start:{line:79,column:6},end:{line:95,column:8}},5:{start:{line:80,column:8},end:{line:80,column:20}},6:{start:{line:82,column:8},end:{line:88,column:9}},7:{start:{line:83,column:10},end:{line:83,column:46}},8:{start:{line:84,column:10},end:{line:84,column:43}},9:{start:{line:86,column:10},end:{line:86,column:49}},10:{start:{line:87,column:10},end:{line:87,column:46}},11:{start:{line:89,column:8},end:{line:94,column:9}},12:{start:{line:99,column:8},end:{line:99,column:25}},13:{start:{line:102,column:8},end:{line:102,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:9},end:{line:74,column:3}},line:64},1:{name:"(anonymous_1)",decl:{start:{line:76,column:14},end:{line:76,column:15}},loc:{start:{line:76,column:26},end:{line:96,column:5}},line:76},2:{name:"(anonymous_2)",decl:{start:{line:79,column:29},end:{line:79,column:30}},loc:{start:{line:79,column:40},end:{line:95,column:7}},line:79},3:{name:"(anonymous_3)",decl:{start:{line:98,column:6},end:{line:98,column:7}},loc:{start:{line:98,column:12},end:{line:100,column:7}},line:98},4:{name:"(anonymous_4)",decl:{start:{line:101,column:6},end:{line:101,column:7}},loc:{start:{line:101,column:17},end:{line:103,column:7}},line:101},5:{name:"(anonymous_5)",decl:{start:{line:106,column:11},end:{line:106,column:12}},loc:{start:{line:106,column:23},end:{line:108,column:3}},line:106}},branchMap:{0:{loc:{start:{line:77,column:6},end:{line:77,column:33}},type:"if",locations:[{start:{line:77,column:6},end:{line:77,column:33}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:77},1:{loc:{start:{line:82,column:8},end:{line:88,column:9}},type:"if",locations:[{start:{line:82,column:8},end:{line:88,column:9}},{start:{line:85,column:15},end:{line:88,column:9}}],line:82}},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,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["EventListDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventListDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog v-model=\"show\" width=\"600\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Events</span>\n <v-spacer />\n </v-system-bar>\n <v-data-table\n v-model=\"selected\"\n item-key=\"eventId\"\n class=\"mt-1\"\n :headers=\"eventHeaders\"\n :items=\"listData\"\n >\n <template v-slot:no-data>\n <span> No events </span>\n </template>\n </v-data-table>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from 'date-fns'\nimport TimeFilters from '@/tools/Calendar/Filters/timeFilters.js'\n\nexport default {\n components: {},\n mixins: [TimeFilters],\n props: {\n events: {\n type: Array,\n required: true,\n },\n utc: {\n type: Boolean,\n default: true,\n },\n value: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n selected: [],\n eventHeaders: [\n { text: 'Name', value: 'name' },\n { text: 'Start', value: 'startStr' },\n { text: 'Stop', value: 'stopStr' },\n { text: 'Type', value: 'type' },\n ],\n }\n },\n computed: {\n listData: function () {\n if (!this.events) return []\n let eventId = 0\n return this.events.map((event) => {\n eventId += 1\n let startStr, stopStr\n if (this.utc) {\n startStr = event.start.toUTCString()\n stopStr = event.end.toUTCString()\n } else {\n startStr = event.start.toLocaleString()\n stopStr = event.end.toLocaleString()\n }\n return {\n ...event,\n startStr,\n stopStr,\n eventId,\n }\n })\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n },\n mounted: function () {\n // console.log(this.events)\n },\n methods: {},\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1111c91456f3c78ea1694384ed61c7486217d209"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Fe=function(){return o},o}Fe();var Ne={components:{},mixins:[$],props:{events:{type:Array,required:!0},utc:{type:Boolean,default:!0},value:{type:Boolean,required:!0}},data:function(){return Fe().f[0]++,Fe().s[0]++,{selected:[],eventHeaders:[{text:"Name",value:"name"},{text:"Start",value:"startStr"},{text:"Stop",value:"stopStr"},{text:"Type",value:"type"}]}},computed:{listData:function(){var n=this;if(Fe().f[1]++,Fe().s[1]++,!this.events)return Fe().b[0][0]++,Fe().s[2]++,[];Fe().b[0][1]++;var e=(Fe().s[3]++,0);return Fe().s[4]++,this.events.map((function(t){var i,l;return Fe().f[2]++,Fe().s[5]++,e+=1,Fe().s[6]++,n.utc?(Fe().b[1][0]++,Fe().s[7]++,i=t.start.toUTCString(),Fe().s[8]++,l=t.end.toUTCString()):(Fe().b[1][1]++,Fe().s[9]++,i=t.start.toLocaleString(),Fe().s[10]++,l=t.end.toLocaleString()),Fe().s[11]++,(0,a.Z)((0,a.Z)({},t),{},{startStr:i,stopStr:l,eventId:e})}))},show:{get:function(){return Fe().f[3]++,Fe().s[12]++,this.value},set:function(n){Fe().f[4]++,Fe().s[13]++,this.$emit("input",n)}}},mounted:function(){Fe().f[5]++},methods:{}},Ie=Ne,Oe=(0,k.Z)(Ie,Se,Me,!1,null,null,null),Re=Oe.exports,$e=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createActivity.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Activity")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-activity-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.timelineNames,label:"Timeline","data-test":"activity-select-timeline"},scopedSlots:n._u([{key:"item",fn:function(e){var i=e.item,l=e.attrs,a=e.on;return[t("v-list-item",n._g(n._b({attrs:{"data-test":"activity-select-timeline-"+i}},"v-list-item",l,!1),a),[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(i)}})],1)],1)]}}]),model:{value:n.timeline,callback:function(e){n.timeline=e},expression:"timeline"}}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"activity-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"activity-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"activity-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"activity-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-activity-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Activity type input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.types,label:"Activity Type","data-test":"activity-select-type"},scopedSlots:n._u([{key:"item",fn:function(e){var i=e.item,l=e.attrs,a=e.on;return[t("v-list-item",n._g(n._b({attrs:{"data-test":"activity-select-type-"+i}},"v-list-item",l,!1),a),[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(i)}})],1)],1)]}}]),model:{value:n.kind,callback:function(e){n.kind=e},expression:"kind"}}),"COMMAND"===n.kind?t("div",[t("v-text-field",{attrs:{type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline runs commands with cmd_no_hazardous_check","data-test":"activity-cmd"},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}})],1):"SCRIPT"===n.kind?t("div",[t("script-chooser",{on:{file:n.fileHandler}}),t("environment-chooser",{on:{selected:n.selectedHandler}})],1):t("div",[t("span",{staticClass:"ma-2"},[n._v(" No required input ")])]),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-activity-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-activity-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createActivity.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},Ue=[];function Le(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityCreateDialog.vue",e="b709e6762a7311b9571b770535b22c6ebb596415",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityCreateDialog.vue",statementMap:{0:{start:{line:233,column:4},end:{line:248,column:5}},1:{start:{line:246,column:29},end:{line:246,column:50}},2:{start:{line:251,column:4},end:{line:251,column:23}},3:{start:{line:255,column:6},end:{line:257,column:7}},4:{start:{line:256,column:8},end:{line:256,column:56}},5:{start:{line:258,column:18},end:{line:258,column:28}},6:{start:{line:259,column:20},end:{line:259,column:69}},7:{start:{line:260,column:19},end:{line:260,column:66}},8:{start:{line:261,column:6},end:{line:263,column:7}},9:{start:{line:262,column:8},end:{line:262,column:93}},10:{start:{line:264,column:6},end:{line:266,column:7}},11:{start:{line:265,column:8},end:{line:265,column:68}},12:{start:{line:267,column:6},end:{line:269,column:7}},13:{start:{line:268,column:8},end:{line:268,column:64}},14:{start:{line:270,column:6},end:{line:270,column:17}},15:{start:{line:273,column:6},end:{line:275,column:7}},16:{start:{line:274,column:8},end:{line:274,column:48}},17:{start:{line:276,column:6},end:{line:276,column:17}},18:{start:{line:279,column:6},end:{line:281,column:8}},19:{start:{line:280,column:8},end:{line:280,column:28}},20:{start:{line:285,column:8},end:{line:285,column:25}},21:{start:{line:288,column:8},end:{line:288,column:34}},22:{start:{line:294,column:6},end:{line:296,column:7}},23:{start:{line:295,column:8},end:{line:295,column:14}},24:{start:{line:297,column:6},end:{line:297,column:27}},25:{start:{line:298,column:6},end:{line:298,column:28}},26:{start:{line:301,column:6},end:{line:301,column:46}},27:{start:{line:304,column:6},end:{line:304,column:53}},28:{start:{line:307,column:6},end:{line:307,column:25}},29:{start:{line:308,column:6},end:{line:308,column:55}},30:{start:{line:309,column:6},end:{line:309,column:53}},31:{start:{line:310,column:6},end:{line:310,column:54}},32:{start:{line:311,column:6},end:{line:311,column:52}},33:{start:{line:312,column:6},end:{line:312,column:29}},34:{start:{line:313,column:6},end:{line:313,column:20}},35:{start:{line:314,column:6},end:{line:314,column:28}},36:{start:{line:315,column:6},end:{line:315,column:35}},37:{start:{line:319,column:20},end:{line:321,column:7}},38:{start:{line:322,column:19},end:{line:324,column:7}},39:{start:{line:325,column:19},end:{line:325,column:42}},40:{start:{line:326,column:17},end:{line:326,column:58}},41:{start:{line:327,column:6},end:{line:327,column:36}},42:{start:{line:328,column:6},end:{line:338,column:8}},43:{start:{line:331,column:29},end:{line:333,column:9}},44:{start:{line:334,column:8},end:{line:337,column:10}},45:{start:{line:339,column:6},end:{line:339,column:28}},46:{start:{line:340,column:6},end:{line:340,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:232,column:2},end:{line:232,column:3}},loc:{start:{line:232,column:9},end:{line:249,column:3}},line:232},1:{name:"(anonymous_1)",decl:{start:{line:246,column:18},end:{line:246,column:19}},loc:{start:{line:246,column:29},end:{line:246,column:50}},line:246},2:{name:"(anonymous_2)",decl:{start:{line:250,column:11},end:{line:250,column:12}},loc:{start:{line:250,column:23},end:{line:252,column:3}},line:250},3:{name:"(anonymous_3)",decl:{start:{line:254,column:15},end:{line:254,column:16}},loc:{start:{line:254,column:27},end:{line:271,column:5}},line:254},4:{name:"(anonymous_4)",decl:{start:{line:272,column:15},end:{line:272,column:16}},loc:{start:{line:272,column:27},end:{line:277,column:5}},line:272},5:{name:"(anonymous_5)",decl:{start:{line:278,column:19},end:{line:278,column:20}},loc:{start:{line:278,column:31},end:{line:282,column:5}},line:278},6:{name:"(anonymous_6)",decl:{start:{line:279,column:32},end:{line:279,column:33}},loc:{start:{line:279,column:46},end:{line:281,column:7}},line:279},7:{name:"(anonymous_7)",decl:{start:{line:284,column:6},end:{line:284,column:7}},loc:{start:{line:284,column:12},end:{line:286,column:7}},line:284},8:{name:"(anonymous_8)",decl:{start:{line:287,column:6},end:{line:287,column:7}},loc:{start:{line:287,column:17},end:{line:289,column:7}},line:287},9:{name:"(anonymous_9)",decl:{start:{line:293,column:16},end:{line:293,column:17}},loc:{start:{line:293,column:37},end:{line:299,column:5}},line:293},10:{name:"(anonymous_10)",decl:{start:{line:300,column:17},end:{line:300,column:18}},loc:{start:{line:300,column:34},end:{line:302,column:5}},line:300},11:{name:"(anonymous_11)",decl:{start:{line:303,column:21},end:{line:303,column:22}},loc:{start:{line:303,column:38},end:{line:305,column:5}},line:303},12:{name:"(anonymous_12)",decl:{start:{line:306,column:18},end:{line:306,column:19}},loc:{start:{line:306,column:30},end:{line:316,column:5}},line:306},13:{name:"(anonymous_13)",decl:{start:{line:317,column:20},end:{line:317,column:21}},loc:{start:{line:317,column:32},end:{line:341,column:5}},line:317},14:{name:"(anonymous_14)",decl:{start:{line:330,column:14},end:{line:330,column:15}},loc:{start:{line:330,column:28},end:{line:338,column:7}},line:330}},branchMap:{0:{loc:{start:{line:246,column:29},end:{line:246,column:50}},type:"binary-expr",locations:[{start:{line:246,column:29},end:{line:246,column:36}},{start:{line:246,column:40},end:{line:246,column:50}}],line:246},1:{loc:{start:{line:255,column:6},end:{line:257,column:7}},type:"if",locations:[{start:{line:255,column:6},end:{line:257,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:255},2:{loc:{start:{line:261,column:6},end:{line:263,column:7}},type:"if",locations:[{start:{line:261,column:6},end:{line:263,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:261},3:{loc:{start:{line:264,column:6},end:{line:266,column:7}},type:"if",locations:[{start:{line:264,column:6},end:{line:266,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:264},4:{loc:{start:{line:267,column:6},end:{line:269,column:7}},type:"if",locations:[{start:{line:267,column:6},end:{line:269,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:267},5:{loc:{start:{line:273,column:6},end:{line:275,column:7}},type:"if",locations:[{start:{line:273,column:6},end:{line:275,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:273},6:{loc:{start:{line:273,column:10},end:{line:273,column:55}},type:"binary-expr",locations:[{start:{line:273,column:10},end:{line:273,column:33}},{start:{line:273,column:37},end:{line:273,column:55}}],line:273},7:{loc:{start:{line:294,column:6},end:{line:296,column:7}},type:"if",locations:[{start:{line:294,column:6},end:{line:296,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:294},8:{loc:{start:{line:301,column:26},end:{line:301,column:46}},type:"cond-expr",locations:[{start:{line:301,column:34},end:{line:301,column:39}},{start:{line:301,column:42},end:{line:301,column:46}}],line:301},9:{loc:{start:{line:304,column:33},end:{line:304,column:53}},type:"cond-expr",locations:[{start:{line:304,column:41},end:{line:304,column:46}},{start:{line:304,column:49},end:{line:304,column:53}}],line:304}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,sources:["ActivityCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createActivity">\n <v-system-bar>\n <v-spacer />\n <span>Create Activity</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-activity-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-select\n v-model="timeline"\n :items="timelineNames"\n label="Timeline"\n data-test="activity-select-timeline"\n >\n <template v-slot:item="{ item, attrs, on }">\n <v-list-item\n v-on="on"\n v-bind="attrs" \n :data-test="`activity-select-timeline-${item}`"\n >\n <v-list-item-content>\n <v-list-item-title v-text="item" />\n </v-list-item-content>\n </v-list-item>\n </template>\n </v-select>\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-activity-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Activity type input\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <v-select\n v-model="kind"\n :items="types"\n label="Activity Type"\n data-test="activity-select-type"\n >\n <template v-slot:item="{ item, attrs, on }">\n <v-list-item\n v-on="on"\n v-bind="attrs" \n :data-test="`activity-select-type-${item}`"\n >\n <v-list-item-content>\n <v-list-item-title v-text="item" />\n </v-list-item-content>\n </v-list-item>\n </template>\n </v-select>\n <div v-if="kind === \'COMMAND\'">\n <v-text-field\n v-model="activityData"\n type="text"\n label="Command Input"\n placeholder="INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0"\n prefix="cmd(\'"\n suffix="\')"\n hint="Timeline runs commands with cmd_no_hazardous_check"\n data-test="activity-cmd"\n />\n </div>\n <div v-else-if="kind === \'SCRIPT\'">\n <script-chooser @file="fileHandler" />\n <environment-chooser @selected="selectedHandler" />\n </div>\n <div v-else>\n <span class="ma-2"> No required input </span>\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-activity-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createActivity"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-activity-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentChooser from \'@cosmosc2/tool-common/src/components/EnvironmentChooser\'\nimport ScriptChooser from \'@cosmosc2/tool-common/src/components/ScriptChooser\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\n\nexport default {\n components: {\n EnvironmentChooser,\n ScriptChooser,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n timeline: null,\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n kind: \'\',\n types: [\'COMMAND\', \'SCRIPT\', \'RESERVE\'],\n activityData: \'\',\n activityEnvironment: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n },\n computed: {\n timeError: function () {\n if (!this.timeline) {\n return \'Activity must have a timeline selected.\'\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Activity must have different start and stop times.\'\n }\n if (now > start) {\n return \'Invalid start time. Activity must be in the future.\'\n }\n if (start > stop) {\n return \'Invalid start time. Activity start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (this.kind !== \'RESERVE\' && !this.activityData) {\n return \'No data is selected or inputted\'\n }\n return null\n },\n timelineNames: function () {\n return this.timelines.map((timeline) => {\n return timeline.name\n })\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n changeKind: function (inputKind) {\n if (inputKind === this.kind) {\n return\n }\n this.kind = inputKind\n this.activityData = \'\'\n },\n fileHandler: function (event) {\n this.activityData = event ? event : null\n },\n selectedHandler: function (event) {\n this.activityEnvironment = event ? event : null\n },\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.stopDate = format(new Date(), \'yyyy-MM-dd\')\n this.stopTime = format(new Date(), \'HH:mm:ss\')\n this.utcOrLocal = \'loc\'\n this.kind = \'\'\n this.activityData = \'\'\n this.activityEnvironment = []\n },\n createActivity: function () {\n // Call the api to create a new activity to add to the activities array\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const kind = this.kind.toLowerCase()\n let data = { environment: this.activityEnvironment }\n data[kind] = this.activityData\n Api.post(`/cosmos-api/timeline/${this.timeline}/activities`, {\n data: { start, stop, kind, data },\n }).then((response) => {\n const activityTime = this.generateDateTime(\n new Date(response.data.start * 1000)\n )\n this.$notify.normal({\n title: \'Created Activity\',\n body: `${activityTime} (${response.data.start}) on timeline: ${response.data.name}`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b709e6762a7311b9571b770535b22c6ebb596415"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Le=function(){return o},o}Le();var Pe={components:{EnvironmentChooser:Q,ScriptChooser:an},props:{timelines:{type:Array,required:!0},value:Boolean},mixins:[$],data:function(){return Le().f[0]++,Le().s[0]++,{timeline:null,dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:function(n){return Le().f[1]++,Le().s[1]++,Le().b[0][0]++,!!n||(Le().b[0][1]++,"Required")}}}},mounted:function(){Le().f[2]++,Le().s[2]++,this.updateValues()},computed:{timeError:function(){if(Le().f[3]++,Le().s[3]++,!this.timeline)return Le().b[1][0]++,Le().s[4]++,"Activity must have a timeline selected.";Le().b[1][1]++;var n=(Le().s[5]++,new Date),e=(Le().s[6]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),t=(Le().s[7]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Le().s[8]++,e===t?(Le().b[2][0]++,Le().s[9]++,"Invalid start, stop time. Activity must have different start and stop times."):(Le().b[2][1]++,Le().s[10]++,n>e?(Le().b[3][0]++,Le().s[11]++,"Invalid start time. Activity must be in the future."):(Le().b[3][1]++,Le().s[12]++,e>t?(Le().b[4][0]++,Le().s[13]++,"Invalid start time. Activity start before stop."):(Le().b[4][1]++,Le().s[14]++,null)))},typeError:function(){return Le().f[4]++,Le().s[15]++,Le().b[6][0]++,"RESERVE"===this.kind||(Le().b[6][1]++,this.activityData)?(Le().b[5][1]++,Le().s[17]++,null):(Le().b[5][0]++,Le().s[16]++,"No data is selected or inputted")},timelineNames:function(){return Le().f[5]++,Le().s[18]++,this.timelines.map((function(n){return Le().f[6]++,Le().s[19]++,n.name}))},show:{get:function(){return Le().f[7]++,Le().s[20]++,this.value},set:function(n){Le().f[8]++,Le().s[21]++,this.$emit("input",n)}}},methods:{changeKind:function(n){if(Le().f[9]++,Le().s[22]++,n===this.kind)return Le().b[7][0]++,void Le().s[23]++;Le().b[7][1]++,Le().s[24]++,this.kind=n,Le().s[25]++,this.activityData=""},fileHandler:function(n){Le().f[10]++,Le().s[26]++,this.activityData=n?(Le().b[8][0]++,n):(Le().b[8][1]++,null)},selectedHandler:function(n){Le().f[11]++,Le().s[27]++,this.activityEnvironment=n?(Le().b[9][0]++,n):(Le().b[9][1]++,null)},updateValues:function(){Le().f[12]++,Le().s[28]++,this.dialogStep=1,Le().s[29]++,this.startDate=(0,Y.Z)(new Date,"yyyy-MM-dd"),Le().s[30]++,this.startTime=(0,Y.Z)(new Date,"HH:mm:ss"),Le().s[31]++,this.stopDate=(0,Y.Z)(new Date,"yyyy-MM-dd"),Le().s[32]++,this.stopTime=(0,Y.Z)(new Date,"HH:mm:ss"),Le().s[33]++,this.utcOrLocal="loc",Le().s[34]++,this.kind="",Le().s[35]++,this.activityData="",Le().s[36]++,this.activityEnvironment=[]},createActivity:function(){var n=this;Le().f[13]++;var e=(Le().s[37]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Le().s[38]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),i=(Le().s[39]++,this.kind.toLowerCase()),l=(Le().s[40]++,{environment:this.activityEnvironment});Le().s[41]++,l[i]=this.activityData,Le().s[42]++,C.post("/cosmos-api/timeline/".concat(this.timeline,"/activities"),{data:{start:e,stop:t,kind:i,data:l}}).then((function(e){Le().f[14]++;var t=(Le().s[43]++,n.generateDateTime(new Date(1e3*e.data.start)));Le().s[44]++,n.$notify.normal({title:"Created Activity",body:"".concat(t," (").concat(e.data.start,") on timeline: ").concat(e.data.name)})})),Le().s[45]++,this.show=!this.show,Le().s[46]++,this.updateValues()}}},qe=Pe,He=(t(6743),(0,k.Z)(qe,$e,Ue,!1,null,"5a2b1c4a",null)),Ze=He.exports,je=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createMetadata.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Chronicle Metadata")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-metadata-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.targets,label:"Target"},model:{value:n.target,callback:function(e){n.target=e},expression:"target"}}),t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}}),t("v-row",{attrs:{dense:""}},[t("v-checkbox",{attrs:{label:"Input Metadata Time"},model:{value:n.userProvidedTime,callback:function(e){n.userProvidedTime=e},expression:"userProvidedTime"}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:n.userProvidedTime,expression:"userProvidedTime"}]},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"metadata-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"metadata-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-metadata-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Metadata input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",{staticStyle:{"min-height":"200px"}},[t("metadata-input-form",{model:{value:n.metadata,callback:function(e){n.metadata=e},expression:"metadata"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-metadata-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-metadata-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createMetadata.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},Ge=[];function Be(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataCreateDialog.vue",e="2f06627194de6488dafa8b47d19a7a999f939da3",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataCreateDialog.vue",statementMap:{0:{start:{line:176,column:4},end:{line:190,column:5}},1:{start:{line:188,column:29},end:{line:188,column:50}},2:{start:{line:193,column:4},end:{line:193,column:23}},3:{start:{line:194,column:4},end:{line:194,column:24}},4:{start:{line:198,column:6},end:{line:200,column:7}},5:{start:{line:199,column:8},end:{line:199,column:59}},6:{start:{line:201,column:6},end:{line:203,column:7}},7:{start:{line:202,column:8},end:{line:202,column:37}},8:{start:{line:204,column:6},end:{line:206,column:7}},9:{start:{line:205,column:8},end:{line:205,column:19}},10:{start:{line:207,column:18},end:{line:207,column:28}},11:{start:{line:208,column:20},end:{line:208,column:69}},12:{start:{line:209,column:6},end:{line:211,column:7}},13:{start:{line:210,column:8},end:{line:210,column:61}},14:{start:{line:212,column:6},end:{line:212,column:17}},15:{start:{line:215,column:6},end:{line:217,column:7}},16:{start:{line:216,column:8},end:{line:216,column:60}},17:{start:{line:218,column:28},end:{line:220,column:7}},18:{start:{line:219,column:18},end:{line:219,column:54}},19:{start:{line:221,column:6},end:{line:223,column:7}},20:{start:{line:222,column:8},end:{line:222,column:67}},21:{start:{line:224,column:6},end:{line:224,column:17}},22:{start:{line:228,column:8},end:{line:228,column:25}},23:{start:{line:231,column:8},end:{line:231,column:34}},24:{start:{line:237,column:6},end:{line:237,column:25}},25:{start:{line:238,column:6},end:{line:238,column:55}},26:{start:{line:239,column:6},end:{line:239,column:53}},27:{start:{line:240,column:6},end:{line:240,column:24}},28:{start:{line:241,column:6},end:{line:241,column:28}},29:{start:{line:244,column:6},end:{line:248,column:8}},30:{start:{line:245,column:8},end:{line:245,column:27}},31:{start:{line:246,column:8},end:{line:246,column:48}},32:{start:{line:247,column:8},end:{line:247,column:37}},33:{start:{line:251,column:20},end:{line:251,column:30}},34:{start:{line:252,column:23},end:{line:255,column:12}},35:{start:{line:253,column:8},end:{line:253,column:43}},36:{start:{line:254,column:8},end:{line:254,column:21}},37:{start:{line:256,column:21},end:{line:256,column:32}},38:{start:{line:257,column:19},end:{line:257,column:46}},39:{start:{line:258,column:6},end:{line:262,column:7}},40:{start:{line:259,column:8},end:{line:261,column:9}},41:{start:{line:263,column:6},end:{line:270,column:8}},42:{start:{line:266,column:8},end:{line:269,column:10}},43:{start:{line:271,column:6},end:{line:271,column:28}},44:{start:{line:272,column:6},end:{line:272,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:175,column:2},end:{line:175,column:3}},loc:{start:{line:175,column:9},end:{line:191,column:3}},line:175},1:{name:"(anonymous_1)",decl:{start:{line:188,column:18},end:{line:188,column:19}},loc:{start:{line:188,column:29},end:{line:188,column:50}},line:188},2:{name:"(anonymous_2)",decl:{start:{line:192,column:11},end:{line:192,column:12}},loc:{start:{line:192,column:23},end:{line:195,column:3}},line:192},3:{name:"(anonymous_3)",decl:{start:{line:197,column:15},end:{line:197,column:16}},loc:{start:{line:197,column:27},end:{line:213,column:5}},line:197},4:{name:"(anonymous_4)",decl:{start:{line:214,column:15},end:{line:214,column:16}},loc:{start:{line:214,column:27},end:{line:225,column:5}},line:214},5:{name:"(anonymous_5)",decl:{start:{line:219,column:8},end:{line:219,column:9}},loc:{start:{line:219,column:18},end:{line:219,column:54}},line:219},6:{name:"(anonymous_6)",decl:{start:{line:227,column:6},end:{line:227,column:7}},loc:{start:{line:227,column:12},end:{line:229,column:7}},line:227},7:{name:"(anonymous_7)",decl:{start:{line:230,column:6},end:{line:230,column:7}},loc:{start:{line:230,column:17},end:{line:232,column:7}},line:230},8:{name:"(anonymous_8)",decl:{start:{line:236,column:18},end:{line:236,column:19}},loc:{start:{line:236,column:30},end:{line:242,column:5}},line:236},9:{name:"(anonymous_9)",decl:{start:{line:243,column:19},end:{line:243,column:20}},loc:{start:{line:243,column:31},end:{line:249,column:5}},line:243},10:{name:"(anonymous_10)",decl:{start:{line:244,column:45},end:{line:244,column:46}},loc:{start:{line:244,column:55},end:{line:248,column:7}},line:244},11:{name:"(anonymous_11)",decl:{start:{line:250,column:20},end:{line:250,column:21}},loc:{start:{line:250,column:32},end:{line:273,column:5}},line:250},12:{name:"(anonymous_12)",decl:{start:{line:252,column:44},end:{line:252,column:45}},loc:{start:{line:252,column:65},end:{line:255,column:7}},line:252},13:{name:"(anonymous_13)",decl:{start:{line:265,column:14},end:{line:265,column:15}},loc:{start:{line:265,column:28},end:{line:270,column:7}},line:265}},branchMap:{0:{loc:{start:{line:188,column:29},end:{line:188,column:50}},type:"binary-expr",locations:[{start:{line:188,column:29},end:{line:188,column:36}},{start:{line:188,column:40},end:{line:188,column:50}}],line:188},1:{loc:{start:{line:198,column:6},end:{line:200,column:7}},type:"if",locations:[{start:{line:198,column:6},end:{line:200,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:198},2:{loc:{start:{line:201,column:6},end:{line:203,column:7}},type:"if",locations:[{start:{line:201,column:6},end:{line:203,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:201},3:{loc:{start:{line:204,column:6},end:{line:206,column:7}},type:"if",locations:[{start:{line:204,column:6},end:{line:206,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:204},4:{loc:{start:{line:209,column:6},end:{line:211,column:7}},type:"if",locations:[{start:{line:209,column:6},end:{line:211,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:209},5:{loc:{start:{line:215,column:6},end:{line:217,column:7}},type:"if",locations:[{start:{line:215,column:6},end:{line:217,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:215},6:{loc:{start:{line:219,column:18},end:{line:219,column:54}},type:"binary-expr",locations:[{start:{line:219,column:18},end:{line:219,column:33}},{start:{line:219,column:37},end:{line:219,column:54}}],line:219},7:{loc:{start:{line:221,column:6},end:{line:223,column:7}},type:"if",locations:[{start:{line:221,column:6},end:{line:223,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:221},8:{loc:{start:{line:258,column:6},end:{line:262,column:7}},type:"if",locations:[{start:{line:258,column:6},end:{line:262,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:258}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,sources:["MetadataCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6JA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createMetadata">\n <v-system-bar>\n <v-spacer />\n <span>Create Chronicle Metadata</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-metadata-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-select v-model="target" :items="targets" label="Target" />\n <color-select-form v-model="color" />\n <v-row dense>\n <v-checkbox\n v-model="userProvidedTime"\n label="Input Metadata Time"\n />\n </v-row>\n <div v-show="userProvidedTime">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="metadata-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="metadata-start-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio\n label="LST"\n value="loc"\n data-test="lst-radio"\n />\n <v-radio\n label="UTC"\n value="utc"\n data-test="utc-radio"\n />\n </v-radio-group>\n </v-row>\n </div>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-metadata-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2"> Metadata input </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div style="min-height: 200px">\n <metadata-input-form v-model="metadata" />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-metadata-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createMetadata"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-metadata-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { CosmosApi } from \'@cosmosc2/tool-common/src/services/cosmos-api\'\n\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\nimport MetadataInputForm from \'@/tools/Calendar/Forms/MetadataInputForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n MetadataInputForm,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n scope: localStorage.scope,\n dialogStep: 1,\n target: \'\',\n targets: [],\n startDate: \'\',\n startTime: \'\',\n utcOrLocal: \'loc\',\n userProvidedTime: false,\n color: \'#003784\',\n metadata: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n this.updateTargets()\n },\n computed: {\n timeError: function () {\n if (!this.target) {\n return \'Metadata must be associated with a target.\'\n }\n if (!this.color) {\n return \'A color is required.\'\n }\n if (!this.userProvidedTime) {\n return null\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n if (now < start) {\n return \'Invalid start time. Can not be in the future\'\n }\n return null\n },\n typeError: function () {\n if (this.metadata.length < 1) {\n return \'Please enter a value in the metadata table.\'\n }\n const emptyKeyValue = this.metadata.find(\n (meta) => meta.key === \'\' || meta.value === \'\'\n )\n if (emptyKeyValue) {\n return \'Missing or empty key, value in the metadata table.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.metadata = []\n this.color = \'#003784\'\n },\n updateTargets: function () {\n new CosmosApi().get_target_list().then((data) => {\n this.targets = data\n this.targets.unshift(localStorage.scope)\n this.target = this.targets[0]\n })\n },\n createMetadata: function () {\n const color = this.color\n const metadata = this.metadata.reduce((result, element) => {\n result[element.key] = element.value\n return result\n }, {})\n const target = this.target\n const data = { color, target, metadata }\n if (this.userProvidedTime) {\n data.start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n }\n Api.post(\'/cosmos-api/metadata\', {\n data,\n }).then((response) => {\n this.$notify.normal({\n title: \'Created new Metadata\',\n body: `Metadata: (${response.data.start})`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f06627194de6488dafa8b47d19a7a999f939da3"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Be=function(){return o},o}Be();var Ye={components:{ColorSelectForm:Mn,MetadataInputForm:Un},props:{value:Boolean},mixins:[$],data:function(){return Be().f[0]++,Be().s[0]++,{scope:localStorage.scope,dialogStep:1,target:"",targets:[],startDate:"",startTime:"",utcOrLocal:"loc",userProvidedTime:!1,color:"#003784",metadata:[],rules:{required:function(n){return Be().f[1]++,Be().s[1]++,Be().b[0][0]++,!!n||(Be().b[0][1]++,"Required")}}}},mounted:function(){Be().f[2]++,Be().s[2]++,this.updateValues(),Be().s[3]++,this.updateTargets()},computed:{timeError:function(){if(Be().f[3]++,Be().s[4]++,!this.target)return Be().b[1][0]++,Be().s[5]++,"Metadata must be associated with a target.";if(Be().b[1][1]++,Be().s[6]++,!this.color)return Be().b[2][0]++,Be().s[7]++,"A color is required.";if(Be().b[2][1]++,Be().s[8]++,!this.userProvidedTime)return Be().b[3][0]++,Be().s[9]++,null;Be().b[3][1]++;var n=(Be().s[10]++,new Date),e=(Be().s[11]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime)));return Be().s[12]++,n<e?(Be().b[4][0]++,Be().s[13]++,"Invalid start time. Can not be in the future"):(Be().b[4][1]++,Be().s[14]++,null)},typeError:function(){if(Be().f[4]++,Be().s[15]++,this.metadata.length<1)return Be().b[5][0]++,Be().s[16]++,"Please enter a value in the metadata table.";Be().b[5][1]++;var n=(Be().s[17]++,this.metadata.find((function(n){return Be().f[5]++,Be().s[18]++,Be().b[6][0]++,""===n.key||(Be().b[6][1]++,""===n.value)})));return Be().s[19]++,n?(Be().b[7][0]++,Be().s[20]++,"Missing or empty key, value in the metadata table."):(Be().b[7][1]++,Be().s[21]++,null)},show:{get:function(){return Be().f[6]++,Be().s[22]++,this.value},set:function(n){Be().f[7]++,Be().s[23]++,this.$emit("input",n)}}},methods:{updateValues:function(){Be().f[8]++,Be().s[24]++,this.dialogStep=1,Be().s[25]++,this.startDate=(0,Y.Z)(new Date,"yyyy-MM-dd"),Be().s[26]++,this.startTime=(0,Y.Z)(new Date,"HH:mm:ss"),Be().s[27]++,this.metadata=[],Be().s[28]++,this.color="#003784"},updateTargets:function(){var n=this;Be().f[9]++,Be().s[29]++,(new wn).get_target_list().then((function(e){Be().f[10]++,Be().s[30]++,n.targets=e,Be().s[31]++,n.targets.unshift(localStorage.scope),Be().s[32]++,n.target=n.targets[0]}))},createMetadata:function(){var n=this;Be().f[11]++;var e=(Be().s[33]++,this.color),t=(Be().s[34]++,this.metadata.reduce((function(n,e){return Be().f[12]++,Be().s[35]++,n[e.key]=e.value,Be().s[36]++,n}),{})),i=(Be().s[37]++,this.target),l=(Be().s[38]++,{color:e,target:i,metadata:t});Be().s[39]++,this.userProvidedTime?(Be().b[8][0]++,Be().s[40]++,l.start=this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))):Be().b[8][1]++,Be().s[41]++,C.post("/cosmos-api/metadata",{data:l}).then((function(e){Be().f[13]++,Be().s[42]++,n.$notify.normal({title:"Created new Metadata",body:"Metadata: (".concat(e.data.start,")")})})),Be().s[43]++,this.show=!this.show,Be().s[44]++,this.updateValues()}}},Ve=Ye,We=(t(8891),(0,k.Z)(Ve,je,Ge,!1,null,"3b7745ff",null)),Ke=We.exports,Je=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createNarrative.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Chronicle Narrative")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-icon",{attrs:{"data-test":"close-narrative-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"narrative-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"narrative-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"narrative-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"narrative-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-narrative-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Input Description ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",[t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1),t("div",[t("v-text-field",{attrs:{type:"text",label:"Narrative Description","data-test":"create-narrative-description"},model:{value:n.description,callback:function(e){n.description=e},expression:"description"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-narrative-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-narrative-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createNarrative.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},ze=[];function Qe(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NarrationCreateDialog.vue",e="c3052039ee6084c54c57e01a6193b3f95a37af4f",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NarrationCreateDialog.vue",statementMap:{0:{start:{line:186,column:4},end:{line:198,column:5}},1:{start:{line:196,column:29},end:{line:196,column:50}},2:{start:{line:201,column:4},end:{line:201,column:23}},3:{start:{line:205,column:18},end:{line:205,column:28}},4:{start:{line:206,column:20},end:{line:206,column:69}},5:{start:{line:207,column:19},end:{line:207,column:66}},6:{start:{line:208,column:6},end:{line:210,column:7}},7:{start:{line:209,column:8},end:{line:209,column:95}},8:{start:{line:211,column:6},end:{line:213,column:7}},9:{start:{line:212,column:8},end:{line:212,column:66}},10:{start:{line:214,column:6},end:{line:214,column:17}},11:{start:{line:217,column:6},end:{line:219,column:7}},12:{start:{line:218,column:8},end:{line:218,column:37}},13:{start:{line:220,column:6},end:{line:222,column:7}},14:{start:{line:221,column:8},end:{line:221,column:65}},15:{start:{line:223,column:6},end:{line:223,column:17}},16:{start:{line:227,column:8},end:{line:227,column:25}},17:{start:{line:230,column:8},end:{line:230,column:34}},18:{start:{line:236,column:6},end:{line:236,column:25}},19:{start:{line:237,column:6},end:{line:237,column:55}},20:{start:{line:238,column:6},end:{line:238,column:53}},21:{start:{line:239,column:6},end:{line:239,column:54}},22:{start:{line:240,column:6},end:{line:240,column:52}},23:{start:{line:241,column:6},end:{line:241,column:29}},24:{start:{line:242,column:6},end:{line:242,column:28}},25:{start:{line:243,column:6},end:{line:243,column:27}},26:{start:{line:246,column:20},end:{line:248,column:7}},27:{start:{line:249,column:19},end:{line:251,column:7}},28:{start:{line:252,column:20},end:{line:252,column:30}},29:{start:{line:253,column:26},end:{line:253,column:42}},30:{start:{line:254,column:6},end:{line:265,column:8}},31:{start:{line:258,column:10},end:{line:260,column:39}},32:{start:{line:261,column:8},end:{line:264,column:10}},33:{start:{line:266,column:6},end:{line:266,column:28}},34:{start:{line:267,column:6},end:{line:267,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:185,column:2},end:{line:185,column:3}},loc:{start:{line:185,column:9},end:{line:199,column:3}},line:185},1:{name:"(anonymous_1)",decl:{start:{line:196,column:18},end:{line:196,column:19}},loc:{start:{line:196,column:29},end:{line:196,column:50}},line:196},2:{name:"(anonymous_2)",decl:{start:{line:200,column:11},end:{line:200,column:12}},loc:{start:{line:200,column:23},end:{line:202,column:3}},line:200},3:{name:"(anonymous_3)",decl:{start:{line:204,column:15},end:{line:204,column:16}},loc:{start:{line:204,column:27},end:{line:215,column:5}},line:204},4:{name:"(anonymous_4)",decl:{start:{line:216,column:15},end:{line:216,column:16}},loc:{start:{line:216,column:27},end:{line:224,column:5}},line:216},5:{name:"(anonymous_5)",decl:{start:{line:226,column:6},end:{line:226,column:7}},loc:{start:{line:226,column:12},end:{line:228,column:7}},line:226},6:{name:"(anonymous_6)",decl:{start:{line:229,column:6},end:{line:229,column:7}},loc:{start:{line:229,column:17},end:{line:231,column:7}},line:229},7:{name:"(anonymous_7)",decl:{start:{line:235,column:18},end:{line:235,column:19}},loc:{start:{line:235,column:30},end:{line:244,column:5}},line:235},8:{name:"(anonymous_8)",decl:{start:{line:245,column:21},end:{line:245,column:22}},loc:{start:{line:245,column:33},end:{line:268,column:5}},line:245},9:{name:"(anonymous_9)",decl:{start:{line:256,column:14},end:{line:256,column:15}},loc:{start:{line:256,column:28},end:{line:265,column:7}},line:256}},branchMap:{0:{loc:{start:{line:196,column:29},end:{line:196,column:50}},type:"binary-expr",locations:[{start:{line:196,column:29},end:{line:196,column:36}},{start:{line:196,column:40},end:{line:196,column:50}}],line:196},1:{loc:{start:{line:208,column:6},end:{line:210,column:7}},type:"if",locations:[{start:{line:208,column:6},end:{line:210,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:208},2:{loc:{start:{line:211,column:6},end:{line:213,column:7}},type:"if",locations:[{start:{line:211,column:6},end:{line:213,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:211},3:{loc:{start:{line:217,column:6},end:{line:219,column:7}},type:"if",locations:[{start:{line:217,column:6},end:{line:219,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:217},4:{loc:{start:{line:220,column:6},end:{line:222,column:7}},type:"if",locations:[{start:{line:220,column:6},end:{line:222,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:220},5:{loc:{start:{line:258,column:10},end:{line:260,column:39}},type:"cond-expr",locations:[{start:{line:259,column:14},end:{line:259,column:64}},{start:{line:260,column:14},end:{line:260,column:39}}],line:258}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,sources:["NarrationCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NarrationCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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 addstopums 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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createNarrative">\n <v-system-bar>\n <v-spacer />\n <span>Create Chronicle Narrative</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon\n data-test="close-narrative-icon"\n @click="show = !show"\n >\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="narrative-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-narrative-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Input Description\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div>\n <color-select-form v-model="color" />\n </div>\n <div>\n <v-text-field\n v-model="description"\n type="text"\n label="Narrative Description"\n data-test="create-narrative-description"\n />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-narrative-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createNarrative"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-narrative-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n description: \'\',\n color: \'#8F3400\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Narrations must have different start and stop times.\'\n }\n if (start > stop) {\n return \'Invalid start time. Narrations start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (!this.color) {\n return \'A color is required.\'\n }\n if (!this.description) {\n return \'A description is required for a valid narrative.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.stopDate = format(new Date(), \'yyyy-MM-dd\')\n this.stopTime = format(new Date(), \'HH:mm:ss\')\n this.utcOrLocal = \'loc\'\n this.color = \'#8F3400\'\n this.description = \'\'\n },\n createNarrative: function () {\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const color = this.color\n const description = this.description\n Api.post(\'/cosmos-api/narrative\', {\n data: { start, stop, color, description },\n }).then((response) => {\n const desc =\n response.data.description.length > 16\n ? `${response.data.description.substring(0, 16)}...`\n : response.data.description\n this.$notify.normal({\n title: \'Created new Chronicle Narrative\',\n body: `Narrative: (${response.data.start}) created: "${desc}"`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c3052039ee6084c54c57e01a6193b3f95a37af4f"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Qe=function(){return o},o}Qe();var Xe={components:{ColorSelectForm:Mn},props:{value:Boolean},mixins:[$],data:function(){return Qe().f[0]++,Qe().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",description:"",color:"#8F3400",rules:{required:function(n){return Qe().f[1]++,Qe().s[1]++,Qe().b[0][0]++,!!n||(Qe().b[0][1]++,"Required")}}}},mounted:function(){Qe().f[2]++,Qe().s[2]++,this.updateValues()},computed:{timeError:function(){Qe().f[3]++;Qe().s[3]++,new Date;var n=(Qe().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),e=(Qe().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Qe().s[6]++,n===e?(Qe().b[1][0]++,Qe().s[7]++,"Invalid start, stop time. Narrations must have different start and stop times."):(Qe().b[1][1]++,Qe().s[8]++,n>e?(Qe().b[2][0]++,Qe().s[9]++,"Invalid start time. Narrations start before stop."):(Qe().b[2][1]++,Qe().s[10]++,null))},typeError:function(){return Qe().f[4]++,Qe().s[11]++,this.color?(Qe().b[3][1]++,Qe().s[13]++,this.description?(Qe().b[4][1]++,Qe().s[15]++,null):(Qe().b[4][0]++,Qe().s[14]++,"A description is required for a valid narrative.")):(Qe().b[3][0]++,Qe().s[12]++,"A color is required.")},show:{get:function(){return Qe().f[5]++,Qe().s[16]++,this.value},set:function(n){Qe().f[6]++,Qe().s[17]++,this.$emit("input",n)}}},methods:{updateValues:function(){Qe().f[7]++,Qe().s[18]++,this.dialogStep=1,Qe().s[19]++,this.startDate=(0,Y.Z)(new Date,"yyyy-MM-dd"),Qe().s[20]++,this.startTime=(0,Y.Z)(new Date,"HH:mm:ss"),Qe().s[21]++,this.stopDate=(0,Y.Z)(new Date,"yyyy-MM-dd"),Qe().s[22]++,this.stopTime=(0,Y.Z)(new Date,"HH:mm:ss"),Qe().s[23]++,this.utcOrLocal="loc",Qe().s[24]++,this.color="#8F3400",Qe().s[25]++,this.description=""},createNarrative:function(){var n=this;Qe().f[8]++;var e=(Qe().s[26]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Qe().s[27]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),i=(Qe().s[28]++,this.color),l=(Qe().s[29]++,this.description);Qe().s[30]++,C.post("/cosmos-api/narrative",{data:{start:e,stop:t,color:i,description:l}}).then((function(e){Qe().f[9]++;var t=(Qe().s[31]++,e.data.description.length>16?(Qe().b[5][0]++,"".concat(e.data.description.substring(0,16),"...")):(Qe().b[5][1]++,e.data.description));Qe().s[32]++,n.$notify.normal({title:"Created new Chronicle Narrative",body:"Narrative: (".concat(e.data.start,') created: "').concat(t,'"')})})),Qe().s[33]++,this.show=!this.show,Qe().s[34]++,this.updateValues()}}},nt=Xe,et=(t(5468),(0,k.Z)(nt,Je,ze,!1,null,"3c724330",null)),tt=et.exports;function it(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarToolbar.vue",e="88aec54fae1abb69f7204ea56dc7655ba4cd02f0",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarToolbar.vue",statementMap:{0:{start:{line:174,column:4},end:{line:184,column:5}},1:{start:{line:188,column:6},end:{line:201,column:7}},2:{start:{line:204,column:16},end:{line:204,column:74}},3:{start:{line:205,column:20},end:{line:205,column:52}},4:{start:{line:206,column:19},end:{line:206,column:37}},5:{start:{line:207,column:6},end:{line:207,column:31}},6:{start:{line:210,column:6},end:{line:210,column:27}},7:{start:{line:213,column:6},end:{line:213,column:29}},8:{start:{line:216,column:6},end:{line:216,column:28}},9:{start:{line:220,column:8},end:{line:220,column:25}},10:{start:{line:223,column:8},end:{line:223,column:34}},11:{start:{line:229,column:21},end:{line:229,column:57}},12:{start:{line:230,column:19},end:{line:232,column:8}},13:{start:{line:234,column:19},end:{line:234,column:46}},14:{start:{line:235,column:6},end:{line:235,column:43}},15:{start:{line:236,column:6},end:{line:239,column:7}},16:{start:{line:240,column:6},end:{line:240,column:18}},17:{start:{line:243,column:6},end:{line:243,column:60}},18:{start:{line:246,column:6},end:{line:246,column:70}},19:{start:{line:249,column:6},end:{line:252,column:7}},20:{start:{line:253,column:6},end:{line:253,column:22}},21:{start:{line:256,column:6},end:{line:259,column:7}},22:{start:{line:262,column:6},end:{line:262,column:46}},23:{start:{line:265,column:6},end:{line:265,column:46}},24:{start:{line:268,column:6},end:{line:268,column:49}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:173,column:2},end:{line:173,column:3}},loc:{start:{line:173,column:9},end:{line:185,column:3}},line:173},1:{name:"(anonymous_1)",decl:{start:{line:187,column:16},end:{line:187,column:17}},loc:{start:{line:187,column:28},end:{line:202,column:5}},line:187},2:{name:"(anonymous_2)",decl:{start:{line:203,column:11},end:{line:203,column:12}},loc:{start:{line:203,column:23},end:{line:208,column:5}},line:203},3:{name:"(anonymous_3)",decl:{start:{line:209,column:9},end:{line:209,column:10}},loc:{start:{line:209,column:21},end:{line:211,column:5}},line:209},4:{name:"(anonymous_4)",decl:{start:{line:212,column:11},end:{line:212,column:12}},loc:{start:{line:212,column:23},end:{line:214,column:5}},line:212},5:{name:"(anonymous_5)",decl:{start:{line:215,column:10},end:{line:215,column:11}},loc:{start:{line:215,column:22},end:{line:217,column:5}},line:215},6:{name:"(anonymous_6)",decl:{start:{line:219,column:6},end:{line:219,column:7}},loc:{start:{line:219,column:12},end:{line:221,column:7}},line:219},7:{name:"(anonymous_7)",decl:{start:{line:222,column:6},end:{line:222,column:7}},loc:{start:{line:222,column:17},end:{line:224,column:7}},line:222},8:{name:"(anonymous_8)",decl:{start:{line:228,column:20},end:{line:228,column:21}},loc:{start:{line:228,column:36},end:{line:241,column:5}},line:228},9:{name:"(anonymous_9)",decl:{start:{line:242,column:15},end:{line:242,column:16}},loc:{start:{line:242,column:27},end:{line:244,column:5}},line:242},10:{name:"(anonymous_10)",decl:{start:{line:245,column:16},end:{line:245,column:17}},loc:{start:{line:245,column:32},end:{line:247,column:5}},line:245},11:{name:"(anonymous_11)",decl:{start:{line:248,column:16},end:{line:248,column:17}},loc:{start:{line:248,column:32},end:{line:254,column:5}},line:248},12:{name:"(anonymous_12)",decl:{start:{line:255,column:14},end:{line:255,column:15}},loc:{start:{line:255,column:26},end:{line:260,column:5}},line:255},13:{name:"(anonymous_13)",decl:{start:{line:261,column:4},end:{line:261,column:5}},loc:{start:{line:261,column:11},end:{line:263,column:5}},line:261},14:{name:"(anonymous_14)",decl:{start:{line:264,column:4},end:{line:264,column:5}},loc:{start:{line:264,column:11},end:{line:266,column:5}},line:264},15:{name:"(anonymous_15)",decl:{start:{line:267,column:4},end:{line:267,column:5}},loc:{start:{line:267,column:14},end:{line:269,column:5}},line:267}},branchMap:{0:{loc:{start:{line:204,column:16},end:{line:204,column:74}},type:"cond-expr",locations:[{start:{line:204,column:35},end:{line:204,column:61}},{start:{line:204,column:64},end:{line:204,column:74}}],line:204}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["CalendarToolbar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"CalendarToolbar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-toolbar class="my-1">\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn data-test="create-event" outlined>\n <v-icon left> mdi-plus-box </v-icon>\n <span> Create </span>\n <v-icon right> mdi-menu-down </v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item\n data-test="narrative"\n @click="showNarrationCreateDialog = true"\n >\n <v-icon left> mdi-calendar-clock </v-icon>\n <v-list-item-title> Chronicle Narration </v-list-item-title>\n </v-list-item>\n <v-list-item\n data-test="metadata"\n @click="showMetadataCreateDialog = true"\n >\n <v-icon left> mdi-calendar-check </v-icon>\n <v-list-item-title> Chronicle Metadata </v-list-item-title>\n </v-list-item>\n <v-list-item\n data-test="activity"\n @click="showActivityCreateDialog = true"\n >\n <v-icon left> mdi-calendar-question </v-icon>\n <v-list-item-title> Timeline Activity </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n <v-btn outlined class="mx-3" data-test="today" @click="setToday">\n Today\n </v-btn>\n <v-btn fab text small data-test="prev" @click="prev">\n <v-icon small> mdi-chevron-left </v-icon>\n </v-btn>\n <v-btn fab text small data-test="next" @click="next">\n <v-icon small> mdi-chevron-right </v-icon>\n </v-btn>\n \x3c!--- SPACER ---\x3e\n <v-spacer />\n <v-toolbar-title v-text="title" />\n <v-spacer />\n \x3c!--- SPACER ---\x3e\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn icon data-test="settings" class="mx-2">\n <v-icon> mdi-cog </v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item data-test="refresh" @click="refresh">\n <v-icon left> mdi-refresh </v-icon>\n <v-list-item-title> Refresh Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="show-table" @click="showTable">\n <v-icon left> mdi-timetable </v-icon>\n <v-list-item-title> Show Table Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="display-utc-time" @click="updateTime">\n <v-icon left> mdi-clock </v-icon>\n <v-list-item-title> Toggle UTC Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="download-event-list" @click="downloadEvents">\n <v-icon left> mdi-download </v-icon>\n <v-list-item-title> Download Event List </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn outlined data-test="change-type" width="125">\n <span>{{ typeToLabel[type] }}</span>\n <v-icon right> mdi-menu-down </v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item data-test="type-day" @click="updateType(\'day\')">\n <v-list-item-title> Day </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="type-four-day" @click="updateType(\'4day\')">\n <v-list-item-title>4 Days</v-list-item-title>\n </v-list-item>\n <v-list-item data-test="type-week" @click="updateType(\'week\')">\n <v-list-item-title> Week </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n </v-toolbar>\n \x3c!--- menus ---\x3e\n <event-list-dialog\n v-if="showEventTableDialog"\n v-model="showEventTableDialog"\n :events="events"\n :utc="utc"\n />\n <metadata-create-dialog\n v-if="showMetadataCreateDialog"\n v-model="showMetadataCreateDialog"\n />\n <narration-create-dialog\n v-if="showNarrationCreateDialog"\n v-model="showNarrationCreateDialog"\n />\n <activity-create-dialog\n v-if="showActivityCreateDialog"\n v-model="showActivityCreateDialog"\n :timelines="timelines"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { format } from \'date-fns\'\n\nimport EventListDialog from \'@/tools/Calendar/Dialogs/EventListDialog\'\nimport ActivityCreateDialog from \'@/tools/Calendar/Dialogs/ActivityCreateDialog\'\nimport MetadataCreateDialog from \'@/tools/Calendar/Dialogs/MetadataCreateDialog\'\nimport NarrationCreateDialog from \'@/tools/Calendar/Dialogs/NarrationCreateDialog\'\n\nexport default {\n components: {\n EventListDialog,\n ActivityCreateDialog,\n MetadataCreateDialog,\n NarrationCreateDialog,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n events: {\n type: Array,\n required: true,\n },\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n typeToLabel: {\n week: \'Week\',\n \'4day\': \'4 Days\',\n day: \'Day\',\n },\n showEventTableDialog: false,\n showActivityCreateDialog: false,\n showMetadataCreateDialog: false,\n showNarrationCreateDialog: false,\n }\n },\n computed: {\n monthNames: function () {\n return [\n \'January\',\n \'February\',\n \'March\',\n \'April\',\n \'May\',\n \'June\',\n \'July\',\n \'August\',\n \'September\',\n \'October\',\n \'November\',\n \'December\',\n ]\n },\n title: function () {\n const d = this.value.focus ? new Date(this.value.focus) : new Date()\n const month = this.monthNames[d.getUTCMonth()]\n const year = d.getUTCFullYear()\n return `${month} ${year}`\n },\n utc: function () {\n return this.value.utc\n },\n focus: function () {\n return this.value.focus\n },\n type: function () {\n return this.value.type\n },\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n downloadEvents: function (type) {\n const output = JSON.stringify(this.events, null, 2)\n const blob = new Blob([output], {\n type: \'application/json\',\n })\n // Make a link and then \'click\' on it to start the download\n const link = document.createElement(\'a\')\n link.href = URL.createObjectURL(blob)\n link.setAttribute(\n \'download\',\n format(Date.now(), \'yyyy_MM_dd_HH_mm_ss\') + \'_calendar_events.json\'\n )\n link.click()\n },\n showTable: function () {\n this.showEventTableDialog = !this.showEventTableDialog\n },\n updateTime: function (type) {\n this.calendarConfiguration.utc = !this.calendarConfiguration.utc\n },\n updateType: function (type) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n type: type,\n }\n this.type = type\n },\n setToday: function () {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n focus: \'\',\n }\n },\n prev() {\n this.$emit(\'action\', { method: \'prev\' })\n },\n next() {\n this.$emit(\'action\', { method: \'next\' })\n },\n refresh() {\n this.$emit(\'action\', { method: \'refresh\' })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"88aec54fae1abb69f7204ea56dc7655ba4cd02f0"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return it=function(){return o},o}it();var lt={components:{EventListDialog:Re,ActivityCreateDialog:Ze,MetadataCreateDialog:Ke,NarrationCreateDialog:tt},props:{timelines:{type:Array,required:!0},events:{type:Array,required:!0},value:{type:Object,required:!0}},data:function(){return it().f[0]++,it().s[0]++,{typeToLabel:{week:"Week","4day":"4 Days",day:"Day"},showEventTableDialog:!1,showActivityCreateDialog:!1,showMetadataCreateDialog:!1,showNarrationCreateDialog:!1}},computed:{monthNames:function(){return it().f[1]++,it().s[1]++,["January","February","March","April","May","June","July","August","September","October","November","December"]},title:function(){it().f[2]++;var n=(it().s[2]++,this.value.focus?(it().b[0][0]++,new Date(this.value.focus)):(it().b[0][1]++,new Date)),e=(it().s[3]++,this.monthNames[n.getUTCMonth()]),t=(it().s[4]++,n.getUTCFullYear());return it().s[5]++,"".concat(e," ").concat(t)},utc:function(){return it().f[3]++,it().s[6]++,this.value.utc},focus:function(){return it().f[4]++,it().s[7]++,this.value.focus},type:function(){return it().f[5]++,it().s[8]++,this.value.type},calendarConfiguration:{get:function(){return it().f[6]++,it().s[9]++,this.value},set:function(n){it().f[7]++,it().s[10]++,this.$emit("input",n)}}},methods:{downloadEvents:function(n){it().f[8]++;var e=(it().s[11]++,JSON.stringify(this.events,null,2)),t=(it().s[12]++,new Blob([e],{type:"application/json"})),i=(it().s[13]++,document.createElement("a"));it().s[14]++,i.href=URL.createObjectURL(t),it().s[15]++,i.setAttribute("download",(0,Y.Z)(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_calendar_events.json"),it().s[16]++,i.click()},showTable:function(){it().f[9]++,it().s[17]++,this.showEventTableDialog=!this.showEventTableDialog},updateTime:function(n){it().f[10]++,it().s[18]++,this.calendarConfiguration.utc=!this.calendarConfiguration.utc},updateType:function(n){it().f[11]++,it().s[19]++,this.calendarConfiguration=(0,a.Z)((0,a.Z)({},this.calendarConfiguration),{},{type:n}),it().s[20]++,this.type=n},setToday:function(){it().f[12]++,it().s[21]++,this.calendarConfiguration=(0,a.Z)((0,a.Z)({},this.calendarConfiguration),{},{focus:""})},prev:function(){it().f[13]++,it().s[22]++,this.$emit("action",{method:"prev"})},next:function(){it().f[14]++,it().s[23]++,this.$emit("action",{method:"next"})},refresh:function(){it().f[15]++,it().s[24]++,this.$emit("action",{method:"refresh"})}}},at=lt,ot=(0,k.Z)(at,Ee,De,!1,null,null,null),st=ot.exports,rt=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-toolbar",{attrs:{dense:""}},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"create-timeline"},on:{click:function(e){n.showCreateDialog=!0}}},[t("v-icon",[n._v("mdi-calendar-plus")])],1)],1)]}}])},[t("span",[n._v("Create Timeline")])]),t("v-spacer"),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":"view-environment-dialog"},on:{click:function(e){n.showEnvironmentDialog=!0}}},[t("v-icon",[n._v("mdi-library")])],1)],1)]}}])},[t("span",[n._v("Environment Dialog")])])],1),t("v-list",{attrs:{flat:""}},[t("v-subheader",{staticStyle:{height:"25px"}},[n._v("Chronicles")]),t("v-list-item-group",{attrs:{multiple:""},on:{change:n.select},model:{value:n.selectedChronicles,callback:function(e){n.selectedChronicles=e},expression:"selectedChronicles"}},[t("v-list-item",{attrs:{"data-test":"select-metadata"},scopedSlots:n._u([{key:"default",fn:function(e){var i=e.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":i,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-list-item-title",[n._v(" Metadata ")])],1)]}}])}),t("v-list-item",{attrs:{"data-test":"select-narrative"},scopedSlots:n._u([{key:"default",fn:function(e){var i=e.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":i,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-list-item-title",[n._v(" Narrative ")])],1)]}}])})],1),t("v-subheader",{staticStyle:{height:"25px"}},[n._v("Timelines")]),t("v-list-item-group",{attrs:{multiple:""},on:{change:n.select},model:{value:n.selectedTimelines,callback:function(e){n.selectedTimelines=e},expression:"selectedTimelines"}},[n._l(n.timelines,(function(e){return[t("v-list-item",{key:"timeline-"+e.name,attrs:{value:e,"data-test":"select-timeline-"+e.name},scopedSlots:n._u([{key:"default",fn:function(i){var l=i.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":l,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-badge",{attrs:{dot:"",bordered:"",inline:"",tile:"",color:e.color,value:e.messages}},[t("v-list-item-title",{domProps:{textContent:n._s(e.name)}})],1)],1),t("v-list-item-action",[t("selector-options",{attrs:{timeline:e}})],1)]}}],null,!0)})]}))],2)],1),t("environment-dialog",{model:{value:n.showEnvironmentDialog,callback:function(e){n.showEnvironmentDialog=e},expression:"showEnvironmentDialog"}}),t("timeline-create-dialog",{attrs:{timelines:n.timelines},model:{value:n.showCreateDialog,callback:function(e){n.showCreateDialog=e},expression:"showCreateDialog"}})],1)},ct=[],ut=t(5225),mt=(t(3430),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.addEnvironment.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Environment Variables")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{staticClass:"mb-2",attrs:{dense:""}},[t("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){n.search=e},expression:"search"}})],1),t("v-data-table",{attrs:{"item-key":"name","hide-default-header":"","data-test":"env-table",search:n.search,headers:n.headers,items:n.environment,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},scopedSlots:n._u([{key:"item.actions",fn:function(e){var i=e.item;return[t("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(e){return n.deleteEnvironment(i)}}},[t("v-icon",[n._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Key","data-test":"env-key"},model:{value:n.key,callback:function(e){n.key=e},expression:"key"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"Value","data-test":"env-value"},model:{value:n.keyValue,callback:function(e){n.keyValue=e},expression:"keyValue"}})],1)],1),t("v-row",{attrs:{dense:""}},[t("v-btn",{attrs:{block:"",type:"submit",color:"primary","data-test":"add-env",disabled:!n.key||!n.keyValue},on:{click:function(e){return e.preventDefault(),n.addEnvironment.apply(null,arguments)}}},[n._v(" Add ")])],1)],1)])],1)])],1)}),dt=[],At={props:{value:Boolean},data:function(){return{alert:"",alertType:"success",showAlert:!1,search:"",key:"",keyValue:"",environment:[],headers:[{text:"Key",value:"key"},{text:"Value",value:"value"},{text:"Actions",value:"actions",align:"end",sortable:!1}]}},computed:{show:{get:function(){return this.value},set:function(n){this.$emit("input",n)}}},mounted:function(){this.update()},methods:{alertHandler:function(n){this.alert=n.text,this.alertType=n.type,this.showAlert=!0},update:function(){var n=this;C.get("/cosmos-api/environment").then((function(e){n.environment=e.data})).catch((function(n){}))},addEnvironment:function(){var n=this;C.post("/cosmos-api/environment",{data:{key:this.key.toUpperCase(),value:this.keyValue}}).then((function(e){"New environment variable: ".concat(e.data.name);n.update()})).catch((function(e){var t={text:"Failed to add environment variable: ".concat(e),type:"error"};n.alertHandler(t)})),this.key="",this.keyValue=""},deleteEnvironment:function(n){var e=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(n.key,"=").concat(n.value),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return C["delete"]("/cosmos-api/environment/".concat(n.name))})).then((function(t){var i={text:"Removed environment variable: ".concat(n.name),type:"success"};e.alertHandler(i),e.update()})).catch((function(n){var t={text:"Failed to delete environment: ".concat(n),type:"error"};e.alertHandler(t)}))}}},vt=At,pt=(0,k.Z)(vt,mt,dt,!1,null,null,null),ht=pt.exports,Ct=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-menu",{attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,l=e.attrs;return[t("div",n._g(n._b({},"div",l,!1),i),[t("v-btn",{attrs:{icon:"","data-test":n.name+"-options"}},[t("v-icon",[n._v("mdi-dots-vertical")])],1)],1)]}}])},[t("v-card",[t("div",{staticStyle:{"background-color":"var(--v-primary-darken2)"}},n._l(n.swatches,(function(e,i){return t("v-row",{key:"colors-"+i,staticClass:"p-2",attrs:{dense:""}},n._l(e,(function(e,i){return t("v-col",{key:"color-"+i,attrs:{dense:"",align:"center",justify:"center"}},[t("v-btn",{attrs:{icon:"","data-test":n.name+"-color-"+e},on:{click:function(t){return n.updateColor(e)}}},[t("v-badge",{attrs:{inline:"",color:e}})],1)],1)})),1)})),1),t("v-btn",{attrs:{tile:"","data-test":n.name+"-delete"},on:{click:n.deleteTimeline}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-delete ")]),t("span",[n._v(" Delete Timeline ")])],1)],1)],1)],1)},ft=[];function yt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/SelectorOptions.vue",e="09b69c57b263394a8abf53e92cce6bb0dd779408",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/SelectorOptions.vue",statementMap:{0:{start:{line:72,column:4},end:{line:72,column:13}},1:{start:{line:76,column:6},end:{line:76,column:52}},2:{start:{line:79,column:6},end:{line:83,column:7}},3:{start:{line:88,column:6},end:{line:102,column:29}},4:{start:{line:94,column:10},end:{line:94,column:64}},5:{start:{line:97,column:10},end:{line:100,column:12}},6:{start:{line:105,column:6},end:{line:112,column:8}},7:{start:{line:108,column:8},end:{line:111,column:10}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:9},end:{line:73,column:3}},line:71},1:{name:"(anonymous_1)",decl:{start:{line:75,column:10},end:{line:75,column:11}},loc:{start:{line:75,column:22},end:{line:77,column:5}},line:75},2:{name:"(anonymous_2)",decl:{start:{line:78,column:14},end:{line:78,column:15}},loc:{start:{line:78,column:26},end:{line:84,column:5}},line:78},3:{name:"(anonymous_3)",decl:{start:{line:87,column:20},end:{line:87,column:21}},loc:{start:{line:87,column:32},end:{line:103,column:5}},line:87},4:{name:"(anonymous_4)",decl:{start:{line:93,column:14},end:{line:93,column:15}},loc:{start:{line:93,column:26},end:{line:95,column:9}},line:93},5:{name:"(anonymous_5)",decl:{start:{line:96,column:14},end:{line:96,column:15}},loc:{start:{line:96,column:28},end:{line:101,column:9}},line:96},6:{name:"(anonymous_6)",decl:{start:{line:102,column:15},end:{line:102,column:16}},loc:{start:{line:102,column:26},end:{line:102,column:28}},line:102},7:{name:"(anonymous_7)",decl:{start:{line:104,column:17},end:{line:104,column:18}},loc:{start:{line:104,column:34},end:{line:113,column:5}},line:104},8:{name:"(anonymous_8)",decl:{start:{line:107,column:14},end:{line:107,column:15}},loc:{start:{line:107,column:28},end:{line:112,column:7}},line:107}},branchMap:{0:{loc:{start:{line:76,column:13},end:{line:76,column:52}},type:"cond-expr",locations:[{start:{line:76,column:29},end:{line:76,column:47}},{start:{line:76,column:50},end:{line:76,column:52}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["SelectorOptions.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"SelectorOptions.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-menu offset-y>\n <template v-slot:activator=\"{ on, attrs }\">\n <div v-bind=\"attrs\" v-on=\"on\">\n <v-btn icon :data-test=\"`${name}-options`\">\n <v-icon>mdi-dots-vertical</v-icon>\n </v-btn>\n </div>\n </template>\n <v-card>\n <div style=\"background-color: var(--v-primary-darken2)\">\n <v-row\n dense\n v-for=\"(colors, ii) in swatches\"\n :key=\"`colors-${ii}`\"\n class=\"p-2\"\n >\n <v-col\n dense\n v-for=\"(color, jj) in colors\"\n :key=\"`color-${jj}`\"\n align=\"center\"\n justify=\"center\"\n >\n <v-btn\n icon\n :data-test=\"`${name}-color-${color}`\"\n @click=\"updateColor(color)\"\n >\n <v-badge inline :color=\"color\" />\n </v-btn>\n </v-col>\n </v-row>\n </div>\n <v-btn tile :data-test=\"`${name}-delete`\" @click=\"deleteTimeline\">\n <v-icon left> mdi-delete </v-icon>\n <span> Delete Timeline </span>\n </v-btn>\n </v-card>\n </v-menu>\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\n\nexport default {\n props: {\n timeline: Object,\n },\n data() {\n return {}\n },\n computed: {\n name: function () {\n return this.timeline ? this.timeline.name : ''\n },\n swatches: function () {\n return [\n ['#005a8f', '#003784', '#ff4081', '#df1368'],\n ['#ff5252', '#df323b', '#9f0010', '#2d9437'],\n ['#004700', '#db7200', '#802700', '#0f2941'],\n ]\n },\n },\n methods: {\n deleteTimeline: function () {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${this.name}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(`/cosmos-api/timeline/${this.name}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: 'Deleted Timeline',\n body: `${this.name} has been deleted.`,\n })\n })\n .catch((error) => {})\n },\n updateColor: function (color) {\n Api.post(`/cosmos-api/timeline/${this.name}/color`, {\n data: { color },\n }).then((response) => {\n this.$notify.normal({\n title: `Color updated on Timeline`,\n body: `Timeline: ${this.name} color update to ${color}`,\n })\n })\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"09b69c57b263394a8abf53e92cce6bb0dd779408"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return yt=function(){return o},o}yt();var bt={props:{timeline:Object},data:function(){return yt().f[0]++,yt().s[0]++,{}},computed:{name:function(){return yt().f[1]++,yt().s[1]++,this.timeline?(yt().b[0][0]++,this.timeline.name):(yt().b[0][1]++,"")},swatches:function(){return yt().f[2]++,yt().s[2]++,[["#005a8f","#003784","#ff4081","#df1368"],["#ff5252","#df323b","#9f0010","#2d9437"],["#004700","#db7200","#802700","#0f2941"]]}},methods:{deleteTimeline:function(){var n=this;yt().f[3]++,yt().s[3]++,this.$dialog.confirm("Are you sure you want to remove: ".concat(this.name),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return yt().f[4]++,yt().s[4]++,C["delete"]("/cosmos-api/timeline/".concat(n.name))})).then((function(e){yt().f[5]++,yt().s[5]++,n.$notify.normal({title:"Deleted Timeline",body:"".concat(n.name," has been deleted.")})})).catch((function(n){yt().f[6]++}))},updateColor:function(n){var e=this;yt().f[7]++,yt().s[6]++,C.post("/cosmos-api/timeline/".concat(this.name,"/color"),{data:{color:n}}).then((function(t){yt().f[8]++,yt().s[7]++,e.$notify.normal({title:"Color updated on Timeline",body:"Timeline: ".concat(e.name," color update to ").concat(n)})}))}}},gt=bt,_t=(0,k.Z)(gt,Ct,ft,!1,null,null,null),wt=_t.exports,xt=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.submit.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Timeline")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",[n._v(" Add a timeline to schedule activities on. ")]),t("v-row",[t("v-text-field",{attrs:{autofocus:"",type:"text",label:"Timeline Name","data-test":"input-timeline-name",rules:[n.rules.required]},model:{value:n.timelineName,callback:function(e){n.timelineName=e},expression:"timelineName"}})],1),t("v-row",{staticClass:"my-3"},[t("span",{directives:[{name:"show",rawName:"v-show",value:n.error,expression:"error"}],staticClass:"red--text",domProps:{textContent:n._s(n.error)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-timeline-cancel-btn"},on:{click:n.clear}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"create-timeline-submit-btn",disabled:!!n.error},on:{click:function(e){return e.preventDefault(),n.submit.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)])],1)},Tt=[];function kt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/TimelineCreateDialog.vue",e="7612ae17ddf261ad31a8dafc96271c4b9ec06d36",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/TimelineCreateDialog.vue",statementMap:{0:{start:{line:85,column:4},end:{line:90,column:5}},1:{start:{line:87,column:29},end:{line:87,column:50}},2:{start:{line:94,column:6},end:{line:96,column:7}},3:{start:{line:95,column:8},end:{line:95,column:48}},4:{start:{line:97,column:18},end:{line:99,column:7}},5:{start:{line:98,column:22},end:{line:98,column:56}},6:{start:{line:100,column:6},end:{line:102,column:7}},7:{start:{line:101,column:8},end:{line:101,column:93}},8:{start:{line:103,column:6},end:{line:103,column:17}},9:{start:{line:107,column:8},end:{line:107,column:25}},10:{start:{line:110,column:8},end:{line:110,column:34}},11:{start:{line:116,column:6},end:{line:116,column:28}},12:{start:{line:117,column:6},end:{line:117,column:28}},13:{start:{line:120,column:6},end:{line:129,column:8}},14:{start:{line:125,column:8},end:{line:128,column:10}},15:{start:{line:130,column:6},end:{line:130,column:18}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:84,column:2},end:{line:84,column:3}},loc:{start:{line:84,column:9},end:{line:91,column:3}},line:84},1:{name:"(anonymous_1)",decl:{start:{line:87,column:18},end:{line:87,column:19}},loc:{start:{line:87,column:29},end:{line:87,column:50}},line:87},2:{name:"(anonymous_2)",decl:{start:{line:93,column:11},end:{line:93,column:12}},loc:{start:{line:93,column:23},end:{line:104,column:5}},line:93},3:{name:"(anonymous_3)",decl:{start:{line:98,column:8},end:{line:98,column:9}},loc:{start:{line:98,column:22},end:{line:98,column:56}},line:98},4:{name:"(anonymous_4)",decl:{start:{line:106,column:6},end:{line:106,column:7}},loc:{start:{line:106,column:12},end:{line:108,column:7}},line:106},5:{name:"(anonymous_5)",decl:{start:{line:109,column:6},end:{line:109,column:7}},loc:{start:{line:109,column:17},end:{line:111,column:7}},line:109},6:{name:"(anonymous_6)",decl:{start:{line:115,column:11},end:{line:115,column:12}},loc:{start:{line:115,column:23},end:{line:118,column:5}},line:115},7:{name:"(anonymous_7)",decl:{start:{line:119,column:12},end:{line:119,column:13}},loc:{start:{line:119,column:24},end:{line:131,column:5}},line:119},8:{name:"(anonymous_8)",decl:{start:{line:124,column:14},end:{line:124,column:15}},loc:{start:{line:124,column:28},end:{line:129,column:7}},line:124}},branchMap:{0:{loc:{start:{line:87,column:29},end:{line:87,column:50}},type:"binary-expr",locations:[{start:{line:87,column:29},end:{line:87,column:36}},{start:{line:87,column:40},end:{line:87,column:50}}],line:87},1:{loc:{start:{line:94,column:6},end:{line:96,column:7}},type:"if",locations:[{start:{line:94,column:6},end:{line:96,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:94},2:{loc:{start:{line:100,column:6},end:{line:102,column:7}},type:"if",locations:[{start:{line:100,column:6},end:{line:102,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:100}},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,12:0,13:0,14:0,15:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,sources:["TimelineCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"TimelineCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form v-on:submit.prevent="submit">\n <v-system-bar>\n <v-spacer />\n <span>Create Timeline</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class="pa-3">\n <v-row> Add a timeline to schedule activities on. </v-row>\n <v-row>\n <v-text-field\n v-model="timelineName"\n autofocus\n type="text"\n label="Timeline Name"\n data-test="input-timeline-name"\n :rules="[rules.required]"\n />\n </v-row>\n <v-row class="my-3">\n <span class="red--text" v-show="error" v-text="error" />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="clear"\n outlined\n class="mx-2"\n data-test="create-timeline-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="submit"\n class="mx-2"\n type="submit"\n color="primary"\n data-test="create-timeline-submit-btn"\n :disabled="!!error"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\n\nexport default {\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n rules: {\n required: (value) => !!value || \'Required\',\n },\n timelineName: \'\',\n }\n },\n computed: {\n error: function () {\n if (this.timelineName === \'\') {\n return \'Timeline name can not be blank.\'\n }\n const dup = this.timelines.find(\n (timeline) => timeline.name == this.timelineName\n )\n if (dup) {\n return `Timeline must have a unique name. Duplicate timeline name found, ${dup.name}`\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n clear: function () {\n this.show = !this.show\n this.timelineName = \'\'\n },\n submit: function () {\n Api.post(\'/cosmos-api/timeline\', {\n data: {\n name: this.timelineName,\n },\n }).then((response) => {\n this.$notify.normal({\n title: \'Created new Timeline\',\n body: `Ready to schedule activities on: ${response.data.name}`,\n })\n })\n this.clear()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7612ae17ddf261ad31a8dafc96271c4b9ec06d36"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return kt=function(){return o},o}kt();var Et={props:{timelines:{type:Array,required:!0},value:Boolean},data:function(){return kt().f[0]++,kt().s[0]++,{rules:{required:function(n){return kt().f[1]++,kt().s[1]++,kt().b[0][0]++,!!n||(kt().b[0][1]++,"Required")}},timelineName:""}},computed:{error:function(){var n=this;if(kt().f[2]++,kt().s[2]++,""===this.timelineName)return kt().b[1][0]++,kt().s[3]++,"Timeline name can not be blank.";kt().b[1][1]++;var e=(kt().s[4]++,this.timelines.find((function(e){return kt().f[3]++,kt().s[5]++,e.name==n.timelineName})));return kt().s[6]++,e?(kt().b[2][0]++,kt().s[7]++,"Timeline must have a unique name. Duplicate timeline name found, ".concat(e.name)):(kt().b[2][1]++,kt().s[8]++,null)},show:{get:function(){return kt().f[4]++,kt().s[9]++,this.value},set:function(n){kt().f[5]++,kt().s[10]++,this.$emit("input",n)}}},methods:{clear:function(){kt().f[6]++,kt().s[11]++,this.show=!this.show,kt().s[12]++,this.timelineName=""},submit:function(){var n=this;kt().f[7]++,kt().s[13]++,C.post("/cosmos-api/timeline",{data:{name:this.timelineName}}).then((function(e){kt().f[8]++,kt().s[14]++,n.$notify.normal({title:"Created new Timeline",body:"Ready to schedule activities on: ".concat(e.data.name)})})),kt().s[15]++,this.clear()}}},Dt=Et,St=(t(4117),(0,k.Z)(Dt,xt,Tt,!1,null,"301c3b8d",null)),Mt=St.exports;function Ft(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarSelector.vue",e="6c7d41a67c74f4e3042591bee0d61be0281ff1e8",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarSelector.vue",statementMap:{0:{start:{line:146,column:4},end:{line:151,column:5}},1:{start:{line:154,column:4},end:{line:154,column:17}},2:{start:{line:158,column:6},end:{line:158,column:75}},3:{start:{line:158,column:49},end:{line:158,column:73}},4:{start:{line:162,column:8},end:{line:162,column:25}},5:{start:{line:165,column:8},end:{line:165,column:34}},6:{start:{line:171,column:14},end:{line:174,column:8}},7:{start:{line:172,column:8},end:{line:172,column:29}},8:{start:{line:173,column:8},end:{line:173,column:30}},9:{start:{line:175,column:6},end:{line:177,column:7}},10:{start:{line:176,column:8},end:{line:176,column:68}},11:{start:{line:178,column:6},end:{line:180,column:7}},12:{start:{line:179,column:8},end:{line:179,column:69}},13:{start:{line:181,column:6},end:{line:181,column:32}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:145,column:2},end:{line:145,column:3}},loc:{start:{line:145,column:9},end:{line:152,column:3}},line:145},1:{name:"(anonymous_1)",decl:{start:{line:153,column:11},end:{line:153,column:12}},loc:{start:{line:153,column:23},end:{line:155,column:3}},line:153},2:{name:"(anonymous_2)",decl:{start:{line:157,column:21},end:{line:157,column:22}},loc:{start:{line:157,column:33},end:{line:159,column:5}},line:157},3:{name:"(anonymous_3)",decl:{start:{line:158,column:38},end:{line:158,column:39}},loc:{start:{line:158,column:49},end:{line:158,column:73}},line:158},4:{name:"(anonymous_4)",decl:{start:{line:161,column:6},end:{line:161,column:7}},loc:{start:{line:161,column:12},end:{line:163,column:7}},line:161},5:{name:"(anonymous_5)",decl:{start:{line:164,column:6},end:{line:164,column:7}},loc:{start:{line:164,column:17},end:{line:166,column:7}},line:164},6:{name:"(anonymous_6)",decl:{start:{line:170,column:12},end:{line:170,column:13}},loc:{start:{line:170,column:24},end:{line:182,column:5}},line:170},7:{name:"(anonymous_7)",decl:{start:{line:171,column:41},end:{line:171,column:42}},loc:{start:{line:171,column:55},end:{line:174,column:7}},line:171}},branchMap:{0:{loc:{start:{line:158,column:49},end:{line:158,column:73}},type:"cond-expr",locations:[{start:{line:158,column:67},end:{line:158,column:68}},{start:{line:158,column:71},end:{line:158,column:73}}],line:158},1:{loc:{start:{line:175,column:6},end:{line:177,column:7}},type:"if",locations:[{start:{line:175,column:6},end:{line:177,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:175},2:{loc:{start:{line:178,column:6},end:{line:180,column:7}},type:"if",locations:[{start:{line:178,column:6},end:{line:180,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:178}},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,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,sources:["CalendarSelector.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"CalendarSelector.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-toolbar dense>\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn\n icon\n data-test="create-timeline"\n @click="showCreateDialog = true"\n >\n <v-icon>mdi-calendar-plus</v-icon>\n </v-btn>\n </div>\n </template>\n <span>Create Timeline</span>\n </v-tooltip>\n <v-spacer />\n \x3c!--- <v-toolbar-title> Timelines </v-toolbar-title> ---\x3e\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn\n icon\n data-test="view-environment-dialog"\n @click="showEnvironmentDialog = true"\n >\n <v-icon>mdi-library</v-icon>\n </v-btn>\n </div>\n </template>\n <span>Environment Dialog</span>\n </v-tooltip>\n </v-toolbar>\n \x3c!--- SHOW TIMELINES ---\x3e\n <v-list flat>\n <v-subheader style="height: 25px">Chronicles</v-subheader>\n <v-list-item-group multiple v-model="selectedChronicles" @change="select">\n <v-list-item data-test="select-metadata">\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-list-item-title> Metadata </v-list-item-title>\n </v-list-item-content>\n </template>\n </v-list-item>\n <v-list-item data-test="select-narrative">\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-list-item-title> Narrative </v-list-item-title>\n </v-list-item-content>\n </template>\n </v-list-item>\n </v-list-item-group>\n \x3c!--- TIMELINES ---\x3e\n <v-subheader style="height: 25px">Timelines</v-subheader>\n <v-list-item-group multiple v-model="selectedTimelines" @change="select">\n <template v-for="timeline in timelines">\n <v-list-item\n :key="`timeline-${timeline.name}`"\n :value="timeline"\n :data-test="`select-timeline-${timeline.name}`"\n >\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-badge\n dot\n bordered\n inline\n tile\n :color="timeline.color"\n :value="timeline.messages"\n >\n <v-list-item-title v-text="timeline.name" />\n </v-badge>\n </v-list-item-content>\n\n <v-list-item-action>\n <selector-options :timeline="timeline" />\n </v-list-item-action>\n </template>\n </v-list-item>\n </template>\n </v-list-item-group>\n </v-list>\n \x3c!--- MENUS ---\x3e\n <environment-dialog v-model="showEnvironmentDialog" />\n <timeline-create-dialog v-model="showCreateDialog" :timelines="timelines" />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentDialog from \'@cosmosc2/tool-common/src/components/EnvironmentDialog\'\nimport SelectorOptions from \'@/tools/Calendar/SelectorOptions\'\nimport TimelineCreateDialog from \'@/tools/Calendar/Dialogs/TimelineCreateDialog\'\n\nexport default {\n components: {\n SelectorOptions,\n TimelineCreateDialog,\n EnvironmentDialog,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: {\n type: Array,\n required: true,\n },\n },\n data() {\n return {\n selectedTimelines: [],\n selectedChronicles: [0, 1],\n showCreateDialog: false,\n showEnvironmentDialog: false,\n }\n },\n mounted: function () {\n this.select()\n },\n computed: {\n sortedTimelines: function () {\n return [...this.timelines].sort((a, b) => (a.name > b.name ? 1 : -1))\n },\n selectedCalendars: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n select: function () {\n let t = this.selectedTimelines.map((timeline) => {\n timeline.messages = 0\n return { ...timeline }\n })\n if (this.selectedChronicles.indexOf(0) > -1) {\n t.push({ type: \'chronicle\', name: \'metadata\', messages: 0 })\n }\n if (this.selectedChronicles.indexOf(1) > -1) {\n t.push({ type: \'chronicle\', name: \'narrative\', messages: 0 })\n }\n this.selectedCalendars = t\n },\n },\n}\n<\/script>\n\n<style scoped>\n.selected-title {\n background-color: var(--v-secondary-base);\n}\n.available-title {\n background-color: var(--v-primary-darken2);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6c7d41a67c74f4e3042591bee0d61be0281ff1e8"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Ft=function(){return o},o}Ft();var Nt={components:{SelectorOptions:wt,TimelineCreateDialog:Mt,EnvironmentDialog:ht},props:{timelines:{type:Array,required:!0},value:{type:Array,required:!0}},data:function(){return Ft().f[0]++,Ft().s[0]++,{selectedTimelines:[],selectedChronicles:[0,1],showCreateDialog:!1,showEnvironmentDialog:!1}},mounted:function(){Ft().f[1]++,Ft().s[1]++,this.select()},computed:{sortedTimelines:function(){return Ft().f[2]++,Ft().s[2]++,(0,ut.Z)(this.timelines).sort((function(n,e){return Ft().f[3]++,Ft().s[3]++,n.name>e.name?(Ft().b[0][0]++,1):(Ft().b[0][1]++,-1)}))},selectedCalendars:{get:function(){return Ft().f[4]++,Ft().s[4]++,this.value},set:function(n){Ft().f[5]++,Ft().s[5]++,this.$emit("input",n)}}},methods:{select:function(){Ft().f[6]++;var n=(Ft().s[6]++,this.selectedTimelines.map((function(n){return Ft().f[7]++,Ft().s[7]++,n.messages=0,Ft().s[8]++,(0,a.Z)({},n)})));Ft().s[9]++,this.selectedChronicles.indexOf(0)>-1?(Ft().b[1][0]++,Ft().s[10]++,n.push({type:"chronicle",name:"metadata",messages:0})):Ft().b[1][1]++,Ft().s[11]++,this.selectedChronicles.indexOf(1)>-1?(Ft().b[2][0]++,Ft().s[12]++,n.push({type:"chronicle",name:"narrative",messages:0})):Ft().b[2][1]++,Ft().s[13]++,this.selectedCalendars=n}}},It=Nt,Ot=(t(8279),(0,k.Z)(It,rt,ct,!1,null,"d1a55f34",null)),Rt=Ot.exports,$t=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{staticClass:"px-2 pb-2",attrs:{dense:""}},[t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer"),t("v-btn",{attrs:{small:"",icon:"","data-test":"mini-prev"},on:{click:n.prev}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-left ")])],1),t("v-btn",{attrs:{small:"",icon:"","data-test":"mini-next"},on:{click:n.next}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-right ")])],1)],1),t("v-calendar",{ref:"sideCalendar",attrs:{"show-month-on-first":!1},on:{"click:date":n.viewDay},model:{value:n.focus,callback:function(e){n.focus=e},expression:"focus"}})],1)},Ut=[];function Lt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/MiniCalendar.vue",e="eb030252e66a2b0529c489aa7820e14d3408fcc0",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/MiniCalendar.vue",statementMap:{0:{start:{line:51,column:4},end:{line:54,column:5}},1:{start:{line:57,column:4},end:{line:57,column:41}},2:{start:{line:58,column:4},end:{line:58,column:46}},3:{start:{line:63,column:8},end:{line:63,column:25}},4:{start:{line:66,column:8},end:{line:66,column:34}},5:{start:{line:70,column:6},end:{line:83,column:7}},6:{start:{line:88,column:16},end:{line:88,column:36}},7:{start:{line:89,column:20},end:{line:89,column:52}},8:{start:{line:90,column:19},end:{line:90,column:37}},9:{start:{line:91,column:6},end:{line:91,column:37}},10:{start:{line:96,column:6},end:{line:99,column:7}},11:{start:{line:102,column:6},end:{line:102,column:36}},12:{start:{line:105,column:6},end:{line:105,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:9},end:{line:55,column:3}},line:50},1:{name:"(anonymous_1)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:12},end:{line:59,column:3}},line:56},2:{name:"(anonymous_2)",decl:{start:{line:62,column:6},end:{line:62,column:7}},loc:{start:{line:62,column:12},end:{line:64,column:7}},line:62},3:{name:"(anonymous_3)",decl:{start:{line:65,column:6},end:{line:65,column:7}},loc:{start:{line:65,column:17},end:{line:67,column:7}},line:65},4:{name:"(anonymous_4)",decl:{start:{line:69,column:16},end:{line:69,column:17}},loc:{start:{line:69,column:28},end:{line:84,column:5}},line:69},5:{name:"(anonymous_5)",decl:{start:{line:87,column:11},end:{line:87,column:12}},loc:{start:{line:87,column:23},end:{line:92,column:5}},line:87},6:{name:"(anonymous_6)",decl:{start:{line:95,column:13},end:{line:95,column:14}},loc:{start:{line:95,column:33},end:{line:100,column:5}},line:95},7:{name:"(anonymous_7)",decl:{start:{line:101,column:10},end:{line:101,column:11}},loc:{start:{line:101,column:22},end:{line:103,column:5}},line:101},8:{name:"(anonymous_8)",decl:{start:{line:104,column:10},end:{line:104,column:11}},loc:{start:{line:104,column:22},end:{line:106,column:5}},line:104}},branchMap:{},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,12:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{},inputSourceMap:{version:3,sources:["MiniCalendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MiniCalendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-row dense class=\"px-2 pb-2\">\n <v-toolbar-title v-text=\"title\" />\n <v-spacer />\n <v-btn small icon data-test=\"mini-prev\" @click=\"prev\">\n <v-icon small> mdi-chevron-left </v-icon>\n </v-btn>\n <v-btn small icon data-test=\"mini-next\" @click=\"next\">\n <v-icon small> mdi-chevron-right </v-icon>\n </v-btn>\n </v-row>\n <v-calendar\n ref=\"sideCalendar\"\n v-model=\"focus\"\n :show-month-on-first=\"false\"\n @click:date=\"viewDay\"\n />\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n focus: '',\n title: '',\n }\n },\n mounted() {\n this.$refs.sideCalendar.checkChange()\n this.title = this.$refs.sideCalendar.title\n },\n computed: {\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n monthNames: function () {\n return [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ]\n },\n },\n watch: {\n focus: function () {\n const d = new Date(this.focus)\n const month = this.monthNames[d.getUTCMonth()]\n const year = d.getUTCFullYear()\n this.title = `${month} ${year}`\n },\n },\n methods: {\n viewDay: function ({ date }) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n focus: date,\n }\n },\n prev: function () {\n this.$refs.sideCalendar.prev()\n },\n next: function () {\n this.$refs.sideCalendar.next()\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"eb030252e66a2b0529c489aa7820e14d3408fcc0"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return Lt=function(){return o},o}Lt();var Pt={components:{},props:{value:{type:Object,required:!0}},data:function(){return Lt().f[0]++,Lt().s[0]++,{focus:"",title:""}},mounted:function(){Lt().f[1]++,Lt().s[1]++,this.$refs.sideCalendar.checkChange(),Lt().s[2]++,this.title=this.$refs.sideCalendar.title},computed:{calendarConfiguration:{get:function(){return Lt().f[2]++,Lt().s[3]++,this.value},set:function(n){Lt().f[3]++,Lt().s[4]++,this.$emit("input",n)}},monthNames:function(){return Lt().f[4]++,Lt().s[5]++,["January","February","March","April","May","June","July","August","September","October","November","December"]}},watch:{focus:function(){Lt().f[5]++;var n=(Lt().s[6]++,new Date(this.focus)),e=(Lt().s[7]++,this.monthNames[n.getUTCMonth()]),t=(Lt().s[8]++,n.getUTCFullYear());Lt().s[9]++,this.title="".concat(e," ").concat(t)}},methods:{viewDay:function(n){var e=n.date;Lt().f[6]++,Lt().s[10]++,this.calendarConfiguration=(0,a.Z)((0,a.Z)({},this.calendarConfiguration),{},{focus:e})},prev:function(){Lt().f[7]++,Lt().s[11]++,this.$refs.sideCalendar.prev()},next:function(){Lt().f[8]++,Lt().s[12]++,this.$refs.sideCalendar.next()}}},qt=Pt,Ht=(0,k.Z)(qt,$t,Ut,!1,null,null,null),Zt=Ht.exports;function jt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Calendar.vue",e="fefd03accb04f9afee6159fbe31284a74043da64",t=new Function("return this")(),i="__coverage__",l={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Calendar.vue",statementMap:{0:{start:{line:78,column:4},end:{line:93,column:5}},1:{start:{line:97,column:6},end:{line:115,column:7}},2:{start:{line:122,column:8},end:{line:122,column:31}},3:{start:{line:128,column:8},end:{line:128,column:36}},4:{start:{line:134,column:8},end:{line:134,column:36}},5:{start:{line:139,column:4},end:{line:139,column:20}},6:{start:{line:140,column:4},end:{line:140,column:23}},7:{start:{line:141,column:4},end:{line:141,column:25}},8:{start:{line:142,column:4},end:{line:142,column:26}},9:{start:{line:145,column:4},end:{line:147,column:6}},10:{start:{line:146,column:6},end:{line:146,column:32}},11:{start:{line:148,column:4},end:{line:148,column:27}},12:{start:{line:153,column:6},end:{line:159,column:7}},13:{start:{line:154,column:8},end:{line:154,column:39}},14:{start:{line:155,column:13},end:{line:159,column:7}},15:{start:{line:156,column:8},end:{line:156,column:39}},16:{start:{line:157,column:13},end:{line:159,column:7}},17:{start:{line:158,column:8},end:{line:158,column:22}},18:{start:{line:162,column:29},end:{line:165,column:7}},19:{start:{line:166,column:30},end:{line:169,column:7}},20:{start:{line:170,column:6},end:{line:170,column:66}},21:{start:{line:173,column:6},end:{line:173,column:29}},22:{start:{line:174,column:6},end:{line:174,column:27}},23:{start:{line:175,column:6},end:{line:175,column:28}},24:{start:{line:178,column:6},end:{line:185,column:8}},25:{start:{line:179,column:33},end:{line:179,column:46}},26:{start:{line:180,column:8},end:{line:183,column:10}},27:{start:{line:181,column:10},end:{line:181,column:31}},28:{start:{line:182,column:10},end:{line:182,column:36}},29:{start:{line:184,column:8},end:{line:184,column:41}},30:{start:{line:192,column:29},end:{line:194,column:7}},31:{start:{line:193,column:22},end:{line:193,column:64}},32:{start:{line:195,column:6},end:{line:197,column:7}},33:{start:{line:196,column:8},end:{line:196,column:45}},34:{start:{line:198,column:6},end:{line:200,column:7}},35:{start:{line:199,column:8},end:{line:199,column:48}},36:{start:{line:202,column:6},end:{line:211,column:7}},37:{start:{line:203,column:30},end:{line:205,column:9}},38:{start:{line:204,column:24},end:{line:204,column:46}},39:{start:{line:206,column:8},end:{line:206,column:60}},40:{start:{line:208,column:8},end:{line:210,column:9}},41:{start:{line:209,column:24},end:{line:209,column:52}},42:{start:{line:212,column:6},end:{line:222,column:7}},43:{start:{line:213,column:8},end:{line:213,column:29}},44:{start:{line:214,column:8},end:{line:221,column:9}},45:{start:{line:215,column:10},end:{line:220,column:11}},46:{start:{line:217,column:14},end:{line:217,column:60}},47:{start:{line:218,column:14},end:{line:218,column:54}},48:{start:{line:229,column:6},end:{line:234,column:8}},49:{start:{line:230,column:8},end:{line:233,column:9}},50:{start:{line:241,column:6},end:{line:246,column:8}},51:{start:{line:242,column:8},end:{line:245,column:9}},52:{start:{line:249,column:6},end:{line:257,column:8}},53:{start:{line:250,column:8},end:{line:256,column:12}},54:{start:{line:252,column:32},end:{line:252,column:51}},55:{start:{line:255,column:12},end:{line:255,column:49}},56:{start:{line:260,column:21},end:{line:260,column:37}},57:{start:{line:261,column:6},end:{line:265,column:8}},58:{start:{line:262,column:8},end:{line:262,column:43}},59:{start:{line:264,column:8},end:{line:264,column:65}},60:{start:{line:268,column:6},end:{line:268,column:43}},61:{start:{line:271,column:6},end:{line:271,column:29}},62:{start:{line:272,column:6},end:{line:272,column:34}},63:{start:{line:273,column:6},end:{line:273,column:37}},64:{start:{line:274,column:6},end:{line:274,column:42}},65:{start:{line:277,column:28},end:{line:279,column:7}},66:{start:{line:278,column:22},end:{line:278,column:54}},67:{start:{line:280,column:6},end:{line:280,column:48}},68:{start:{line:281,column:6},end:{line:281,column:45}},69:{start:{line:282,column:6},end:{line:282,column:46}},70:{start:{line:285,column:28},end:{line:287,column:7}},71:{start:{line:286,column:22},end:{line:286,column:54}},72:{start:{line:288,column:6},end:{line:288,column:70}},73:{start:{line:289,column:27},end:{line:291,column:7}},74:{start:{line:290,column:22},end:{line:290,column:54}},75:{start:{line:292,column:6},end:{line:292,column:76}},76:{start:{line:295,column:6},end:{line:295,column:52}},77:{start:{line:296,column:6},end:{line:299,column:7}},78:{start:{line:297,column:8},end:{line:297,column:56}},79:{start:{line:298,column:8},end:{line:298,column:48}},80:{start:{line:302,column:6},end:{line:302,column:52}},81:{start:{line:303,column:6},end:{line:309,column:7}},82:{start:{line:304,column:30},end:{line:306,column:9}},83:{start:{line:305,column:24},end:{line:305,column:59}},84:{start:{line:307,column:8},end:{line:307,column:67}},85:{start:{line:308,column:8},end:{line:308,column:48}},86:{start:{line:312,column:6},end:{line:312,column:41}},87:{start:{line:313,column:6},end:{line:313,column:52}},88:{start:{line:314,column:6},end:{line:320,column:7}},89:{start:{line:315,column:30},end:{line:317,column:9}},90:{start:{line:316,column:24},end:{line:316,column:54}},91:{start:{line:318,column:8},end:{line:318,column:67}},92:{start:{line:319,column:8},end:{line:319,column:48}},93:{start:{line:323,column:6},end:{line:323,column:52}},94:{start:{line:324,column:6},end:{line:333,column:7}},95:{start:{line:325,column:30},end:{line:327,column:9}},96:{start:{line:326,column:24},end:{line:326,column:59}},97:{start:{line:328,column:8},end:{line:331,column:9}},98:{start:{line:332,column:8},end:{line:332,column:48}},99:{start:{line:336,column:6},end:{line:339,column:7}},100:{start:{line:337,column:8},end:{line:338,column:21}},101:{start:{line:337,column:42},end:{line:337,column:72}},102:{start:{line:342,column:28},end:{line:342,column:43}},103:{start:{line:343,column:6},end:{line:343,column:53}},104:{start:{line:344,column:6},end:{line:344,column:46}},105:{start:{line:347,column:6},end:{line:347,column:41}},106:{start:{line:348,column:28},end:{line:348,column:43}},107:{start:{line:349,column:29},end:{line:351,column:7}},108:{start:{line:350,column:27},end:{line:350,column:62}},109:{start:{line:352,column:6},end:{line:352,column:65}},110:{start:{line:353,column:6},end:{line:353,column:46}},111:{start:{line:356,column:28},end:{line:356,column:43}},112:{start:{line:357,column:29},end:{line:359,column:7}},113:{start:{line:358,column:27},end:{line:358,column:67}},114:{start:{line:360,column:6},end:{line:363,column:7}},115:{start:{line:364,column:6},end:{line:364,column:46}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:77,column:2},end:{line:77,column:3}},loc:{start:{line:77,column:9},end:{line:94,column:3}},line:77},1:{name:"(anonymous_1)",decl:{start:{line:96,column:27},end:{line:96,column:28}},loc:{start:{line:96,column:39},end:{line:116,column:5}},line:96},2:{name:"(anonymous_2)",decl:{start:{line:121,column:15},end:{line:121,column:16}},loc:{start:{line:121,column:27},end:{line:123,column:7}},line:121},3:{name:"(anonymous_3)",decl:{start:{line:127,column:15},end:{line:127,column:16}},loc:{start:{line:127,column:27},end:{line:129,column:7}},line:127},4:{name:"(anonymous_4)",decl:{start:{line:133,column:15},end:{line:133,column:16}},loc:{start:{line:133,column:27},end:{line:135,column:7}},line:133},5:{name:"(anonymous_5)",decl:{start:{line:138,column:11},end:{line:138,column:12}},loc:{start:{line:138,column:23},end:{line:143,column:3}},line:138},6:{name:"(anonymous_6)",decl:{start:{line:144,column:13},end:{line:144,column:14}},loc:{start:{line:144,column:25},end:{line:149,column:3}},line:144},7:{name:"(anonymous_7)",decl:{start:{line:145,column:31},end:{line:145,column:32}},loc:{start:{line:145,column:49},end:{line:147,column:5}},line:145},8:{name:"(anonymous_8)",decl:{start:{line:151,column:19},end:{line:151,column:20}},loc:{start:{line:151,column:36},end:{line:160,column:5}},line:151},9:{name:"(anonymous_9)",decl:{start:{line:161,column:27},end:{line:161,column:28}},loc:{start:{line:161,column:39},end:{line:171,column:5}},line:161},10:{name:"(anonymous_10)",decl:{start:{line:172,column:13},end:{line:172,column:14}},loc:{start:{line:172,column:25},end:{line:176,column:5}},line:172},11:{name:"(anonymous_11)",decl:{start:{line:177,column:18},end:{line:177,column:19}},loc:{start:{line:177,column:30},end:{line:186,column:5}},line:177},12:{name:"(anonymous_12)",decl:{start:{line:178,column:43},end:{line:178,column:44}},loc:{start:{line:178,column:57},end:{line:185,column:7}},line:178},13:{name:"(anonymous_13)",decl:{start:{line:180,column:33},end:{line:180,column:34}},loc:{start:{line:180,column:47},end:{line:183,column:9}},line:180},14:{name:"(anonymous_14)",decl:{start:{line:187,column:22},end:{line:187,column:23}},loc:{start:{line:187,column:45},end:{line:223,column:5}},line:187},15:{name:"(anonymous_15)",decl:{start:{line:193,column:8},end:{line:193,column:9}},loc:{start:{line:193,column:22},end:{line:193,column:64}},line:193},16:{name:"(anonymous_16)",decl:{start:{line:204,column:10},end:{line:204,column:11}},loc:{start:{line:204,column:24},end:{line:204,column:46}},line:204},17:{name:"(anonymous_17)",decl:{start:{line:209,column:10},end:{line:209,column:11}},loc:{start:{line:209,column:24},end:{line:209,column:52}},line:209},18:{name:"(anonymous_18)",decl:{start:{line:216,column:12},end:{line:216,column:13}},loc:{start:{line:216,column:26},end:{line:219,column:13}},line:216},19:{name:"(anonymous_19)",decl:{start:{line:224,column:20},end:{line:224,column:21}},loc:{start:{line:224,column:32},end:{line:235,column:5}},line:224},20:{name:"(anonymous_20)",decl:{start:{line:229,column:43},end:{line:229,column:44}},loc:{start:{line:229,column:57},end:{line:234,column:7}},line:229},21:{name:"(anonymous_21)",decl:{start:{line:236,column:21},end:{line:236,column:22}},loc:{start:{line:236,column:33},end:{line:247,column:5}},line:236},22:{name:"(anonymous_22)",decl:{start:{line:241,column:44},end:{line:241,column:45}},loc:{start:{line:241,column:58},end:{line:246,column:7}},line:241},23:{name:"(anonymous_23)",decl:{start:{line:248,column:15},end:{line:248,column:16}},loc:{start:{line:248,column:27},end:{line:258,column:5}},line:248},24:{name:"(anonymous_24)",decl:{start:{line:249,column:28},end:{line:249,column:29}},loc:{start:{line:249,column:41},end:{line:257,column:7}},line:249},25:{name:"(anonymous_25)",decl:{start:{line:252,column:22},end:{line:252,column:23}},loc:{start:{line:252,column:32},end:{line:252,column:51}},line:252},26:{name:"(anonymous_26)",decl:{start:{line:254,column:16},end:{line:254,column:17}},loc:{start:{line:254,column:34},end:{line:256,column:11}},line:254},27:{name:"(anonymous_27)",decl:{start:{line:259,column:14},end:{line:259,column:15}},loc:{start:{line:259,column:30},end:{line:266,column:5}},line:259},28:{name:"(anonymous_28)",decl:{start:{line:261,column:21},end:{line:261,column:22}},loc:{start:{line:261,column:32},end:{line:265,column:7}},line:261},29:{name:"(anonymous_29)",decl:{start:{line:267,column:30},end:{line:267,column:31}},loc:{start:{line:267,column:47},end:{line:269,column:5}},line:267},30:{name:"(anonymous_30)",decl:{start:{line:270,column:30},end:{line:270,column:31}},loc:{start:{line:270,column:47},end:{line:275,column:5}},line:270},31:{name:"(anonymous_31)",decl:{start:{line:276,column:30},end:{line:276,column:31}},loc:{start:{line:276,column:47},end:{line:283,column:5}},line:276},32:{name:"(anonymous_32)",decl:{start:{line:278,column:8},end:{line:278,column:9}},loc:{start:{line:278,column:22},end:{line:278,column:54}},line:278},33:{name:"(anonymous_33)",decl:{start:{line:284,column:30},end:{line:284,column:31}},loc:{start:{line:284,column:47},end:{line:293,column:5}},line:284},34:{name:"(anonymous_34)",decl:{start:{line:286,column:8},end:{line:286,column:9}},loc:{start:{line:286,column:22},end:{line:286,column:54}},line:286},35:{name:"(anonymous_35)",decl:{start:{line:290,column:8},end:{line:290,column:9}},loc:{start:{line:290,column:22},end:{line:290,column:54}},line:290},36:{name:"(anonymous_36)",decl:{start:{line:294,column:30},end:{line:294,column:31}},loc:{start:{line:294,column:47},end:{line:300,column:5}},line:294},37:{name:"(anonymous_37)",decl:{start:{line:301,column:28},end:{line:301,column:29}},loc:{start:{line:301,column:45},end:{line:310,column:5}},line:301},38:{name:"(anonymous_38)",decl:{start:{line:305,column:10},end:{line:305,column:11}},loc:{start:{line:305,column:24},end:{line:305,column:59}},line:305},39:{name:"(anonymous_39)",decl:{start:{line:311,column:30},end:{line:311,column:31}},loc:{start:{line:311,column:47},end:{line:321,column:5}},line:311},40:{name:"(anonymous_40)",decl:{start:{line:316,column:10},end:{line:316,column:11}},loc:{start:{line:316,column:24},end:{line:316,column:54}},line:316},41:{name:"(anonymous_41)",decl:{start:{line:322,column:30},end:{line:322,column:31}},loc:{start:{line:322,column:47},end:{line:334,column:5}},line:322},42:{name:"(anonymous_42)",decl:{start:{line:326,column:10},end:{line:326,column:11}},loc:{start:{line:326,column:24},end:{line:326,column:59}},line:326},43:{name:"(anonymous_43)",decl:{start:{line:335,column:31},end:{line:335,column:32}},loc:{start:{line:335,column:55},end:{line:340,column:5}},line:335},44:{name:"(anonymous_44)",decl:{start:{line:337,column:28},end:{line:337,column:29}},loc:{start:{line:337,column:42},end:{line:337,column:72}},line:337},45:{name:"(anonymous_45)",decl:{start:{line:341,column:31},end:{line:341,column:32}},loc:{start:{line:341,column:48},end:{line:345,column:5}},line:341},46:{name:"(anonymous_46)",decl:{start:{line:346,column:31},end:{line:346,column:32}},loc:{start:{line:346,column:48},end:{line:354,column:5}},line:346},47:{name:"(anonymous_47)",decl:{start:{line:350,column:8},end:{line:350,column:9}},loc:{start:{line:350,column:27},end:{line:350,column:62}},line:350},48:{name:"(anonymous_48)",decl:{start:{line:355,column:31},end:{line:355,column:32}},loc:{start:{line:355,column:48},end:{line:365,column:5}},line:355},49:{name:"(anonymous_49)",decl:{start:{line:358,column:8},end:{line:358,column:9}},loc:{start:{line:358,column:27},end:{line:358,column:67}},line:358}},branchMap:{0:{loc:{start:{line:153,column:6},end:{line:159,column:7}},type:"if",locations:[{start:{line:153,column:6},end:{line:159,column:7}},{start:{line:155,column:13},end:{line:159,column:7}}],line:153},1:{loc:{start:{line:155,column:13},end:{line:159,column:7}},type:"if",locations:[{start:{line:155,column:13},end:{line:159,column:7}},{start:{line:157,column:13},end:{line:159,column:7}}],line:155},2:{loc:{start:{line:157,column:13},end:{line:159,column:7}},type:"if",locations:[{start:{line:157,column:13},end:{line:159,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},3:{loc:{start:{line:187,column:32},end:{line:187,column:43}},type:"default-arg",locations:[{start:{line:187,column:39},end:{line:187,column:43}}],line:187},4:{loc:{start:{line:198,column:6},end:{line:200,column:7}},type:"if",locations:[{start:{line:198,column:6},end:{line:200,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:198},5:{loc:{start:{line:202,column:6},end:{line:211,column:7}},type:"if",locations:[{start:{line:202,column:6},end:{line:211,column:7}},{start:{line:207,column:13},end:{line:211,column:7}}],line:202},6:{loc:{start:{line:206,column:28},end:{line:206,column:60}},type:"binary-expr",locations:[{start:{line:206,column:28},end:{line:206,column:41}},{start:{line:206,column:45},end:{line:206,column:60}}],line:206},7:{loc:{start:{line:214,column:8},end:{line:221,column:9}},type:"if",locations:[{start:{line:214,column:8},end:{line:221,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},8:{loc:{start:{line:214,column:12},end:{line:214,column:51}},type:"binary-expr",locations:[{start:{line:214,column:12},end:{line:214,column:16}},{start:{line:214,column:20},end:{line:214,column:51}}],line:214},9:{loc:{start:{line:288,column:43},end:{line:288,column:69}},type:"cond-expr",locations:[{start:{line:288,column:64},end:{line:288,column:65}},{start:{line:288,column:68},end:{line:288,column:69}}],line:288},10:{loc:{start:{line:292,column:50},end:{line:292,column:75}},type:"cond-expr",locations:[{start:{line:292,column:70},end:{line:292,column:71}},{start:{line:292,column:74},end:{line:292,column:75}}],line:292},11:{loc:{start:{line:296,column:6},end:{line:299,column:7}},type:"if",locations:[{start:{line:296,column:6},end:{line:299,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:296},12:{loc:{start:{line:303,column:6},end:{line:309,column:7}},type:"if",locations:[{start:{line:303,column:6},end:{line:309,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:303},13:{loc:{start:{line:314,column:6},end:{line:320,column:7}},type:"if",locations:[{start:{line:314,column:6},end:{line:320,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:314},14:{loc:{start:{line:324,column:6},end:{line:333,column:7}},type:"if",locations:[{start:{line:324,column:6},end:{line:333,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:324},15:{loc:{start:{line:330,column:10},end:{line:330,column:36}},type:"cond-expr",locations:[{start:{line:330,column:31},end:{line:330,column:32}},{start:{line:330,column:35},end:{line:330,column:36}}],line:330},16:{loc:{start:{line:336,column:6},end:{line:339,column:7}},type:"if",locations:[{start:{line:336,column:6},end:{line:339,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:336},17:{loc:{start:{line:362,column:8},end:{line:362,column:35}},type:"cond-expr",locations:[{start:{line:362,column:30},end:{line:362,column:31}},{start:{line:362,column:34},end:{line:362,column:35}}],line:362}},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,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0]},inputSourceMap:{version:3,sources:["Calendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"Calendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\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# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <top-bar :title=\"title\" />\n <v-container dense>\n <v-row>\n <v-col class=\"pa-1\">\n <calendar-toolbar\n v-model=\"calendarConfiguration\"\n :timelines=\"timelines\"\n :events=\"calendarEvents\"\n @action=\"actionHandler\"\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col style=\"max-width: 300px\">\n <mini-calendar v-model=\"calendarConfiguration\" />\n <v-divider class=\"my-1\" />\n <calendar-selector\n v-model=\"selectedCalendars\"\n :timelines=\"timelines\"\n />\n </v-col>\n <v-col class=\"pa-1\">\n <event-calendar\n v-model=\"calendarConfiguration\"\n ref=\"eventCalendar\"\n :events=\"calendarEvents\"\n />\n </v-col>\n </v-row>\n </v-container>\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport Cable from '@cosmosc2/tool-common/src/services/cable.js'\nimport TopBar from '@cosmosc2/tool-common/src/components/TopBar'\n\nimport EventCalendar from '@/tools/Calendar/EventCalendar'\nimport CalendarToolbar from '@/tools/Calendar/CalendarToolbar'\nimport CalendarSelector from '@/tools/Calendar/CalendarSelector'\nimport MiniCalendar from '@/tools/Calendar/MiniCalendar'\nimport TimelineMethods from '@/tools/Calendar/Filters/timeFilters.js'\nimport { getTimelineEvents } from '@/tools/Calendar/Filters/timelineFilters.js'\nimport { getChronicleEvents } from '@/tools/Calendar/Filters/chronicleFilters.js'\n\nexport default {\n components: {\n EventCalendar,\n CalendarToolbar,\n CalendarSelector,\n MiniCalendar,\n TopBar,\n },\n mixins: [TimelineMethods],\n data() {\n return {\n title: 'Calendar',\n timelines: [],\n selectedCalendars: [],\n activities: {},\n calendarEvents: [],\n chronicles: { metadata: [], narrative: [] },\n calendarConfiguration: {\n utc: false,\n focus: '',\n type: '4day',\n },\n channels: ['TimelineEventsChannel', 'CalendarEventsChannel'],\n cable: new Cable(),\n subscriptions: [],\n }\n },\n computed: {\n eventHandlerFunctions: function () {\n return {\n timeline: {\n created: this.createdTimelineFromEvent,\n refresh: this.refreshTimelineFromEvent,\n updated: this.updatedTimelineFromEvent,\n deleted: this.deletedTimelineFromEvent,\n },\n activity: {\n event: this.eventActivityFromEvent,\n created: this.createdActivityFromEvent,\n updated: this.updatedActivityFromEvent,\n deleted: this.deletedActivityFromEvent,\n },\n calendar: {\n created: this.createdChronicleFromEvent,\n updated: this.updatedChronicleFromEvent,\n deleted: this.deletedChronicleFromEvent,\n },\n }\n },\n },\n watch: {\n selectedCalendars: {\n immediate: true,\n handler: function () {\n this.updateActivities()\n },\n },\n chronicles: {\n immediate: true,\n handler: function () {\n this.rebuildCalendarEvents()\n },\n },\n activities: {\n immediate: true,\n handler: function () {\n this.rebuildCalendarEvents()\n },\n },\n },\n created: function () {\n this.subscribe()\n this.getTimelines()\n this.updateMetadata()\n this.updateNarrative()\n },\n destroyed: function () {\n this.subscriptions.forEach((subscription) => {\n subscription.unsubscribe()\n })\n this.cable.disconnect()\n },\n methods: {\n actionHandler: function (event) {\n // console.log('actionHandler', event)\n if (event.method === 'next') {\n this.$refs.eventCalendar.next()\n } else if (event.method === 'prev') {\n this.$refs.eventCalendar.prev()\n } else if (event.method === 'refresh') {\n this.refresh()\n }\n },\n rebuildCalendarEvents: function () {\n const timelineEvents = getTimelineEvents(\n this.selectedCalendars,\n this.activities\n )\n const chronicleEvents = getChronicleEvents(\n this.selectedCalendars,\n this.chronicles\n )\n this.calendarEvents = timelineEvents.concat(chronicleEvents)\n },\n refresh: function () {\n this.updateActivities()\n this.updateMetadata()\n this.updateNarrative()\n },\n getTimelines: function () {\n Api.get('/cosmos-api/timeline').then((response) => {\n const timelineResponse = response.data\n timelineResponse.forEach((timeline) => {\n timeline.messages = 0\n timeline.type = 'timeline'\n })\n this.timelines = timelineResponse\n })\n },\n updateActivities: function (name = null) {\n // this.activities = {\n // \"timelineName\": [activity1, activity2, etc],\n // \"anotherTimeline\": etc\n // }\n const noLongerNeeded = Object.keys(this.activities).filter(\n (timeline) => !this.selectedCalendars.includes(timeline)\n )\n for (const timeline of noLongerNeeded) {\n delete this.activities[timeline.name]\n }\n if (noLongerNeeded) {\n this.activities = { ...this.activities } // New object reference to force reactivity\n }\n let timelinesToUpdate\n if (name) {\n const inputTimeline = this.timelines.find(\n (timeline) => timeline.name === name\n )\n timelinesToUpdate = inputTimeline && [inputTimeline]\n } else {\n timelinesToUpdate = this.selectedCalendars.filter(\n (calendar) => calendar.type === 'timeline'\n )\n }\n for (const timeline of timelinesToUpdate) {\n timeline.messages = 0\n if (name || !this.activities[timeline.name]) {\n Api.get(`/cosmos-api/timeline/${timeline.name}/activities`).then(\n (response) => {\n this.activities[timeline.name] = response.data\n this.activities = { ...this.activities } // New object reference to force reactivity\n }\n )\n }\n }\n },\n updateMetadata: function () {\n // this.chronicles = {\n // \"metadata\": [event1, event2, etc],\n // \"narrative\": etc\n // }\n Api.get(`/cosmos-api/metadata`).then((response) => {\n this.chronicles = {\n ...this.chronicles,\n metadata: response.data,\n }\n })\n },\n updateNarrative: function () {\n // this.chronicles = {\n // \"narrative\": [event1, event2, etc],\n // \"metadata\": etc\n // }\n Api.get(`/cosmos-api/narrative`).then((response) => {\n this.chronicles = {\n ...this.chronicles,\n narrative: response.data,\n }\n })\n },\n subscribe: function () {\n this.channels.forEach((channel) => {\n this.cable\n .createSubscription(channel, localStorage.scope, {\n received: (data) => this.received(data),\n })\n .then((subscription) => {\n this.subscriptions.push(subscription)\n })\n })\n },\n received: function (data) {\n const parsed = JSON.parse(data)\n parsed.forEach((event) => {\n event.data = JSON.parse(event.data)\n // console.log(event)\n this.eventHandlerFunctions[event.type][event.kind](event)\n })\n },\n refreshTimelineFromEvent: function (event) {\n this.updateActivities(event.timeline)\n },\n createdTimelineFromEvent: function (event) {\n event.data.messages = 0\n event.data.type = 'timeline'\n this.timelines.push(event.data)\n this.activities[event.timeline] = []\n },\n updatedTimelineFromEvent: function (event) {\n const timelineIndex = this.timelines.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.timelines[timelineIndex] = event.data\n this.timelines = this.timelines.slice()\n this.activities = { ...this.activities }\n },\n deletedTimelineFromEvent: function (event) {\n const timelineIndex = this.timelines.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.timelines.splice(timelineIndex, timelineIndex >= 0 ? 1 : 0)\n const checkedIndex = this.selectedCalendars.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.selectedCalendars.splice(checkedIndex, checkedIndex >= 0 ? 1 : 0)\n },\n createdActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n this.activities[event.timeline].push(event.data)\n this.activities = { ...this.activities }\n }\n },\n eventActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.data.start\n )\n this.activities[event.timeline][activityIndex] = event.data\n this.activities = { ...this.activities }\n }\n },\n updatedActivityFromEvent: function (event) {\n event.extra = parseInt(event.extra)\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.extra\n )\n this.activities[event.timeline][activityIndex] = event.data\n this.activities = { ...this.activities }\n }\n },\n deletedActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.data.start\n )\n this.activities[event.timeline].splice(\n activityIndex,\n activityIndex >= 0 ? 1 : 0\n )\n this.activities = { ...this.activities }\n }\n },\n incrementTimelineMessages: function (timelineName) {\n if (!this.selectedCalendars.includes(timelineName)) {\n this.timelines.find((timeline) => timeline.name === timelineName)\n .messages++\n }\n },\n createdChronicleFromEvent: function (event) {\n const chronicleType = event.data.type\n this.chronicles[chronicleType].push(event.data)\n this.chronicles = { ...this.chronicles }\n },\n updatedChronicleFromEvent: function (event) {\n event.extra = parseInt(event.extra)\n const chronicleType = event.data.type\n const chronicleIndex = this.chronicles[chronicleType].findIndex(\n (calendarEvent) => calendarEvent.start === event.extra\n )\n this.chronicles[chronicleType][chronicleIndex] = event.data\n this.chronicles = { ...this.chronicles }\n },\n deletedChronicleFromEvent: function (event) {\n const chronicleType = event.data.type\n const chronicleIndex = this.chronicles[chronicleType].findIndex(\n (calendarEvent) => calendarEvent.start === event.data.start\n )\n this.chronicles[chronicleType].splice(\n chronicleIndex,\n chronicleIndex >= 0 ? 1 : 0\n )\n this.chronicles = { ...this.chronicles }\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"fefd03accb04f9afee6159fbe31284a74043da64"},a=t[i]||(t[i]={});a[n]&&a[n].hash===e||(a[n]=l);var o=a[n];return jt=function(){return o},o}jt();var Gt={components:{EventCalendar:ke,CalendarToolbar:st,CalendarSelector:Rt,MiniCalendar:Zt,TopBar:D},mixins:[$],data:function(){return jt().f[0]++,jt().s[0]++,{title:"Calendar",timelines:[],selectedCalendars:[],activities:{},calendarEvents:[],chronicles:{metadata:[],narrative:[]},calendarConfiguration:{utc:!1,focus:"",type:"4day"},channels:["TimelineEventsChannel","CalendarEventsChannel"],cable:new g,subscriptions:[]}},computed:{eventHandlerFunctions:function(){return jt().f[1]++,jt().s[1]++,{timeline:{created:this.createdTimelineFromEvent,refresh:this.refreshTimelineFromEvent,updated:this.updatedTimelineFromEvent,deleted:this.deletedTimelineFromEvent},activity:{event:this.eventActivityFromEvent,created:this.createdActivityFromEvent,updated:this.updatedActivityFromEvent,deleted:this.deletedActivityFromEvent},calendar:{created:this.createdChronicleFromEvent,updated:this.updatedChronicleFromEvent,deleted:this.deletedChronicleFromEvent}}}},watch:{selectedCalendars:{immediate:!0,handler:function(){jt().f[2]++,jt().s[2]++,this.updateActivities()}},chronicles:{immediate:!0,handler:function(){jt().f[3]++,jt().s[3]++,this.rebuildCalendarEvents()}},activities:{immediate:!0,handler:function(){jt().f[4]++,jt().s[4]++,this.rebuildCalendarEvents()}}},created:function(){jt().f[5]++,jt().s[5]++,this.subscribe(),jt().s[6]++,this.getTimelines(),jt().s[7]++,this.updateMetadata(),jt().s[8]++,this.updateNarrative()},destroyed:function(){jt().f[6]++,jt().s[9]++,this.subscriptions.forEach((function(n){jt().f[7]++,jt().s[10]++,n.unsubscribe()})),jt().s[11]++,this.cable.disconnect()},methods:{actionHandler:function(n){jt().f[8]++,jt().s[12]++,"next"===n.method?(jt().b[0][0]++,jt().s[13]++,this.$refs.eventCalendar.next()):(jt().b[0][1]++,jt().s[14]++,"prev"===n.method?(jt().b[1][0]++,jt().s[15]++,this.$refs.eventCalendar.prev()):(jt().b[1][1]++,jt().s[16]++,"refresh"===n.method?(jt().b[2][0]++,jt().s[17]++,this.refresh()):jt().b[2][1]++))},rebuildCalendarEvents:function(){jt().f[9]++;var n=(jt().s[18]++,he(this.selectedCalendars,this.activities)),e=(jt().s[19]++,ge(this.selectedCalendars,this.chronicles));jt().s[20]++,this.calendarEvents=n.concat(e)},refresh:function(){jt().f[10]++,jt().s[21]++,this.updateActivities(),jt().s[22]++,this.updateMetadata(),jt().s[23]++,this.updateNarrative()},getTimelines:function(){var n=this;jt().f[11]++,jt().s[24]++,C.get("/cosmos-api/timeline").then((function(e){jt().f[12]++;var t=(jt().s[25]++,e.data);jt().s[26]++,t.forEach((function(n){jt().f[13]++,jt().s[27]++,n.messages=0,jt().s[28]++,n.type="timeline"})),jt().s[29]++,n.timelines=t}))},updateActivities:function(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(jt().b[3][0]++,null);jt().f[14]++;var t=(jt().s[30]++,Object.keys(this.activities).filter((function(e){return jt().f[15]++,jt().s[31]++,!n.selectedCalendars.includes(e)})));jt().s[32]++;var i,l,s=(0,o.Z)(t);try{for(s.s();!(i=s.n()).done;){var r=i.value;jt().s[33]++,delete this.activities[r.name]}}catch(A){s.e(A)}finally{s.f()}if(jt().s[34]++,t?(jt().b[4][0]++,jt().s[35]++,this.activities=(0,a.Z)({},this.activities)):jt().b[4][1]++,jt().s[36]++,e){jt().b[5][0]++;var c=(jt().s[37]++,this.timelines.find((function(n){return jt().f[16]++,jt().s[38]++,n.name===e})));jt().s[39]++,jt().b[6][0]++,l=c&&(jt().b[6][1]++,[c])}else jt().b[5][1]++,jt().s[40]++,l=this.selectedCalendars.filter((function(n){return jt().f[17]++,jt().s[41]++,"timeline"===n.type}));jt().s[42]++;var u,m=(0,o.Z)(l);try{var d=function(){var t=u.value;jt().s[43]++,t.messages=0,jt().s[44]++,jt().b[8][0]++,e||(jt().b[8][1]++,!n.activities[t.name])?(jt().b[7][0]++,jt().s[45]++,C.get("/cosmos-api/timeline/".concat(t.name,"/activities")).then((function(e){jt().f[18]++,jt().s[46]++,n.activities[t.name]=e.data,jt().s[47]++,n.activities=(0,a.Z)({},n.activities)}))):jt().b[7][1]++};for(m.s();!(u=m.n()).done;)d()}catch(A){m.e(A)}finally{m.f()}},updateMetadata:function(){var n=this;jt().f[19]++,jt().s[48]++,C.get("/cosmos-api/metadata").then((function(e){jt().f[20]++,jt().s[49]++,n.chronicles=(0,a.Z)((0,a.Z)({},n.chronicles),{},{metadata:e.data})}))},updateNarrative:function(){var n=this;jt().f[21]++,jt().s[50]++,C.get("/cosmos-api/narrative").then((function(e){jt().f[22]++,jt().s[51]++,n.chronicles=(0,a.Z)((0,a.Z)({},n.chronicles),{},{narrative:e.data})}))},subscribe:function(){var n=this;jt().f[23]++,jt().s[52]++,this.channels.forEach((function(e){jt().f[24]++,jt().s[53]++,n.cable.createSubscription(e,localStorage.scope,{received:function(e){return jt().f[25]++,jt().s[54]++,n.received(e)}}).then((function(e){jt().f[26]++,jt().s[55]++,n.subscriptions.push(e)}))}))},received:function(n){var e=this;jt().f[27]++;var t=(jt().s[56]++,JSON.parse(n));jt().s[57]++,t.forEach((function(n){jt().f[28]++,jt().s[58]++,n.data=JSON.parse(n.data),jt().s[59]++,e.eventHandlerFunctions[n.type][n.kind](n)}))},refreshTimelineFromEvent:function(n){jt().f[29]++,jt().s[60]++,this.updateActivities(n.timeline)},createdTimelineFromEvent:function(n){jt().f[30]++,jt().s[61]++,n.data.messages=0,jt().s[62]++,n.data.type="timeline",jt().s[63]++,this.timelines.push(n.data),jt().s[64]++,this.activities[n.timeline]=[]},updatedTimelineFromEvent:function(n){jt().f[31]++;var e=(jt().s[65]++,this.timelines.findIndex((function(e){return jt().f[32]++,jt().s[66]++,e.name===n.timeline})));jt().s[67]++,this.timelines[e]=n.data,jt().s[68]++,this.timelines=this.timelines.slice(),jt().s[69]++,this.activities=(0,a.Z)({},this.activities)},deletedTimelineFromEvent:function(n){jt().f[33]++;var e=(jt().s[70]++,this.timelines.findIndex((function(e){return jt().f[34]++,jt().s[71]++,e.name===n.timeline})));jt().s[72]++,this.timelines.splice(e,e>=0?(jt().b[9][0]++,1):(jt().b[9][1]++,0));var t=(jt().s[73]++,this.selectedCalendars.findIndex((function(e){return jt().f[35]++,jt().s[74]++,e.name===n.timeline})));jt().s[75]++,this.selectedCalendars.splice(t,t>=0?(jt().b[10][0]++,1):(jt().b[10][1]++,0))},createdActivityFromEvent:function(n){jt().f[36]++,jt().s[76]++,this.incrementTimelineMessages(n.timeline),jt().s[77]++,this.activities.hasOwnProperty(n.timeline)?(jt().b[11][0]++,jt().s[78]++,this.activities[n.timeline].push(n.data),jt().s[79]++,this.activities=(0,a.Z)({},this.activities)):jt().b[11][1]++},eventActivityFromEvent:function(n){if(jt().f[37]++,jt().s[80]++,this.incrementTimelineMessages(n.timeline),jt().s[81]++,this.activities.hasOwnProperty(n.timeline)){jt().b[12][0]++;var e=(jt().s[82]++,this.activities[n.timeline].findIndex((function(e){return jt().f[38]++,jt().s[83]++,e.start===n.data.start})));jt().s[84]++,this.activities[n.timeline][e]=n.data,jt().s[85]++,this.activities=(0,a.Z)({},this.activities)}else jt().b[12][1]++},updatedActivityFromEvent:function(n){if(jt().f[39]++,jt().s[86]++,n.extra=parseInt(n.extra),jt().s[87]++,this.incrementTimelineMessages(n.timeline),jt().s[88]++,this.activities.hasOwnProperty(n.timeline)){jt().b[13][0]++;var e=(jt().s[89]++,this.activities[n.timeline].findIndex((function(e){return jt().f[40]++,jt().s[90]++,e.start===n.extra})));jt().s[91]++,this.activities[n.timeline][e]=n.data,jt().s[92]++,this.activities=(0,a.Z)({},this.activities)}else jt().b[13][1]++},deletedActivityFromEvent:function(n){if(jt().f[41]++,jt().s[93]++,this.incrementTimelineMessages(n.timeline),jt().s[94]++,this.activities.hasOwnProperty(n.timeline)){jt().b[14][0]++;var e=(jt().s[95]++,this.activities[n.timeline].findIndex((function(e){return jt().f[42]++,jt().s[96]++,e.start===n.data.start})));jt().s[97]++,this.activities[n.timeline].splice(e,e>=0?(jt().b[15][0]++,1):(jt().b[15][1]++,0)),jt().s[98]++,this.activities=(0,a.Z)({},this.activities)}else jt().b[14][1]++},incrementTimelineMessages:function(n){jt().f[43]++,jt().s[99]++,this.selectedCalendars.includes(n)?jt().b[16][1]++:(jt().b[16][0]++,jt().s[100]++,this.timelines.find((function(e){return jt().f[44]++,jt().s[101]++,e.name===n})).messages++)},createdChronicleFromEvent:function(n){jt().f[45]++;var e=(jt().s[102]++,n.data.type);jt().s[103]++,this.chronicles[e].push(n.data),jt().s[104]++,this.chronicles=(0,a.Z)({},this.chronicles)},updatedChronicleFromEvent:function(n){jt().f[46]++,jt().s[105]++,n.extra=parseInt(n.extra);var e=(jt().s[106]++,n.data.type),t=(jt().s[107]++,this.chronicles[e].findIndex((function(e){return jt().f[47]++,jt().s[108]++,e.start===n.extra})));jt().s[109]++,this.chronicles[e][t]=n.data,jt().s[110]++,this.chronicles=(0,a.Z)({},this.chronicles)},deletedChronicleFromEvent:function(n){jt().f[48]++;var e=(jt().s[111]++,n.data.type),t=(jt().s[112]++,this.chronicles[e].findIndex((function(e){return jt().f[49]++,jt().s[113]++,e.start===n.data.start})));jt().s[114]++,this.chronicles[e].splice(t,t>=0?(jt().b[17][0]++,1):(jt().b[17][1]++,0)),jt().s[115]++,this.chronicles=(0,a.Z)({},this.chronicles)}}},Bt=Gt,Yt=(0,k.Z)(Bt,i,l,!1,null,null,null),Vt=Yt.exports},9021:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".selected-title[data-v-d1a55f34]{background-color:var(--v-secondary-base)}.available-title[data-v-d1a55f34]{background-color:var(--v-primary-darken2)}",""]),e["default"]=s},329:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-5a2b1c4a]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},5419:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-6c8065d7]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},2682:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-3b7745ff]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},7370:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-7a27607c]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},8200:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-3c724330]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},5508:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-77b41112]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},7273:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".theme--dark .v-card__subtitle[data-v-301c3b8d],.theme--dark .v-card__title[data-v-301c3b8d]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},9878:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".theme--dark .v-card__subtitle[data-v-e57e7e4c],.theme--dark .v-card__title[data-v-e57e7e4c]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},6605:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".theme--dark .v-card__subtitle[data-v-764f7879],.theme--dark .v-card__title[data-v-764f7879]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},4755:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".theme--dark .v-card__subtitle[data-v-077c1902],.theme--dark .v-card__title[data-v-077c1902]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},3938:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,".v-list[data-v-e3bb7458] .v-label{margin-left:5px}.v-list-item__icon[data-v-e3bb7458]{margin-right:15px!important}.v-list-item__title[data-v-e3bb7458]{color:#fff}",""]),e["default"]=s},4421:function(n,e,t){"use strict";t.r(e);var i=t(3467),l=t.n(i),a=t(8715),o=t.n(a),s=o()(l());s.push([n.id,'.theme--dark .v-card__subtitle[data-v-8cfd7c66],.theme--dark .v-card__title[data-v-8cfd7c66]{background-color:var(--v-secondary-darken3)}.v-current-time[data-v-8cfd7c66]{height:2px;background-color:#ea4335;position:absolute;left:-1px;right:0;pointer-events:none}.v-current-time.first[data-v-8cfd7c66]:before{content:"";position:absolute;background-color:#ea4335;width:12px;height:12px;border-radius:50%;margin-top:-5px;margin-left:-6.5px}',""]),e["default"]=s},8279:function(n,e,t){var i=t(9021);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("694275c8",i,!0,{sourceMap:!1,shadowMode:!1})},6743:function(n,e,t){var i=t(329);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("6e79ec56",i,!0,{sourceMap:!1,shadowMode:!1})},2084:function(n,e,t){var i=t(5419);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("567f0371",i,!0,{sourceMap:!1,shadowMode:!1})},8891:function(n,e,t){var i=t(2682);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("45221f6c",i,!0,{sourceMap:!1,shadowMode:!1})},5564:function(n,e,t){var i=t(7370);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("4f01cae2",i,!0,{sourceMap:!1,shadowMode:!1})},5468:function(n,e,t){var i=t(8200);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("9923765e",i,!0,{sourceMap:!1,shadowMode:!1})},9814:function(n,e,t){var i=t(5508);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("5a687fbf",i,!0,{sourceMap:!1,shadowMode:!1})},4117:function(n,e,t){var i=t(7273);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("51b8ac78",i,!0,{sourceMap:!1,shadowMode:!1})},3424:function(n,e,t){var i=t(9878);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("0017d3b3",i,!0,{sourceMap:!1,shadowMode:!1})},965:function(n,e,t){var i=t(6605);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("225065ba",i,!0,{sourceMap:!1,shadowMode:!1})},9891:function(n,e,t){var i=t(4755);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("aa682d9a",i,!0,{sourceMap:!1,shadowMode:!1})},7162:function(n,e,t){var i=t(3938);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("a2f2c426",i,!0,{sourceMap:!1,shadowMode:!1})},4067:function(n,e,t){var i=t(4421);i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[n.id,i,""]]),i.locals&&(n.exports=i.locals);var l=t(3514).Z;l("239ef0cc",i,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
+ //# sourceMappingURL=172.js.map