(function(t){function e(e){for(var s,n,r=e[0],i=e[1],c=e[2],u=0,h=[];u-1:t.logcheck.error},on:{change:function(e){var o=t.logcheck.error,s=e.target,a=!!s.checked;if(Array.isArray(o)){var l=null,n=t._i(o,l);s.checked?n<0&&t.$set(t.logcheck,"error",o.concat([l])):n>-1&&t.$set(t.logcheck,"error",o.slice(0,n).concat(o.slice(n+1)))}else t.$set(t.logcheck,"error",a)}}}),o("label",{staticClass:"custom-control-label",attrs:{for:"log_logerror"}},[t._v("Error")])]),o("div",{staticClass:"form-control custom-control custom-switch custom-control-inline"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.logcheck.output,expression:"logcheck.output"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"log_output","data-size":"large","data-toggle":"toggle"},domProps:{checked:Array.isArray(t.logcheck.output)?t._i(t.logcheck.output,null)>-1:t.logcheck.output},on:{change:function(e){var o=t.logcheck.output,s=e.target,a=!!s.checked;if(Array.isArray(o)){var l=null,n=t._i(o,l);s.checked?n<0&&t.$set(t.logcheck,"output",o.concat([l])):n>-1&&t.$set(t.logcheck,"output",o.slice(0,n).concat(o.slice(n+1)))}else t.$set(t.logcheck,"output",a)}}}),o("label",{staticClass:"custom-control-label",attrs:{for:"log_output"}},[t._v("Output")])]),o("div",{staticClass:"form-control custom-control custom-switch custom-control-inline"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.logcheck.log,expression:"logcheck.log"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"log_log"},domProps:{checked:Array.isArray(t.logcheck.log)?t._i(t.logcheck.log,null)>-1:t.logcheck.log},on:{change:function(e){var o=t.logcheck.log,s=e.target,a=!!s.checked;if(Array.isArray(o)){var l=null,n=t._i(o,l);s.checked?n<0&&t.$set(t.logcheck,"log",o.concat([l])):n>-1&&t.$set(t.logcheck,"log",o.slice(0,n).concat(o.slice(n+1)))}else t.$set(t.logcheck,"log",a)}}}),o("label",{staticClass:"custom-control-label",attrs:{for:"log_log"}},[t._v("Log")])])])])]),t._v(" "),o("div",{staticClass:"col-5"},[o("div",{staticClass:"input-group input-group-sm sm-5 justify-content-end "},[o("div",{staticClass:"input-group-prepend"},[o("div",{staticClass:"input-group-append"},[o("button",{staticClass:"btn btn-outline-warning",attrs:{round:"",type:"button"},on:{click:t.Clearlog}},[t._v(" Clear")])]),o("div",{staticClass:"input-group-append"},[o("button",{staticClass:"btn btn-outline-primary",attrs:{round:"",type:"button"},on:{click:t.Hotlog}},[t._v(" Hot_log")])])])])]),t._v(" "),o("div",{staticClass:"col-1"})]),t._v(" "),o("div",{staticClass:"row rowlog overflow-auto"},t._l(t.log_path,(function(e){return o("div",{staticClass:"col-12"},[!0===t.logview(e)?o("b-row",{staticClass:"border-bottom"},[o("b-col",{attrs:{cols:"2"}},[o("span",{staticClass:"badge badge-danger badge-pill",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.clearLog()}}},[t._v("Clear")])]),o("b-col",{staticStyle:{cursor:"pointer"},attrs:{cols:"8"},on:{click:function(o){return t.selectPath(e)}}},[t._v(" "+t._s(e)+" ")]),o("b-col",{attrs:{cols:"2"}},[t.log_path_lenght[e]==t.log_path_lenghtstatus[e]?o("span",{staticClass:"badge badge-secondary badge-pill"},[t._v(t._s(t.log_path_lenght[e]))]):o("span",{staticClass:"badge badge-primary badge-pill"},[t._v(t._s(t.log_path_lenght[e]))])])],1):t._e()],1)})),0)])},c=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 d-flex justify-content-center text-center"},[o("h4",{staticClass:"text-info"},[t._v(" Search ")])])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"}},[t._v("Start date ")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"}},[t._v("End date ")])])}],d=o("2f62"),u=o("5f5b"),h=o("bc3a"),p=o.n(h),m={namespaced:!0,state:{token:"",llo:{},log:[],mongolog:[],socketid:"",restapi:"off"},getters:{getrestapi(t,e){return t.restapi},getmongolog(t,e){return t.mongolog},getlog(t,e){return t.log},gettoken(t,e){return t.token},getllosrc(t,e){return t.llo},getsocketid(t,e){return t.socketid}},mutations:{add_log(t,e){t.log.push(e)},setrestapi(t,e){t.restapi=e},set_token(t,e){t.token=e},rm_log(t,e){t.log=t.log.filter(t=>t.tailed_path!==e),console.log("js1 setrm "+JSON.stringify(t.log))},tail_log(t,e){t.log=t.log.filter(t=>t.tailed_path!==e).splice(0,4),console.log("js1 setrmrmrmrmrmrmrmrm "+JSON.stringify(t.log))},setmongolog(t,e){t.mongolog.push(e)},rmmongolog(t,e){t.mongolog=[]},setllo(t,e){t.llo=e},setsocketid(t,e){t.socketid=e}},actions:{RMmongolog({commit:t},e){t("rmmongolog")},addlog({commit:t},e){var o={};o.message=e.log.log.message,o.tailed_path=e.log.log.tailed_path,o.date=e.log.date,t("add_log",o)},setRestapi({commit:t},e){t("setrestapi",e.restapi)},settoken({commit:t},e){t("set_token",e.token)},rmlog({commit:t},e){t("rm_log",e.path)},taillog({commit:t},e){console.log("containerirm "+e),t("tail_log",e.path)},async get_data({commit:t,rootGetters:e},o){try{let t=await p.a.get("https://factory.swarmlab.io:55527/run",{timeout:45e3,params:{code:o.code}});return console.log("paramp "+JSON.stringify(t)),_.dispatch("pipelineLLO/setScriptllo",t),t}catch(a){if("Request failed with status code 401"!=a.message&&!/401/i.test(a.message)){var s={ERROR_str:a,ERROR:"yes"};return s}window.location.href="https://api-login.swarmlab.io:8089"}},async get_log({commit:t,rootGetters:e},o){try{var s=_.getters["pipelineLLO/gettoken"];let t=await p.a.get("https://factory.swarmlab.io:55527/get_log",{timeout:45e3,params:{token:s,start:o.search.datestart,end:o.search.dateend,swarmlabname:o.swarmlabname}});return console.log("paramp-------------------------- "+JSON.stringify(o)),_.dispatch("pipelineLLO/set_mongolog",t),t}catch(l){if("Request failed with status code 401"!=l.message&&!/401/i.test(l.message)){var a={ERROR_str:l,ERROR:"yes"};return a}window.location.href="https://api-login.swarmlab.io:8089"}},async hotreload({commit:t,rootGetters:e},o){try{var s=o.token,a={swarmlabname:o.swarmlabname},l={headers:{"content-type":"application/x-www-form-urlencoded",Authorization:"Bearer "+s}},n=await p.a.post("https://api.swarmlab.io/swarmlabrunhotreload",a,l);"invalid_token"==n.error&&(console.log(n),console.log(JSON.stringify(n))),console.log(JSON.stringify(n))}catch(i){if("Request failed with status code 401"!=i.message&&!/401/i.test(i.message)){var r={ERROR_str:i,ERROR:"yes"};return r}window.location.href="https://api-login.swarmlab.io:8089"}},set_mongolog({commit:t},e){for(let s of e.data.data){var o={};o.message=s.message,o.tailed_path=s.tailed_path,o.date=s.time,t("setmongolog",o)}},setScriptllo({commit:t},e){t("setllo",e)},setsocketllo({commit:t},e){t("setsocketid",e)},setScriptCodlogAction({commit:t},e){t("setScriptCodelog",e)}}},g=o("ecee"),f=o("c074"),v=o("f2d1"),b=o("ad3d");o("f9e3"),o("2dd8");s["default"].use(d["a"]),s["default"].use(u["a"]),s["default"].component("font-awesome-icon",b["a"]),g["d"].add(f["d"],f["e"],f["c"],f["b"],f["a"],v["b"],v["c"],v["d"],f["f"],v["a"]),g["b"].watch();var _=new d["a"].Store({modules:{pipelineLLO:m},state:{},getters:{},mutations:{}}),k=(o("c4e3"),o("ec45")),y=(o("411c"),o("1315")),w=(o("21a6"),{components:{DatePicker:k["a"]},data(){return{log_path:[],log_path_lenght:[],log_path_lenghtstatus:[],loglenghttotal:32,search:{datestart:"",dateend:"",log:"",output:"",error:""},logcheck:{log:!0,error:!0,output:!0},selected:[],showlloedit:!0,issocket:"close",socketdata:"",logintoken:"",code:[],logdata:[]}},methods:{Hotlog(){this.Clearlog();var t="off";_.dispatch("pipelineLLO/setRestapi",{restapi:t})},Clearlog(){_.dispatch("pipelineLLO/RMmongolog");this.log_path=[]},logview(t){return!(!this.logcheck.log||!t.endsWith("-log"))||(!(!this.logcheck.error||!t.endsWith("-error"))||(!(!this.logcheck.output||!t.endsWith("-output"))||void 0))},async selectPath(t){console.log("path "+JSON.stringify(t));var e=this.log_path_lenght[t];s["default"].set(this.log_path_lenghtstatus,t,e),this.$root.$emit("playground_log_in",t)},async clearLog(t){console.log("path "+JSON.stringify(t)),s["default"].set(this.log_path_lenght,t,0),s["default"].set(this.log_path_lenghtstatus,t,0);_.dispatch("pipelineLLO/rmlog",{path:t})},async setFilter(){console.log(JSON.stringify(this.search));var t=this.search.datestart;console.log(t),console.log("new "+y["DateTime"].fromISO(t)),console.log("new1 "+y["DateTime"].fromObject(t).toISODate());var e="on",o=(await _.dispatch("pipelineLLO/setRestapi",{restapi:e}),new URL(location.href).searchParams.get("pipelinename")),a=(await _.dispatch("pipelineLLO/get_log",{search:this.search,swarmlabname:o}),_.getters["pipelineLLO/getmongolog"]);console.log("paramp "+JSON.stringify(a)),this.log_path=[...new Set(a.map(t=>t.tailed_path))];var l="";for(let n of this.log_path)if(l=a.filter(t=>t.tailed_path===n).length,s["default"].set(this.log_path_lenght,n,l),l>this.loglenghttotal)_.dispatch("pipelineLLO/taillog",{path:n})},async resetFilter(){console.log(JSON.stringify(this.logdata))},async socketopen(){this.$socket.client.open()},async socketauthenticate(){var t=_.getters["pipelineLLO/gettoken"];this.$socket.client.emit("authenticate",t)},async socketreconnect(){await this.socketopen();this.socketauthenticate()},async socketclose(){this.$socket.client.close()}},computed:{},beforeMount(){this.socketauthenticate(),console.log("send")},mounted(){this.$root.$on("SERVER_socket_connect",t=>{this.$nextTick((function(){this.socketreconnect()}))})},beforeDestroy(){this.$root.$off("SERVER_socket_socket")},created(){this.socketopen();var t=new URL(location.href).searchParams.get("token");_.dispatch("pipelineLLO/settoken",{token:t})},sockets:{connect(){this.$socket.client.emit("authenticate","logintoken"),this.$socket.client.emit("socket_id_get","socketdatasend"),console.log("socket connected socketdatasend"),this.issocket="open",this.$root.$emit("SERVER_socket_status","on")},error(t){console.log("socket error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off")},connect_error(t){console.log("socket connect_error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},disconnect(t){console.log("socket disconnect "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},connect_timeout(t){console.log("socket timeout "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect(t){console.log("socket reconnect attemptNumber "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect_attempt(t){console.log("socket reconnect_attempt "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnecting(t){console.log("socket reconnecting "+JSON.stringify(t)),this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},reconnect_error(t){console.log("socket reconnect_error "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off"),this.socketreconnect()},unauthorized(t){console.log("socket unauthorized "+JSON.stringify(t)),this.issocket="close",this.$root.$emit("SERVER_socket_status","off")},socket_id_emit(t){console.log("socket id from server "+JSON.stringify(t)),console.log("socket id from serveri saved "+JSON.stringify(socketsave)),this.issocket="open"},async logdata(t){console.log(" socket from logdata "+JSON.stringify(t));_.dispatch("pipelineLLO/addlog",{log:t});this.$root.$emit("GREP_on_data",t),this.$root.$emit("SERVER_socket_status","on");var e=_.getters["pipelineLLO/getlog"];this.log_path=[...new Set(e.map(t=>t.tailed_path))];var o="";for(let a of this.log_path)if(o=e.filter(t=>t.tailed_path===a).length,s["default"].set(this.log_path_lenght,a,o),o>this.loglenghttotal)_.dispatch("pipelineLLO/taillog",{path:a})},async message(t){console.log(" socket message "+JSON.stringify(t))}}}),C=w,x=(o("0f03"),o("2877")),$=Object(x["a"])(C,i,c,!1,null,null,null),O=$.exports,S=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t.showlloedit?o("b-row",{attrs:{"no-gutters":"","w-100":"","h-100":""}},[o("b-col",{attrs:{cols:"12",sm:"12",md:"12"}},[o("b-row",[o("b-col",{attrs:{cols:"4"}},[o("div",{staticClass:"input-group input-group-sm sm-3"})]),o("b-col",{attrs:{cols:"3"}},[o("div",{staticClass:"input-group input-group-sm sm-3"},[t.socketonline?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:"",disable:""},on:{click:t.socketconnect}},[t._v(" online ")]):o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:t.socketconnect}},[t._v(" socket disconnected")]),t.socketonline?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.hotreload()}}},[t._v(" Hot_Reload")]):t._e()])]),o("b-col",{attrs:{cols:"5"}},[o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"}),o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"},[o("div",{staticClass:"input-group-append"},[t.socketonline?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.infoHotreload()}}},[t._v(" Hot_Reload_HowTo")]):t._e()]),o("div",{staticClass:"input-group-append"},[t.tryConsole?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.clear()}}},[t._v(" Clear")]):t._e()]),o("div",{staticClass:"input-group-append"},["sublime"==t.cmOptions.keyMap?o("button",{staticClass:"btn btn-outline-info btn-sm",attrs:{type:"button",round:""},on:{click:t.infoFilter}},[t._v(" i")]):t._e()])])])],1),o("div",{staticClass:"codemirror"},[o("codemirror",{ref:"myCm",attrs:{value:t.code,options:t.cmOptions},on:{cursorActivity:t.onCmCursorActivity,ready:t.onCmReady,focus:t.onCmFocus,input:t.onCmCodeChange}})],1)],1)],1):t._e()],1)},L=[],R=o("8f94"),E=(o("a7be"),o("bbca"),o("281e"),o("31c5"),o("9b74"),o("f6b6"),o("3c98"),o("9c7b"),o("715d"),o("b933"),o("23de"),o("02f0"),o("8c33"),o("7289"),o("2aed"),o("d72f"),o("0b6c"),o("9a48"),o("75f8"),o("697e"),o("aedd"),o("164b"),o("4895"),o("cbc8"),o("8d70"),o("9f09"),o("a2c1"),o("56b3"),o("d7d5"),{components:{codemirror:R["codemirror"]},data(){return{socketonline:!1,tryConsole:!1,ssl:{},getinfo:"",token:"",swarmlabname:"",code:"",editchoice:"",optionsedit:[{text:"code",value:"code"},{text:"text",value:"text"}],llodesc:[{llo_url:"",llo_name:"",llo_author:"",llo_intro:""}],llo:[{id:0,rm:!1,data_info:"Asciidoc \n",data_code:"#Your source code",data_service:"",code_datafile:"url",code_name:"",code_exec:"",code_options:"",code_mime:"",code_info:"",code_code:"",code_codeout:"",code_codeoutput:"console",points:"",challenge_question:"",code_challenge_question:"",challenge_answer:"",challenge_answer_hint:"",code_challenge_answer_hint:"",challenge_answer_source:"",challenge_answer_code_out:"",challenge_answer_code:"",code_challenge_answer_code:""}],searchLLO:[],searchLLOactive:!1,ADOC_html_code:"",challenge:[],action:"",tryLLO:[],service:"os2",active:0,activecount:0,remove:"",activeField:"",bootstrap:!1,firstbootstrap:0,htmlasciitmp:"",datafile:"https://git.swarmlab.io:3000/labs/examples-mpi2/raw/branch/master/0_netstat/data",datadir:"0_netstat/data",LearningObject:"",showllo:!0,showlloedit:!0,selected:"sublime",options:[{text:"vim",value:"vim"},{text:"sublime",value:"sublime"}],optionsmime:[{text:"sh",value:"bash"},{text:"javascript",value:"javascript"},{text:"python",value:"python"},{text:"php",value:"php"},{text:"sql",value:"sq;"},{text:"xml",value:"xml"},{text:"c",value:"c"}],pValidate:!1,cmOptions:{tabSize:2,styleActiveLine:!0,lineNumbers:!0,lineSeparator:"\n",line:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},styleSelectedText:!0,mode:"shell",hintOptions:{completeSingle:!1},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,indentUnit:this.ADOC_html_code,lineWrapping:!0,theme:"paraiso-light",refresh:!0,readOnly:!0,autofocus:!1,extraKeys:{Ctrl:"autocomplete"}},ADOC_html:[]}},methods:{socketconnect(){this.$root.$emit("SERVER_socket_connect")},clear(){this.tryConsole=!1,this.code=""},async getdata(){var t=this.getinfo;await _.dispatch("pipelineLLO/get_data",{code:t})},async showactive(t){this.topwindow(t)},onCmReady(t){t.on("change",(t,e)=>{}),t.on("keypress",()=>{t.showHint({completeSingle:!1})})},onCmCursorActivity(t,e,o){},onCmFocus(t){},onCmCodeChange(t){this.code=t},handleChange(){},setKeymap(){this.cmOptions.keyMap=this.selected},infoFilter(){var t="

Playbook Images

",e='
Shift-Tab indentLess
Alt-Q wrapLines
Ctrl-Up scrollLineUp
Ctrl-Down scrollLineDown
Ctrl-L selectLine
Esc singleSelectionTop
Ctrl-Enter insertLineAfter
Ctrl-D selectNextOccurrence
Shift-Ctrl-Space selectScope
Shift-Ctrl-M selectBetweenBrackets
Ctrl-M goToBracket
Ctrl-K Ctrl-Y sublimeYank
Ctrl-K Ctrl-C showInCenter
Ctrl-K Ctrl-G clearBookmarks
Ctrl-K Ctrl-Backspace delLineLeft
Ctrl-K Ctrl-0 unfoldAll
Ctrl-K Ctrl-J unfoldAll
Ctrl-Alt-Up addCursorToPrevLine
Ctrl-Alt-Down addCursorToNextLine
Ctrl-F3 findUnder
Shift-Ctrl-F3 findUnderPrevious
Shift-Ctrl-[ fold
Shift-Ctrl-] unfold
Ctrl-F find
',o=(t="","");this.$swal({title:"Key bindings",type:"info",html:e+t+o,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1})},async hotreload(){this.getinfo,await _.dispatch("pipelineLLO/hotreload",{token:this.token,swarmlabname:this.swarmlabname})},infoHotreload(){var t=`
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
Downloadhttps://git.swarmlab.io:3000/labs/swarmlab-playground-client/raw/branch/master/hot_reload.sh
and add the proper values
token${this.token}
swarmlabname${this.swarmlabname}
OR set the variables before exec
export SWARMLAB_token=${this.token}
export SWARMLAB_name=${this.swarmlabname}
Ready! \n
Execute script every time you run git push
`;this.$swal({title:"HowTo",type:"info",html:t,showCloseButton:!0,showLoaderOnConfirm:!1,allowOutsideClick:!1})}},computed:{codemirror(){return this.$refs.myCm.codemirror}},mounted(){this.$root.$on("SERVER_socket_status",t=>{this.$nextTick((function(){"off"==t?this.socketonline=!1:"on"==t&&(this.socketonline=!0)}))}),this.$root.$on("playground_log_in",t=>{var e=_.getters["pipelineLLO/getrestapi"];if("off"==e)var o=_.getters["pipelineLLO/getlog"];else if("on"==e)o=_.getters["pipelineLLO/getmongolog"];console.log("logtmp-roi "+JSON.stringify(o));var s="";this.code="",s=o.filter(e=>e.tailed_path===t),console.log("logtmp22 "+JSON.stringify(s));for(let a of s)this.code+=a.message+" "+a.tailed_path+" "+a.date,this.code+="\n";this.$refs.myCm.codemirror.setCursor(this.$refs.myCm.codemirror.lineCount(),0),this.tryConsole=!0})},beforeDestroy(){this.$root.$off("SERVER_socket_status"),this.$root.$off("playground_log_in")},created(){this.token=new URL(location.href).searchParams.get("token"),this.swarmlabname=new URL(location.href).searchParams.get("pipelinename")}}),A=E,N=(o("9767"),Object(x["a"])(A,S,L,!1,null,null,null)),M=N.exports,j={name:"DocLive",props:{},components:{RunLlo:O,AdHoc:M},data(){return{loading:!1,showhistory:0,productIndex:1,showmenou:1,columnviewdefault:0,columncodedefault:0,columnview:"col-7 order-first",columncode:"col-5 order-last",tutorMenou:"student"}},created:function(){},mounted(){this.$root.$on("LLOshowmenounotebooks",()=>{this.showmenou=1}),this.$root.$on("lloshowchallengehistory",(t,e)=>{this.showhistory=1})},beforeDestroy(){this.$root.$off("LLOshowmenounotebooks"),this.$root.$off("lloshowchallengehistory")},methods:{fullscreen(t){"max"==t?(this.columnview="col-11 order-first",this.columncode="col-1 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","max"),console.log(this.columnview)):"min"==t?(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=0,this.columncodedefault=1,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview)):"codemax"==t?(this.columnview="col-1 order-first",this.columncode="col-11 order-last",this.columnviewdefault=0,this.columncodedefault=1,console.log(this.columnview)):"codemin"==t&&(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview))},async onAction(t){this.tutorMenou="tutor"}}},D=j,P=Object(x["a"])(D,n,r,!1,null,"8e77a300",null),J=P.exports,T=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"row"},[o("div",{class:t.columnview},[o("ad-grep",{staticStyle:{"background-color":"#f8f9fa"}})],1),o("div",{class:t.columncode},[o("run-grep",{staticStyle:{"background-color":"#f8f9fa"}})],1)])])},V=[],G=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"runGrep"},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12"},[o("div",{staticClass:"input-group mb-2"},[t._m(0),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.regex,expression:"search.regex"}],staticClass:"form-control",attrs:{type:"text",placeholder:"regex"},domProps:{value:t.search.regex},on:{input:function(e){e.target.composing||t.$set(t.search,"regex",e.target.value)}}}),o("div",{staticClass:"input-group-append"},[o("div",{staticClass:"input-group-text"},[t._v("/")]),o("div",{staticClass:"form-control custom-switch"},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.case,expression:"search.case"}],staticClass:"custom-control-input",attrs:{id:"customSwitch1",type:"checkbox"},domProps:{checked:Array.isArray(t.search.case)?t._i(t.search.case,null)>-1:t.search.case},on:{change:function(e){var o=t.search.case,s=e.target,a=!!s.checked;if(Array.isArray(o)){var l=null,n=t._i(o,l);s.checked?n<0&&t.$set(t.search,"case",o.concat([l])):n>-1&&t.$set(t.search,"case",o.slice(0,n).concat(o.slice(n+1)))}else t.$set(t.search,"case",a)}}}),o("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}},[t._v("Ignore case")])])])])])]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-9"},[o("div",{staticClass:"input-group mb-2"},[t._m(1),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.log,expression:"search.log"}],staticClass:"form-control",attrs:{type:"text",placeholder:"file"},domProps:{value:t.search.log},on:{input:function(e){e.target.composing||t.$set(t.search,"log",e.target.value)}}}),o("input",{directives:[{name:"model",rawName:"v-model",value:t.search.desc,expression:"search.desc"}],staticClass:"form-control",attrs:{type:"text",placeholder:"desc"},domProps:{value:t.search.desc},on:{input:function(e){e.target.composing||t.$set(t.search,"desc",e.target.value)}}})])]),t._v(" "),o("div",{staticClass:"col-3"},[o("button",{staticClass:"btn btn-outline-secondary",attrs:{round:"",type:"button"},on:{click:t.setregex}},[t._v(" Search ")])])]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 viewGrep"},[o("table",{staticClass:"table table-hover"},[t._m(2),t._l(t.log,(function(e){return o("tbody",[o("tr",[o("td",[o("span",{staticClass:"badge badge-danger badge-pill",staticStyle:{cursor:"pointer"},on:{click:function(o){return t.removeregex(e.id)}}},[t._v("Remove")])]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.log))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.regex))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.case))]),o("td",{staticStyle:{cursor:"pointer"}},[t._v(t._s(e.desc))])])])}))],2)])])])},z=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("div",{staticClass:"input-group-text"},[t._v("/")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"input-group-prepend"},[o("div",{staticClass:"input-group-text"},[t._v("Log")])])},function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("thead",[o("tr",[o("th",{attrs:{scope:"col"}},[t._v("Action")]),o("th",{attrs:{scope:"col"}},[t._v("Log")]),o("th",{attrs:{scope:"col"}},[t._v("Regex")]),o("th",{attrs:{scope:"col"}},[t._v("IC")]),o("th",{attrs:{scope:"col"}},[t._v("Desc")])])])}],F={components:{},data(){return{search:{log:"",regex:"",desc:"",case:!0},obj:1,log:[]}},methods:{removeregex(t){let e=this.log.map(t=>t.id).indexOf(t);this.log.splice(e,1)},setregex(){var t={};t.id=this.obj++,t.log=this.search.log,t.regex=this.search.regex,t.case=this.search.case,t.desc=this.search.desc,this.log.push(t)}},mounted(){this.$root.$on("GREP_on_data",t=>{this.$nextTick((function(){var e=this.log.filter(e=>e.log===t.log.tailed_path),o="",s=!1;if(s=!(!Array.isArray(e)||!e.length),s){var a=t.log.message;o+="";for(let s of e){if(s.case)var l=new RegExp(s.regex,"i");else l=new RegExp(s.regex);l.test(a)?(o+=a+" "+t.log.tailed_path,o+="\n",this.$root.$emit("GREP_view_data",o)):console.log("Not found")}}}))})},beforeDestroy(){this.$root.$off("GREP_on_data")}},U=F,B=(o("61e9"),Object(x["a"])(U,G,z,!1,null,null,null)),H=B.exports,K=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[t.showlloedit?o("b-row",{attrs:{"no-gutters":"","w-100":"","h-100":""}},[o("b-col",{attrs:{cols:"12",sm:"12",md:"12"}},[t.tryConsole?t._e():o("hr"),o("div",{staticClass:"input-group input-group-sm d-flex justify-content-end"},[o("div",{staticClass:"input-group-append"},[t.tryConsole?o("button",{staticClass:"btn btn-outline-warning btn-sm",attrs:{type:"button",round:""},on:{click:function(e){return t.clear()}}},[t._v(" Clear")]):t._e()])]),o("div",{staticClass:"CodeMirrorGrep"},[o("codemirror",{ref:"myCm",attrs:{value:t.code,options:t.cmOptions},on:{cursorActivity:t.onCmCursorActivity,ready:t.onCmReady,focus:t.onCmFocus,input:t.onCmCodeChange}})],1)])],1):t._e()],1)},Y=[],q={components:{codemirror:R["codemirror"]},data(){return{tryConsole:!1,getinfo:"",code:"",optionsedit:[{text:"code",value:"code"},{text:"text",value:"text"}],searchLLO:[],searchLLOactive:!1,showllo:!0,showlloedit:!0,selected:"sublime",options:[{text:"vim",value:"vim"},{text:"sublime",value:"sublime"}],optionsmime:[{text:"sh",value:"bash"},{text:"javascript",value:"javascript"},{text:"python",value:"python"},{text:"php",value:"php"},{text:"sql",value:"sq;"},{text:"xml",value:"xml"},{text:"c",value:"c"}],pValidate:!1,cmOptions:{tabSize:2,styleActiveLine:!0,lineNumbers:!0,lineSeparator:"\n",line:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0},styleSelectedText:!0,mode:"shell",hintOptions:{completeSingle:!1},keyMap:"sublime",matchBrackets:!0,showCursorWhenSelecting:!0,indentUnit:this.ADOC_html_code,lineWrapping:!0,theme:"paraiso-light",refresh:!0,readOnly:!0,autofocus:!1,extraKeys:{Ctrl:"autocomplete"}},ADOC_html_code:""}},methods:{socketconnect(){},clear(){this.tryConsole=!1,this.code=""},async getdata(){},async showactive(t){this.topwindow(t)},onCmReady(t){t.on("change",(t,e)=>{}),t.on("keypress",()=>{t.showHint({completeSingle:!1})})},onCmCursorActivity(t,e,o){},onCmFocus(t){},onCmCodeChange(t){this.code=t},handleChange(){},setKeymap(){this.cmOptions.keyMap=this.selected}},computed:{codemirror(){return this.$refs.myCm.codemirror}},mounted(){this.$root.$on("GREP_view_data",t=>{this.$nextTick((function(){this.code+=t,this.tryConsole=!0}))}),this.$refs.myCm.codemirror.setSize(null,"350")},beforeDestroy(){this.$root.$off("GREP_view_data")},created(){}},I=q,W=Object(x["a"])(I,K,Y,!1,null,null,null),Q=W.exports,X={name:"DocGrep",props:{},components:{RunGrep:H,AdGrep:Q},data(){return{loading:!1,showhistory:0,productIndex:1,showmenou:1,columnviewdefault:0,columncodedefault:0,columnview:"col-7 order-first",columncode:"col-5 order-last",tutorMenou:"student"}},created:function(){},mounted(){this.$root.$on("LLOshowmenounotebooks",()=>{this.showmenou=1}),this.$root.$on("lloshowchallengehistory",(t,e)=>{this.showhistory=1})},beforeDestroy(){this.$root.$off("LLOshowmenounotebooks"),this.$root.$off("lloshowchallengehistory")},methods:{fullscreen(t){"max"==t?(this.columnview="col-11 order-first",this.columncode="col-1 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","max"),console.log(this.columnview)):"min"==t?(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=0,this.columncodedefault=1,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview)):"codemax"==t?(this.columnview="col-1 order-first",this.columncode="col-11 order-last",this.columnviewdefault=0,this.columncodedefault=1,console.log(this.columnview)):"codemin"==t&&(this.columnview="col-7 order-first",this.columncode="col-5 order-last",this.columnviewdefault=1,this.columncodedefault=0,this.$root.$emit("LLOresizemenounotebooks","min"),console.log(this.columnview))},async onAction(t){this.tutorMenou="tutor"}}},Z=X,tt=Object(x["a"])(Z,T,V,!1,null,"bbfc2d24",null),et=tt.exports,ot=(o("e454"),{name:"app",components:{DocLive:J,DocGrep:et},data(){return{show:!0,token:"",SwarmabAsciiLabTemplate:""}},mounted(){},created(){var t=window.location.href,e=new URL(t);this.token=e.searchParams.get("token"),console.log("token "+this.token)},methods:{saveDocLive(){this.$root.$emit("asciilive_save","save")},async connect_to_iot(t){"mesh"==t&&(this.SwarmabAsciiLabTemplate={iot5:{id:5,name:"auto5",img:"rinse.png",Servicios:[{model:"Sentra",doors:4},{model:"Maxima",doors:4},{model:"Skyline",doors:2}]}})}}}),st=ot,at=(o("034f"),Object(x["a"])(st,a,l,!1,null,null,null)),lt=at.exports,nt=o("5886"),rt=o("f87c"),it=o("8e27"),ct=o.n(it);s["default"].use(nt["default"]);const dt=ct()("https://factory.swarmlab.io:55527",{autoConnect:!1,reconnection:!0,reconnectionDelay:500,maxReconnectionAttempts:1/0,pingInterval:25e3,pingTimeout:6e4,transports:["websocket","polling"],secure:!0,rejectUnauthorized:!1});s["default"].use(rt["a"],dt),s["default"].use(u["b"]),s["default"].config.productionTip=!1,new s["default"]({el:"#app",store:_,render:t=>t(lt)})},"61e9":function(t,e,o){"use strict";o("ad34")},"85ec":function(t,e,o){},9767:function(t,e,o){"use strict";o("e1be")},ad34:function(t,e,o){},e086:function(t,e,o){},e1be:function(t,e,o){},e454:function(t,e,o){}}); //# sourceMappingURL=app.dfd554f5.js.map