@twab/visualization 0.9.14 → 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 -953
  2. package/package.json +1 -1
@@ -1332,8 +1332,6 @@ FramesInterface.prototype.loadNextFrames = async function () {
1332
1332
  FramesInterface.prototype.loadPrevFrames = async function () {
1333
1333
  this.framesManager.previous();
1334
1334
 
1335
- console.log(this.framesManager.currentTime, this.firstFrameTime);
1336
-
1337
1335
  if (this.framesManager.currentTime < this.firstFrameTime) {
1338
1336
  await this.framesManager.goTo(this.firstFrameTime);
1339
1337
  await this.loadFrames();
@@ -1677,7 +1675,10 @@ var __vue_render__$4 = function () {
1677
1675
  _vm.commandBarShow
1678
1676
  ? _c(
1679
1677
  "div",
1680
- { staticClass: "visualization-row visualization-justify-center" },
1678
+ {
1679
+ staticClass:
1680
+ "visualization-row visualization-justify-center pt-3",
1681
+ },
1681
1682
  _vm._l(_vm.commandBarBtns, function (btn, index) {
1682
1683
  return _c("div", { key: "command-btn-" + index }, [
1683
1684
  !btn
@@ -1743,11 +1744,11 @@ __vue_render__$4._withStripped = true;
1743
1744
  /* style */
1744
1745
  const __vue_inject_styles__$4 = function (inject) {
1745
1746
  if (!inject) return
1746
- 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 });
1747
1748
 
1748
1749
  };
1749
1750
  /* scoped */
1750
- const __vue_scope_id__$4 = "data-v-6ca549de";
1751
+ const __vue_scope_id__$4 = "data-v-aa03c4c2";
1751
1752
  /* module identifier */
1752
1753
  const __vue_module_identifier__$4 = undefined;
1753
1754
  /* functional template */
@@ -2609,95 +2610,100 @@ var __vue_render__$1 = function () {
2609
2610
  })
2610
2611
  : _vm._e(),
2611
2612
  _vm._v(" "),
2612
- _c("dialog", { ref: "frames" }, [
2613
- _c(
2614
- "div",
2615
- {
2616
- staticClass: "visualization-row",
2617
- staticStyle: {
2618
- padding: "5px",
2619
- "font-weight": "bold",
2620
- "background-color": "var(--visualization-primary)",
2621
- "border-color": "var(--visualization-primary)",
2622
- height: "40px",
2623
- color: "white",
2624
- display: "flex",
2625
- "justify-content": "center",
2626
- "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
+ },
2627
2632
  },
2628
- },
2629
- [_vm._v("\n " + _vm._s(_vm.$t("infoBar.gridForm")) + "\n ")]
2630
- ),
2631
- _vm._v(" "),
2632
- _c(
2633
- "div",
2634
- {
2635
- staticClass: "visualization-row",
2636
- staticStyle: { "justify-content": "center" },
2637
- },
2638
- _vm._l(_vm.items, function (item, index) {
2639
- return _c(
2640
- "div",
2641
- {
2642
- key: index,
2643
- staticClass: "visualization-col",
2644
- 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",
2645
2680
  },
2646
- [
2647
- _c("img", {
2648
- style:
2649
- _vm.framesValue !== item.value
2650
- ? "filter: grayscale(1)"
2651
- : "",
2652
- 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
+ },
2653
2694
  on: {
2654
- click: function () {
2655
- return (_vm.framesValue = item.value)
2695
+ click: function ($event) {
2696
+ return _vm.$emit("close", "frames")
2656
2697
  },
2657
2698
  },
2658
- }),
2659
- ]
2660
- )
2661
- }),
2662
- 0
2663
- ),
2664
- _vm._v(" "),
2665
- _c("div", { staticClass: "visualization-divider" }),
2666
- _vm._v(" "),
2667
- _c(
2668
- "div",
2669
- {
2670
- staticClass: "visualization-row",
2671
- staticStyle: {
2672
- display: "flex",
2673
- "justify-content": "center",
2674
- "margin-top": "10px",
2675
- "margin-bottom": "10px",
2676
- },
2677
- },
2678
- [
2679
- _c(
2680
- "button",
2681
- {
2682
- staticStyle: {
2683
- "border-radius": "4px",
2684
- height: "35px",
2685
- width: "70px",
2686
- "background-color": "var(--visualization-primary)",
2687
- "border-color": "var(--visualization-primary)",
2688
- color: "white",
2689
- },
2690
- on: {
2691
- click: function ($event) {
2692
- return _vm.$emit("close", "frames")
2693
- },
2694
2699
  },
2695
- },
2696
- [_vm._v("\n Ok\n ")]
2697
- ),
2698
- ]
2699
- ),
2700
- ]),
2700
+ [_vm._v("\n Ok\n ")]
2701
+ ),
2702
+ ]
2703
+ ),
2704
+ ],
2705
+ 1
2706
+ ),
2701
2707
  _vm._v(" "),
2702
2708
  _c("dialog", { ref: "secondsPerFrame" }, [
2703
2709
  _c(
@@ -3035,11 +3041,11 @@ __vue_render__$1._withStripped = true;
3035
3041
  /* style */
3036
3042
  const __vue_inject_styles__$1 = function (inject) {
3037
3043
  if (!inject) return
3038
- 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 });
3039
3045
 
3040
3046
  };
3041
3047
  /* scoped */
3042
- const __vue_scope_id__$1 = "data-v-76bbde5a";
3048
+ const __vue_scope_id__$1 = "data-v-7082b87a";
3043
3049
  /* module identifier */
3044
3050
  const __vue_module_identifier__$1 = undefined;
3045
3051
  /* functional template */
@@ -3064,867 +3070,891 @@ __vue_render__$1._withStripped = true;
3064
3070
  );
3065
3071
 
3066
3072
  //
3067
-
3068
- const Positions = Object.freeze({
3069
- previous: 0,
3070
- current: 1,
3071
- next: 2,
3072
- });
3073
-
3074
- var script = {
3075
- name: 'visualization-container',
3076
- props: {
3077
- value: {
3078
- type: Boolean,
3079
- required: true,
3080
- },
3081
- date: {
3082
- type: String,
3083
- required: true,
3084
- },
3085
- channel: {
3086
- type: Number,
3087
- required: true,
3088
- },
3089
- startAudienceTime: {
3090
- type: String,
3091
- required: true,
3092
- },
3093
- videoProgressBar: {
3094
- type: Boolean,
3095
- default: false,
3096
- },
3097
- jumpOnInsert: {
3098
- type: Boolean,
3099
- default: false,
3100
- },
3101
- framesFormat: {
3102
- type: [Number, String],
3103
- default: 6,
3104
- },
3105
- maxSize: {
3106
- type: Number,
3107
- }
3108
- },
3109
- components: {
3110
- Frame: __vue_component__$5,
3111
- CommandBar: __vue_component__$4,
3112
- InfoBar: __vue_component__$3,
3113
- VideoProgress: __vue_component__$2,
3114
- Settings: __vue_component__$1,
3115
- // Help,
3116
- },
3117
- data() {
3118
- return {
3119
- Positions,
3120
- updatingChannel: null,
3121
- dialog: false,
3122
- timeLastBlock: null,
3123
- alternativeServer: false,
3124
- useCache: true,
3125
- numberOfRows: 1,
3126
- framesPerRow: 5,
3127
- secondsPerFrame: 1,
3128
- fInterface: null,
3129
- velocity: 1,
3130
- frames: [],
3131
- previousFrames: [],
3132
- nextFrames: [],
3133
- channelCode: 0,
3134
- videoPlaying: false,
3135
- activeFrame: null,
3136
- activeVideo: null,
3137
- videoTime: 0,
3138
- videoTotalTime: null,
3139
- progressVideoDrag: false,
3140
- hourIniSelected: false,
3141
- hourEndSelected: false,
3142
- canInsertTime: false,
3143
- lastHeight: 0,
3144
- loopInterval: null,
3145
- nextLoop: false,
3146
- prevLoop: false,
3147
- videoSliderTotalDuration: 900,
3148
- blockStartTime: null,
3149
- media: null,
3150
- changeServer: false,
3151
- userMultiTabsGrid: false,
3152
- userMultiTabsGridsModel: true,
3153
- playbackRate: 1,
3154
- paused: false,
3155
- commandBarShow: true,
3156
- dialogs: {
3157
- playbackRate: false,
3158
- goTo: false,
3159
- secondsPerFrame: false,
3160
- frames: false,
3161
- },
3162
- }
3163
- },
3164
- async created() {
3165
- this.changeServer = this.serverOfFrames === 'alternative';
3166
- this.alternativeServer = this.serverOfFrames === 'alternative';
3167
-
3168
- const settings = [
3169
- {
3170
- framesPerRow: 2,
3171
- numberOfRows: 1,
3172
- },
3173
- {
3174
- framesPerRow: 3,
3175
- numberOfRows: 1,
3176
- },
3177
- {
3178
- framesPerRow: 3,
3179
- numberOfRows: 2,
3180
- },
3181
- {
3182
- framesPerRow: 4,
3183
- numberOfRows: 1,
3184
- },
3185
- {
3186
- framesPerRow: 4,
3187
- numberOfRows: 2,
3188
- },
3189
- {
3190
- framesPerRow: 5,
3191
- numberOfRows: 1,
3192
- },
3193
- {
3194
- framesPerRow: 5,
3195
- numberOfRows: 2,
3196
- },
3197
- {
3198
- framesPerRow: 6,
3199
- numberOfRows: 1,
3200
- },
3201
- {
3202
- framesPerRow: 6,
3203
- numberOfRows: 2,
3204
- },
3205
- ];
3206
-
3207
- const storedOnDb = settings[parseInt(this.framesFormat) - 1];
3208
- this.framesPerRow = storedOnDb.framesPerRow;
3209
- this.numberOfRows = storedOnDb.numberOfRows;
3210
-
3211
- await this.createFramesInterface();
3212
- if (this.maxSize) {
3213
- this.resize(this.maxSize, true);
3214
- }
3215
- },
3216
- methods: {
3217
- framesClicked(e) {
3218
- if (e.target.id != 'insert') {
3219
- this.active = true;
3220
- }
3221
- },
3222
- async goToStartBlock() {
3223
- try {
3224
- const d = new Date();
3225
- let timestamp = Date.UTC(
3226
- d.getFullYear(),
3227
- d.getMonth(),
3228
- d.getDate(),
3229
- d.getHours(),
3230
- d.getMinutes(),
3231
- d.getSeconds()
3232
- );
3233
-
3234
- const response = (
3235
- await FramesService.getNextAvailableBlock({
3236
- channel: this.channel,
3237
- time: timestamp / 1000,
3238
- })
3239
- ).data;
3240
-
3241
- this.dialog = false;
3242
- this.changeHour(this.convertToAudienceTime(response.data.start, ':'));
3243
- } catch (err) {
3244
- console.error(err);
3245
- }
3246
- },
3247
- async checkAvailableBlock() {
3248
- try {
3249
- const d = new Date();
3250
- let timestamp = Date.UTC(
3251
- d.getFullYear(),
3252
- d.getMonth(),
3253
- d.getDate(),
3254
- d.getHours(),
3255
- d.getMinutes(),
3256
- d.getSeconds()
3257
- );
3258
-
3259
- const response = (
3260
- await FramesService.getNextAvailableBlock({
3261
- channel: this.channel,
3262
- time: timestamp / 1000,
3263
- })
3264
- ).data;
3265
-
3266
- this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':');
3267
- this.dialog = true;
3268
- if (!response.status) {
3269
- this.timeLastBlock = 'N/D';
3270
- }
3271
- } catch (err) {
3272
- console.error(err);
3273
- }
3274
- },
3275
- updateSlider(videoStartTime, time) {
3276
- // * atualizar slider se estiver fora do range definido previamente
3277
- if (
3278
- time < this.blockStartTime ||
3279
- time > this.blockStartTime ||
3280
- videoStartTime > this.blockStartTime + this.videoSliderTotalDuration
3281
- ) {
3282
- this.blockStartTime = videoStartTime;
3283
- this.videoSliderTotalDuration = 900;
3284
- }
3285
- },
3286
- nextLoopActivate() {
3287
- this.breakLoop();
3288
- this.loopInterval = setInterval(this.next, 40);
3289
- setTimeout(() => {
3290
- this.nextLoop = true;
3291
- }, 0);
3292
- },
3293
- prevLoopActivate() {
3294
- this.breakLoop();
3295
- this.loopInterval = setInterval(this.prev, 40);
3296
- setTimeout(() => {
3297
- this.prevLoop = true;
3298
- }, 0);
3299
- },
3300
- breakLoop() {
3301
- clearInterval(this.loopInterval);
3302
- this.loopInterval = null;
3303
- this.nextLoop = false;
3304
- this.prevLoop = false;
3305
- },
3306
- changePlayPause(status) {
3307
- this.paused = !status;
3308
- },
3309
- resize(height=this.lastHeight) {
3310
- this.lastHeight = height;
3311
- if (this.$refs.frames) {
3312
- for (let frame of this.$refs.frames) {
3313
- frame.resize(height);
3314
- }
3315
- }
3316
- this.$emit('resized');
3317
- },
3318
- async goToFirstFrame() {
3319
- let frames = this.$refs.frames;
3320
-
3321
- let audienceTime = null;
3322
- if (frames.length > 0) {
3323
- let frame = frames[0].frame;
3324
- audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3325
- }
3326
- // if (audienceTime) {
3327
- // this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))
3328
- // }
3329
- if (audienceTime) {
3330
- const [hours, minutes, seconds] = audienceTime.split(':');
3331
- const totalSeconds =
3332
- parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds);
3333
- if (totalSeconds >= 9000)
3334
- this.changeHour(this.getLastFirtsBlockTime(audienceTime, true));
3335
- else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true));
3336
- }
3337
- },
3338
- async goToLastFrame() {
3339
- let frames = this.$refs.frames;
3340
- let audienceTime = null;
3341
- if (frames.length > 0) {
3342
- let frame = frames[0].frame;
3343
-
3344
- audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
3345
- }
3346
- if (audienceTime) {
3347
- this.changeHour(this.getLastFirtsBlockTime(audienceTime));
3348
- }
3349
- },
3350
- getLastFirtsBlockTime(time, first = false) {
3351
- if (time.indexOf(':') !== -1) {
3352
- time = time.replace(/:/g, '');
3353
- }
3354
- let h, m, newTime;
3355
- const t = time.match(/.{1,2}/g);
3356
- if (t[0] && t[1]) {
3357
- h = parseInt(t[0]);
3358
- m = parseInt(t[1]);
3359
- }
3360
- if (h < 26) {
3361
- if (m < 15)
3362
- if (first) newTime = t[0] + ':00:00';
3363
- else newTime = t[0] + ':14:59';
3364
- else if (m < 30)
3365
- if (first) newTime = t[0] + ':15:00';
3366
- else newTime = t[0] + ':29:59';
3367
- else if (m < 45)
3368
- if (first) newTime = t[0] + ':30:00';
3369
- else newTime = t[0] + ':44:59';
3370
- else if (first) newTime = t[0] + ':45:00';
3371
- else newTime = t[0] + ':59:59';
3372
- } else {
3373
- if (m < 15)
3374
- if (first) newTime = '26:00:00';
3375
- else newTime = '26:14:59';
3376
- else {
3377
- if (first) newTime = '26:15:00';
3378
- else newTime = '26:29:59';
3379
- }
3380
- }
3381
- return newTime
3382
- },
3383
- openBlocks() {
3384
- this.$refs.settings2?.openBlocks();
3385
- },
3386
- playOrPause() {
3387
- const array = this.$refs.frames.filter((fc) => !!fc.active);
3388
- if (array.length === 1) {
3389
- const frame = array[0];
3390
- frame.playOrPause(this.playbackRate);
3391
- }
3392
- },
3393
- stopPlayingBar() {
3394
- for (let ref of this.$refs.frames) {
3395
- if (
3396
- ref.videoStatus === ref.Status.playing ||
3397
- ref.videoStatus === ref.Status.paused
3398
- ) {
3399
- ref.stop(false);
3400
- }
3401
- }
3402
- },
3403
- async setFrameSelection(selected) {
3404
- this.frames = this.loadingArray;
3405
- switch (parseInt(selected)) {
3406
- // 2x1
3407
- case 1:
3408
- this.framesPerRow = 2;
3409
- this.numberOfRows = 1;
3410
- break
3411
- // 3x1
3412
- case 2:
3413
- this.framesPerRow = 3;
3414
- this.numberOfRows = 1;
3415
- break
3416
- // 3x2
3417
- case 3:
3418
- this.framesPerRow = 3;
3419
- this.numberOfRows = 2;
3420
- break
3421
- // 4x1
3422
- case 4:
3423
- this.framesPerRow = 4;
3424
- this.numberOfRows = 1;
3425
- break
3426
- // 4x2
3427
- case 5:
3428
- this.framesPerRow = 4;
3429
- this.numberOfRows = 2;
3430
- break
3431
- // 5x1
3432
- case 6:
3433
- this.framesPerRow = 5;
3434
- this.numberOfRows = 1;
3435
- break
3436
- // 5x2
3437
- case 7:
3438
- this.framesPerRow = 5;
3439
- this.numberOfRows = 2;
3440
- break
3441
- // 6x1
3442
- case 8:
3443
- this.framesPerRow = 6;
3444
- this.numberOfRows = 1;
3445
- break
3446
- // 6x2
3447
- case 9:
3448
- this.framesPerRow = 6;
3449
- this.numberOfRows = 2;
3450
- break
3451
- }
3452
- await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow);
3453
- this.getFramesArray();
3454
- setTimeout(() => {
3455
- for (let ref of this.$refs.frames) {
3456
- ref?.resize(this.lastHeight);
3457
- }
3458
- }, 150);
3459
- },
3460
- getFramesArray() {
3461
- this.frames = this.fInterface.getFrames(Positions.current);
3462
- this.nextFrames = this.fInterface.getFrames(Positions.next);
3463
- this.previousFrames = this.fInterface.getFrames(Positions.previous);
3464
- },
3465
- async createFramesInterface() {
3466
- this.frames = this.loadingArray;
3467
- let ch = this.channel;
3468
- let associationTMP = {
3469
- 1735073: 1,
3470
- 1735074: 139,
3471
- 1735075: 3,
3472
- 1735076: 132,
3473
- };
3474
- //
3475
- this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch;
3476
-
3477
- const t = this.startAudienceTime.match(/.{1,2}/g);
3478
- const d = this.getDateParts();
3479
- const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3480
- // * iniciar slider
3481
- this.blockStartTime = time;
3482
- this.fInterface = await new FramesInterface(
3483
- this.channelCode,
3484
- this.numberOfRows,
3485
- this.framesPerRow,
3486
- time,
3487
- this.startAudienceTime,
3488
- this.useCache
3489
- );
3490
- await this.fInterface.init();
3491
-
3492
- this.getFramesArray();
3493
-
3494
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3495
-
3496
- this.activeVideo = null;
3497
- },
3498
- getIndex(rowNumber, frameIndex, position) {
3499
- let from = this.framesPerRow * this.numberOfRows * position;
3500
- let till = this.framesPerRow * this.numberOfRows * (position + 1);
3501
-
3502
- return (from + till * (rowNumber - 1)) / rowNumber + frameIndex
3503
- },
3504
- getAudienceTime(frameTime, rowNumber, frameNumber, position) {
3505
- if (!frameTime) {
3506
- return 'Loading...'
3507
- } else if (
3508
- this.getIndex(rowNumber, frameNumber, position) === this.activeVideo
3509
- ) {
3510
- return this.convertToAudienceTime(this.videoTime)
3511
- } else {
3512
- return this.convertToAudienceTime(frameTime)
3513
- }
3514
- },
3515
- dateInUtc(miliSeconds) {
3516
- var date = new Date(miliSeconds);
3517
- var utc = new Date(
3518
- date.getUTCFullYear(),
3519
- date.getUTCMonth(),
3520
- date.getUTCDate(),
3521
- date.getUTCHours(),
3522
- date.getUTCMinutes(),
3523
- date.getUTCSeconds()
3524
- );
3525
- return utc
3526
- },
3527
- convertToAudienceTime(time, separator = ':') {
3528
- const d = this.getDateParts();
3529
- const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3530
-
3531
- let hour = this.dateInUtc(time * 1000)
3532
- .toTimeString()
3533
- .split(' ')[0]
3534
- .split(':')
3535
- .map(Number);
3536
-
3537
- if (time > limit && time <= limit + this.startAudienceSeconds) {
3538
- hour[0] = 24 + hour[0];
3539
- }
3540
- return hour
3541
- .map((part) => (part > 9 ? part.toString() : '0' + part))
3542
- .join(separator)
3543
- },
3544
- getDateParts(date = this.date) {
3545
- const d = new Date(date);
3546
- return {
3547
- year: d.getFullYear(),
3548
- month: d.getMonth(),
3549
- day: d.getDate(),
3550
- }
3551
- },
3552
- selectFrame(index, frame) {
3553
- const d = this.getDateParts();
3554
- const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
3555
- const frameTime = frame?.time;
3556
-
3557
- if (frameTime - (this.startAudienceSeconds + limit) <= 0) {
3558
- if (this.hourIniSelected === true) {
3559
- this.hourIniSelected = frameTime;
3560
-
3561
- if (
3562
- this.hourEndSelected &&
3563
- this.hourIniSelected > this.hourEndSelected
3564
- ) {
3565
- this.hourEndSelected = false;
3566
- }
3567
- } else if (this.hourEndSelected === true) {
3568
- if (frameTime > this.hourIniSelected) {
3569
- this.hourEndSelected = frameTime;
3570
- this.canInsertTime = true;
3571
- } else {
3572
- this.hourEndSelected = false;
3573
- }
3574
- }
3575
- }
3576
-
3577
- if (this.activeFrame !== index) {
3578
- // ? Se clicar no frame diferente de onde está a dar play, faz pausa
3579
- const array = this.$refs.frames.filter(
3580
- (fc) => fc.videoStatus === fc.Status.playing
3581
- );
3582
- if (array.length === 1) {
3583
- const frame = array[0];
3584
- frame.playOrPause();
3585
- }
3586
- this.activeVideo = null;
3587
- this.activeFrame = index;
3588
- }
3589
- },
3590
- setHourIni() {
3591
- this.canInsertTime = true;
3592
- this.hourIniSelected = true;
3593
- document.getElementById(`frame-${this.activeFrame}`).click();
3594
- this.$emit('setHourIni', {
3595
- hour_ini: this.hourIniSelected
3596
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3597
- : null,
3598
- });
3599
- },
3600
- setHourEnd() {
3601
- this.canInsertTime = true;
3602
- this.hourEndSelected = true;
3603
- document.getElementById(`frame-${this.activeFrame}`).click();
3604
- },
3605
- //* Navegação
3606
- arrowRight() {
3607
- if (this.checkLimitRight(false)) {
3608
- if (
3609
- this.activeFrame ===
3610
- this.numberOfRows * this.framesPerRow * 2 - 1
3611
- ) {
3612
- this.next();
3613
- } else {
3614
- this.activeFrame++;
3615
- }
3616
- }
3617
- },
3618
- arrowLeft() {
3619
- if (this.checkLimitLeft(false)) {
3620
- if (this.activeFrame === this.numberOfRows * this.framesPerRow) {
3621
- this.prev();
3622
- } else {
3623
- this.activeFrame--;
3624
- }
3625
- }
3626
- },
3627
- checkLimitRight(value) {
3628
- const d = this.getDateParts();
3629
- const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59);
3630
-
3631
- if (value) {
3632
- return (
3633
- high > (this.fInterface.getCurrentTime() - 1) * 1000 &&
3634
- this.nextFrames[0].title !== -1
3635
- )
3636
- } else {
3637
- // return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000
3638
- return high > this.fInterface.getCurrentTime() * 1000
3639
- }
3640
- },
3641
- checkLimitLeft(value) {
3642
- const d = this.getDateParts();
3643
- const low = Date.UTC(d.year, d.month, d.day, 2, 30, 0);
3644
-
3645
- if (value) {
3646
- return low <= (this.fInterface.getCurrentTime() - 1) * 1000
3647
- } else {
3648
- return (
3649
- low <
3650
- (this.fInterface.getCurrentTime() +
3651
- this.activeFrame -
3652
- this.numberOfRows * this.framesPerRow) *
3653
- 1000
3654
- )
3655
- }
3656
- },
3657
- async next() {
3658
- if (this.checkLimitRight(true)) {
3659
- const array = this.$refs.frames.filter(
3660
- (fc) =>
3661
- fc.videoStatus === fc.Status.playing ||
3662
- fc.videoStatus === fc.Status.paused
3663
- );
3664
-
3665
- if (array.length === 1) {
3666
- const frame = array[0];
3667
- frame.stop(false);
3668
- }
3669
- this.fInterface.setCurrentStep(this.secondsPerFrame);
3670
- await this.fInterface.loadNextFrames();
3671
-
3672
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3673
- this.activeVideo = null;
3674
-
3675
- this.getFramesArray();
3676
- }
3677
- },
3678
- async prev() {
3679
- if (this.checkLimitLeft(true)) {
3680
- const array = this.$refs.frames.filter(
3681
- (fc) =>
3682
- fc.videoStatus === fc.Status.playing ||
3683
- fc.videoStatus === fc.Status.paused
3684
- );
3685
- if (array.length === 1) {
3686
- const frame = array[0];
3687
- frame.stop(false);
3688
- }
3689
-
3690
- this.fInterface.setCurrentStep(this.secondsPerFrame);
3691
- await this.fInterface.loadPrevFrames();
3692
-
3693
- this.activeFrame = this.getIndex(
3694
- this.numberOfRows,
3695
- this.framesPerRow - 1,
3696
- Positions.current
3697
- );
3698
- this.activeVideo = null;
3699
-
3700
- this.getFramesArray();
3701
- }
3702
- },
3703
- async setStartTime(time) {
3704
- if (time.indexOf(':') !== -1) {
3705
- time = time.replace(/:/g, '');
3706
- }
3707
- const t = time.match(/.{1,2}/g);
3708
- const d = this.getDateParts();
3709
- const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3710
- this.frames = this.loadingArray;
3711
-
3712
- await this.fInterface.changeTime(setTime);
3713
-
3714
- this.getFramesArray();
3715
-
3716
- this.activeFrame = this.getIndex(1, 0, Positions.current);
3717
- // let frames = this.$refs.frames
3718
-
3719
- // let audienceTime = null
3720
- // if (frames.length > 0) {
3721
- // let frame = frames[0].frame
3722
- // audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)
3723
- // }
3724
-
3725
- this.activeVideo = null;
3726
-
3727
- return true
3728
- },
3729
- hourToTimeStamp(time) {
3730
- if (time.indexOf(':') !== -1) {
3731
- time = time.replace(/:/g, '');
3732
- }
3733
- const t = time.match(/.{1,2}/g);
3734
- const d = this.getDateParts();
3735
- const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
3736
-
3737
- return setTime
3738
- },
3739
- async changeHour(value) {
3740
- if (value) {
3741
- setTimeout(() => {
3742
- const array = this.$refs.frames.filter(
3743
- (fc) =>
3744
- fc.videoStatus === fc.Status.playing ||
3745
- fc.videoStatus === fc.Status.paused
3746
- );
3747
-
3748
- if (array.length === 1) {
3749
- const frame = array[0];
3750
- frame.stop(false);
3751
- }
3752
-
3753
- this.setStartTime(value, true);
3754
- }, 0);
3755
- }
3756
- },
3757
- changeBlockInterval(value) {
3758
- this.changeHour(value.ini);
3759
- let time_ini, time_end;
3760
- time_ini = this.hourToTimeStamp(value.ini);
3761
- time_end = this.hourToTimeStamp(value.end);
3762
- this.videoSliderTotalDuration = time_end - time_ini;
3763
- this.$refs.frames[0].changeSettings(time_ini);
3764
- this.blockStartTime = time_ini;
3765
- },
3766
- //eslint-disable-next-line
3767
- async updateVideoTime(index, videoTime) {
3768
- this.activeVideo = index;
3769
- this.videoTime = videoTime;
3770
- },
3771
- //eslint-disable-next-line
3772
- updateVideoStatus(currentTime) {
3773
- if (!this.progressVideoDrag) ;
3774
- },
3775
- async startPlaying(frame, totalTime) {
3776
- const array = this.$refs.frames.filter(
3777
- (fc) => fc.frame.time !== frame.time
3778
- );
3779
-
3780
- for (let ref of array) {
3781
- if (
3782
- ref.videoStatus === ref.Status.playing ||
3783
- ref.videoStatus === ref.Status.paused
3784
- ) {
3785
- ref.stop(false);
3786
- }
3787
- }
3788
-
3789
- this.videoTotalTime = totalTime;
3790
- this.videoPlaying = true;
3791
- },
3792
- stopPlaying() {
3793
- this.videoTotalTime = null;
3794
- this.videoPlaying = false;
3795
- this.paused = false;
3796
- },
3797
- insertTime() {
3798
- this.$emit('timeToInsert', {
3799
- channel: this.channel,
3800
- hour_ini: this.hourIniSelected
3801
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3802
- : null,
3803
- hour_end: this.hourEndSelected
3804
- ? this.convertToAudienceTime(this.hourEndSelected, '')
3805
- : null,
3806
- force: false,
3807
- });
3808
-
3809
- if (this.jumpOnInsert) {
3810
- this.changeHour(
3811
- this.convertToAudienceTime(
3812
- (this.hourEndSelected || this.hourIniSelected) + 1
3813
- )
3814
- );
3815
- }
3816
-
3817
- this.hourIniSelected = null;
3818
- this.hourEndSelected = null;
3819
- this.canInsertTime = false;
3820
-
3821
- // this.fInterface.setCurrentPosition(this.hourEndSelected)
3822
- },
3823
- insertTimeForce() {
3824
- this.$emit('timeToInsert', {
3825
- channel: this.channel,
3826
- hour_ini: this.hourIniSelected
3827
- ? this.convertToAudienceTime(this.hourIniSelected, '')
3828
- : null,
3829
- hour_end: this.hourEndSelected
3830
- ? this.convertToAudienceTime(this.hourEndSelected, '')
3831
- : null,
3832
- force: true,
3833
- });
3834
-
3835
- this.hourIniSelected = null;
3836
- this.hourEndSelected = null;
3837
- this.canInsertTime = false;
3838
-
3839
- // this.fInterface.setCurrentPosition(this.hourEndSelected)
3840
- },
3841
- async getChannelMedia() {
3842
- // this.media = (await ChannelService.show(this.channel)).data.MEDIA
3843
- },
3844
- async changeServerClick() {
3845
- this.changeServer = !this.changeServer;
3846
- // this.$store.dispatch(
3847
- // 'serverOfFrames',
3848
- // this.changeServer ? 'alternative' : 'default'
3849
- // )
3850
- sessionStorage.setItem(
3851
- 'serverOfFrames',
3852
- this.changeServer ? 'alternative' : 'default'
3853
- );
3854
-
3855
- // if (this.$route.params.time != this.frames[0].time)
3856
- // this.$router.push({
3857
- // name: 'grid',
3858
- // params: {
3859
- // date: this.date,
3860
- // channel: this.channelCode,
3861
- // time: this.frames[0].time,
3862
- // },
3863
- // })
3864
- location.reload();
3865
- },
3866
- },
3867
- computed: {
3868
- active: {
3869
- get() {
3870
- return this.value
3871
- },
3872
- set(value) {
3873
- this.$emit('input', value);
3874
- },
3875
- },
3876
- settingsClosed() {
3877
- return !Object.values(this.dialogs).find((v) => v)
3878
- },
3879
- startAudienceSeconds() {
3880
- const t = this.startAudienceTime.match(/.{1,2}/g);
3881
- return parseInt(t[0] * 3600 + t[1] * 60 + t[2])
3882
- },
3883
- loadingArray() {
3884
- return Array.from(Array(this.numberOfRows * this.framesPerRow).keys())
3885
- },
3886
- serverOfFrames() {
3887
- return sessionStorage.getItem('server')
3888
- },
3889
- },
3890
- watch: {
3891
- framesFormat(value) {
3892
- this.setFrameSelection(value);
3893
- },
3894
- active() {
3895
- // ? sempre que trocamos de tabs dar reset as horas selected
3896
- this.hourIniSelected = false;
3897
- this.hourEndSelected = false;
3898
- },
3899
- useCache() {
3900
- this.createFramesInterface();
3901
- },
3902
- hourIniSelected(value) {
3903
- if (value) {
3904
- sessionStorage.setItem(
3905
- 'currentTimeFrames',
3906
- this.convertToAudienceTime(this.hourIniSelected, '')
3907
- );
3908
- } else {
3909
- sessionStorage.removeItem('currentTimeFrames');
3910
- }
3911
- },
3912
- activeFrame(value) {
3913
- if (value) {
3914
- this.stopPlayingBar();
3915
- }
3916
- },
3917
- channel() {
3918
- this.updatingChannel = new Promise((resolve, reject) => {
3919
- try {
3920
- this.createFramesInterface();
3921
- resolve(true);
3922
- } catch (err) {
3923
- reject(err);
3924
- }
3925
- });
3926
- },
3927
- },
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
+ },
3928
3958
  };
3929
3959
 
3930
3960
  /* script */
@@ -4475,11 +4505,11 @@ __vue_render__._withStripped = true;
4475
4505
  /* style */
4476
4506
  const __vue_inject_styles__ = function (inject) {
4477
4507
  if (!inject) return
4478
- inject("data-v-02843f0a_0", { source: "\n.visualization-row[data-v-02843f0a] {\n display: flex;\n flex-wrap: wrap;\n flex: 1 1 auto;\n}\n.visualization-col[data-v-02843f0a] {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n padding: 12px;\n}\n.visualization-divider[data-v-02843f0a] {\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-02843f0a] {\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-02843f0a] {\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-02843f0a],[data-v-02843f0a] .visualization-justify-center {\n justify-content: center;\n}\n.visualization-align-center[data-v-02843f0a] {\n align-items: center;\n}\n#visualization-container[data-v-02843f0a] {\n max-width: 100% !important;\n margin: 0 auto !important;\n height: 100%;\n border-bottom: none;\n}\n#visualization-container > .card[data-v-02843f0a] {\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-02843f0a],\n#info-bar[data-v-02843f0a] {\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-02843f0a] {\n width: 42px;\n height: 36px;\n border: none;\n background: none;\n}\n#command-bar button[data-v-02843f0a]:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.12);\n}\n#command-bar svg[data-v-02843f0a] {\n font-size: 16px;\n}\n#command-bar[data-v-02843f0a] {\n padding: 0 !important;\n}\n#info-bar[data-v-02843f0a] {\n padding: 4px;\n font-size: 14px;\n position: relative;\n}\n.settings-container[data-v-02843f0a] {\n position: absolute;\n right: 14px;\n top: 50%;\n transform: translateY(-50%);\n}\n.settings-container > *[data-v-02843f0a] {\n margin: 0 2px;\n cursor: pointer;\n}\n#info-bar svg[data-v-02843f0a] {\n font-size: 16px;\n}\n#info-bar .divider[data-v-02843f0a] {\n margin: 0 8px;\n}\nsvg[data-v-02843f0a]:focus {\n border: none;\n}\n.visualization-card[data-v-02843f0a] {\n border-left: 8px solid #eee;\n}\n.active-tab[data-v-02843f0a] {\n border-left: 8px solid var(--visualization-primary) !important;\n border-image-slice: 1;\n}\n[id^='frame-'][data-v-02843f0a] {\n padding: 1px;\n display: flex;\n flex-flow: column;\n}\n.tooltip[data-v-02843f0a] {\n display: block !important;\n z-index: 10000;\n}\n.tooltip .tooltip-inner[data-v-02843f0a] {\n background: var(--visualization-primary);\n color: white;\n border-radius: 16px;\n padding: 5px 10px 4px;\n}\n.tooltip .tooltip-arrow[data-v-02843f0a] {\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-02843f0a] {\n margin-bottom: 5px;\n}\n.tooltip[x-placement^='top'] .tooltip-arrow[data-v-02843f0a] {\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-02843f0a] {\n margin-top: 5px;\n}\n.tooltip[x-placement^='bottom'] .tooltip-arrow[data-v-02843f0a] {\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-02843f0a] {\n margin-left: 5px;\n}\n.tooltip[x-placement^='right'] .tooltip-arrow[data-v-02843f0a] {\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-02843f0a] {\n margin-right: 5px;\n}\n.tooltip[x-placement^='left'] .tooltip-arrow[data-v-02843f0a] {\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-02843f0a] {\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-02843f0a] {\n border-color: #f9f9f9;\n}\n.tooltip[aria-hidden='true'][data-v-02843f0a] {\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.15s, visibility 0.15s;\n}\n.tooltip[aria-hidden='false'][data-v-02843f0a] {\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":";AA0mCA;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 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 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 d = this.getDateParts()\n const low = Date.UTC(d.year, d.month, d.day, 2, 30, 0)\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 });
4479
4509
 
4480
4510
  };
4481
4511
  /* scoped */
4482
- const __vue_scope_id__ = "data-v-02843f0a";
4512
+ const __vue_scope_id__ = "data-v-09946f69";
4483
4513
  /* module identifier */
4484
4514
  const __vue_module_identifier__ = undefined;
4485
4515
  /* functional template */