codebox/frontend/dist/js/app.670a8fa4.js

2 lines
6.7 KiB
JavaScript

(function(e){function t(t){for(var r,o,i=t[0],u=t[1],s=t[2],f=0,l=[];f<i.length;f++)o=i[f],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&l.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);d&&d(t);while(l.length)l.shift()();return a.push.apply(a,s||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,o=1;o<n.length;o++){var i=n[o];0!==c[i]&&(r=!1)}r&&(a.splice(t--,1),e=u(u.s=n[0]))}return e}var r={},o={app:0},c={app:0},a=[];function i(e){return u.p+"js/"+({}[e]||e)+"."+{"chunk-6de790dc":"1b8599c0"}[e]+".js"}function u(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.e=function(e){var t=[],n={"chunk-6de790dc":1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="css/"+({}[e]||e)+"."+{"chunk-6de790dc":"a35e0796"}[e]+".css",c=u.p+r,a=document.getElementsByTagName("link"),i=0;i<a.length;i++){var s=a[i],f=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(f===r||f===c))return t()}var l=document.getElementsByTagName("style");for(i=0;i<l.length;i++){s=l[i],f=s.getAttribute("data-href");if(f===r||f===c)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=t,d.onerror=function(t){var r=t&&t.target&&t.target.src||c,a=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=r,delete o[e],d.parentNode.removeChild(d),n(a)},d.href=c;var p=document.getElementsByTagName("head")[0];p.appendChild(d)})).then((function(){o[e]=0})));var r=c[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=a);var s,f=document.createElement("script");f.charset="utf-8",f.timeout=120,u.nc&&f.setAttribute("nonce",u.nc),f.src=i(e);var l=new Error;s=function(t){f.onerror=f.onload=null,clearTimeout(d);var n=c[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",l.name="ChunkLoadError",l.type=r,l.request=o,n[1](l)}c[e]=void 0}};var d=setTimeout((function(){s({type:"timeout",target:f})}),12e4);f.onerror=f.onload=s,document.head.appendChild(f)}return Promise.all(t)},u.m=e,u.c=r,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)u.d(n,r,function(t){return e[t]}.bind(null,r));return n},u.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="/",u.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],f=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var d=f;a.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"46f1":function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s}));var r=n("1da1"),o=(n("96cf"),n("d3b7"),n("e9c4"),n("99af"),"http://localhost:1234");function c(e){return a.apply(this,arguments)}function a(){return a=Object(r["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return e.abrupt("return",e.sent.json());case 3:case"end":return e.stop()}}),e)}))),a.apply(this,arguments)}function i(e,t){return fetch(e,{method:"post",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}function u(){return c("".concat(o,"/api/containers"))}function s(e,t,n,r){return i("".concat(o,"/api/containers/").concat(e,"/sessions/").concat(t,"/resize"),{cols:n,rows:r})}},"56d7":function(e,t,n){"use strict";n.r(t);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=n("7a23"),o={id:"nav"},c=Object(r["f"])("Home"),a=Object(r["f"])(" | ");function i(e,t){var n=Object(r["v"])("router-link"),i=Object(r["v"])("router-view");return Object(r["q"])(),Object(r["d"])(r["a"],null,[Object(r["e"])("div",o,[Object(r["g"])(n,{to:"/"},{default:Object(r["A"])((function(){return[c]})),_:1}),a]),Object(r["g"])(i)],64)}n("f106");var u=n("6b0d"),s=n.n(u);const f={},l=s()(f,[["render",i]]);var d=l,p=(n("d3b7"),n("3ca3"),n("ddb0"),n("6c02")),b={class:"home"};function h(e,t,n,o,c,a){var i=Object(r["v"])("ContainerList");return Object(r["q"])(),Object(r["d"])("div",b,[Object(r["g"])(i,{containers:o.containers},null,8,["containers"])])}var v=Object(r["e"])("h2",null,"Containers",-1),m=Object(r["f"])(" Start session ");function j(e,t,n,o,c,a){var i=Object(r["v"])("router-link");return Object(r["q"])(),Object(r["d"])("div",null,[v,Object(r["e"])("ul",null,[(Object(r["q"])(!0),Object(r["d"])(r["a"],null,Object(r["u"])(n.containers,(function(e){return Object(r["q"])(),Object(r["d"])("li",{key:e.id},[Object(r["f"])(Object(r["x"])(e.id.substr(0,8))+" ",1),Object(r["g"])(i,{to:{name:"new-session",params:{container:e.id}}},{default:Object(r["A"])((function(){return[m]})),_:2},1032,["to"])])})),128))])])}var O={name:"ContainerList",props:{containers:Array}};const g=s()(O,[["render",j]]);var y=g,w=n("46f1"),k={name:"Dashboard",components:{ContainerList:y},setup:function(){var e=Object(r["t"])([]);return Object(w["a"])().then((function(t){e.value=t})),{containers:e}}};const S=s()(k,[["render",h]]);var A=S,C=(n("fb2c"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("a15b"),n("d81d"),n("a630"),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=new Uint32Array(e);return window.crypto.getRandomValues(t),Array.from(t.map((function(e){return e%C.length}))).map((function(e){return C[e]})).join("")}var P=[{path:"/",name:"home",component:A},{path:"/container/:container/session",name:"new-session",redirect:function(e){var t=e.params.container,n=localStorage.getItem(t);return n||(n=x(),localStorage.setItem(t,n)),{name:"session",params:{container:t,session:n}}}},{path:"/container/:container/session/:session",name:"session",component:function(){return n.e("chunk-6de790dc").then(n.bind(null,"78b4"))}}],_=Object(p["a"])({history:Object(p["b"])("/"),routes:P}),E=_;Object(r["c"])(d).use(E).mount("#app")},e581:function(e,t,n){},f106:function(e,t,n){"use strict";n("e581")}});
//# sourceMappingURL=app.670a8fa4.js.map