var $AdfSingleSelectInputSearchPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfDhtmlInputSearchPeer$$, "AdfSingleSelectInputSearchPeer", !1);
$goog$exportSymbol$$("AdfSingleSelectInputSearchPeer", $AdfSingleSelectInputSearchPeer$$);
$AdfSingleSelectInputSearchPeer$$.$InitSubclass$ = function $$AdfSingleSelectInputSearchPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$($AdfSingleSelectPanel$$);
  this.$_AUTOCOMPLETE_ANNOUNCE_MSG$ = "af_inputSearch.AUTOCOMPLETE_ANNOUNCE_MSG";
  this.$_MSG_AUTOCOMPLETE_FAILED$ = "af_inputSearch.MSG_AUTOCOMPLETE_FAILED";
  this.$_MSG_AUTCOMPLETE_FAILED_DETAIL$ = "af_inputSearch.MSG_AUTOCOMPLETE_FAILED_DETAIL";
};
$goog$exportSymbol$$("AdfSingleSelectInputSearchPeer.InitSubclass", $AdfSingleSelectInputSearchPeer$$.$InitSubclass$);
$AdfSingleSelectInputSearchPeer$$.prototype.$InitDomElement$ = function $$AdfSingleSelectInputSearchPeer$$$$$InitDomElement$$($component$$2366$$, $element$$396$$) {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$InitDomElement$.call(this, $component$$2366$$, $element$$396$$);
  this.$_suggestionsPanel$ = new $AdfSingleSelectPanel$$(this);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.InitDomElement", {$InitDomElement$:$AdfSingleSelectInputSearchPeer$$.prototype.$InitDomElement$});
$AdfSingleSelectInputSearchPeer$$.prototype.$delayedHandleAutoCompletingEvent$ = function $$AdfSingleSelectInputSearchPeer$$$$$delayedHandleAutoCompletingEvent$$($autoCompletedValue$$3_componentEvent$$521_page$$252$$) {
  var $component$$2367$$ = this.$getComponent$();
  $autoCompletedValue$$3_componentEvent$$521_page$$252$$.$isCanceled$() ? $component$$2367$$.$getProperty$($AdfDhtmlInputSearchPeer$$.$SELECTION_PROPERTY$) && $AdfDhtmlInputSearchPeer$$.$SetSelectionProp$($component$$2367$$, null) : ($autoCompletedValue$$3_componentEvent$$521_page$$252$$ = $autoCompletedValue$$3_componentEvent$$521_page$$252$$.$getAutoCompletedValue$()) ? (this.$__setComponentValue$($component$$2367$$, $autoCompletedValue$$3_componentEvent$$521_page$$252$$), $autoCompletedValue$$3_componentEvent$$521_page$$252$$ = 
  $AdfPage$$.$PAGE$, $autoCompletedValue$$3_componentEvent$$521_page$$252$$.$announceToAssistiveTechnology$($autoCompletedValue$$3_componentEvent$$521_page$$252$$.$getLookAndFeel$().$getTranslatedString$($AdfSingleSelectInputSearchPeer$$.$_AUTOCOMPLETE_ANNOUNCE_MSG$, $AdfDhtmlEditableValuePeer$$.$GetLabelText$($component$$2367$$), $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2367$$)))) : $AdfInputSearchUtils$showFacesMessage$$($component$$2367$$, $AdfFacesMessage$$.$TYPE_ERROR$, 
  $AdfSingleSelectInputSearchPeer$$.$_MSG_AUTOCOMPLETE_FAILED$, $AdfSingleSelectInputSearchPeer$$.$_MSG_AUTCOMPLETE_FAILED_DETAIL$);
  this.$GetSuggestionsPanel$().clear();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.delayedHandleAutoCompletingEvent", {$delayedHandleAutoCompletingEvent$:$AdfSingleSelectInputSearchPeer$$.prototype.$delayedHandleAutoCompletingEvent$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RunValidation$ = function $$AdfSingleSelectInputSearchPeer$$$$$RunValidation$$($component$$2368$$, $targetNode$$57$$, $isChangeRequired$$4$$) {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$RunValidation$.call(this, $component$$2368$$, $targetNode$$57$$, $isChangeRequired$$4$$);
  this.$HideSuggestionPopup$($component$$2368$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RunValidation", {$RunValidation$:$AdfSingleSelectInputSearchPeer$$.prototype.$RunValidation$});
$AdfSingleSelectInputSearchPeer$$.prototype.$Validate$ = function $$AdfSingleSelectInputSearchPeer$$$$$Validate$$($component$$2369$$, $submittedValue$$33$$) {
  if ($submittedValue$$33$$) {
    if ("string" === typeof $submittedValue$$33$$) {
      var $autoCompletedValue$$4_displayedSuggestions$$inline_5105$$;
      $autoCompletedValue$$4_displayedSuggestions$$inline_5105$$ = ($autoCompletedValue$$4_displayedSuggestions$$inline_5105$$ = this.$GetSuggestionsPanel$().$getDisplayedSuggestions$()) && 1 == $autoCompletedValue$$4_displayedSuggestions$$inline_5105$$.length ? $autoCompletedValue$$4_displayedSuggestions$$inline_5105$$.$at$(0).key : void 0;
      $AdfAutoCompletingEvent$$.$queue$($component$$2369$$, $submittedValue$$33$$, $autoCompletedValue$$4_displayedSuggestions$$inline_5105$$);
      this.$_underAutocompletion$ = !0;
    } else {
      $AdfAssert$$.$assertArray$($submittedValue$$33$$), $AdfSingleSelectInputSearchPeer$$.$superclass$.$Validate$.call(this, $component$$2369$$, $submittedValue$$33$$);
    }
  } else {
    this.$__setComponentValue$($component$$2369$$, null);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.Validate", {$Validate$:$AdfSingleSelectInputSearchPeer$$.prototype.$Validate$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetDisplayValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetDisplayValue$$($component$$2370$$, $domElement$$620$$) {
  var $displayValues$$1$$ = [], $contentNodeValue$$5$$ = $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2370$$, $domElement$$620$$).trim();
  $contentNodeValue$$5$$ && $displayValues$$1$$.push($contentNodeValue$$5$$);
  return $displayValues$$1$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetDisplayValue", {$GetDisplayValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetDisplayValue$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ClearTemporaryStorage$ = function $$AdfSingleSelectInputSearchPeer$$$$$ClearTemporaryStorage$$() {
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$ClearTemporaryStorage$.call(this);
  this.$_underAutocompletion$ = null;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ClearTemporaryStorage", {$ClearTemporaryStorage$:$AdfSingleSelectInputSearchPeer$$.prototype.$ClearTemporaryStorage$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetCombinedDisplayValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetCombinedDisplayValue$$($newValues$$19$$) {
  return 0 < $newValues$$19$$.length ? $newValues$$19$$[0] : "";
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetCombinedDisplayValue", {$GetCombinedDisplayValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetCombinedDisplayValue$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetRealNewValues$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetRealNewValues$$($newValues$$20$$, $oldValues$$12$$) {
  return ($newValues$$20$$.length ? $newValues$$20$$[0] : null) == ($oldValues$$12$$.length ? $oldValues$$12$$[0] : null) ? $AdfCollections$$.$EMPTY_ARRAY$ : $newValues$$20$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetRealNewValues", {$GetRealNewValues$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetRealNewValues$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionMapContainingSelections$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetSuggestionMapContainingSelections$$() {
  var $suggestions$$28$$ = this.$GetSuggestionsPanel$().$getDisplayedSuggestions$();
  $suggestions$$28$$ || ($suggestions$$28$$ = this.$GetCachedServerSuggestionsList$());
  return $suggestions$$28$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetSuggestionMapContainingSelections", {$GetSuggestionMapContainingSelections$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionMapContainingSelections$});
$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionsPanel$ = function $$AdfSingleSelectInputSearchPeer$$$$$GetSuggestionsPanel$$() {
  return this.$_suggestionsPanel$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.GetSuggestionsPanel", {$GetSuggestionsPanel$:$AdfSingleSelectInputSearchPeer$$.prototype.$GetSuggestionsPanel$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ShowSelectionsPopup$ = function $$AdfSingleSelectInputSearchPeer$$$$$ShowSelectionsPopup$$() {
  $AdfAssert$$.assert(!1, "not expected to be invoked on single select inputSearch");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ShowSelectionsPopup", {$ShowSelectionsPopup$:$AdfSingleSelectInputSearchPeer$$.prototype.$ShowSelectionsPopup$});
$AdfSingleSelectInputSearchPeer$$.prototype.$IsUnderAutocompletion$ = function $$AdfSingleSelectInputSearchPeer$$$$$IsUnderAutocompletion$$() {
  return this.$_underAutocompletion$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.IsUnderAutocompletion", {$IsUnderAutocompletion$:$AdfSingleSelectInputSearchPeer$$.prototype.$IsUnderAutocompletion$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RestoreSelectionOnEscape$ = function $$AdfSingleSelectInputSearchPeer$$$$$RestoreSelectionOnEscape$$($component$$2372$$, $domElement$$621$$, $componentValue$$1_contentNode$$114$$) {
  var $lastValue$$11_value$$278$$ = $AdfDhtmlInputBasePeer$$.$getLastValue$($componentValue$$1_contentNode$$114$$);
  if ("" === $lastValue$$11_value$$278$$ && ($componentValue$$1_contentNode$$114$$ = $AdfDhtmlInputSearchPeer$$.$GetValue$($component$$2372$$), 0 !== $componentValue$$1_contentNode$$114$$.length)) {
    $lastValue$$11_value$$278$$ = $componentValue$$1_contentNode$$114$$[0];
    this.$GetSuggestionMapContainingSelections$().get($lastValue$$11_value$$278$$) && this.$DeriveAndSetDisplayValue$($component$$2372$$, $domElement$$621$$, $componentValue$$1_contentNode$$114$$);
    return;
  }
  this.$SetDisplayValue$($component$$2372$$, $domElement$$621$$, [$lastValue$$11_value$$278$$]);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RestoreSelectionOnEscape", {$RestoreSelectionOnEscape$:$AdfSingleSelectInputSearchPeer$$.prototype.$RestoreSelectionOnEscape$});
$AdfSingleSelectInputSearchPeer$$.prototype.$SetDisplayValueOnPrefetch$ = function $$AdfSingleSelectInputSearchPeer$$$$$SetDisplayValueOnPrefetch$$($component$$2373$$, $suggestions$$29$$, $isMasterList$$6$$) {
  this.$CacheServerSuggestionsList$($suggestions$$29$$, "", $isMasterList$$6$$);
  $AdfSingleSelectInputSearchPeer$$.$superclass$.$SetDisplayValueOnPrefetch$.call(this, $component$$2373$$, $suggestions$$29$$, $isMasterList$$6$$);
  this.$IsSuggestionPopupVisible$($component$$2373$$) || this.$CacheServerSuggestionsList$(null);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.SetDisplayValueOnPrefetch", {$SetDisplayValueOnPrefetch$:$AdfSingleSelectInputSearchPeer$$.prototype.$SetDisplayValueOnPrefetch$});
$AdfSingleSelectInputSearchPeer$$.prototype.$RenderSelections$ = function $$AdfSingleSelectInputSearchPeer$$$$$RenderSelections$$() {
  $AdfAssert$$.assert(!1, "not expected to be invoked on single select inputSearch");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.RenderSelections", {$RenderSelections$:$AdfSingleSelectInputSearchPeer$$.prototype.$RenderSelections$});
$AdfSingleSelectInputSearchPeer$$.prototype.$ToggleDisplayValueToFiltering$ = function $$AdfSingleSelectInputSearchPeer$$$$$ToggleDisplayValueToFiltering$$() {
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.ToggleDisplayValueToFiltering", {$ToggleDisplayValueToFiltering$:$AdfSingleSelectInputSearchPeer$$.prototype.$ToggleDisplayValueToFiltering$});
$AdfSingleSelectInputSearchPeer$$.prototype.$UpdateDisplayValueAndSelection$ = function $$AdfSingleSelectInputSearchPeer$$$$$UpdateDisplayValueAndSelection$$($component$$2375$$, $domElement$$622$$, $values$$25$$, $freshSuggestions$$2$$, $isMasterList$$7$$) {
  $freshSuggestions$$2$$.get($values$$25$$[0]) && (this.$CacheServerSuggestionsList$($freshSuggestions$$2$$, "", $isMasterList$$7$$), $AdfSingleSelectInputSearchPeer$$.$superclass$.$UpdateDisplayValueAndSelection$.call(this, $component$$2375$$, $domElement$$622$$, $values$$25$$, $freshSuggestions$$2$$, $isMasterList$$7$$), this.$CacheServerSuggestionsList$(null));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.UpdateDisplayValueAndSelection", {$UpdateDisplayValueAndSelection$:$AdfSingleSelectInputSearchPeer$$.prototype.$UpdateDisplayValueAndSelection$});
$AdfSingleSelectInputSearchPeer$$.prototype.$__setComponentValue$ = function $$AdfSingleSelectInputSearchPeer$$$$$__setComponentValue$$($component$$2376$$, $newValue$$191$$) {
  var $oldValues$$13$$ = $AdfDhtmlInputSearchPeer$$.$GetValue$($component$$2376$$), $newValues$$22$$ = null === $newValue$$191$$ ? [] : [$newValue$$191$$];
  ($oldValues$$13$$.length ? $oldValues$$13$$[0] : null) != $newValue$$191$$ ? $AdfSingleSelectInputSearchPeer$$.$superclass$.$Validate$.call(this, $component$$2376$$, $newValues$$22$$) : (this.$DeriveAndSetDisplayValue$($component$$2376$$, this.$getDomElement$(), $newValues$$22$$), $AdfPage$$.$PAGE$.$clearMessages$($component$$2376$$.$getClientId$()));
  this.$HideSuggestionPopup$($component$$2376$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSingleSelectInputSearchPeer.prototype.__setComponentValue", {$__setComponentValue$:$AdfSingleSelectInputSearchPeer$$.prototype.$__setComponentValue$});
$AdfSingleSelectInputSearchPeer$$.$_isDisplayValueUpdatePossible$ = function $$AdfSingleSelectInputSearchPeer$$$$_isDisplayValueUpdatePossible$$($component$$2378$$, $domElement$$623$$, $suggestionMap$$12$$, $values$$26$$) {
  return "" == $AdfDhtmlEditableValuePeer$$.$getContentNodeText$($component$$2378$$, $domElement$$623$$) ? !0 : !!$suggestionMap$$12$$.get($values$$26$$[0]);
};
