SpyGuard/app/frontend/dist/js/chunk-2e6079ad.3f383516.js.map
2023-09-10 19:10:26 +02:00

1 line
18 KiB
Plaintext
Executable File

{"version":3,"sources":["webpack:///./node_modules/@fnando/sparkline/dist/sparkline.commonjs2.js","webpack:///./src/views/capture.vue","webpack:///src/views/capture.vue","webpack:///./src/views/capture.vue?a076","webpack:///./src/views/capture.vue?0c77"],"names":["module","exports","t","e","r","n","o","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","parseFloat","toFixed","a","u","document","createElementNS","setAttribute","querySelectorAll","forEach","removeChild","length","map","onmousemove","onmouseout","interactive","f","spotRadius","cursorWidth","v","attributes","b","fetch","h","y","width","x","height","g","Math","max","apply","A","w","j","O","k","S","concat","push","assign","index","M","class","fill","C","stroke","appendChild","E","x1","x2","y1","y2","_","cx","cy","F","style","addEventListener","offsetX","find","indexOf","Array","isArray","iterator","toString","from","TypeError","render","_vm","this","_c","_self","staticClass","sparklines","attrs","sparkwidth","sparkheight","_e","_v","_s","timer_hours","timer_minutes","timer_seconds","$t","device_name","on","$event","stop_capture","staticRenderFns","name","components","data","stats_interval","chrono_interval","props","capture_token","String","methods","set_chrono","console","log","setInterval","chrono","axios","timeout","clearInterval","window","access_point","router","replace","params","get_stats","then","response","handle_stats","packets","sparkline","querySelector","time","Date","now","capture_start","floor","setup_sparklines","screen","trunc","catch","error","created","component"],"mappings":"mGAAAA,EAAOC,QAAQ,SAASC,GAAG,IAAIC,EAAE,GAAG,SAASC,EAAEC,GAAG,GAAGF,EAAEE,GAAG,OAAOF,EAAEE,GAAGJ,QAAQ,IAAIK,EAAEH,EAAEE,GAAG,CAACE,EAAEF,EAAEG,GAAE,EAAGP,QAAQ,IAAI,OAAOC,EAAEG,GAAGI,KAAKH,EAAEL,QAAQK,EAAEA,EAAEL,QAAQG,GAAGE,EAAEE,GAAE,EAAGF,EAAEL,QAAQ,OAAOG,EAAEM,EAAER,EAAE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AG,IAAAnH,IAAA,sBAAAoH,QAAA,MACAQ,KAAAC,GAAA,KAAAC,aAAAD,EAAAtB,QAEAuB,aAAA,SAAAvB,GACAA,EAAAwB,QAAAzG,QAAA0G,IAAAhH,SAAAiH,cAAA,cAAA1B,EAAAwB,UAEAb,OAAA,WACA,IAAAgB,EAAAC,KAAAC,MAAA,KAAAC,cACA,KAAAzC,YAAApD,KAAA8F,MAAAJ,EAAA,MACA,KAAAtC,YAAA,KAAAA,YAAA,YAAAA,YAAA,KAAAA,YACAsC,GAAA,KACA,KAAArC,cAAArD,KAAA8F,MAAAJ,EAAA,KACA,KAAArC,cAAA,KAAAA,cAAA,YAAAA,cAAA,KAAAA,cACAqC,GAAA,IACA,KAAApC,cAAAtD,KAAA8F,MAAAJ,EAAA,KACA,KAAApC,cAAA,KAAAA,cAAA,YAAAA,cAAA,KAAAA,eAEAyC,iBAAA,WACApB,IAAAnH,IAAA,oBAAAoH,QAAA,MACAQ,KAAAC,IACAA,EAAAtB,KAAAlB,aACA0B,QAAAC,IAAA,uCACA,KAAA3B,YAAA,EACA,KAAAE,WAAA+B,OAAAkB,OAAApG,MAAA,KACA,KAAAoD,YAAAhD,KAAAiG,MAAAnB,OAAAkB,OAAAlG,OAAA,QACA,KAAAkE,eAAAS,YAAA,UAAAU,aAAA,QAGAe,MAAAC,IACA5B,QAAAC,IAAA2B,OAIAC,QAAA,WACA7B,QAAAC,IAAA,qCAGA,KAAAuB,mBAGA,KAAAF,cAAAF,KAAAC,MACA,KAAAtB,eC9FiV,I,YCO7U+B,EAAY,eACd,EACA9D,EACAqB,GACA,EACA,KACA,KACA,MAIa,aAAAyC,E","file":"js/chunk-2e6079ad.3f383516.js","sourcesContent":["module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,\"a\",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p=\"\",r(r.s=1)}([function(t,e,r){var n=r(2),o=r(3),i=r(4);t.exports=function(t){return n(t)||o(t)||i()}},function(t,e,r){\"use strict\";r.r(e),r.d(e,\"sparkline\",function(){return c});var n=r(0),o=r.n(n);function i(t,e,r,n){return parseFloat((e-n*e/t+r).toFixed(2))}function a(t){return t.value}function u(t,e){var r=document.createElementNS(\"http://www.w3.org/2000/svg\",t);for(var n in e)r.setAttribute(n,e[n]);return r}function c(t,e,r){var n;if(n=t,o()(n.querySelectorAll(\"*\")).forEach(function(t){return n.removeChild(t)}),!(e.length<=1)){r=r||{},\"number\"==typeof e[0]&&(e=e.map(function(t){return{value:t}}));var c=r.onmousemove,l=r.onmouseout,s=\"interactive\"in r?r.interactive:!!c,f=r.spotRadius||2,p=2*f,d=r.cursorWidth||2,v=parseFloat(t.attributes[\"stroke-width\"].value),b=r.fetch||a,h=e.map(function(t){return b(t)}),y=parseFloat(t.attributes.width.value)-2*p,x=parseFloat(t.attributes.height.value),m=x-2*v-p,g=Math.max.apply(Math,o()(h)),A=-1e3,w=h.length-1,j=y/w,O=[],k=i(g,m,v+f,h[0]),S=\"M\".concat(p,\" \").concat(k);h.forEach(function(t,r){var n=r*j+p,o=i(g,m,v+f,t);O.push(Object.assign({},e[r],{index:r,x:n,y:o})),S+=\" L \".concat(n,\" \").concat(o)});var M=u(\"path\",{class:\"sparkline--line\",d:S,fill:\"none\"}),C=u(\"path\",{class:\"sparkline--fill\",d:\"\".concat(S,\" V \").concat(x,\" L \").concat(p,\" \").concat(x,\" Z\"),stroke:\"none\"});if(t.appendChild(C),t.appendChild(M),s){var E=u(\"line\",{class:\"sparkline--cursor\",x1:A,x2:A,y1:0,y2:x,\"stroke-width\":d}),_=u(\"circle\",{class:\"sparkline--spot\",cx:A,cy:A,r:f});t.appendChild(E),t.appendChild(_);var F=u(\"rect\",{width:t.attributes.width.value,height:t.attributes.height.value,style:\"fill: transparent; stroke: transparent\",class:\"sparkline--interaction-layer\"});t.appendChild(F),F.addEventListener(\"mouseout\",function(t){E.setAttribute(\"x1\",A),E.setAttribute(\"x2\",A),_.setAttribute(\"cx\",A),l&&l(t)}),F.addEventListener(\"mousemove\",function(t){var e=t.offsetX,r=O.find(function(t){return t.x>=e});r||(r=O[w]);var n,o=O[O.indexOf(r)-1],i=(n=o?o.x+(r.x-o.x)/2<=e?r:o:r).x,a=n.y;_.setAttribute(\"cx\",i),_.setAttribute(\"cy\",a),E.setAttribute(\"x1\",i),E.setAttribute(\"x2\",i),c&&c(t,n)})}}}e.default=c},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||\"[object Arguments]\"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}}]);\n//# sourceMappingURL=sparkline.commonjs2.js.map","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrapper\"},[(_vm.sparklines)?_c('svg',{attrs:{\"id\":\"sparkline\",\"stroke-width\":\"3\",\"width\":_vm.sparkwidth,\"height\":_vm.sparkheight}}):_vm._e(),_c('div',{staticClass:\"center\"},[_c('div',{staticClass:\"footer\"},[_c('h3',{staticClass:\"timer\"},[_vm._v(_vm._s(_vm.timer_hours)+\":\"+_vm._s(_vm.timer_minutes)+\":\"+_vm._s(_vm.timer_seconds))]),_c('p',[_vm._v(_vm._s(_vm.$t(\"capture.intercept_coms_msg\"))+\" \"+_vm._s(_vm.device_name)+\".\")]),_c('div',{staticClass:\"empty-action\"},[_c('button',{staticClass:\"btn btn-primary\",on:{\"click\":function($event){return _vm.stop_capture()}}},[_vm._v(_vm._s(_vm.$t(\"capture.stop_btn\")))])])])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrapper\">\r\n <svg id=\"sparkline\" stroke-width=\"3\" :width=\"sparkwidth\" :height=\"sparkheight\" v-if=\"sparklines\"></svg>\r\n <div class=\"center\">\r\n <div class=\"footer\">\r\n <h3 class=\"timer\">{{timer_hours}}:{{timer_minutes}}:{{timer_seconds}}</h3>\r\n <p>{{$t(\"capture.intercept_coms_msg\")}} {{device_name}}.</p>\r\n <div class=\"empty-action\">\r\n <button class=\"btn btn-primary\" v-on:click=\"stop_capture()\">{{$t(\"capture.stop_btn\")}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport axios from 'axios'\r\nimport router from '../router'\r\nimport sparkline from '@fnando/sparkline'\r\n\r\nexport default {\r\n name: 'capture',\r\n components: {},\r\n data() {\r\n return {\r\n timer_hours: \"00\",\r\n timer_minutes: \"00\",\r\n timer_seconds: \"00\",\r\n stats_interval: false,\r\n chrono_interval: false,\r\n sparklines: false\r\n }\r\n },\r\n props: {\r\n capture_token: String,\r\n device_name: String\r\n },\r\n methods: {\r\n set_chrono: function() {\r\n console.log(\"[capture.vue] Setting up the chrono\")\r\n this.chrono_interval = setInterval(() => { this.chrono(); }, 10);\r\n },\r\n stop_capture: function() {\r\n console.log(\"[capture.vue] Stoping the capture\")\r\n axios.get('/api/capture/stop', { timeout: 30000 })\r\n clearInterval(this.chrono_interval);\r\n clearInterval(this.stats_interval);\r\n window.access_point = \"\"\r\n var capture_token = this.capture_token\r\n router.replace({ name: 'analysis', params: { capture_token: capture_token } });\r\n },\r\n get_stats: function() {\r\n console.log(\"[capture.vue] Getting capture statistics\")\r\n axios.get('/api/capture/stats', { timeout: 30000 })\r\n .then(response => (this.handle_stats(response.data)))\r\n },\r\n handle_stats: function(data) {\r\n if (data.packets.length) sparkline(document.querySelector('#sparkline'), data.packets);\r\n },\r\n chrono: function() {\r\n var time = Date.now() - this.capture_start\r\n this.timer_hours = Math.floor(time / (60 * 60 * 1000));\r\n this.timer_hours = (this.timer_hours < 10) ? '0' + this.timer_hours : this.timer_hours\r\n time = time % (60 * 60 * 1000);\r\n this.timer_minutes = Math.floor(time / (60 * 1000));\r\n this.timer_minutes = (this.timer_minutes < 10) ? '0' + this.timer_minutes : this.timer_minutes\r\n time = time % (60 * 1000);\r\n this.timer_seconds = Math.floor(time / 1000);\r\n this.timer_seconds = (this.timer_seconds < 10) ? '0' + this.timer_seconds : this.timer_seconds\r\n },\r\n setup_sparklines: function() {\r\n axios.get('/api/misc/config', { timeout: 60000 })\r\n .then(response => {\r\n if(response.data.sparklines){\r\n console.log(\"[capture.vue] Setting up sparklines\")\r\n this.sparklines = true\r\n this.sparkwidth = window.screen.width + 'px';\r\n this.sparkheight = Math.trunc(window.screen.height / 5) + 'px';\r\n this.stats_interval = setInterval(() => { this.get_stats(); }, 500);\r\n }\r\n })\r\n .catch(error => {\r\n console.log(error)\r\n });\r\n }\r\n },\r\n created: function() {\r\n console.log(\"[capture.vue] Showing capture.vue\")\r\n\r\n // Get the config for the sparklines.\r\n this.setup_sparklines()\r\n\r\n // Start the chrono and get the first stats.\r\n this.capture_start = Date.now()\r\n this.set_chrono();\r\n }\r\n}\r\n</script>\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./capture.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./capture.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./capture.vue?vue&type=template&id=68930959&\"\nimport script from \"./capture.vue?vue&type=script&lang=js&\"\nexport * from \"./capture.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}