$AdfObject$$.$createSubclass$($AdfAutoSaveBehavior$$, $AdfClientBehavior$$);
function $AdfAutoSaveBehavior$$($idleTimeSubmit$$) {
  this.Init($idleTimeSubmit$$)
}
$goog$exportSymbol$$("AdfAutoSaveBehavior", $AdfAutoSaveBehavior$$);
$AdfAutoSaveBehavior$$.$InitClass$ = function $$AdfAutoSaveBehavior$$$$InitClass$$() {
  this.$_IDLE_TIME_SUBMIT$ = 3E5;
  this.$_MIN_IDLE_TIME_SUBMIT$ = 3E4
};
$goog$exportSymbol$$("AdfAutoSaveBehavior.InitClass", $AdfAutoSaveBehavior$$.$InitClass$);
$AdfAutoSaveBehavior$$.prototype.Init = function $$AdfAutoSaveBehavior$$$$Init$($idleTimeSubmit$$1$$) {
  $AdfAutoSaveBehavior$$.$superclass$.Init.call(this);
  $idleTimeSubmit$$1$$ = $idleTimeSubmit$$1$$ || $AdfAutoSaveBehavior$$.$_IDLE_TIME_SUBMIT$;
  this.$_idleTimeSubmit$ = Math.max($AdfAutoSaveBehavior$$.$_MIN_IDLE_TIME_SUBMIT$, $idleTimeSubmit$$1$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfAutoSaveBehavior.prototype.Init", {Init:$AdfAutoSaveBehavior$$.prototype.Init});
$AdfAutoSaveBehavior$$.prototype.$initialize$ = function $$AdfAutoSaveBehavior$$$$$initialize$$($component$$215$$) {
  $AdfAssert$$.assert($component$$215$$ instanceof AdfUIEditableValue, "Component must be an instance of AdfUIEditableValue");
  this.$_component$ = $component$$215$$;
  this.$_lastNonDirtySubmittedValue$ = this.$_idleSubmitHandler$ = $JSCompiler_alias_NULL$$;
  $component$$215$$.addEventListener($AdfPropertyChangeEvent$$.$PROPERTY_CHANGE_TYPE$, this.$_propertyChange$, this);
  !$component$$215$$.getReadOnly() && !$component$$215$$.getDisabled() && $JSCompiler_StaticMethods__setUp$$(this)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfAutoSaveBehavior.prototype.initialize", {$initialize$:$AdfAutoSaveBehavior$$.prototype.$initialize$});
function $JSCompiler_StaticMethods__setUp$$($JSCompiler_StaticMethods__setUp$self$$) {
  var $component$$216$$ = $JSCompiler_StaticMethods__setUp$self$$.$_component$;
  $component$$216$$.addEventListener($AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, $JSCompiler_StaticMethods__setUp$self$$.$_setUpIdleTimer$, $JSCompiler_StaticMethods__setUp$self$$);
  $component$$216$$.addEventListener($AdfUIInputEvent$$.$MOUSE_UP_EVENT_TYPE$, $JSCompiler_StaticMethods__setUp$self$$.$_setUpIdleTimer$, $JSCompiler_StaticMethods__setUp$self$$);
  $component$$216$$.addEventListener($AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$, $JSCompiler_StaticMethods__setUp$self$$.$_setUpComponentInitValue$, $JSCompiler_StaticMethods__setUp$self$$);
  $component$$216$$.addEventListener($AdfUIInputEvent$$.$MOUSE_DOWN_EVENT_TYPE$, $JSCompiler_StaticMethods__setUp$self$$.$_setUpComponentInitValue$, $JSCompiler_StaticMethods__setUp$self$$)
}
$AdfAutoSaveBehavior$$.prototype.$_propertyChange$ = function $$AdfAutoSaveBehavior$$$$$_propertyChange$$($component$$inline_481_propertyChange$$1$$) {
  var $propName$$24$$ = $component$$inline_481_propertyChange$$1$$.$getPropertyName$();
  if("disabled" == $propName$$24$$ || "readOnly" == $propName$$24$$) {
    $component$$inline_481_propertyChange$$1$$.$getNewValue$() ? ($component$$inline_481_propertyChange$$1$$ = this.$_component$, $JSCompiler_StaticMethods__resetIdleSubmitHandler$$(this), this.$_lastNonDirtySubmittedValue$ = $JSCompiler_alias_NULL$$, $component$$inline_481_propertyChange$$1$$.removeEventListener($AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, this.$_setUpIdleTimer$, this), $component$$inline_481_propertyChange$$1$$.removeEventListener($AdfUIInputEvent$$.$MOUSE_UP_EVENT_TYPE$, this.$_setUpIdleTimer$, 
    this)) : $JSCompiler_StaticMethods__setUp$$(this)
  }
};
$AdfAutoSaveBehavior$$.prototype.$_setUpComponentInitValue$ = function $$AdfAutoSaveBehavior$$$$$_setUpComponentInitValue$$() {
  this.$_lastNonDirtySubmittedValue$ == $JSCompiler_alias_NULL$$ && (this.$_lastNonDirtySubmittedValue$ = $JSCompiler_StaticMethods__getSubmittedValue$$(this), this.$_component$.removeEventListener($AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$, this.$_setUpComponentInitValue$, this), this.$_component$.removeEventListener($AdfUIInputEvent$$.$MOUSE_DOWN_EVENT_TYPE$, this.$_setUpComponentInitValue$, this))
};
$AdfAutoSaveBehavior$$.prototype.$_setUpIdleTimer$ = function $$AdfAutoSaveBehavior$$$$$_setUpIdleTimer$$() {
  $JSCompiler_StaticMethods__resetIdleSubmitHandler$$(this);
  var $self$$1$$ = this;
  this.$_idleSubmitHandler$ = setTimeout(function() {
    var $submittedValue$$inline_484$$ = $JSCompiler_StaticMethods__getSubmittedValue$$($self$$1$$);
    $self$$1$$.$_idleSubmitHandler$ = $JSCompiler_alias_NULL$$;
    $self$$1$$.$_lastNonDirtySubmittedValue$ != $submittedValue$$inline_484$$ && $AdfCustomEvent$$.$queue$($self$$1$$.$_component$, "_autoSave", {$dirtyValue$:$submittedValue$$inline_484$$}, $JSCompiler_alias_TRUE$$, $JSCompiler_alias_TRUE$$)
  }, this.$_idleTimeSubmit$)
};
function $JSCompiler_StaticMethods__resetIdleSubmitHandler$$($JSCompiler_StaticMethods__resetIdleSubmitHandler$self$$) {
  $JSCompiler_StaticMethods__resetIdleSubmitHandler$self$$.$_idleSubmitHandler$ && (clearTimeout($JSCompiler_StaticMethods__resetIdleSubmitHandler$self$$.$_idleSubmitHandler$), $JSCompiler_StaticMethods__resetIdleSubmitHandler$self$$.$_idleSubmitHandler$ = $JSCompiler_alias_NULL$$)
}
function $JSCompiler_StaticMethods__getSubmittedValue$$($JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$) {
  $JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$ = $JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$.$_component$;
  var $peer$$30$$ = $JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$.$getPeer$();
  return"oracle.adf.RichTextEditor" === $JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$.getComponentType() ? $peer$$30$$.$getCurrentContent$($JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$) : $peer$$30$$.$GetSubmittedValue$($JSCompiler_StaticMethods__getSubmittedValue$self_component$$218$$)
}
$AdfAutoSaveBehavior$$.$_getAutoSaveBehavior$ = function $$AdfAutoSaveBehavior$$$$_getAutoSaveBehavior$$($behaviors$$5_component$$219$$) {
  $behaviors$$5_component$$219$$ = $behaviors$$5_component$$219$$.$getBehaviors$();
  var $autoSaveBehavior$$ = $JSCompiler_alias_NULL$$;
  if($AdfCollections$$.isArray($behaviors$$5_component$$219$$)) {
    for(var $behaviorCount$$ = $behaviors$$5_component$$219$$.length, $i$$94$$ = 0;$i$$94$$ < $behaviorCount$$;$i$$94$$++) {
      if($behaviors$$5_component$$219$$[$i$$94$$] instanceof $AdfAutoSaveBehavior$$) {
        $autoSaveBehavior$$ = $behaviors$$5_component$$219$$[$i$$94$$];
        break
      }
    }
  }else {
    $behaviors$$5_component$$219$$ instanceof $AdfAutoSaveBehavior$$ && ($autoSaveBehavior$$ = $behaviors$$5_component$$219$$)
  }
  return $autoSaveBehavior$$
};
$AdfAutoSaveBehavior$$.$removeTimer$ = function $$AdfAutoSaveBehavior$$$$removeTimer$$($autoSaveBehavior$$1_component$$220_componentId$$7$$) {
  if($autoSaveBehavior$$1_component$$220_componentId$$7$$ = $AdfPage$$.$PAGE$.$findComponent$($autoSaveBehavior$$1_component$$220_componentId$$7$$)) {
    if($autoSaveBehavior$$1_component$$220_componentId$$7$$ = this.$_getAutoSaveBehavior$($autoSaveBehavior$$1_component$$220_componentId$$7$$)) {
      $JSCompiler_StaticMethods__resetIdleSubmitHandler$$($autoSaveBehavior$$1_component$$220_componentId$$7$$), $autoSaveBehavior$$1_component$$220_componentId$$7$$.$_lastNonDirtySubmittedValue$ = $JSCompiler_StaticMethods__getSubmittedValue$$($autoSaveBehavior$$1_component$$220_componentId$$7$$)
    }
  }
};
$goog$exportSymbol$$("AdfAutoSaveBehavior.removeTimer", $AdfAutoSaveBehavior$$.$removeTimer$);
