function $AdfSafariEditingAgent$$() {
  this.Init();
  this.$_isTouch$ = $AdfAgent$$.$AGENT$.$getCapabilities$()[$AdfAgent$$.$CAP_TOUCH_SCREEN$] != $AdfAgent$$.$CAP_TOUCH_SCREEN_NONE$;
}
$goog$exportSymbol$$("AdfSafariEditingAgent", $AdfSafariEditingAgent$$);
$AdfObject$$.$createSubclass$($AdfSafariEditingAgent$$, $AdfEditingAgent$$);
$AdfSafariEditingAgent$$.prototype.$getInlineFrameContent$ = function $$AdfSafariEditingAgent$$$$$getInlineFrameContent$$($inlineFrame$$62$$, $keepOriginal$$4$$) {
  if (this.$_isTouch$ && $AdfAgent$$.$AGENT$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && null == $inlineFrame$$62$$.contentWindow) {
    return "";
  }
  var $body$$13$$ = this.$getInlineFrameDocument$($inlineFrame$$62$$).body;
  if (!$keepOriginal$$4$$) {
    var $node$$54_nodes$$6$$ = $body$$13$$.childNodes;
    if ($node$$54_nodes$$6$$) {
      if (1 == $node$$54_nodes$$6$$.length) {
        if ($node$$54_nodes$$6$$ = $node$$54_nodes$$6$$[0], "BR" == $node$$54_nodes$$6$$.nodeName && "" == $node$$54_nodes$$6$$.innerText) {
          return "";
        }
      } else {
        if (2 == $node$$54_nodes$$6$$.length && this.$_isTouch$ && $AdfAgent$$.$AGENT$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && "" == $node$$54_nodes$$6$$[0].innerText && "" == $node$$54_nodes$$6$$[1].innerText) {
          return "";
        }
      }
    }
  }
  return $body$$13$$.innerHTML;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.getInlineFrameContent", {$getInlineFrameContent$:$AdfSafariEditingAgent$$.prototype.$getInlineFrameContent$});
$AdfSafariEditingAgent$$.prototype.$getDefaultContent$ = function $$AdfSafariEditingAgent$$$$$getDefaultContent$$() {
  return "\x3cbr\x3e";
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.getDefaultContent", {$getDefaultContent$:$AdfSafariEditingAgent$$.prototype.$getDefaultContent$});
$AdfSafariEditingAgent$$.prototype.$insertHtmlAtSelection$ = function $$AdfSafariEditingAgent$$$$$insertHtmlAtSelection$$($inlineFrame$$63$$, $htmlFragment$$4$$) {
  if ("TEXTAREA" == $inlineFrame$$63$$.nodeName || "INPUT" == $inlineFrame$$63$$.nodeName) {
    var $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$ = $inlineFrame$$63$$.selectionStart + $htmlFragment$$4$$.length;
    $inlineFrame$$63$$.value = $inlineFrame$$63$$.value.substr(0, $inlineFrame$$63$$.selectionStart) + $htmlFragment$$4$$ + $inlineFrame$$63$$.value.substr($inlineFrame$$63$$.selectionEnd);
    $inlineFrame$$63$$.selectionStart = $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$;
    $inlineFrame$$63$$.selectionEnd = $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$;
  } else {
    if ($inlineFrameBody$$1_newStart$$3_selectionRange$$8$$ = this.$getSelectionRange$($inlineFrame$$63$$), null == $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$) {
      var $inlineFrameDoc$$1_newNode$$3$$ = this.$getInlineFrameDocument$($inlineFrame$$63$$), $div$$2_nodes$$7$$ = $inlineFrameDoc$$1_newNode$$3$$.createElement("div");
      $div$$2_nodes$$7$$.innerHTML = $htmlFragment$$4$$;
      for (var $div$$2_nodes$$7$$ = $div$$2_nodes$$7$$.childNodes, $i$$94_nodeCount$$2$$ = $div$$2_nodes$$7$$.length, $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$ = $inlineFrameDoc$$1_newNode$$3$$.body, $i$$94_nodeCount$$2$$ = $i$$94_nodeCount$$2$$ - 1;0 <= $i$$94_nodeCount$$2$$;$i$$94_nodeCount$$2$$--) {
        $inlineFrameDoc$$1_newNode$$3$$ = $div$$2_nodes$$7$$[$i$$94_nodeCount$$2$$], $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.insertBefore($inlineFrameDoc$$1_newNode$$3$$, $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.firstChild);
      }
    } else {
      0 < $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.toString().length && $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.deleteContents();
      $inlineFrameDoc$$1_newNode$$3$$ = this.$getInlineFrameDocument$($inlineFrame$$63$$);
      $div$$2_nodes$$7$$ = $inlineFrameDoc$$1_newNode$$3$$.createElement("div");
      $div$$2_nodes$$7$$.innerHTML = $htmlFragment$$4$$;
      for (var $div$$2_nodes$$7$$ = $div$$2_nodes$$7$$.childNodes, $i$$94_nodeCount$$2$$ = $div$$2_nodes$$7$$.length, $lastNode$$2$$ = null, $i$$94_nodeCount$$2$$ = $i$$94_nodeCount$$2$$ - 1;0 <= $i$$94_nodeCount$$2$$;$i$$94_nodeCount$$2$$--) {
        $inlineFrameDoc$$1_newNode$$3$$ = $div$$2_nodes$$7$$[$i$$94_nodeCount$$2$$], null == $lastNode$$2$$ && ($lastNode$$2$$ = $inlineFrameDoc$$1_newNode$$3$$), $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.insertNode($inlineFrameDoc$$1_newNode$$3$$);
      }
      null != $lastNode$$2$$ && ($inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.selectNode($lastNode$$2$$), $inlineFrameBody$$1_newStart$$3_selectionRange$$8$$.setStartAfter($lastNode$$2$$));
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.insertHtmlAtSelection", {$insertHtmlAtSelection$:$AdfSafariEditingAgent$$.prototype.$insertHtmlAtSelection$});
$AdfSafariEditingAgent$$.prototype.$setInlineFrameContentEditable$ = function $$AdfSafariEditingAgent$$$$$setInlineFrameContentEditable$$($inlineFrame$$64$$) {
  return this.$isDesignMode$($inlineFrame$$64$$) ? !1 : $AdfSafariEditingAgent$$.$superclass$.$setInlineFrameContentEditable$.call(this, $inlineFrame$$64$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.setInlineFrameContentEditable", {$setInlineFrameContentEditable$:$AdfSafariEditingAgent$$.prototype.$setInlineFrameContentEditable$});
$AdfSafariEditingAgent$$.prototype.$getFocusBlurElement$ = function $$AdfSafariEditingAgent$$$$$getFocusBlurElement$$($focusBlurElement$$1_inlineFrame$$65$$) {
  $AdfAssert$$.$assertDomElement$($focusBlurElement$$1_inlineFrame$$65$$, "IFRAME");
  $focusBlurElement$$1_inlineFrame$$65$$ = this.$getInlineFrameDocument$($focusBlurElement$$1_inlineFrame$$65$$).body;
  $focusBlurElement$$1_inlineFrame$$65$$.tabIndex = 0;
  return $focusBlurElement$$1_inlineFrame$$65$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.getFocusBlurElement", {$getFocusBlurElement$:$AdfSafariEditingAgent$$.prototype.$getFocusBlurElement$});
$AdfSafariEditingAgent$$.prototype.$getSelectionRange$ = function $$AdfSafariEditingAgent$$$$$getSelectionRange$$($inlineFrame$$66_selection$$14$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$66_selection$$14$$, "IFRAME");
  if (($inlineFrame$$66_selection$$14$$ = this.$_getWindowSelection$($inlineFrame$$66_selection$$14$$)) && 0 < $inlineFrame$$66_selection$$14$$.rangeCount) {
    return $inlineFrame$$66_selection$$14$$.getRangeAt(0);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.getSelectionRange", {$getSelectionRange$:$AdfSafariEditingAgent$$.prototype.$getSelectionRange$});
$AdfSafariEditingAgent$$.prototype.setSelectionRange = function $$AdfSafariEditingAgent$$$$setSelectionRange$($inlineFrame$$67$$, $range$$14$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$67$$, "IFRAME");
  var $selection$$15$$ = this.$_getWindowSelection$($inlineFrame$$67$$);
  $selection$$15$$ && ($selection$$15$$.removeAllRanges(), $selection$$15$$.addRange($range$$14$$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.setSelectionRange", {setSelectionRange:$AdfSafariEditingAgent$$.prototype.setSelectionRange});
$AdfSafariEditingAgent$$.prototype.$_getWindowSelection$ = function $$AdfSafariEditingAgent$$$$$_getWindowSelection$$($inlineFrame$$68$$) {
  $AdfAssert$$.$assertDomElement$($inlineFrame$$68$$, "IFRAME");
  return this.$getInlineFrameDocument$($inlineFrame$$68$$).defaultView.getSelection();
};
$AdfSafariEditingAgent$$.prototype.$handleTab$ = function $$AdfSafariEditingAgent$$$$$handleTab$$($inlineFrame$$69$$, $keyDownEvt$$4$$) {
  $keyDownEvt$$4$$.shiftKey ? ($AdfAgent$$.$AGENT$.preventDefault($keyDownEvt$$4$$), $AdfFocusUtils$$.$focusPreviousTabStop$($inlineFrame$$69$$)) : ($AdfAgent$$.$AGENT$.preventDefault($keyDownEvt$$4$$), $AdfFocusUtils$$.$focusNextTabStop$($inlineFrame$$69$$, null, !0));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.handleTab", {$handleTab$:$AdfSafariEditingAgent$$.prototype.$handleTab$});
$AdfSafariEditingAgent$$.prototype.queryCommandValue = function $$AdfSafariEditingAgent$$$$queryCommandValue$($inlineFrame$$70$$, $commandIdentifier$$9$$) {
  if (this.$isDesignMode$($inlineFrame$$70$$)) {
    return $AdfSafariEditingAgent$$.$superclass$.queryCommandValue.call(this, $inlineFrame$$70$$, $commandIdentifier$$9$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.queryCommandValue", {queryCommandValue:$AdfSafariEditingAgent$$.prototype.queryCommandValue});
$AdfSafariEditingAgent$$.prototype.queryCommandState = function $$AdfSafariEditingAgent$$$$queryCommandState$($inlineFrame$$71$$, $commandIdentifier$$10$$) {
  if (this.$isDesignMode$($inlineFrame$$71$$)) {
    return $AdfSafariEditingAgent$$.$superclass$.queryCommandState.call(this, $inlineFrame$$71$$, $commandIdentifier$$10$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.queryCommandState", {queryCommandState:$AdfSafariEditingAgent$$.prototype.queryCommandState});
$AdfSafariEditingAgent$$.prototype.$queryCommandIndeterminate$ = function $$AdfSafariEditingAgent$$$$$queryCommandIndeterminate$$($inlineFrame$$72$$, $commandIdentifier$$11$$) {
  return this.$isDesignMode$($inlineFrame$$72$$) ? $AdfSafariEditingAgent$$.$superclass$.$queryCommandIndeterminate$.call(this, $inlineFrame$$72$$, $commandIdentifier$$11$$) : !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.queryCommandIndeterminate", {$queryCommandIndeterminate$:$AdfSafariEditingAgent$$.prototype.$queryCommandIndeterminate$});
$AdfSafariEditingAgent$$.prototype.queryCommandEnabled = function $$AdfSafariEditingAgent$$$$queryCommandEnabled$($component$$213$$, $inlineFrame$$73$$, $command$$7$$) {
  return this.$isDesignMode$($inlineFrame$$73$$) ? $AdfSafariEditingAgent$$.$superclass$.queryCommandEnabled.call(this, $component$$213$$, $inlineFrame$$73$$, $command$$7$$) : !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.queryCommandEnabled", {queryCommandEnabled:$AdfSafariEditingAgent$$.prototype.queryCommandEnabled});
$AdfSafariEditingAgent$$.prototype.$updateValueHistory$ = function $$AdfSafariEditingAgent$$$$$updateValueHistory$$($component$$214_itemNum$$, $inlineFrame$$74$$, $newValue$$22$$) {
  var $agent$$25$$ = $AdfAgent$$.$AGENT$;
  this.$_isTouch$ && $agent$$25$$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && 536 > $agent$$25$$.$getVersion$() ? (this.$_updateValueHistory$ || (this.$_updateValueHistory$ = []), $component$$214_itemNum$$ = this.$_updateValueHistory$.length, 0 < $component$$214_itemNum$$ && this.$_updateValueHistory$[$component$$214_itemNum$$ - 1] == $newValue$$22$$ || this.$_updateValueHistory$.push($newValue$$22$$)) : $AdfSafariEditingAgent$$.$superclass$.$updateValueHistory$.call(this, $component$$214_itemNum$$, 
  $inlineFrame$$74$$, $newValue$$22$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.updateValueHistory", {$updateValueHistory$:$AdfSafariEditingAgent$$.prototype.$updateValueHistory$});
$AdfSafariEditingAgent$$.prototype.$ExecuteUndo$ = function $$AdfSafariEditingAgent$$$$$ExecuteUndo$$($component$$215_item$$1$$, $inlineFrame$$75$$, $doc$$27$$) {
  var $agent$$26$$ = $AdfAgent$$.$AGENT$;
  this.$_isTouch$ && $agent$$26$$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && 536 > $agent$$26$$.$getVersion$() ? (this.$_redoStack$ || (this.$_redoStack$ = []), this.$_updateValueHistory$ && 0 < this.$_updateValueHistory$.length && ($component$$215_item$$1$$ = this.$_updateValueHistory$.pop(), this.$_redoStack$.push($component$$215_item$$1$$), 0 < this.$_updateValueHistory$.length && this.$setInlineFrameContent$($inlineFrame$$75$$, this.$_updateValueHistory$[this.$_updateValueHistory$.length - 
  1]))) : $AdfSafariEditingAgent$$.$superclass$.$ExecuteUndo$.call(this, $component$$215_item$$1$$, $inlineFrame$$75$$, $doc$$27$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.ExecuteUndo", {$ExecuteUndo$:$AdfSafariEditingAgent$$.prototype.$ExecuteUndo$});
$AdfSafariEditingAgent$$.prototype.$ExecuteRedo$ = function $$AdfSafariEditingAgent$$$$$ExecuteRedo$$($component$$216$$, $inlineFrame$$76$$, $doc$$28$$) {
  var $agent$$27$$ = $AdfAgent$$.$AGENT$;
  this.$_isTouch$ && $agent$$27$$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && 536 > $agent$$27$$.$getVersion$() ? this.$_redoStack$ && 0 < this.$_redoStack$.length && this.$setInlineFrameContent$($inlineFrame$$76$$, this.$_redoStack$.pop()) : $AdfSafariEditingAgent$$.$superclass$.$ExecuteRedo$.call(this, $component$$216$$, $inlineFrame$$76$$, $doc$$28$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.ExecuteRedo", {$ExecuteRedo$:$AdfSafariEditingAgent$$.prototype.$ExecuteRedo$});
$AdfSafariEditingAgent$$.prototype.$QueryUndoEnabled$ = function $$AdfSafariEditingAgent$$$$$QueryUndoEnabled$$($component$$217$$, $inlineFrame$$77$$) {
  var $agent$$28$$ = $AdfAgent$$.$AGENT$;
  return this.$_isTouch$ && $agent$$28$$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && 536 > $agent$$28$$.$getVersion$() ? this.$_updateValueHistory$ && 0 < this.$_updateValueHistory$.length ? !0 : !1 : $AdfSafariEditingAgent$$.$superclass$.$QueryUndoEnabled$.call(this, $component$$217$$, $inlineFrame$$77$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.QueryUndoEnabled", {$QueryUndoEnabled$:$AdfSafariEditingAgent$$.prototype.$QueryUndoEnabled$});
$AdfSafariEditingAgent$$.prototype.$QueryRedoEnabled$ = function $$AdfSafariEditingAgent$$$$$QueryRedoEnabled$$($component$$218$$, $inlineFrame$$78$$) {
  var $agent$$29$$ = $AdfAgent$$.$AGENT$;
  return this.$_isTouch$ && $agent$$29$$.$getPlatform$() == $AdfAgent$$.$WEBKIT_PLATFORM$ && 536 > $agent$$29$$.$getVersion$() ? this.$_redoStack$ && 0 < this.$_redoStack$.length ? !0 : !1 : $AdfSafariEditingAgent$$.$superclass$.$QueryRedoEnabled$.call(this, $component$$218$$, $inlineFrame$$78$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariEditingAgent.prototype.QueryRedoEnabled", {$QueryRedoEnabled$:$AdfSafariEditingAgent$$.prototype.$QueryRedoEnabled$});
