@twab/visualization 0.9.15 → 0.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/visualization.js +983 -957
  2. package/package.json +1 -1
@@ -1675,7 +1675,10 @@ var __vue_render__$4 = function () {
1675
1675
  _vm.commandBarShow
1676
1676
  ? _c(
1677
1677
  "div",
1678
- { staticClass: "visualization-row visualization-justify-center" },
1678
+ {
1679
+ staticClass:
1680
+ "visualization-row visualization-justify-center pt-3",
1681
+ },
1679
1682
  _vm._l(_vm.commandBarBtns, function (btn, index) {
1680
1683
  return _c("div", { key: "command-btn-" + index }, [
1681
1684
  !btn
@@ -1741,11 +1744,11 @@ __vue_render__$4._withStripped = true;
1741
1744
  /* style */
1742
1745
  const __vue_inject_styles__$4 = function (inject) {
1743
1746
  if (!inject) return
1744
- inject("data-v-6ca549de_0", { source: "\n.visualization-row[data-v-6ca549de] {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\n}\n.visualization-col[data-v-6ca549de] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\n}\n.visualization-divider[data-v-6ca549de] {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\n}\n.visualization-divider.vertical[data-v-6ca549de] {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\n}\n.visualization-card[data-v-6ca549de] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\n}\n.visualization-justify-center[data-v-6ca549de],[data-v-6ca549de] .visualization-justify-center {\r\n justify-content: center;\n}\n.visualization-align-center[data-v-6ca549de] {\r\n align-items: center;\n}\n#visualization-container[data-v-6ca549de] {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\n}\n#visualization-container > .card[data-v-6ca549de] {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\n}\n#command-bar[data-v-6ca549de],\r\n#info-bar[data-v-6ca549de] {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#command-bar button[data-v-6ca549de] {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\n}\n#command-bar button[data-v-6ca549de]:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\n}\n#command-bar svg[data-v-6ca549de] {\r\n font-size: 16px;\n}\n#command-bar[data-v-6ca549de] {\r\n padding: 0 !important;\n}\n#info-bar[data-v-6ca549de] {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\n}\n.settings-container[data-v-6ca549de] {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\n}\n.settings-container > *[data-v-6ca549de] {\r\n margin: 0 2px;\r\n cursor: pointer;\n}\n#info-bar svg[data-v-6ca549de] {\r\n font-size: 16px;\n}\n#info-bar .divider[data-v-6ca549de] {\r\n margin: 0 8px;\n}\nsvg[data-v-6ca549de]:focus {\r\n border: none;\n}\n.visualization-card[data-v-6ca549de] {\r\n border-left: 8px solid #eee;\n}\n.active-tab[data-v-6ca549de] {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\n}\n[id^='frame-'][data-v-6ca549de] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\n}\n.tooltip[data-v-6ca549de] {\r\n display: block !important;\r\n z-index: 10000;\n}\n.tooltip .tooltip-inner[data-v-6ca549de] {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\n}\n.tooltip .tooltip-arrow[data-v-6ca549de] {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\n}\n.tooltip[x-placement^='top'][data-v-6ca549de] {\r\n margin-bottom: 5px;\n}\n.tooltip[x-placement^='top'] .tooltip-arrow[data-v-6ca549de] {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='bottom'][data-v-6ca549de] {\r\n margin-top: 5px;\n}\n.tooltip[x-placement^='bottom'] .tooltip-arrow[data-v-6ca549de] {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='right'][data-v-6ca549de] {\r\n margin-left: 5px;\n}\n.tooltip[x-placement^='right'] .tooltip-arrow[data-v-6ca549de] {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip[x-placement^='left'][data-v-6ca549de] {\r\n margin-right: 5px;\n}\n.tooltip[x-placement^='left'] .tooltip-arrow[data-v-6ca549de] {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip.popover .popover-inner[data-v-6ca549de] {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\n}\n.tooltip.popover .popover-arrow[data-v-6ca549de] {\r\n border-color: #f9f9f9;\n}\n.tooltip[aria-hidden='true'][data-v-6ca549de] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\n}\n.tooltip[aria-hidden='false'][data-v-6ca549de] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\n}\r\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\components\\Commands.vue"],"names":[],"mappings":";AAmMA;EACA,aAAA;EACA,eAAA;EACA,cAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;AACA;AAEA;EACA,cAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;EACA,UAAA;EACA,mBAAA;EACA,mBAAA;EACA,wBAAA;EACA,iCAAA;EACA,SAAA;AACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,2BAAA;EACA,UAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,WAAA;EACA,4DAAA;EACA,yBAAA;EACA;qCACA;AACA;AAEA;EACA,uBAAA;AACA;AAEA;EACA,mBAAA;AACA;AAEA;EACA,0BAAA;EACA,yBAAA;EACA,YAAA;EACA,mBAAA;AACA;AACA;EACA,2BAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;EACA,YAAA;AACA;AAEA;;EAEA,yBAAA;EACA;mCACA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;EACA,+BAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,eAAA;EACA,kBAAA;AACA;AAEA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;AACA;AAEA;EACA,aAAA;EACA,eAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,aAAA;AACA;AAEA;EACA,YAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,8DAAA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;AACA;AAEA;EACA,yBAAA;EACA,cAAA;AACA;AAEA;EACA,wCAAA;EACA,YAAA;EACA,mBAAA;EACA,qBAAA;AACA;AAEA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,0CAAA;EACA,UAAA;AACA;AAEA;EACA,kBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,2CAAA;EACA,YAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,wCAAA;EACA,SAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,gBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,wCAAA;EACA,2CAAA;EACA,UAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,iBAAA;AACA;AAEA;EACA,2BAAA;EACA,wCAAA;EACA,0CAAA;EACA,2CAAA;EACA,WAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,uCAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,kBAAA;EACA,UAAA;EACA,2CAAA;AACA;AAEA;EACA,mBAAA;EACA,UAAA;EACA,yBAAA;AACA","file":"Commands.vue","sourcesContent":["<template>\r\n <div\r\n class=\"visualization-col pa-0\"\r\n id=\"command-bar\"\r\n style=\"border-top-right-radius: 6px\"\r\n >\r\n <div\r\n class=\"visualization-row visualization-justify-center\"\r\n v-if=\"commandBarShow\"\r\n >\r\n <div v-for=\"(btn, index) in commandBarBtns\" :key=\"'command-btn-' + index\">\r\n <hr\r\n class=\"visualization-divider vertical\"\r\n v-if=\"!btn\"\r\n style=\"margin: 0 4px\"\r\n />\r\n <button\r\n v-if=\"btn && (btn.condition ? btn.condition() : true)\"\r\n v-tooltip=\"\r\n btn.text && typeof btn.text === 'function' ? btn.text() : btn.text\r\n \"\r\n :style=\"{\r\n color:\r\n btn.color && typeof btn.color === 'function'\r\n ? btn.color()\r\n : 'black',\r\n }\"\r\n class=\"command-bar-btn\"\r\n @click=\"btn.fnc\"\r\n >\r\n <font-awesome-icon\r\n :id=\"btn.id\"\r\n :icon=\"\r\n 'fa-solid ' +\r\n (btn.icon && typeof btn.icon === 'function'\r\n ? btn.icon()\r\n : btn.icon)\r\n \"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n <hr class=\"visualization-divider\" />\r\n </div>\r\n</template>\r\n<script>\r\nexport default {\r\n props: {\r\n videoPlaying: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n videoPaused: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n insertTime: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n hourIniSelected: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n hourEndSelected: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n data() {\r\n return {\r\n commandBarShow: true,\r\n commandBarBtns: [\r\n {\r\n fnc: () => this.$emit('prev-loop-activate'),\r\n icon: 'fa-backward',\r\n text: 'Fast Backward',\r\n id: 'Fast Backward',\r\n },\r\n {\r\n fnc: () => this.$emit('prev'),\r\n icon: 'fa-step-backward',\r\n text: 'Step Backward',\r\n id: 'Step Backward',\r\n },\r\n {\r\n fnc: () => this.$emit('go-to'),\r\n icon: 'fa-clock',\r\n text: this.$i18n.t('infoBar.setHour'),\r\n id: 'Definir Hora',\r\n },\r\n {\r\n fnc: () => this.$emit('next'),\r\n icon: 'fa-step-forward',\r\n text: 'Step Forward',\r\n id: 'Step Forward',\r\n },\r\n {\r\n fnc: () => this.$emit('next-loop-activate'),\r\n icon: 'fa-forward',\r\n text: 'Fast Forward',\r\n id: 'Fast Forward',\r\n },\r\n {\r\n fnc: () => this.$emit('play-or-pause'),\r\n icon: () => {\r\n return this.videoPlaying && !this.videoPaused\r\n ? 'fa-pause'\r\n : 'fa-play'\r\n },\r\n text: () => {\r\n return this.videoPlaying && !this.videoPaused ? 'Pause' : 'Play'\r\n },\r\n id: 'playOrPause',\r\n },\r\n {\r\n fnc: () => this.$emit('stop-playing'),\r\n icon: 'fa-stop',\r\n text: 'Stop',\r\n id: 'Stop',\r\n },\r\n null,\r\n {\r\n fnc: () => this.$emit('open-frame-selection'),\r\n icon: 'fa-border-all',\r\n text: this.$i18n.t('infoBar.gridForm'),\r\n id: 'Formato da grelha',\r\n },\r\n {\r\n fnc: () => this.$emit('open-frames-per-second'),\r\n icon: 'fa-sliders-h',\r\n text: this.$i18n.t('infoBar.secondImage'),\r\n id: 'Segundos por Imagem',\r\n },\r\n // {\r\n // fnc: () => this.$emit('open-blocks'),\r\n // icon: 'fa-cut',\r\n // text: 'Escolher intervalo de blocos',\r\n // id: 'Escolher intervalo de blocos',\r\n // },\r\n {\r\n fnc: () => this.$emit('open-playback-rate'),\r\n icon: 'fa-tachometer-alt',\r\n text: this.$i18n.t('infoBar.chooseVelocity'),\r\n id: 'Escolher velocidade de reprodução',\r\n },\r\n // {\r\n // fnc: () => this.$emit('insert-time-force'),\r\n // icon: 'fa-arrow-turn-down',\r\n // text: 'Recuperar Notícia',\r\n // id: 'Recuperar Notícia',\r\n // condition: () => {\r\n // return this.insertTime\r\n // },\r\n // },\r\n null,\r\n {\r\n fnc: () => this.$emit('set-hour-ini'),\r\n icon: 'fa-hourglass-start',\r\n text: this.$i18n.t('form.inicialHour'),\r\n id: 'Hora Inicial',\r\n color: () => {\r\n return this.hourIniSelected ? 'var(--visualization-start)' : 'black'\r\n },\r\n },\r\n {\r\n fnc: () => this.$emit('insert-time'),\r\n icon: 'fa-arrow-circle-down',\r\n text: this.$i18n.t('infoBar.insert'),\r\n id: 'insert',\r\n condition: () => {\r\n return this.insertTime\r\n },\r\n },\r\n {\r\n fnc: () => this.$emit('set-hour-end'),\r\n icon: 'fa-hourglass-end',\r\n text: this.$i18n.t('form.endHour'),\r\n id: 'Hora Final',\r\n color: () => {\r\n return this.hourEndSelected ? 'var(--visualization-end)' : 'black'\r\n },\r\n },\r\n // {\r\n // fnc: () => this.$emit('check-available-block'),\r\n // icon: 'fa-video',\r\n // text: 'Próximo bloco disponível',\r\n // id: 'Próximo bloco disponível',\r\n // },\r\n ],\r\n }\r\n },\r\n}\r\n</script>\r\n<style scoped>\r\n.visualization-row {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\r\n}\r\n\r\n.visualization-col {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n}\r\n\r\n.visualization-divider {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\r\n}\r\n\r\n.visualization-divider.vertical {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\r\n}\r\n\r\n.visualization-card {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\r\n}\r\n\r\n.visualization-justify-center, /deep/ .visualization-justify-center {\r\n justify-content: center;\r\n}\r\n\r\n.visualization-align-center {\r\n align-items: center;\r\n}\r\n\r\n#visualization-container {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\r\n}\r\n#visualization-container > .card {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\r\n}\r\n\r\n#command-bar,\r\n#info-bar {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n}\r\n#command-bar button {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\r\n}\r\n\r\n#command-bar button:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\r\n}\r\n\r\n#command-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#command-bar {\r\n padding: 0 !important;\r\n}\r\n\r\n#info-bar {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\r\n}\r\n\r\n.settings-container {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n}\r\n\r\n.settings-container > * {\r\n margin: 0 2px;\r\n cursor: pointer;\r\n}\r\n\r\n#info-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#info-bar .divider {\r\n margin: 0 8px;\r\n}\r\n\r\nsvg:focus {\r\n border: none;\r\n}\r\n\r\n.visualization-card {\r\n border-left: 8px solid #eee;\r\n}\r\n\r\n.active-tab {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\r\n}\r\n\r\n[id^='frame-'] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\r\n}\r\n\r\n.tooltip {\r\n display: block !important;\r\n z-index: 10000;\r\n}\r\n\r\n.tooltip .tooltip-inner {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\r\n}\r\n\r\n.tooltip .tooltip-arrow {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\r\n}\r\n\r\n.tooltip[x-placement^='top'] {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='top'] .tooltip-arrow {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] {\r\n margin-top: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] .tooltip-arrow {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='right'] {\r\n margin-left: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='right'] .tooltip-arrow {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip[x-placement^='left'] {\r\n margin-right: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='left'] .tooltip-arrow {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip.popover .popover-inner {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\r\n}\r\n\r\n.tooltip.popover .popover-arrow {\r\n border-color: #f9f9f9;\r\n}\r\n\r\n.tooltip[aria-hidden='true'] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\r\n}\r\n\r\n.tooltip[aria-hidden='false'] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\r\n}\r\n</style>"]}, media: undefined });
1747
+ inject("data-v-aa03c4c2_0", { source: "\n.visualization-row[data-v-aa03c4c2] {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\n}\n.visualization-col[data-v-aa03c4c2] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\n}\n.visualization-divider[data-v-aa03c4c2] {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\n}\n.visualization-divider.vertical[data-v-aa03c4c2] {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\n}\n.visualization-card[data-v-aa03c4c2] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\n}\n.visualization-justify-center[data-v-aa03c4c2],[data-v-aa03c4c2] .visualization-justify-center {\r\n justify-content: center;\n}\n.visualization-align-center[data-v-aa03c4c2] {\r\n align-items: center;\n}\n#visualization-container[data-v-aa03c4c2] {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\n}\n#visualization-container > .card[data-v-aa03c4c2] {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\n}\n#command-bar[data-v-aa03c4c2],\r\n#info-bar[data-v-aa03c4c2] {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#command-bar button[data-v-aa03c4c2] {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\n}\n#command-bar button[data-v-aa03c4c2]:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\n}\n#command-bar svg[data-v-aa03c4c2] {\r\n font-size: 16px;\n}\n#command-bar[data-v-aa03c4c2] {\r\n padding: 0 !important;\n}\n#info-bar[data-v-aa03c4c2] {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\n}\n.settings-container[data-v-aa03c4c2] {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\n}\n.settings-container > *[data-v-aa03c4c2] {\r\n margin: 0 2px;\r\n cursor: pointer;\n}\n#info-bar svg[data-v-aa03c4c2] {\r\n font-size: 16px;\n}\n#info-bar .divider[data-v-aa03c4c2] {\r\n margin: 0 8px;\n}\nsvg[data-v-aa03c4c2]:focus {\r\n border: none;\n}\n.visualization-card[data-v-aa03c4c2] {\r\n border-left: 8px solid #eee;\n}\n.active-tab[data-v-aa03c4c2] {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\n}\n[id^='frame-'][data-v-aa03c4c2] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\n}\n.tooltip[data-v-aa03c4c2] {\r\n display: block !important;\r\n z-index: 10000;\n}\n.tooltip .tooltip-inner[data-v-aa03c4c2] {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\n}\n.tooltip .tooltip-arrow[data-v-aa03c4c2] {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\n}\n.tooltip[x-placement^='top'][data-v-aa03c4c2] {\r\n margin-bottom: 5px;\n}\n.tooltip[x-placement^='top'] .tooltip-arrow[data-v-aa03c4c2] {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='bottom'][data-v-aa03c4c2] {\r\n margin-top: 5px;\n}\n.tooltip[x-placement^='bottom'] .tooltip-arrow[data-v-aa03c4c2] {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='right'][data-v-aa03c4c2] {\r\n margin-left: 5px;\n}\n.tooltip[x-placement^='right'] .tooltip-arrow[data-v-aa03c4c2] {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip[x-placement^='left'][data-v-aa03c4c2] {\r\n margin-right: 5px;\n}\n.tooltip[x-placement^='left'] .tooltip-arrow[data-v-aa03c4c2] {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip.popover .popover-inner[data-v-aa03c4c2] {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\n}\n.tooltip.popover .popover-arrow[data-v-aa03c4c2] {\r\n border-color: #f9f9f9;\n}\n.tooltip[aria-hidden='true'][data-v-aa03c4c2] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\n}\n.tooltip[aria-hidden='false'][data-v-aa03c4c2] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\n}\r\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\components\\Commands.vue"],"names":[],"mappings":";AAmMA;EACA,aAAA;EACA,eAAA;EACA,cAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;AACA;AAEA;EACA,cAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;EACA,UAAA;EACA,mBAAA;EACA,mBAAA;EACA,wBAAA;EACA,iCAAA;EACA,SAAA;AACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,2BAAA;EACA,UAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,WAAA;EACA,4DAAA;EACA,yBAAA;EACA;qCACA;AACA;AAEA;EAEA,uBAAA;AACA;AAEA;EACA,mBAAA;AACA;AAEA;EACA,0BAAA;EACA,yBAAA;EACA,YAAA;EACA,mBAAA;AACA;AACA;EACA,2BAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;EACA,YAAA;AACA;AAEA;;EAEA,yBAAA;EACA;mCACA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;EACA,+BAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,eAAA;EACA,kBAAA;AACA;AAEA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;AACA;AAEA;EACA,aAAA;EACA,eAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,aAAA;AACA;AAEA;EACA,YAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,8DAAA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;AACA;AAEA;EACA,yBAAA;EACA,cAAA;AACA;AAEA;EACA,wCAAA;EACA,YAAA;EACA,mBAAA;EACA,qBAAA;AACA;AAEA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,0CAAA;EACA,UAAA;AACA;AAEA;EACA,kBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,2CAAA;EACA,YAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,wCAAA;EACA,SAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,gBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,wCAAA;EACA,2CAAA;EACA,UAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,iBAAA;AACA;AAEA;EACA,2BAAA;EACA,wCAAA;EACA,0CAAA;EACA,2CAAA;EACA,WAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,uCAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,kBAAA;EACA,UAAA;EACA,2CAAA;AACA;AAEA;EACA,mBAAA;EACA,UAAA;EACA,yBAAA;AACA","file":"Commands.vue","sourcesContent":["<template>\r\n <div\r\n class=\"visualization-col pa-0\"\r\n id=\"command-bar\"\r\n style=\"border-top-right-radius: 6px\"\r\n >\r\n <div\r\n class=\"visualization-row visualization-justify-center pt-3\"\r\n v-if=\"commandBarShow\"\r\n >\r\n <div v-for=\"(btn, index) in commandBarBtns\" :key=\"'command-btn-' + index\">\r\n <hr\r\n class=\"visualization-divider vertical\"\r\n v-if=\"!btn\"\r\n style=\"margin: 0 4px\"\r\n />\r\n <button\r\n v-if=\"btn && (btn.condition ? btn.condition() : true)\"\r\n v-tooltip=\"\r\n btn.text && typeof btn.text === 'function' ? btn.text() : btn.text\r\n \"\r\n :style=\"{\r\n color:\r\n btn.color && typeof btn.color === 'function'\r\n ? btn.color()\r\n : 'black',\r\n }\"\r\n class=\"command-bar-btn\"\r\n @click=\"btn.fnc\"\r\n >\r\n <font-awesome-icon\r\n :id=\"btn.id\"\r\n :icon=\"\r\n 'fa-solid ' +\r\n (btn.icon && typeof btn.icon === 'function'\r\n ? btn.icon()\r\n : btn.icon)\r\n \"\r\n />\r\n </button>\r\n </div>\r\n </div>\r\n <hr class=\"visualization-divider\" />\r\n </div>\r\n</template>\r\n<script>\r\nexport default {\r\n props: {\r\n videoPlaying: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n videoPaused: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n insertTime: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n hourIniSelected: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n hourEndSelected: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n data() {\r\n return {\r\n commandBarShow: true,\r\n commandBarBtns: [\r\n {\r\n fnc: () => this.$emit('prev-loop-activate'),\r\n icon: 'fa-backward',\r\n text: 'Fast Backward',\r\n id: 'Fast Backward',\r\n },\r\n {\r\n fnc: () => this.$emit('prev'),\r\n icon: 'fa-step-backward',\r\n text: 'Step Backward',\r\n id: 'Step Backward',\r\n },\r\n {\r\n fnc: () => this.$emit('go-to'),\r\n icon: 'fa-clock',\r\n text: this.$i18n.t('infoBar.setHour'),\r\n id: 'Definir Hora',\r\n },\r\n {\r\n fnc: () => this.$emit('next'),\r\n icon: 'fa-step-forward',\r\n text: 'Step Forward',\r\n id: 'Step Forward',\r\n },\r\n {\r\n fnc: () => this.$emit('next-loop-activate'),\r\n icon: 'fa-forward',\r\n text: 'Fast Forward',\r\n id: 'Fast Forward',\r\n },\r\n {\r\n fnc: () => this.$emit('play-or-pause'),\r\n icon: () => {\r\n return this.videoPlaying && !this.videoPaused\r\n ? 'fa-pause'\r\n : 'fa-play'\r\n },\r\n text: () => {\r\n return this.videoPlaying && !this.videoPaused ? 'Pause' : 'Play'\r\n },\r\n id: 'playOrPause',\r\n },\r\n {\r\n fnc: () => this.$emit('stop-playing'),\r\n icon: 'fa-stop',\r\n text: 'Stop',\r\n id: 'Stop',\r\n },\r\n null,\r\n {\r\n fnc: () => this.$emit('open-frame-selection'),\r\n icon: 'fa-border-all',\r\n text: this.$i18n.t('infoBar.gridForm'),\r\n id: 'Formato da grelha',\r\n },\r\n {\r\n fnc: () => this.$emit('open-frames-per-second'),\r\n icon: 'fa-sliders-h',\r\n text: this.$i18n.t('infoBar.secondImage'),\r\n id: 'Segundos por Imagem',\r\n },\r\n // {\r\n // fnc: () => this.$emit('open-blocks'),\r\n // icon: 'fa-cut',\r\n // text: 'Escolher intervalo de blocos',\r\n // id: 'Escolher intervalo de blocos',\r\n // },\r\n {\r\n fnc: () => this.$emit('open-playback-rate'),\r\n icon: 'fa-tachometer-alt',\r\n text: this.$i18n.t('infoBar.chooseVelocity'),\r\n id: 'Escolher velocidade de reprodução',\r\n },\r\n // {\r\n // fnc: () => this.$emit('insert-time-force'),\r\n // icon: 'fa-arrow-turn-down',\r\n // text: 'Recuperar Notícia',\r\n // id: 'Recuperar Notícia',\r\n // condition: () => {\r\n // return this.insertTime\r\n // },\r\n // },\r\n null,\r\n {\r\n fnc: () => this.$emit('set-hour-ini'),\r\n icon: 'fa-hourglass-start',\r\n text: this.$i18n.t('form.inicialHour'),\r\n id: 'Hora Inicial',\r\n color: () => {\r\n return this.hourIniSelected ? 'var(--visualization-start)' : 'black'\r\n },\r\n },\r\n {\r\n fnc: () => this.$emit('insert-time'),\r\n icon: 'fa-arrow-circle-down',\r\n text: this.$i18n.t('infoBar.insert'),\r\n id: 'insert',\r\n condition: () => {\r\n return this.insertTime\r\n },\r\n },\r\n {\r\n fnc: () => this.$emit('set-hour-end'),\r\n icon: 'fa-hourglass-end',\r\n text: this.$i18n.t('form.endHour'),\r\n id: 'Hora Final',\r\n color: () => {\r\n return this.hourEndSelected ? 'var(--visualization-end)' : 'black'\r\n },\r\n },\r\n // {\r\n // fnc: () => this.$emit('check-available-block'),\r\n // icon: 'fa-video',\r\n // text: 'Próximo bloco disponível',\r\n // id: 'Próximo bloco disponível',\r\n // },\r\n ],\r\n }\r\n },\r\n}\r\n</script>\r\n<style scoped>\r\n.visualization-row {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\r\n}\r\n\r\n.visualization-col {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n}\r\n\r\n.visualization-divider {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\r\n}\r\n\r\n.visualization-divider.vertical {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\r\n}\r\n\r\n.visualization-card {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\r\n}\r\n\r\n.visualization-justify-center,\r\n/deep/ .visualization-justify-center {\r\n justify-content: center;\r\n}\r\n\r\n.visualization-align-center {\r\n align-items: center;\r\n}\r\n\r\n#visualization-container {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\r\n}\r\n#visualization-container > .card {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\r\n}\r\n\r\n#command-bar,\r\n#info-bar {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n}\r\n#command-bar button {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\r\n}\r\n\r\n#command-bar button:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\r\n}\r\n\r\n#command-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#command-bar {\r\n padding: 0 !important;\r\n}\r\n\r\n#info-bar {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\r\n}\r\n\r\n.settings-container {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n}\r\n\r\n.settings-container > * {\r\n margin: 0 2px;\r\n cursor: pointer;\r\n}\r\n\r\n#info-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#info-bar .divider {\r\n margin: 0 8px;\r\n}\r\n\r\nsvg:focus {\r\n border: none;\r\n}\r\n\r\n.visualization-card {\r\n border-left: 8px solid #eee;\r\n}\r\n\r\n.active-tab {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\r\n}\r\n\r\n[id^='frame-'] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\r\n}\r\n\r\n.tooltip {\r\n display: block !important;\r\n z-index: 10000;\r\n}\r\n\r\n.tooltip .tooltip-inner {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\r\n}\r\n\r\n.tooltip .tooltip-arrow {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\r\n}\r\n\r\n.tooltip[x-placement^='top'] {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='top'] .tooltip-arrow {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] {\r\n margin-top: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] .tooltip-arrow {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='right'] {\r\n margin-left: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='right'] .tooltip-arrow {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip[x-placement^='left'] {\r\n margin-right: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='left'] .tooltip-arrow {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip.popover .popover-inner {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\r\n}\r\n\r\n.tooltip.popover .popover-arrow {\r\n border-color: #f9f9f9;\r\n}\r\n\r\n.tooltip[aria-hidden='true'] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\r\n}\r\n\r\n.tooltip[aria-hidden='false'] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\r\n}\r\n</style>\r\n"]}, media: undefined });
1745
1748
 
1746
1749
  };
1747
1750
  /* scoped */
1748
- const __vue_scope_id__$4 = "data-v-6ca549de";
1751
+ const __vue_scope_id__$4 = "data-v-aa03c4c2";
1749
1752
  /* module identifier */
1750
1753
  const __vue_module_identifier__$4 = undefined;
1751
1754
  /* functional template */
@@ -2607,95 +2610,100 @@ var __vue_render__$1 = function () {
2607
2610
  })
2608
2611
  : _vm._e(),
2609
2612
  _vm._v(" "),
2610
- _c("dialog", { ref: "frames" }, [
2611
- _c(
2612
- "div",
2613
- {
2614
- staticClass: "visualization-row",
2615
- staticStyle: {
2616
- padding: "5px",
2617
- "font-weight": "bold",
2618
- "background-color": "var(--visualization-primary)",
2619
- "border-color": "var(--visualization-primary)",
2620
- height: "40px",
2621
- color: "white",
2622
- display: "flex",
2623
- "justify-content": "center",
2624
- "padding-top": "10px",
2613
+ _c(
2614
+ "dialog",
2615
+ { ref: "frames" },
2616
+ [
2617
+ _c(
2618
+ "div",
2619
+ {
2620
+ staticClass: "visualization-row",
2621
+ staticStyle: {
2622
+ padding: "5px",
2623
+ "font-weight": "bold",
2624
+ "background-color": "var(--visualization-primary)",
2625
+ "border-color": "var(--visualization-primary)",
2626
+ height: "40px",
2627
+ color: "white",
2628
+ display: "flex",
2629
+ "justify-content": "center",
2630
+ "padding-top": "10px",
2631
+ },
2625
2632
  },
2626
- },
2627
- [_vm._v("\n " + _vm._s(_vm.$t("infoBar.gridForm")) + "\n ")]
2628
- ),
2629
- _vm._v(" "),
2630
- _c(
2631
- "div",
2632
- {
2633
- staticClass: "visualization-row",
2634
- staticStyle: { "justify-content": "center" },
2635
- },
2636
- _vm._l(_vm.items, function (item, index) {
2637
- return _c(
2638
- "div",
2639
- {
2640
- key: index,
2641
- staticClass: "visualization-col",
2642
- staticStyle: { "min-width": "200px", "max-width": "200px" },
2633
+ [_vm._v("\n " + _vm._s(_vm.$t("infoBar.gridForm")) + "\n ")]
2634
+ ),
2635
+ _vm._v(" "),
2636
+ _c(
2637
+ "v-row",
2638
+ {
2639
+ staticClass: "visualization-row",
2640
+ staticStyle: { "justify-content": "center" },
2641
+ },
2642
+ _vm._l(_vm.items, function (item, index) {
2643
+ return _c(
2644
+ "v-col",
2645
+ {
2646
+ key: index,
2647
+ staticClass: "visualization-col",
2648
+ staticStyle: { "min-width": "200px", "max-width": "200px" },
2649
+ },
2650
+ [
2651
+ _c("img", {
2652
+ style:
2653
+ _vm.framesValue !== item.value
2654
+ ? "filter: grayscale(1)"
2655
+ : "",
2656
+ attrs: { src: item.image, width: "100%" },
2657
+ on: {
2658
+ click: function () {
2659
+ return (_vm.framesValue = item.value)
2660
+ },
2661
+ },
2662
+ }),
2663
+ ]
2664
+ )
2665
+ }),
2666
+ 1
2667
+ ),
2668
+ _vm._v(" "),
2669
+ _c("div", { staticClass: "visualization-divider" }),
2670
+ _vm._v(" "),
2671
+ _c(
2672
+ "div",
2673
+ {
2674
+ staticClass: "visualization-row",
2675
+ staticStyle: {
2676
+ display: "flex",
2677
+ "justify-content": "center",
2678
+ "margin-top": "10px",
2679
+ "margin-bottom": "10px",
2643
2680
  },
2644
- [
2645
- _c("img", {
2646
- style:
2647
- _vm.framesValue !== item.value
2648
- ? "filter: grayscale(1)"
2649
- : "",
2650
- attrs: { src: item.image, width: "100%" },
2681
+ },
2682
+ [
2683
+ _c(
2684
+ "button",
2685
+ {
2686
+ staticStyle: {
2687
+ "border-radius": "4px",
2688
+ height: "35px",
2689
+ width: "70px",
2690
+ "background-color": "var(--visualization-primary)",
2691
+ "border-color": "var(--visualization-primary)",
2692
+ color: "white",
2693
+ },
2651
2694
  on: {
2652
- click: function () {
2653
- return (_vm.framesValue = item.value)
2695
+ click: function ($event) {
2696
+ return _vm.$emit("close", "frames")
2654
2697
  },
2655
2698
  },
2656
- }),
2657
- ]
2658
- )
2659
- }),
2660
- 0
2661
- ),
2662
- _vm._v(" "),
2663
- _c("div", { staticClass: "visualization-divider" }),
2664
- _vm._v(" "),
2665
- _c(
2666
- "div",
2667
- {
2668
- staticClass: "visualization-row",
2669
- staticStyle: {
2670
- display: "flex",
2671
- "justify-content": "center",
2672
- "margin-top": "10px",
2673
- "margin-bottom": "10px",
2674
- },
2675
- },
2676
- [
2677
- _c(
2678
- "button",
2679
- {
2680
- staticStyle: {
2681
- "border-radius": "4px",
2682
- height: "35px",
2683
- width: "70px",
2684
- "background-color": "var(--visualization-primary)",
2685
- "border-color": "var(--visualization-primary)",
2686
- color: "white",
2687
- },
2688
- on: {
2689
- click: function ($event) {
2690
- return _vm.$emit("close", "frames")
2691
- },
2692
2699
  },
2693
- },
2694
- [_vm._v("\n Ok\n ")]
2695
- ),
2696
- ]
2697
- ),
2698
- ]),
2700
+ [_vm._v("\n Ok\n ")]
2701
+ ),
2702
+ ]
2703
+ ),
2704
+ ],
2705
+ 1
2706
+ ),
2699
2707
  _vm._v(" "),
2700
2708
  _c("dialog", { ref: "secondsPerFrame" }, [
2701
2709
  _c(
@@ -3033,11 +3041,11 @@ __vue_render__$1._withStripped = true;
3033
3041
  /* style */
3034
3042
  const __vue_inject_styles__$1 = function (inject) {
3035
3043
  if (!inject) return
3036
- inject("data-v-76bbde5a_0", { source: "\ndialog[data-v-76bbde5a] {\r\n max-width: 60vw;\r\n /* padding: 12px; */\r\n border: none;\r\n background: white;\r\n border-radius: 6px;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translateY(-50%) translateX(-50%);\n}\r\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\components\\Settings.vue"],"names":[],"mappings":";AAmZA;EACA,eAAA;EACA,mBAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA;mCACA;EACA,eAAA;EACA,QAAA;EACA,SAAA;EACA,4CAAA;AACA","file":"Settings.vue","sourcesContent":["<template>\r\n <div>\r\n <GlobalEvents\r\n v-if=\"dialogsVisibility.frames\"\r\n @keydown.37=\"prevFormat\"\r\n @keydown.39=\"nextFormat\"\r\n />\r\n <!-- Formato da grelha -->\r\n <dialog ref=\"frames\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 40px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 10px;\r\n \"\r\n >\r\n {{ $t('infoBar.gridForm') }}\r\n </div>\r\n <div class=\"visualization-row\" style=\"justify-content: center\">\r\n <div\r\n v-for=\"(item, index) in items\"\r\n :key=\"index\"\r\n class=\"visualization-col\"\r\n style=\"min-width: 200px; max-width: 200px\"\r\n >\r\n <img\r\n @click=\"() => (framesValue = item.value)\"\r\n :src=\"item.image\"\r\n width=\"100%\"\r\n :style=\"framesValue !== item.value ? 'filter: grayscale(1)' : ''\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"visualization-divider\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n @click=\"$emit('close', 'frames')\"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Frequencia das Imagens -->\r\n <dialog ref=\"secondsPerFrame\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 40px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 10px;\r\n \"\r\n >\r\n {{ $t('infoBar.secondImage') }}\r\n </div>\r\n <div class=\"visualization-row\" style=\"margin: 25px; height: 20px\">\r\n <input\r\n ref=\"secondsPerFrameInput\"\r\n v-model=\"secondsPerFrameValue\"\r\n type=\"range\"\r\n step=\"1\"\r\n max=\"5\"\r\n min=\"1\"\r\n style=\"height: 30px; width: 300px\"\r\n />\r\n <span style=\"padding-left: 20px; font-size: 16px\">\r\n {{ secondsPerFrame + ' s' }}</span\r\n >\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin: 10px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"display: flex; justify-content: center; margin-top: 10px\"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n margin-bottom: 8px;\r\n \"\r\n @click=\"$emit('close', 'secondsPerFrame')\"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Go To -->\r\n <dialog ref=\"goTo\">\r\n <div\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 35px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 8px;\r\n \"\r\n >\r\n {{ $t('infoBar.goTo') }}\r\n </div>\r\n <div class=\"visualization-row\" style=\"margin: 25px; height: 20px\">\r\n <input\r\n v-model=\"goToValue\"\r\n type=\"text\"\r\n placeholder=\"hh:mm:ss\"\r\n v-mask=\"'##:##:##'\"\r\n style=\"\r\n height: 30px;\r\n width: 300px;\r\n border: 0.1px solid #c2c9d6;\r\n border-radius: 3px;\r\n padding: 5px;\r\n \"\r\n />\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin-top: 40px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n @click=\"\r\n () => {\r\n $emit('close', 'goTo')\r\n $emit('change-go-to', goToValue)\r\n goToValue = ''\r\n }\r\n \"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Velocidade Reprodução -->\r\n <GlobalEvents\r\n @keydown.107=\"changePlaybackRate(1)\"\r\n @keydown.109=\"changePlaybackRate(-1)\"\r\n />\r\n <dialog ref=\"playbackRate\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 35px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 8px;\r\n \"\r\n >\r\n {{ $t('infoBar.playbackSpeed') }}\r\n </div>\r\n <div\r\n class=\"visualization-row\"\r\n style=\"margin: 25px; height: 20px; width: 380px\"\r\n >\r\n <input\r\n ref=\"playbackRateInput\"\r\n v-model=\"playbackRateValue\"\r\n type=\"range\"\r\n step=\"0.25\"\r\n max=\"3\"\r\n min=\"1\"\r\n style=\"height: 30px; width: 300px\"\r\n />\r\n <span\r\n style=\"padding-left: 20px; padding-right: 20px; font-size: 16px\"\r\n >{{ playbackRate + 'x' }}</span\r\n >\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin-top: 40px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n @click=\"$emit('close', 'playbackRate')\"\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n </div>\r\n</template>\r\n<script>\r\nimport GridImages from '../assets/grid/index.js'\r\n\r\nexport default {\r\n props: {\r\n dialogsVisibility: {\r\n type: Object,\r\n required: false,\r\n },\r\n playbackRate: {\r\n type: Number,\r\n required: true,\r\n },\r\n secondsPerFrame: {\r\n type: Number,\r\n required: true,\r\n },\r\n framesPerRow: {\r\n type: Number,\r\n required: true,\r\n },\r\n numberOfRows: {\r\n type: Number,\r\n required: true,\r\n },\r\n },\r\n data() {\r\n return {\r\n openBlocksDialog: false,\r\n time: '',\r\n rangeBlocks: {\r\n ini: null,\r\n end: null,\r\n date: null,\r\n },\r\n items: [\r\n { text: '2x1', value: 1, image: GridImages['2x1'] },\r\n { text: '3x1', value: 2, image: GridImages['3x1'] },\r\n { text: '3x2', value: 3, image: GridImages['3x2'] },\r\n { text: '4x1', value: 4, image: GridImages['4x1'] },\r\n { text: '4x2', value: 5, image: GridImages['4x2'] },\r\n { text: '5x1', value: 6, image: GridImages['5x1'] },\r\n { text: '5x2', value: 7, image: GridImages['5x2'] },\r\n { text: '6x1', value: 8, image: GridImages['6x1'] },\r\n { text: '6x2', value: 9, image: GridImages['6x2'] },\r\n ],\r\n\r\n // NEW\r\n goToValue: '',\r\n }\r\n },\r\n mounted() {\r\n this.toogleDialogs()\r\n },\r\n computed: {\r\n secondsPerFrameValue: {\r\n get() {\r\n return this.secondsPerFrame\r\n },\r\n set(val) {\r\n this.$emit('change-seconds-per-frame', parseInt(val))\r\n },\r\n },\r\n playbackRateValue: {\r\n get() {\r\n return this.playbackRate\r\n },\r\n set(val) {\r\n this.$emit('change-playback-rate', parseFloat(val))\r\n },\r\n },\r\n framesValue: {\r\n get() {\r\n return this.items.find(\r\n (item) => item.text === `${this.framesPerRow}x${this.numberOfRows}`\r\n ).value\r\n },\r\n set(value) {\r\n this.$emit('set-frames-selection', value)\r\n },\r\n },\r\n timeRules() {\r\n return [\r\n (time) =>\r\n (time >= '02:30:00' && time <= '26:29:59') ||\r\n this.$i18n.t('form.mustBeBetween'),\r\n ]\r\n },\r\n },\r\n methods: {\r\n toogleDialogs() {\r\n for (const dialog of Object.values(this.$refs)) {\r\n dialog.close?.()\r\n }\r\n\r\n const openDialog = Object.keys(this.dialogsVisibility).find(\r\n (key) => this.dialogsVisibility[key]\r\n )\r\n\r\n if (openDialog) {\r\n this.$refs[openDialog].showModal()\r\n }\r\n },\r\n prevFormat() {\r\n if (this.items.find((format) => format.value === this.framesValue - 1)) {\r\n this.framesValue--\r\n }\r\n },\r\n nextFormat() {\r\n if (this.items.find((format) => format.value === this.framesValue + 1)) {\r\n this.framesValue++\r\n }\r\n },\r\n changePlaybackRate(direction = 1) {\r\n if (direction === 1) {\r\n this.$refs.playbackRateInput.stepUp()\r\n } else if (direction === -1) {\r\n this.$refs.playbackRateInput.stepDown()\r\n }\r\n this.playbackRateValue = this.$refs.playbackRateInput.value\r\n },\r\n closeBlocksDialog() {\r\n Object.entries(this.rangeBlocks).forEach(([key, value]) => {\r\n if (!value || key == 'date') return\r\n var res = value.replace(/\\D/g, '')\r\n if (res.length < 6) {\r\n for (let i = res.length; i < 6; i++) {\r\n res += '0'\r\n }\r\n }\r\n res.match(/.{1,2}/g)\r\n let a = res.substring(0, 2)\r\n let b = res.substring(2, 4)\r\n let c = res.substring(4, 6)\r\n this.rangeBlocks[key] = a + ':' + b + ':' + c\r\n })\r\n\r\n this.openBlocksDialog = false\r\n this.$emit('goToBlockInterval', this.rangeBlocks)\r\n },\r\n },\r\n watch: {\r\n dialogsVisibility: {\r\n handler() {\r\n this.toogleDialogs()\r\n },\r\n deep: true,\r\n },\r\n },\r\n}\r\n</script>\r\n<style scoped>\r\ndialog {\r\n max-width: 60vw;\r\n /* padding: 12px; */\r\n border: none;\r\n background: white;\r\n border-radius: 6px;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translateY(-50%) translateX(-50%);\r\n}\r\n</style>\r\n"]}, media: undefined });
3044
+ inject("data-v-7082b87a_0", { source: "\ndialog[data-v-7082b87a] {\r\n max-width: 60vw;\r\n /* padding: 12px; */\r\n border: none;\r\n background: white;\r\n border-radius: 6px;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translateY(-50%) translateX(-50%);\n}\r\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\components\\Settings.vue"],"names":[],"mappings":";AAmZA;EACA,eAAA;EACA,mBAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA;mCACA;EACA,eAAA;EACA,QAAA;EACA,SAAA;EACA,4CAAA;AACA","file":"Settings.vue","sourcesContent":["<template>\r\n <div>\r\n <GlobalEvents\r\n v-if=\"dialogsVisibility.frames\"\r\n @keydown.37=\"prevFormat\"\r\n @keydown.39=\"nextFormat\"\r\n />\r\n <!-- Formato da grelha -->\r\n <dialog ref=\"frames\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 40px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 10px;\r\n \"\r\n >\r\n {{ $t('infoBar.gridForm') }}\r\n </div>\r\n <v-row class=\"visualization-row\" style=\"justify-content: center\">\r\n <v-col\r\n v-for=\"(item, index) in items\"\r\n :key=\"index\"\r\n class=\"visualization-col\"\r\n style=\"min-width: 200px; max-width: 200px\"\r\n >\r\n <img\r\n @click=\"() => (framesValue = item.value)\"\r\n :src=\"item.image\"\r\n width=\"100%\"\r\n :style=\"framesValue !== item.value ? 'filter: grayscale(1)' : ''\"\r\n />\r\n </v-col>\r\n </v-row>\r\n <div class=\"visualization-divider\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n @click=\"$emit('close', 'frames')\"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Frequencia das Imagens -->\r\n <dialog ref=\"secondsPerFrame\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 40px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 10px;\r\n \"\r\n >\r\n {{ $t('infoBar.secondImage') }}\r\n </div>\r\n <div class=\"visualization-row\" style=\"margin: 25px; height: 20px\">\r\n <input\r\n ref=\"secondsPerFrameInput\"\r\n v-model=\"secondsPerFrameValue\"\r\n type=\"range\"\r\n step=\"1\"\r\n max=\"5\"\r\n min=\"1\"\r\n style=\"height: 30px; width: 300px\"\r\n />\r\n <span style=\"padding-left: 20px; font-size: 16px\">\r\n {{ secondsPerFrame + ' s' }}</span\r\n >\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin: 10px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"display: flex; justify-content: center; margin-top: 10px\"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n margin-bottom: 8px;\r\n \"\r\n @click=\"$emit('close', 'secondsPerFrame')\"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Go To -->\r\n <dialog ref=\"goTo\">\r\n <div\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 35px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 8px;\r\n \"\r\n >\r\n {{ $t('infoBar.goTo') }}\r\n </div>\r\n <div class=\"visualization-row\" style=\"margin: 25px; height: 20px\">\r\n <input\r\n v-model=\"goToValue\"\r\n type=\"text\"\r\n placeholder=\"hh:mm:ss\"\r\n v-mask=\"'##:##:##'\"\r\n style=\"\r\n height: 30px;\r\n width: 300px;\r\n border: 0.1px solid #c2c9d6;\r\n border-radius: 3px;\r\n padding: 5px;\r\n \"\r\n />\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin-top: 40px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n @click=\"\r\n () => {\r\n $emit('close', 'goTo')\r\n $emit('change-go-to', goToValue)\r\n goToValue = ''\r\n }\r\n \"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n\r\n <!-- Velocidade Reprodução -->\r\n <GlobalEvents\r\n @keydown.107=\"changePlaybackRate(1)\"\r\n @keydown.109=\"changePlaybackRate(-1)\"\r\n />\r\n <dialog ref=\"playbackRate\">\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n padding: 5px;\r\n font-weight: bold;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n height: 35px;\r\n color: white;\r\n display: flex;\r\n justify-content: center;\r\n padding-top: 8px;\r\n \"\r\n >\r\n {{ $t('infoBar.playbackSpeed') }}\r\n </div>\r\n <div\r\n class=\"visualization-row\"\r\n style=\"margin: 25px; height: 20px; width: 380px\"\r\n >\r\n <input\r\n ref=\"playbackRateInput\"\r\n v-model=\"playbackRateValue\"\r\n type=\"range\"\r\n step=\"0.25\"\r\n max=\"3\"\r\n min=\"1\"\r\n style=\"height: 30px; width: 300px\"\r\n />\r\n <span\r\n style=\"padding-left: 20px; padding-right: 20px; font-size: 16px\"\r\n >{{ playbackRate + 'x' }}</span\r\n >\r\n </div>\r\n <div class=\"visualization-divider\" style=\"margin-top: 40px\" />\r\n <div\r\n class=\"visualization-row\"\r\n style=\"\r\n display: flex;\r\n justify-content: center;\r\n margin-top: 10px;\r\n margin-bottom: 10px;\r\n \"\r\n >\r\n <button\r\n @click=\"$emit('close', 'playbackRate')\"\r\n style=\"\r\n border-radius: 4px;\r\n height: 35px;\r\n width: 70px;\r\n background-color: var(--visualization-primary);\r\n border-color: var(--visualization-primary);\r\n color: white;\r\n \"\r\n >\r\n Ok\r\n </button>\r\n </div>\r\n </dialog>\r\n </div>\r\n</template>\r\n<script>\r\nimport GridImages from '../assets/grid/index.js'\r\n\r\nexport default {\r\n props: {\r\n dialogsVisibility: {\r\n type: Object,\r\n required: false,\r\n },\r\n playbackRate: {\r\n type: Number,\r\n required: true,\r\n },\r\n secondsPerFrame: {\r\n type: Number,\r\n required: true,\r\n },\r\n framesPerRow: {\r\n type: Number,\r\n required: true,\r\n },\r\n numberOfRows: {\r\n type: Number,\r\n required: true,\r\n },\r\n },\r\n data() {\r\n return {\r\n openBlocksDialog: false,\r\n time: '',\r\n rangeBlocks: {\r\n ini: null,\r\n end: null,\r\n date: null,\r\n },\r\n items: [\r\n { text: '2x1', value: 1, image: GridImages['2x1'] },\r\n { text: '3x1', value: 2, image: GridImages['3x1'] },\r\n { text: '3x2', value: 3, image: GridImages['3x2'] },\r\n { text: '4x1', value: 4, image: GridImages['4x1'] },\r\n { text: '4x2', value: 5, image: GridImages['4x2'] },\r\n { text: '5x1', value: 6, image: GridImages['5x1'] },\r\n { text: '5x2', value: 7, image: GridImages['5x2'] },\r\n { text: '6x1', value: 8, image: GridImages['6x1'] },\r\n { text: '6x2', value: 9, image: GridImages['6x2'] },\r\n ],\r\n\r\n // NEW\r\n goToValue: '',\r\n }\r\n },\r\n mounted() {\r\n this.toogleDialogs()\r\n },\r\n computed: {\r\n secondsPerFrameValue: {\r\n get() {\r\n return this.secondsPerFrame\r\n },\r\n set(val) {\r\n this.$emit('change-seconds-per-frame', parseInt(val))\r\n },\r\n },\r\n playbackRateValue: {\r\n get() {\r\n return this.playbackRate\r\n },\r\n set(val) {\r\n this.$emit('change-playback-rate', parseFloat(val))\r\n },\r\n },\r\n framesValue: {\r\n get() {\r\n return this.items.find(\r\n (item) => item.text === `${this.framesPerRow}x${this.numberOfRows}`\r\n ).value\r\n },\r\n set(value) {\r\n this.$emit('set-frames-selection', value)\r\n },\r\n },\r\n timeRules() {\r\n return [\r\n (time) =>\r\n (time >= '02:30:00' && time <= '26:29:59') ||\r\n this.$i18n.t('form.mustBeBetween'),\r\n ]\r\n },\r\n },\r\n methods: {\r\n toogleDialogs() {\r\n for (const dialog of Object.values(this.$refs)) {\r\n dialog.close?.()\r\n }\r\n\r\n const openDialog = Object.keys(this.dialogsVisibility).find(\r\n (key) => this.dialogsVisibility[key]\r\n )\r\n\r\n if (openDialog) {\r\n this.$refs[openDialog].showModal()\r\n }\r\n },\r\n prevFormat() {\r\n if (this.items.find((format) => format.value === this.framesValue - 1)) {\r\n this.framesValue--\r\n }\r\n },\r\n nextFormat() {\r\n if (this.items.find((format) => format.value === this.framesValue + 1)) {\r\n this.framesValue++\r\n }\r\n },\r\n changePlaybackRate(direction = 1) {\r\n if (direction === 1) {\r\n this.$refs.playbackRateInput.stepUp()\r\n } else if (direction === -1) {\r\n this.$refs.playbackRateInput.stepDown()\r\n }\r\n this.playbackRateValue = this.$refs.playbackRateInput.value\r\n },\r\n closeBlocksDialog() {\r\n Object.entries(this.rangeBlocks).forEach(([key, value]) => {\r\n if (!value || key == 'date') return\r\n var res = value.replace(/\\D/g, '')\r\n if (res.length < 6) {\r\n for (let i = res.length; i < 6; i++) {\r\n res += '0'\r\n }\r\n }\r\n res.match(/.{1,2}/g)\r\n let a = res.substring(0, 2)\r\n let b = res.substring(2, 4)\r\n let c = res.substring(4, 6)\r\n this.rangeBlocks[key] = a + ':' + b + ':' + c\r\n })\r\n\r\n this.openBlocksDialog = false\r\n this.$emit('goToBlockInterval', this.rangeBlocks)\r\n },\r\n },\r\n watch: {\r\n dialogsVisibility: {\r\n handler() {\r\n this.toogleDialogs()\r\n },\r\n deep: true,\r\n },\r\n },\r\n}\r\n</script>\r\n<style scoped>\r\ndialog {\r\n max-width: 60vw;\r\n /* padding: 12px; */\r\n border: none;\r\n background: white;\r\n border-radius: 6px;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translateY(-50%) translateX(-50%);\r\n}\r\n</style>\r\n"]}, media: undefined });
3037
3045
 
3038
3046
  };
3039
3047
  /* scoped */
3040
- const __vue_scope_id__$1 = "data-v-76bbde5a";
3048
+ const __vue_scope_id__$1 = "data-v-7082b87a";
3041
3049
  /* module identifier */
3042
3050
  const __vue_module_identifier__$1 = undefined;
3043
3051
  /* functional template */
@@ -3062,873 +3070,891 @@ __vue_render__$1._withStripped = true;
3062
3070
  );
3063
3071
 
3064
3072
  //
3065
-
3066
- const Positions = Object.freeze({
3067
- previous: 0,
3068
- current: 1,
3069
- next: 2,
3070
- });
3071
-
3072
- var script = {
3073
- name: 'visualization-container',
3074
- props: {
3075
- value: {
3076
- type: Boolean,
3077
- required: true,
3078
- },
3079
- date: {
3080
- type: String,
3081
- required: true,
3082
- },
3083
- channel: {
3084
- type: Number,
3085
- required: true,
3086
- },
3087
- startAudienceTime: {
3088
- type: String,
3089
- required: true,
3090
- },
3091
- endAudienceTime: {
3092
- type: String,
3093
- required: true,
3094
- },
3095
- videoProgressBar: {
3096
- type: Boolean,
3097
- default: false,
3098
- },
3099
- jumpOnInsert: {
3100
- type: Boolean,
3101
- default: false,
3102
- },
3103
- framesFormat: {
3104
- type: [Number, String],
3105
- default: 6,
3106
- },
3107
- maxSize: {
3108
- type: Number,
3109
- }
3110
- },
3111
- components: {
3112
- Frame: __vue_component__$5,
3113
- CommandBar: __vue_component__$4,
3114
- InfoBar: __vue_component__$3,
3115
- VideoProgress: __vue_component__$2,
3116
- Settings: __vue_component__$1,
3117
- // Help,
3118
- },
3119
- data() {
3120
- return {
3121
- Positions,
3122
- updatingChannel: null,
3123
- dialog: false,
3124
- timeLastBlock: null,
3125
- alternativeServer: false,
3126
- useCache: true,
3127
- numberOfRows: 1,
3128
- framesPerRow: 5,
3129
- secondsPerFrame: 1,
3130
- fInterface: null,
3131
- velocity: 1,
3132
- frames: [],
3133
- previousFrames: [],
3134
- nextFrames: [],
3135
- channelCode: 0,
3136
- videoPlaying: false,
3137
- activeFrame: null,
3138
- activeVideo: null,
3139
- videoTime: 0,
3140
- videoTotalTime: null,
3141
- progressVideoDrag: false,
3142
- hourIniSelected: false,
3143
- hourEndSelected: false,
3144
- canInsertTime: false,
3145
- lastHeight: 0,
3146
- loopInterval: null,
3147
- nextLoop: false,
3148
- prevLoop: false,
3149
- videoSliderTotalDuration: 900,
3150
- blockStartTime: null,
3151
- media: null,
3152
- changeServer: false,
3153
- userMultiTabsGrid: false,
3154
- userMultiTabsGridsModel: true,
3155
- playbackRate: 1,
3156
- paused: false,
3157
- commandBarShow: true,
3158
- dialogs: {
3159
- playbackRate: false,
3160
- goTo: false,
3161
- secondsPerFrame: false,
3162
- frames: false,
3163
- },
3164
- }
3165
- },
3166
- async created() {
3167
- this.changeServer = this.serverOfFrames === 'alternative';
3168
- this.alternativeServer = this.serverOfFrames === 'alternative';
3169
-
3170
- const settings = [
3171
- {
3172
- framesPerRow: 2,
3173
- numberOfRows: 1,
3174
- },
3175
- {
3176
- framesPerRow: 3,
3177
- numberOfRows: 1,
3178
- },
3179
- {
3180
- framesPerRow: 3,
3181
- numberOfRows: 2,
3182
- },
3183
- {
3184
- framesPerRow: 4,
3185
- numberOfRows: 1,
3186
- },
3187
- {
3188
- framesPerRow: 4,
3189
- numberOfRows: 2,
3190
- },
3191
- {
3192
- framesPerRow: 5,
3193
- numberOfRows: 1,
3194
- },
3195
- {
3196
- framesPerRow: 5,
3197
- numberOfRows: 2,
3198
- },
3199
- {
3200
- framesPerRow: 6,
3201
- numberOfRows: 1,
3202
- },
3203
- {
3204
- framesPerRow: 6,
3205
- numberOfRows: 2,
3206
- },
3207
- ];
3208
-
3209
- const storedOnDb = settings[parseInt(this.framesFormat) - 1];
3210
- this.framesPerRow = storedOnDb.framesPerRow;
3211
- this.numberOfRows = storedOnDb.numberOfRows;
3212
-
3213
- await this.createFramesInterface();
3214
- if (this.maxSize) {
3215
- this.resize(this.maxSize, true);
3216
- }
3217
- },
3218
- methods: {
3219
- framesClicked(e) {
3220
- if (e.target.id != 'insert') {
3221
- this.active = true;
3222
- }
3223
- },
3224
- async goToStartBlock() {
3225
- try {
3226
- const d = new Date();
3227
- let timestamp = Date.UTC(
3228
- d.getFullYear(),
3229
- d.getMonth(),
3230
- d.getDate(),
3231
- d.getHours(),
3232
- d.getMinutes(),
3233
- d.getSeconds()
3234
- );
3235
-
3236
- const response = (
3237
- await FramesService.getNextAvailableBlock({
3238
- channel: this.channel,
3239
- time: timestamp / 1000,
3240
- })
3241
- ).data;
3242
-
3243
- this.dialog = false;
3244
- this.changeHour(this.convertToAudienceTime(response.data.start, ':'));
3245
- } catch (err) {
3246
- console.error(err);
3247
- }
3248
- },
3249
- async checkAvailableBlock() {
3250
- try {
3251
- const d = new Date();
3252
- let timestamp = Date.UTC(
3253
- d.getFullYear(),
3254
- d.getMonth(),
3255
- d.getDate(),
3256
- d.getHours(),
3257
- d.getMinutes(),
3258
- d.getSeconds()
3259
- );
3260
-
3261
- const response = (
3262
- await FramesService.getNextAvailableBlock({
3263
- channel: this.channel,
3264
- time: timestamp / 1000,
3265
- })
3266
- ).data;
3267
-
3268
- this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':');
3269
- this.dialog = true;
3270
- if (!response.status) {
3271
- this.timeLastBlock = 'N/D';
3272
- }
3273
- } catch (err) {
3274
- console.error(err);
3275
- }
3276
- },
3277
- updateSlider(videoStartTime, time) {
3278
- // * atualizar slider se estiver fora do range definido previamente
3279
- if (
3280
- time < this.blockStartTime ||
3281
- time > this.blockStartTime ||
3282
- videoStartTime > this.blockStartTime + this.videoSliderTotalDuration
3283
- ) {
3284
- this.blockStartTime = videoStartTime;
3285
- this.videoSliderTotalDuration = 900;
3286
- }
3287
- },
3288
- nextLoopActivate() {
3289
- this.breakLoop();
3290
- this.loopInterval = setInterval(this.next, 40);
3291
- setTimeout(() => {
3292
- this.nextLoop = true;
3293
- }, 0);
3294
- },
3295
- prevLoopActivate() {
3296
- this.breakLoop();
3297
- this.loopInterval = setInterval(this.prev, 40);
3298
- setTimeout(() => {
3299
- this.prevLoop = true;
3300
- }, 0);
3301
- },
3302
- breakLoop() {
3303
- clearInterval(this.loopInterval);
3304
- this.loopInterval = null;
3305
- this.nextLoop = false;
3306
- this.prevLoop = false;
3307
- },
3308
- changePlayPause(status) {
3309
- this.paused = !status;
3310
- },
3311
- resize(height=this.lastHeight) {
3312
- this.lastHeight = height;
3313
- if (this.$refs.frames) {
3314
- for (let frame of this.$refs.frames) {
3315
- frame.resize(height);
3316
- }
3317
- }
3318
- this.$emit('resized');
3319
- },
3320
- async goToFirstFrame() {
3321
- let frames = this.$refs.frames;
3322
-
3323
- let audienceTime = null;
3324
- if (frames.length > 0) {
3325
- let frame = frames[0].frame;
3326
- audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3327
- }
3328
- // if (audienceTime) {
3329
- // this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))
3330
- // }
3331
- if (audienceTime) {
3332
- const [hours, minutes, seconds] = audienceTime.split(':');
3333
- const totalSeconds =
3334
- parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds);
3335
- if (totalSeconds >= 9000)
3336
- this.changeHour(this.getLastFirtsBlockTime(audienceTime, true));
3337
- else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true));
3338
- }
3339
- },
3340
- async goToLastFrame() {
3341
- let frames = this.$refs.frames;
3342
- let audienceTime = null;
3343
- if (frames.length > 0) {
3344
- let frame = frames[0].frame;
3345
-
3346
- audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3347
- }
3348
- if (audienceTime) {
3349
- this.changeHour(this.getLastFirtsBlockTime(audienceTime));
3350
- }
3351
- },
3352
- getLastFirtsBlockTime(time, first = false) {
3353
- if (time.indexOf(':') !== -1) {
3354
- time = time.replace(/:/g, '');
3355
- }
3356
- let h, m, newTime;
3357
- const t = time.match(/.{1,2}/g);
3358
- if (t[0] && t[1]) {
3359
- h = parseInt(t[0]);
3360
- m = parseInt(t[1]);
3361
- }
3362
- if (h < 26) {
3363
- if (m < 15)
3364
- if (first) newTime = t[0] + ':00:00';
3365
- else newTime = t[0] + ':14:59';
3366
- else if (m < 30)
3367
- if (first) newTime = t[0] + ':15:00';
3368
- else newTime = t[0] + ':29:59';
3369
- else if (m < 45)
3370
- if (first) newTime = t[0] + ':30:00';
3371
- else newTime = t[0] + ':44:59';
3372
- else if (first) newTime = t[0] + ':45:00';
3373
- else newTime = t[0] + ':59:59';
3374
- } else {
3375
- if (m < 15)
3376
- if (first) newTime = '26:00:00';
3377
- else newTime = '26:14:59';
3378
- else {
3379
- if (first) newTime = '26:15:00';
3380
- else newTime = '26:29:59';
3381
- }
3382
- }
3383
- return newTime
3384
- },
3385
- openBlocks() {
3386
- this.$refs.settings2?.openBlocks();
3387
- },
3388
- playOrPause() {
3389
- const array = this.$refs.frames.filter((fc) => !!fc.active);
3390
- if (array.length === 1) {
3391
- const frame = array[0];
3392
- frame.playOrPause(this.playbackRate);
3393
- }
3394
- },
3395
- stopPlayingBar() {
3396
- for (let ref of this.$refs.frames) {
3397
- if (
3398
- ref.videoStatus === ref.Status.playing ||
3399
- ref.videoStatus === ref.Status.paused
3400
- ) {
3401
- ref.stop(false);
3402
- }
3403
- }
3404
- },
3405
- async setFrameSelection(selected) {
3406
- this.frames = this.loadingArray;
3407
- switch (parseInt(selected)) {
3408
- // 2x1
3409
- case 1:
3410
- this.framesPerRow = 2;
3411
- this.numberOfRows = 1;
3412
- break
3413
- // 3x1
3414
- case 2:
3415
- this.framesPerRow = 3;
3416
- this.numberOfRows = 1;
3417
- break
3418
- // 3x2
3419
- case 3:
3420
- this.framesPerRow = 3;
3421
- this.numberOfRows = 2;
3422
- break
3423
- // 4x1
3424
- case 4:
3425
- this.framesPerRow = 4;
3426
- this.numberOfRows = 1;
3427
- break
3428
- // 4x2
3429
- case 5:
3430
- this.framesPerRow = 4;
3431
- this.numberOfRows = 2;
3432
- break
3433
- // 5x1
3434
- case 6:
3435
- this.framesPerRow = 5;
3436
- this.numberOfRows = 1;
3437
- break
3438
- // 5x2
3439
- case 7:
3440
- this.framesPerRow = 5;
3441
- this.numberOfRows = 2;
3442
- break
3443
- // 6x1
3444
- case 8:
3445
- this.framesPerRow = 6;
3446
- this.numberOfRows = 1;
3447
- break
3448
- // 6x2
3449
- case 9:
3450
- this.framesPerRow = 6;
3451
- this.numberOfRows = 2;
3452
- break
3453
- }
3454
- await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow);
3455
- this.getFramesArray();
3456
- setTimeout(() => {
3457
- for (let ref of this.$refs.frames) {
3458
- ref?.resize(this.lastHeight);
3459
- }
3460
- }, 150);
3461
- },
3462
- getFramesArray() {
3463
- this.frames = this.fInterface.getFrames(Positions.current);
3464
- this.nextFrames = this.fInterface.getFrames(Positions.next);
3465
- this.previousFrames = this.fInterface.getFrames(Positions.previous);
3466
- },
3467
- async createFramesInterface() {
3468
- this.frames = this.loadingArray;
3469
- let ch = this.channel;
3470
- let associationTMP = {
3471
- 1735073: 1,
3472
- 1735074: 139,
3473
- 1735075: 3,
3474
- 1735076: 132,
3475
- };
3476
- //
3477
- this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch;
3478
-
3479
- const t = this.startAudienceTime.match(/.{1,2}/g);
3480
- const d = this.getDateParts();
3481
- const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3482
- // * iniciar slider
3483
- this.blockStartTime = time;
3484
- this.fInterface = await new FramesInterface(
3485
- this.channelCode,
3486
- this.numberOfRows,
3487
- this.framesPerRow,
3488
- time,
3489
- this.startAudienceTime,
3490
- this.useCache
3491
- );
3492
- await this.fInterface.init();
3493
-
3494
- this.getFramesArray();
3495
-
3496
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3497
-
3498
- this.activeVideo = null;
3499
- },
3500
- getIndex(rowNumber, frameIndex, position) {
3501
- let from = this.framesPerRow * this.numberOfRows * position;
3502
- let till = this.framesPerRow * this.numberOfRows * (position + 1);
3503
-
3504
- return (from + till * (rowNumber - 1)) / rowNumber + frameIndex
3505
- },
3506
- getAudienceTime(frameTime, rowNumber, frameNumber, position) {
3507
- if (!frameTime) {
3508
- return 'Loading...'
3509
- } else if (
3510
- this.getIndex(rowNumber, frameNumber, position) === this.activeVideo
3511
- ) {
3512
- return this.convertToAudienceTime(this.videoTime)
3513
- } else {
3514
- return this.convertToAudienceTime(frameTime)
3515
- }
3516
- },
3517
- dateInUtc(miliSeconds) {
3518
- var date = new Date(miliSeconds);
3519
- var utc = new Date(
3520
- date.getUTCFullYear(),
3521
- date.getUTCMonth(),
3522
- date.getUTCDate(),
3523
- date.getUTCHours(),
3524
- date.getUTCMinutes(),
3525
- date.getUTCSeconds()
3526
- );
3527
- return utc
3528
- },
3529
- convertToAudienceTime(time, separator = ':') {
3530
- const d = this.getDateParts();
3531
- const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3532
-
3533
- let hour = this.dateInUtc(time * 1000)
3534
- .toTimeString()
3535
- .split(' ')[0]
3536
- .split(':')
3537
- .map(Number);
3538
-
3539
- if (time > limit && time <= limit + this.startAudienceSeconds) {
3540
- hour[0] = 24 + hour[0];
3541
- }
3542
- return hour
3543
- .map((part) => (part > 9 ? part.toString() : '0' + part))
3544
- .join(separator)
3545
- },
3546
- getDateParts(date = this.date) {
3547
- const d = new Date(date);
3548
- return {
3549
- year: d.getFullYear(),
3550
- month: d.getMonth(),
3551
- day: d.getDate(),
3552
- }
3553
- },
3554
- selectFrame(index, frame) {
3555
- const d = this.getDateParts();
3556
- const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3557
- const frameTime = frame?.time;
3558
-
3559
- if (frameTime - (this.startAudienceSeconds + limit) <= 0) {
3560
- if (this.hourIniSelected === true) {
3561
- this.hourIniSelected = frameTime;
3562
-
3563
- if (
3564
- this.hourEndSelected &&
3565
- this.hourIniSelected > this.hourEndSelected
3566
- ) {
3567
- this.hourEndSelected = false;
3568
- }
3569
- } else if (this.hourEndSelected === true) {
3570
- if (frameTime > this.hourIniSelected) {
3571
- this.hourEndSelected = frameTime;
3572
- this.canInsertTime = true;
3573
- } else {
3574
- this.hourEndSelected = false;
3575
- }
3576
- }
3577
- }
3578
-
3579
- if (this.activeFrame !== index) {
3580
- // ? Se clicar no frame diferente de onde está a dar play, faz pausa
3581
- const array = this.$refs.frames.filter(
3582
- (fc) => fc.videoStatus === fc.Status.playing
3583
- );
3584
- if (array.length === 1) {
3585
- const frame = array[0];
3586
- frame.playOrPause();
3587
- }
3588
- this.activeVideo = null;
3589
- this.activeFrame = index;
3590
- }
3591
- },
3592
- setHourIni() {
3593
- this.canInsertTime = true;
3594
- this.hourIniSelected = true;
3595
- document.getElementById(`frame-${this.activeFrame}`).click();
3596
- this.$emit('setHourIni', {
3597
- hour_ini: this.hourIniSelected
3598
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3599
- : null,
3600
- });
3601
- },
3602
- setHourEnd() {
3603
- this.canInsertTime = true;
3604
- this.hourEndSelected = true;
3605
- document.getElementById(`frame-${this.activeFrame}`).click();
3606
- },
3607
- //* Navegação
3608
- arrowRight() {
3609
- if (this.checkLimitRight(false)) {
3610
- if (
3611
- this.activeFrame ===
3612
- this.numberOfRows * this.framesPerRow * 2 - 1
3613
- ) {
3614
- this.next();
3615
- } else {
3616
- this.activeFrame++;
3617
- }
3618
- }
3619
- },
3620
- arrowLeft() {
3621
- if (this.checkLimitLeft(false)) {
3622
- if (this.activeFrame === this.numberOfRows * this.framesPerRow) {
3623
- this.prev();
3624
- } else {
3625
- this.activeFrame--;
3626
- }
3627
- }
3628
- },
3629
- checkLimitRight(value) {
3630
- this.endAudienceTime.match(/.{1,2}/g);
3631
- const d = this.getDateParts();
3632
- const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59);
3633
-
3634
- if (value) {
3635
- return (
3636
- high > (this.fInterface.getCurrentTime() - 1) * 1000 &&
3637
- this.nextFrames[0].title !== -1
3638
- )
3639
- } else {
3640
- // return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000
3641
- return high > this.fInterface.getCurrentTime() * 1000
3642
- }
3643
- },
3644
- checkLimitLeft(value) {
3645
- const hours = this.startAudienceTime.match(/.{1,2}/g);
3646
- const d = this.getDateParts();
3647
- const low = Date.UTC(d.year, d.month, d.day, hours[0], hours[1], hours[2]);
3648
-
3649
- if (value) {
3650
- return low <= (this.fInterface.getCurrentTime() - 1) * 1000
3651
- } else {
3652
- return (
3653
- low <
3654
- (this.fInterface.getCurrentTime() +
3655
- this.activeFrame -
3656
- this.numberOfRows * this.framesPerRow) *
3657
- 1000
3658
- )
3659
- }
3660
- },
3661
- async next() {
3662
- if (this.checkLimitRight(true)) {
3663
- const array = this.$refs.frames.filter(
3664
- (fc) =>
3665
- fc.videoStatus === fc.Status.playing ||
3666
- fc.videoStatus === fc.Status.paused
3667
- );
3668
-
3669
- if (array.length === 1) {
3670
- const frame = array[0];
3671
- frame.stop(false);
3672
- }
3673
- this.fInterface.setCurrentStep(this.secondsPerFrame);
3674
- await this.fInterface.loadNextFrames();
3675
-
3676
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3677
- this.activeVideo = null;
3678
-
3679
- this.getFramesArray();
3680
- }
3681
- },
3682
- async prev() {
3683
- if (this.checkLimitLeft(true)) {
3684
- const array = this.$refs.frames.filter(
3685
- (fc) =>
3686
- fc.videoStatus === fc.Status.playing ||
3687
- fc.videoStatus === fc.Status.paused
3688
- );
3689
- if (array.length === 1) {
3690
- const frame = array[0];
3691
- frame.stop(false);
3692
- }
3693
-
3694
- this.fInterface.setCurrentStep(this.secondsPerFrame);
3695
- await this.fInterface.loadPrevFrames();
3696
-
3697
- this.activeFrame = this.getIndex(
3698
- this.numberOfRows,
3699
- this.framesPerRow - 1,
3700
- Positions.current
3701
- );
3702
- this.activeVideo = null;
3703
-
3704
- this.getFramesArray();
3705
- }
3706
- },
3707
- async setStartTime(time) {
3708
- if (time.indexOf(':') !== -1) {
3709
- time = time.replace(/:/g, '');
3710
- }
3711
- const t = time.match(/.{1,2}/g);
3712
- const d = this.getDateParts();
3713
- const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3714
- this.frames = this.loadingArray;
3715
-
3716
- await this.fInterface.changeTime(setTime);
3717
-
3718
- this.getFramesArray();
3719
-
3720
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3721
- // let frames = this.$refs.frames
3722
-
3723
- // let audienceTime = null
3724
- // if (frames.length > 0) {
3725
- // let frame = frames[0].frame
3726
- // audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)
3727
- // }
3728
-
3729
- this.activeVideo = null;
3730
-
3731
- return true
3732
- },
3733
- hourToTimeStamp(time) {
3734
- if (time.indexOf(':') !== -1) {
3735
- time = time.replace(/:/g, '');
3736
- }
3737
- const t = time.match(/.{1,2}/g);
3738
- const d = this.getDateParts();
3739
- const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3740
-
3741
- return setTime
3742
- },
3743
- async changeHour(value) {
3744
- if (value) {
3745
- setTimeout(() => {
3746
- const array = this.$refs.frames.filter(
3747
- (fc) =>
3748
- fc.videoStatus === fc.Status.playing ||
3749
- fc.videoStatus === fc.Status.paused
3750
- );
3751
-
3752
- if (array.length === 1) {
3753
- const frame = array[0];
3754
- frame.stop(false);
3755
- }
3756
-
3757
- this.setStartTime(value, true);
3758
- }, 0);
3759
- }
3760
- },
3761
- changeBlockInterval(value) {
3762
- this.changeHour(value.ini);
3763
- let time_ini, time_end;
3764
- time_ini = this.hourToTimeStamp(value.ini);
3765
- time_end = this.hourToTimeStamp(value.end);
3766
- this.videoSliderTotalDuration = time_end - time_ini;
3767
- this.$refs.frames[0].changeSettings(time_ini);
3768
- this.blockStartTime = time_ini;
3769
- },
3770
- //eslint-disable-next-line
3771
- async updateVideoTime(index, videoTime) {
3772
- this.activeVideo = index;
3773
- this.videoTime = videoTime;
3774
- },
3775
- //eslint-disable-next-line
3776
- updateVideoStatus(currentTime) {
3777
- if (!this.progressVideoDrag) ;
3778
- },
3779
- async startPlaying(frame, totalTime) {
3780
- const array = this.$refs.frames.filter(
3781
- (fc) => fc.frame.time !== frame.time
3782
- );
3783
-
3784
- for (let ref of array) {
3785
- if (
3786
- ref.videoStatus === ref.Status.playing ||
3787
- ref.videoStatus === ref.Status.paused
3788
- ) {
3789
- ref.stop(false);
3790
- }
3791
- }
3792
-
3793
- this.videoTotalTime = totalTime;
3794
- this.videoPlaying = true;
3795
- },
3796
- stopPlaying() {
3797
- this.videoTotalTime = null;
3798
- this.videoPlaying = false;
3799
- this.paused = false;
3800
- },
3801
- insertTime() {
3802
- this.$emit('timeToInsert', {
3803
- channel: this.channel,
3804
- hour_ini: this.hourIniSelected
3805
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3806
- : null,
3807
- hour_end: this.hourEndSelected
3808
- ? this.convertToAudienceTime(this.hourEndSelected, '')
3809
- : null,
3810
- force: false,
3811
- });
3812
-
3813
- if (this.jumpOnInsert) {
3814
- this.changeHour(
3815
- this.convertToAudienceTime(
3816
- (this.hourEndSelected || this.hourIniSelected) + 1
3817
- )
3818
- );
3819
- }
3820
-
3821
- this.hourIniSelected = null;
3822
- this.hourEndSelected = null;
3823
- this.canInsertTime = false;
3824
-
3825
- // this.fInterface.setCurrentPosition(this.hourEndSelected)
3826
- },
3827
- insertTimeForce() {
3828
- this.$emit('timeToInsert', {
3829
- channel: this.channel,
3830
- hour_ini: this.hourIniSelected
3831
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3832
- : null,
3833
- hour_end: this.hourEndSelected
3834
- ? this.convertToAudienceTime(this.hourEndSelected, '')
3835
- : null,
3836
- force: true,
3837
- });
3838
-
3839
- this.hourIniSelected = null;
3840
- this.hourEndSelected = null;
3841
- this.canInsertTime = false;
3842
-
3843
- // this.fInterface.setCurrentPosition(this.hourEndSelected)
3844
- },
3845
- async getChannelMedia() {
3846
- // this.media = (await ChannelService.show(this.channel)).data.MEDIA
3847
- },
3848
- async changeServerClick() {
3849
- this.changeServer = !this.changeServer;
3850
- // this.$store.dispatch(
3851
- // 'serverOfFrames',
3852
- // this.changeServer ? 'alternative' : 'default'
3853
- // )
3854
- sessionStorage.setItem(
3855
- 'serverOfFrames',
3856
- this.changeServer ? 'alternative' : 'default'
3857
- );
3858
-
3859
- // if (this.$route.params.time != this.frames[0].time)
3860
- // this.$router.push({
3861
- // name: 'grid',
3862
- // params: {
3863
- // date: this.date,
3864
- // channel: this.channelCode,
3865
- // time: this.frames[0].time,
3866
- // },
3867
- // })
3868
- location.reload();
3869
- },
3870
- },
3871
- computed: {
3872
- active: {
3873
- get() {
3874
- return this.value
3875
- },
3876
- set(value) {
3877
- this.$emit('input', value);
3878
- },
3879
- },
3880
- settingsClosed() {
3881
- return !Object.values(this.dialogs).find((v) => v)
3882
- },
3883
- startAudienceSeconds() {
3884
- const t = this.startAudienceTime.match(/.{1,2}/g);
3885
- return parseInt(t[0] * 3600 + t[1] * 60 + t[2])
3886
- },
3887
- loadingArray() {
3888
- return Array.from(Array(this.numberOfRows * this.framesPerRow).keys())
3889
- },
3890
- serverOfFrames() {
3891
- return sessionStorage.getItem('server')
3892
- },
3893
- },
3894
- watch: {
3895
- framesFormat(value) {
3896
- this.setFrameSelection(value);
3897
- },
3898
- active() {
3899
- // ? sempre que trocamos de tabs dar reset as horas selected
3900
- this.hourIniSelected = false;
3901
- this.hourEndSelected = false;
3902
- },
3903
- useCache() {
3904
- this.createFramesInterface();
3905
- },
3906
- hourIniSelected(value) {
3907
- if (value) {
3908
- sessionStorage.setItem(
3909
- 'currentTimeFrames',
3910
- this.convertToAudienceTime(this.hourIniSelected, '')
3911
- );
3912
- } else {
3913
- sessionStorage.removeItem('currentTimeFrames');
3914
- }
3915
- },
3916
- activeFrame(value) {
3917
- if (value) {
3918
- this.stopPlayingBar();
3919
- }
3920
- },
3921
- channel() {
3922
- this.updatingChannel = new Promise((resolve, reject) => {
3923
- try {
3924
- this.createFramesInterface();
3925
- resolve(true);
3926
- } catch (err) {
3927
- reject(err);
3928
- }
3929
- });
3930
- },
3931
- },
3073
+
3074
+ const Positions = Object.freeze({
3075
+ previous: 0,
3076
+ current: 1,
3077
+ next: 2,
3078
+ });
3079
+
3080
+ var script = {
3081
+ name: 'visualization-container',
3082
+ props: {
3083
+ value: {
3084
+ type: Boolean,
3085
+ required: true,
3086
+ },
3087
+ date: {
3088
+ type: String,
3089
+ required: true,
3090
+ },
3091
+ channel: {
3092
+ type: Number,
3093
+ required: true,
3094
+ },
3095
+ startAudienceTime: {
3096
+ type: String,
3097
+ required: true,
3098
+ },
3099
+ endAudienceTime: {
3100
+ type: String,
3101
+ required: true,
3102
+ },
3103
+ videoProgressBar: {
3104
+ type: Boolean,
3105
+ default: false,
3106
+ },
3107
+ jumpOnInsert: {
3108
+ type: Boolean,
3109
+ default: false,
3110
+ },
3111
+ framesFormat: {
3112
+ type: [Number, String],
3113
+ default: 6,
3114
+ },
3115
+ maxSize: {
3116
+ type: Number,
3117
+ },
3118
+ },
3119
+ components: {
3120
+ Frame: __vue_component__$5,
3121
+ CommandBar: __vue_component__$4,
3122
+ InfoBar: __vue_component__$3,
3123
+ VideoProgress: __vue_component__$2,
3124
+ Settings: __vue_component__$1,
3125
+ // Help,
3126
+ },
3127
+ data() {
3128
+ return {
3129
+ Positions,
3130
+ updatingChannel: null,
3131
+ dialog: false,
3132
+ timeLastBlock: null,
3133
+ alternativeServer: false,
3134
+ useCache: true,
3135
+ numberOfRows: 1,
3136
+ framesPerRow: 5,
3137
+ secondsPerFrame: 1,
3138
+ fInterface: null,
3139
+ velocity: 1,
3140
+ frames: [],
3141
+ previousFrames: [],
3142
+ nextFrames: [],
3143
+ channelCode: 0,
3144
+ videoPlaying: false,
3145
+ activeFrame: null,
3146
+ activeVideo: null,
3147
+ videoTime: 0,
3148
+ videoTotalTime: null,
3149
+ progressVideoDrag: false,
3150
+ hourIniSelected: false,
3151
+ hourEndSelected: false,
3152
+ canInsertTime: false,
3153
+ lastHeight: 0,
3154
+ loopInterval: null,
3155
+ nextLoop: false,
3156
+ prevLoop: false,
3157
+ videoSliderTotalDuration: 900,
3158
+ blockStartTime: null,
3159
+ media: null,
3160
+ changeServer: false,
3161
+ userMultiTabsGrid: false,
3162
+ userMultiTabsGridsModel: true,
3163
+ playbackRate: 1,
3164
+ paused: false,
3165
+ commandBarShow: true,
3166
+ dialogs: {
3167
+ playbackRate: false,
3168
+ goTo: false,
3169
+ secondsPerFrame: false,
3170
+ frames: false,
3171
+ },
3172
+ }
3173
+ },
3174
+ async created() {
3175
+ this.changeServer = this.serverOfFrames === 'alternative';
3176
+ this.alternativeServer = this.serverOfFrames === 'alternative';
3177
+
3178
+ const settings = [
3179
+ {
3180
+ framesPerRow: 2,
3181
+ numberOfRows: 1,
3182
+ },
3183
+ {
3184
+ framesPerRow: 3,
3185
+ numberOfRows: 1,
3186
+ },
3187
+ {
3188
+ framesPerRow: 3,
3189
+ numberOfRows: 2,
3190
+ },
3191
+ {
3192
+ framesPerRow: 4,
3193
+ numberOfRows: 1,
3194
+ },
3195
+ {
3196
+ framesPerRow: 4,
3197
+ numberOfRows: 2,
3198
+ },
3199
+ {
3200
+ framesPerRow: 5,
3201
+ numberOfRows: 1,
3202
+ },
3203
+ {
3204
+ framesPerRow: 5,
3205
+ numberOfRows: 2,
3206
+ },
3207
+ {
3208
+ framesPerRow: 6,
3209
+ numberOfRows: 1,
3210
+ },
3211
+ {
3212
+ framesPerRow: 6,
3213
+ numberOfRows: 2,
3214
+ },
3215
+ ];
3216
+
3217
+ const storedOnDb = settings[parseInt(this.framesFormat) - 1];
3218
+ this.framesPerRow = storedOnDb.framesPerRow;
3219
+ this.numberOfRows = storedOnDb.numberOfRows;
3220
+
3221
+ await this.createFramesInterface();
3222
+ if (this.maxSize) {
3223
+ this.resize(this.maxSize, true);
3224
+ }
3225
+ },
3226
+ methods: {
3227
+ framesClicked(e) {
3228
+ if (e.target.id != 'insert') {
3229
+ this.active = true;
3230
+ }
3231
+ },
3232
+ async goToStartBlock() {
3233
+ try {
3234
+ const d = new Date();
3235
+ let timestamp = Date.UTC(
3236
+ d.getFullYear(),
3237
+ d.getMonth(),
3238
+ d.getDate(),
3239
+ d.getHours(),
3240
+ d.getMinutes(),
3241
+ d.getSeconds()
3242
+ );
3243
+
3244
+ const response = (
3245
+ await FramesService.getNextAvailableBlock({
3246
+ channel: this.channel,
3247
+ time: timestamp / 1000,
3248
+ })
3249
+ ).data;
3250
+
3251
+ this.dialog = false;
3252
+ this.changeHour(this.convertToAudienceTime(response.data.start, ':'));
3253
+ } catch (err) {
3254
+ console.error(err);
3255
+ }
3256
+ },
3257
+ async checkAvailableBlock() {
3258
+ try {
3259
+ const d = new Date();
3260
+ let timestamp = Date.UTC(
3261
+ d.getFullYear(),
3262
+ d.getMonth(),
3263
+ d.getDate(),
3264
+ d.getHours(),
3265
+ d.getMinutes(),
3266
+ d.getSeconds()
3267
+ );
3268
+
3269
+ const response = (
3270
+ await FramesService.getNextAvailableBlock({
3271
+ channel: this.channel,
3272
+ time: timestamp / 1000,
3273
+ })
3274
+ ).data;
3275
+
3276
+ this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':');
3277
+ this.dialog = true;
3278
+ if (!response.status) {
3279
+ this.timeLastBlock = 'N/D';
3280
+ }
3281
+ } catch (err) {
3282
+ console.error(err);
3283
+ }
3284
+ },
3285
+ updateSlider(videoStartTime, time) {
3286
+ // * atualizar slider se estiver fora do range definido previamente
3287
+ if (
3288
+ time < this.blockStartTime ||
3289
+ time > this.blockStartTime ||
3290
+ videoStartTime > this.blockStartTime + this.videoSliderTotalDuration
3291
+ ) {
3292
+ this.blockStartTime = videoStartTime;
3293
+ this.videoSliderTotalDuration = 900;
3294
+ }
3295
+ },
3296
+ nextLoopActivate() {
3297
+ this.breakLoop();
3298
+ this.loopInterval = setInterval(this.next, 40);
3299
+ setTimeout(() => {
3300
+ this.nextLoop = true;
3301
+ }, 0);
3302
+ },
3303
+ prevLoopActivate() {
3304
+ this.breakLoop();
3305
+ this.loopInterval = setInterval(this.prev, 40);
3306
+ setTimeout(() => {
3307
+ this.prevLoop = true;
3308
+ }, 0);
3309
+ },
3310
+ breakLoop() {
3311
+ clearInterval(this.loopInterval);
3312
+ this.loopInterval = null;
3313
+ this.nextLoop = false;
3314
+ this.prevLoop = false;
3315
+ },
3316
+ changePlayPause(status) {
3317
+ this.paused = !status;
3318
+ },
3319
+ resize(height = this.lastHeight) {
3320
+ this.lastHeight = height;
3321
+ if (this.$refs.frames) {
3322
+ for (let frame of this.$refs.frames) {
3323
+ frame.resize(height);
3324
+ }
3325
+ }
3326
+ this.$emit('resized');
3327
+ },
3328
+ async goToFirstFrame() {
3329
+ let frames = this.$refs.frames;
3330
+
3331
+ let audienceTime = null;
3332
+ if (frames.length > 0) {
3333
+ let frame = frames[0].frame;
3334
+ audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3335
+ }
3336
+ // if (audienceTime) {
3337
+ // this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))
3338
+ // }
3339
+ if (audienceTime) {
3340
+ const [hours, minutes, seconds] = audienceTime.split(':');
3341
+ const totalSeconds =
3342
+ parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds);
3343
+ if (totalSeconds >= 9000)
3344
+ this.changeHour(this.getLastFirtsBlockTime(audienceTime, true));
3345
+ else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true));
3346
+ }
3347
+ },
3348
+ async goToLastFrame() {
3349
+ let frames = this.$refs.frames;
3350
+ let audienceTime = null;
3351
+ if (frames.length > 0) {
3352
+ let frame = frames[0].frame;
3353
+
3354
+ audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3355
+ }
3356
+ if (audienceTime) {
3357
+ this.changeHour(this.getLastFirtsBlockTime(audienceTime));
3358
+ }
3359
+ },
3360
+ getLastFirtsBlockTime(time, first = false) {
3361
+ if (time.indexOf(':') !== -1) {
3362
+ time = time.replace(/:/g, '');
3363
+ }
3364
+ let h, m, newTime;
3365
+ const t = time.match(/.{1,2}/g);
3366
+ if (t[0] && t[1]) {
3367
+ h = parseInt(t[0]);
3368
+ m = parseInt(t[1]);
3369
+ }
3370
+ if (h < 26) {
3371
+ if (m < 15)
3372
+ if (first) newTime = t[0] + ':00:00';
3373
+ else newTime = t[0] + ':14:59';
3374
+ else if (m < 30)
3375
+ if (first) newTime = t[0] + ':15:00';
3376
+ else newTime = t[0] + ':29:59';
3377
+ else if (m < 45)
3378
+ if (first) newTime = t[0] + ':30:00';
3379
+ else newTime = t[0] + ':44:59';
3380
+ else if (first) newTime = t[0] + ':45:00';
3381
+ else newTime = t[0] + ':59:59';
3382
+ } else {
3383
+ if (m < 15)
3384
+ if (first) newTime = '26:00:00';
3385
+ else newTime = '26:14:59';
3386
+ else {
3387
+ if (first) newTime = '26:15:00';
3388
+ else newTime = '26:29:59';
3389
+ }
3390
+ }
3391
+ return newTime
3392
+ },
3393
+ openBlocks() {
3394
+ this.$refs.settings2?.openBlocks();
3395
+ },
3396
+ playOrPause() {
3397
+ const array = this.$refs.frames.filter((fc) => !!fc.active);
3398
+ if (array.length === 1) {
3399
+ const frame = array[0];
3400
+ frame.playOrPause(this.playbackRate);
3401
+ }
3402
+ },
3403
+ stopPlayingBar() {
3404
+ for (let ref of this.$refs.frames) {
3405
+ if (
3406
+ ref.videoStatus === ref.Status.playing ||
3407
+ ref.videoStatus === ref.Status.paused
3408
+ ) {
3409
+ ref.stop(false);
3410
+ }
3411
+ }
3412
+ },
3413
+ async setFrameSelection(selected) {
3414
+ this.frames = this.loadingArray;
3415
+ switch (parseInt(selected)) {
3416
+ // 2x1
3417
+ case 1:
3418
+ this.framesPerRow = 2;
3419
+ this.numberOfRows = 1;
3420
+ break
3421
+ // 3x1
3422
+ case 2:
3423
+ this.framesPerRow = 3;
3424
+ this.numberOfRows = 1;
3425
+ break
3426
+ // 3x2
3427
+ case 3:
3428
+ this.framesPerRow = 3;
3429
+ this.numberOfRows = 2;
3430
+ break
3431
+ // 4x1
3432
+ case 4:
3433
+ this.framesPerRow = 4;
3434
+ this.numberOfRows = 1;
3435
+ break
3436
+ // 4x2
3437
+ case 5:
3438
+ this.framesPerRow = 4;
3439
+ this.numberOfRows = 2;
3440
+ break
3441
+ // 5x1
3442
+ case 6:
3443
+ this.framesPerRow = 5;
3444
+ this.numberOfRows = 1;
3445
+ break
3446
+ // 5x2
3447
+ case 7:
3448
+ this.framesPerRow = 5;
3449
+ this.numberOfRows = 2;
3450
+ break
3451
+ // 6x1
3452
+ case 8:
3453
+ this.framesPerRow = 6;
3454
+ this.numberOfRows = 1;
3455
+ break
3456
+ // 6x2
3457
+ case 9:
3458
+ this.framesPerRow = 6;
3459
+ this.numberOfRows = 2;
3460
+ break
3461
+ }
3462
+ await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow);
3463
+ this.getFramesArray();
3464
+ setTimeout(() => {
3465
+ for (let ref of this.$refs.frames) {
3466
+ ref?.resize(this.lastHeight);
3467
+ }
3468
+ }, 150);
3469
+ },
3470
+ getFramesArray() {
3471
+ this.frames = this.fInterface.getFrames(Positions.current);
3472
+ this.nextFrames = this.fInterface.getFrames(Positions.next);
3473
+ this.previousFrames = this.fInterface.getFrames(Positions.previous);
3474
+ },
3475
+ async createFramesInterface() {
3476
+ this.frames = this.loadingArray;
3477
+ let ch = this.channel;
3478
+ let associationTMP = {
3479
+ 1735073: 1,
3480
+ 1735074: 139,
3481
+ 1735075: 3,
3482
+ 1735076: 132,
3483
+ };
3484
+ //
3485
+ this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch;
3486
+
3487
+ const t = this.startAudienceTime.match(/.{1,2}/g);
3488
+ const d = this.getDateParts();
3489
+ const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3490
+ // * iniciar slider
3491
+ this.blockStartTime = time;
3492
+ this.fInterface = await new FramesInterface(
3493
+ this.channelCode,
3494
+ this.numberOfRows,
3495
+ this.framesPerRow,
3496
+ time,
3497
+ this.startAudienceTime,
3498
+ this.useCache
3499
+ );
3500
+ await this.fInterface.init();
3501
+
3502
+ this.getFramesArray();
3503
+
3504
+ this.activeFrame = this.getIndex(1, 0, Positions.current);
3505
+
3506
+ this.activeVideo = null;
3507
+ },
3508
+ getIndex(rowNumber, frameIndex, position) {
3509
+ let from = this.framesPerRow * this.numberOfRows * position;
3510
+ let till = this.framesPerRow * this.numberOfRows * (position + 1);
3511
+
3512
+ return (from + till * (rowNumber - 1)) / rowNumber + frameIndex
3513
+ },
3514
+ getAudienceTime(frameTime, rowNumber, frameNumber, position) {
3515
+ if (!frameTime) {
3516
+ return 'Loading...'
3517
+ } else if (
3518
+ this.getIndex(rowNumber, frameNumber, position) === this.activeVideo
3519
+ ) {
3520
+ return this.convertToAudienceTime(this.videoTime)
3521
+ } else {
3522
+ return this.convertToAudienceTime(frameTime)
3523
+ }
3524
+ },
3525
+ dateInUtc(miliSeconds) {
3526
+ var date = new Date(miliSeconds);
3527
+ var utc = new Date(
3528
+ date.getUTCFullYear(),
3529
+ date.getUTCMonth(),
3530
+ date.getUTCDate(),
3531
+ date.getUTCHours(),
3532
+ date.getUTCMinutes(),
3533
+ date.getUTCSeconds()
3534
+ );
3535
+ return utc
3536
+ },
3537
+ convertToAudienceTime(time, separator = ':') {
3538
+ const d = this.getDateParts();
3539
+ const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3540
+
3541
+ let hour = this.dateInUtc(time * 1000)
3542
+ .toTimeString()
3543
+ .split(' ')[0]
3544
+ .split(':')
3545
+ .map(Number);
3546
+
3547
+ if (time > limit && time <= limit + this.startAudienceSeconds) {
3548
+ hour[0] = 24 + hour[0];
3549
+ }
3550
+ return hour
3551
+ .map((part) => (part > 9 ? part.toString() : '0' + part))
3552
+ .join(separator)
3553
+ },
3554
+ getDateParts(date = this.date) {
3555
+ const d = new Date(date);
3556
+ return {
3557
+ year: d.getFullYear(),
3558
+ month: d.getMonth(),
3559
+ day: d.getDate(),
3560
+ }
3561
+ },
3562
+ selectFrame(index, frame) {
3563
+ const d = this.getDateParts();
3564
+ const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3565
+ const frameTime = frame?.time;
3566
+
3567
+ if (frameTime - (this.startAudienceSeconds + limit) <= 0) {
3568
+ if (this.hourIniSelected === true) {
3569
+ this.hourIniSelected = frameTime;
3570
+
3571
+ if (
3572
+ this.hourEndSelected &&
3573
+ this.hourIniSelected > this.hourEndSelected
3574
+ ) {
3575
+ this.hourEndSelected = false;
3576
+ }
3577
+ } else if (this.hourEndSelected === true) {
3578
+ if (frameTime > this.hourIniSelected) {
3579
+ this.hourEndSelected = frameTime;
3580
+ this.canInsertTime = true;
3581
+ } else {
3582
+ this.hourEndSelected = false;
3583
+ }
3584
+ }
3585
+ }
3586
+
3587
+ if (this.activeFrame !== index) {
3588
+ // ? Se clicar no frame diferente de onde está a dar play, faz pausa
3589
+ const array = this.$refs.frames.filter(
3590
+ (fc) => fc.videoStatus === fc.Status.playing
3591
+ );
3592
+ if (array.length === 1) {
3593
+ const frame = array[0];
3594
+ frame.playOrPause();
3595
+ }
3596
+ this.activeVideo = null;
3597
+ this.activeFrame = index;
3598
+ }
3599
+ },
3600
+ setHourIni() {
3601
+ this.canInsertTime = true;
3602
+ this.hourIniSelected = true;
3603
+ document.getElementById(`frame-${this.activeFrame}`).click();
3604
+ this.$emit('setHourIni', {
3605
+ hour_ini: this.hourIniSelected
3606
+ ? this.convertToAudienceTime(this.hourIniSelected, '')
3607
+ : null,
3608
+ });
3609
+ },
3610
+ setHourEnd() {
3611
+ this.canInsertTime = true;
3612
+ this.hourEndSelected = true;
3613
+ document.getElementById(`frame-${this.activeFrame}`).click();
3614
+ },
3615
+ //* Navegação
3616
+ arrowRight() {
3617
+ if (this.checkLimitRight(false)) {
3618
+ if (
3619
+ this.activeFrame ===
3620
+ this.numberOfRows * this.framesPerRow * 2 - 1
3621
+ ) {
3622
+ this.next();
3623
+ } else {
3624
+ this.activeFrame++;
3625
+ }
3626
+ }
3627
+ },
3628
+ arrowLeft() {
3629
+ if (this.checkLimitLeft(false)) {
3630
+ if (this.activeFrame === this.numberOfRows * this.framesPerRow) {
3631
+ this.prev();
3632
+ } else {
3633
+ this.activeFrame--;
3634
+ }
3635
+ }
3636
+ },
3637
+ checkLimitRight(value) {
3638
+ this.endAudienceTime.match(/.{1,2}/g);
3639
+ const d = this.getDateParts();
3640
+ const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59);
3641
+
3642
+ if (value) {
3643
+ return (
3644
+ high > (this.fInterface.getCurrentTime() - 1) * 1000 &&
3645
+ this.nextFrames[0].title !== -1
3646
+ )
3647
+ } else {
3648
+ // return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000
3649
+ return high > this.fInterface.getCurrentTime() * 1000
3650
+ }
3651
+ },
3652
+ checkLimitLeft(value) {
3653
+ const hours = this.startAudienceTime.match(/.{1,2}/g);
3654
+ const d = this.getDateParts();
3655
+ const low = Date.UTC(d.year, d.month, d.day, hours[0], hours[1], hours[2]);
3656
+
3657
+ if (value) {
3658
+ return low <= (this.fInterface.getCurrentTime() - 1) * 1000
3659
+ } else {
3660
+ return (
3661
+ low <
3662
+ (this.fInterface.getCurrentTime() +
3663
+ this.activeFrame -
3664
+ this.numberOfRows * this.framesPerRow) *
3665
+ 1000
3666
+ )
3667
+ }
3668
+ },
3669
+ async next() {
3670
+ if (this.checkLimitRight(true)) {
3671
+ const array = this.$refs.frames.filter(
3672
+ (fc) =>
3673
+ fc.videoStatus === fc.Status.playing ||
3674
+ fc.videoStatus === fc.Status.paused
3675
+ );
3676
+
3677
+ if (array.length === 1) {
3678
+ const frame = array[0];
3679
+ frame.stop(false);
3680
+ }
3681
+ this.fInterface.setCurrentStep(this.secondsPerFrame);
3682
+ await this.fInterface.loadNextFrames();
3683
+
3684
+ this.activeFrame = this.getIndex(1, 0, Positions.current);
3685
+ this.activeVideo = null;
3686
+
3687
+ this.getFramesArray();
3688
+ }
3689
+ },
3690
+ async prev() {
3691
+ if (this.checkLimitLeft(true)) {
3692
+ const array = this.$refs.frames.filter(
3693
+ (fc) =>
3694
+ fc.videoStatus === fc.Status.playing ||
3695
+ fc.videoStatus === fc.Status.paused
3696
+ );
3697
+ if (array.length === 1) {
3698
+ const frame = array[0];
3699
+ frame.stop(false);
3700
+ }
3701
+
3702
+ this.fInterface.setCurrentStep(this.secondsPerFrame);
3703
+ await this.fInterface.loadPrevFrames();
3704
+
3705
+ this.activeFrame = this.getIndex(
3706
+ this.numberOfRows,
3707
+ this.framesPerRow - 1,
3708
+ Positions.current
3709
+ );
3710
+ this.activeVideo = null;
3711
+
3712
+ this.getFramesArray();
3713
+ }
3714
+ },
3715
+ async setStartTime(time) {
3716
+ if (time.indexOf(':') !== -1) {
3717
+ time = time.replace(/:/g, '');
3718
+ }
3719
+ const t = time.match(/.{1,2}/g);
3720
+ const d = this.getDateParts();
3721
+ const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3722
+ this.frames = this.loadingArray;
3723
+
3724
+ await this.fInterface.changeTime(setTime);
3725
+
3726
+ this.getFramesArray();
3727
+
3728
+ this.activeFrame = this.getIndex(1, 0, Positions.current);
3729
+ // let frames = this.$refs.frames
3730
+
3731
+ // let audienceTime = null
3732
+ // if (frames.length > 0) {
3733
+ // let frame = frames[0].frame
3734
+ // audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)
3735
+ // }
3736
+
3737
+ this.activeVideo = null;
3738
+
3739
+ return true
3740
+ },
3741
+ hourToTimeStamp(time) {
3742
+ if (time.indexOf(':') !== -1) {
3743
+ time = time.replace(/:/g, '');
3744
+ }
3745
+ const t = time.match(/.{1,2}/g);
3746
+ const d = this.getDateParts();
3747
+ const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3748
+
3749
+ return setTime
3750
+ },
3751
+ async changeHour(value) {
3752
+ if (value) {
3753
+ setTimeout(() => {
3754
+ const array = this.$refs.frames.filter(
3755
+ (fc) =>
3756
+ fc.videoStatus === fc.Status.playing ||
3757
+ fc.videoStatus === fc.Status.paused
3758
+ );
3759
+
3760
+ if (array.length === 1) {
3761
+ const frame = array[0];
3762
+ frame.stop(false);
3763
+ }
3764
+
3765
+ this.setStartTime(value, true);
3766
+ }, 0);
3767
+ }
3768
+ },
3769
+ changeBlockInterval(value) {
3770
+ this.changeHour(value.ini);
3771
+ let time_ini, time_end;
3772
+ time_ini = this.hourToTimeStamp(value.ini);
3773
+ time_end = this.hourToTimeStamp(value.end);
3774
+ this.videoSliderTotalDuration = time_end - time_ini;
3775
+ this.$refs.frames[0].changeSettings(time_ini);
3776
+ this.blockStartTime = time_ini;
3777
+ },
3778
+ //eslint-disable-next-line
3779
+ async updateVideoTime(index, videoTime) {
3780
+ this.activeVideo = index;
3781
+ this.videoTime = videoTime;
3782
+ },
3783
+ //eslint-disable-next-line
3784
+ updateVideoStatus(currentTime) {
3785
+ if (!this.progressVideoDrag) ;
3786
+ },
3787
+ async startPlaying(frame, totalTime) {
3788
+ const array = this.$refs.frames.filter(
3789
+ (fc) => fc.frame.time !== frame.time
3790
+ );
3791
+
3792
+ for (let ref of array) {
3793
+ if (
3794
+ ref.videoStatus === ref.Status.playing ||
3795
+ ref.videoStatus === ref.Status.paused
3796
+ ) {
3797
+ ref.stop(false);
3798
+ }
3799
+ }
3800
+
3801
+ this.videoTotalTime = totalTime;
3802
+ this.videoPlaying = true;
3803
+ },
3804
+ stopPlaying() {
3805
+ this.videoTotalTime = null;
3806
+ this.videoPlaying = false;
3807
+ this.paused = false;
3808
+ },
3809
+ insertTime() {
3810
+ this.$emit('timeToInsert', {
3811
+ channel: this.channel,
3812
+ hour_ini: this.hourIniSelected
3813
+ ? this.convertToAudienceTime(this.hourIniSelected, '')
3814
+ : null,
3815
+ hour_end: this.hourEndSelected
3816
+ ? this.convertToAudienceTime(this.hourEndSelected, '')
3817
+ : null,
3818
+ force: false,
3819
+ });
3820
+
3821
+ if (this.jumpOnInsert) {
3822
+ this.changeHour(
3823
+ this.convertToAudienceTime(
3824
+ (this.hourEndSelected || this.hourIniSelected) + 1
3825
+ )
3826
+ );
3827
+ }
3828
+
3829
+ this.hourIniSelected = null;
3830
+ this.hourEndSelected = null;
3831
+ this.canInsertTime = false;
3832
+
3833
+ // this.fInterface.setCurrentPosition(this.hourEndSelected)
3834
+ },
3835
+ insertTimeForce() {
3836
+ this.$emit('timeToInsert', {
3837
+ channel: this.channel,
3838
+ hour_ini: this.hourIniSelected
3839
+ ? this.convertToAudienceTime(this.hourIniSelected, '')
3840
+ : null,
3841
+ hour_end: this.hourEndSelected
3842
+ ? this.convertToAudienceTime(this.hourEndSelected, '')
3843
+ : null,
3844
+ force: true,
3845
+ });
3846
+
3847
+ this.hourIniSelected = null;
3848
+ this.hourEndSelected = null;
3849
+ this.canInsertTime = false;
3850
+
3851
+ // this.fInterface.setCurrentPosition(this.hourEndSelected)
3852
+ },
3853
+ async getChannelMedia() {
3854
+ // this.media = (await ChannelService.show(this.channel)).data.MEDIA
3855
+ },
3856
+ async changeServerClick() {
3857
+ this.changeServer = !this.changeServer;
3858
+ // this.$store.dispatch(
3859
+ // 'serverOfFrames',
3860
+ // this.changeServer ? 'alternative' : 'default'
3861
+ // )
3862
+ sessionStorage.setItem(
3863
+ 'serverOfFrames',
3864
+ this.changeServer ? 'alternative' : 'default'
3865
+ );
3866
+
3867
+ // if (this.$route.params.time != this.frames[0].time)
3868
+ // this.$router.push({
3869
+ // name: 'grid',
3870
+ // params: {
3871
+ // date: this.date,
3872
+ // channel: this.channelCode,
3873
+ // time: this.frames[0].time,
3874
+ // },
3875
+ // })
3876
+ location.reload();
3877
+ },
3878
+ },
3879
+ computed: {
3880
+ active: {
3881
+ get() {
3882
+ return this.value
3883
+ },
3884
+ set(value) {
3885
+ this.$emit('input', value);
3886
+ },
3887
+ },
3888
+ settingsClosed() {
3889
+ return !Object.values(this.dialogs).find((v) => v)
3890
+ },
3891
+ startAudienceSeconds() {
3892
+ const t = this.startAudienceTime.match(/.{1,2}/g);
3893
+ return parseInt(t[0] * 3600 + t[1] * 60 + t[2])
3894
+ },
3895
+ loadingArray() {
3896
+ return Array.from(Array(this.numberOfRows * this.framesPerRow).keys())
3897
+ },
3898
+ serverOfFrames() {
3899
+ return sessionStorage.getItem('server')
3900
+ },
3901
+ },
3902
+ watch: {
3903
+ secondsPerFrame(value) {
3904
+ let frames = this.$refs.frames;
3905
+ let initialTime = null;
3906
+ let audienceTime = null;
3907
+ if (frames.length > 0) {
3908
+ let frame = frames[0].frame;
3909
+
3910
+ if (initialTime === null) {
3911
+ initialTime = frame.time;
3912
+ }
3913
+ if (value <= 5) {
3914
+ let newAudienceTime = initialTime + value;
3915
+ audienceTime = this.getAudienceTime(newAudienceTime, 0, 0, 0);
3916
+ this.changeHour(audienceTime);
3917
+ this.next();
3918
+ }
3919
+ }
3920
+ },
3921
+ framesFormat(value) {
3922
+ this.setFrameSelection(value);
3923
+ },
3924
+ active() {
3925
+ // ? sempre que trocamos de tabs dar reset as horas selected
3926
+ this.hourIniSelected = false;
3927
+ this.hourEndSelected = false;
3928
+ },
3929
+ useCache() {
3930
+ this.createFramesInterface();
3931
+ },
3932
+ hourIniSelected(value) {
3933
+ if (value) {
3934
+ sessionStorage.setItem(
3935
+ 'currentTimeFrames',
3936
+ this.convertToAudienceTime(this.hourIniSelected, '')
3937
+ );
3938
+ } else {
3939
+ sessionStorage.removeItem('currentTimeFrames');
3940
+ }
3941
+ },
3942
+ activeFrame(value) {
3943
+ if (value) {
3944
+ this.stopPlayingBar();
3945
+ }
3946
+ },
3947
+ channel() {
3948
+ this.updatingChannel = new Promise((resolve, reject) => {
3949
+ try {
3950
+ this.createFramesInterface();
3951
+ resolve(true);
3952
+ } catch (err) {
3953
+ reject(err);
3954
+ }
3955
+ });
3956
+ },
3957
+ },
3932
3958
  };
3933
3959
 
3934
3960
  /* script */
@@ -4479,11 +4505,11 @@ __vue_render__._withStripped = true;
4479
4505
  /* style */
4480
4506
  const __vue_inject_styles__ = function (inject) {
4481
4507
  if (!inject) return
4482
- inject("data-v-4a1abe45_0", { source: "\n.visualization-row[data-v-4a1abe45] {\n display: flex;\n flex-wrap: wrap;\n flex: 1 1 auto;\n}\n.visualization-col[data-v-4a1abe45] {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n padding: 12px;\n}\n.visualization-divider[data-v-4a1abe45] {\n display: block;\n flex: 1 1 100%;\n height: 0px;\n max-height: 0px;\n opacity: 1;\n transition: inherit;\n border-style: solid;\n border-width: thin 0 0 0;\n border-color: rgba(0, 0, 0, 0.12);\n margin: 0;\n}\n.visualization-divider.vertical[data-v-4a1abe45] {\n align-self: stretch;\n border-width: 0 thin 0 0;\n display: inline-flex;\n height: inherit;\n margin-left: -1px;\n max-height: 100%;\n max-width: 0px;\n vertical-align: text-bottom;\n width: 0px;\n}\n.visualization-card[data-v-4a1abe45] {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n padding: 12px;\n width: 100%;\n transition-property: box-shadow, opacity, -webkit-box-shadow;\n overflow-wrap: break-word;\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\n}\n.visualization-justify-center[data-v-4a1abe45],[data-v-4a1abe45] .visualization-justify-center {\n justify-content: center;\n}\n.visualization-align-center[data-v-4a1abe45] {\n align-items: center;\n}\n#visualization-container[data-v-4a1abe45] {\n max-width: 100% !important;\n margin: 0 auto !important;\n height: 100%;\n border-bottom: none;\n}\n#visualization-container > .card[data-v-4a1abe45] {\n border-radius: 0 !important;\n font-size: 12px;\n width: 100%;\n box-shadow: none;\n height: 100%;\n}\n#command-bar[data-v-4a1abe45],\n#info-bar[data-v-4a1abe45] {\n background-color: #f5f5f5;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#command-bar button[data-v-4a1abe45] {\n width: 42px;\n height: 36px;\n border: none;\n background: none;\n}\n#command-bar button[data-v-4a1abe45]:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.12);\n}\n#command-bar svg[data-v-4a1abe45] {\n font-size: 16px;\n}\n#command-bar[data-v-4a1abe45] {\n padding: 0 !important;\n}\n#info-bar[data-v-4a1abe45] {\n padding: 4px;\n font-size: 14px;\n position: relative;\n}\n.settings-container[data-v-4a1abe45] {\n position: absolute;\n right: 14px;\n top: 50%;\n transform: translateY(-50%);\n}\n.settings-container > *[data-v-4a1abe45] {\n margin: 0 2px;\n cursor: pointer;\n}\n#info-bar svg[data-v-4a1abe45] {\n font-size: 16px;\n}\n#info-bar .divider[data-v-4a1abe45] {\n margin: 0 8px;\n}\nsvg[data-v-4a1abe45]:focus {\n border: none;\n}\n.visualization-card[data-v-4a1abe45] {\n border-left: 8px solid #eee;\n}\n.active-tab[data-v-4a1abe45] {\n border-left: 8px solid var(--visualization-primary) !important;\n border-image-slice: 1;\n}\n[id^='frame-'][data-v-4a1abe45] {\n padding: 1px;\n display: flex;\n flex-flow: column;\n}\n.tooltip[data-v-4a1abe45] {\n display: block !important;\n z-index: 10000;\n}\n.tooltip .tooltip-inner[data-v-4a1abe45] {\n background: var(--visualization-primary);\n color: white;\n border-radius: 16px;\n padding: 5px 10px 4px;\n}\n.tooltip .tooltip-arrow[data-v-4a1abe45] {\n width: 0;\n height: 0;\n border-style: solid;\n position: absolute;\n margin: 5px;\n border-color: var(--visualization-primary);\n z-index: 1;\n}\n.tooltip[x-placement^='top'][data-v-4a1abe45] {\n margin-bottom: 5px;\n}\n.tooltip[x-placement^='top'] .tooltip-arrow[data-v-4a1abe45] {\n border-width: 5px 5px 0 5px;\n border-left-color: transparent !important;\n border-right-color: transparent !important;\n border-bottom-color: transparent !important;\n bottom: -5px;\n left: calc(50% - 5px);\n margin-top: 0;\n margin-bottom: 0;\n}\n.tooltip[x-placement^='bottom'][data-v-4a1abe45] {\n margin-top: 5px;\n}\n.tooltip[x-placement^='bottom'] .tooltip-arrow[data-v-4a1abe45] {\n border-width: 0 5px 5px 5px;\n border-left-color: transparent !important;\n border-right-color: transparent !important;\n border-top-color: transparent !important;\n top: -5px;\n left: calc(50% - 5px);\n margin-top: 0;\n margin-bottom: 0;\n}\n.tooltip[x-placement^='right'][data-v-4a1abe45] {\n margin-left: 5px;\n}\n.tooltip[x-placement^='right'] .tooltip-arrow[data-v-4a1abe45] {\n border-width: 5px 5px 5px 0;\n border-left-color: transparent !important;\n border-top-color: transparent !important;\n border-bottom-color: transparent !important;\n left: -5px;\n top: calc(50% - 5px);\n margin-left: 0;\n margin-right: 0;\n}\n.tooltip[x-placement^='left'][data-v-4a1abe45] {\n margin-right: 5px;\n}\n.tooltip[x-placement^='left'] .tooltip-arrow[data-v-4a1abe45] {\n border-width: 5px 0 5px 5px;\n border-top-color: transparent !important;\n border-right-color: transparent !important;\n border-bottom-color: transparent !important;\n right: -5px;\n top: calc(50% - 5px);\n margin-left: 0;\n margin-right: 0;\n}\n.tooltip.popover .popover-inner[data-v-4a1abe45] {\n background: #f9f9f9;\n color: black;\n padding: 24px;\n border-radius: 5px;\n box-shadow: 0 5px 30px rgba(black, 0.1);\n}\n.tooltip.popover .popover-arrow[data-v-4a1abe45] {\n border-color: #f9f9f9;\n}\n.tooltip[aria-hidden='true'][data-v-4a1abe45] {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.15s, visibility 0.15s;\n}\n.tooltip[aria-hidden='false'][data-v-4a1abe45] {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.15s;\n}\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\Visualization.vue"],"names":[],"mappings":";AAgnCA;EACA,aAAA;EACA,eAAA;EACA,cAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;AACA;AAEA;EACA,cAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;EACA,UAAA;EACA,mBAAA;EACA,mBAAA;EACA,wBAAA;EACA,iCAAA;EACA,SAAA;AACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,2BAAA;EACA,UAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,WAAA;EACA,4DAAA;EACA,yBAAA;EACA;qCACA;AACA;AAEA;EACA,uBAAA;AACA;AAEA;EACA,mBAAA;AACA;AAEA;EACA,0BAAA;EACA,yBAAA;EACA,YAAA;EACA,mBAAA;AACA;AACA;EACA,2BAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;EACA,YAAA;AACA;AAEA;;EAEA,yBAAA;EACA;mCACA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;EACA,+BAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,eAAA;EACA,kBAAA;AACA;AAEA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;AACA;AAEA;EACA,aAAA;EACA,eAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,aAAA;AACA;AAEA;EACA,YAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,8DAAA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;AACA;AAEA;EACA,yBAAA;EACA,cAAA;AACA;AAEA;EACA,wCAAA;EACA,YAAA;EACA,mBAAA;EACA,qBAAA;AACA;AAEA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,0CAAA;EACA,UAAA;AACA;AAEA;EACA,kBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,2CAAA;EACA,YAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,wCAAA;EACA,SAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,gBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,wCAAA;EACA,2CAAA;EACA,UAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,iBAAA;AACA;AAEA;EACA,2BAAA;EACA,wCAAA;EACA,0CAAA;EACA,2CAAA;EACA,WAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,uCAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,kBAAA;EACA,UAAA;EACA,2CAAA;AACA;AAEA;EACA,mBAAA;EACA,UAAA;EACA,yBAAA;AACA","file":"Visualization.vue","sourcesContent":["<template>\n <div\n class=\"visualization-row\"\n id=\"visualization-container\"\n @click=\"framesClicked\"\n >\n <GlobalEvents\n v-if=\"active && canInsertTime && settingsClosed\"\n @keydown.45=\"insertTime\"\n @keydown.46=\"insertTime\"\n />\n <GlobalEvents\n v-if=\"active && settingsClosed\"\n @keydown.left.prevent=\"arrowLeft\"\n @keydown.right.prevent=\"arrowRight\"\n @keydown.shift.page-down.prevent=\"nextLoopActivate\"\n @keydown.page-down.prevent=\"next\"\n @keydown.page-up.prevent=\"prev\"\n @keydown.shift.page-up.prevent=\"prevLoopActivate\"\n @keydown.83.prevent=\"setHourIni\"\n @keydown.69.prevent=\"setHourEnd\"\n @keydown.36.prevent=\"goToFirstFrame\"\n @keydown.35.prevent=\"goToLastFrame\"\n @keydown.71.prevent=\"dialogs.goTo = true\"\n @keydown.73.prevent=\"dialogs.secondsPerFrame = true\"\n @keydown.76.prevent=\"dialogs.frames = true\"\n @keydown.49.97=\"() => (secondsPerFrame = 1)\"\n @keydown.50.98=\"() => (secondsPerFrame = 2)\"\n @keydown.51.99=\"() => (secondsPerFrame = 3)\"\n @keydown.52.100=\"() => (secondsPerFrame = 4)\"\n @keydown.53.101=\"() => (secondsPerFrame = 5)\"\n />\n <GlobalEvents\n v-if=\"prevLoop || nextLoop\"\n @keydown=\"breakLoop\"\n v-on:click=\"breakLoop\"\n />\n <settings\n v-if=\"active\"\n :dialogs-visibility=\"dialogs\"\n :playback-rate=\"playbackRate\"\n :seconds-per-frame=\"secondsPerFrame\"\n :frames-per-row=\"framesPerRow\"\n :number-of-rows=\"numberOfRows\"\n @change-playback-rate=\"(value) => (playbackRate = value)\"\n @change-go-to=\"changeHour\"\n @change-seconds-per-frame=\"(value) => (secondsPerFrame = value)\"\n @set-frames-selection=\"setFrameSelection\"\n @close=\"(dialog) => (dialogs[dialog] = false)\"\n />\n <div\n :class=\"{ 'visualization-card': true, 'active-tab': active }\"\n style=\"width: 100%; padding: 0\"\n >\n <command-bar\n v-show=\"commandBarShow\"\n :video-playing=\"videoPlaying\"\n :video-paused=\"paused\"\n :insert-time=\"canInsertTime\"\n :hour-ini-selected=\"!!hourIniSelected\"\n :hour-end-selected=\"!!hourEndSelected\"\n @prev-loop-activate=\"prevLoopActivate\"\n @next-loop-activate=\"nextLoopActivate\"\n @prev=\"prev\"\n @next=\"next\"\n @go-to=\"dialogs.goTo = true\"\n @open-frame-selection=\"dialogs.frames = true\"\n @open-frames-per-second=\"dialogs.secondsPerFrame = true\"\n @open-blocks=\"openBlocks\"\n @open-playback-rate=\"dialogs.playbackRate = true\"\n @play-or-pause=\"playOrPause\"\n @stop-playing=\"stopPlayingBar\"\n @set-hour-ini=\"setHourIni\"\n @set-hour-end=\"setHourEnd\"\n @insert-time=\"insertTime\"\n />\n <video-progress\n v-if=\"videoProgressBar\"\n v-show=\"videoPlaying\"\n :video-time=\"videoTime\"\n />\n <info-bar\n :playback-rate=\"playbackRate\"\n :seconds-per-frame=\"secondsPerFrame\"\n :commands-show=\"commandBarShow\"\n :cache=\"useCache\"\n :block-start-time=\"blockStartTime\"\n :video-total-duration=\"videoSliderTotalDuration\"\n :alternative-server=\"alternativeServer\"\n :frames-per-row=\"framesPerRow\"\n :number-of-rows=\"numberOfRows\"\n :hour-ini=\"hourIniSelected\"\n :hour-end=\"hourEndSelected\"\n @toogle-commands-visibility=\"commandBarShow = !commandBarShow\"\n @toogle-cache=\"useCache = !useCache\"\n @change-server=\"changeServerClick\"\n />\n <div\n class=\"visualization-row\"\n v-for=\"rowNumber in numberOfRows\"\n :id=\"'row-' + rowNumber\"\n :key=\"'row-' + rowNumber\"\n style=\"padding: 12px\"\n >\n <div\n v-for=\"(frame, frameNumber) in previousFrames\"\n :key=\"\n numberOfRows +\n '-' +\n framesPerRow +\n '-' +\n getIndex(rowNumber, frameNumber, Positions.previous)\n \"\n style=\"display: none\"\n >\n <span v-html=\"frame.img\" />\n </div>\n <div\n v-for=\"(frame, frameNumber) in nextFrames\"\n :key=\"\n numberOfRows +\n '-' +\n framesPerRow +\n '-' +\n getIndex(rowNumber, frameNumber, Positions.next)\n \"\n style=\"display: none\"\n >\n <span v-html=\"frame.img\" />\n </div>\n <div\n class=\"visualization-col\"\n v-for=\"(frame, frameNumber) in frames.slice(\n framesPerRow * (rowNumber - 1),\n framesPerRow * rowNumber\n )\"\n :key=\"'row-' + rowNumber + '-frame-' + frameNumber\"\n :id=\"`frame-${getIndex(rowNumber, frameNumber, Positions.current)}`\"\n :class=\"{ loaderImg: !!frame.img }\"\n @click=\"\n frame.time\n ? selectFrame(\n getIndex(rowNumber, frameNumber, Positions.current),\n frame\n )\n : null\n \"\n >\n <span :id=\"activeFrame ? 'aa' : 0\" style=\"padding-left: 4px\">\n <b>\n {{\n getAudienceTime(\n frame.time,\n rowNumber,\n frameNumber,\n Positions.current\n )\n }}\n </b>\n </span>\n\n <frame\n ref=\"frames\"\n :frame=\"frame\"\n :index=\"getIndex(rowNumber, frameNumber, Positions.current)\"\n :grid-settings=\"{ numberOfRows, framesPerRow }\"\n :initialTime=\"frame.time === hourIniSelected\"\n :endTime=\"frame.time === hourEndSelected\"\n :betweenTime=\"\n frame.time > hourIniSelected && frame.time < hourEndSelected\n \"\n :active=\"\n getIndex(rowNumber, frameNumber, Positions.current) ===\n activeFrame\n \"\n :activeTab=\"active\"\n :videoUrl=\"fInterface ? fInterface.getVideoUrl(frame) : ''\"\n @startPlaying=\"startPlaying\"\n @stopPlaying=\"stopPlaying\"\n @playPauseStatus=\"changePlayPause\"\n @updateSlider=\"updateSlider\"\n :playback-rate=\"playbackRate\"\n style=\"margin: 0 auto\"\n ></frame>\n </div>\n </div>\n </div>\n <!-- <settings\n ref=\"settings2\"\n :active=\"active\"\n @goToTime=\"changeHour\"\n @goToBlockInterval=\"changeBlockInterval\"\n @setSplitTime=\"setSplitTime\"\n @setFrameSelection=\"setFrameSelection\"\n @setPlaybackRate=\"\n (rate) => {\n playbackRate = rate\n }\n \"\n >\n </settings> -->\n <!-- <v-dialog v-model=\"dialog\" width=\"500\">\n <div class=\"card\">\n <div class=\"card\"-title class=\"text-h5 grey lighten-2\">\n {{ ' Último bloco disponível até: ' }}\n <v-btn\n @click=\"goToStartBlock\"\n class=\"ml-2\"\n dark\n color=\"success\"\n depressed\n >\n <v-icon left> fa-clock </v-icon>\n {{ timeLastBlock }}\n </v-btn>\n <v-spacer></v-spacer>\n <v-btn color=\"error\" fab small class=\"ml-5\" @click=\"dialog = false\">\n <v-icon dark> fa fa-xmark </v-icon>\n </v-btn>\n </div-title>\n </div>\n </v-dialog>\n <Help :media=\"media\" @close=\"media = null\" />\n <v-dialog\n v-if=\"userMultiTabsGrid\"\n v-model=\"userMultiTabsGridsModel\"\n persistent\n width=\"60%\"\n >\n <div class=\"card\">\n <div class=\"card\"-title class=\"warning text-h5\" primary-title>\n <div class=\"row\" class=\"ma-0\" justify=\"center\" align=\"center\">\n <v-icon dark left style=\"font-size: 24px !important\">\n fa fa-exclamation-triangle\n </v-icon>\n <div style=\"color: white\">{{ $t('form.alert') }}</div>\n </div>\n </div-title>\n <div class=\"card\"-text class=\"justify-center pa-6 grey lighten-2\">\n <h3>\n {{ $t('alerts.userMultiTabsGrid') }}\n </h3>\n </div-text>\n <hr class=\"divider\" class=\"grey lighten-1\"></span>\n <div class=\"card\"-actions class=\"grey lighten-2 justify-center\">\n <v-btn color=\"error\" ml-5 @click=\"userMultiTabsGrid = false\">\n <v-icon left color=\"white\">fa fa-times</v-icon>\n {{ $t('form.close') }}\n </v-btn>\n </div-actions>\n </div>\n </v-dialog> -->\n </div>\n</template>\n<script>\nimport Frame from './components/Frame.vue'\nimport FramesInterface from './utils/FramesInterface.js'\nimport FramesService from './services/FramesService.js'\n\nimport Commands from './components/Commands.vue'\nimport Infos from './components/Infos.vue'\nimport VideoProgress from './components/VideoProgress.vue'\nimport Settings from './components/Settings.vue'\n\nconst Positions = Object.freeze({\n previous: 0,\n current: 1,\n next: 2,\n})\n\nexport default {\n name: 'visualization-container',\n props: {\n value: {\n type: Boolean,\n required: true,\n },\n date: {\n type: String,\n required: true,\n },\n channel: {\n type: Number,\n required: true,\n },\n startAudienceTime: {\n type: String,\n required: true,\n },\n endAudienceTime: {\n type: String,\n required: true,\n },\n videoProgressBar: {\n type: Boolean,\n default: false,\n },\n jumpOnInsert: {\n type: Boolean,\n default: false,\n },\n framesFormat: {\n type: [Number, String],\n default: 6,\n },\n maxSize: {\n type: Number,\n }\n },\n components: {\n Frame,\n CommandBar: Commands,\n InfoBar: Infos,\n VideoProgress,\n Settings,\n // Help,\n },\n data() {\n return {\n Positions,\n updatingChannel: null,\n dialog: false,\n timeLastBlock: null,\n alternativeServer: false,\n useCache: true,\n numberOfRows: 1,\n framesPerRow: 5,\n secondsPerFrame: 1,\n fInterface: null,\n velocity: 1,\n frames: [],\n previousFrames: [],\n nextFrames: [],\n channelCode: 0,\n videoPlaying: false,\n activeFrame: null,\n activeVideo: null,\n videoTime: 0,\n videoTotalTime: null,\n progressVideoDrag: false,\n hourIniSelected: false,\n hourEndSelected: false,\n canInsertTime: false,\n lastHeight: 0,\n loopInterval: null,\n nextLoop: false,\n prevLoop: false,\n videoSliderTotalDuration: 900,\n blockStartTime: null,\n media: null,\n changeServer: false,\n userMultiTabsGrid: false,\n userMultiTabsGridsModel: true,\n playbackRate: 1,\n paused: false,\n commandBarShow: true,\n dialogs: {\n playbackRate: false,\n goTo: false,\n secondsPerFrame: false,\n frames: false,\n },\n }\n },\n async created() {\n this.changeServer = this.serverOfFrames === 'alternative'\n this.alternativeServer = this.serverOfFrames === 'alternative'\n\n const settings = [\n {\n framesPerRow: 2,\n numberOfRows: 1,\n },\n {\n framesPerRow: 3,\n numberOfRows: 1,\n },\n {\n framesPerRow: 3,\n numberOfRows: 2,\n },\n {\n framesPerRow: 4,\n numberOfRows: 1,\n },\n {\n framesPerRow: 4,\n numberOfRows: 2,\n },\n {\n framesPerRow: 5,\n numberOfRows: 1,\n },\n {\n framesPerRow: 5,\n numberOfRows: 2,\n },\n {\n framesPerRow: 6,\n numberOfRows: 1,\n },\n {\n framesPerRow: 6,\n numberOfRows: 2,\n },\n ]\n\n const storedOnDb = settings[parseInt(this.framesFormat) - 1]\n this.framesPerRow = storedOnDb.framesPerRow\n this.numberOfRows = storedOnDb.numberOfRows\n\n await this.createFramesInterface()\n if (this.maxSize) {\n this.resize(this.maxSize, true)\n }\n },\n methods: {\n framesClicked(e) {\n if (e.target.id != 'insert') {\n this.active = true\n }\n },\n async goToStartBlock() {\n try {\n const d = new Date()\n let timestamp = Date.UTC(\n d.getFullYear(),\n d.getMonth(),\n d.getDate(),\n d.getHours(),\n d.getMinutes(),\n d.getSeconds()\n )\n\n const response = (\n await FramesService.getNextAvailableBlock({\n channel: this.channel,\n time: timestamp / 1000,\n })\n ).data\n\n this.dialog = false\n this.changeHour(this.convertToAudienceTime(response.data.start, ':'))\n } catch (err) {\n console.error(err)\n }\n },\n async checkAvailableBlock() {\n try {\n const d = new Date()\n let timestamp = Date.UTC(\n d.getFullYear(),\n d.getMonth(),\n d.getDate(),\n d.getHours(),\n d.getMinutes(),\n d.getSeconds()\n )\n\n const response = (\n await FramesService.getNextAvailableBlock({\n channel: this.channel,\n time: timestamp / 1000,\n })\n ).data\n\n this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':')\n this.dialog = true\n if (!response.status) {\n this.timeLastBlock = 'N/D'\n }\n } catch (err) {\n console.error(err)\n }\n },\n updateSlider(videoStartTime, time) {\n // * atualizar slider se estiver fora do range definido previamente\n if (\n time < this.blockStartTime ||\n time > this.blockStartTime ||\n videoStartTime > this.blockStartTime + this.videoSliderTotalDuration\n ) {\n this.blockStartTime = videoStartTime\n this.videoSliderTotalDuration = 900\n }\n },\n nextLoopActivate() {\n this.breakLoop()\n this.loopInterval = setInterval(this.next, 40)\n setTimeout(() => {\n this.nextLoop = true\n }, 0)\n },\n prevLoopActivate() {\n this.breakLoop()\n this.loopInterval = setInterval(this.prev, 40)\n setTimeout(() => {\n this.prevLoop = true\n }, 0)\n },\n breakLoop() {\n clearInterval(this.loopInterval)\n this.loopInterval = null\n this.nextLoop = false\n this.prevLoop = false\n },\n changePlayPause(status) {\n this.paused = !status\n },\n resize(height=this.lastHeight) {\n this.lastHeight = height\n if (this.$refs.frames) {\n for (let frame of this.$refs.frames) {\n frame.resize(height)\n }\n }\n this.$emit('resized')\n },\n async goToFirstFrame() {\n let frames = this.$refs.frames\n\n let audienceTime = null\n if (frames.length > 0) {\n let frame = frames[0].frame\n audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\n }\n // if (audienceTime) {\n // this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))\n // }\n if (audienceTime) {\n const [hours, minutes, seconds] = audienceTime.split(':')\n const totalSeconds =\n parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds)\n if (totalSeconds >= 9000)\n this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))\n else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true))\n }\n },\n async goToLastFrame() {\n let frames = this.$refs.frames\n let audienceTime = null\n if (frames.length > 0) {\n let frame = frames[0].frame\n\n audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\n }\n if (audienceTime) {\n this.changeHour(this.getLastFirtsBlockTime(audienceTime))\n }\n },\n getLastFirtsBlockTime(time, first = false) {\n if (time.indexOf(':') !== -1) {\n time = time.replace(/:/g, '')\n }\n let h, m, newTime\n const t = time.match(/.{1,2}/g)\n if (t[0] && t[1]) {\n h = parseInt(t[0])\n m = parseInt(t[1])\n }\n if (h < 26) {\n if (m < 15)\n if (first) newTime = t[0] + ':00:00'\n else newTime = t[0] + ':14:59'\n else if (m < 30)\n if (first) newTime = t[0] + ':15:00'\n else newTime = t[0] + ':29:59'\n else if (m < 45)\n if (first) newTime = t[0] + ':30:00'\n else newTime = t[0] + ':44:59'\n else if (first) newTime = t[0] + ':45:00'\n else newTime = t[0] + ':59:59'\n } else {\n if (m < 15)\n if (first) newTime = '26:00:00'\n else newTime = '26:14:59'\n else {\n if (first) newTime = '26:15:00'\n else newTime = '26:29:59'\n }\n }\n return newTime\n },\n openBlocks() {\n this.$refs.settings2?.openBlocks()\n },\n playOrPause() {\n const array = this.$refs.frames.filter((fc) => !!fc.active)\n if (array.length === 1) {\n const frame = array[0]\n frame.playOrPause(this.playbackRate)\n }\n },\n stopPlayingBar() {\n for (let ref of this.$refs.frames) {\n if (\n ref.videoStatus === ref.Status.playing ||\n ref.videoStatus === ref.Status.paused\n ) {\n ref.stop(false)\n }\n }\n },\n async setFrameSelection(selected) {\n this.frames = this.loadingArray\n switch (parseInt(selected)) {\n // 2x1\n case 1:\n this.framesPerRow = 2\n this.numberOfRows = 1\n break\n // 3x1\n case 2:\n this.framesPerRow = 3\n this.numberOfRows = 1\n break\n // 3x2\n case 3:\n this.framesPerRow = 3\n this.numberOfRows = 2\n break\n // 4x1\n case 4:\n this.framesPerRow = 4\n this.numberOfRows = 1\n break\n // 4x2\n case 5:\n this.framesPerRow = 4\n this.numberOfRows = 2\n break\n // 5x1\n case 6:\n this.framesPerRow = 5\n this.numberOfRows = 1\n break\n // 5x2\n case 7:\n this.framesPerRow = 5\n this.numberOfRows = 2\n break\n // 6x1\n case 8:\n this.framesPerRow = 6\n this.numberOfRows = 1\n break\n // 6x2\n case 9:\n this.framesPerRow = 6\n this.numberOfRows = 2\n break\n }\n await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow)\n this.getFramesArray()\n setTimeout(() => {\n for (let ref of this.$refs.frames) {\n ref?.resize(this.lastHeight)\n }\n }, 150)\n },\n getFramesArray() {\n this.frames = this.fInterface.getFrames(Positions.current)\n this.nextFrames = this.fInterface.getFrames(Positions.next)\n this.previousFrames = this.fInterface.getFrames(Positions.previous)\n },\n async createFramesInterface() {\n this.frames = this.loadingArray\n let ch = this.channel\n let associationTMP = {\n 1735073: 1,\n 1735074: 139,\n 1735075: 3,\n 1735076: 132,\n }\n //\n this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch\n\n const t = this.startAudienceTime.match(/.{1,2}/g)\n const d = this.getDateParts()\n const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\n // * iniciar slider\n this.blockStartTime = time\n this.fInterface = await new FramesInterface(\n this.channelCode,\n this.numberOfRows,\n this.framesPerRow,\n time,\n this.startAudienceTime,\n this.useCache\n )\n await this.fInterface.init()\n\n this.getFramesArray()\n\n this.activeFrame = this.getIndex(1, 0, Positions.current)\n\n this.activeVideo = null\n },\n getIndex(rowNumber, frameIndex, position) {\n let from = this.framesPerRow * this.numberOfRows * position\n let till = this.framesPerRow * this.numberOfRows * (position + 1)\n\n return (from + till * (rowNumber - 1)) / rowNumber + frameIndex\n },\n getAudienceTime(frameTime, rowNumber, frameNumber, position) {\n if (!frameTime) {\n return 'Loading...'\n } else if (\n this.getIndex(rowNumber, frameNumber, position) === this.activeVideo\n ) {\n return this.convertToAudienceTime(this.videoTime)\n } else {\n return this.convertToAudienceTime(frameTime)\n }\n },\n dateInUtc(miliSeconds) {\n var date = new Date(miliSeconds)\n var utc = new Date(\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds()\n )\n return utc\n },\n convertToAudienceTime(time, separator = ':') {\n const d = this.getDateParts()\n const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000\n\n let hour = this.dateInUtc(time * 1000)\n .toTimeString()\n .split(' ')[0]\n .split(':')\n .map(Number)\n\n if (time > limit && time <= limit + this.startAudienceSeconds) {\n hour[0] = 24 + hour[0]\n }\n return hour\n .map((part) => (part > 9 ? part.toString() : '0' + part))\n .join(separator)\n },\n getDateParts(date = this.date) {\n const d = new Date(date)\n return {\n year: d.getFullYear(),\n month: d.getMonth(),\n day: d.getDate(),\n }\n },\n selectFrame(index, frame) {\n const d = this.getDateParts()\n const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000\n const frameTime = frame?.time\n\n if (frameTime - (this.startAudienceSeconds + limit) <= 0) {\n if (this.hourIniSelected === true) {\n this.hourIniSelected = frameTime\n\n if (\n this.hourEndSelected &&\n this.hourIniSelected > this.hourEndSelected\n ) {\n this.hourEndSelected = false\n }\n } else if (this.hourEndSelected === true) {\n if (frameTime > this.hourIniSelected) {\n this.hourEndSelected = frameTime\n this.canInsertTime = true\n } else {\n this.hourEndSelected = false\n }\n }\n }\n\n if (this.activeFrame !== index) {\n // ? Se clicar no frame diferente de onde está a dar play, faz pausa\n const array = this.$refs.frames.filter(\n (fc) => fc.videoStatus === fc.Status.playing\n )\n if (array.length === 1) {\n const frame = array[0]\n frame.playOrPause()\n }\n this.activeVideo = null\n this.activeFrame = index\n }\n },\n setHourIni() {\n this.canInsertTime = true\n this.hourIniSelected = true\n document.getElementById(`frame-${this.activeFrame}`).click()\n this.$emit('setHourIni', {\n hour_ini: this.hourIniSelected\n ? this.convertToAudienceTime(this.hourIniSelected, '')\n : null,\n })\n },\n setHourEnd() {\n this.canInsertTime = true\n this.hourEndSelected = true\n document.getElementById(`frame-${this.activeFrame}`).click()\n },\n //* Navegação\n arrowRight() {\n if (this.checkLimitRight(false)) {\n if (\n this.activeFrame ===\n this.numberOfRows * this.framesPerRow * 2 - 1\n ) {\n this.next()\n } else {\n this.activeFrame++\n }\n }\n },\n arrowLeft() {\n if (this.checkLimitLeft(false)) {\n if (this.activeFrame === this.numberOfRows * this.framesPerRow) {\n this.prev()\n } else {\n this.activeFrame--\n }\n }\n },\n checkLimitRight(value) {\n const hours = this.endAudienceTime.match(/.{1,2}/g)\n const d = this.getDateParts()\n const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59)\n\n if (value) {\n return (\n high > (this.fInterface.getCurrentTime() - 1) * 1000 &&\n this.nextFrames[0].title !== -1\n )\n } else {\n // return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000\n return high > this.fInterface.getCurrentTime() * 1000\n }\n },\n checkLimitLeft(value) {\n const hours = this.startAudienceTime.match(/.{1,2}/g)\n const d = this.getDateParts()\n const low = Date.UTC(d.year, d.month, d.day, hours[0], hours[1], hours[2])\n\n if (value) {\n return low <= (this.fInterface.getCurrentTime() - 1) * 1000\n } else {\n return (\n low <\n (this.fInterface.getCurrentTime() +\n this.activeFrame -\n this.numberOfRows * this.framesPerRow) *\n 1000\n )\n }\n },\n async next() {\n if (this.checkLimitRight(true)) {\n const array = this.$refs.frames.filter(\n (fc) =>\n fc.videoStatus === fc.Status.playing ||\n fc.videoStatus === fc.Status.paused\n )\n\n if (array.length === 1) {\n const frame = array[0]\n frame.stop(false)\n }\n this.fInterface.setCurrentStep(this.secondsPerFrame)\n await this.fInterface.loadNextFrames()\n\n this.activeFrame = this.getIndex(1, 0, Positions.current)\n this.activeVideo = null\n\n this.getFramesArray()\n }\n },\n async prev() {\n if (this.checkLimitLeft(true)) {\n const array = this.$refs.frames.filter(\n (fc) =>\n fc.videoStatus === fc.Status.playing ||\n fc.videoStatus === fc.Status.paused\n )\n if (array.length === 1) {\n const frame = array[0]\n frame.stop(false)\n }\n\n this.fInterface.setCurrentStep(this.secondsPerFrame)\n await this.fInterface.loadPrevFrames()\n\n this.activeFrame = this.getIndex(\n this.numberOfRows,\n this.framesPerRow - 1,\n Positions.current\n )\n this.activeVideo = null\n\n this.getFramesArray()\n }\n },\n async setStartTime(time) {\n if (time.indexOf(':') !== -1) {\n time = time.replace(/:/g, '')\n }\n const t = time.match(/.{1,2}/g)\n const d = this.getDateParts()\n const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\n this.frames = this.loadingArray\n\n await this.fInterface.changeTime(setTime)\n\n this.getFramesArray()\n\n this.activeFrame = this.getIndex(1, 0, Positions.current)\n // let frames = this.$refs.frames\n\n // let audienceTime = null\n // if (frames.length > 0) {\n // let frame = frames[0].frame\n // audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\n // }\n\n this.activeVideo = null\n\n return true\n },\n hourToTimeStamp(time) {\n if (time.indexOf(':') !== -1) {\n time = time.replace(/:/g, '')\n }\n const t = time.match(/.{1,2}/g)\n const d = this.getDateParts()\n const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\n\n return setTime\n },\n async changeHour(value) {\n if (value) {\n setTimeout(() => {\n const array = this.$refs.frames.filter(\n (fc) =>\n fc.videoStatus === fc.Status.playing ||\n fc.videoStatus === fc.Status.paused\n )\n\n if (array.length === 1) {\n const frame = array[0]\n frame.stop(false)\n }\n\n this.setStartTime(value, true)\n }, 0)\n }\n },\n changeBlockInterval(value) {\n this.changeHour(value.ini)\n let time_ini, time_end\n time_ini = this.hourToTimeStamp(value.ini)\n time_end = this.hourToTimeStamp(value.end)\n this.videoSliderTotalDuration = time_end - time_ini\n this.$refs.frames[0].changeSettings(time_ini)\n this.blockStartTime = time_ini\n },\n //eslint-disable-next-line\n async updateVideoTime(index, videoTime) {\n this.activeVideo = index\n this.videoTime = videoTime\n },\n //eslint-disable-next-line\n updateVideoStatus(currentTime) {\n if (!this.progressVideoDrag) {\n // ESTA FUNÇÃO PASSOU PARA DENTRO DOS COMMANDS\n // this.updateProgress(null, currentTime)\n }\n },\n async startPlaying(frame, totalTime) {\n const array = this.$refs.frames.filter(\n (fc) => fc.frame.time !== frame.time\n )\n\n for (let ref of array) {\n if (\n ref.videoStatus === ref.Status.playing ||\n ref.videoStatus === ref.Status.paused\n ) {\n ref.stop(false)\n }\n }\n\n this.videoTotalTime = totalTime\n this.videoPlaying = true\n },\n stopPlaying() {\n this.videoTotalTime = null\n this.videoPlaying = false\n this.paused = false\n },\n insertTime() {\n this.$emit('timeToInsert', {\n channel: this.channel,\n hour_ini: this.hourIniSelected\n ? this.convertToAudienceTime(this.hourIniSelected, '')\n : null,\n hour_end: this.hourEndSelected\n ? this.convertToAudienceTime(this.hourEndSelected, '')\n : null,\n force: false,\n })\n\n if (this.jumpOnInsert) {\n this.changeHour(\n this.convertToAudienceTime(\n (this.hourEndSelected || this.hourIniSelected) + 1\n )\n )\n }\n\n this.hourIniSelected = null\n this.hourEndSelected = null\n this.canInsertTime = false\n\n // this.fInterface.setCurrentPosition(this.hourEndSelected)\n },\n insertTimeForce() {\n this.$emit('timeToInsert', {\n channel: this.channel,\n hour_ini: this.hourIniSelected\n ? this.convertToAudienceTime(this.hourIniSelected, '')\n : null,\n hour_end: this.hourEndSelected\n ? this.convertToAudienceTime(this.hourEndSelected, '')\n : null,\n force: true,\n })\n\n this.hourIniSelected = null\n this.hourEndSelected = null\n this.canInsertTime = false\n\n // this.fInterface.setCurrentPosition(this.hourEndSelected)\n },\n async getChannelMedia() {\n // this.media = (await ChannelService.show(this.channel)).data.MEDIA\n },\n async changeServerClick() {\n this.changeServer = !this.changeServer\n // this.$store.dispatch(\n // 'serverOfFrames',\n // this.changeServer ? 'alternative' : 'default'\n // )\n sessionStorage.setItem(\n 'serverOfFrames',\n this.changeServer ? 'alternative' : 'default'\n )\n\n // if (this.$route.params.time != this.frames[0].time)\n // this.$router.push({\n // name: 'grid',\n // params: {\n // date: this.date,\n // channel: this.channelCode,\n // time: this.frames[0].time,\n // },\n // })\n location.reload()\n },\n },\n computed: {\n active: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value)\n },\n },\n settingsClosed() {\n return !Object.values(this.dialogs).find((v) => v)\n },\n startAudienceSeconds() {\n const t = this.startAudienceTime.match(/.{1,2}/g)\n return parseInt(t[0] * 3600 + t[1] * 60 + t[2])\n },\n loadingArray() {\n return Array.from(Array(this.numberOfRows * this.framesPerRow).keys())\n },\n serverOfFrames() {\n return sessionStorage.getItem('server')\n },\n },\n watch: {\n framesFormat(value) {\n this.setFrameSelection(value)\n },\n active() {\n // ? sempre que trocamos de tabs dar reset as horas selected\n this.hourIniSelected = false\n this.hourEndSelected = false\n },\n useCache() {\n this.createFramesInterface()\n },\n hourIniSelected(value) {\n if (value) {\n sessionStorage.setItem(\n 'currentTimeFrames',\n this.convertToAudienceTime(this.hourIniSelected, '')\n )\n } else {\n sessionStorage.removeItem('currentTimeFrames')\n }\n },\n activeFrame(value) {\n if (value) {\n this.stopPlayingBar()\n }\n },\n channel() {\n this.updatingChannel = new Promise((resolve, reject) => {\n try {\n this.createFramesInterface()\n resolve(true)\n } catch (err) {\n reject(err)\n }\n })\n },\n },\n}\n</script>\n<style scoped>\n.visualization-row {\n display: flex;\n flex-wrap: wrap;\n flex: 1 1 auto;\n}\n\n.visualization-col {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n padding: 12px;\n}\n\n.visualization-divider {\n display: block;\n flex: 1 1 100%;\n height: 0px;\n max-height: 0px;\n opacity: 1;\n transition: inherit;\n border-style: solid;\n border-width: thin 0 0 0;\n border-color: rgba(0, 0, 0, 0.12);\n margin: 0;\n}\n\n.visualization-divider.vertical {\n align-self: stretch;\n border-width: 0 thin 0 0;\n display: inline-flex;\n height: inherit;\n margin-left: -1px;\n max-height: 100%;\n max-width: 0px;\n vertical-align: text-bottom;\n width: 0px;\n}\n\n.visualization-card {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n padding: 12px;\n width: 100%;\n transition-property: box-shadow, opacity, -webkit-box-shadow;\n overflow-wrap: break-word;\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\n}\n\n.visualization-justify-center, /deep/ .visualization-justify-center {\n justify-content: center;\n}\n\n.visualization-align-center {\n align-items: center;\n}\n\n#visualization-container {\n max-width: 100% !important;\n margin: 0 auto !important;\n height: 100%;\n border-bottom: none;\n}\n#visualization-container > .card {\n border-radius: 0 !important;\n font-size: 12px;\n width: 100%;\n box-shadow: none;\n height: 100%;\n}\n\n#command-bar,\n#info-bar {\n background-color: #f5f5f5;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#command-bar button {\n width: 42px;\n height: 36px;\n border: none;\n background: none;\n}\n\n#command-bar button:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.12);\n}\n\n#command-bar svg {\n font-size: 16px;\n}\n\n#command-bar {\n padding: 0 !important;\n}\n\n#info-bar {\n padding: 4px;\n font-size: 14px;\n position: relative;\n}\n\n.settings-container {\n position: absolute;\n right: 14px;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.settings-container > * {\n margin: 0 2px;\n cursor: pointer;\n}\n\n#info-bar svg {\n font-size: 16px;\n}\n\n#info-bar .divider {\n margin: 0 8px;\n}\n\nsvg:focus {\n border: none;\n}\n\n.visualization-card {\n border-left: 8px solid #eee;\n}\n\n.active-tab {\n border-left: 8px solid var(--visualization-primary) !important;\n border-image-slice: 1;\n}\n\n[id^='frame-'] {\n padding: 1px;\n display: flex;\n flex-flow: column;\n}\n\n.tooltip {\n display: block !important;\n z-index: 10000;\n}\n\n.tooltip .tooltip-inner {\n background: var(--visualization-primary);\n color: white;\n border-radius: 16px;\n padding: 5px 10px 4px;\n}\n\n.tooltip .tooltip-arrow {\n width: 0;\n height: 0;\n border-style: solid;\n position: absolute;\n margin: 5px;\n border-color: var(--visualization-primary);\n z-index: 1;\n}\n\n.tooltip[x-placement^='top'] {\n margin-bottom: 5px;\n}\n\n.tooltip[x-placement^='top'] .tooltip-arrow {\n border-width: 5px 5px 0 5px;\n border-left-color: transparent !important;\n border-right-color: transparent !important;\n border-bottom-color: transparent !important;\n bottom: -5px;\n left: calc(50% - 5px);\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.tooltip[x-placement^='bottom'] {\n margin-top: 5px;\n}\n\n.tooltip[x-placement^='bottom'] .tooltip-arrow {\n border-width: 0 5px 5px 5px;\n border-left-color: transparent !important;\n border-right-color: transparent !important;\n border-top-color: transparent !important;\n top: -5px;\n left: calc(50% - 5px);\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.tooltip[x-placement^='right'] {\n margin-left: 5px;\n}\n\n.tooltip[x-placement^='right'] .tooltip-arrow {\n border-width: 5px 5px 5px 0;\n border-left-color: transparent !important;\n border-top-color: transparent !important;\n border-bottom-color: transparent !important;\n left: -5px;\n top: calc(50% - 5px);\n margin-left: 0;\n margin-right: 0;\n}\n\n.tooltip[x-placement^='left'] {\n margin-right: 5px;\n}\n\n.tooltip[x-placement^='left'] .tooltip-arrow {\n border-width: 5px 0 5px 5px;\n border-top-color: transparent !important;\n border-right-color: transparent !important;\n border-bottom-color: transparent !important;\n right: -5px;\n top: calc(50% - 5px);\n margin-left: 0;\n margin-right: 0;\n}\n\n.tooltip.popover .popover-inner {\n background: #f9f9f9;\n color: black;\n padding: 24px;\n border-radius: 5px;\n box-shadow: 0 5px 30px rgba(black, 0.1);\n}\n\n.tooltip.popover .popover-arrow {\n border-color: #f9f9f9;\n}\n\n.tooltip[aria-hidden='true'] {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.15s, visibility 0.15s;\n}\n\n.tooltip[aria-hidden='false'] {\n visibility: visible;\n opacity: 1;\n transition: opacity 0.15s;\n}\n</style>\n"]}, media: undefined });
4508
+ inject("data-v-09946f69_0", { source: "\n.visualization-row[data-v-09946f69] {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\n}\n.visualization-col[data-v-09946f69] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\n}\n.visualization-divider[data-v-09946f69] {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\n}\n.visualization-divider.vertical[data-v-09946f69] {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\n}\n.visualization-card[data-v-09946f69] {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\n}\n.visualization-justify-center[data-v-09946f69],[data-v-09946f69] .visualization-justify-center {\r\n justify-content: center;\n}\n.visualization-align-center[data-v-09946f69] {\r\n align-items: center;\n}\n#visualization-container[data-v-09946f69] {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\n}\n#visualization-container > .card[data-v-09946f69] {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\n}\n#command-bar[data-v-09946f69],\r\n#info-bar[data-v-09946f69] {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n#command-bar button[data-v-09946f69] {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\n}\n#command-bar button[data-v-09946f69]:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\n}\n#command-bar svg[data-v-09946f69] {\r\n font-size: 16px;\n}\n#command-bar[data-v-09946f69] {\r\n padding: 0 !important;\n}\n#info-bar[data-v-09946f69] {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\n}\n.settings-container[data-v-09946f69] {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\n}\n.settings-container > *[data-v-09946f69] {\r\n margin: 0 2px;\r\n cursor: pointer;\n}\n#info-bar svg[data-v-09946f69] {\r\n font-size: 16px;\n}\n#info-bar .divider[data-v-09946f69] {\r\n margin: 0 8px;\n}\nsvg[data-v-09946f69]:focus {\r\n border: none;\n}\n.visualization-card[data-v-09946f69] {\r\n border-left: 8px solid #eee;\n}\n.active-tab[data-v-09946f69] {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\n}\n[id^='frame-'][data-v-09946f69] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\n}\n.tooltip[data-v-09946f69] {\r\n display: block !important;\r\n z-index: 10000;\n}\n.tooltip .tooltip-inner[data-v-09946f69] {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\n}\n.tooltip .tooltip-arrow[data-v-09946f69] {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\n}\n.tooltip[x-placement^='top'][data-v-09946f69] {\r\n margin-bottom: 5px;\n}\n.tooltip[x-placement^='top'] .tooltip-arrow[data-v-09946f69] {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='bottom'][data-v-09946f69] {\r\n margin-top: 5px;\n}\n.tooltip[x-placement^='bottom'] .tooltip-arrow[data-v-09946f69] {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\n}\n.tooltip[x-placement^='right'][data-v-09946f69] {\r\n margin-left: 5px;\n}\n.tooltip[x-placement^='right'] .tooltip-arrow[data-v-09946f69] {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip[x-placement^='left'][data-v-09946f69] {\r\n margin-right: 5px;\n}\n.tooltip[x-placement^='left'] .tooltip-arrow[data-v-09946f69] {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\n}\n.tooltip.popover .popover-inner[data-v-09946f69] {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\n}\n.tooltip.popover .popover-arrow[data-v-09946f69] {\r\n border-color: #f9f9f9;\n}\n.tooltip[aria-hidden='true'][data-v-09946f69] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\n}\n.tooltip[aria-hidden='false'][data-v-09946f69] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\n}\r\n", map: {"version":3,"sources":["C:\\workspace\\visualization\\src\\Visualization.vue"],"names":[],"mappings":";AAkoCA;EACA,aAAA;EACA,eAAA;EACA,cAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;AACA;AAEA;EACA,cAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;EACA,UAAA;EACA,mBAAA;EACA,mBAAA;EACA,wBAAA;EACA,iCAAA;EACA,SAAA;AACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,2BAAA;EACA,UAAA;AACA;AAEA;EACA,aAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,WAAA;EACA,4DAAA;EACA,yBAAA;EACA;qCACA;AACA;AAEA;EAEA,uBAAA;AACA;AAEA;EACA,mBAAA;AACA;AAEA;EACA,0BAAA;EACA,yBAAA;EACA,YAAA;EACA,mBAAA;AACA;AACA;EACA,2BAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;EACA,YAAA;AACA;AAEA;;EAEA,yBAAA;EACA;mCACA;AACA;AACA;EACA,WAAA;EACA,YAAA;EACA,YAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;EACA,+BAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,eAAA;EACA,kBAAA;AACA;AAEA;EACA,kBAAA;EACA,WAAA;EACA,QAAA;EACA,2BAAA;AACA;AAEA;EACA,aAAA;EACA,eAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,aAAA;AACA;AAEA;EACA,YAAA;AACA;AAEA;EACA,2BAAA;AACA;AAEA;EACA,8DAAA;EACA,qBAAA;AACA;AAEA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;AACA;AAEA;EACA,yBAAA;EACA,cAAA;AACA;AAEA;EACA,wCAAA;EACA,YAAA;EACA,mBAAA;EACA,qBAAA;AACA;AAEA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,0CAAA;EACA,UAAA;AACA;AAEA;EACA,kBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,2CAAA;EACA,YAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,eAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,0CAAA;EACA,wCAAA;EACA,SAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;AACA;AAEA;EACA,gBAAA;AACA;AAEA;EACA,2BAAA;EACA,yCAAA;EACA,wCAAA;EACA,2CAAA;EACA,UAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,iBAAA;AACA;AAEA;EACA,2BAAA;EACA,wCAAA;EACA,0CAAA;EACA,2CAAA;EACA,WAAA;EACA,oBAAA;EACA,cAAA;EACA,eAAA;AACA;AAEA;EACA,mBAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,uCAAA;AACA;AAEA;EACA,qBAAA;AACA;AAEA;EACA,kBAAA;EACA,UAAA;EACA,2CAAA;AACA;AAEA;EACA,mBAAA;EACA,UAAA;EACA,yBAAA;AACA","file":"Visualization.vue","sourcesContent":["<template>\r\n <div\r\n class=\"visualization-row\"\r\n id=\"visualization-container\"\r\n @click=\"framesClicked\"\r\n >\r\n <GlobalEvents\r\n v-if=\"active && canInsertTime && settingsClosed\"\r\n @keydown.45=\"insertTime\"\r\n @keydown.46=\"insertTime\"\r\n />\r\n <GlobalEvents\r\n v-if=\"active && settingsClosed\"\r\n @keydown.left.prevent=\"arrowLeft\"\r\n @keydown.right.prevent=\"arrowRight\"\r\n @keydown.shift.page-down.prevent=\"nextLoopActivate\"\r\n @keydown.page-down.prevent=\"next\"\r\n @keydown.page-up.prevent=\"prev\"\r\n @keydown.shift.page-up.prevent=\"prevLoopActivate\"\r\n @keydown.83.prevent=\"setHourIni\"\r\n @keydown.69.prevent=\"setHourEnd\"\r\n @keydown.36.prevent=\"goToFirstFrame\"\r\n @keydown.35.prevent=\"goToLastFrame\"\r\n @keydown.71.prevent=\"dialogs.goTo = true\"\r\n @keydown.73.prevent=\"dialogs.secondsPerFrame = true\"\r\n @keydown.76.prevent=\"dialogs.frames = true\"\r\n @keydown.49.97=\"() => (secondsPerFrame = 1)\"\r\n @keydown.50.98=\"() => (secondsPerFrame = 2)\"\r\n @keydown.51.99=\"() => (secondsPerFrame = 3)\"\r\n @keydown.52.100=\"() => (secondsPerFrame = 4)\"\r\n @keydown.53.101=\"() => (secondsPerFrame = 5)\"\r\n />\r\n <GlobalEvents\r\n v-if=\"prevLoop || nextLoop\"\r\n @keydown=\"breakLoop\"\r\n v-on:click=\"breakLoop\"\r\n />\r\n <settings\r\n v-if=\"active\"\r\n :dialogs-visibility=\"dialogs\"\r\n :playback-rate=\"playbackRate\"\r\n :seconds-per-frame=\"secondsPerFrame\"\r\n :frames-per-row=\"framesPerRow\"\r\n :number-of-rows=\"numberOfRows\"\r\n @change-playback-rate=\"(value) => (playbackRate = value)\"\r\n @change-go-to=\"changeHour\"\r\n @change-seconds-per-frame=\"(value) => (secondsPerFrame = value)\"\r\n @set-frames-selection=\"setFrameSelection\"\r\n @close=\"(dialog) => (dialogs[dialog] = false)\"\r\n />\r\n <div\r\n :class=\"{ 'visualization-card': true, 'active-tab': active }\"\r\n style=\"width: 100%; padding: 0\"\r\n >\r\n <command-bar\r\n v-show=\"commandBarShow\"\r\n :video-playing=\"videoPlaying\"\r\n :video-paused=\"paused\"\r\n :insert-time=\"canInsertTime\"\r\n :hour-ini-selected=\"!!hourIniSelected\"\r\n :hour-end-selected=\"!!hourEndSelected\"\r\n @prev-loop-activate=\"prevLoopActivate\"\r\n @next-loop-activate=\"nextLoopActivate\"\r\n @prev=\"prev\"\r\n @next=\"next\"\r\n @go-to=\"dialogs.goTo = true\"\r\n @open-frame-selection=\"dialogs.frames = true\"\r\n @open-frames-per-second=\"dialogs.secondsPerFrame = true\"\r\n @open-blocks=\"openBlocks\"\r\n @open-playback-rate=\"dialogs.playbackRate = true\"\r\n @play-or-pause=\"playOrPause\"\r\n @stop-playing=\"stopPlayingBar\"\r\n @set-hour-ini=\"setHourIni\"\r\n @set-hour-end=\"setHourEnd\"\r\n @insert-time=\"insertTime\"\r\n />\r\n <video-progress\r\n v-if=\"videoProgressBar\"\r\n v-show=\"videoPlaying\"\r\n :video-time=\"videoTime\"\r\n />\r\n <info-bar\r\n :playback-rate=\"playbackRate\"\r\n :seconds-per-frame=\"secondsPerFrame\"\r\n :commands-show=\"commandBarShow\"\r\n :cache=\"useCache\"\r\n :block-start-time=\"blockStartTime\"\r\n :video-total-duration=\"videoSliderTotalDuration\"\r\n :alternative-server=\"alternativeServer\"\r\n :frames-per-row=\"framesPerRow\"\r\n :number-of-rows=\"numberOfRows\"\r\n :hour-ini=\"hourIniSelected\"\r\n :hour-end=\"hourEndSelected\"\r\n @toogle-commands-visibility=\"commandBarShow = !commandBarShow\"\r\n @toogle-cache=\"useCache = !useCache\"\r\n @change-server=\"changeServerClick\"\r\n />\r\n <div\r\n class=\"visualization-row\"\r\n v-for=\"rowNumber in numberOfRows\"\r\n :id=\"'row-' + rowNumber\"\r\n :key=\"'row-' + rowNumber\"\r\n style=\"padding: 12px\"\r\n >\r\n <div\r\n v-for=\"(frame, frameNumber) in previousFrames\"\r\n :key=\"\r\n numberOfRows +\r\n '-' +\r\n framesPerRow +\r\n '-' +\r\n getIndex(rowNumber, frameNumber, Positions.previous)\r\n \"\r\n style=\"display: none\"\r\n >\r\n <span v-html=\"frame.img\" />\r\n </div>\r\n <div\r\n v-for=\"(frame, frameNumber) in nextFrames\"\r\n :key=\"\r\n numberOfRows +\r\n '-' +\r\n framesPerRow +\r\n '-' +\r\n getIndex(rowNumber, frameNumber, Positions.next)\r\n \"\r\n style=\"display: none\"\r\n >\r\n <span v-html=\"frame.img\" />\r\n </div>\r\n <div\r\n class=\"visualization-col\"\r\n v-for=\"(frame, frameNumber) in frames.slice(\r\n framesPerRow * (rowNumber - 1),\r\n framesPerRow * rowNumber\r\n )\"\r\n :key=\"'row-' + rowNumber + '-frame-' + frameNumber\"\r\n :id=\"`frame-${getIndex(rowNumber, frameNumber, Positions.current)}`\"\r\n :class=\"{ loaderImg: !!frame.img }\"\r\n @click=\"\r\n frame.time\r\n ? selectFrame(\r\n getIndex(rowNumber, frameNumber, Positions.current),\r\n frame\r\n )\r\n : null\r\n \"\r\n >\r\n <span :id=\"activeFrame ? 'aa' : 0\" style=\"padding-left: 4px\">\r\n <b>\r\n {{\r\n getAudienceTime(\r\n frame.time,\r\n rowNumber,\r\n frameNumber,\r\n Positions.current\r\n )\r\n }}\r\n </b>\r\n </span>\r\n\r\n <frame\r\n ref=\"frames\"\r\n :frame=\"frame\"\r\n :index=\"getIndex(rowNumber, frameNumber, Positions.current)\"\r\n :grid-settings=\"{ numberOfRows, framesPerRow }\"\r\n :initialTime=\"frame.time === hourIniSelected\"\r\n :endTime=\"frame.time === hourEndSelected\"\r\n :betweenTime=\"\r\n frame.time > hourIniSelected && frame.time < hourEndSelected\r\n \"\r\n :active=\"\r\n getIndex(rowNumber, frameNumber, Positions.current) ===\r\n activeFrame\r\n \"\r\n :activeTab=\"active\"\r\n :videoUrl=\"fInterface ? fInterface.getVideoUrl(frame) : ''\"\r\n @startPlaying=\"startPlaying\"\r\n @stopPlaying=\"stopPlaying\"\r\n @playPauseStatus=\"changePlayPause\"\r\n @updateSlider=\"updateSlider\"\r\n :playback-rate=\"playbackRate\"\r\n style=\"margin: 0 auto\"\r\n ></frame>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <settings\r\n ref=\"settings2\"\r\n :active=\"active\"\r\n @goToTime=\"changeHour\"\r\n @goToBlockInterval=\"changeBlockInterval\"\r\n @setSplitTime=\"setSplitTime\"\r\n @setFrameSelection=\"setFrameSelection\"\r\n @setPlaybackRate=\"\r\n (rate) => {\r\n playbackRate = rate\r\n }\r\n \"\r\n >\r\n </settings> -->\r\n <!-- <v-dialog v-model=\"dialog\" width=\"500\">\r\n <div class=\"card\">\r\n <div class=\"card\"-title class=\"text-h5 grey lighten-2\">\r\n {{ ' Último bloco disponível até: ' }}\r\n <v-btn\r\n @click=\"goToStartBlock\"\r\n class=\"ml-2\"\r\n dark\r\n color=\"success\"\r\n depressed\r\n >\r\n <v-icon left> fa-clock </v-icon>\r\n {{ timeLastBlock }}\r\n </v-btn>\r\n <v-spacer></v-spacer>\r\n <v-btn color=\"error\" fab small class=\"ml-5\" @click=\"dialog = false\">\r\n <v-icon dark> fa fa-xmark </v-icon>\r\n </v-btn>\r\n </div-title>\r\n </div>\r\n </v-dialog>\r\n <Help :media=\"media\" @close=\"media = null\" />\r\n <v-dialog\r\n v-if=\"userMultiTabsGrid\"\r\n v-model=\"userMultiTabsGridsModel\"\r\n persistent\r\n width=\"60%\"\r\n >\r\n <div class=\"card\">\r\n <div class=\"card\"-title class=\"warning text-h5\" primary-title>\r\n <div class=\"row\" class=\"ma-0\" justify=\"center\" align=\"center\">\r\n <v-icon dark left style=\"font-size: 24px !important\">\r\n fa fa-exclamation-triangle\r\n </v-icon>\r\n <div style=\"color: white\">{{ $t('form.alert') }}</div>\r\n </div>\r\n </div-title>\r\n <div class=\"card\"-text class=\"justify-center pa-6 grey lighten-2\">\r\n <h3>\r\n {{ $t('alerts.userMultiTabsGrid') }}\r\n </h3>\r\n </div-text>\r\n <hr class=\"divider\" class=\"grey lighten-1\"></span>\r\n <div class=\"card\"-actions class=\"grey lighten-2 justify-center\">\r\n <v-btn color=\"error\" ml-5 @click=\"userMultiTabsGrid = false\">\r\n <v-icon left color=\"white\">fa fa-times</v-icon>\r\n {{ $t('form.close') }}\r\n </v-btn>\r\n </div-actions>\r\n </div>\r\n </v-dialog> -->\r\n </div>\r\n</template>\r\n<script>\r\nimport Frame from './components/Frame.vue'\r\nimport FramesInterface from './utils/FramesInterface.js'\r\nimport FramesService from './services/FramesService.js'\r\n\r\nimport Commands from './components/Commands.vue'\r\nimport Infos from './components/Infos.vue'\r\nimport VideoProgress from './components/VideoProgress.vue'\r\nimport Settings from './components/Settings.vue'\r\n\r\nconst Positions = Object.freeze({\r\n previous: 0,\r\n current: 1,\r\n next: 2,\r\n})\r\n\r\nexport default {\r\n name: 'visualization-container',\r\n props: {\r\n value: {\r\n type: Boolean,\r\n required: true,\r\n },\r\n date: {\r\n type: String,\r\n required: true,\r\n },\r\n channel: {\r\n type: Number,\r\n required: true,\r\n },\r\n startAudienceTime: {\r\n type: String,\r\n required: true,\r\n },\r\n endAudienceTime: {\r\n type: String,\r\n required: true,\r\n },\r\n videoProgressBar: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n jumpOnInsert: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n framesFormat: {\r\n type: [Number, String],\r\n default: 6,\r\n },\r\n maxSize: {\r\n type: Number,\r\n },\r\n },\r\n components: {\r\n Frame,\r\n CommandBar: Commands,\r\n InfoBar: Infos,\r\n VideoProgress,\r\n Settings,\r\n // Help,\r\n },\r\n data() {\r\n return {\r\n Positions,\r\n updatingChannel: null,\r\n dialog: false,\r\n timeLastBlock: null,\r\n alternativeServer: false,\r\n useCache: true,\r\n numberOfRows: 1,\r\n framesPerRow: 5,\r\n secondsPerFrame: 1,\r\n fInterface: null,\r\n velocity: 1,\r\n frames: [],\r\n previousFrames: [],\r\n nextFrames: [],\r\n channelCode: 0,\r\n videoPlaying: false,\r\n activeFrame: null,\r\n activeVideo: null,\r\n videoTime: 0,\r\n videoTotalTime: null,\r\n progressVideoDrag: false,\r\n hourIniSelected: false,\r\n hourEndSelected: false,\r\n canInsertTime: false,\r\n lastHeight: 0,\r\n loopInterval: null,\r\n nextLoop: false,\r\n prevLoop: false,\r\n videoSliderTotalDuration: 900,\r\n blockStartTime: null,\r\n media: null,\r\n changeServer: false,\r\n userMultiTabsGrid: false,\r\n userMultiTabsGridsModel: true,\r\n playbackRate: 1,\r\n paused: false,\r\n commandBarShow: true,\r\n dialogs: {\r\n playbackRate: false,\r\n goTo: false,\r\n secondsPerFrame: false,\r\n frames: false,\r\n },\r\n }\r\n },\r\n async created() {\r\n this.changeServer = this.serverOfFrames === 'alternative'\r\n this.alternativeServer = this.serverOfFrames === 'alternative'\r\n\r\n const settings = [\r\n {\r\n framesPerRow: 2,\r\n numberOfRows: 1,\r\n },\r\n {\r\n framesPerRow: 3,\r\n numberOfRows: 1,\r\n },\r\n {\r\n framesPerRow: 3,\r\n numberOfRows: 2,\r\n },\r\n {\r\n framesPerRow: 4,\r\n numberOfRows: 1,\r\n },\r\n {\r\n framesPerRow: 4,\r\n numberOfRows: 2,\r\n },\r\n {\r\n framesPerRow: 5,\r\n numberOfRows: 1,\r\n },\r\n {\r\n framesPerRow: 5,\r\n numberOfRows: 2,\r\n },\r\n {\r\n framesPerRow: 6,\r\n numberOfRows: 1,\r\n },\r\n {\r\n framesPerRow: 6,\r\n numberOfRows: 2,\r\n },\r\n ]\r\n\r\n const storedOnDb = settings[parseInt(this.framesFormat) - 1]\r\n this.framesPerRow = storedOnDb.framesPerRow\r\n this.numberOfRows = storedOnDb.numberOfRows\r\n\r\n await this.createFramesInterface()\r\n if (this.maxSize) {\r\n this.resize(this.maxSize, true)\r\n }\r\n },\r\n methods: {\r\n framesClicked(e) {\r\n if (e.target.id != 'insert') {\r\n this.active = true\r\n }\r\n },\r\n async goToStartBlock() {\r\n try {\r\n const d = new Date()\r\n let timestamp = Date.UTC(\r\n d.getFullYear(),\r\n d.getMonth(),\r\n d.getDate(),\r\n d.getHours(),\r\n d.getMinutes(),\r\n d.getSeconds()\r\n )\r\n\r\n const response = (\r\n await FramesService.getNextAvailableBlock({\r\n channel: this.channel,\r\n time: timestamp / 1000,\r\n })\r\n ).data\r\n\r\n this.dialog = false\r\n this.changeHour(this.convertToAudienceTime(response.data.start, ':'))\r\n } catch (err) {\r\n console.error(err)\r\n }\r\n },\r\n async checkAvailableBlock() {\r\n try {\r\n const d = new Date()\r\n let timestamp = Date.UTC(\r\n d.getFullYear(),\r\n d.getMonth(),\r\n d.getDate(),\r\n d.getHours(),\r\n d.getMinutes(),\r\n d.getSeconds()\r\n )\r\n\r\n const response = (\r\n await FramesService.getNextAvailableBlock({\r\n channel: this.channel,\r\n time: timestamp / 1000,\r\n })\r\n ).data\r\n\r\n this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':')\r\n this.dialog = true\r\n if (!response.status) {\r\n this.timeLastBlock = 'N/D'\r\n }\r\n } catch (err) {\r\n console.error(err)\r\n }\r\n },\r\n updateSlider(videoStartTime, time) {\r\n // * atualizar slider se estiver fora do range definido previamente\r\n if (\r\n time < this.blockStartTime ||\r\n time > this.blockStartTime ||\r\n videoStartTime > this.blockStartTime + this.videoSliderTotalDuration\r\n ) {\r\n this.blockStartTime = videoStartTime\r\n this.videoSliderTotalDuration = 900\r\n }\r\n },\r\n nextLoopActivate() {\r\n this.breakLoop()\r\n this.loopInterval = setInterval(this.next, 40)\r\n setTimeout(() => {\r\n this.nextLoop = true\r\n }, 0)\r\n },\r\n prevLoopActivate() {\r\n this.breakLoop()\r\n this.loopInterval = setInterval(this.prev, 40)\r\n setTimeout(() => {\r\n this.prevLoop = true\r\n }, 0)\r\n },\r\n breakLoop() {\r\n clearInterval(this.loopInterval)\r\n this.loopInterval = null\r\n this.nextLoop = false\r\n this.prevLoop = false\r\n },\r\n changePlayPause(status) {\r\n this.paused = !status\r\n },\r\n resize(height = this.lastHeight) {\r\n this.lastHeight = height\r\n if (this.$refs.frames) {\r\n for (let frame of this.$refs.frames) {\r\n frame.resize(height)\r\n }\r\n }\r\n this.$emit('resized')\r\n },\r\n async goToFirstFrame() {\r\n let frames = this.$refs.frames\r\n\r\n let audienceTime = null\r\n if (frames.length > 0) {\r\n let frame = frames[0].frame\r\n audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\r\n }\r\n // if (audienceTime) {\r\n // this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))\r\n // }\r\n if (audienceTime) {\r\n const [hours, minutes, seconds] = audienceTime.split(':')\r\n const totalSeconds =\r\n parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds)\r\n if (totalSeconds >= 9000)\r\n this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))\r\n else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true))\r\n }\r\n },\r\n async goToLastFrame() {\r\n let frames = this.$refs.frames\r\n let audienceTime = null\r\n if (frames.length > 0) {\r\n let frame = frames[0].frame\r\n\r\n audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\r\n }\r\n if (audienceTime) {\r\n this.changeHour(this.getLastFirtsBlockTime(audienceTime))\r\n }\r\n },\r\n getLastFirtsBlockTime(time, first = false) {\r\n if (time.indexOf(':') !== -1) {\r\n time = time.replace(/:/g, '')\r\n }\r\n let h, m, newTime\r\n const t = time.match(/.{1,2}/g)\r\n if (t[0] && t[1]) {\r\n h = parseInt(t[0])\r\n m = parseInt(t[1])\r\n }\r\n if (h < 26) {\r\n if (m < 15)\r\n if (first) newTime = t[0] + ':00:00'\r\n else newTime = t[0] + ':14:59'\r\n else if (m < 30)\r\n if (first) newTime = t[0] + ':15:00'\r\n else newTime = t[0] + ':29:59'\r\n else if (m < 45)\r\n if (first) newTime = t[0] + ':30:00'\r\n else newTime = t[0] + ':44:59'\r\n else if (first) newTime = t[0] + ':45:00'\r\n else newTime = t[0] + ':59:59'\r\n } else {\r\n if (m < 15)\r\n if (first) newTime = '26:00:00'\r\n else newTime = '26:14:59'\r\n else {\r\n if (first) newTime = '26:15:00'\r\n else newTime = '26:29:59'\r\n }\r\n }\r\n return newTime\r\n },\r\n openBlocks() {\r\n this.$refs.settings2?.openBlocks()\r\n },\r\n playOrPause() {\r\n const array = this.$refs.frames.filter((fc) => !!fc.active)\r\n if (array.length === 1) {\r\n const frame = array[0]\r\n frame.playOrPause(this.playbackRate)\r\n }\r\n },\r\n stopPlayingBar() {\r\n for (let ref of this.$refs.frames) {\r\n if (\r\n ref.videoStatus === ref.Status.playing ||\r\n ref.videoStatus === ref.Status.paused\r\n ) {\r\n ref.stop(false)\r\n }\r\n }\r\n },\r\n async setFrameSelection(selected) {\r\n this.frames = this.loadingArray\r\n switch (parseInt(selected)) {\r\n // 2x1\r\n case 1:\r\n this.framesPerRow = 2\r\n this.numberOfRows = 1\r\n break\r\n // 3x1\r\n case 2:\r\n this.framesPerRow = 3\r\n this.numberOfRows = 1\r\n break\r\n // 3x2\r\n case 3:\r\n this.framesPerRow = 3\r\n this.numberOfRows = 2\r\n break\r\n // 4x1\r\n case 4:\r\n this.framesPerRow = 4\r\n this.numberOfRows = 1\r\n break\r\n // 4x2\r\n case 5:\r\n this.framesPerRow = 4\r\n this.numberOfRows = 2\r\n break\r\n // 5x1\r\n case 6:\r\n this.framesPerRow = 5\r\n this.numberOfRows = 1\r\n break\r\n // 5x2\r\n case 7:\r\n this.framesPerRow = 5\r\n this.numberOfRows = 2\r\n break\r\n // 6x1\r\n case 8:\r\n this.framesPerRow = 6\r\n this.numberOfRows = 1\r\n break\r\n // 6x2\r\n case 9:\r\n this.framesPerRow = 6\r\n this.numberOfRows = 2\r\n break\r\n }\r\n await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow)\r\n this.getFramesArray()\r\n setTimeout(() => {\r\n for (let ref of this.$refs.frames) {\r\n ref?.resize(this.lastHeight)\r\n }\r\n }, 150)\r\n },\r\n getFramesArray() {\r\n this.frames = this.fInterface.getFrames(Positions.current)\r\n this.nextFrames = this.fInterface.getFrames(Positions.next)\r\n this.previousFrames = this.fInterface.getFrames(Positions.previous)\r\n },\r\n async createFramesInterface() {\r\n this.frames = this.loadingArray\r\n let ch = this.channel\r\n let associationTMP = {\r\n 1735073: 1,\r\n 1735074: 139,\r\n 1735075: 3,\r\n 1735076: 132,\r\n }\r\n //\r\n this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch\r\n\r\n const t = this.startAudienceTime.match(/.{1,2}/g)\r\n const d = this.getDateParts()\r\n const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\r\n // * iniciar slider\r\n this.blockStartTime = time\r\n this.fInterface = await new FramesInterface(\r\n this.channelCode,\r\n this.numberOfRows,\r\n this.framesPerRow,\r\n time,\r\n this.startAudienceTime,\r\n this.useCache\r\n )\r\n await this.fInterface.init()\r\n\r\n this.getFramesArray()\r\n\r\n this.activeFrame = this.getIndex(1, 0, Positions.current)\r\n\r\n this.activeVideo = null\r\n },\r\n getIndex(rowNumber, frameIndex, position) {\r\n let from = this.framesPerRow * this.numberOfRows * position\r\n let till = this.framesPerRow * this.numberOfRows * (position + 1)\r\n\r\n return (from + till * (rowNumber - 1)) / rowNumber + frameIndex\r\n },\r\n getAudienceTime(frameTime, rowNumber, frameNumber, position) {\r\n if (!frameTime) {\r\n return 'Loading...'\r\n } else if (\r\n this.getIndex(rowNumber, frameNumber, position) === this.activeVideo\r\n ) {\r\n return this.convertToAudienceTime(this.videoTime)\r\n } else {\r\n return this.convertToAudienceTime(frameTime)\r\n }\r\n },\r\n dateInUtc(miliSeconds) {\r\n var date = new Date(miliSeconds)\r\n var utc = new Date(\r\n date.getUTCFullYear(),\r\n date.getUTCMonth(),\r\n date.getUTCDate(),\r\n date.getUTCHours(),\r\n date.getUTCMinutes(),\r\n date.getUTCSeconds()\r\n )\r\n return utc\r\n },\r\n convertToAudienceTime(time, separator = ':') {\r\n const d = this.getDateParts()\r\n const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000\r\n\r\n let hour = this.dateInUtc(time * 1000)\r\n .toTimeString()\r\n .split(' ')[0]\r\n .split(':')\r\n .map(Number)\r\n\r\n if (time > limit && time <= limit + this.startAudienceSeconds) {\r\n hour[0] = 24 + hour[0]\r\n }\r\n return hour\r\n .map((part) => (part > 9 ? part.toString() : '0' + part))\r\n .join(separator)\r\n },\r\n getDateParts(date = this.date) {\r\n const d = new Date(date)\r\n return {\r\n year: d.getFullYear(),\r\n month: d.getMonth(),\r\n day: d.getDate(),\r\n }\r\n },\r\n selectFrame(index, frame) {\r\n const d = this.getDateParts()\r\n const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000\r\n const frameTime = frame?.time\r\n\r\n if (frameTime - (this.startAudienceSeconds + limit) <= 0) {\r\n if (this.hourIniSelected === true) {\r\n this.hourIniSelected = frameTime\r\n\r\n if (\r\n this.hourEndSelected &&\r\n this.hourIniSelected > this.hourEndSelected\r\n ) {\r\n this.hourEndSelected = false\r\n }\r\n } else if (this.hourEndSelected === true) {\r\n if (frameTime > this.hourIniSelected) {\r\n this.hourEndSelected = frameTime\r\n this.canInsertTime = true\r\n } else {\r\n this.hourEndSelected = false\r\n }\r\n }\r\n }\r\n\r\n if (this.activeFrame !== index) {\r\n // ? Se clicar no frame diferente de onde está a dar play, faz pausa\r\n const array = this.$refs.frames.filter(\r\n (fc) => fc.videoStatus === fc.Status.playing\r\n )\r\n if (array.length === 1) {\r\n const frame = array[0]\r\n frame.playOrPause()\r\n }\r\n this.activeVideo = null\r\n this.activeFrame = index\r\n }\r\n },\r\n setHourIni() {\r\n this.canInsertTime = true\r\n this.hourIniSelected = true\r\n document.getElementById(`frame-${this.activeFrame}`).click()\r\n this.$emit('setHourIni', {\r\n hour_ini: this.hourIniSelected\r\n ? this.convertToAudienceTime(this.hourIniSelected, '')\r\n : null,\r\n })\r\n },\r\n setHourEnd() {\r\n this.canInsertTime = true\r\n this.hourEndSelected = true\r\n document.getElementById(`frame-${this.activeFrame}`).click()\r\n },\r\n //* Navegação\r\n arrowRight() {\r\n if (this.checkLimitRight(false)) {\r\n if (\r\n this.activeFrame ===\r\n this.numberOfRows * this.framesPerRow * 2 - 1\r\n ) {\r\n this.next()\r\n } else {\r\n this.activeFrame++\r\n }\r\n }\r\n },\r\n arrowLeft() {\r\n if (this.checkLimitLeft(false)) {\r\n if (this.activeFrame === this.numberOfRows * this.framesPerRow) {\r\n this.prev()\r\n } else {\r\n this.activeFrame--\r\n }\r\n }\r\n },\r\n checkLimitRight(value) {\r\n const hours = this.endAudienceTime.match(/.{1,2}/g)\r\n const d = this.getDateParts()\r\n const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59)\r\n\r\n if (value) {\r\n return (\r\n high > (this.fInterface.getCurrentTime() - 1) * 1000 &&\r\n this.nextFrames[0].title !== -1\r\n )\r\n } else {\r\n // return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000\r\n return high > this.fInterface.getCurrentTime() * 1000\r\n }\r\n },\r\n checkLimitLeft(value) {\r\n const hours = this.startAudienceTime.match(/.{1,2}/g)\r\n const d = this.getDateParts()\r\n const low = Date.UTC(d.year, d.month, d.day, hours[0], hours[1], hours[2])\r\n\r\n if (value) {\r\n return low <= (this.fInterface.getCurrentTime() - 1) * 1000\r\n } else {\r\n return (\r\n low <\r\n (this.fInterface.getCurrentTime() +\r\n this.activeFrame -\r\n this.numberOfRows * this.framesPerRow) *\r\n 1000\r\n )\r\n }\r\n },\r\n async next() {\r\n if (this.checkLimitRight(true)) {\r\n const array = this.$refs.frames.filter(\r\n (fc) =>\r\n fc.videoStatus === fc.Status.playing ||\r\n fc.videoStatus === fc.Status.paused\r\n )\r\n\r\n if (array.length === 1) {\r\n const frame = array[0]\r\n frame.stop(false)\r\n }\r\n this.fInterface.setCurrentStep(this.secondsPerFrame)\r\n await this.fInterface.loadNextFrames()\r\n\r\n this.activeFrame = this.getIndex(1, 0, Positions.current)\r\n this.activeVideo = null\r\n\r\n this.getFramesArray()\r\n }\r\n },\r\n async prev() {\r\n if (this.checkLimitLeft(true)) {\r\n const array = this.$refs.frames.filter(\r\n (fc) =>\r\n fc.videoStatus === fc.Status.playing ||\r\n fc.videoStatus === fc.Status.paused\r\n )\r\n if (array.length === 1) {\r\n const frame = array[0]\r\n frame.stop(false)\r\n }\r\n\r\n this.fInterface.setCurrentStep(this.secondsPerFrame)\r\n await this.fInterface.loadPrevFrames()\r\n\r\n this.activeFrame = this.getIndex(\r\n this.numberOfRows,\r\n this.framesPerRow - 1,\r\n Positions.current\r\n )\r\n this.activeVideo = null\r\n\r\n this.getFramesArray()\r\n }\r\n },\r\n async setStartTime(time) {\r\n if (time.indexOf(':') !== -1) {\r\n time = time.replace(/:/g, '')\r\n }\r\n const t = time.match(/.{1,2}/g)\r\n const d = this.getDateParts()\r\n const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\r\n this.frames = this.loadingArray\r\n\r\n await this.fInterface.changeTime(setTime)\r\n\r\n this.getFramesArray()\r\n\r\n this.activeFrame = this.getIndex(1, 0, Positions.current)\r\n // let frames = this.$refs.frames\r\n\r\n // let audienceTime = null\r\n // if (frames.length > 0) {\r\n // let frame = frames[0].frame\r\n // audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)\r\n // }\r\n\r\n this.activeVideo = null\r\n\r\n return true\r\n },\r\n hourToTimeStamp(time) {\r\n if (time.indexOf(':') !== -1) {\r\n time = time.replace(/:/g, '')\r\n }\r\n const t = time.match(/.{1,2}/g)\r\n const d = this.getDateParts()\r\n const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000\r\n\r\n return setTime\r\n },\r\n async changeHour(value) {\r\n if (value) {\r\n setTimeout(() => {\r\n const array = this.$refs.frames.filter(\r\n (fc) =>\r\n fc.videoStatus === fc.Status.playing ||\r\n fc.videoStatus === fc.Status.paused\r\n )\r\n\r\n if (array.length === 1) {\r\n const frame = array[0]\r\n frame.stop(false)\r\n }\r\n\r\n this.setStartTime(value, true)\r\n }, 0)\r\n }\r\n },\r\n changeBlockInterval(value) {\r\n this.changeHour(value.ini)\r\n let time_ini, time_end\r\n time_ini = this.hourToTimeStamp(value.ini)\r\n time_end = this.hourToTimeStamp(value.end)\r\n this.videoSliderTotalDuration = time_end - time_ini\r\n this.$refs.frames[0].changeSettings(time_ini)\r\n this.blockStartTime = time_ini\r\n },\r\n //eslint-disable-next-line\r\n async updateVideoTime(index, videoTime) {\r\n this.activeVideo = index\r\n this.videoTime = videoTime\r\n },\r\n //eslint-disable-next-line\r\n updateVideoStatus(currentTime) {\r\n if (!this.progressVideoDrag) {\r\n // ESTA FUNÇÃO PASSOU PARA DENTRO DOS COMMANDS\r\n // this.updateProgress(null, currentTime)\r\n }\r\n },\r\n async startPlaying(frame, totalTime) {\r\n const array = this.$refs.frames.filter(\r\n (fc) => fc.frame.time !== frame.time\r\n )\r\n\r\n for (let ref of array) {\r\n if (\r\n ref.videoStatus === ref.Status.playing ||\r\n ref.videoStatus === ref.Status.paused\r\n ) {\r\n ref.stop(false)\r\n }\r\n }\r\n\r\n this.videoTotalTime = totalTime\r\n this.videoPlaying = true\r\n },\r\n stopPlaying() {\r\n this.videoTotalTime = null\r\n this.videoPlaying = false\r\n this.paused = false\r\n },\r\n insertTime() {\r\n this.$emit('timeToInsert', {\r\n channel: this.channel,\r\n hour_ini: this.hourIniSelected\r\n ? this.convertToAudienceTime(this.hourIniSelected, '')\r\n : null,\r\n hour_end: this.hourEndSelected\r\n ? this.convertToAudienceTime(this.hourEndSelected, '')\r\n : null,\r\n force: false,\r\n })\r\n\r\n if (this.jumpOnInsert) {\r\n this.changeHour(\r\n this.convertToAudienceTime(\r\n (this.hourEndSelected || this.hourIniSelected) + 1\r\n )\r\n )\r\n }\r\n\r\n this.hourIniSelected = null\r\n this.hourEndSelected = null\r\n this.canInsertTime = false\r\n\r\n // this.fInterface.setCurrentPosition(this.hourEndSelected)\r\n },\r\n insertTimeForce() {\r\n this.$emit('timeToInsert', {\r\n channel: this.channel,\r\n hour_ini: this.hourIniSelected\r\n ? this.convertToAudienceTime(this.hourIniSelected, '')\r\n : null,\r\n hour_end: this.hourEndSelected\r\n ? this.convertToAudienceTime(this.hourEndSelected, '')\r\n : null,\r\n force: true,\r\n })\r\n\r\n this.hourIniSelected = null\r\n this.hourEndSelected = null\r\n this.canInsertTime = false\r\n\r\n // this.fInterface.setCurrentPosition(this.hourEndSelected)\r\n },\r\n async getChannelMedia() {\r\n // this.media = (await ChannelService.show(this.channel)).data.MEDIA\r\n },\r\n async changeServerClick() {\r\n this.changeServer = !this.changeServer\r\n // this.$store.dispatch(\r\n // 'serverOfFrames',\r\n // this.changeServer ? 'alternative' : 'default'\r\n // )\r\n sessionStorage.setItem(\r\n 'serverOfFrames',\r\n this.changeServer ? 'alternative' : 'default'\r\n )\r\n\r\n // if (this.$route.params.time != this.frames[0].time)\r\n // this.$router.push({\r\n // name: 'grid',\r\n // params: {\r\n // date: this.date,\r\n // channel: this.channelCode,\r\n // time: this.frames[0].time,\r\n // },\r\n // })\r\n location.reload()\r\n },\r\n },\r\n computed: {\r\n active: {\r\n get() {\r\n return this.value\r\n },\r\n set(value) {\r\n this.$emit('input', value)\r\n },\r\n },\r\n settingsClosed() {\r\n return !Object.values(this.dialogs).find((v) => v)\r\n },\r\n startAudienceSeconds() {\r\n const t = this.startAudienceTime.match(/.{1,2}/g)\r\n return parseInt(t[0] * 3600 + t[1] * 60 + t[2])\r\n },\r\n loadingArray() {\r\n return Array.from(Array(this.numberOfRows * this.framesPerRow).keys())\r\n },\r\n serverOfFrames() {\r\n return sessionStorage.getItem('server')\r\n },\r\n },\r\n watch: {\r\n secondsPerFrame(value) {\r\n let frames = this.$refs.frames\r\n let initialTime = null\r\n let audienceTime = null\r\n if (frames.length > 0) {\r\n let frame = frames[0].frame\r\n\r\n if (initialTime === null) {\r\n initialTime = frame.time\r\n }\r\n if (value <= 5) {\r\n let newAudienceTime = initialTime + value\r\n audienceTime = this.getAudienceTime(newAudienceTime, 0, 0, 0)\r\n this.changeHour(audienceTime)\r\n this.next()\r\n }\r\n }\r\n },\r\n framesFormat(value) {\r\n this.setFrameSelection(value)\r\n },\r\n active() {\r\n // ? sempre que trocamos de tabs dar reset as horas selected\r\n this.hourIniSelected = false\r\n this.hourEndSelected = false\r\n },\r\n useCache() {\r\n this.createFramesInterface()\r\n },\r\n hourIniSelected(value) {\r\n if (value) {\r\n sessionStorage.setItem(\r\n 'currentTimeFrames',\r\n this.convertToAudienceTime(this.hourIniSelected, '')\r\n )\r\n } else {\r\n sessionStorage.removeItem('currentTimeFrames')\r\n }\r\n },\r\n activeFrame(value) {\r\n if (value) {\r\n this.stopPlayingBar()\r\n }\r\n },\r\n channel() {\r\n this.updatingChannel = new Promise((resolve, reject) => {\r\n try {\r\n this.createFramesInterface()\r\n resolve(true)\r\n } catch (err) {\r\n reject(err)\r\n }\r\n })\r\n },\r\n },\r\n}\r\n</script>\r\n<style scoped>\r\n.visualization-row {\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex: 1 1 auto;\r\n}\r\n\r\n.visualization-col {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n}\r\n\r\n.visualization-divider {\r\n display: block;\r\n flex: 1 1 100%;\r\n height: 0px;\r\n max-height: 0px;\r\n opacity: 1;\r\n transition: inherit;\r\n border-style: solid;\r\n border-width: thin 0 0 0;\r\n border-color: rgba(0, 0, 0, 0.12);\r\n margin: 0;\r\n}\r\n\r\n.visualization-divider.vertical {\r\n align-self: stretch;\r\n border-width: 0 thin 0 0;\r\n display: inline-flex;\r\n height: inherit;\r\n margin-left: -1px;\r\n max-height: 100%;\r\n max-width: 0px;\r\n vertical-align: text-bottom;\r\n width: 0px;\r\n}\r\n\r\n.visualization-card {\r\n flex-basis: 0;\r\n flex-grow: 1;\r\n max-width: 100%;\r\n padding: 12px;\r\n width: 100%;\r\n transition-property: box-shadow, opacity, -webkit-box-shadow;\r\n overflow-wrap: break-word;\r\n /*box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);*/\r\n}\r\n\r\n.visualization-justify-center,\r\n/deep/ .visualization-justify-center {\r\n justify-content: center;\r\n}\r\n\r\n.visualization-align-center {\r\n align-items: center;\r\n}\r\n\r\n#visualization-container {\r\n max-width: 100% !important;\r\n margin: 0 auto !important;\r\n height: 100%;\r\n border-bottom: none;\r\n}\r\n#visualization-container > .card {\r\n border-radius: 0 !important;\r\n font-size: 12px;\r\n width: 100%;\r\n box-shadow: none;\r\n height: 100%;\r\n}\r\n\r\n#command-bar,\r\n#info-bar {\r\n background-color: #f5f5f5;\r\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),\r\n 0 1px 5px 0 rgba(0, 0, 0, 0.12);\r\n}\r\n#command-bar button {\r\n width: 42px;\r\n height: 36px;\r\n border: none;\r\n background: none;\r\n}\r\n\r\n#command-bar button:hover {\r\n cursor: pointer;\r\n background: rgba(0, 0, 0, 0.12);\r\n}\r\n\r\n#command-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#command-bar {\r\n padding: 0 !important;\r\n}\r\n\r\n#info-bar {\r\n padding: 4px;\r\n font-size: 14px;\r\n position: relative;\r\n}\r\n\r\n.settings-container {\r\n position: absolute;\r\n right: 14px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n}\r\n\r\n.settings-container > * {\r\n margin: 0 2px;\r\n cursor: pointer;\r\n}\r\n\r\n#info-bar svg {\r\n font-size: 16px;\r\n}\r\n\r\n#info-bar .divider {\r\n margin: 0 8px;\r\n}\r\n\r\nsvg:focus {\r\n border: none;\r\n}\r\n\r\n.visualization-card {\r\n border-left: 8px solid #eee;\r\n}\r\n\r\n.active-tab {\r\n border-left: 8px solid var(--visualization-primary) !important;\r\n border-image-slice: 1;\r\n}\r\n\r\n[id^='frame-'] {\r\n padding: 1px;\r\n display: flex;\r\n flex-flow: column;\r\n}\r\n\r\n.tooltip {\r\n display: block !important;\r\n z-index: 10000;\r\n}\r\n\r\n.tooltip .tooltip-inner {\r\n background: var(--visualization-primary);\r\n color: white;\r\n border-radius: 16px;\r\n padding: 5px 10px 4px;\r\n}\r\n\r\n.tooltip .tooltip-arrow {\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n position: absolute;\r\n margin: 5px;\r\n border-color: var(--visualization-primary);\r\n z-index: 1;\r\n}\r\n\r\n.tooltip[x-placement^='top'] {\r\n margin-bottom: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='top'] .tooltip-arrow {\r\n border-width: 5px 5px 0 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n bottom: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] {\r\n margin-top: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='bottom'] .tooltip-arrow {\r\n border-width: 0 5px 5px 5px;\r\n border-left-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-top-color: transparent !important;\r\n top: -5px;\r\n left: calc(50% - 5px);\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n}\r\n\r\n.tooltip[x-placement^='right'] {\r\n margin-left: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='right'] .tooltip-arrow {\r\n border-width: 5px 5px 5px 0;\r\n border-left-color: transparent !important;\r\n border-top-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n left: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip[x-placement^='left'] {\r\n margin-right: 5px;\r\n}\r\n\r\n.tooltip[x-placement^='left'] .tooltip-arrow {\r\n border-width: 5px 0 5px 5px;\r\n border-top-color: transparent !important;\r\n border-right-color: transparent !important;\r\n border-bottom-color: transparent !important;\r\n right: -5px;\r\n top: calc(50% - 5px);\r\n margin-left: 0;\r\n margin-right: 0;\r\n}\r\n\r\n.tooltip.popover .popover-inner {\r\n background: #f9f9f9;\r\n color: black;\r\n padding: 24px;\r\n border-radius: 5px;\r\n box-shadow: 0 5px 30px rgba(black, 0.1);\r\n}\r\n\r\n.tooltip.popover .popover-arrow {\r\n border-color: #f9f9f9;\r\n}\r\n\r\n.tooltip[aria-hidden='true'] {\r\n visibility: hidden;\r\n opacity: 0;\r\n transition: opacity 0.15s, visibility 0.15s;\r\n}\r\n\r\n.tooltip[aria-hidden='false'] {\r\n visibility: visible;\r\n opacity: 1;\r\n transition: opacity 0.15s;\r\n}\r\n</style>\r\n"]}, media: undefined });
4483
4509
 
4484
4510
  };
4485
4511
  /* scoped */
4486
- const __vue_scope_id__ = "data-v-4a1abe45";
4512
+ const __vue_scope_id__ = "data-v-09946f69";
4487
4513
  /* module identifier */
4488
4514
  const __vue_module_identifier__ = undefined;
4489
4515
  /* functional template */