function Uc(){this.Init()}v("AdfIEEditingAgent",Uc);z.l(Uc,Qc);Uc.prototype.GI=function(a){var b=n;if(isNaN(a))b=new TrColorConverter(["#RRGGBB"],p);else{a=a.toString(16);for(b=a.length;6>b;)a="0"+a,b++;a="#"+a;b=new TrColorConverter(["#BBGGRR"],p)}try{a=b.getAsObject(a)}catch(d){a=n}return a};z.a("AdfIEEditingAgent.prototype.getColor",{GI:Uc.prototype.GI});
Uc.prototype.fm=function(a,b){if("TEXTAREA"==a.nodeName||"INPUT"==a.nodeName)if(a.selectionStart){var d=a.selectionStart+b.length;a.value=a.value.substr(0,a.selectionStart)+b+a.value.substr(a.selectionEnd);a.selectionStart=d;a.selectionEnd=d}else{d=document.activeElement;a.setActive();var e=document.selection.createRange();e.text=b;e.moveEnd("textedit");e.collapse();e.select();d.setActive()}else if(d=this.jf(a),d==n)D.i.severe("IE - Unexpected null selection for insert command.");else{var e=d.parentElement(),
f;f=this.Jc(a).body;for(var g=p;e!=n;){if(e==f){g=l;break}e=e.parentNode}g||(d=f.createTextRange(),d.collapse());d.pasteHTML(b)}};z.a("AdfIEEditingAgent.prototype.insertHtmlAtSelection",{fm:Uc.prototype.fm});Uc.prototype.Hn=function(a,b){b.shiftKey?O.Qh(a):O.Ud(a,n,l)};z.a("AdfIEEditingAgent.prototype.handleTab",{Hn:Uc.prototype.Hn});
Uc.prototype.An=function(a,b){var d=this.Jc(a).body;if(!b){var e=d.childNodes;if(e&&1==e.length&&(e=e[0],"P"==e.nodeName&&""==e.innerText))return"";e=d.textContent;if(!e||""==e)return""}return d.innerHTML};z.a("AdfIEEditingAgent.prototype.getInlineFrameContent",{An:Uc.prototype.An});Uc.prototype.xJ=function(){return!this.gq()};z.a("AdfIEEditingAgent.prototype.isDesignModeReloadingFrame",{xJ:Uc.prototype.xJ});Uc.prototype.gq=function(){return 9<=w.b.nb()};
z.a("AdfIEEditingAgent.prototype.useContentEditable",{gq:Uc.prototype.gq});Uc.prototype.xn=t("\x3cP\x3e\x3c/P\x3e");z.a("AdfIEEditingAgent.prototype.getDefaultContent",{xn:Uc.prototype.xn});Uc.prototype.Cs=function(a,b,d){var e=a.du;if(e!=d){delete a.fn;d==n&&(d="");a.du=d;var f=a.vQ;f==n?(f=[],a.vQ=f):(e==n&&(e=""),a=this.Jc(b).body,f.push(Td(e,d,a.scrollLeft,a.scrollTop)),25<f.length&&f.shift())}};z.a("AdfIEEditingAgent.prototype.updateValueHistory",{Cs:Uc.prototype.Cs});
Uc.prototype.nq=function(a,b,d){b=a.vQ;if(b!=n&&0<b.length){var e=a.fn;e==n&&(e=[],a.fn=e);Ud(a,d,b,e)}};z.a("AdfIEEditingAgent.prototype.ExecuteUndo",{nq:Uc.prototype.nq});Uc.prototype.mq=function(a,b,d){b=a.fn;if(b!=n&&0<b.length){var e=a.vQ;e==n&&(e=[],a.vQ=e);Ud(a,d,b,e)}};z.a("AdfIEEditingAgent.prototype.ExecuteRedo",{mq:Uc.prototype.mq});Uc.prototype.Bq=function(a){a=a.vQ;return a==n||0==a.length?p:l};z.a("AdfIEEditingAgent.prototype.QueryUndoEnabled",{Bq:Uc.prototype.Bq});
Uc.prototype.Aq=function(a){a=a.fn;return a==n||0==a.length?p:l};z.a("AdfIEEditingAgent.prototype.QueryRedoEnabled",{Aq:Uc.prototype.Aq});
Uc.prototype.wq=function(a,b){var d;try{d=a.length}catch(e){d=-1}var f=b.ownerDocument.body.createTextRange();f.moveToElementText(b);if(-1<d){if(a!=n&&1==a.length){d=a.item(0).ownerDocument.body.createTextRange();d.moveToElementText(a.item(0).parentElement);var g=f.boundingLeft==d.boundingLeft,h=f.boundingTop==d.boundingTop,m=f.boundingWidth==d.boundingWidth,q=f.offsetLeft==d.offsetLeft,s=f.offsetTop==f.offsetTop;if(f.boundingHeight==d.boundingHeight&&g&&h&&m&&q&&s)return l}return p}return f.inRange(a)};
z.a("AdfIEEditingAgent.prototype.IsNodeWrappingRange",{wq:Uc.prototype.wq});Uc.prototype.jf=function(a){a=this.Ro(a);if(a.getRangeAt){if(0<a.rangeCount)return a.getRangeAt(0)}else return a.createRange();return n};z.a("AdfIEEditingAgent.prototype.getSelectionRange",{jf:Uc.prototype.jf});Uc.prototype.setSelectionRange=function(a,b){B.p(a,"IFRAME");var d=this.Ro(a);d&&d.getRangeAt?(d.removeAllRanges(),d.addRange(b)):b.select()};z.a("AdfIEEditingAgent.prototype.setSelectionRange",{setSelectionRange:Uc.prototype.setSelectionRange});
Uc.prototype.Ro=function(a){var b=n;return b=this.Jc(a).selection?this.Jc(a).selection:this.Jc(a).getSelection()};
function Td(a,b,d,e){var f=a.length,g=b.length,h,m,q;for(h=0;h<f&&h<g&&!(m=a.charAt(h),q=b.charAt(h),m!=q);h++);var s=h,y=0,A="";m=k;for(h=0;;){var C=f-h,G=g-h;if(C<s){y=1+G-s;A=a.substring(s,m);break}if(G<s){y=1+G-s;A=a.substring(s,1+C);break}m=a.charAt(C);q=b.charAt(G);if(m!=q){y=1+G-s;A=a.substring(s,1+C);break}m=C;h++}return{firstDifferenceIndex:s,deltaLengthInNewValue:y,removedChars:A,scrollLeft:d,scrollTop:e}}
function Ud(a,b,d,e){d=d.pop();var f=a.du;if(d!=n&&f!=n){var g=f,h=d.firstDifferenceIndex,g=g.substring(0,h)+d.removedChars+g.substring(h+d.deltaLengthInNewValue);a.du=g;a=b.body;b=a.scrollLeft;h=a.scrollTop;e.push(Td(f,g,b,h));a.innerHTML=g;b=d.scrollLeft;h=d.scrollTop;a.scrollLeft=b;a.scrollTop=h}}Uc.prototype.Fn=function(a){return a?a.text:""};z.a("AdfIEEditingAgent.prototype.getSelectionRangeString",{Fn:Uc.prototype.Fn});