function $AdfGeckoEditingAgent$$() {
  this.Init();
}
$goog$exportSymbol$$("AdfGeckoEditingAgent", $AdfGeckoEditingAgent$$);
$AdfObject$$.$createSubclass$($AdfGeckoEditingAgent$$, $AdfEditingAgent$$);
$AdfGeckoEditingAgent$$.$InitClass$ = function $$AdfGeckoEditingAgent$$$$InitClass$$() {
  this.$_cmdBackColor$ = "backcolor";
  this.$_cmdHiliteColor$ = "hilitecolor";
  this.$_dummyBrTagAtr$ = "data-adf-tmp-rte-enabler";
  this.$_dummyBrTagPrt1$ = "\x3cbr " + this.$_dummyBrTagAtr$;
  this.$_dummyBrTag$ = this.$_dummyBrTagPrt1$ + '\x3d"true"\x3e';
};
$goog$exportSymbol$$("AdfGeckoEditingAgent.InitClass", $AdfGeckoEditingAgent$$.$InitClass$);
$AdfGeckoEditingAgent$$.prototype.$getInlineFrameContent$ = function $$AdfGeckoEditingAgent$$$$$getInlineFrameContent$$($inlineFrame$$35$$, $keepOriginal$$2$$) {
  var $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = this.$getInlineFrameDocument$($inlineFrame$$35$$), $body$$8_retTextWthDummyBr$$ = $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$.body;
  if (!$keepOriginal$$2$$) {
    var $dummyByPosS_nodes$$3$$ = $body$$8_retTextWthDummyBr$$.childNodes;
    if ($dummyByPosS_nodes$$3$$) {
      var $breaks_node$$32$$ = $body$$8_retTextWthDummyBr$$.getElementsByTagName("BR"), $length$$29$$ = $dummyByPosS_nodes$$3$$.length;
      if ($breaks_node$$32$$ && 1 >= $breaks_node$$32$$.length && 1 < $length$$29$$) {
        for (;0 < $length$$29$$;) {
          $breaks_node$$32$$ = $dummyByPosS_nodes$$3$$[0], 1 == $breaks_node$$32$$.nodeType && 0 == $breaks_node$$32$$.offsetWidth ? ($body$$8_retTextWthDummyBr$$.removeChild($breaks_node$$32$$), $length$$29$$--) : $length$$29$$ = 0;
        }
        0 == $body$$8_retTextWthDummyBr$$.childNodes.length && ($brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$.createElement("br"), $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$.setAttribute($AdfGeckoEditingAgent$$.$_dummyBrTagAtr$, "true"), $body$$8_retTextWthDummyBr$$.appendChild($brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$));
      }
      $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = !1;
      if (1 == $dummyByPosS_nodes$$3$$.length && "BR" == $dummyByPosS_nodes$$3$$[0].nodeName) {
        return "";
      }
      1 <= $dummyByPosS_nodes$$3$$.length && "BR" == $dummyByPosS_nodes$$3$$[$dummyByPosS_nodes$$3$$.length - 1].nodeName && "true" == $dummyByPosS_nodes$$3$$[$dummyByPosS_nodes$$3$$.length - 1].getAttribute($AdfGeckoEditingAgent$$.$_dummyBrTagAtr$) ? $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = !0 : $AdfDomUtils$$.$getLastFilteredElement$($body$$8_retTextWthDummyBr$$, !0, this.$isDummyBrFnc$, null) && ($brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = !0);
      if ($brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$) {
        return $body$$8_retTextWthDummyBr$$ = $body$$8_retTextWthDummyBr$$.innerHTML, $dummyByPosS_nodes$$3$$ = $body$$8_retTextWthDummyBr$$.lastIndexOf($AdfGeckoEditingAgent$$.$_dummyBrTagPrt1$), $brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ = $body$$8_retTextWthDummyBr$$.indexOf("\x3e", $dummyByPosS_nodes$$3$$ + $AdfGeckoEditingAgent$$.$_dummyBrTagPrt1$.length), $body$$8_retTextWthDummyBr$$.substring(0, $dummyByPosS_nodes$$3$$) + $body$$8_retTextWthDummyBr$$.substring($brElement_dummyBrElementExists_dummyByPosE_theDocument$$3$$ + 
        1);
      }
    }
  }
  return $body$$8_retTextWthDummyBr$$.innerHTML;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.getInlineFrameContent", {$getInlineFrameContent$:$AdfGeckoEditingAgent$$.prototype.$getInlineFrameContent$});
$AdfGeckoEditingAgent$$.prototype.$isDummyBrFnc$ = function $$AdfGeckoEditingAgent$$$$$isDummyBrFnc$$($element$$81$$) {
  return "BR" == $element$$81$$.nodeName && "true" == $element$$81$$.getAttribute($AdfGeckoEditingAgent$$.$_dummyBrTagAtr$) ? $AdfDomUtils$$.FILTER_ACCEPT : $AdfDomUtils$$.FILTER_SKIP;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.isDummyBrFnc", {$isDummyBrFnc$:$AdfGeckoEditingAgent$$.prototype.$isDummyBrFnc$});
$AdfGeckoEditingAgent$$.prototype.$getDefaultContent$ = function $$AdfGeckoEditingAgent$$$$$getDefaultContent$$() {
  return $AdfGeckoEditingAgent$$.$_dummyBrTag$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.getDefaultContent", {$getDefaultContent$:$AdfGeckoEditingAgent$$.prototype.$getDefaultContent$});
$AdfGeckoEditingAgent$$.prototype.$toBrowserSpecificCommand$ = function $$AdfGeckoEditingAgent$$$$$toBrowserSpecificCommand$$($command$$5$$) {
  var $newCommand$$ = $command$$5$$;
  $command$$5$$ == $AdfGeckoEditingAgent$$.$_cmdBackColor$ && ($newCommand$$ = $AdfGeckoEditingAgent$$.$_cmdHiliteColor$);
  return $newCommand$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.toBrowserSpecificCommand", {$toBrowserSpecificCommand$:$AdfGeckoEditingAgent$$.prototype.$toBrowserSpecificCommand$});
$AdfGeckoEditingAgent$$.prototype.$getFocusBlurElement$ = function $$AdfGeckoEditingAgent$$$$$getFocusBlurElement$$($inlineFrame$$36$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$36$$, "IFRAME");
  return this.$getInlineFrameDocument$($inlineFrame$$36$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.getFocusBlurElement", {$getFocusBlurElement$:$AdfGeckoEditingAgent$$.prototype.$getFocusBlurElement$});
$AdfGeckoEditingAgent$$.prototype.$getSelectionRange$ = function $$AdfGeckoEditingAgent$$$$$getSelectionRange$$($inlineFrame$$37_selection$$6$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$37_selection$$6$$, "IFRAME");
  if (($inlineFrame$$37_selection$$6$$ = this.$_getWindowSelection$($inlineFrame$$37_selection$$6$$)) && 0 < $inlineFrame$$37_selection$$6$$.rangeCount) {
    return $inlineFrame$$37_selection$$6$$.getRangeAt(0);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.getSelectionRange", {$getSelectionRange$:$AdfGeckoEditingAgent$$.prototype.$getSelectionRange$});
$AdfGeckoEditingAgent$$.prototype.setSelectionRange = function $$AdfGeckoEditingAgent$$$$setSelectionRange$($inlineFrame$$38$$, $range$$9$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$38$$, "IFRAME");
  var $selection$$7$$ = this.$_getWindowSelection$($inlineFrame$$38$$);
  $selection$$7$$ && ($selection$$7$$.removeAllRanges(), $selection$$7$$.addRange($range$$9$$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.setSelectionRange", {setSelectionRange:$AdfGeckoEditingAgent$$.prototype.setSelectionRange});
$AdfGeckoEditingAgent$$.prototype.$_getWindowSelection$ = function $$AdfGeckoEditingAgent$$$$$_getWindowSelection$$($inlineFrame$$39$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$39$$, "IFRAME");
  return this.$getInlineFrameDocument$($inlineFrame$$39$$).defaultView.getSelection();
};
$AdfGeckoEditingAgent$$.prototype.$handleTab$ = function $$AdfGeckoEditingAgent$$$$$handleTab$$($inlineFrame$$40$$, $keyDownEvt$$2$$) {
  $keyDownEvt$$2$$.shiftKey || ($AdfAgent$$.$AGENT$.preventDefault($keyDownEvt$$2$$), $AdfFocusUtils$$.$focusNextTabStop$($inlineFrame$$40$$, null, !0));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.handleTab", {$handleTab$:$AdfGeckoEditingAgent$$.prototype.$handleTab$});
$AdfGeckoEditingAgent$$.prototype.queryCommandValue = function $$AdfGeckoEditingAgent$$$$queryCommandValue$($inlineFrame$$41$$, $commandIdentifier$$6$$) {
  if (this.$isDesignMode$($inlineFrame$$41$$)) {
    return $AdfGeckoEditingAgent$$.$superclass$.queryCommandValue.call(this, $inlineFrame$$41$$, $commandIdentifier$$6$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.queryCommandValue", {queryCommandValue:$AdfGeckoEditingAgent$$.prototype.queryCommandValue});
$AdfGeckoEditingAgent$$.prototype.queryCommandState = function $$AdfGeckoEditingAgent$$$$queryCommandState$($inlineFrame$$42$$, $commandIdentifier$$7$$) {
  if (this.$isDesignMode$($inlineFrame$$42$$)) {
    return $AdfGeckoEditingAgent$$.$superclass$.queryCommandState.call(this, $inlineFrame$$42$$, $commandIdentifier$$7$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.queryCommandState", {queryCommandState:$AdfGeckoEditingAgent$$.prototype.queryCommandState});
$AdfGeckoEditingAgent$$.prototype.$queryCommandIndeterminate$ = function $$AdfGeckoEditingAgent$$$$$queryCommandIndeterminate$$($inlineFrame$$43$$, $commandIdentifier$$8$$) {
  return this.$isDesignMode$($inlineFrame$$43$$) ? $AdfGeckoEditingAgent$$.$superclass$.$queryCommandIndeterminate$.call(this, $inlineFrame$$43$$, $commandIdentifier$$8$$) : !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.queryCommandIndeterminate", {$queryCommandIndeterminate$:$AdfGeckoEditingAgent$$.prototype.$queryCommandIndeterminate$});
$AdfGeckoEditingAgent$$.prototype.queryCommandEnabled = function $$AdfGeckoEditingAgent$$$$queryCommandEnabled$($component$$199$$, $inlineFrame$$44$$, $command$$6$$) {
  return this.$isDesignMode$($inlineFrame$$44$$) ? "unlink" == $command$$6$$ ? this.$QueryUnLinkEnabled$($component$$199$$, $inlineFrame$$44$$) : $AdfGeckoEditingAgent$$.$superclass$.queryCommandEnabled.call(this, $component$$199$$, $inlineFrame$$44$$, $command$$6$$) : !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.queryCommandEnabled", {queryCommandEnabled:$AdfGeckoEditingAgent$$.prototype.queryCommandEnabled});
$AdfGeckoEditingAgent$$.prototype.$QueryUnLinkEnabled$ = function $$AdfGeckoEditingAgent$$$$$QueryUnLinkEnabled$$($component$$200$$, $inlineFrame$$45$$) {
  var $selection$$8$$ = this.$getInlineFrameDocument$($inlineFrame$$45$$).getSelection();
  return $selection$$8$$ && "" == $selection$$8$$ ? !1 : !0;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.QueryUnLinkEnabled", {$QueryUnLinkEnabled$:$AdfGeckoEditingAgent$$.prototype.$QueryUnLinkEnabled$});
$AdfGeckoEditingAgent$$.prototype.$CreateLink$ = function $$AdfGeckoEditingAgent$$$$$CreateLink$$($component$$201$$, $doc$$19$$, $value$$137$$) {
  for (var $results$$1$$ = "", $char1$$ = "", $i$$73$$ = 0;$i$$73$$ < $value$$137$$.length;$i$$73$$++) {
    for (var $c$$inline_471$$ = $char1$$ = $value$$137$$.charAt($i$$73$$), $i$$inline_472$$ = void 0, $i$$inline_472$$ = 0;256 > $i$$inline_472$$;++$i$$inline_472$$) {
      var $h$$inline_473$$ = $i$$inline_472$$.toString(16);
      1 == $h$$inline_473$$.length && ($h$$inline_473$$ = "0" + $h$$inline_473$$);
      $h$$inline_473$$ = "%" + $h$$inline_473$$;
      $h$$inline_473$$ = unescape($h$$inline_473$$);
      if ($h$$inline_473$$ == $c$$inline_471$$) {
        break;
      }
    }
    $results$$1$$ = 256 == $i$$inline_472$$ ? $results$$1$$ + encodeURI($char1$$) : $results$$1$$ + $char1$$;
  }
  return $AdfGeckoEditingAgent$$.$superclass$.$CreateLink$($component$$201$$, $doc$$19$$, $results$$1$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfGeckoEditingAgent.prototype.CreateLink", {$CreateLink$:$AdfGeckoEditingAgent$$.prototype.$CreateLink$});
