Update ice-coder.min.js

This commit is contained in:
Matt Pass
2019-10-02 09:02:36 +01:00
committed by GitHub
parent 4a348f806e
commit f66b3da868

241
lib/ice-coder.min.js vendored
View File

@@ -4,126 +4,127 @@ debounce:"",editorFocusInstance:"",openSeconds:0,indexing:!1,ready:!1,initAliase
(top.ICEcoder.filesW=ICEcoder.minFilesW);ICEcoder.setLayout();top.ICEcoder.overFileFolder("folder","|");top.ICEcoder.selectFileFolder("init");top.ICEcoder.filesFrame.contentWindow.focus();top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.autoOpenInt=setInterval(function(){top.ICEcoder.fmReady&&(top.ICEcoder.openLastFiles&&top.ICEcoder.autoOpenFiles(),clearInterval(top.ICEcoder.autoOpenInt))},4);setInterval(ICEcoder.updateNestingIndicator,30);top.ICEcoder.startBugChecking();top.ICEcoder.autoLogoutTimer=
0;top.ICEcoder.oneSecondInt=setInterval(function(){top.ICEcoder.autoLogoutTimer++;for(var a=!1,b=1;b<=ICEcoder.savedPoints.length;b++)ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()&&(a=!0);!a&&1<top.ICEcoder.autoLogoutMins&&top.ICEcoder.autoLogoutTimer==60*top.ICEcoder.autoLogoutMins-60&&top.ICEcoder.autoLogoutWarningScreen();get("autoLogoutIFrame")&&get("autoLogoutIFrame").contentWindow.document.getElementById("timeRemaning")&&(get("autoLogoutIFrame").contentWindow.document.getElementById("timeRemaning").innerHTML=
0<top.ICEcoder.autoLogoutTimer?60*top.ICEcoder.autoLogoutMins-top.ICEcoder.autoLogoutTimer:0);!a&&0<ICEcoder.autoLogoutMins&&top.ICEcoder.autoLogoutTimer>=60*top.ICEcoder.autoLogoutMins&&top.ICEcoder.logout("autoLogout");top.ICEcoder.openSeconds++;0==top.ICEcoder.openSeconds%300&&(top.ICEcoder.filesFrame.contentWindow.frames.pingActive.location.href="lib/session-active-ping.php");top.ICEcoder.indexing||top.ICEcoder.loadingFile||0!==top.ICEcoder.serverQueueItems.length||0!=top.ICEcoder.openSeconds%
3||(top.ICEcoder.indexing=!0,fetch("lib/indexer.php").then(function(a){return a.json()}).then(function(a){top.ICEcoder.indexData=a;top.ICEcoder.indexing=!1}))},1E3);top.ICEcoder.ready=!0},setLayout:function(a){var b=window.innerWidth;var c=window.innerHeight;this.header.style.width=this.tabsBar.style.width=this.findBar.style.width=b+"px";this.files.style.width=this.editor.style.left=this.filesW+"px";this.optionsFile.style.width=this.optionsEdit.style.width=this.optionsSource.style.width=this.optionsHelp.style.width=
this.filesW-60+"px";this.filesFrame.style.height=c-25-35-30+"px";this.nestValid.style.left=this.filesW+10+"px";this.versionsDisplay.style.left=this.filesW+25+"px";this.splitPaneControls.style.left=parseInt((b-this.filesW)/2,10)-25-4+this.filesW-100+"px";this.splitPaneNamesMain.style.left=parseInt(.25*(b-this.filesW),10)-50+this.filesW-60+"px";this.splitPaneNamesDiff.style.left=parseInt(.75*(b-this.filesW),10)-50+this.filesW-135+"px";top.ICEcoder.setTabWidths();a||(this.editor.style.width=ICEcoder.content.style.width=
b-this.filesW-200+"px",ICEcoder.terminal.style.width=b-this.filesW+"px",ICEcoder.output.style.width=b-this.filesW+"px",ICEcoder.database.style.width=b-this.filesW+"px",ICEcoder.git.style.width=b-this.filesW+"px",ICEcoder.content.style.height=c-25-21-28-26+"px",ICEcoder.terminal.style.height=c+"px",ICEcoder.output.style.height=c+"px",ICEcoder.database.style.height=c+"px",ICEcoder.git.style.height=c+"px",ICEcoder.terminal.style.top=c+"px",ICEcoder.output.style.top=c+"px",ICEcoder.database.style.top=
c+"px",ICEcoder.git.style.top=c+"px",!1!==top.ICEcoder.showingTool&&(get(top.ICEcoder.showingTool).style.top=0),setTimeout(function(){for(var a=0;a<top.ICEcoder.openFiles.length;a++)top.ICEcoder.splitPane||top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize(top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height),top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]+"diff"].setSize(100-top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height),
top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]+"diff"].getWrapperElement().style.left=top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.splitPane&&top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize(top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height);this.docExplorer.style.height=top.ICEcoder.content.style.height;top.ICEcoder.splitPane?top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?
parseInt(parseInt(ICEcoder.content.style.width,10)/2,10)+17+"px":parseInt(parseInt(ICEcoder.content.style.width,10)/2,10)+"px":top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?"17px":"0"},4))},setSplitPane:function(a){top.ICEcoder.splitPane="on"==a?!0:!1;top.get("splitPaneControlsOff").style.opacity=top.ICEcoder.splitPane?.2:.5;top.get("splitPaneControlsOn").style.opacity=top.ICEcoder.splitPane?.5:.2;top.get("splitPaneNamesMain").style.opacity=
top.get("splitPaneNamesDiff").style.opacity=top.ICEcoder.splitPane?1:0;top.ICEcoder.setLayout();if(top.ICEcoder.splitPane){top.ICEcoder.updateDiffs();var b=top.ICEcoder.getcMInstance();top.ICEcoder.cMonScroll(b,"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1])}else if(b=top.ICEcoder.getcMInstance(),a=top.ICEcoder.getcMdiffInstance(),b){cMmarks=b.getAllMarks();for(b=0;b<cMmarks.length;b++)cMmarks[b].clear();cMdiffMarks=a.getAllMarks();for(b=0;b<cMdiffMarks.length;b++)cMdiffMarks[b].clear()}"undefined"!=
typeof top.ICEcoder.animSplitPaneInt&&clearInterval(top.ICEcoder.animSplitPaneInt);top.ICEcoder.animSplitPaneInt=setInterval(function(){top.ICEcoder.splitPane&&50.1<top.ICEcoder.splitPaneLeftPerc?top.ICEcoder.splitPaneLeftPerc=(top.ICEcoder.splitPaneLeftPerc-50)/1.8+50:!top.ICEcoder.splitPane&&99.9>top.ICEcoder.splitPaneLeftPerc?top.ICEcoder.splitPaneLeftPerc=50-(100-top.ICEcoder.splitPaneLeftPerc)/1.8+50:(top.ICEcoder.splitPaneLeftPerc=top.ICEcoder.splitPane?50:100,clearInterval(top.ICEcoder.animSplitPaneInt));
top.ICEcoder.setLayout()},4)},toolShowHideToggle:function(a){var b=window.innerHeight;-1<["terminal","output","database","git"].indexOf(a)&&(get("terminal").style.top=b+"px",get("output").style.top=b+"px",get("database").style.top=b+"px",get("git").style.top=b+"px",get(a).style.top=top.ICEcoder.showingTool===a?b+"px":0,"terminal"===a&&setTimeout(function(){top.ICEcoder.terminal.contentWindow.document.getElementById("command").focus()},0),top.ICEcoder.showingTool=top.ICEcoder.showingTool!==a?a:!1)},
docExplorerShow:function(a){var b;get("miniMap").style.display="miniMap"==a?"block":"none";get("functionClassList").style.display="functionClassList"==a?"block":"none";"miniMap"==a&&(top.miniMapInt=setInterval(function(){0!=get("miniMapContent").getBoundingClientRect().height&&(b=top.ICEcoder.getcMInstance(),top.ICEcoder.setMinimapLayout(b),clearInterval(top.miniMapInt))},10))},changeFilesW:function(a){ICEcoder.lockedNav&&ICEcoder.filesW!=ICEcoder.minFilesW||("undefined"!=typeof ICEcoder.changeFilesInt&&
clearInterval(ICEcoder.changeFilesInt),ICEcoder.changeFilesInt=setInterval(function(){ICEcoder.changeFilesWStep(a)},10))},changeFilesWStep:function(a){"expand"==a?ICEcoder.filesW<ICEcoder.maxFilesW-1?ICEcoder.filesW+=Math.ceil((ICEcoder.maxFilesW-ICEcoder.filesW)/2):ICEcoder.filesW=ICEcoder.maxFilesW:ICEcoder.filesW>ICEcoder.minFilesW+1?ICEcoder.filesW-=Math.ceil((ICEcoder.filesW-ICEcoder.minFilesW)/2):ICEcoder.filesW=ICEcoder.minFilesW;("expand"==a&&ICEcoder.filesW==ICEcoder.maxFilesW||"contract"==
a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt);ICEcoder.setLayout()},canResizeFilesW:function(){top.ICEcoder.ready&&"w-resize"==top.document.body.style.cursor?top.ICEcoder.mouseDown&&"gutter"==top.ICEcoder.mouseDownInCM&&(top.ICEcoder.filesW=top.ICEcoder.maxFilesW=250<=top.ICEcoder.mouseX&&400>=top.ICEcoder.mouseX?top.ICEcoder.mouseX:250>top.ICEcoder.mouseX?250:400,top.ICEcoder.files.style.width=top.ICEcoder.filesFrame.style.width=top.ICEcoder.filesW+"px",top.ICEcoder.setLayout(),
top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;a.style.backgroundPosition=ICEcoder.lockedNav?"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},cMonFocus:function(a,b){top.ICEcoder.getCaretPosition();
top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.editorFocusInstance=b;top.ICEcoder.getCaretPosition()},cMonBlur:function(a,b){},cMonKeyUp:function(a,b){"undefined"!=typeof top.doFind&&clearInterval(top.doFind);top.doFind=setTimeout(function(){top.ICEcoder.findReplace(top.get("find").value,!0,!1)},500);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()},cMonCursorActivity:function(a,b){top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();
top.ICEcoder.updateByteDisplay();a.removeLineClass(top.ICEcoder["cMActiveLine"+b],"background");a.getCursor("start").line==a.getCursor().line&&(top.ICEcoder["cMActiveLine"+b]=a.addLineClass(a.getCursor().line,"background","cm-s-activeLine"));"CSS"==top.ICEcoder.caretLocType&&top.ICEcoder.cssColorPreview();var c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.prevLineDiff:top.ICEcoder.prevLine;c!=a.getCursor().line&&a.getLine(c)&&0<a.getLine(c).length&&0==a.getLine(c).replace(/\s/g,
"").length&&a.replaceRange("",{line:c,ch:0},{line:c,ch:1E6});setTimeout(function(){for(var d,c=0;c<top.ICEcoder.renderLineStyle.length;c++){d=!1;if("diff"!=top.ICEcoder.renderLineStyle[c][0]&&-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[c][0]&&-1<b.indexOf("diff"))d=!0;d&&a.getCursor().line+1==top.ICEcoder.renderLineStyle[c][1]?a.setOption("cursorHeight",a.defaultTextHeight()/a.lineInfo(a.getCursor().line).handle.height):a.setOption("cursorHeight",1)}},0)},cMonBeforeChange:function(a,
b,c,d){b=a.listSelections();for(var e=0;e<b.length;e++){var f=d.findMatchingTag(a,b[e].anchor);if(0!==c.text[0].indexOf(">")&&"undefined"!=typeof f&&"undo"!=c.origin&&"redo"!=c.origin&&"undefined"!=typeof f.open&&"undefined"!=typeof f.close){var g="open"==f.at?"close":"open";null!==f[g]&&(f=f[g].tag+";"+f[g].from.line+":"+f[g].from.ch,-1==top.ICEcoder.oppTagReplaceData.indexOf(f)&&top.ICEcoder.oppTagReplaceData.push(f))}}},cMonChange:function(a,b,c,d){var e;b=a.listSelections();top.ICEcoder.loadingFile?
setTimeout(function(){a.replaceRange("X",{line:1,ch:1},{line:1,ch:1});a.undo();a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration();top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=a.getValue()},0):top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);setTimeout(function(){top.ICEcoder.scrollBarVisible=a.getScrollInfo().height>a.getScrollInfo().clientHeight;top.ICEcoder.setLayout()},0);if("undefined"!=typeof top.ICEcoder.oppTagReplaceData[0])for(var f=
0;f<top.ICEcoder.oppTagReplaceData.length;f++){var g=top.ICEcoder.oppTagReplaceData[f].split(";");var m=g[0];var h=1*g[1].split(":")[0];var l=1*g[1].split(":")[1];b[f]&&(e=d.findMatchingTag(a,b[f].anchor));if("undefined"!=typeof e&&(m="open"==e.at?e.open.tag:e.close.tag,"undefined"!=typeof c.from)){var n=h==c.from.line?c.text[0].length-c.removed[0].length:0;var p="close"==e.at&&h==c.from.line?c.removed[0].length-c.text[0].length+1:1;var k={line:h,ch:l+n+("open"==e.at?2:p)};n={line:h,ch:l+n+("open"==
e.at?2:p)+g[0].length}}""!=m.trim()&&"undefined"!=typeof k&&"undefined"!=typeof n&&a.getRange(k,n)==g[0]&&(a.replaceRange(m,k,n),"close"==e.at&&(top.ICEcoder.autocompleteSkip=!0))}top.ICEcoder.oppTagReplaceData=[];top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.updateNestingIndicator();top.ICEcoder.findMode&&(top.ICEcoder.results.splice(top.ICEcoder.findResult,1),top.get("results").innerHTML=top.ICEcoder.results.length+" "+top.t.results,
top.ICEcoder.findMode=!1);top.ICEcoder.updateFunctionClassList();"undefined"!=typeof top.doMiniNav&&clearTimeout(top.doMiniNav);top.ICEcoder.loadingFile?top.ICEcoder.setMinimap():top.doMiniNav=setTimeout(function(){top.ICEcoder.setMinimap()},1E3);if(c=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]){var r=c.substr(c.lastIndexOf("/")+1);var t=r.substr(r.lastIndexOf(".")+1)}top.ICEcoder.splitPane&&setTimeout(function(){top.ICEcoder.updateDiffs()},0);c&&top.ICEcoder.previewWindow.location&&"/[NEW]"!=
c&&top.ICEcoder.updatePreviewWindow(a,c,r,t);top.ICEcoder.indicateChanges()},cMonUpdate:function(a,b){setTimeout(function(){get("docExplorer").style.background=window.getComputedStyle(a.getWrapperElement(),null).getPropertyValue("background")},0);top.ICEcoder.setMinimapLayout(a,b)},cMonScroll:function(a,b){top.ICEcoder.mouseDown=!1;top.ICEcoder.mouseDownInCM=!1;if(top.ICEcoder.splitPane){var c=top.ICEcoder.getcMInstance();var d=top.ICEcoder.getcMdiffInstance();var e=-1<b.indexOf("diff")?c:d;c&&setTimeout(function(){e.scrollTo(a.getScrollInfo().left,
a.getScrollInfo().top)},0)}top.ICEcoder.setMinimapLayout(a,b)},cMonInputRead:function(a,b){"keypress"==top.ICEcoder.autoComplete&&top.ICEcoder.codeAssist&&!a.state.completionActive&&(top.ICEcoder.autocompleteSkip?top.ICEcoder.autocompleteSkip=!1:top.ICEcoder.autocomplete())},cMonGutterClick:function(a,b,c,d,e){top.ICEcoder.mouseDownInCM="gutter"},cMonMouseDown:function(a,b,c){top.ICEcoder.mouseDownInCM="editor"},cMonContextMenu:function(a,b,c){b=a.coordsChar({left:c.pageX,top:c.pageY});a.setCursor(b);
c.ctrlKey&&setTimeout(function(){var b=a,c=b.getRange(b.findWordAt(b.getCursor()).anchor,b.findWordAt(b.getCursor()).head);result=null;numResults=0;var f=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];f=f.substr(f.lastIndexOf(".")+1);for(i in top.ICEcoder.indexData.functions[f])i===c&&(result=top.ICEcoder.indexData.functions[f][i],numResults++);for(i in top.ICEcoder.indexData.classes[f])i===c&&(result=top.ICEcoder.indexData.classes[f][i],numResults++);1===numResults&&-1===[null,"def"].indexOf(b.getTokenTypeAt(b.getCursor()))&&
(top.ICEcoder.openFile(result.filePath.replace(top.docRoot,"")),top.ICEcoder.goFindAfterOpenInt=setInterval(function(){top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]!=result.filePath.replace(top.docRoot,"")||top.ICEcoder.loadingFile||(b=top.ICEcoder.getcMInstance(),setTimeout(function(){top.ICEcoder.goToLine(result.range.from.line+1);b.setSelection({line:result.range.from.line,ch:result.range.from.ch},{line:result.range.to.line,ch:result.range.to.ch})},20),clearInterval(top.ICEcoder.goFindAfterOpenInt))},
20));top.ICEcoder.mouseDownInCM="editor"},0)},cMonDragOver:function(a,b,c){top.ICEcoder.setDragCursor(b,"editor")},cMonRenderLine:function(a,b,c,d){for(var e,f=0;f<top.ICEcoder.renderLineStyle.length;f++){e=!1;if("diff"!=top.ICEcoder.renderLineStyle[f][0]&&-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[f][0]&&-1<b.indexOf("diff"))e=!0;e&&a.lineInfo(c).line+1==top.ICEcoder.renderLineStyle[f][1]&&(d.style[top.ICEcoder.renderLineStyle[f][2]]=top.ICEcoder.renderLineStyle[f][3])}},functionClassParamsTooltip:function(a,
b){if(top.ICEcoder.indexData){if(0===top.ICEcoder.openFiles.length)return get("tooltip").style.display="none",!0;var c,d=top.ICEcoder.getcMInstance(),e=d.coordsChar({left:top.ICEcoder.mouseX-top.ICEcoder.maxFilesW,top:top.ICEcoder.mouseY-72}),f=d.getRange(d.findWordAt(e).anchor,d.findWordAt(e).head);if(""===f)return get("tooltip").style.display="none",!0;var g=null,m=0,h=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];h=h.substr(h.lastIndexOf(".")+1);for(c in top.ICEcoder.indexData.functions[h])c===
f&&(g=top.ICEcoder.indexData.functions[h][c],m++);for(c in top.ICEcoder.indexData.classes[h])c===f&&(g=top.ICEcoder.indexData.classes[h][c],m++);1===m&&-1===[null,"def"].indexOf(d.getTokenTypeAt(e))?(get("tooltip").style.display="block",get("tooltip").style.left=top.ICEcoder.mouseX-top.ICEcoder.maxFilesW+10+"px",get("tooltip").style.top=top.ICEcoder.mouseY-30+"px",get("tooltip").style.zIndex="1",get("tooltip").innerHTML=g.params):get("tooltip").style.display="none"}},updateDiffs:function(){top.ICEcoder.renderLineStyle=
[];top.ICEcoder.renderPaneShiftAmount=0;var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.getcMdiffInstance();var c=a?difflib.stringAsLines(a.getValue()):"";var d=b?difflib.stringAsLines(b.getValue()):"";c=(new difflib.SequenceMatcher(c,d)).get_opcodes();if(a){var e=a.getAllMarks();for(d=0;d<e.length;d++)e[d].clear();e=b.getAllMarks();for(d=0;d<e.length;d++)e[d].clear()}if(a&&""!=b.getValue())for(d=0;d<c.length;d++)if("equal"!==c[d][0]){if("replace"==c[d][0]){var f=(c[d][4]-c[d][2]+1+top.ICEcoder.renderPaneShiftAmount)*
a.defaultTextHeight();for(e=c[d][4]-1;e<=c[d][2]-1;e++)b.getLineHandle(e).height>a.defaultTextHeight()&&(f+=b.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",f+"px"]);for(e=0;e<c[d][2]-c[d][1];e++)f=top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+e),b.getLine(c[d][3]+e)),a.markText({line:c[d][1]+e,ch:0},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:f[0]},{className:"diffGreyLighter"}),a.markText({line:c[d][1]+
e,ch:f[0]},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:f[0]+f[1]},{className:"diffGrey"}),a.markText({line:c[d][1]+e,ch:f[0]+f[1]},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:1E6},{className:"diffGreyLighter"})}else a.markText({line:c[d][1],ch:0},{line:c[d][2]-1,ch:1E6},{className:"diffGreen"});"replace"!=c[d][0]&&c[d][1]==c[d][2]&&(top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",(c[d][4]-c[d][3]+1)*a.defaultTextHeight()+"px"]),a.markText({line:c[d][2]-1,ch:0},{line:c[d][2]-
1,ch:1E6},{className:"diffNone"}));if("replace"==c[d][0]){f=(c[d][2]-c[d][4]+1-top.ICEcoder.renderPaneShiftAmount)*a.defaultTextHeight();for(e=c[d][4]-1;e<=c[d][2]-1;e++)a.getLineHandle(e).height>a.defaultTextHeight()&&(f+=a.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",f+"px"]);for(e=0;e<c[d][4]-c[d][3];e++)f=top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+e),b.getLine(c[d][3]+e)),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,
ch:0},{line:c[d][3]+e,ch:f[0]},{className:"diffGreyLighter"}),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,ch:f[0]},{line:c[d][3]+e,ch:f[0]+f[2]},{className:"diffGrey"}),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,ch:f[0]+f[2]},{line:c[d][3]+e,ch:1E6},{className:"diffGreyLighter"})}else b.markText({line:c[d][3],ch:0},{line:c[d][4]-1,ch:1E6},{className:"diffRed"});"replace"!=c[d][0]&&c[d][3]==c[d][4]&&(top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",(c[d][2]-
c[d][1]+1)*a.defaultTextHeight()+"px"]),b.markText({line:c[d][4]-1,ch:0},{line:c[d][4]-1,ch:1E6},{className:"diffNone"}));top.ICEcoder.renderPaneShiftAmount=c[d][2]-c[d][4]}},findStringDiffs:function(a,b){"undefined"==typeof a&&(a="");"undefined"==typeof b&&(b="");for(var c=0,d=a.length,e=b.length;a[c]&&a[c]==b[c];c++);for(;d>c&e>c&a[d-1]==b[e-1];d--)e--;return[c,d-c,e-c]},updatePreviewWindow:function(a,b,c,d){top.ICEcoder.previewWindow.location.pathname==b?-1<["htm","html","txt"].indexOf(d)?top.ICEcoder.previewWindow.document.documentElement.innerHTML=
a.getValue():-1<["md"].indexOf(d)&&(top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())):-1<["css"].indexOf(d)&&-1<top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(c)&&(a=a.getValue(),c=document.createElement("style"),c.type="text/css",c.id="ICEcoder"+b.replace(/\//g,"_"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),top.ICEcoder.previewWindow.document.getElementById(c.id)&&top.ICEcoder.previewWindow.document.documentElement.removeChild(top.ICEcoder.previewWindow.document.getElementById(c.id)),
top.ICEcoder.previewWindow.document.documentElement.appendChild(c));try{top.ICEcoder.doPesticide()}catch(e){}try{top.ICEcoder.doStatsJS("update")}catch(e){}try{top.ICEcoder.doResponsive()}catch(e){}},contentCleanUp:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getValue();b=b.replace(/<ICEcoder:\/:textarea>/g,"</textarea>");a.setValue(b);a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=
a.changeGeneration();top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=a.getValue()},undo:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).undo()},redo:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).redo()},indent:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
c:b;"more"==a?top.ICEcoder.content.contentWindow.CodeMirror.commands.indentMore(b):top.ICEcoder.content.contentWindow.CodeMirror.commands.indentLess(b)},moveLines:function(a){var b;var c=top.ICEcoder.getcMInstance();var d=top.ICEcoder.getcMdiffInstance();var e=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c;var f=e.getCursor("start");var g=e.getCursor("end");"up"==a&&0<f.line&&(b=f.line-1);"down"==a&&g.line<e.lineCount()-1&&(b=g.line+1);if(!isNaN(b)){var m=e.getLine(b);e.operation(function(){if("up"==
a)for(var b=f.line;b<=g.line;b++)e.replaceRange(e.getLine(b),{line:b-1,ch:0},{line:b-1,ch:1E6});else for(b=g.line;b>=f.line;b--)e.replaceRange(e.getLine(b),{line:b+1,ch:0},{line:b+1,ch:1E6});e.replaceRange(m,{line:"up"==a?g.line:f.line,ch:0},{line:"up"==a?g.line:f.line,ch:1E6});e.setSelection({line:f.line+("up"==a?-1:1),ch:f.ch},{line:g.line+("up"==a?-1:1),ch:g.ch})})}},highlightLine:function(a){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
c:b;b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(a){if(!/iPhone|iPad|iPod/i.test(navigator.userAgent)){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();(a=a?c:b)&&a.focus()}},goToLine:function(a,b,c){a=a?a-1:top.get("goToLineNo").value-1;b=b?b:0;var d=ICEcoder.getcMInstance();var e=ICEcoder.getcMdiffInstance();var f=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?e:d;top.ICEcoder.scrollingOnLine=f.getCursor().line;"undefined"!=typeof top.ICEcoder.scrollInt&&
clearInterval(top.ICEcoder.scrollInt);top.ICEcoder.scrollInt=setInterval(function(){top.ICEcoder.scrollingOnLine+=(a-top.ICEcoder.scrollingOnLine)/5;f.scrollTo(0,f.defaultTextHeight()*top.ICEcoder.scrollingOnLine-f.getScrollInfo().clientHeight/10);top.ICEcoder.setMinimapLayout(f);Math.round(top.ICEcoder.scrollingOnLine)==a&&clearInterval(top.ICEcoder.scrollInt)},10);f.setCursor(a,b);c||(top.ICEcoder.focus(),setTimeout(function(){top.ICEcoder.focus()},0));return!1},lineCommentToggle:function(){var a=
ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().ch;var c=a.getCursor().line;var d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,b,c,d,d.length)},tagWrapper:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;b=a;if("div"==a){var e=d.getCursor("start").line;var f=d.getCursor().line;d.operation(function(){d.replaceSelection("<div>\n"+
d.getSelection()+"\n</div>","around");for(var a=e+1;a<=f+1;a++)d.indentLine(a);d.indentLine(f+2,"prev");d.indentLine(f+2,"subtract")})}else-1<["p","a","h1","h2","h3"].indexOf(a)&&d.getSelection().substr(0,a.length+1)=="<"+b&&d.getSelection().substr(-(a.length+3))=="</"+a+">"?d.replaceSelection(d.getSelection().substr(d.getSelection().indexOf(">")+1,d.getSelection().length-d.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(b='a href=""'),d.replaceSelection("<"+b+">"+d.getSelection()+"</"+
a+">","around"),"a"==a&&d.setCursor({line:d.getCursor("start").line,ch:d.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange("\n"+d.getLine(a),{line:a,ch:0},{line:a,ch:1E6});d.setCursor({line:d.getCursor().line-1,ch:0});d.execCommand("indentAuto")})},insertLineAfter:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange(d.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});d.execCommand("indentAuto")})},duplicateLines:function(a){var b=
ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;if(!a&&b.somethingSelected()){c=b.getCursor("start");var d=b.getCursor("end");a=c.line!=d.line&&d.ch==b.getLine(d.line).length?"\n":"";b.replaceSelection(b.getSelection()+a+b.getSelection(),"end");b.setSelection(c,d)}else a||(a=b.getCursor().line),c=b.getCursor().ch,b.replaceRange(b.getLine(a)+"\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6}),b.setCursor(a+1,c)},removeLines:function(a){var b=
ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;!a&&b.somethingSelected()?b.replaceSelection("","end"):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.execCommand("deleteLine"),b.setCursor(a-1,c))},jumpToDefinition:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getTokenAt(a.getCursor()).string;if(a.somethingSelected()&&top.ICEcoder.origCurorPos)a.setCursor(top.ICEcoder.origCurorPos);
else for(top.ICEcoder.origCurorPos=a.getCursor(),a=["var "+b,"function "+b,b+"=function",b+"= function",b+" =function",b+" = function",b+"=new function",b+"= new function",b+" =new function",b+" = new function","window['"+b+"']",'window["'+b+'"]',"this['"+b+"']",'this["'+b+'"]',b+":",b+" :","def "+b,"class "+b],b=0;b<a.length&&!top.ICEcoder.findReplace(a[b],!1,!1);b++);},updateFunctionClassList:function(){var a;var b=ICEcoder.getcMInstance();top.ICEcoder.functionClassList=[];b&&(b.doc.eachLine(function(a){top.ICEcoder.updateFunctionClassListItems(a)}),
setTimeout(function(){a="";for(var b=0;b<top.ICEcoder.functionClassList.length;b++)top.ICEcoder.functionClassList[b].verified&&(a+='<div onclick="top.ICEcoder.goToLine('+(top.ICEcoder.functionClassList[b].line+1)+')" class="functionClassListItem"><span class="name">'+top.ICEcoder.functionClassList[b].name+'</span><br><span class="params">'+top.ICEcoder.functionClassList[b].params+"</span></div>");get("functionClassList").innerHTML=a},0))},updateFunctionClassListItems:function(a){var b=ICEcoder.getcMInstance();
var c="";-1<a.text.indexOf("function ")&&-1<a.text.replace(/\$function/g,"").indexOf("function ")&&(c=a.text.substring(a.text.indexOf("function ")+9));-1<a.text.indexOf("class ")&&-1<a.text.replace(/\$class/g,"").indexOf("class ")&&(c=a.text.substring(a.text.indexOf("class ")+6));c=c.trim().split("{")[0].split("(");""!=c[0]&&(top.ICEcoder.functionClassList.push({line:b.getLineNumber(a),name:c[0],params:"("+(c[1]?c[1].replace(/[,]/g,", "):""),verified:!1}),setTimeout(function(){if(!a.styles||a.styles&&
-1<a.styles.indexOf("def")&&b.getLineNumber(a))for(var d=0;d<top.ICEcoder.functionClassList.length;d++)top.ICEcoder.functionClassList[d].line==b.getLineNumber(a)&&(top.ICEcoder.functionClassList[d].verified=!0)},0))},setMinimap:function(){var a;if(a=ICEcoder.getcMInstance()){top.ICEcoder.content.contentWindow.CodeMirror.runMode(a.getValue(),a.getOption("mode"),get("miniMapContent"));get("miniMapContent").innerHTML='<div class="cm-s-'+top.ICEcoder.theme+'" style="font-family: monospace; white-space: '+
(1==top.ICEcoder.lineWrapping?"pre-wrap":"pre")+'; font-size: 2px; line-height: 2px">'+get("miniMapContent").innerHTML+"</div>";get("miniMapContent").innerHTML=get("miniMapContent").innerHTML.replace(/<span /g,'<span style="font-size: 2px; font-family: monospace" ');get("miniMapContainer").innerHTML='<div style="position: absolute; display: inline-block; top: '+top.ICEcoder.miniMapBoxTop+"px; left: 0; width: 200px; height: "+top.ICEcoder.miniMapBoxHeight+'px; background: rgba(0,198,255,0.1); z-index: 1; cursor: pointer" id="miniMapBox"></div>';
var b=get("miniMapBox");b=new Draggabilly(b,{axis:"y",containment:!0});b.on("dragMove",function(b,d,e){yPos=this.position.y;maxHeight=parseInt(get("docExplorer").style.height,10)<=parseInt(get("miniMapContent").getBoundingClientRect().height,10)?parseInt(get("docExplorer").style.height,10):parseInt(get("miniMapContent").getBoundingClientRect().height,10);newPerc=this.position.y/(maxHeight-top.ICEcoder.miniMapBoxHeight);yPos=(a.getScrollInfo().height-a.getScrollInfo().clientHeight)*newPerc;a.scrollTo(0,
yPos)});b.on("pointerDown",function(a,b){top.ICEcoder.mouseDownMinimap=!0});b.on("pointerUp",function(a,b){top.ICEcoder.mouseDownMinimap=!1});top.ICEcoder.setMinimapLayout(a);get("docExplorer").style.right="-220px"}},setMinimapLayout:function(a,b){if(get("miniMapBox")&&a){var c=top.ICEcoder.getcMInstance();var d=a.getScrollInfo().top/(a.getScrollInfo().height-a.getScrollInfo().clientHeight);parseInt(get("miniMapContent").getBoundingClientRect().height,10)>parseInt(get("docExplorer").style.height,
10)?(get("miniMapContainer").style.height=parseInt(get("docExplorer").style.height,10)+"px",top.ICEcoder.miniMapBoxHeight=parseInt(get("docExplorer").style.height,10)/c.defaultTextHeight()*2,get("miniMapBox").style.height=top.ICEcoder.miniMapBoxHeight+"px",top.ICEcoder.miniMapBoxTop=d*parseInt(get("docExplorer").style.height,10)-d*top.ICEcoder.miniMapBoxHeight,get("miniMapContent").style.marginTop=-(parseInt(get("miniMapContent").getBoundingClientRect().height,10)-parseInt(get("docExplorer").style.height,
10))*d+"px"):(get("miniMapContainer").style.height=parseInt(get("miniMapContent").getBoundingClientRect().height,10)+"px",top.ICEcoder.miniMapBoxHeight=parseInt(get("docExplorer").style.height,10)/c.defaultTextHeight()*2,get("miniMapBox").style.height=top.ICEcoder.miniMapBoxHeight+"px",top.ICEcoder.miniMapBoxTop=d*parseInt(get("miniMapContainer").getBoundingClientRect().height,10)-d*top.ICEcoder.miniMapBoxHeight,get("miniMapContent").style.marginTop=0);top.ICEcoder.mouseDownMinimap||(get("miniMapBox").style.top=
top.ICEcoder.miniMapBoxTop+"px")}},autocomplete:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},pasteURL:function(a){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+
a);b.replaceSelection(a,"around")},searchForSelected:function(){var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;top.ICEcoder.caretLocType&&(""!=a.getSelection()?(b=top.ICEcoder.caretLocType.toLowerCase()+" ","Content"==top.ICEcoder.caretLocType&&(b=""),window.open("http://www.google.com/#output=search&q="+b+a.getSelection())):top.ICEcoder.message(top.t["No text selected..."]))},fmAction:function(a,b){var c=top.get("filesFrame").contentWindow.document.getElementById(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
1]+"_perms").parentNode;var d=c.parentNode;var e=-1<c.onmouseover.toString().indexOf("'folder'")?"folder":"file";var f=!1;"up"==b&&(d.previousSibling&&d.previousSibling.previousSibling?(f=d.previousSibling.previousSibling,"UL"==f.tagName&&(f=f.childNodes[f.childNodes.length-1])):d.parentNode.previousSibling&&(f=d.parentNode.previousSibling),f&&(f=f.childNodes[0]));"down"==b&&(d.nextSibling&&d.nextSibling.childNodes[0]?f=d.nextSibling.childNodes[0]:d.nextSibling&&d.nextSibling.nextSibling?f=d.nextSibling.nextSibling:
d.parentNode.nextSibling&&(f=d.parentNode.nextSibling.nextSibling),f&&(f=f.childNodes[0]));"left"==b&&"folder"==e&&d.parentNode.previousSibling&&top.ICEcoder.openCloseDir(c,!1);if("right"==b||"enter"==b)"folder"==e?top.ICEcoder.openCloseDir(c,!0):top.ICEcoder.openFile(c.childNodes[1].id.replace(/\|/g,"/"));f&&f.childNodes[1]&&(top.ICEcoder.overFileFolder(e,f.childNodes[1].id),top.ICEcoder.selectFileFolder(a))},openCloseDir:function(a,b){var c;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey||
top.ICEcoder.openCloseDir(this,!b)};var d=a.parentNode;d.nextSibling&&(d=d.nextSibling);d&&"UL"==d.tagName&&((c="none"==d.style.display)?b=!0:d.style.display="none",a.parentNode.className=a.className=c?"pft-directory dirOpen":"pft-directory");b?top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/get-branch.php?location="+a.childNodes[1].id+"&csrf="+top.ICEcoder.csrf:"UL"==d.tagName&&d.parentNode.removeChild(d);return!1},overFileFolder:function(a,b){ICEcoder.thisFileFolderType=
a;ICEcoder.thisFileFolderLink=b},isFileFolder:function(a){return(a=top.get("filesFrame").contentWindow.document.getElementById(a.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")))?-1<a.parentNode.parentNode.className.indexOf("directory")?"folder":"file":!1},selectFileFolder:function(a,b,c){if(""==top.ICEcoder.thisFileFolderLink)b||a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink){var d=top.ICEcoder.thisFileFolderLink.replace(/\//g,
"|");var e=top.ICEcoder.filesFrame.contentWindow.document.getElementById(d);if(b||a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(d)?(ICEcoder.selectDeselectFile("deselect",e),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(d),1)):(ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d));else if(c||a.shiftKey){var f=function(a,b,d,c){return("00000000000000000000"+a).substr(-20)};a=!1;b=e.parentNode.parentNode.parentNode;var g=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
1];c=d.replace(/\d+/g,f)<g.replace(/\d+/g,f)?d:g;g=d.replace(/\d+/g,f)>g.replace(/\d+/g,f)?d:g;if(0<top.ICEcoder.selectedFiles.length&&c.substr(0,c.lastIndexOf("|"))==g.substr(0,g.lastIndexOf("|")))for(d=0;1E6>d&&("LI"!=b.childNodes[d].nodeName&&d++,e=b.childNodes[d].childNodes[0].childNodes[1],e.id==c&&(a=!0),1==a&&-1==top.ICEcoder.selectedFiles.indexOf(e.id)&&(ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(e.id)),e.id!=g);d+=2);else ICEcoder.selectDeselectFile("select",
e),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d)}top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<
top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["all filenames"];top.ICEcoder.hideFileMenu()},
deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,b){if(b){var c=-1<top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:!1;top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:
top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal;b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile}},boxSelect:function(a,b){var c=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmDragBox");"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast=
"");if(top.ICEcoder.mouseDown&&!top.ICEcoder.mouseDownInCM&&"drag"==b){top.ICEcoder.fmDraggedBox=!0;var d=0<top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX;c.style.left=(d?top.ICEcoder.fmDragBoxStartX:top.ICEcoder.mouseX)+"px";c.style.width=Math.abs(top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX)+"px";d=0<top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY;c.style.top=(d?top.ICEcoder.fmDragBoxStartY-70:top.ICEcoder.mouseY-70)+"px";c.style.height=Math.abs(top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY)+
"px";""!=top.ICEcoder.thisFileFolderLink&&(""==top.ICEcoder.fmDragSelectFirst?(top.ICEcoder.fmDragSelectFirst=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectFirst),top.ICEcoder.selectFileFolder(a)):(top.ICEcoder.fmDragSelectLast=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectLast),top.ICEcoder.selectFileFolder(a,
!1,"shiftSim")))}"up"==b&&(c.style.width=0,c.style.height=0)},newFile:function(){top.ICEcoder.newTab("alsoSave")},newFolder:function(){var a;var b=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(a=top.ICEcoder.getInput("Enter new folder name at "+b,""))a=(b+"/"+a).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=newFolder&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+
"</b><br>"+a)},returnFileAndLine:function(a){var b=1,c=/^([^ ]*)\s+(on\s+)?(line\s+)?(\d+)/.exec(a);null!==c?(b=c[4],a=c[1]):0<a.indexOf("://")?a.lastIndexOf(":")!==a.indexOf("://")&&(b=a.split(":")[2],a=a.substr(0,a.lastIndexOf(":"))):0<a.indexOf(":")&&(b=a.split(":")[1],a=a.split(":")[0]);0<a.indexOf("(")&&0<a.indexOf(")")&&(b=a.split("(")[1].split(")")[0],a=a.split("(")[0]);return[a,b]},openFile:function(a){if("undefined"!=typeof a){var b=top.ICEcoder.returnFileAndLine(a);a=b[0];b=b[1]}a&&(top.ICEcoder.thisFileFolderLink=
a,top.ICEcoder.thisFileFolderType="file");if("/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink))top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1),1<b&&top.ICEcoder.goToLine(b);else if(""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType){a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/");var c=!0;100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),c=!1);c&&(top.ICEcoder.shortURL=
a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink.replace(/\+/g,"%2B")+"&csrf="+top.ICEcoder.csrf+"&lineNumber="+b),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1))}},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=
a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;if(a=top.ICEcoder.getInput(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){if("undefined"!=typeof a){var b=top.ICEcoder.returnFileAndLine(a);a=b[0];b=b[1]}top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=getRemoteFile&csrf="+top.ICEcoder.csrf+"&lineNumber="+b,a.replace(/\+/g,"%2B"));
top.ICEcoder.serverMessage("<b>"+top.t.Getting+"</b><br>"+a)},getChangesToSave:function(){var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1];a=difflib.stringAsLines(a.getValue());b=difflib.stringAsLines(b);b=(new difflib.SequenceMatcher(b,a)).get_opcodes();for(var c=0;c<b.length;c++)for(j=b[c][3];j<b[c][4];j++)"equal"!=b[c][0]&&("undefined"==typeof b[c][5]&&(b[c][5]=""),b[c][5]+=a[j]+"\n");return JSON.stringify(b)},saveFile:function(a){var b;a||(b=top.ICEcoder.getChangesToSave());
a=a?"saveAs":"save";var c=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");if("|[NEW]"==c&&0<top.ICEcoder.selectedFiles.length){var d=top.ICEcoder.selectedFiles[0];c=-1==d.lastIndexOf(".")||d.lastIndexOf(".")<d.lastIndexOf("|")?d+c:"|[NEW]"}c=c.replace("||","|");top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&fileVersion="+ICEcoder.openFileVersions[ICEcoder.selectedTab-1]+"&saveType="+
a+"&csrf="+top.ICEcoder.csrf,c.replace(/\+/g,"%2B"),b);top.ICEcoder.serverMessage("<b>"+top.t.Saving+"</b><br>"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){if(a)var c=a.replace(/\|/g,"/");else c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));if(b){var d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,
"/"));-1<d&&(top.ICEcoder.openFiles[d]=b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,
""),top.get("tab"+(d+1)).title=b);top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/").replace(/\+/g,"%2B")+"&csrf="+top.ICEcoder.csrf,b.replace(/\+/g,"%2B"));top.ICEcoder.serverMessage("<b>"+top.t["Renaming to"]+"</b><br>"+b);top.ICEcoder.setPreviousFiles()}},moveFile:function(a,b){if(b&&b!=a){var c=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/"));if(-1<c){top.ICEcoder.openFiles[c]=b;closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>';
var d=top.ICEcoder.openFiles[c];top.get("tab"+(c+1)).innerHTML=closeTabLink+" "+d.slice(d.lastIndexOf("/")).replace(/\//,"");top.get("tab"+(c+1)).title=b}top.ICEcoder.ask("Are you sure you want to move file "+a+" to "+b+" ?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|").replace(/\+/g,"%2B")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Moving to"]+"</b><br>"+b));top.ICEcoder.setPreviousFiles()}},
deleteFiles:function(a){a=a?a:top.ICEcoder.selectedFiles;var b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0<a.length&&top.ICEcoder.ask("Delete:\n\n"+b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=delete&&csrf="+top.ICEcoder.csrf,a.join(";").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Deleting File"]+"</b><br>"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d<a.length;d++)top.ICEcoder.copiedFiles[d]=a[d];b||(top.get("fmMenuPasteOption").style.display=
"block");c||top.ICEcoder.hideFileMenu()},pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=0;b<top.ICEcoder.copiedFiles.length;b++)"|"!=top.ICEcoder.copiedFiles[b]?(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=paste&location="+a+"&csrf="+top.ICEcoder.csrf,top.ICEcoder.copiedFiles[b].replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);
else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){if(top.ICEcoder.copiedFiles)var b=top.ICEcoder.copiedFiles;top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),
top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a<c.length;a++)top.ICEcoder.showHide("hide",top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.length;d++)top.ICEcoder.showHide("hide",top.get(c[d])),top.get(c[d]+"Nav").style.color="";get("fileOptions").style.opacity=0;"show"==a&&("undefined"!=typeof fileNavInt&&
clearTimeout(fileNavInt),top.ICEcoder.showHide(a,top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=1)},isPathFolder:function(a){a=top.ICEcoder.filesFrame.contentDocument.getElementsByClassName("pft-directory");for(var b=top.ICEcoder.selectedFiles[0],c,d=0;d<a.length;d++)if(c=a[d],"underfined"!=typeof c&&(c=c.childNodes[0],"undefined"!=typeof c&&(c=c.childNodes[1],"undefined"!=typeof c&&b===c.getAttribute("id"))))return!0;return!1},checkExists:function(a){var b;a=a.replace(/\|/g,
"/");0===a.indexOf(top.iceRoot)&&(a=a.replace(top.iceRoot,""));var c=top.ICEcoder.xhrObj();c.onreadystatechange=function(){4==c.readyState&&(200==c.status?(b=JSON.parse(c.responseText),b.action.timeEnd=(new Date).getTime(),b.action.timeTaken=b.action.timeEnd-b.action.timeStart,0<=["raw","both"].indexOf(top.ICEcoder.fileDirResOutput)&&console.log(c.responseText),0<=["object","both"].indexOf(top.ICEcoder.fileDirResOutput)&&console.log(b),top.ICEcoder.lastFileDirCheckStatusObj=b,b.status.error?(top.ICEcoder.message(b.status.errorMsg),
console.log("ICEcoder error info for your request..."),console.log(b),top.ICEcoder.serverMessage(),top.ICEcoder.serverQueue("del",0)):eval(b.action.doNext)):(top.ICEcoder.message(top.t["Sorry there was..."]),console.log("ICEcoder error info for your request..."),console.log(b),top.ICEcoder.serverMessage(),top.ICEcoder.serverQueue("del",0)))};c.open("POST","lib/file-control-xhr.php?action=checkExists&csrf="+top.ICEcoder.csrf,!0);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");
var d=(new Date).getTime();c.send("timeStart="+d+"&file="+a.replace(/\+/g,"%2B"))},showMenu:function(a){0!=top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\//g,"|"))||top.ICEcoder.selectFileFolder(a);a=129;var b=window.innerHeight;if("undefined"!=typeof top.ICEcoder.thisFileFolderLink&&""!=top.ICEcoder.thisFileFolderLink){var c=this.isPathFolder(top.ICEcoder.selectedFiles[0])?"folder":"file";top.get("folderMenuItems").style.display=
"folder"==c&&1==top.ICEcoder.selectedFiles.length?"block":"none";"folder"==c&&1==top.ICEcoder.selectedFiles.length&&(a+=67,"block"==top.get("fmMenuPasteOption").style.display&&(a+=19));top.get("singleFileMenuItems").style.display=1<top.ICEcoder.selectedFiles.length?"none":"block";1==top.ICEcoder.selectedFiles.length&&(a+=43);top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"},4);top.get("fileMenu").style.left=top.ICEcoder.mouseX+20+"px";c=
top.ICEcoder.mouseY-top.ICEcoder.filesFrame.contentWindow.document.body.scrollTop-10;c+a>b&&(c-=c+a-b);top.get("fileMenu").style.top=c+"px"}return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f,g){if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,
"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){var m="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//","/");var h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));var l=h.parentNode.parentNode.nextSibling;var n=document.createTextNode("\n");var p=777==d?"background: #800; color: #eee":"color: #888";p='<a nohref title="'+b.replace(/\/$/,
"")+"/"+c+'" onMouseOver="parentNode.draggable=true;top.ICEcoder.overFileFolder(\''+g+"',this.childNodes[1].id)\" onMouseOut=\"parentNode.draggable=false;top.ICEcoder.overFileFolder('"+g+"','')\" "+("folder"==g?"ondragover=\"if(parentNode.nextSibling && parentNode.nextSibling.tagName != 'UL' && top.ICEcoder.thisFileFolderLink != this.childNodes[1].id) {top.ICEcoder.openCloseDir(this,true);}\"":"")+' onClick="if(!event.ctrlKey && !top.ICEcoder.cmdKey) {'+("folder"==g?"top.ICEcoder.openCloseDir(this,"+
("folder"==g?"true":"false")+");":"")+' if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="'+p+'; font-size: 8px" id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'_perms">'+d+"</span></a>";if(!l||3>l.childNodes.length){var k=document.createElement("ul");l=h.parentNode.parentNode;
l.parentNode.insertBefore(k,l.nextSibling);k=document.createElement("li");k.className=m;k.draggable=!1;k.ondragstart=function(a){top.ICEcoder.addDefaultDragData(this,a)};k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};k.ondragover=function(a){top.ICEcoder.setDragCursor(a,"folder"==g?"folder":"file")};k.ondragend=function(){top.ICEcoder.dropFile(this)};
k.innerHTML=p;l.nextSibling.appendChild(k);l.nextSibling.appendChild(n)}else for(h=0;h<l.childNodes.length;h++)if(l.childNodes[h].className){k=0<l.childNodes[h].className.indexOf("directory")?"folder":"file";var r=l.childNodes[h].getElementsByTagName("span")[0].innerHTML;if(k==g&&r>c||"folder"==g&&"file"==k||h==l.childNodes.length-1){k=document.createElement("li");k.className=m;k.draggable=!1;k.ondragstart=function(a){top.ICEcoder.addDefaultDragData(this,a)};k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);
top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};k.ondragover=function(a){top.ICEcoder.setDragCursor(a,"folder"==g?"folder":"file")};k.ondragend=function(){top.ICEcoder.dropFile(this)};k.innerHTML=p;h==l.childNodes.length-1?(l.appendChild(k),l.appendChild(n)):(l.insertBefore(k,l.childNodes[h]),l.insertBefore(n,l.childNodes[h+1]));break}}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-
1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms",top.ICEcoder.renameInChildren(h,e,b,c));"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,
e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.style.background=777==d?"#800":"none",h.style.color=777==d?"#eee":"#888",h.innerHTML=d);"delete"==a&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).parentNode.parentNode,
top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},renameInChildren:function(a,b,c,d){if(a.parentNode.parentNode.nextSibling&&"UL"==a.parentNode.parentNode.nextSibling.nodeName){a=a.parentNode.parentNode.nextSibling;for(var e=0;e<a.childNodes.length;e++)if("LI"==a.childNodes[e].nodeName){var f=a.childNodes[e].childNodes[0].childNodes[1];f.id=f.id.replace(b.replace(/\//g,"|"),c.replace(/\//g,"|")+"|"+d);f.parentNode.title=f.id.replace(/\|/g,"/");var g=top.get("filesFrame").contentWindow.document.getElementById(f.id).nextSibling.nextSibling;
g.id=f.id+"_perms";top.ICEcoder.renameInChildren(f,b,c,d)}}},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.contentWindow.location.reload(!0);top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;if(224==b||91==b||93==b)top.ICEcoder.cmdKey=
!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},addDefaultDragData:function(a,b){b.dataTransfer.setData("Text",a.id)},setDragCursor:function(a,b){a.preventDefault();top.ICEcoder.draggingWithKeyTest(a);a.dataTransfer.dropEffect="editor"==b?"CTRL"==top.ICEcoder.draggingWithKey?"copy":"link":"folder"==b?"CTRL"==top.ICEcoder.draggingWithKey?"copy":"move":"none"},dropFile:function(a){var b;var c=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=c.substr(c.lastIndexOf("/")+
1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(c);"files"==top.ICEcoder.area&&setTimeout(function(){b="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(b)):top.ICEcoder.moveFile(c,b.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1;top.ICEcoder.mouseDownInCM=!1},findReplaceOptions:function(){top.get("rText").style.display=
top.get("replace").style.display=top.get("rTarget").style.display=document.findAndReplace.connector.value==top.t.and?"inline-block":"none"},findReplace:function(a,b,c,d,e){if(d)top.get("find").value=top.get("find").value,top.ICEcoder.focus();else{"undefined"==typeof e&&(e=!1);a=a.toLowerCase();var f=top.get("replace").value;var g=top.get("results");d=ICEcoder.getcMInstance();var m=ICEcoder.getcMdiffInstance();if((d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?m:d)&&0<a.length&&document.findAndReplace.target.value==
top.t["this document"]){d.getValue().toLowerCase();document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==top.t.replace&&d.getSelection().toLowerCase()==a?d.replaceSelection(f,"around"):document.findAndReplace.replaceAction.value==top.t["replace all"]&&(c=new RegExp(a,"gi"),d.setValue(d.getValue().replace(c,f))));c=d.getValue().toLowerCase();if(!top.ICEcoder.findMode||a!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(f=0;f<c.length;f++)c.substr(f,
a.length)==a&&-1==ICEcoder.results.indexOf(f)&&(ICEcoder.results.push(f),-1==ICEcoder.resultsLines.indexOf(d.posFromIndex(f).line+1)&&ICEcoder.resultsLines.push(d.posFromIndex(f).line+1));ICEcoder.lastsearch=a}if(0<ICEcoder.results.length){if(b)g.innerHTML=ICEcoder.results.length+" results";else{if(e)for(ICEcoder.findResult="undefined"==typeof ICEcoder.findResult?ICEcoder.results.length+1:ICEcoder.results.length,f=ICEcoder.results.length-1;0<=f;f--)ICEcoder.results[f]>d.indexFromPos({ch:d.getCursor().ch-
1,line:d.getCursor().line})&&ICEcoder.findResult--;else for(f=ICEcoder.findResult=0;f<ICEcoder.results.length;f++)ICEcoder.results[f]<d.indexFromPos({ch:d.getCursor().ch+1,line:d.getCursor().line})&&ICEcoder.findResult++;!e&&ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);e&&1==ICEcoder.findResult&&(ICEcoder.findResult=ICEcoder.results.length+1);g.innerHTML="Highlighted result "+(ICEcoder.findResult+(e?-1:1))+" of "+ICEcoder.results.length+" results";e?(b=d.getSearchCursor(a,
{ch:d.getCursor().ch-1,line:d.getCursor().line},!0),b.findPrevious(),b.from()||(b=d.getSearchCursor(a,{line:1E6,ch:1E6},!0),b.findPrevious())):(b=d.getSearchCursor(a,{ch:d.getCursor().ch+1,line:d.getCursor().line},!0),b.findNext(),b.from()||(b=d.getSearchCursor(a,{line:0,ch:0},!0),b.findNext()));d.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/d.lineCount():d.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?
0:d.heightAtLine(0);e="";for(f=1;f<=d.lineCount();f++)g=-1<ICEcoder.resultsLines.indexOf(f)?d.getCursor().line+1==f?"#b00":"#888":"transparent",e+='<div style="position: absolute; display: block; width: 5px; height:'+a+"px; background: "+g+"; top: "+parseInt(a*(f-1)+b,10)+'px"></div>';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=e;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}g.innerHTML="No results";
top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=a&&c?(e=b=d="",document.findAndReplace.connector.value==top.t.and&&(d="&replace="+f),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(e="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),
a=a.replace(/'/g,"&#39;"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+a+d+b+e+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(g.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display=
"none")}},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|").replace(/\+/g,"%2B"));top.ICEcoder.serverMessage("<b>"+top.t["Replacing text in"]+"</b><br>"+a)},getCaretPosition:function(){var a;var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;c=b.getCursor().line;var d=b.getCursor().ch;for(var e=a=0;e<
c;e++)a+=b.getLine(e).length+1;ICEcoder.caretPos=a+d-1},updateCharDisplay:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateVersionsDisplay:function(){var a=top.ICEcoder.openFileVersions[ICEcoder.selectedTab-1];get("versionsDisplay").innerHTML="undefined"!=typeof a?
top.ICEcoder.openFileVersions[ICEcoder.selectedTab-1]+" backup"+(1!=a?"s":""):""},updateByteDisplay:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.byteDisplay.innerHTML=a.getValue().length.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" bytes"},showDisplay:function(a){top.ICEcoder.byteDisplay.style.display="byte"==a?"inline-block":"none";top.ICEcoder.charDisplay.style.display="char"==a?"inline-block":
"none"},showHide:function(a,b){b.style.visibility="show"==a?"visible":"hidden"},getcMInstance:function(a){return top.ICEcoder.content.contentWindow[isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-1]]},getcMdiffInstance:function(a){return top.ICEcoder.content.contentWindow[(isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-
1])+"diff"]},getMouseXY:function(a,b){top.ICEcoder.mouseX=a.pageX?a.pageX:a.clientX+document.body.scrollLeft;top.ICEcoder.mouseY=a.pageY?a.pageY:a.clientY+document.body.scrollTop;top.ICEcoder.area=b;"top"!=b&&(top.ICEcoder.mouseY+=70);"editor"==b&&(top.ICEcoder.mouseX+=top.ICEcoder.filesW);top.ICEcoder.dragCursorTest();62<top.ICEcoder.mouseY&&top.ICEcoder.setTabWidths()},dragCursorTest:function(){var a;var b=top.ICEcoder.mouseX-top.ICEcoder.diffStartX;!1!==top.ICEcoder.draggingTab&&top.ICEcoder.diffStartX&&
(-10>=b||10<=b)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),b=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX<top.ICEcoder.filesW+7||top.ICEcoder.draggingFilesW)?"w-resize":"auto",top.ICEcoder.content.contentWindow.document&&
top.ICEcoder.filesFrame.contentWindow)){top.document.body.style.cursor=b;if(a=top.ICEcoder.content.contentWindow.document.body)a.style.cursor=b;if(a=top.ICEcoder.filesFrame.contentWindow.document.body)a.style.cursor=b}},serverMessage:function(a){var b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a).replace(/&lt;b&gt;/g,"<b>").replace(/&lt;\/b&gt;/g,"</b>").replace(/&lt;br&gt;/g,"<br>"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,
b;var c=ICEcoder.getcMInstance();var d=ICEcoder.getcMdiffInstance();if(c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c){d=c.getLine(c.getCursor().line);for(a=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(b=a.exec(d))&&c.getCursor().ch>b.index+b[0].length;);(d=top.get("content").contentWindow.document.getElementById("cssColor"))&&d.parentNode.removeChild(d);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(d=top.document.createElement("div"),d.id=
"cssColor",d.style.position="absolute",d.style.display="block",d.style.width=d.style.height="20px",d.style.zIndex="1000",d.style.background=b?b[0]:"",d.style.cursor="pointer",d.onclick=function(){top.ICEcoder.showColorPicker(b[0])},""==d.style.backgroundColor&&(d.style.display="none"),top.get("header").appendChild(d),c.addWidget(c.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<div id="picker" class="picker"></div><br><br><input type="text" id="color" name="color" value="#000" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'color\').value)" value="insert &gt;" class="insertColorValue"><br><input type="text" id="colorRGB" name="colorRGB" value="rgb(0,0,0)" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'colorRGB\').value)" value="insert &gt;" class="insertColorValue">';
3||(top.ICEcoder.indexing=!0,fetch("lib/indexer.php"+(top.ICEcoder.indexData?"?timestamp="+top.ICEcoder.indexData.timestamps.indexed+"&csrf="+top.ICEcoder.csrf:"")).then(function(a){return a.json()}).then(function(a){a.timestamps.changed&&(top.ICEcoder.indexData=a);top.ICEcoder.indexing=!1}))},1E3);top.ICEcoder.ready=!0},setLayout:function(a){var b=window.innerWidth;var c=window.innerHeight;this.header.style.width=this.tabsBar.style.width=this.findBar.style.width=b+"px";this.files.style.width=this.editor.style.left=
this.filesW+"px";this.optionsFile.style.width=this.optionsEdit.style.width=this.optionsSource.style.width=this.optionsHelp.style.width=this.filesW-60+"px";this.filesFrame.style.height=c-25-35-30+"px";this.nestValid.style.left=this.filesW+10+"px";this.versionsDisplay.style.left=this.filesW+25+"px";this.splitPaneControls.style.left=parseInt((b-this.filesW)/2,10)-25-4+this.filesW-100+"px";this.splitPaneNamesMain.style.left=parseInt(.25*(b-this.filesW),10)-50+this.filesW-60+"px";this.splitPaneNamesDiff.style.left=
parseInt(.75*(b-this.filesW),10)-50+this.filesW-135+"px";top.ICEcoder.setTabWidths();a||(this.editor.style.width=ICEcoder.content.style.width=b-this.filesW-200+"px",ICEcoder.terminal.style.width=b-this.filesW+"px",ICEcoder.output.style.width=b-this.filesW+"px",ICEcoder.database.style.width=b-this.filesW+"px",ICEcoder.git.style.width=b-this.filesW+"px",ICEcoder.content.style.height=c-25-21-28-26+"px",ICEcoder.terminal.style.height=c+"px",ICEcoder.output.style.height=c+"px",ICEcoder.database.style.height=
c+"px",ICEcoder.git.style.height=c+"px",ICEcoder.terminal.style.top=c+"px",ICEcoder.output.style.top=c+"px",ICEcoder.database.style.top=c+"px",ICEcoder.git.style.top=c+"px",!1!==top.ICEcoder.showingTool&&(get(top.ICEcoder.showingTool).style.top=0),setTimeout(function(){for(var a=0;a<top.ICEcoder.openFiles.length;a++)top.ICEcoder.splitPane||top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize(top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height),top.ICEcoder.content.contentWindow["cM"+
ICEcoder.cMInstances[a]+"diff"].setSize(100-top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height),top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]+"diff"].getWrapperElement().style.left=top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.splitPane&&top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize(top.ICEcoder.splitPaneLeftPerc+"%",top.ICEcoder.content.style.height);this.docExplorer.style.height=top.ICEcoder.content.style.height;top.ICEcoder.splitPane?
top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?parseInt(parseInt(ICEcoder.content.style.width,10)/2,10)+17+"px":parseInt(parseInt(ICEcoder.content.style.width,10)/2,10)+"px":top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=top.ICEcoder.scrollBarVisible?"17px":"0"},4))},setSplitPane:function(a){top.ICEcoder.splitPane="on"==a?!0:!1;top.get("splitPaneControlsOff").style.opacity=top.ICEcoder.splitPane?
.2:.5;top.get("splitPaneControlsOn").style.opacity=top.ICEcoder.splitPane?.5:.2;top.get("splitPaneNamesMain").style.opacity=top.get("splitPaneNamesDiff").style.opacity=top.ICEcoder.splitPane?1:0;top.ICEcoder.setLayout();if(top.ICEcoder.splitPane){top.ICEcoder.updateDiffs();var b=top.ICEcoder.getcMInstance();top.ICEcoder.cMonScroll(b,"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1])}else if(b=top.ICEcoder.getcMInstance(),a=top.ICEcoder.getcMdiffInstance(),b){cMmarks=b.getAllMarks();for(b=0;b<cMmarks.length;b++)cMmarks[b].clear();
cMdiffMarks=a.getAllMarks();for(b=0;b<cMdiffMarks.length;b++)cMdiffMarks[b].clear()}"undefined"!=typeof top.ICEcoder.animSplitPaneInt&&clearInterval(top.ICEcoder.animSplitPaneInt);top.ICEcoder.animSplitPaneInt=setInterval(function(){top.ICEcoder.splitPane&&50.1<top.ICEcoder.splitPaneLeftPerc?top.ICEcoder.splitPaneLeftPerc=(top.ICEcoder.splitPaneLeftPerc-50)/1.8+50:!top.ICEcoder.splitPane&&99.9>top.ICEcoder.splitPaneLeftPerc?top.ICEcoder.splitPaneLeftPerc=50-(100-top.ICEcoder.splitPaneLeftPerc)/1.8+
50:(top.ICEcoder.splitPaneLeftPerc=top.ICEcoder.splitPane?50:100,clearInterval(top.ICEcoder.animSplitPaneInt));top.ICEcoder.setLayout()},4)},toolShowHideToggle:function(a){var b=window.innerHeight;-1<["terminal","output","database","git"].indexOf(a)&&(get("terminal").style.top=b+"px",get("output").style.top=b+"px",get("database").style.top=b+"px",get("git").style.top=b+"px",get(a).style.top=top.ICEcoder.showingTool===a?b+"px":0,"terminal"===a&&setTimeout(function(){top.ICEcoder.terminal.contentWindow.document.getElementById("command").focus()},
0),top.ICEcoder.showingTool=top.ICEcoder.showingTool!==a?a:!1)},docExplorerShow:function(a){var b;get("miniMap").style.display="miniMap"==a?"block":"none";get("functionClassList").style.display="functionClassList"==a?"block":"none";"miniMap"==a&&(top.miniMapInt=setInterval(function(){0!=get("miniMapContent").getBoundingClientRect().height&&(b=top.ICEcoder.getcMInstance(),top.ICEcoder.setMinimapLayout(b),clearInterval(top.miniMapInt))},10))},changeFilesW:function(a){ICEcoder.lockedNav&&ICEcoder.filesW!=
ICEcoder.minFilesW||("undefined"!=typeof ICEcoder.changeFilesInt&&clearInterval(ICEcoder.changeFilesInt),ICEcoder.changeFilesInt=setInterval(function(){ICEcoder.changeFilesWStep(a)},10))},changeFilesWStep:function(a){"expand"==a?ICEcoder.filesW<ICEcoder.maxFilesW-1?ICEcoder.filesW+=Math.ceil((ICEcoder.maxFilesW-ICEcoder.filesW)/2):ICEcoder.filesW=ICEcoder.maxFilesW:ICEcoder.filesW>ICEcoder.minFilesW+1?ICEcoder.filesW-=Math.ceil((ICEcoder.filesW-ICEcoder.minFilesW)/2):ICEcoder.filesW=ICEcoder.minFilesW;
("expand"==a&&ICEcoder.filesW==ICEcoder.maxFilesW||"contract"==a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt);ICEcoder.setLayout()},canResizeFilesW:function(){top.ICEcoder.ready&&"w-resize"==top.document.body.style.cursor?top.ICEcoder.mouseDown&&"gutter"==top.ICEcoder.mouseDownInCM&&(top.ICEcoder.filesW=top.ICEcoder.maxFilesW=250<=top.ICEcoder.mouseX&&400>=top.ICEcoder.mouseX?top.ICEcoder.mouseX:250>top.ICEcoder.mouseX?250:400,top.ICEcoder.files.style.width=top.ICEcoder.filesFrame.style.width=
top.ICEcoder.filesW+"px",top.ICEcoder.setLayout(),top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;a.style.backgroundPosition=ICEcoder.lockedNav?"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},
cMonFocus:function(a,b){top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.editorFocusInstance=b;top.ICEcoder.getCaretPosition()},cMonBlur:function(a,b){},cMonKeyUp:function(a,b){"undefined"!=typeof top.doFind&&clearInterval(top.doFind);top.doFind=setTimeout(function(){top.ICEcoder.findReplace(top.get("find").value,!0,!1)},500);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()},cMonCursorActivity:function(a,
b){top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();a.removeLineClass(top.ICEcoder["cMActiveLine"+b],"background");a.getCursor("start").line==a.getCursor().line&&(top.ICEcoder["cMActiveLine"+b]=a.addLineClass(a.getCursor().line,"background","cm-s-activeLine"));"CSS"==top.ICEcoder.caretLocType&&top.ICEcoder.cssColorPreview();var c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.prevLineDiff:top.ICEcoder.prevLine;c!=a.getCursor().line&&
a.getLine(c)&&0<a.getLine(c).length&&0==a.getLine(c).replace(/\s/g,"").length&&a.replaceRange("",{line:c,ch:0},{line:c,ch:1E6});setTimeout(function(){for(var d,c=0;c<top.ICEcoder.renderLineStyle.length;c++){d=!1;if("diff"!=top.ICEcoder.renderLineStyle[c][0]&&-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[c][0]&&-1<b.indexOf("diff"))d=!0;d&&a.getCursor().line+1==top.ICEcoder.renderLineStyle[c][1]?a.setOption("cursorHeight",a.defaultTextHeight()/a.lineInfo(a.getCursor().line).handle.height):
a.setOption("cursorHeight",1)}},0)},cMonBeforeChange:function(a,b,c,d){b=a.listSelections();for(var e=0;e<b.length;e++){var f=d.findMatchingTag(a,b[e].anchor);if(0!==c.text[0].indexOf(">")&&"undefined"!=typeof f&&"undo"!=c.origin&&"redo"!=c.origin&&"undefined"!=typeof f.open&&"undefined"!=typeof f.close){var g="open"==f.at?"close":"open";null!==f[g]&&(f=f[g].tag+";"+f[g].from.line+":"+f[g].from.ch,-1==top.ICEcoder.oppTagReplaceData.indexOf(f)&&top.ICEcoder.oppTagReplaceData.push(f))}}},cMonChange:function(a,
b,c,d){var e;b=a.listSelections();top.ICEcoder.loadingFile?setTimeout(function(){a.replaceRange("X",{line:1,ch:1},{line:1,ch:1});a.undo();a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration();top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=a.getValue()},0):top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);setTimeout(function(){top.ICEcoder.scrollBarVisible=a.getScrollInfo().height>a.getScrollInfo().clientHeight;top.ICEcoder.setLayout()},0);if("undefined"!=
typeof top.ICEcoder.oppTagReplaceData[0])for(var f=0;f<top.ICEcoder.oppTagReplaceData.length;f++){var g=top.ICEcoder.oppTagReplaceData[f].split(";");var m=g[0];var h=1*g[1].split(":")[0];var l=1*g[1].split(":")[1];b[f]&&(e=d.findMatchingTag(a,b[f].anchor));if("undefined"!=typeof e&&(m="open"==e.at?e.open.tag:e.close.tag,"undefined"!=typeof c.from)){var n=h==c.from.line?c.text[0].length-c.removed[0].length:0;var p="close"==e.at&&h==c.from.line?c.removed[0].length-c.text[0].length+1:1;var k={line:h,
ch:l+n+("open"==e.at?2:p)};n={line:h,ch:l+n+("open"==e.at?2:p)+g[0].length}}""!=m.trim()&&"undefined"!=typeof k&&"undefined"!=typeof n&&a.getRange(k,n)==g[0]&&(a.replaceRange(m,k,n),"close"==e.at&&(top.ICEcoder.autocompleteSkip=!0))}top.ICEcoder.oppTagReplaceData=[];top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay();top.ICEcoder.updateNestingIndicator();top.ICEcoder.findMode&&(top.ICEcoder.results.splice(top.ICEcoder.findResult,1),top.get("results").innerHTML=
top.ICEcoder.results.length+" "+top.t.results,top.ICEcoder.findMode=!1);top.ICEcoder.updateFunctionClassList();"undefined"!=typeof top.doMiniNav&&clearTimeout(top.doMiniNav);top.ICEcoder.loadingFile?top.ICEcoder.setMinimap():top.doMiniNav=setTimeout(function(){top.ICEcoder.setMinimap()},1E3);if(c=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]){var r=c.substr(c.lastIndexOf("/")+1);var t=r.substr(r.lastIndexOf(".")+1)}top.ICEcoder.splitPane&&setTimeout(function(){top.ICEcoder.updateDiffs()},0);
c&&top.ICEcoder.previewWindow.location&&"/[NEW]"!=c&&top.ICEcoder.updatePreviewWindow(a,c,r,t);top.ICEcoder.indicateChanges()},cMonUpdate:function(a,b){setTimeout(function(){get("docExplorer").style.background=window.getComputedStyle(a.getWrapperElement(),null).getPropertyValue("background")},0);top.ICEcoder.setMinimapLayout(a,b)},cMonScroll:function(a,b){top.ICEcoder.mouseDown=!1;top.ICEcoder.mouseDownInCM=!1;if(top.ICEcoder.splitPane){var c=top.ICEcoder.getcMInstance();var d=top.ICEcoder.getcMdiffInstance();
var e=-1<b.indexOf("diff")?c:d;c&&setTimeout(function(){e.scrollTo(a.getScrollInfo().left,a.getScrollInfo().top)},0)}top.ICEcoder.setMinimapLayout(a,b)},cMonInputRead:function(a,b){"keypress"==top.ICEcoder.autoComplete&&top.ICEcoder.codeAssist&&!a.state.completionActive&&(top.ICEcoder.autocompleteSkip?top.ICEcoder.autocompleteSkip=!1:top.ICEcoder.autocomplete())},cMonGutterClick:function(a,b,c,d,e){top.ICEcoder.mouseDownInCM="gutter"},cMonMouseDown:function(a,b,c){top.ICEcoder.mouseDownInCM="editor"},
cMonContextMenu:function(a,b,c){b=a.coordsChar({left:c.pageX,top:c.pageY});a.setCursor(b);c.ctrlKey&&setTimeout(function(){var b=a,c=b.getRange(b.findWordAt(b.getCursor()).anchor,b.findWordAt(b.getCursor()).head);result=null;numResults=0;var f=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];f=f.substr(f.lastIndexOf(".")+1);for(i in top.ICEcoder.indexData.functions[f])i===c&&(result=top.ICEcoder.indexData.functions[f][i],numResults++);for(i in top.ICEcoder.indexData.classes[f])i===c&&(result=top.ICEcoder.indexData.classes[f][i],
numResults++);1===numResults&&-1===[null,"def"].indexOf(b.getTokenTypeAt(b.getCursor()))&&(top.ICEcoder.openFile(result.filePath.replace(top.docRoot,"")),top.ICEcoder.goFindAfterOpenInt=setInterval(function(){top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]!=result.filePath.replace(top.docRoot,"")||top.ICEcoder.loadingFile||(b=top.ICEcoder.getcMInstance(),setTimeout(function(){top.ICEcoder.goToLine(result.range.from.line+1);b.setSelection({line:result.range.from.line,ch:result.range.from.ch},{line:result.range.to.line,
ch:result.range.to.ch})},20),clearInterval(top.ICEcoder.goFindAfterOpenInt))},20));top.ICEcoder.mouseDownInCM="editor"},0)},cMonDragOver:function(a,b,c){top.ICEcoder.setDragCursor(b,"editor")},cMonRenderLine:function(a,b,c,d){for(var e,f=0;f<top.ICEcoder.renderLineStyle.length;f++){e=!1;if("diff"!=top.ICEcoder.renderLineStyle[f][0]&&-1==b.indexOf("diff")||"diff"==top.ICEcoder.renderLineStyle[f][0]&&-1<b.indexOf("diff"))e=!0;e&&a.lineInfo(c).line+1==top.ICEcoder.renderLineStyle[f][1]&&(d.style[top.ICEcoder.renderLineStyle[f][2]]=
top.ICEcoder.renderLineStyle[f][3])}},functionClassParamsTooltip:function(a,b){if(top.ICEcoder.indexData){if(0===top.ICEcoder.openFiles.length)return get("tooltip").style.display="none",!0;var c,d=top.ICEcoder.getcMInstance(),e=d.coordsChar({left:top.ICEcoder.mouseX-top.ICEcoder.maxFilesW,top:top.ICEcoder.mouseY-72}),f=d.getRange(d.findWordAt(e).anchor,d.findWordAt(e).head);if(""===f)return get("tooltip").style.display="none",!0;var g=null,m=0,h=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
h=h.substr(h.lastIndexOf(".")+1);for(c in top.ICEcoder.indexData.functions[h])c===f&&(g=top.ICEcoder.indexData.functions[h][c],m++);for(c in top.ICEcoder.indexData.classes[h])c===f&&(g=top.ICEcoder.indexData.classes[h][c],m++);1===m&&-1===[null,"def"].indexOf(d.getTokenTypeAt(e))?(get("tooltip").style.display="block",get("tooltip").style.left=top.ICEcoder.mouseX-top.ICEcoder.maxFilesW+10+"px",get("tooltip").style.top=top.ICEcoder.mouseY-30+"px",get("tooltip").style.zIndex="1",get("tooltip").innerHTML=
g.params):get("tooltip").style.display="none"}},updateDiffs:function(){top.ICEcoder.renderLineStyle=[];top.ICEcoder.renderPaneShiftAmount=0;var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.getcMdiffInstance();var c=a?difflib.stringAsLines(a.getValue()):"";var d=b?difflib.stringAsLines(b.getValue()):"";c=(new difflib.SequenceMatcher(c,d)).get_opcodes();if(a){var e=a.getAllMarks();for(d=0;d<e.length;d++)e[d].clear();e=b.getAllMarks();for(d=0;d<e.length;d++)e[d].clear()}if(a&&""!=b.getValue())for(d=
0;d<c.length;d++)if("equal"!==c[d][0]){if("replace"==c[d][0]){var f=(c[d][4]-c[d][2]+1+top.ICEcoder.renderPaneShiftAmount)*a.defaultTextHeight();for(e=c[d][4]-1;e<=c[d][2]-1;e++)b.getLineHandle(e).height>a.defaultTextHeight()&&(f+=b.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["main",c[d][2],"height",f+"px"]);for(e=0;e<c[d][2]-c[d][1];e++)f=top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+e),b.getLine(c[d][3]+e)),a.markText({line:c[d][1]+
e,ch:0},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:f[0]},{className:"diffGreyLighter"}),a.markText({line:c[d][1]+e,ch:f[0]},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:f[0]+f[1]},{className:"diffGrey"}),a.markText({line:c[d][1]+e,ch:f[0]+f[1]},{line:c[d][3]+e+top.ICEcoder.renderPaneShiftAmount,ch:1E6},{className:"diffGreyLighter"})}else a.markText({line:c[d][1],ch:0},{line:c[d][2]-1,ch:1E6},{className:"diffGreen"});"replace"!=c[d][0]&&c[d][1]==c[d][2]&&(top.ICEcoder.renderLineStyle.push(["main",
c[d][2],"height",(c[d][4]-c[d][3]+1)*a.defaultTextHeight()+"px"]),a.markText({line:c[d][2]-1,ch:0},{line:c[d][2]-1,ch:1E6},{className:"diffNone"}));if("replace"==c[d][0]){f=(c[d][2]-c[d][4]+1-top.ICEcoder.renderPaneShiftAmount)*a.defaultTextHeight();for(e=c[d][4]-1;e<=c[d][2]-1;e++)a.getLineHandle(e).height>a.defaultTextHeight()&&(f+=a.getLineHandle(e).height-a.defaultTextHeight());f>a.defaultTextHeight()&&top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",f+"px"]);for(e=0;e<c[d][4]-c[d][3];e++)f=
top.ICEcoder.findStringDiffs(a.getLine(c[d][1]+e),b.getLine(c[d][3]+e)),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,ch:0},{line:c[d][3]+e,ch:f[0]},{className:"diffGreyLighter"}),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,ch:f[0]},{line:c[d][3]+e,ch:f[0]+f[2]},{className:"diffGrey"}),b.markText({line:c[d][1]+e-top.ICEcoder.renderPaneShiftAmount,ch:f[0]+f[2]},{line:c[d][3]+e,ch:1E6},{className:"diffGreyLighter"})}else b.markText({line:c[d][3],ch:0},{line:c[d][4]-
1,ch:1E6},{className:"diffRed"});"replace"!=c[d][0]&&c[d][3]==c[d][4]&&(top.ICEcoder.renderLineStyle.push(["diff",c[d][4],"height",(c[d][2]-c[d][1]+1)*a.defaultTextHeight()+"px"]),b.markText({line:c[d][4]-1,ch:0},{line:c[d][4]-1,ch:1E6},{className:"diffNone"}));top.ICEcoder.renderPaneShiftAmount=c[d][2]-c[d][4]}},findStringDiffs:function(a,b){"undefined"==typeof a&&(a="");"undefined"==typeof b&&(b="");for(var c=0,d=a.length,e=b.length;a[c]&&a[c]==b[c];c++);for(;d>c&e>c&a[d-1]==b[e-1];d--)e--;return[c,
d-c,e-c]},updatePreviewWindow:function(a,b,c,d){top.ICEcoder.previewWindow.location.pathname==b?-1<["htm","html","txt"].indexOf(d)?top.ICEcoder.previewWindow.document.documentElement.innerHTML=a.getValue():-1<["md"].indexOf(d)&&(top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())):-1<["css"].indexOf(d)&&-1<top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(c)&&(a=a.getValue(),c=document.createElement("style"),c.type="text/css",c.id="ICEcoder"+b.replace(/\//g,
"_"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),top.ICEcoder.previewWindow.document.getElementById(c.id)&&top.ICEcoder.previewWindow.document.documentElement.removeChild(top.ICEcoder.previewWindow.document.getElementById(c.id)),top.ICEcoder.previewWindow.document.documentElement.appendChild(c));try{top.ICEcoder.doPesticide()}catch(e){}try{top.ICEcoder.doStatsJS("update")}catch(e){}try{top.ICEcoder.doResponsive()}catch(e){}},contentCleanUp:function(){var a=ICEcoder.getcMInstance();
var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getValue();b=b.replace(/<ICEcoder:\/:textarea>/g,"</textarea>");a.setValue(b);a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration();top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1]=a.getValue()},undo:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).undo()},redo:function(){var a=
ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a).redo()},indent:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;"more"==a?top.ICEcoder.content.contentWindow.CodeMirror.commands.indentMore(b):top.ICEcoder.content.contentWindow.CodeMirror.commands.indentLess(b)},moveLines:function(a){var b;var c=top.ICEcoder.getcMInstance();var d=top.ICEcoder.getcMdiffInstance();
var e=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c;var f=e.getCursor("start");var g=e.getCursor("end");"up"==a&&0<f.line&&(b=f.line-1);"down"==a&&g.line<e.lineCount()-1&&(b=g.line+1);if(!isNaN(b)){var m=e.getLine(b);e.operation(function(){if("up"==a)for(var b=f.line;b<=g.line;b++)e.replaceRange(e.getLine(b),{line:b-1,ch:0},{line:b-1,ch:1E6});else for(b=g.line;b>=f.line;b--)e.replaceRange(e.getLine(b),{line:b+1,ch:0},{line:b+1,ch:1E6});e.replaceRange(m,{line:"up"==a?g.line:f.line,ch:0},
{line:"up"==a?g.line:f.line,ch:1E6});e.setSelection({line:f.line+("up"==a?-1:1),ch:f.ch},{line:g.line+("up"==a?-1:1),ch:g.ch})})}},highlightLine:function(a){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(a){if(!/iPhone|iPad|iPod/i.test(navigator.userAgent)){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();
(a=a?c:b)&&a.focus()}},goToLine:function(a,b,c){a=a?a-1:top.get("goToLineNo").value-1;b=b?b:0;var d=ICEcoder.getcMInstance();var e=ICEcoder.getcMdiffInstance();var f=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?e:d;top.ICEcoder.scrollingOnLine=f.getCursor().line;"undefined"!=typeof top.ICEcoder.scrollInt&&clearInterval(top.ICEcoder.scrollInt);top.ICEcoder.scrollInt=setInterval(function(){top.ICEcoder.scrollingOnLine+=(a-top.ICEcoder.scrollingOnLine)/5;f.scrollTo(0,f.defaultTextHeight()*top.ICEcoder.scrollingOnLine-
f.getScrollInfo().clientHeight/10);top.ICEcoder.setMinimapLayout(f);Math.round(top.ICEcoder.scrollingOnLine)==a&&clearInterval(top.ICEcoder.scrollInt)},10);f.setCursor(a,b);c||(top.ICEcoder.focus(),setTimeout(function(){top.ICEcoder.focus()},0));return!1},lineCommentToggle:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().ch;var c=a.getCursor().line;var d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,
b,c,d,d.length)},tagWrapper:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;b=a;if("div"==a){var e=d.getCursor("start").line;var f=d.getCursor().line;d.operation(function(){d.replaceSelection("<div>\n"+d.getSelection()+"\n</div>","around");for(var a=e+1;a<=f+1;a++)d.indentLine(a);d.indentLine(f+2,"prev");d.indentLine(f+2,"subtract")})}else-1<["p","a","h1","h2","h3"].indexOf(a)&&d.getSelection().substr(0,a.length+
1)=="<"+b&&d.getSelection().substr(-(a.length+3))=="</"+a+">"?d.replaceSelection(d.getSelection().substr(d.getSelection().indexOf(">")+1,d.getSelection().length-d.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(b='a href=""'),d.replaceSelection("<"+b+">"+d.getSelection()+"</"+a+">","around"),"a"==a&&d.setCursor({line:d.getCursor("start").line,ch:d.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
c:b;a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange("\n"+d.getLine(a),{line:a,ch:0},{line:a,ch:1E6});d.setCursor({line:d.getCursor().line-1,ch:0});d.execCommand("indentAuto")})},insertLineAfter:function(a){var b=ICEcoder.getcMInstance();
var c=ICEcoder.getcMdiffInstance();var d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;a||(a=d.getCursor().line);d.operation(function(){d.replaceRange(d.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});d.execCommand("indentAuto")})},duplicateLines:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;if(!a&&b.somethingSelected()){c=b.getCursor("start");var d=b.getCursor("end");a=c.line!=d.line&&d.ch==b.getLine(d.line).length?
"\n":"";b.replaceSelection(b.getSelection()+a+b.getSelection(),"end");b.setSelection(c,d)}else a||(a=b.getCursor().line),c=b.getCursor().ch,b.replaceRange(b.getLine(a)+"\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6}),b.setCursor(a+1,c)},removeLines:function(a){var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;!a&&b.somethingSelected()?b.replaceSelection("","end"):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.execCommand("deleteLine"),
b.setCursor(a-1,c))},jumpToDefinition:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getTokenAt(a.getCursor()).string;if(a.somethingSelected()&&top.ICEcoder.origCurorPos)a.setCursor(top.ICEcoder.origCurorPos);else for(top.ICEcoder.origCurorPos=a.getCursor(),a=["var "+b,"function "+b,b+"=function",b+"= function",b+" =function",b+" = function",b+"=new function",b+"= new function",b+" =new function",b+" = new function",
"window['"+b+"']",'window["'+b+'"]',"this['"+b+"']",'this["'+b+'"]',b+":",b+" :","def "+b,"class "+b],b=0;b<a.length&&!top.ICEcoder.findReplace(a[b],!1,!1);b++);},updateFunctionClassList:function(){var a;var b=ICEcoder.getcMInstance();top.ICEcoder.functionClassList=[];b&&(b.doc.eachLine(function(a){top.ICEcoder.updateFunctionClassListItems(a)}),setTimeout(function(){a="";for(var b=0;b<top.ICEcoder.functionClassList.length;b++)top.ICEcoder.functionClassList[b].verified&&(a+='<div onclick="top.ICEcoder.goToLine('+
(top.ICEcoder.functionClassList[b].line+1)+')" class="functionClassListItem"><span class="name">'+top.ICEcoder.functionClassList[b].name+'</span><br><span class="params">'+top.ICEcoder.functionClassList[b].params+"</span></div>");get("functionClassList").innerHTML=a},0))},updateFunctionClassListItems:function(a){var b=ICEcoder.getcMInstance();var c="";-1<a.text.indexOf("function ")&&-1<a.text.replace(/\$function/g,"").indexOf("function ")&&(c=a.text.substring(a.text.indexOf("function ")+9));-1<a.text.indexOf("class ")&&
-1<a.text.replace(/\$class/g,"").indexOf("class ")&&(c=a.text.substring(a.text.indexOf("class ")+6));c=c.trim().split("{")[0].split("(");""!=c[0]&&(top.ICEcoder.functionClassList.push({line:b.getLineNumber(a),name:c[0],params:"("+(c[1]?c[1].replace(/[,]/g,", "):""),verified:!1}),setTimeout(function(){if(!a.styles||a.styles&&-1<a.styles.indexOf("def")&&b.getLineNumber(a))for(var d=0;d<top.ICEcoder.functionClassList.length;d++)top.ICEcoder.functionClassList[d].line==b.getLineNumber(a)&&(top.ICEcoder.functionClassList[d].verified=
!0)},0))},setMinimap:function(){var a;if(a=ICEcoder.getcMInstance()){top.ICEcoder.content.contentWindow.CodeMirror.runMode(a.getValue(),a.getOption("mode"),get("miniMapContent"));get("miniMapContent").innerHTML='<div class="cm-s-'+top.ICEcoder.theme+'" style="font-family: monospace; white-space: '+(1==top.ICEcoder.lineWrapping?"pre-wrap":"pre")+'; font-size: 2px; line-height: 2px">'+get("miniMapContent").innerHTML+"</div>";get("miniMapContent").innerHTML=get("miniMapContent").innerHTML.replace(/<span /g,
'<span style="font-size: 2px; font-family: monospace" ');get("miniMapContainer").innerHTML='<div style="position: absolute; display: inline-block; top: '+top.ICEcoder.miniMapBoxTop+"px; left: 0; width: 200px; height: "+top.ICEcoder.miniMapBoxHeight+'px; background: rgba(0,198,255,0.1); z-index: 1; cursor: pointer" id="miniMapBox"></div>';var b=get("miniMapBox");b=new Draggabilly(b,{axis:"y",containment:!0});b.on("dragMove",function(b,d,e){yPos=this.position.y;maxHeight=parseInt(get("docExplorer").style.height,
10)<=parseInt(get("miniMapContent").getBoundingClientRect().height,10)?parseInt(get("docExplorer").style.height,10):parseInt(get("miniMapContent").getBoundingClientRect().height,10);newPerc=this.position.y/(maxHeight-top.ICEcoder.miniMapBoxHeight);yPos=(a.getScrollInfo().height-a.getScrollInfo().clientHeight)*newPerc;a.scrollTo(0,yPos)});b.on("pointerDown",function(a,b){top.ICEcoder.mouseDownMinimap=!0});b.on("pointerUp",function(a,b){top.ICEcoder.mouseDownMinimap=!1});top.ICEcoder.setMinimapLayout(a);
get("docExplorer").style.right="-220px"}},setMinimapLayout:function(a,b){if(get("miniMapBox")&&a){var c=top.ICEcoder.getcMInstance();var d=a.getScrollInfo().top/(a.getScrollInfo().height-a.getScrollInfo().clientHeight);parseInt(get("miniMapContent").getBoundingClientRect().height,10)>parseInt(get("docExplorer").style.height,10)?(get("miniMapContainer").style.height=parseInt(get("docExplorer").style.height,10)+"px",top.ICEcoder.miniMapBoxHeight=parseInt(get("docExplorer").style.height,10)/c.defaultTextHeight()*
2,get("miniMapBox").style.height=top.ICEcoder.miniMapBoxHeight+"px",top.ICEcoder.miniMapBoxTop=d*parseInt(get("docExplorer").style.height,10)-d*top.ICEcoder.miniMapBoxHeight,get("miniMapContent").style.marginTop=-(parseInt(get("miniMapContent").getBoundingClientRect().height,10)-parseInt(get("docExplorer").style.height,10))*d+"px"):(get("miniMapContainer").style.height=parseInt(get("miniMapContent").getBoundingClientRect().height,10)+"px",top.ICEcoder.miniMapBoxHeight=parseInt(get("docExplorer").style.height,
10)/c.defaultTextHeight()*2,get("miniMapBox").style.height=top.ICEcoder.miniMapBoxHeight+"px",top.ICEcoder.miniMapBoxTop=d*parseInt(get("miniMapContainer").getBoundingClientRect().height,10)-d*top.ICEcoder.miniMapBoxHeight,get("miniMapContent").style.marginTop=0);top.ICEcoder.mouseDownMinimap||(get("miniMapBox").style.top=top.ICEcoder.miniMapBoxTop+"px")}},autocomplete:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
b:a;top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},pasteURL:function(a){var b=top.ICEcoder.getcMInstance();var c=top.ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+a);b.replaceSelection(a,"around")},searchForSelected:function(){var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
b:a;top.ICEcoder.caretLocType&&(""!=a.getSelection()?(b=top.ICEcoder.caretLocType.toLowerCase()+" ","Content"==top.ICEcoder.caretLocType&&(b=""),window.open("http://www.google.com/#output=search&q="+b+a.getSelection())):top.ICEcoder.message(top.t["No text selected..."]))},fmAction:function(a,b){var c=top.get("filesFrame").contentWindow.document.getElementById(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1]+"_perms").parentNode;var d=c.parentNode;var e=-1<c.onmouseover.toString().indexOf("'folder'")?
"folder":"file";var f=!1;"up"==b&&(d.previousSibling&&d.previousSibling.previousSibling?(f=d.previousSibling.previousSibling,"UL"==f.tagName&&(f=f.childNodes[f.childNodes.length-1])):d.parentNode.previousSibling&&(f=d.parentNode.previousSibling),f&&(f=f.childNodes[0]));"down"==b&&(d.nextSibling&&d.nextSibling.childNodes[0]?f=d.nextSibling.childNodes[0]:d.nextSibling&&d.nextSibling.nextSibling?f=d.nextSibling.nextSibling:d.parentNode.nextSibling&&(f=d.parentNode.nextSibling.nextSibling),f&&(f=f.childNodes[0]));
"left"==b&&"folder"==e&&d.parentNode.previousSibling&&top.ICEcoder.openCloseDir(c,!1);if("right"==b||"enter"==b)"folder"==e?top.ICEcoder.openCloseDir(c,!0):top.ICEcoder.openFile(c.childNodes[1].id.replace(/\|/g,"/"));f&&f.childNodes[1]&&(top.ICEcoder.overFileFolder(e,f.childNodes[1].id),top.ICEcoder.selectFileFolder(a))},openCloseDir:function(a,b){var c;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.openCloseDir(this,!b)};var d=a.parentNode;d.nextSibling&&(d=d.nextSibling);d&&
"UL"==d.tagName&&((c="none"==d.style.display)?b=!0:d.style.display="none",a.parentNode.className=a.className=c?"pft-directory dirOpen":"pft-directory");b?top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/get-branch.php?location="+a.childNodes[1].id+"&csrf="+top.ICEcoder.csrf:"UL"==d.tagName&&d.parentNode.removeChild(d);return!1},overFileFolder:function(a,b){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},isFileFolder:function(a){return(a=top.get("filesFrame").contentWindow.document.getElementById(a.replace(top.iceRoot,
"").replace(/\/$/,"").replace(/\//g,"|")))?-1<a.parentNode.parentNode.className.indexOf("directory")?"folder":"file":!1},selectFileFolder:function(a,b,c){if(""==top.ICEcoder.thisFileFolderLink)b||a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink){var d=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|");var e=top.ICEcoder.filesFrame.contentWindow.document.getElementById(d);if(b||a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(d)?
(ICEcoder.selectDeselectFile("deselect",e),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(d),1)):(ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d));else if(c||a.shiftKey){var f=function(a,b,d,c){return("00000000000000000000"+a).substr(-20)};a=!1;b=e.parentNode.parentNode.parentNode;var g=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];c=d.replace(/\d+/g,f)<g.replace(/\d+/g,f)?d:g;g=d.replace(/\d+/g,f)>g.replace(/\d+/g,f)?d:g;if(0<top.ICEcoder.selectedFiles.length&&
c.substr(0,c.lastIndexOf("|"))==g.substr(0,g.lastIndexOf("|")))for(d=0;1E6>d&&("LI"!=b.childNodes[d].nodeName&&d++,e=b.childNodes[d].childNodes[0].childNodes[1],e.id==c&&(a=!0),1==a&&-1==top.ICEcoder.selectedFiles.indexOf(e.id)&&(ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(e.id)),e.id!=g);d+=2);else ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",e),top.ICEcoder.selectedFiles.push(d)}top.ICEcoder.githubDiff&&
(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=
0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["all filenames"];top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),
ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,b){if(b){var c=-1<top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:!1;top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal;b.style.color=
"select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile}},boxSelect:function(a,b){var c=top.ICEcoder.filesFrame.contentWindow.document.getElementById("fmDragBox");"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast="");if(top.ICEcoder.mouseDown&&!top.ICEcoder.mouseDownInCM&&"drag"==b){top.ICEcoder.fmDraggedBox=!0;var d=0<top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX;
c.style.left=(d?top.ICEcoder.fmDragBoxStartX:top.ICEcoder.mouseX)+"px";c.style.width=Math.abs(top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX)+"px";d=0<top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY;c.style.top=(d?top.ICEcoder.fmDragBoxStartY-70:top.ICEcoder.mouseY-70)+"px";c.style.height=Math.abs(top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY)+"px";""!=top.ICEcoder.thisFileFolderLink&&(""==top.ICEcoder.fmDragSelectFirst?(top.ICEcoder.fmDragSelectFirst=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<
top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectFirst),top.ICEcoder.selectFileFolder(a)):(top.ICEcoder.fmDragSelectLast=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectLast),top.ICEcoder.selectFileFolder(a,!1,"shiftSim")))}"up"==b&&(c.style.width=0,c.style.height=0)},newFile:function(){top.ICEcoder.newTab("alsoSave")},newFolder:function(){var a;var b=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
1].replace(/\|/g,"/");if(a=top.ICEcoder.getInput("Enter new folder name at "+b,""))a=(b+"/"+a).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=newFolder&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+a)},returnFileAndLine:function(a){var b=1,c=/^([^ ]*)\s+(on\s+)?(line\s+)?(\d+)/.exec(a);null!==c?(b=c[4],a=c[1]):0<a.indexOf("://")?a.lastIndexOf(":")!==a.indexOf("://")&&(b=
a.split(":")[2],a=a.substr(0,a.lastIndexOf(":"))):0<a.indexOf(":")&&(b=a.split(":")[1],a=a.split(":")[0]);0<a.indexOf("(")&&0<a.indexOf(")")&&(b=a.split("(")[1].split(")")[0],a=a.split("(")[0]);return[a,b]},openFile:function(a){if("undefined"!=typeof a){var b=top.ICEcoder.returnFileAndLine(a);a=b[0];b=b[1]}a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType="file");if("/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink))top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+
1),1<b&&top.ICEcoder.goToLine(b);else if(""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType){a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/");var c=!0;100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),c=!1);c&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink.replace(/\+/g,
"%2B")+"&csrf="+top.ICEcoder.csrf+"&lineNumber="+b),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1))}},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;if(a=top.ICEcoder.getInput(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):
top.ICEcoder.openFile(a)},getRemoteFile:function(a){if("undefined"!=typeof a){var b=top.ICEcoder.returnFileAndLine(a);a=b[0];b=b[1]}top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=getRemoteFile&csrf="+top.ICEcoder.csrf+"&lineNumber="+b,a.replace(/\+/g,"%2B"));top.ICEcoder.serverMessage("<b>"+top.t.Getting+"</b><br>"+a)},getChangesToSave:function(){var a=top.ICEcoder.getcMInstance();var b=top.ICEcoder.savedContents[top.ICEcoder.selectedTab-1];a=difflib.stringAsLines(a.getValue());b=
difflib.stringAsLines(b);b=(new difflib.SequenceMatcher(b,a)).get_opcodes();for(var c=0;c<b.length;c++)for(j=b[c][3];j<b[c][4];j++)"equal"!=b[c][0]&&("undefined"==typeof b[c][5]&&(b[c][5]=""),b[c][5]+=a[j]+"\n");return JSON.stringify(b)},saveFile:function(a){var b;a||(b=top.ICEcoder.getChangesToSave());a=a?"saveAs":"save";var c=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");if("|[NEW]"==c&&0<top.ICEcoder.selectedFiles.length){var d=top.ICEcoder.selectedFiles[0];
c=-1==d.lastIndexOf(".")||d.lastIndexOf(".")<d.lastIndexOf("|")?d+c:"|[NEW]"}c=c.replace("||","|");top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&fileVersion="+ICEcoder.openFileVersions[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf,c.replace(/\+/g,"%2B"),b);top.ICEcoder.serverMessage("<b>"+top.t.Saving+"</b><br>"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,
b){if(a)var c=a.replace(/\|/g,"/");else c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));if(b){var d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/"));-1<d&&(top.ICEcoder.openFiles[d]=b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',
c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b);top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/").replace(/\+/g,"%2B")+"&csrf="+top.ICEcoder.csrf,b.replace(/\+/g,"%2B"));top.ICEcoder.serverMessage("<b>"+top.t["Renaming to"]+"</b><br>"+b);top.ICEcoder.setPreviousFiles()}},moveFile:function(a,b){if(b&&b!=a){var c=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,
"/"));if(-1<c){top.ICEcoder.openFiles[c]=b;closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>';var d=top.ICEcoder.openFiles[c];top.get("tab"+(c+1)).innerHTML=closeTabLink+" "+d.slice(d.lastIndexOf("/")).replace(/\//,
"");top.get("tab"+(c+1)).title=b}top.ICEcoder.ask("Are you sure you want to move file "+a+" to "+b+" ?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|").replace(/\+/g,"%2B")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Moving to"]+"</b><br>"+b));top.ICEcoder.setPreviousFiles()}},deleteFiles:function(a){a=a?a:top.ICEcoder.selectedFiles;var b=a.toString().replace(/\|/g,"/").replace(/,/g,
"\n");0<a.length&&top.ICEcoder.ask("Delete:\n\n"+b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=delete&&csrf="+top.ICEcoder.csrf,a.join(";").replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Deleting File"]+"</b><br>"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d<a.length;d++)top.ICEcoder.copiedFiles[d]=a[d];b||(top.get("fmMenuPasteOption").style.display="block");c||top.ICEcoder.hideFileMenu()},pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=
0;b<top.ICEcoder.copiedFiles.length;b++)"|"!=top.ICEcoder.copiedFiles[b]?(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=paste&location="+a+"&csrf="+top.ICEcoder.csrf,top.ICEcoder.copiedFiles[b].replace(/\+/g,"%2B")),top.ICEcoder.serverMessage("<b>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){if(top.ICEcoder.copiedFiles)var b=
top.ICEcoder.copiedFiles;top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile",
"optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a<c.length;a++)top.ICEcoder.showHide("hide",top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.length;d++)top.ICEcoder.showHide("hide",top.get(c[d])),top.get(c[d]+"Nav").style.color="";get("fileOptions").style.opacity=0;"show"==a&&("undefined"!=typeof fileNavInt&&clearTimeout(fileNavInt),top.ICEcoder.showHide(a,top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=
1)},isPathFolder:function(a){a=top.ICEcoder.filesFrame.contentDocument.getElementsByClassName("pft-directory");for(var b=top.ICEcoder.selectedFiles[0],c,d=0;d<a.length;d++)if(c=a[d],"underfined"!=typeof c&&(c=c.childNodes[0],"undefined"!=typeof c&&(c=c.childNodes[1],"undefined"!=typeof c&&b===c.getAttribute("id"))))return!0;return!1},checkExists:function(a){var b;a=a.replace(/\|/g,"/");0===a.indexOf(top.iceRoot)&&(a=a.replace(top.iceRoot,""));var c=top.ICEcoder.xhrObj();c.onreadystatechange=function(){4==
c.readyState&&(200==c.status?(b=JSON.parse(c.responseText),b.action.timeEnd=(new Date).getTime(),b.action.timeTaken=b.action.timeEnd-b.action.timeStart,0<=["raw","both"].indexOf(top.ICEcoder.fileDirResOutput)&&console.log(c.responseText),0<=["object","both"].indexOf(top.ICEcoder.fileDirResOutput)&&console.log(b),top.ICEcoder.lastFileDirCheckStatusObj=b,b.status.error?(top.ICEcoder.message(b.status.errorMsg),console.log("ICEcoder error info for your request..."),console.log(b),top.ICEcoder.serverMessage(),
top.ICEcoder.serverQueue("del",0)):eval(b.action.doNext)):(top.ICEcoder.message(top.t["Sorry there was..."]),console.log("ICEcoder error info for your request..."),console.log(b),top.ICEcoder.serverMessage(),top.ICEcoder.serverQueue("del",0)))};c.open("POST","lib/file-control-xhr.php?action=checkExists&csrf="+top.ICEcoder.csrf,!0);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");var d=(new Date).getTime();c.send("timeStart="+d+"&file="+a.replace(/\+/g,"%2B"))},showMenu:function(a){0!=
top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\//g,"|"))||top.ICEcoder.selectFileFolder(a);a=129;var b=window.innerHeight;if("undefined"!=typeof top.ICEcoder.thisFileFolderLink&&""!=top.ICEcoder.thisFileFolderLink){var c=this.isPathFolder(top.ICEcoder.selectedFiles[0])?"folder":"file";top.get("folderMenuItems").style.display="folder"==c&&1==top.ICEcoder.selectedFiles.length?"block":"none";"folder"==
c&&1==top.ICEcoder.selectedFiles.length&&(a+=67,"block"==top.get("fmMenuPasteOption").style.display&&(a+=19));top.get("singleFileMenuItems").style.display=1<top.ICEcoder.selectedFiles.length?"none":"block";1==top.ICEcoder.selectedFiles.length&&(a+=43);top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"},4);top.get("fileMenu").style.left=top.ICEcoder.mouseX+20+"px";c=top.ICEcoder.mouseY-top.ICEcoder.filesFrame.contentWindow.document.body.scrollTop-
10;c+a>b&&(c-=c+a-b);top.get("fileMenu").style.top=c+"px"}return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity="1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f,g){if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){var m=
"file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//","/");var h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,"|"));var l=h.parentNode.parentNode.nextSibling;var n=document.createTextNode("\n");var p=777==d?"background: #800; color: #eee":"color: #888";p='<a nohref title="'+b.replace(/\/$/,"")+"/"+c+'" onMouseOver="parentNode.draggable=true;top.ICEcoder.overFileFolder(\''+
g+"',this.childNodes[1].id)\" onMouseOut=\"parentNode.draggable=false;top.ICEcoder.overFileFolder('"+g+"','')\" "+("folder"==g?"ondragover=\"if(parentNode.nextSibling && parentNode.nextSibling.tagName != 'UL' && top.ICEcoder.thisFileFolderLink != this.childNodes[1].id) {top.ICEcoder.openCloseDir(this,true);}\"":"")+' onClick="if(!event.ctrlKey && !top.ICEcoder.cmdKey) {'+("folder"==g?"top.ICEcoder.openCloseDir(this,"+("folder"==g?"true":"false")+");":"")+' if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+
b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="'+p+'; font-size: 8px" id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'_perms">'+d+"</span></a>";if(!l||3>l.childNodes.length){var k=document.createElement("ul");l=h.parentNode.parentNode;l.parentNode.insertBefore(k,l.nextSibling);k=document.createElement("li");k.className=m;k.draggable=!1;k.ondragstart=function(a){top.ICEcoder.addDefaultDragData(this,a)};k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&
(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};k.ondragover=function(a){top.ICEcoder.setDragCursor(a,"folder"==g?"folder":"file")};k.ondragend=function(){top.ICEcoder.dropFile(this)};k.innerHTML=p;l.nextSibling.appendChild(k);l.nextSibling.appendChild(n)}else for(h=0;h<l.childNodes.length;h++)if(l.childNodes[h].className){k=0<l.childNodes[h].className.indexOf("directory")?"folder":"file";var r=l.childNodes[h].getElementsByTagName("span")[0].innerHTML;
if(k==g&&r>c||"folder"==g&&"file"==k||h==l.childNodes.length-1){k=document.createElement("li");k.className=m;k.draggable=!1;k.ondragstart=function(a){top.ICEcoder.addDefaultDragData(this,a)};k.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&(-1==top.ICEcoder.editorFocusInstance.indexOf("diff")?top.ICEcoder.getcMInstance().focus():top.ICEcoder.getcMdiffInstance().focus())};k.ondragover=function(a){top.ICEcoder.setDragCursor(a,"folder"==g?"folder":"file")};k.ondragend=
function(){top.ICEcoder.dropFile(this)};k.innerHTML=p;h==l.childNodes.length-1?(l.appendChild(k),l.appendChild(n)):(l.insertBefore(k,l.childNodes[h]),l.insertBefore(n,l.childNodes[h+1]));break}}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+
"_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms",top.ICEcoder.renameInChildren(h,e,b,c));"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.style.background=777==d?"#800":"none",h.style.color=777==
d?"#eee":"#888",h.innerHTML=d);"delete"==a&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},renameInChildren:function(a,b,c,d){if(a.parentNode.parentNode.nextSibling&&"UL"==a.parentNode.parentNode.nextSibling.nodeName){a=a.parentNode.parentNode.nextSibling;
for(var e=0;e<a.childNodes.length;e++)if("LI"==a.childNodes[e].nodeName){var f=a.childNodes[e].childNodes[0].childNodes[1];f.id=f.id.replace(b.replace(/\//g,"|"),c.replace(/\//g,"|")+"|"+d);f.parentNode.title=f.id.replace(/\|/g,"/");var g=top.get("filesFrame").contentWindow.document.getElementById(f.id).nextSibling.nextSibling;g.id=f.id+"_perms";top.ICEcoder.renameInChildren(f,b,c,d)}}},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.contentWindow.location.reload(!0);
top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;if(224==b||91==b||93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},addDefaultDragData:function(a,b){b.dataTransfer.setData("Text",a.id)},setDragCursor:function(a,b){a.preventDefault();
top.ICEcoder.draggingWithKeyTest(a);a.dataTransfer.dropEffect="editor"==b?"CTRL"==top.ICEcoder.draggingWithKey?"copy":"link":"folder"==b?"CTRL"==top.ICEcoder.draggingWithKey?"copy":"move":"none"},dropFile:function(a){var b;var c=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=c.substr(c.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(c);"files"==top.ICEcoder.area&&setTimeout(function(){b="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,
ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(b)):top.ICEcoder.moveFile(c,b.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1;top.ICEcoder.mouseDownInCM=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display=document.findAndReplace.connector.value==top.t.and?"inline-block":"none"},findReplace:function(a,
b,c,d,e){if(d)top.get("find").value=top.get("find").value,top.ICEcoder.focus();else{"undefined"==typeof e&&(e=!1);a=a.toLowerCase();var f=top.get("replace").value;var g=top.get("results");d=ICEcoder.getcMInstance();var m=ICEcoder.getcMdiffInstance();if((d=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?m:d)&&0<a.length&&document.findAndReplace.target.value==top.t["this document"]){d.getValue().toLowerCase();document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==
top.t.replace&&d.getSelection().toLowerCase()==a?d.replaceSelection(f,"around"):document.findAndReplace.replaceAction.value==top.t["replace all"]&&(c=new RegExp(a,"gi"),d.setValue(d.getValue().replace(c,f))));c=d.getValue().toLowerCase();if(!top.ICEcoder.findMode||a!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(f=0;f<c.length;f++)c.substr(f,a.length)==a&&-1==ICEcoder.results.indexOf(f)&&(ICEcoder.results.push(f),-1==ICEcoder.resultsLines.indexOf(d.posFromIndex(f).line+
1)&&ICEcoder.resultsLines.push(d.posFromIndex(f).line+1));ICEcoder.lastsearch=a}if(0<ICEcoder.results.length){if(b)g.innerHTML=ICEcoder.results.length+" results";else{if(e)for(ICEcoder.findResult="undefined"==typeof ICEcoder.findResult?ICEcoder.results.length+1:ICEcoder.results.length,f=ICEcoder.results.length-1;0<=f;f--)ICEcoder.results[f]>d.indexFromPos({ch:d.getCursor().ch-1,line:d.getCursor().line})&&ICEcoder.findResult--;else for(f=ICEcoder.findResult=0;f<ICEcoder.results.length;f++)ICEcoder.results[f]<
d.indexFromPos({ch:d.getCursor().ch+1,line:d.getCursor().line})&&ICEcoder.findResult++;!e&&ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);e&&1==ICEcoder.findResult&&(ICEcoder.findResult=ICEcoder.results.length+1);g.innerHTML="Highlighted result "+(ICEcoder.findResult+(e?-1:1))+" of "+ICEcoder.results.length+" results";e?(b=d.getSearchCursor(a,{ch:d.getCursor().ch-1,line:d.getCursor().line},!0),b.findPrevious(),b.from()||(b=d.getSearchCursor(a,{line:1E6,ch:1E6},!0),b.findPrevious())):
(b=d.getSearchCursor(a,{ch:d.getCursor().ch+1,line:d.getCursor().line},!0),b.findNext(),b.from()||(b=d.getSearchCursor(a,{line:0,ch:0},!0),b.findNext()));d.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/d.lineCount():d.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:d.heightAtLine(0);e="";for(f=1;f<=d.lineCount();f++)g=-1<ICEcoder.resultsLines.indexOf(f)?d.getCursor().line+1==f?"#b00":
"#888":"transparent",e+='<div style="position: absolute; display: block; width: 5px; height:'+a+"px; background: "+g+"; top: "+parseInt(a*(f-1)+b,10)+'px"></div>';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=e;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}g.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display=
"none";return!1}""!=a&&c?(e=b=d="",document.findAndReplace.connector.value==top.t.and&&(d="&replace="+f),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(e="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/'/g,"&#39;"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML=
'<iframe src="lib/multiple-results.php?find='+a+d+b+e+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(g.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")}},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,
a.replace(/\//g,"|").replace(/\+/g,"%2B"));top.ICEcoder.serverMessage("<b>"+top.t["Replacing text in"]+"</b><br>"+a)},getCaretPosition:function(){var a;var b=ICEcoder.getcMInstance();var c=ICEcoder.getcMdiffInstance();b=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?c:b;c=b.getCursor().line;var d=b.getCursor().ch;for(var e=a=0;e<c;e++)a+=b.getLine(e).length+1;ICEcoder.caretPos=a+d-1},updateCharDisplay:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
b:a;ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateVersionsDisplay:function(){var a=top.ICEcoder.openFileVersions[ICEcoder.selectedTab-1];get("versionsDisplay").innerHTML="undefined"!=typeof a?top.ICEcoder.openFileVersions[ICEcoder.selectedTab-1]+" backup"+(1!=a?"s":""):""},updateByteDisplay:function(){var a=ICEcoder.getcMInstance();var b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
b:a;ICEcoder.byteDisplay.innerHTML=a.getValue().length.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" bytes"},showDisplay:function(a){top.ICEcoder.byteDisplay.style.display="byte"==a?"inline-block":"none";top.ICEcoder.charDisplay.style.display="char"==a?"inline-block":"none"},showHide:function(a,b){b.style.visibility="show"==a?"visible":"hidden"},getcMInstance:function(a){return top.ICEcoder.content.contentWindow[isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-
1]:"cM1":"cM"+ICEcoder.cMInstances[a-1]]},getcMdiffInstance:function(a){return top.ICEcoder.content.contentWindow[(isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-1])+"diff"]},getMouseXY:function(a,b){top.ICEcoder.mouseX=a.pageX?a.pageX:a.clientX+document.body.scrollLeft;top.ICEcoder.mouseY=a.pageY?a.pageY:a.clientY+document.body.scrollTop;top.ICEcoder.area=b;"top"!=b&&(top.ICEcoder.mouseY+=70);"editor"==
b&&(top.ICEcoder.mouseX+=top.ICEcoder.filesW);top.ICEcoder.dragCursorTest();62<top.ICEcoder.mouseY&&top.ICEcoder.setTabWidths()},dragCursorTest:function(){var a;var b=top.ICEcoder.mouseX-top.ICEcoder.diffStartX;!1!==top.ICEcoder.draggingTab&&top.ICEcoder.diffStartX&&(-10>=b||10<=b)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());
if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),b=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX<top.ICEcoder.filesW+7||top.ICEcoder.draggingFilesW)?"w-resize":"auto",top.ICEcoder.content.contentWindow.document&&top.ICEcoder.filesFrame.contentWindow)){top.document.body.style.cursor=b;if(a=top.ICEcoder.content.contentWindow.document.body)a.style.cursor=b;if(a=top.ICEcoder.filesFrame.contentWindow.document.body)a.style.cursor=
b}},serverMessage:function(a){var b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a).replace(/&lt;b&gt;/g,"<b>").replace(/&lt;\/b&gt;/g,"</b>").replace(/&lt;br&gt;/g,"<br>"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b;var c=ICEcoder.getcMInstance();var d=ICEcoder.getcMdiffInstance();if(c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c){d=c.getLine(c.getCursor().line);for(a=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(b=
a.exec(d))&&c.getCursor().ch>b.index+b[0].length;);(d=top.get("content").contentWindow.document.getElementById("cssColor"))&&d.parentNode.removeChild(d);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(d=top.document.createElement("div"),d.id="cssColor",d.style.position="absolute",d.style.display="block",d.style.width=d.style.height="20px",d.style.zIndex="1000",d.style.background=b?b[0]:"",d.style.cursor="pointer",d.onclick=function(){top.ICEcoder.showColorPicker(b[0])},""==d.style.backgroundColor&&
(d.style.display="none"),top.get("header").appendChild(d),c.addWidget(c.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<div id="picker" class="picker"></div><br><br><input type="text" id="color" name="color" value="#000" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'color\').value)" value="insert &gt;" class="insertColorValue"><br><input type="text" id="colorRGB" name="colorRGB" value="rgb(0,0,0)" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'colorRGB\').value)" value="insert &gt;" class="insertColorValue">';
farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},initCanvasImage:function(a){var b=top.get("canvasPicker").getContext("2d");var c=new Image;c.crossOrigin="Anonymous";c.src=a.src;c.onerror=function(){get("floatingContainer").style.visibility="hidden";get("canvasPickerColorInfo").style.display="none";get("canvasPickerCORSInfo").style.display="block"};c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height);
get("canvasPickerColorInfo").style.display="block";get("canvasPickerCORSInfo").style.display="none";top.get("canvasPicker").onmouseover=function(a){get("floatingContainer").style.visibility="visible"};top.get("canvasPicker").onmouseout=function(a){get("floatingContainer").style.visibility="hidden"}};top.document.getElementById("floatingContainer").style.backgroundSize=5*a.naturalWidth+"px "+5*a.naturalHeight+"px"},interactCanvasImage:function(a){var b,c,d,e,f,g,m,h,l,n,p,k;var r=top.get("canvasPicker").getContext("2d");
top.get("canvasPicker").onmousemove=function(t){b=t.pageX-this.offsetLeft;c=t.pageY-this.offsetTop;d=r.getImageData(b,c,1,1).data;e=d[0];f=d[1];g=d[2];m=e+","+f+","+g;h=top.ICEcoder.rgbToHex(e,f,g);top.get("rgbMouseXY").value=m;top.get("hexMouseXY").value="#"+h;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+h;l=128>e||128>f||128>g&&200>e&&200>f&&50<g?"#fff":"#000";top.get("hexMouseXY").style.color=top.get("rgbMouseXY").style.color=l;n=get("floatingContainer");