CoreFiles by mySites.guru
basefiles.js1 lines, 35,206 bytes, from Joomla_1.6.0-Stable-Full_Package.zip
Raw History Compare with 1.5.26
md5
278b8d331ec88373caf185d882db1482
sha1
4e2065e9e7c66d02330567a217a00d344fede0ab
sha256
c2024be6c9f767449f4b3c1d1aaea984bbf29fe7588aee83c4aff7b9a8c4265f
function makeWhiteSpace(c){var b=[],a=true;for(;c>0;c--){b.push((a||c==1)?nbsp:" ");a=!a}return b.join("")}function fixSpaces(a){if(a.charAt(0)==" "){a=nbsp+a.slice(1)}return a.replace(/[\t \u00a0]{2,}/g,function(b){return makeWhiteSpace(b.length)})}function cleanText(a){return a.replace(/\u00a0/g," ").replace(/\u200b/g,"")}function makePartSpan(b,c){var d=b;if(b.nodeType==3){d=b.nodeValue}else{b=c.createTextNode(d)}var a=c.createElement("SPAN");a.isPart=true;a.appendChild(b);a.currentText=d;return a}var webkitLastLineHack=webkit?function(a){var b=a.lastChild;if(!b||!b.isPart||b.textContent!="\u200b"){a.appendChild(makePartSpan("\u200b",a.ownerDocument))}}:function(){};var Editor=(function(){var f={P:true,DIV:true,LI:true};function b(k){return fixSpaces(k.replace(/\t/g,"  ").replace(/\u00a0/g," ")).replace(/\r\n?/g,"\n").split("\n")}function c(l){var n=l.ownerDocument;var k=[];var o=true;function m(p){if(p.nodeType==3){var q=p.nodeValue=fixSpaces(p.nodeValue.replace(/[\r\u200b]/g,"").replace(/\n/g," "));if(q.length){o=false}k.push(p)}else{if(p.nodeName=="BR"&&p.childNodes.length==0){o=true;k.push(p)}else{forEach(p.childNodes,m);if(!o&&f.hasOwnProperty(p.nodeName)){o=true;k.push(n.createElement("BR"))}}}}m(l);return k}function d(k){function l(x,y){n=y;return x}function s(y,x,z){return function(){return y(x,z)}}function t(){n=t;throw StopIteration}var n=s(u,k,t);var m=k.ownerDocument;var o=[];function r(z){var y=z.parentNode;var x=z.nextSibling;return function(A){y.insertBefore(A,x)}}var v=null;function p(x){var y="\n";if(x.nodeType==3){select.snapshotChanged();x=makePartSpan(x,m);y=x.currentText}x.dirty=true;o.push(x);v(x);return y}function q(y,z){var x=[];forEach(c(y),function(A){x.push(p(A))});return l(x.join(""),z)}function w(x){if(x.isPart&&x.childNodes.length==1&&x.firstChild.nodeType==3){x.currentText=x.firstChild.nodeValue;return !/[\n\t\r]/.test(x.currentText)}return false}function u(x,y){if(x.nextSibling){y=s(u,x.nextSibling,y)}if(w(x)){o.push(x);return l(x.currentText,y)}else{if(x.nodeName=="BR"){o.push(x);return l("\n",y)}else{v=r(x);removeElement(x);return q(x,y)}}}return{next:function(){return n()},nodes:o}}function g(k){if(k.nodeName=="BR"){return 1}else{return k.currentText.length}}function h(k){while(k&&k.nodeName!="BR"){k=k.previousSibling}return k}function j(l,k){if(!l){l=k.firstChild}else{if(l.nodeName=="BR"){l=l.nextSibling}}while(l&&l.nodeName!="BR"){l=l.nextSibling}return l}function i(n,m,l){this.editor=n;this.history=n.history;this.history.commit();this.atOccurrence=false;this.fallbackSize=15;var p;if(l&&(p=select.cursorPos(this.editor.container))){this.line=p.node;this.offset=p.offset}else{this.line=null;this.offset=0}this.valid=!!m;var o=m.split("\n"),k=this;this.matches=(o.length==1)?function(){var q=cleanText(k.history.textAfter(k.line).slice(k.offset)).indexOf(m);if(q>-1){return{from:{node:k.line,offset:k.offset+q},to:{node:k.line,offset:k.offset+q+m.length}}}}:function(){var t=cleanText(k.history.textAfter(k.line).slice(k.offset));var s=t.lastIndexOf(o[0]);if(s==-1||s!=t.length-o[0].length){return false}var q=k.offset+s;var r=k.history.nodeAfter(k.line);for(var u=1;u<o.length-1;u++){if(cleanText(k.history.textAfter(r))!=o[u]){return false}r=k.history.nodeAfter(r)}if(cleanText(k.history.textAfter(r)).indexOf(o[o.length-1])!=0){return false}return{from:{node:k.line,offset:q},to:{node:r,offset:o[o.length-1].length}}}}i.prototype={findNext:function(){if(!this.valid){return false}this.atOccurrence=false;var k=this;if(this.line&&!this.line.parentNode){this.line=null;this.offset=0}function m(n){if(k.history.textAfter(n.node).length<n.offset){k.line=n.node;k.offset=n.offset+1}else{k.line=k.history.nodeAfter(n.node);k.offset=0}}while(true){var l=this.matches();if(l){this.atOccurrence=l;m(l.from);return true}this.line=this.history.nodeAfter(this.line);this.offset=0;if(!this.line){this.valid=false;return false}}},select:function(){if(this.atOccurrence){select.setCursorPos(this.editor.container,this.atOccurrence.from,this.atOccurrence.to);select.scrollToCursor(this.editor.container)}},replace:function(l){if(this.atOccurrence){var k=this.editor.replaceRange(this.atOccurrence.from,this.atOccurrence.to,l);this.line=k.node;this.offset=k.offset;this.atOccurrence=false}}};function e(n){this.options=n;window.indentUnit=n.indentUnit;this.parent=parent;this.doc=document;var k=this.container=this.doc.body;this.win=window;this.history=new History(k,n.undoDepth,n.undoDelay,this,n.onChange);var m=this;if(!e.Parser){throw"No parser loaded."}if(n.parserConfig&&e.Parser.configure){e.Parser.configure(n.parserConfig)}if(!n.readOnly){select.setCursorPos(k,{node:null,offset:0})}this.dirty=[];if(n.content){this.importCode(n.content)}else{k.appendChild(this.doc.createElement("BR"))}if(!n.readOnly){if(n.continuousScanning!==false){this.scanner=this.documentScanner(n.linesPerPass);this.delayScanning()}function o(){if(document.body.contentEditable!=undefined&&internetExplorer){document.body.contentEditable="true"}else{document.designMode="on"}document.documentElement.style.borderWidth="0";if(!n.textWrapping){k.style.whiteSpace="nowrap"}}try{o()}catch(q){var l=addEventHandler(document,"focus",function(){l();o()},true)}addEventHandler(document,"keydown",method(this,"keyDown"));addEventHandler(document,"keypress",method(this,"keyPress"));addEventHandler(document,"keyup",method(this,"keyUp"));function p(){m.cursorActivity(false)}addEventHandler(document.body,"mouseup",p);addEventHandler(document.body,"paste",function(r){p();if(internetExplorer){m.replaceSelection(window.clipboardData.getData("Text"));r.stop()}});addEventHandler(document.body,"cut",p);if(this.options.autoMatchParens){addEventHandler(document.body,"click",method(this,"scheduleParenBlink"))}}}function a(k){return(k>=16&&k<=18)||(k>=33&&k<=40)}e.prototype={importCode:function(k){this.history.push(null,null,b(k));this.history.reset()},getCode:function(){if(!this.container.firstChild){return""}var k=[];select.markSelection(this.win);forEach(d(this.container.firstChild),method(k,"push"));webkitLastLineHack(this.container);select.selectMarked();return cleanText(k.join(""))},checkLine:function(k){if(k===false||!(k==null||k.parentNode==this.container)){throw parent.CodeMirror.InvalidLineHandle}},cursorPosition:function(l){if(l==null){l=true}var k=select.cursorPos(this.container,l);if(k){return{line:k.node,character:k.offset}}else{return{line:null,character:0}}},firstLine:function(){return null},lastLine:function(){if(this.container.lastChild){return h(this.container.lastChild)}else{return null}},nextLine:function(l){this.checkLine(l);var k=j(l,this.container);return k||false},prevLine:function(k){this.checkLine(k);if(k==null){return false}return h(k.previousSibling)},selectLines:function(o,k,n,m){this.checkLine(o);var p={node:o,offset:k},l=null;if(m!==undefined){this.checkLine(n);l={node:n,offset:m}}select.setCursorPos(this.container,p,l)},lineContent:function(k){this.checkLine(k);var l=[];for(k=k?k.nextSibling:this.container.firstChild;k&&k.nodeName!="BR";k=k.nextSibling){l.push(nodeText(k))}return cleanText(l.join(""))},setLineContent:function(k,l){this.history.commit();this.replaceRange({node:k,offset:0},{node:k,offset:this.history.textAfter(k).length},l);this.addDirtyNode(k);this.scheduleHighlight()},insertIntoLine:function(r,l,m){var n=null;if(l=="end"){n=j(r,this.container)}else{for(var p=r?r.nextSibling:this.container.firstChild;p;p=p.nextSibling){if(l==0){n=p;break}var q=(p.innerText||p.textContent||p.nodeValue||"");if(q.length>l){n=p.nextSibling;m=q.slice(0,l)+m+q.slice(l);removeElement(p);break}l-=q.length}}var s=b(m),o=this.container.ownerDocument;for(var k=0;k<s.length;k++){if(k>0){this.container.insertBefore(o.createElement("BR"),n)}this.container.insertBefore(makePartSpan(s[k],o),n)}this.addDirtyNode(r);this.scheduleHighlight()},selectedText:function(){var l=this.history;l.commit();var n=select.cursorPos(this.container,true),k=select.cursorPos(this.container,false);if(!n||!k){return""}if(n.node==k.node){return l.textAfter(n.node).slice(n.offset,k.offset)}var m=[l.textAfter(n.node).slice(n.offset)];for(pos=l.nodeAfter(n.node);pos!=k.node;pos=l.nodeAfter(pos)){m.push(l.textAfter(pos))}m.push(l.textAfter(k.node).slice(0,k.offset));return cleanText(m.join("\n"))},replaceSelection:function(l){this.history.commit();var m=select.cursorPos(this.container,true),k=select.cursorPos(this.container,false);if(!m||!k){return}k=this.replaceRange(m,k,l);select.setCursorPos(this.container,m,k)},replaceRange:function(p,o,n){var m=b(n);m[0]=this.history.textAfter(p.node).slice(0,p.offset)+m[0];var l=m[m.length-1];m[m.length-1]=l+this.history.textAfter(o.node).slice(o.offset);var k=this.history.nodeAfter(o.node);this.history.push(p.node,k,m);return{node:this.history.nodeBefore(k),offset:l.length}},getSearchCursor:function(l,k){return new i(this,l,k)},reindent:function(){if(this.container.firstChild){this.indentRegion(null,this.container.lastChild)}},grabKeys:function(k,l){this.frozen=k;this.keyFilter=l},ungrabKeys:function(){this.frozen="leave";this.keyFilter=null},keyDown:function(l){if(this.frozen=="leave"){this.frozen=null}if(this.frozen&&(!this.keyFilter||this.keyFilter(l.keyCode))){l.stop();this.frozen(l);return}var k=l.keyCode;this.delayScanning();if(this.options.autoMatchParens){this.scheduleParenBlink()}if(k==13){if(l.ctrlKey){this.reparseBuffer()}else{select.insertNewlineAtCursor(this.win);this.indentAtCursor();select.scrollToCursor(this.container)}l.stop()}else{if(k==9&&this.options.tabMode!="default"){this.handleTab(!l.ctrlKey&&!l.shiftKey);l.stop()}else{if(k==32&&l.shiftKey&&this.options.tabMode=="default"){this.handleTab(true);l.stop()}else{if((k==219||k==221)&&l.ctrlKey){this.blinkParens(l.shiftKey);l.stop()}else{if(l.metaKey&&(k==37||k==39)){var m=select.selectionTopNode(this.container);if(m===false||!this.container.firstChild){return}if(k==37){select.focusAfterNode(h(m),this.container)}else{end=j(m,this.container);select.focusAfterNode(end?end.previousSibling:this.container.lastChild,this.container)}l.stop()}else{if(l.ctrlKey||l.metaKey){if((l.shiftKey&&k==90)||k==89){select.scrollToNode(this.history.redo());l.stop()}else{if(k==90||k==8){select.scrollToNode(this.history.undo());l.stop()}else{if(k==83&&this.options.saveFunction){this.options.saveFunction();l.stop()}}}}}}}}}},keyPress:function(l){var k=/indent|default/.test(this.options.tabMode)&&e.Parser.electricChars;if((this.frozen&&(!this.keyFilter||this.keyFilter(l.keyCode)))||l.code==13||(l.code==9&&this.options.tabMode!="default")||(l.keyCode==32&&l.shiftKey&&this.options.tabMode=="default")){l.stop()}else{if(k&&k.indexOf(l.character)!=-1){this.parent.setTimeout(method(this,"indentAtCursor"),0)}}},keyUp:function(k){this.cursorActivity(a(k.keyCode))},indentLineAfter:function(r,o){var p=r?r.nextSibling:this.container.firstChild;if(p&&!hasClass(p,"whitespace")){p=null}var k=p?p.nextSibling:(r?r.nextSibling:this.container.firstChild);var m=(r&&k&&k.currentText)?k.currentText:"";var l=0,q=p?p.currentText.length:0;if(o!=null&&this.options.tabMode=="shift"){l=o?q+indentUnit:Math.max(0,q-indentUnit)}else{if(r){l=r.indentation(m,q,o)}else{if(e.Parser.firstIndentation){l=e.Parser.firstIndentation(m,q,o)}}}var n=l-q;if(n<0){if(l==0){if(k){select.snapshotMove(p.firstChild,k.firstChild,0)}removeElement(p);p=null}else{select.snapshotMove(p.firstChild,p.firstChild,n,true);p.currentText=makeWhiteSpace(l);p.firstChild.nodeValue=p.currentText}}else{if(n>0){if(p){p.currentText=makeWhiteSpace(l);p.firstChild.nodeValue=p.currentText}else{p=makePartSpan(makeWhiteSpace(l),this.doc);p.className="whitespace";if(r){insertAfter(p,r)}else{this.container.insertBefore(p,this.container.firstChild)}}if(k){select.snapshotMove(k.firstChild,p.firstChild,q,false,true)}}}if(n!=0){this.addDirtyNode(r)}return p},highlightAtCursor:function(){var n=select.selectionTopNode(this.container,true);var m=select.selectionTopNode(this.container,false);if(n===false||!m){return}if(m.nextSibling){m=m.nextSibling}select.markSelection(this.win);var l=m.nodeType==3;if(!l){m.dirty=true}while(m.parentNode==this.container&&(l||m.dirty)){var k=this.highlight(n,1,true);if(k){n=k.node}if(!k||k.left){break}}select.selectMarked()},handleTab:function(l){if(this.options.tabMode=="spaces"){select.insertTabAtCursor(this.win)}else{if(!select.somethingSelected(this.win)){this.indentAtCursor(l)}else{var m=select.selectionTopNode(this.container,true),k=select.selectionTopNode(this.container,false);if(m===false||k===false){return}this.indentRegion(m,k,l)}}},scheduleParenBlink:function(){if(this.parenEvent){this.parent.clearTimeout(this.parenEvent)}var k=this;this.parenEvent=this.parent.setTimeout(function(){k.blinkParens()},300)},isNearParsedNode:function(k){var l=0;while(k&&(!k.parserFromHere||k.dirty)){l+=(k.textContent||k.innerText||"-").length;if(l>800){return false}k=k.previousSibling}return true},blinkParens:function(v){if(this.parenEvent){this.parent.clearTimeout(this.parenEvent)}this.parenEvent=null;function r(x){if(x.currentText){var w=x.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);return w&&w[1]}}function o(w){return/[\(\[\{]/.test(w)}var k,t=this,s=select.selectionTopNode(this.container,true);if(!s||!this.isNearParsedNode(s)){return}this.highlightAtCursor();s=select.selectionTopNode(this.container,true);if(!(s&&((k=r(s))||(s=s.nextSibling)&&(k=r(s))))){return}var q=s.className,m=o(k),n=matching[k];function p(){var w=[],y,x=true;for(var z=s;z;z=m?z.nextSibling:z.previousSibling){if(z.className==q&&z.nodeName=="SPAN"&&(y=r(z))){if(o(y)==m){w.push(y)}else{if(!w.length){x=false}else{if(w.pop()!=matching[y]){x=false}}}if(!w.length){break}}else{if(z.dirty||z.nodeName!="SPAN"&&z.nodeName!="BR"){return{node:z,status:"dirty"}}}}return{node:z,status:z&&x}}function l(x,w){x.style.fontWeight="bold";x.style.color=w?"#8F8":"#F88";t.parent.setTimeout(function(){x.style.fontWeight="";x.style.color=""},500)}while(true){var u=p();if(u.status=="dirty"){this.highlight(u.node,1);u.node.dirty=false;continue}else{l(s,u.status);if(u.node){l(u.node,u.status);if(v){select.focusAfterNode(u.node.previousSibling,this.container)}}break}}},indentAtCursor:function(l){if(!this.container.firstChild){return}this.highlightAtCursor();var n=select.selectionTopNode(this.container,false);if(n===false){return}var k=h(n);var m=this.indentLineAfter(k,l);if(n==k&&m){n=m}if(n==m){select.focusAfterNode(n,this.container)}},indentRegion:function(n,l,m){select.markSelection(this.win);n=h(n);l=j(l,this.container);do{this.highlight(n);var k=this.highlight(n,1);this.indentLineAfter(n,m);n=k?k.node:null}while(n!=l);select.selectMarked()},cursorActivity:function(k){if(internetExplorer){this.container.createTextRange().execCommand("unlink");this.selectionSnapshot=select.selectionCoords(this.win)}var l=this.options.cursorActivity;if(!k||l){var m=select.selectionTopNode(this.container,false);if(m===false||!this.container.firstChild){return}m=m||this.container.firstChild;if(l){l(m)}if(!k){this.scheduleHighlight();this.addDirtyNode(m)}}},reparseBuffer:function(){forEach(this.container.childNodes,function(k){k.dirty=true});if(this.container.firstChild){this.addDirtyNode(this.container.firstChild)}},addDirtyNode:function(l){l=l||this.container.firstChild;if(!l){return}for(var k=0;k<this.dirty.length;k++){if(this.dirty[k]==l){return}}if(l.nodeType!=3){l.dirty=true}this.dirty.push(l)},scheduleHighlight:function(){var k=this;this.parent.clearTimeout(this.highlightTimeout);this.highlightTimeout=this.parent.setTimeout(function(){k.highlightDirty()},this.options.passDelay)},getDirtyNode:function(){while(this.dirty.length>0){var k=this.dirty.pop();try{while(k&&k.parentNode!=this.container){k=k.parentNode}if(k&&(k.dirty||k.nodeType==3)){return k}}catch(l){}}return null},highlightDirty:function(m){if(!window.select){return}var l=m?Infinity:this.options.linesPerPass;if(!this.options.readOnly){select.markSelection(this.win)}var n;while(l>0&&(n=this.getDirtyNode())){var k=this.highlight(n,l);if(k){l=k.left;if(k.node&&k.dirty){this.addDirtyNode(k.node)}}}if(!this.options.readOnly){select.selectMarked()}if(n){this.scheduleHighlight()}return this.dirty.length==0},documentScanner:function(k){var l=this,m=null;return function(){if(m&&m.parentNode!=l.container){m=null}select.markSelection(l.win);var n=l.highlight(m,k,true);select.selectMarked();var o=n?(n.node&&n.node.nextSibling):null;m=(m==o)?null:o;l.delayScanning()}},delayScanning:function(){if(this.scanner){this.parent.clearTimeout(this.documentScan);this.documentScan=this.parent.setTimeout(this.scanner,this.options.continuousScanning)}},highlight:function(w,A,r){var l=this.container,y=this,o=this.options.activeTokens,n=w;if(!l.firstChild){return}if(A==null){if(!w){return}else{w=w.previousSibling}}while(w&&(!w.parserFromHere||w.dirty)){w=w.previousSibling}if(w&&!w.nextSibling){return}function k(C,B){return !B.reduced&&B.currentText==C.value&&B.className==C.style}function z(B,C){B.currentText=B.currentText.substring(C);B.reduced=true}function p(C){var B=makePartSpan(C.value,y.doc);B.className=C.style;return B}var u=d(w?w.nextSibling:l.firstChild),x=stringStream(u),v=w?w.parserFromHere(x):e.Parser.make(x);var q={current:null,get:function(){if(!this.current){this.current=u.nodes.shift()}return this.current},next:function(){this.current=null},remove:function(){l.removeChild(this.get());this.current=null},getNonEmpty:function(){var C=this.get();while(C&&C.nodeName=="SPAN"&&C.currentText==""){var B=C;this.remove();C=this.get();select.snapshotMove(B.firstChild,C&&(C.firstChild||C),0)}return C}};var t=false,m=true,s=0;forEach(v,function(D){var C=q.getNonEmpty();if(D.value=="\n"){if(C.nodeName!="BR"){throw"Parser out of sync. Expected BR."}if(C.dirty||!C.indentation){t=true}if(t||!w||(w.oldNextSibling!=w.nextSibling)){y.history.touch(w)}if(w){w.oldNextSibling=w.nextSibling}w=C;C.parserFromHere=v.copy();C.indentation=D.indentation;C.dirty=false;if(A==null&&C==n){throw StopIteration}if((A!==undefined&&--A<=0)||(!t&&!m&&s>1&&!r)){throw StopIteration}m=t;t=false;s=0;q.next()}else{if(C.nodeName!="SPAN"){throw"Parser out of sync. Expected SPAN."}if(C.dirty){t=true}s++;if(k(D,C)){C.dirty=false;q.next()}else{t=true;var B=p(D);l.insertBefore(B,C);if(o){o(B,D,y)}var G=D.value.length;var F=0;while(G>0){C=q.get();var E=C.currentText.length;select.snapshotReplaceNode(C.firstChild,B.firstChild,G,F);if(E>G){z(C,G);G=0}else{G-=E;F+=E;q.remove()}}}}});if(t||!w||(w.oldNextSibling!=w.nextSibling)){y.history.touch(w)}webkitLastLineHack(this.container);return{left:A,node:q.getNonEmpty(),dirty:t}}};return e})();addEventHandler(window,"load",function(){var a=window.frameElement.CodeMirror;a.editor=new Editor(a.options);this.parent.setTimeout(method(a,"init"),0)});var select={};(function(){select.ie_selection=document.selection&&document.selection.createRangeCollection;function e(j,k){while(j&&j.parentNode!=k){j=j.parentNode}return j}function i(j,k){while(!j.previousSibling&&j.parentNode!=k){j=j.parentNode}return e(j.previousSibling,k)}var c=null;var f="\u00a0\u00a0\u00a0\u00a0";select.snapshotChanged=function(){if(c){c.changed=true}};select.snapshotReplaceNode=function(n,m,k,l){if(!c){return}c.changed=true;function j(o){if(n==o.node){if(k&&o.offset>k){o.offset-=k}else{o.node=m;o.offset+=(l||0)}}}j(c.start);j(c.end)};select.snapshotMove=function(o,n,m,k,l){if(!c){return}c.changed=true;function j(p){if(o==p.node&&(!l||p.offset==0)){p.node=n;if(k){p.offset=Math.max(0,p.offset+m)}else{p.offset=m}}}j(c.start);j(c.end)};if(select.ie_selection){function g(n,j){var m=n.document.selection.createRange();m.collapse(j);function o(t){var u=null;while(!u&&t){u=t.nextSibling;t=t.parentNode}return l(u)}function l(t){while(t&&t.firstChild){t=t.firstChild}return{node:t,offset:0}}var s=m.parentElement();if(!isAncestor(n.document.body,s)){return null}if(!s.firstChild){return l(s)}var p=m.duplicate();p.moveToElementText(s);p.collapse(true);for(var q=s.firstChild;q;q=q.nextSibling){if(q.nodeType==3){var r=q.nodeValue.length;p.move("character",r)}else{p.moveToElementText(q);p.collapse(false)}var k=m.compareEndPoints("StartToStart",p);if(k==0){return o(q)}if(k==1){continue}if(q.nodeType!=3){return l(q)}p.setEndPoint("StartToEnd",m);return{node:q,offset:r-p.text.length}}return o(s)}select.markSelection=function(l){c=null;var k=l.document.selection;if(!k){return}var m=g(l,true),j=k.createRange().text==""?m:g(l,false);if(!m||!j){return}c={start:m,end:j,window:l,changed:false}};select.selectMarked=function(){if(!c||!c.changed){return}function k(m){var n=c.window.document.body.createTextRange();var o=m.node;if(!o){n.moveToElementText(c.window.document.body);n.collapse(false)}else{if(o.nodeType==3){n.moveToElementText(o.parentNode);var p=m.offset;while(o.previousSibling){o=o.previousSibling;p+=(o.innerText||"").length}n.move("character",p)}else{n.moveToElementText(o);n.collapse(true)}}return n}var l=k(c.start),j=k(c.end);l.setEndPoint("StartToEnd",j);l.select()};select.selectionTopNode=function(j,k){var o=j.ownerDocument.selection;if(!o){return false}var l=o.createRange();l.collapse(k);var n=l.parentElement();if(n&&isAncestor(j,n)){var q=l.duplicate();q.moveToElementText(n);if(l.compareEndPoints("StartToStart",q)==-1){return e(n,j)}}try{l.pasteHTML("<span id='xxx-temp-xxx'></span>")}catch(m){return false}var p=j.ownerDocument.getElementById("xxx-temp-xxx");if(p){var r=i(p,j);removeElement(p);return r}return false};select.focusAfterNode=function(l,j){var k=j.ownerDocument.body.createTextRange();k.moveToElementText(l||j);k.collapse(!l);k.select()};select.somethingSelected=function(k){var j=k.document.selection;return j&&(j.createRange().text!="")};function a(m,k){var l=m.document.selection;if(l){var j=l.createRange();j.pasteHTML(k);j.collapse(false);j.select()}}select.insertNewlineAtCursor=function(j){a(j,"<br>")};select.insertTabAtCursor=function(j){a(j,f)};select.cursorPos=function(k,p){var n=k.ownerDocument.selection;if(!n){return null}var m=select.selectionTopNode(k,p);while(m&&m.nodeName!="BR"){m=m.previousSibling}var l=n.createRange(),j=l.duplicate();l.collapse(p);if(m){j.moveToElementText(m);j.collapse(false)}else{try{j.moveToElementText(k)}catch(o){return null}j.collapse(true)}l.setEndPoint("StartToStart",j);return{node:m,offset:l.text.length}};select.setCursorPos=function(k,n,m){function j(p){var o=k.ownerDocument.body.createTextRange();if(!p.node){o.moveToElementText(k);o.collapse(true)}else{o.moveToElementText(p.node);o.collapse(false)}o.move("character",p.offset);return o}var l=j(n);if(m&&m!=n){l.setEndPoint("EndToEnd",j(m))}l.select()};select.scrollToCursor=function(j){var k=j.ownerDocument.selection;if(!k){return null}k.createRange().scrollIntoView()};select.scrollToNode=function(j){if(!j){return}j.scrollIntoView()};select.selectionCoords=function(m){var l=m.document.selection;if(!l){return null}var n=l.createRange(),k=n.duplicate();n.collapse(true);k.collapse(false);var j=m.document.body;return{start:{x:n.boundingLeft+j.scrollLeft-1,y:n.boundingTop+j.scrollTop},end:{x:k.boundingLeft+j.scrollLeft-1,y:k.boundingTop+j.scrollTop}}};select.selectCoords=function(n,l){if(!l){return}var k=n.document.body.createTextRange(),j=k.duplicate();try{k.moveToPoint(l.start.x,l.start.y);j.moveToPoint(l.end.x,l.end.y);k.setEndPoint("EndToStart",j);k.select()}catch(m){alert(m.message)}}}else{select.markSelection=function(m){var l=m.getSelection();if(!l||l.rangeCount==0){return(c=null)}var k=l.getRangeAt(0);c={start:{node:k.startContainer,offset:k.startOffset},end:{node:k.endContainer,offset:k.endOffset},window:m,changed:false};function j(n){while(n.node.nodeType!=3&&n.node.nodeName!="BR"){var o=n.node.childNodes[n.offset]||n.node.nextSibling;n.offset=0;while(!o&&n.node.parentNode){n.node=n.node.parentNode;o=n.node.nextSibling}n.node=o;if(!o){break}}}j(c.start);j(c.end)};select.selectMarked=function(){if(!c||!c.changed){return}var l=c.window,k=l.document.createRange();function j(m,n){if(m.node){if(m.offset==0){k["set"+n+"Before"](m.node)}else{k["set"+n](m.node,m.offset)}}else{k.setStartAfter(l.document.body.lastChild||l.document.body)}}j(c.end,"End");j(c.start,"Start");h(k,l)};function h(j,l){var k=l.getSelection();k.removeAllRanges();k.addRange(j)}function b(k){var j=k.getSelection();if(!j||j.rangeCount==0){return false}else{return j.getRangeAt(0)}}select.selectionTopNode=function(j,n){var k=b(j.ownerDocument.defaultView);if(!k){return false}var l=n?k.startContainer:k.endContainer;var m=n?k.startOffset:k.endOffset;if(window.opera&&!n&&k.endContainer==j&&k.endOffset==k.startOffset+1&&j.childNodes[k.startOffset]&&j.childNodes[k.startOffset].nodeName=="BR"){m--}if(l.nodeType==3){if(m>0){return e(l,j)}else{return i(l,j)}}else{if(l.nodeName=="HTML"){return(m==1?null:j.lastChild)}else{if(l==j){return(m==0)?null:l.childNodes[m-1]}else{if(m==l.childNodes.length){return e(l,j)}else{if(m==0){return i(l,j)}else{return e(l.childNodes[m-1],j)}}}}}};select.focusAfterNode=function(l,j){var m=j.ownerDocument.defaultView,k=m.document.createRange();k.setStartBefore(j.firstChild||j);if(l&&!l.firstChild){k.setEndAfter(l)}else{if(l){k.setEnd(l,l.childNodes.length)}else{k.setEndBefore(j.firstChild||j)}}k.collapse(false);h(k,m)};select.somethingSelected=function(k){var j=b(k);return j&&!j.collapsed};function d(l,k){var j=b(l);if(!j){return}j.deleteContents();j.insertNode(k);webkitLastLineHack(l.document.body);j=l.document.createRange();j.selectNode(k);j.collapse(false);h(j,l)}select.insertNewlineAtCursor=function(j){d(j,j.document.createElement("BR"))};select.insertTabAtCursor=function(j){d(j,j.document.createTextNode(f))};select.cursorPos=function(j,m){var k=b(window);if(!k){return}var l=select.selectionTopNode(j,m);while(l&&l.nodeName!="BR"){l=l.previousSibling}k=k.cloneRange();k.collapse(m);if(l){k.setStartAfter(l)}else{k.setStartBefore(j)}return{node:l,offset:k.toString().length}};select.setCursorPos=function(j,o,n){var m=j.ownerDocument.defaultView,l=m.document.createRange();function k(s,v,q){if(!s){s=j.firstChild}else{s=s.nextSibling}if(!s){return}if(v==0){l["set"+q+"Before"](s);return true}var t=[];function p(w){if(w.nodeType==3){t.push(w)}else{forEach(w.childNodes,p)}}while(true){while(s&&!t.length){p(s);s=s.nextSibling}var u=t.shift();if(!u){return false}var r=u.nodeValue.length;if(r>=v){l["set"+q](u,v);return true}v-=r}}n=n||o;if(k(n.node,n.offset,"End")&&k(o.node,o.offset,"Start")){h(l,m)}};select.scrollToNode=function(m){if(!m){return}var o=m.ownerDocument,k=o.body,n=o.defaultView,l=o.documentElement;while(m&&!m.offsetTop){m=m.previousSibling}var q=0,p=m;while(p&&p.offsetParent){q+=p.offsetTop;p=p.offsetParent}var j=q-(k.scrollTop||l.scrollTop||0);if(j<0||j>n.innerHeight-30){n.scrollTo(k.scrollLeft||l.scrollLeft||0,q)}};select.scrollToCursor=function(j){select.scrollToNode(select.selectionTopNode(j,true)||j.firstChild)}}})();window.stringStream=function(c){c=iter(c);var d="";var e=0;var b="";function a(){while(e==d.length){b+=d;d="";e=0;try{d=c.next()}catch(f){if(f!=StopIteration){throw f}else{return false}}}return true}return{peek:function(){if(!a()){return null}return d.charAt(e)},next:function(){if(!a()){if(b.length>0){throw"End of stringstream reached without emptying buffer ('"+b+"')."}else{throw StopIteration}}return d.charAt(e++)},get:function(){var f=b;b="";if(e>0){f+=d.slice(0,e);d=d.slice(e);e=0}return f},push:function(f){d=d.slice(0,e)+f+d.slice(e)},lookAhead:function(m,h,i,j){function l(q){return j?q.toLowerCase():q}m=l(m);var p=false;var o=b,n=e;if(i){this.nextWhile(matcher(/[\s\u00a0]/))}while(true){var g=e+m.length,f=d.length-e;if(g<=d.length){p=m==l(d.slice(e,g));e=g;break}else{if(m.slice(0,f)==l(d.slice(e))){b+=d;d="";try{d=c.next()}catch(k){break}e=0;m=m.slice(f)}else{break}}}if(!(p&&h)){d=b.slice(o.length)+d;e=n;b=o}return p},more:function(){return this.peek()!==null},applies:function(g){var f=this.peek();return(f!==null&&g(f))},nextWhile:function(f){while(this.applies(f)){this.next()}},equals:function(f){return f===this.peek()},endOfLine:function(){var f=this.peek();return f==null||f=="\n"}}};function tokenizer(d,c){function b(e){return e!="\n"&&/^[\s\u00a0]*$/.test(e)}var a={state:c,take:function(e){if(typeof(e)=="string"){e={style:e,type:e}}e.content=(e.content||"")+d.get();if(!/\n$/.test(e.content)){d.nextWhile(b)}e.value=e.content+d.get();return e},next:function(){if(!d.more()){throw StopIteration}var e;if(d.equals("\n")){d.next();return this.take("whitespace")}if(d.applies(b)){e="whitespace"}else{while(!e){e=this.state(d,function(f){a.state=f})}}return this.take(e)}};return a}function History(b,f,a,e,c){this.container=b;this.maxDepth=f;this.commitDelay=a;this.editor=e;this.parent=e.parent;this.onChange=c;var d={text:"",from:null,to:null};this.first=d;this.last=d;this.firstTouched=false;this.history=[];this.redoHistory=[];this.touched=[]}History.prototype={scheduleCommit:function(){this.parent.clearTimeout(this.commitTimeout);this.commitTimeout=this.parent.setTimeout(method(this,"tryCommit"),this.commitDelay)},touch:function(a){this.setTouched(a);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var a=this.history.pop();this.redoHistory.push(this.updateTo(a,"applyChain"));if(this.onChange){this.onChange()}return this.chainNode(a)}},redo:function(){this.commit();if(this.redoHistory.length){var a=this.redoHistory.pop();this.addUndoLevel(this.updateTo(a,"applyChain"));if(this.onChange){this.onChange()}return this.chainNode(a)}},historySize:function(){return{undo:this.history.length,redo:this.redoHistory.length}},push:function(f,e,b){var d=[];for(var c=0;c<b.length;c++){var a=(c==b.length-1)?e:this.container.ownerDocument.createElement("BR");d.push({from:f,to:a,text:cleanText(b[c])});f=a}this.pushChains([d],f==null&&e==null)},pushChains:function(b,a){this.commit(a);this.addUndoLevel(this.updateTo(b,"applyChain"));this.redoHistory=[]},chainNode:function(c){for(var a=0;a<c.length;a++){var d=c[a][0],b=d&&(d.from||d.to);if(b){return b}}},reset:function(){this.history=[];this.redoHistory=[]},textAfter:function(a){return this.after(a).text},nodeAfter:function(a){return this.after(a).to},nodeBefore:function(a){return this.before(a).from},tryCommit:function(){if(this.editor.highlightDirty()){this.commit()}else{this.scheduleCommit()}},commit:function(b){this.parent.clearTimeout(this.commitTimeout);if(!b){this.editor.highlightDirty(true)}var c=this.touchedChains(),a=this;if(c.length){this.addUndoLevel(this.updateTo(c,"linkChain"));this.redoHistory=[];if(this.onChange){this.onChange()}}},updateTo:function(e,a){var d=[],c=[];for(var b=0;b<e.length;b++){d.push(this.shadowChain(e[b]));c.push(this[a](e[b]))}if(a=="applyChain"){this.notifyDirty(c)}return d},notifyDirty:function(a){forEach(a,method(this.editor,"addDirtyNode"));this.editor.scheduleHighlight()},linkChain:function(c){for(var b=0;b<c.length;b++){var a=c[b];if(a.from){a.from.historyAfter=a}else{this.first=a}if(a.to){a.to.historyBefore=a}else{this.last=a}}},after:function(a){return a?a.historyAfter:this.first},before:function(a){return a?a.historyBefore:this.last},setTouched:function(a){if(a){if(!a.historyTouched){this.touched.push(a);a.historyTouched=true}}else{this.firstTouched=true}},addUndoLevel:function(a){this.history.push(a);if(this.history.length>this.maxDepth){this.history.shift()}},touchedChains:function(){var c=this;var d=null;function b(i){return i?i.historyTemp:d}function f(j,i){if(j){j.historyTemp=i}else{d=i}}function e(i){var k=[];for(var j=i?i.nextSibling:c.container.firstChild;j&&j.nodeName!="BR";j=j.nextSibling){if(j.currentText){k.push(j.currentText)}}return{from:i,to:j,text:cleanText(k.join(""))}}var a=[];if(c.firstTouched){c.touched.push(null)}forEach(c.touched,function(j){if(j&&j.parentNode!=c.container){return}if(j){j.historyTouched=false}else{c.firstTouched=false}var i=e(j),k=c.after(j);if(!k||k.text!=i.text||k.to!=i.to){a.push(i);f(j,i)}});function h(l,i){var k=i+"Sibling",j=l[k];while(j&&j.nodeName!="BR"){j=j[k]}return j}var g=[];c.touched=[];forEach(a,function(j){if(!b(j.from)){return}var k=[],l=j.from,m=true;while(true){var i=b(l);if(!i){if(m){break}else{i=e(l)}}k.unshift(i);f(l,null);if(!l){break}m=c.after(l);l=h(l,"previous")}l=j.to;m=c.before(j.from);while(true){if(!l){break}var i=b(l);if(!i){if(m){break}else{i=e(l)}}k.push(i);f(l,null);m=c.before(l);l=h(l,"next")}g.push(k)});return g},shadowChain:function(c){var e=[],d=this.after(c[0].from),b=c[c.length-1].to;while(true){e.push(d);var a=d.to;if(!a||a==b){break}else{d=a.historyAfter||this.before(b)}}return e},applyChain:function(a){var k=select.cursorPos(this.container,false),l=this;function b(p,o){var n=p?p.nextSibling:l.container.firstChild;while(n!=o){var i=n.nextSibling;removeElement(n);n=i}}var c=a[0].from,g=a[a.length-1].to;b(c,g);for(var h=0;h<a.length;h++){var m=a[h];if(h>0){l.container.insertBefore(m.from,g)}var d=makePartSpan(fixSpaces(m.text),this.container.ownerDocument);l.container.insertBefore(d,g);if(k&&k.node==m.from){var f=0;var e=this.after(m.from);if(e&&h==a.length-1){for(var j=0;j<k.offset&&m.text.charAt(j)==e.text.charAt(j);j++){}if(k.offset>j){f=m.text.length-e.text.length}}select.setCursorPos(this.container,{node:m.from,offset:Math.max(0,k.offset+f)})}else{if(k&&(h==a.length-1)&&k.node&&k.node.parentNode!=this.container){select.setCursorPos(this.container,{node:m.from,offset:m.text.length})}}}this.linkChain(a);return c}};var internetExplorer=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent);var webkit=/AppleWebKit/.test(navigator.userAgent);function method(b,a){return function(){b[a].apply(b,arguments)}}var StopIteration={toString:function(){return"StopIteration"}};function iter(a){var b=0;if(a.next){return a}else{return{next:function(){if(b>=a.length){throw StopIteration}else{return a[b++]}}}}}function forEach(a,c){if(a.next){try{while(true){c(a.next())}}catch(d){if(d!=StopIteration){throw d}}}else{for(var b=0;b<a.length;b++){c(a[b])}}}function map(a,c){var b=[];forEach(a,function(d){b.push(c(d))});return b}function matcher(a){return function(b){return a.test(b)}}function hasClass(b,c){var a=b.className;return a&&new RegExp("(^| )"+c+"($| )").test(a)}function insertAfter(a,c){var b=c.parentNode;b.insertBefore(a,c.nextSibling);return a}function removeElement(a){if(a.parentNode){a.parentNode.removeChild(a)}}function clearElement(a){while(a.firstChild){a.removeChild(a.firstChild)}}function isAncestor(a,b){while(b=b.parentNode){if(a==b){return true}}return false}var nbsp="\u00a0";var matching={"{":"}","[":"]","(":")","}":"{","]":"[",")":"("};function normalizeEvent(a){if(!a.stopPropagation){a.stopPropagation=function(){this.cancelBubble=true};a.preventDefault=function(){this.returnValue=false}}if(!a.stop){a.stop=function(){this.stopPropagation();this.preventDefault()}}if(a.type=="keypress"){a.code=(a.charCode==null)?a.keyCode:a.charCode;a.character=String.fromCharCode(a.code)}return a}function addEventHandler(c,b,a,e){function d(f){a(normalizeEvent(f||window.event))}if(typeof c.addEventListener=="function"){c.addEventListener(b,d,false);if(e){return function(){c.removeEventListener(b,d,false)}}}else{c.attachEvent("on"+b,d);if(e){return function(){c.detachEvent("on"+b,d)}}}}function nodeText(a){return a.innerText||a.textContent||a.nodeValue||""};

No other release has this exact content. See every version of this file.