(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{X0fP:function(e,t,n){"use strict";n.r(t);var i=n("8Y7J");class o{constructor(){console.log("loaded")}}var s=n("pMnS"),l=n("B4Mn"),r=n("Kj3r"),a=n("Wb/s"),c=n("xVS5"),d=n("ldua"),u=n("+WIb");a.Terminal.applyAddon(c),a.Terminal.applyAddon(d);class m{constructor(e){this.$ws=e,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new a.Terminal,this.resize=new l.a}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.termTarget=document.getElementById("docker-terminal"),this.term.open(this.termTarget),this.term.fit(),this.term.webLinksInit(),this.io.connected.subscribe(()=>{this.startTerminal()}),this.io.socket.on("disconnect",()=>{this.term.write("\n\r\n\rTerminal disconnected. Is the server running?\n\r\n\r")}),this.resize.pipe(Object(r.a)(500)).subscribe(e=>{this.io.socket.emit("resize",e)}),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.term.on("resize",e=>{this.resize.next(e)}),this.term.on("data",e=>{this.io.socket.emit("stdin",e)})}onWindowResize(e){this.term.fit()}startTerminal(){this.term.reset(),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.resize.next({cols:this.term.cols,rows:this.term.rows}),this.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.io.end(),this.term.dispose()}}var h=i["\u0275crt"]({encapsulation:2,styles:[],data:{}});function p(e){return i["\u0275vid"](0,[(e()(),i["\u0275eld"](0,0,null,null,1,"div",[["class","flex-column d-flex align-items-stretch h-100"]],null,null,null,null,null)),(e()(),i["\u0275eld"](1,0,null,null,0,"div",[["class","terminal align-self-end w-100 h-100 mb-1"],["id","docker-terminal"]],null,null,null,null,null))],null,null)}function w(e){return i["\u0275vid"](0,[(e()(),i["\u0275eld"](0,0,null,null,1,"app-terminal",[],null,[["window","resize"]],function(e,t,n){var o=!0;return"window:resize"===t&&(o=!1!==i["\u0275nov"](e,1).onWindowResize(n)&&o),o},p,h)),i["\u0275did"](1,245760,null,0,m,[u.a],null,null)],function(e,t){e(t,1,0)},null)}var f=i["\u0275ccf"]("app-terminal",m,w,{},{},[]),b=n("SVse"),g=n("iInd");class v{}n.d(t,"TerminalModuleNgFactory",function(){return k});var k=i["\u0275cmf"](o,[],function(e){return i["\u0275mod"]([i["\u0275mpd"](512,i.ComponentFactoryResolver,i["\u0275CodegenComponentFactoryResolver"],[[8,[s.a,f]],[3,i.ComponentFactoryResolver],i.NgModuleRef]),i["\u0275mpd"](4608,b.NgLocalization,b.NgLocaleLocalization,[i.LOCALE_ID,[2,b["\u0275angular_packages_common_common_a"]]]),i["\u0275mpd"](1073742336,b.CommonModule,b.CommonModule,[]),i["\u0275mpd"](1073742336,g.p,g.p,[[2,g.u],[2,g.l]]),i["\u0275mpd"](1073742336,v,v,[]),i["\u0275mpd"](1073742336,o,o,[]),i["\u0275mpd"](1024,g.j,function(){return[[{path:"",component:m}]]},[])])})},ldua:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=new RegExp("(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,6}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+]*)*([^:\"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)");function o(e,t){window.open(t,"_blank")}function s(e,t,n){void 0===t&&(t=o),void 0===n&&(n={}),n.matchIndex=1,e.registerLinkMatcher(i,t,n)}t.webLinksInit=s,t.apply=function(e){e.prototype.webLinksInit=function(e,t){s(this,e,t)}}}}]);