text: function c3_submitIt(){var e=document.c3_taskFrm;if(e.task_name.value.length<2)return alert("please input your task name"),e.task_name.focus(),!1;var t="";return t.length<1?(client&&client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"jquery","c3-mod":"definition"},$(document.c3_taskFrm).serialize()),!1):void alert(t)}function onmessage_definition(e){var t=JSON.parse(e);return t.uid==c3_protocol[0]?($("#definition_onmessage")[0].innerText="["+(new Date).format("hh:mm:ss")+"] "+t.message+"@"+username+", queued: "+t.queued,void $("#btn_definition").removeAttr("disabled")):void($("#definition_onmessage")[0].innerText="["+(new Date).format("hh:mm:ss")+"] "+e)}function onclose_definition(e){$("#definition_onmessage")[0].innerText="["+(new Date).format("hh:mm:ss")+"] Disconnected",$("#btn_definition").attr("disabled","disabled")}function c3_addRow(e,t){table=e.parentNode.parentNode,pos=e.rowIndex,i=0,e=table.insertRow(pos),cell=e.insertCell(i++),cell.setAttribute("align","left"),cell.innerHTML='<input type="text" name="'+t+'_name[]" />',cell=e.insertCell(i++),cell.setAttribute("align","left"),"condition"==t?cell.innerHTML='<select name="'+t+'_type[]" style="width:75px"><option value="crontab">crontab</option><option value="post">post</option><option value="api">api</option><option value="due" selected>due</option><option value="hook">hook</option></select>':"action"==t&&(cell.innerHTML='<select name="'+t+'_type[]" style="width:75px"><option value="api">api</option><option value="post">post</option><option value="queue">queue</option></select>'),cell=e.insertCell(i++),cell.setAttribute("align","left"),cell.innerHTML='<input type="text" name="'+t+'_spec[]" />',cell=e.insertCell(i++),cell.setAttribute("align","left"),cell.innerHTML='<input type="text" name="'+t+'_payload[]" />',"condition"==t&&(cell=e.insertCell(i++),cell.setAttribute("align","left"),cell.setAttribute("nowrap","nowrap"),cell.innerHTML=' <input type="text" name="'+t+'_eval[]">')}function ws_connect(){client=Stomp.over(new WebSocket("ws"+("https:"==document.location.protocol.toLowerCase()?"s":"")+"://www.conby.com/ws")),client.debug=client_debug,client.onreceive=client_onreceive,client.onclose=client_onclose,client.connect("web","",on_connect,on_error,"c3")}function firstform_submit(){var e=$("#first form input").val();if(e){if(e.startsWith("connect")){var t=e.split(" ");return 2!=t.length?(client_onreceive({body:"bad CONNECT format, e.g. connect UID/PASSWORD",headers:{}}),$("#first form input").val(""),!1):(t=t[1].split("/"),2!=t.length?(client_onreceive({body:"bad CONNECT format, e.g. connect UID/PASSWORD",headers:{}}),$("#first form input").val(""),!1):(username=t[0],usermd5=hex_md5(t[1]),client?client.send("/queue/hook_event_queue",{"c3-user":username,"c3-md5":usermd5,"reply-to":"/temp-queue/foo","c3-type":"request_task","c3-format":"json","c3-mod":"initialization"},"hi"):ws_connect(),$("#first form input").val(""),!1))}if(client&&e.startsWith("disconnect"))return client.disconnect(),client_onclose("disconnect"),client=null,client_onreceive({body:"disconnected",headers:{}}),$("#first form input").val(""),Cookies.remove("c3-user"),Cookies.remove("c3-md5"),!1;if(!client)return client_onreceive({body:"not connected, please connect first",headers:{}}),$("#first form input").val(""),!1;var n={uid:document.getElementById("username").value,message:e};client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"json","c3-mod":"console"},JSON.stringify(n)),$("#first form input").val("")}return!1}function createChatEntry3(e,t){var n=document.createElement("div");n.class="chat_entry";var s=document.createElement("span");s.class="chat_username",s.innerHTML="["+(new Date).format("hh:mm:ss")+"] "+e+": ",n.appendChild(s);var c=document.createElement("span");return c.class="chat_message",c.innerHTML=t,n.appendChild(c),n}function getHeader3(e,t,n,s,c){for(var o=['<svg height="',s.toString(),'" width="',n.toString(),'">','<g transform="translate(',e.toString(),",",t.toString(),')">','  <g class="x axis">'].join(""),a=0;a<6;a++)o+='    <g transform="translate(',(100*a*(n/600)).toString(),Math.round(100*a*(c/600)).toString(),"</text></g>";return o+=['    <path d="M0,-6V0H',n.toString(),'V-6" class="domain"></path>','    <text transform="translate(',(n-e).toString(),', -9)"></text>',"  </g>",'  <g class="y axis"><path d="M-6,0H0V',s.toString(),'H-6" class="domain"></path></g>'].join("")}function checkJSONChart3(e){var t=null,n=null;try{if(n=JSON.parse(e),t=new Array,n&&"object"==typeof n){for(var s in n)try{isNaN(n[s])===!1&&(t[t.length]=parseInt(n[s]))}catch(e){}if(t.length>1){var c=10,o=20,a=600,r=Math.max.apply({},t),i=5*t.length*2+o,l="";l+=getHeader3(c,o,a,i,r);var d=0;for(var u in t)d+=1,l+='  <g class="bar" transform="translate(0,'+(10*d-5).toString()+')"><rect height="5" width="'+Math.round(1*t[u]*(a-c)/r).toString()+'"></rect></g>\n';return l+=["</g>","</svg>"].join(""),t&&(t.length=0,delete t),d=null,c=null,o=null,a=null,r=null,i=null,t=null,n=null,l}}}catch(e){return t&&(t.length=0,delete t),t=null,n=null,""}return t&&(t.length=0,delete t),t=null,n=null,""}function checkJSONString3(e){var t=null;try{if(t=JSON.parse(e),t&&"object"==typeof t){var n="<table border=1>";for(var s in t)n+="<tr>",n+="<td>"+s+"</td>",n+=t[s]&&"object"==typeof t[s]?"<td>"+JSON.stringify(t[s])+"</td>":"<td>"+t[s]+"</td>",n+="</tr>";return n+="</table>",n+=checkJSONChart3(e),t=null,n}}catch(n){return t=null,e}return t=null,e}function onmessage_event(e){var t=JSON.parse(e);if(t.uid==c3_protocol[0])return document.getElementById("username3").value=t.message+"@"+username,void $("#message3").removeAttr("readonly");if(t.uid==c3_protocol[1])return username="",void(usermd5="");var n=createChatEntry3(t.uid,checkJSONString3(t.message));null==messageContainer3&&(messageContainer3=document.getElementById("chat3")),messageContainer3.appendChild(n),n.parentNode.scrollTop=n.offsetTop}function onclose_event(e){document.getElementById("username3").value="Disconnected",$("#message3").attr("readonly","readonly")}function oninit_event(e){event_init||(event_init=!0)}function sendMessage3(){var e={uid:document.getElementById("username3").value,message:document.getElementById("message3").value};e.uid&&e.message&&client&&client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"json","c3-mod":"event"},JSON.stringify(e)),document.getElementById("message3").value=""}function createChatEntry(e,t){var n=document.createElement("div");n.class="chat_entry";var s=document.createElement("span");s.class="chat_username",s.innerHTML="["+(new Date).format("hh:mm:ss")+"] "+e+": ",n.appendChild(s);var c=document.createElement("span");return c.class="chat_message",c.innerHTML=t,n.appendChild(c),setTimeout(function(){n.style.display="none"},2e3),n}function handleJsonSource(e){/.*\.json$/.test(e)?document.getElementById("yarn_jsonsource").value=e+"?t="+(new Date).valueOf():document.getElementById("yarn_jsonsource").value=e}function checkJSONString(e){var t=null;try{if(t=JSON.parse(e),t&&"object"==typeof t){var n="",s="";for(var c in t)"yarn_jsonsource"==c&&handleJsonSource(t[c]),"yarn_event"==c&&(n=t[c]+" "),"yarn_updated"==c&&(s=t[c]),"yarn_vtype"==c&&(document.getElementById("select_vtype").value=t[c]);return t=null,n+s}}catch(n){return t=null,e}return t=null,e}function onmessage_visualization(e){var t=JSON.parse(e);if(t.uid==c3_protocol[0])return document.getElementById("username").value=t.message+"@"+username,$("#message").removeAttr("readonly"),void(usermd5="undefined"!=typeof t.token?t.token:"");if(t.uid==c3_protocol[1])return username="",void(usermd5="");if(t.message.startsWith("Hook accepted: ")){var n=createChatEntry(t.uid,checkJSONString(t.message));return null==messageContainer&&(messageContainer=document.getElementById("chat")),messageContainer.replaceChild(n,mc),void(mc=n)}try{updateVtypeChange&&"function"==typeof updateVtypeChange?updateVtypeChange(t.message):onVtypeChange(document.getElementById("select_vtype").value)}catch(e){}}function onclose_visualization(e){document.getElementById("username").value="Disconnected",$("#message").attr("readonly","readonly")}function oninit_visualization(e){visualization_init||(visualization_init=!0)}function sendMessage(){var e={uid:document.getElementById("username").value,message:document.getElementById("message").value};e.uid&&e.message&&client&&client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"json","c3-mod":"visualization"},JSON.stringify(e)),document.getElementById("message").value=""}function onVtypeChange(e){document.getElementById("sunburstpartition_radio").style.display="none",document.getElementById("hierarchicaledgebundling_range").style.display="none",document.getElementById("treemap_select").style.display="none",document.getElementById("jsonsource").value="flare.json";try{navigator.userAgent.match(/mobile/i)&&($(".d3-draw-area")[0].style.height="336px"),updateVtypeChange&&"function"==typeof updateVtypeChange&&(updateVtypeChange=null)}catch(e){}switch(e){case"timeline":c3dv.css("c3js/v_timeline.css","c3dvcss",!0),c3dv.js("c3js/bootstrap-tooltip.js","c3dvjs_bootstrap_tooltip",!0,null),c3dv.js("c3js/v_timeline.js","c3dvjs",!0,null);break;case"areagradient":c3dv.css("c3js/v_areagradient.css","c3dvcss",!0),c3dv.js("c3js/v_areagradient.js","c3dvjs",!0,null);break;case"barhierarchy":c3dv.css("c3js/v_barhierarchy.css","c3dvcss",!0),c3dv.js("c3js/v_barhierarchy.js","c3dvjs",!0,null);break;case"chart":c3dv.css("c3js/v_chart.css","c3dvcss",!0),c3dv.js("c3js/v_chart.js","c3dvjs",!0,null);break;case"bubblechart":c3dv.css("c3js/v_bubblechart.css","c3dvcss",!0),c3dv.js("c3js/v_bubblechart.js","c3dvjs",!0,null);break;case"bubbleby":c3dv.css("c3js/v_bubbleby.css","c3dvcss",!0),c3dv.js("c3js/v_bubbleby.js","c3dvjs",!0,null);break;case"showreel":c3dv.css("c3js/v_showreel.css","c3dvcss",!0),c3dv.js("c3js/v_showreel.js","c3dvjs",!0,null);break;case"cluster":c3dv.css("c3js/v_cluster.css","c3dvcss",!0),c3dv.js("c3js/v_cluster.js","c3dvjs",!0,null);break;case"chorddiagram":c3dv.css("c3js/v_chorddiagram.css","c3dvcss",!0),c3dv.js("c3js/v_chorddiagram.js","c3dvjs",!0,null);break;case"hierarchicaledgebundling":c3dv.css("c3js/v_hierarchicaledgebundling.css","c3dvcss",!0),c3dv.js("c3js/v_hierarchicaledgebundling.js","c3dvjs",!0,null);break;case"forcecollapsible":c3dv.css("c3js/v_forcecollapsible.css","c3dvcss",!0),c3dv.js("c3js/v_forcecollapsible.js","c3dvjs",!0,null);break;case"forcedirectedgraph":c3dv.css("c3js/v_forcedirectedgraph.css","c3dvcss",!0),c3dv.js("c3js/v_forcedirectedgraph.js","c3dvjs",!0,null);break;case"packhierarchy":c3dv.css("c3js/v_packhierarchy.css","c3dvcss",!0),c3dv.js("c3js/v_packhierarchy.js","c3dvjs",!0,null);break;case"radial":c3dv.css("c3js/v_radial.css","c3dvcss",!0),c3dv.js("c3js/v_radial.js","c3dvjs",!0,null);break;case"partition":c3dv.css("c3js/v_partition.css","c3dvcss",!0),c3dv.js("c3js/v_partition.js","c3dvjs",!0,null);break;case"bilevelpartition":c3dv.css("c3js/v_bilevelpartition.css","c3dvcss",!0),c3dv.js("c3js/v_bilevelpartition.js","c3dvjs",!0,null);break;case"sunburstpartition":c3dv.css("c3js/v_sunburstpartition.css","c3dvcss",!0),c3dv.js("c3js/v_sunburstpartition.js","c3dvjs",!0,null);break;case"sequencessunburst":c3dv.css("c3js/v_sequencessunburst.css","c3dvcss",!0),c3dv.js("c3js/v_sequencessunburst.js","c3dvjs",!0,null);break;case"treemap":c3dv.css("c3js/v_treemap.css","c3dvcss",!0),c3dv.js("c3js/v_treemap.js","c3dvjs",!0,null);break;case"ddzpcta":c3dv.css("c3js/v_ddzpcta.css","c3dvcss",!0),c3dv.js("c3js/v_ddzpcta.js","c3dvjs",!0,null);break;default:c3dv.css("c3js/v_forcecollapsible.css","c3dvcss",!0),c3dv.js("c3js/v_forcecollapsible.js","c3dvjs",!0,null)}}function send_c3message(e,t){var n=$("#three form input").val();if(n){var s=t;s||(s=n);var c={uid:document.getElementById("username").value,message:{api:e,key:s}};c.uid&&c.message&&client&&client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"json","c3-mod":"workflow"},JSON.stringify(c))}}function set_c3_world_dimension(e,t,n){var s=document.getElementById(n);s.style.width=e+"px",s.style.height=t+"px",Joint.paper(n,e,t+150)}function onmessage_workflow(e){var t=JSON.parse(e);return t.uid==c3_protocol[0]?($("#three form input").removeAttr("readonly"),void(document.getElementById("wf_task_name").innerText="No task key")):t.uid==c3_protocol[1]?(username="",void(usermd5="")):void show_task(t.message)}function onclose_workflow(e){$("#three form input").attr("readonly","readonly"),document.getElementById("task_desc").style.display="none",document.getElementById("runtimes").style.display="none"}function show_task(e){if(e.taskkey){$("#three form input").val(e.taskkey),document.getElementById("task_desc").style.display="",document.getElementById("runtimes").style.display="",document.getElementById("wf_task_name").innerText=e.taskname,document.getElementById("wf_task_created").innerText=e.created,document.getElementById("wf_task_fcount").innerText=e.fcount;var t=document.getElementById("runtimes");t.innerHTML='<h2 class="comments">Runtime(s)</h2>';for(var n=0;n<e.runtime_list.length;n++)create_runtime_div(n+1,e.runtime_list[n]),create_runtime(n+1,e.runtime_list[n])}}function create_runtime(e,t){var n=Joint.dia.devs,s=n.arrow,c=[600,20,100,220,130,450,100];navigator.userAgent.match(/mobile/i)&&(c=[333,20,50,120,80,255,50]),set_c3_world_dimension(c[0],68,"c3workflow_world"+e.toString());var o=t;o.source.p1.push("in"),o.follower.p1.push("out");var a=n.Model.create({rect:{x:c[3],y:10,width:c[4],height:40},label:o.name,attrs:{fill:"green"},labelAttrs:{"font-weight":"bold",fill:"white","font-size":"12px"},shadow:!0,iPorts:o.source.p1.unique(),oPorts:o.follower.p1.unique()}),r=0,i=0,l=35;for(var d in o.source.rt){o.source.rt[d].p1.push("out"),i=10+r*l,r+=1;var u=n.Model.create({rect:{x:c[1],y:i,width:c[2],height:30},label:o.source.rt[d].runtime_name,labelAttrs:{"font-weight":"bold",fill:"white","font-size":"12px"},attrs:{fill:"red"},shadow:!0,iPorts:["in"],oPorts:o.source.rt[d].p1.unique()});u.wrapper.dblclick(function(e){document.location="#"+o.source.rt[d].taskkey});for(var m in o.source.rt[d].p2)u.port("o",m).joint(a.port("i",o.source.rt[d].p2[m]),s)}r=0,i=0;for(var d in o.follower.rt){o.follower.rt[d].p1.push("in"),i=10+r*l,r+=1;var v=n.Model.create({rect:{x:c[5],y:i,width:c[6],height:30},label:o.follower.rt[d].runtime_name,attrs:{fill:"red"},labelAttrs:{"font-weight":"bold",fill:"white","font-size":"12px"},shadow:!0,iPorts:o.follower.rt[d].p1.unique(),oPorts:["out"]});v.wrapper.dblclick(function(e){document.location="#"+o.follower.rt[d].taskkey});for(var m in o.follower.rt[d].p2)a.port("o",m).joint(v.port("i",o.follower.rt[d].p2[m]),s)}}function create_runtime_div(e,t){var n='\t<div class="comment comment-published odd">';n+='\t  <div class="clear-block">',n+='\t\t<span class="submitted" style="float: right">'+t.updated+" - "+t.status+"</span>",n+="\t\t<h4>"+t.key+"</h4>",n+='\t\t<div class="content">',n+="\t\t  <p>   ",n+='\t\t   <table width="100%" border="0" cellpadding="0" cellspacing="1" class="wftab">';for(var s=0;s<t.content.length;s++){var c=t.content[s][0]?":":"",o=$("<div/>").text(t.content[s][1]).html();n+='\t\t      <tr><td class="wftdl" nowrap>'+t.content[s][0]+c+'</td></td><td class="wftdm">&nbsp;</td><td class="wftdr" nowrap>'+o+"</td></tr>"}n+="          </table>",n+="\t\t  </p>",n+="\t\t</div>",n+='\t\t<div id="c3workflow_world'+e.toString()+'"></div>',n+="\t  </div>",n+='\t  <div class="links">',n+='\t\t<ul class="links">',n+='\t\t  <li class="rt_stop first" style="display:inline"><a href="javascript:send_c3message(\'c3_stop_runtime\',\''+t.key+"');\"> Stop</a></li>",n+='\t\t  <li class="rt_delete first" style="display:inline"><a href="javascript:send_c3message(\'c3_delete_runtime\',\''+t.key+"');\"> Delete</a></li>",n+='\t\t  <li class="rt_activate" style="display:inline"><a href="javascript:send_c3message(\'c3_activate_runtime\',\''+t.key+"');\"> Activate</a></li>",n+='\t\t  <li class="rt_promote" style="display:inline"><a href="javascript:send_c3message(\'c3_promote_runtime\',\''+t.key+"');\"> Promote</a></li>",n+='\t\t  <li class="rt_logs last" style="display:inline"><a href="javascript:return false;"> Logs </a></li>',n+="\t\t</ul>",n+="\t  </div>",n+="\t</div>";var a=document.getElementById("runtimes"),r=document.createElement("div");r.innerHTML=n,a.appendChild(r)}function start_consoleapp(){client_debug=function(e){var t=$("#second div");t.append($("<code>").text(e)),t.scrollTop(t.scrollTop()+1e4)},client_onreceive=function(e){var t=$("#first div");switch(t.append($("<code>").text(e.body)),t.scrollTop(t.scrollTop()+1e4),e.headers["c3-mod"]){case"event":onmessage_event(e.body);break;case"visualization":onmessage_visualization(e.body);break;case"definition":onmessage_definition(e.body);break;case"workflow":onmessage_workflow(e.body);break;case"initialization":onmessage_visualization(e.body),onmessage_event(e.body),onmessage_definition(e.body),onmessage_workflow(e.body)}},client_onclose=function(e){onclose_event(e),onclose_visualization(e),onclose_definition(e),onclose_workflow(e),client=null,username="",usermd5=""},on_connect=function(e){username?client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":usermd5,"c3-type":"request_task","c3-format":"json","c3-mod":"initialization"},"hi"):"undefined"!=typeof Cookies.get("c3-md5")&&"undefined"!=typeof Cookies.get("c3-user")&&(username=Cookies.get("c3-user"),client.send("/queue/hook_event_queue",{"reply-to":"/temp-queue/foo","c3-user":username,"c3-md5":Cookies.get("c3-md5"),"c3-type":"request_task","c3-format":"json","c3-mod":"initialization"},"hi"))},on_error=function(e){console.log("error "+e)},$("#first form").keydown(function(e){if(13==e.keyCode)return firstform_submit()}),ascensor=$("#c3Building").ascensor({childType:"section",ascensorFloorName:["Home","Definition","Publish","Event","Visualization","Workflow","SDK","License"],time:300,windowsOn:0,direction:[[1,0],[2,0],[2,1],[2,2],[2,3],[1,3],[0,3],[0,2]],easing:"easeInOutQuad",keyNavigation:!0,swipeNavigation:0,wheelNavigation:0,loop:"increment",queued:"y"}),ascensorInstance=$("#c3Building").data("ascensor"),$(".links-to-floor li").click(function(e,t){ascensorInstance.scrollToFloor($(this).index())}),$(".links-to-floor li:eq("+ascensor.data("current-floor")+")").addClass("selected"),ascensor.on("scrollStart",function(e,t){$(".links-to-floor li").removeClass("selected"),$(".links-to-floor li:eq("+t.to+")").addClass("selected")}),$(".prev").click(function(){ascensorInstance.prev()}),$(".next").click(function(){ascensorInstance.next()}),$(".direction").click(function(){ascensorInstance.scrollToDirection($(this).data("direction"))}),ws_connect()}function start_visualizationapp(){messageContainer=document.getElementById("chat"),mc="WebSocket"in window?messageContainer.appendChild(createChatEntry("C3","Input C3 Hook, e.g. c3://1aec91bc081c11e4903e4ed6eaf04282.xc")):messageContainer.appendChild(createChatEntry("C3","WebSocket is NOT supported by your browser!")),ow=document.getElementById("chat").offsetWidth,oh=document.getElementById("chat").offsetHeight,$("#message").keydown(function(e){if(13==e.keyCode)return sendMessage(),!1})}function start_eventapp(){messageContainer3=document.getElementById("chat3"),"WebSocket"in window?messageContainer3.appendChild(createChatEntry3("C3","Input C3 Hook, e.g. c3://1aec91bc081c11e4903e4ed6eaf04282.xc")):messageContainer3.appendChild(createChatEntry3("C3","WebSocket is NOT supported by your browser!")),$("#message3").keydown(function(e){if(13==e.keyCode)return sendMessage3(),!1})}function start_workflowapp(){$("#three form").keydown(function(e){if(13==e.keyCode)return send_c3message("c3_get_task",""),!1})}var c3_protocol=["OK1","OK2","OK3"],client,username="",usermd5="",client_debug,client_onreceive,client_onclose,on_connect,on_error,messageContainer3=null,event_init=!1,mc=null,ow=910,oh=800,svg=null,messageContainer=null,visualization_init=!1,ascensor,ascensorInstance,c3dv;"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(e){return this.slice(0,e.length)===e}),Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e},Array.prototype.unique=function(){for(var e=[],t=0;t<this.length;t++)e.indexOf(this[t])==-1&&e.push(this[t]);return e},window.onload=function(){c3dv={css:function(e,t,n){var s=document.getElementById(t),c=document.head||document.getElementsByTagName("head")[0];if(s){if(!n)return s;c.removeChild(s),s=null}var o=document.createElement("link");return o.id=t,o.href=e,o.rel="stylesheet",o.type="text/css",c.appendChild(o),o},js:function(e,t,n,s){var c=document.getElementById(t),o=document.head||document.getElementsByTagName("head")[0];if(c){if(!n)return c;o.removeChild(c),c=null}var a=document.createElement("script");return a.id=t,a.src=e,a.type="text/javascript",a.readyState?a.onreadystatechange=function(){"loaded"!=a.readyState&&"complete"!=a.readyState||(a.onreadystatechange=null,s&&s())}:a.onload=function(){s&&s()},o.appendChild(a),a}},c3dv.css("c3js/d3style.css","c3dvcss_d3style",!1),c3dv.css("c3js/c3style.css","c3dvcss_c3style",!1),$(".loading").animate({width:"2%"},50),c3dv.js("jquery.easing-1.3.js","c3dvjs_jquery_easing",!1,function(){$(".loading").animate({width:"20%"},50),c3dv.js("jquery.ascensor.js","c3dvjs_jquery_ascensor",!1,function(){$(".loading").animate({width:"40%"},50),c3dv.js("stomp-1.0.1.js","c3dvjs_stomp",!1,function(){$(".loading").animate({width:"60%"},50),c3dv.js("md5-min.js","c3dvjs_md5",!1,function(){$(".loading").animate({width:"80%"},50),c3dv.js("js.cookie.js","c3dvjs_jscookie",!1,function(){$(".loading").animate({width:"100%"},50),start_consoleapp(),document.getElementsByTagName("body")[0].setAttribute("class","zoom1"),$(".loading")[0].style.display="none",start_eventapp()})})})})}),$("#select_vtype").attr("disabled","disabled"),c3dv.js("c3js/d3.v3.min.js","c3dvjs_d3_v3",!1,function(){start_visualizationapp(),$("#select_vtype").removeAttr("disabled")}),c3dv.js("c3js/json2.js","c3dvjs_json2",!1,function(){c3dv.js("c3js/raphael.js","c3dvjs_raphael",!1,function(){c3dv.js("c3js/joint.js","c3dvjs_joint",!1,function(){c3dv.js("c3js/joint.dia.js","c3dvjs_joint_dia",!1,function(){c3dv.js("c3js/joint.dia.devs.js","c3dvjs_joint_dia_devs",!1,function(){start_workflowapp()})})})})})};