var $AdfLocators$$ = {};
$goog$exportSymbol$$("AdfLocators", $AdfLocators$$);
$AdfLocators$$.$findComponentByAbsoluteLocator$ = function $$AdfLocators$$$$findComponentByAbsoluteLocator$$($page$$198$$, $absoluteLocator$$7$$) {
  $AdfAssert$$.$assertNonEmptyString$($absoluteLocator$$7$$);
  var $colonIndex$$2_matchComponent$$1$$ = $page$$198$$.$findComponent$($absoluteLocator$$7$$);
  if($colonIndex$$2_matchComponent$$1$$) {
    return $colonIndex$$2_matchComponent$$1$$
  }
  window.$AdfDhtmlIteratorPeer$ && ($absoluteLocator$$7$$ = $AdfDhtmlIteratorPeer$$.$fixupIteratorAbsoluteLocator$($absoluteLocator$$7$$));
  $colonIndex$$2_matchComponent$$1$$ = $absoluteLocator$$7$$.lastIndexOf(":");
  return $AdfLocators$$.$_findComponentByAbsoluteLocator$($page$$198$$, -1 == $colonIndex$$2_matchComponent$$1$$ ? $absoluteLocator$$7$$ : $absoluteLocator$$7$$.substring($colonIndex$$2_matchComponent$$1$$ + 1), $absoluteLocator$$7$$)
};
$goog$exportSymbol$$("AdfLocators.findComponentByAbsoluteLocator", $AdfLocators$$.$findComponentByAbsoluteLocator$);
$AdfLocators$$.$findComponentOrAncestorByAbsoluteLocator$ = function $$AdfLocators$$$$findComponentOrAncestorByAbsoluteLocator$$($page$$199$$, $absoluteLocator$$8$$) {
  for(window.$AdfDhtmlIteratorPeer$ && ($absoluteLocator$$8$$ = $AdfDhtmlIteratorPeer$$.$fixupIteratorAbsoluteLocator$($absoluteLocator$$8$$));$absoluteLocator$$8$$.length;) {
    var $colonIndex$$3_matchComponent$$2$$ = $page$$199$$.$findComponent$($absoluteLocator$$8$$);
    if($colonIndex$$3_matchComponent$$2$$) {
      return $colonIndex$$3_matchComponent$$2$$
    }
    var $colonIndex$$3_matchComponent$$2$$ = $absoluteLocator$$8$$.lastIndexOf(":"), $component$$1761_componentId$$52$$ = -1 == $colonIndex$$3_matchComponent$$2$$ ? $absoluteLocator$$8$$ : $absoluteLocator$$8$$.substring($colonIndex$$3_matchComponent$$2$$ + 1);
    if($component$$1761_componentId$$52$$) {
      var $componentIdCharCount_leftBracketIndex$$ = $component$$1761_componentId$$52$$.length;
      "]" === $component$$1761_componentId$$52$$.charAt($componentIdCharCount_leftBracketIndex$$ - 1) && ($componentIdCharCount_leftBracketIndex$$ = $component$$1761_componentId$$52$$.lastIndexOf("[", $componentIdCharCount_leftBracketIndex$$ - 2), 0 <= $componentIdCharCount_leftBracketIndex$$ && ($component$$1761_componentId$$52$$ = $component$$1761_componentId$$52$$.substring(0, $componentIdCharCount_leftBracketIndex$$), $absoluteLocator$$8$$ = $absoluteLocator$$8$$.substring(0, $colonIndex$$3_matchComponent$$2$$ + 
      1 + $componentIdCharCount_leftBracketIndex$$)));
      if($component$$1761_componentId$$52$$ && ($component$$1761_componentId$$52$$ = $AdfLocators$$.$_findComponentByAbsoluteLocator$($page$$199$$, $component$$1761_componentId$$52$$, $absoluteLocator$$8$$))) {
        return $component$$1761_componentId$$52$$
      }
    }
    if(1 > $colonIndex$$3_matchComponent$$2$$) {
      break
    }
    ":" === $absoluteLocator$$8$$.charAt($colonIndex$$3_matchComponent$$2$$ - 1) && $colonIndex$$3_matchComponent$$2$$--;
    $absoluteLocator$$8$$ = $absoluteLocator$$8$$.substring(0, $colonIndex$$3_matchComponent$$2$$)
  }
  return $JSCompiler_alias_NULL$$
};
$goog$exportSymbol$$("AdfLocators.findComponentOrAncestorByAbsoluteLocator", $AdfLocators$$.$findComponentOrAncestorByAbsoluteLocator$);
$AdfLocators$$.$findComponentByComplexLocator$ = function $$AdfLocators$$$$findComponentByComplexLocator$$($page$$200$$, $locator$$14$$) {
  var $component$$1762$$ = $page$$200$$.$findComponentByAbsoluteLocator$($locator$$14$$);
  if(!$component$$1762$$) {
    var $componentArray$$ = $AdfLocators$$.$_findComponentsByWildcardLocator$($locator$$14$$);
    1 == $componentArray$$.length && ($component$$1762$$ = $componentArray$$[0])
  }
  return $component$$1762$$
};
$goog$exportSymbol$$("AdfLocators.findComponentByComplexLocator", $AdfLocators$$.$findComponentByComplexLocator$);
$AdfLocators$$.$findComponentsByComplexLocator$ = function $$AdfLocators$$$$findComponentsByComplexLocator$$($page$$201$$, $locator$$15$$) {
  var $component$$1763$$ = $page$$201$$.$findComponentByAbsoluteLocator$($locator$$15$$), $componentArray$$1$$;
  $component$$1763$$ ? ($componentArray$$1$$ = [], $componentArray$$1$$.push($component$$1763$$)) : $componentArray$$1$$ = $AdfLocators$$.$_findComponentsByWildcardLocator$($locator$$15$$);
  return $componentArray$$1$$
};
$goog$exportSymbol$$("AdfLocators.findComponentsByComplexLocator", $AdfLocators$$.$findComponentsByComplexLocator$);
$AdfLocators$$.$_findComponentByAbsoluteLocator$ = function $$AdfLocators$$$$_findComponentByAbsoluteLocator$$($ClIdToCompMap_page$$202$$, $componentId$$53$$, $absoluteLocator$$9$$) {
  var $idLength$$ = $componentId$$53$$.length;
  $ClIdToCompMap_page$$202$$ = $ClIdToCompMap_page$$202$$.$_clientIdToComponentMap$;
  for(var $currClientId$$8$$ in $ClIdToCompMap_page$$202$$) {
    if($idLength$$ <= $currClientId$$8$$.length && $currClientId$$8$$.substring($currClientId$$8$$.length - $idLength$$) === $componentId$$53$$) {
      var $matchComponent$$3$$ = $ClIdToCompMap_page$$202$$[$currClientId$$8$$];
      if($matchComponent$$3$$ && $matchComponent$$3$$.$getAbsoluteLocator$() === $absoluteLocator$$9$$) {
        return $matchComponent$$3$$
      }
    }
  }
  return $JSCompiler_alias_NULL$$
};
$AdfLocators$$.$_findComponentsByWildcardLocator$ = function $$AdfLocators$$$$_findComponentsByWildcardLocator$$($locator$$16$$) {
  var $hasWildcard$$ = 0 <= $locator$$16$$.indexOf("*");
  $hasWildcard$$ || ($hasWildcard$$ = 0 <= $locator$$16$$.indexOf("(")) || ($hasWildcard$$ = !/\[\d+\]/.test($locator$$16$$));
  return $hasWildcard$$ ? $AdfLocators$$.$_findComponentsByParsedWildcardLocator$($locator$$16$$) : []
};
$AdfLocators$$.$_findComponentsByParsedWildcardLocator$ = function $$AdfLocators$$$$_findComponentsByParsedWildcardLocator$$($locator$$17$$) {
  var $nameMatchers$$ = [], $conditionMatchers$$ = [];
  $AdfLocators$$.$_buildMatchers$($locator$$17$$, $nameMatchers$$, $conditionMatchers$$);
  return $AdfLocators$$.$_executeMatchers$($nameMatchers$$, $conditionMatchers$$)
};
$AdfLocators$$.$_buildMatchers$ = function $$AdfLocators$$$$_buildMatchers$$($locator$$18$$, $nameMatchers$$1$$, $conditionMatchers$$1$$) {
  var $charCount$$1$$ = $locator$$18$$.length, $charIndex$$ = 0;
  do {
    $charIndex$$ = $AdfLocators$$.$_parseLocator$($locator$$18$$, $charIndex$$, $nameMatchers$$1$$, $conditionMatchers$$1$$)
  }while($charIndex$$ < $charCount$$1$$)
};
$AdfLocators$$.$_parseLocator$ = function $$AdfLocators$$$$_parseLocator$$($locator$$19$$, $startIndex$$13$$, $nameMatchers$$2$$, $conditionMatchers$$2$$) {
  for(var $charCount$$2$$ = $locator$$19$$.length, $charIndex$$1$$ = $startIndex$$13$$;$charIndex$$1$$ < $charCount$$2$$;$charIndex$$1$$++) {
    var $arrayExpression_currChar$$ = $locator$$19$$.charAt($charIndex$$1$$);
    switch($arrayExpression_currChar$$) {
      case "[":
      ;
      case "(":
        var $isArrayExpression_isComplexExpression$$ = "[" == $arrayExpression_currChar$$, $arrayExpression_currChar$$ = $AdfLocators$$.$_getBracketedExpression$($locator$$19$$, $charIndex$$1$$ + 1, $arrayExpression_currChar$$, $isArrayExpression_isComplexExpression$$ ? "]" : ")");
        $isArrayExpression_isComplexExpression$$ && $AdfLocators$$.$_isIndex$($arrayExpression_currChar$$) ? $charIndex$$1$$ += $arrayExpression_currChar$$.length + 1 : ($isArrayExpression_isComplexExpression$$ && $AdfLocators$$.$_addNameMatcher$($locator$$19$$, $startIndex$$13$$, $charIndex$$1$$, $nameMatchers$$2$$), $isArrayExpression_isComplexExpression$$ = !$AdfLocators$$.$_isWildcardExpression$($arrayExpression_currChar$$), $charIndex$$1$$ += $arrayExpression_currChar$$.length + 1, $startIndex$$13$$ = 
        $charIndex$$1$$ + 1, $isArrayExpression_isComplexExpression$$ && $AdfLocators$$.$_parseExpression$($arrayExpression_currChar$$, $nameMatchers$$2$$[$nameMatchers$$2$$.length - 1].$context$.$filterId$, $conditionMatchers$$2$$));
        break;
      case "*":
        return $AdfLocators$$.$_addNameMatcher$($locator$$19$$, $startIndex$$13$$, $charIndex$$1$$, $nameMatchers$$2$$)
    }
  }
  return $AdfLocators$$.$_addNameMatcher$($locator$$19$$, $startIndex$$13$$, $charIndex$$1$$, $nameMatchers$$2$$)
};
$AdfLocators$$.$_getBracketedExpression$ = function $$AdfLocators$$$$_getBracketedExpression$$($locator$$20$$, $startIndex$$14$$, $lBracket$$1$$, $rBracket$$) {
  for(var $charCount$$3$$ = $locator$$20$$.length, $lBracketCount$$ = 1, $inQuotes$$ = $JSCompiler_alias_FALSE$$, $inSingleQuotes$$ = $JSCompiler_alias_FALSE$$, $inDoubleQuotes$$ = $JSCompiler_alias_FALSE$$, $escapeNextChar$$ = $JSCompiler_alias_FALSE$$, $charIndex$$2$$ = $startIndex$$14$$;$charIndex$$2$$ < $charCount$$3$$;$charIndex$$2$$++) {
    var $currChar$$1$$ = $locator$$20$$.charAt($charIndex$$2$$);
    if($rBracket$$ === $currChar$$1$$) {
      if(!$inQuotes$$ && ($lBracketCount$$--, !$lBracketCount$$)) {
        return $locator$$20$$.substring($startIndex$$14$$, $charIndex$$2$$)
      }
    }else {
      $lBracket$$1$$ === $currChar$$1$$ ? $inQuotes$$ || $lBracketCount$$++ : "'" === $currChar$$1$$ ? $escapeNextChar$$ ? $escapeNextChar$$ = $JSCompiler_alias_FALSE$$ : $inDoubleQuotes$$ || ($inQuotes$$ = $inSingleQuotes$$ = !$inSingleQuotes$$) : '"' === $currChar$$1$$ ? $escapeNextChar$$ ? $escapeNextChar$$ = $JSCompiler_alias_FALSE$$ : $inSingleQuotes$$ || ($inQuotes$$ = $inDoubleQuotes$$ = !$inDoubleQuotes$$) : $inQuotes$$ && "\\" === $currChar$$1$$ && !$escapeNextChar$$ ? $escapeNextChar$$ = 
      $JSCompiler_alias_TRUE$$ : $escapeNextChar$$ && ($escapeNextChar$$ = $JSCompiler_alias_FALSE$$)
    }
  }
  $JSCompiler_alias_THROW$$(Error("Missing '" + $rBracket$$ + "' in " + $locator$$20$$))
};
$AdfLocators$$.$_matchComponentByName$ = function $$AdfLocators$$$$_matchComponentByName$$($component$$1764_locator$$21$$) {
  $component$$1764_locator$$21$$ = $component$$1764_locator$$21$$.$getAbsoluteLocator$();
  var $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = 0, $inLocatorToSkipIndex_newSkipIndex$$ = this.input;
  $inLocatorToSkipIndex_newSkipIndex$$ && ($locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = $inLocatorToSkipIndex_newSkipIndex$$[$component$$1764_locator$$21$$]);
  var $matchChars_matchName$$ = this.name, $inLocatorToSkipIndex_newSkipIndex$$ = $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ + $matchChars_matchName$$.length;
  if($matchChars_matchName$$ !== $component$$1764_locator$$21$$.substring($locatorCharCount_outLocatorToSkipIndex_skipIndex$$, $inLocatorToSkipIndex_newSkipIndex$$)) {
    return 0
  }
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = $component$$1764_locator$$21$$.length;
  if(this.$wildcarded$) {
    for($matchChars_matchName$$ = this.$arrayWildcarded$ ? "]" : ":[";$inLocatorToSkipIndex_newSkipIndex$$ < $locatorCharCount_outLocatorToSkipIndex_skipIndex$$;$inLocatorToSkipIndex_newSkipIndex$$++) {
      var $currChar$$2$$ = $component$$1764_locator$$21$$.charAt($inLocatorToSkipIndex_newSkipIndex$$);
      if(0 <= $matchChars_matchName$$.indexOf($currChar$$2$$)) {
        "]" == $currChar$$2$$ && $inLocatorToSkipIndex_newSkipIndex$$++;
        break
      }
    }
  }else {
    if($inLocatorToSkipIndex_newSkipIndex$$ != $locatorCharCount_outLocatorToSkipIndex_skipIndex$$) {
      return 0
    }
  }
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = this.$output$;
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ == $JSCompiler_alias_NULL$$ && (this.$output$ = $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = {});
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$[$component$$1764_locator$$21$$] = $inLocatorToSkipIndex_newSkipIndex$$;
  return 1
};
$AdfLocators$$.$_addNameMatcher$ = function $$AdfLocators$$$$_addNameMatcher$$($locator$$22$$, $startIndex$$15$$, $endIndex$$14$$, $matchers$$) {
  var $hasWildcard$$1$$ = $JSCompiler_alias_FALSE$$, $hasArrayWildcard$$ = $JSCompiler_alias_FALSE$$, $nextSearchIndex$$ = $endIndex$$14$$, $filterIdIndex$$ = $endIndex$$14$$;
  if($endIndex$$14$$ < $locator$$22$$.length) {
    var $lastChar$$ = $locator$$22$$.charAt($endIndex$$14$$);
    if("*" === $lastChar$$) {
      switch($hasWildcard$$1$$ = $JSCompiler_alias_TRUE$$, $nextSearchIndex$$ = $endIndex$$14$$ + 1, $locator$$22$$.charAt($nextSearchIndex$$)) {
        case "":
        ;
        case ":":
        ;
        case "[":
        ;
        case "(":
          break;
        default:
          $JSCompiler_alias_THROW$$(Error("Invalid character after wildcard in " + $locator$$22$$))
      }
    }else {
      if("[" === $lastChar$$ || "(" === $lastChar$$) {
        $hasArrayWildcard$$ = $hasWildcard$$1$$ = $JSCompiler_alias_TRUE$$, $filterIdIndex$$++, "[" == $lastChar$$ && $endIndex$$14$$++
      }
    }
  }
  $matchers$$.push({filter:$AdfLocators$$.$_matchComponentByName$, $context$:{$filterId$:$locator$$22$$.substring(0, $filterIdIndex$$), name:$locator$$22$$.substring($startIndex$$15$$, $endIndex$$14$$), $wildcarded$:$hasWildcard$$1$$, $arrayWildcarded$:$hasArrayWildcard$$}});
  return $nextSearchIndex$$
};
$AdfLocators$$.$_parseExpression$ = function $$AdfLocators$$$$_parseExpression$$($arrayExpression$$1$$, $nameMatcherId$$, $conditionMatchers$$3$$) {
  conditionMatcherContext = {$matcherId$:$nameMatcherId$$, $expression$:$arrayExpression$$1$$};
  $conditionMatchers$$3$$.push({filter:$AdfLocators$$.$_matchByExpression$, $context$:conditionMatcherContext})
};
$AdfLocators$$.$_matchByExpression$ = function $$AdfLocators$$$$_matchByExpression$$($component$$1765$$) {
  var $func$$17$$ = new Function("return " + this.$expression$);
  try {
    return $func$$17$$.call($component$$1765$$)
  }catch($e$$151$$) {
    $AdfLogger$$.$LOGGER$.severe("Error: " + $e$$151$$.message + "\nOriginal expression was: " + this.$expression$ + "\nCurrent component locator: " + $component$$1765$$.$getAbsoluteLocator$())
  }
};
$AdfLocators$$.$_isIndex$ = function $$AdfLocators$$$$_isIndex$$($arrayExpression$$2$$) {
  return!/\s*\D+\s*/.test($arrayExpression$$2$$)
};
$AdfLocators$$.$_isWildcardExpression$ = function $$AdfLocators$$$$_isWildcardExpression$$($arrayExpression$$3$$) {
  return!/\s*[^\*]\s*/.test($arrayExpression$$3$$)
};
$AdfLocators$$.$_executeConditionMatchers$ = function $$AdfLocators$$$$_executeConditionMatchers$$($conditionMatchers$$4$$, $filterOutput$$, $matchedComponents$$) {
  for(var $page$$203$$ = $AdfPage$$.$PAGE$, $matcherCount$$ = $conditionMatchers$$4$$.length, $matcherIndex$$ = 0;$matchedComponents$$.length && $matcherIndex$$ < $matcherCount$$;$matcherIndex$$++) {
    var $currMatcher$$ = $conditionMatchers$$4$$[$matcherIndex$$], $currContext$$ = $currMatcher$$.$context$;
    $currContext$$.$filterOutput$ = $filterOutput$$;
    $matchedComponents$$ = $page$$203$$.$reduceMatchedComponents$($matchedComponents$$, $currMatcher$$.filter, $currContext$$)
  }
  return $matchedComponents$$
};
$AdfLocators$$.$_executeNameMatchers$ = function $$AdfLocators$$$$_executeNameMatchers$$($nameMatchers$$3$$, $filterOutput$$1$$) {
  var $matchCount$$1$$ = $nameMatchers$$3$$.length;
  if(!$matchCount$$1$$) {
    return[]
  }
  for(var $page$$204$$ = $AdfPage$$.$PAGE$, $currMatcher$$1_filterId$$ = $nameMatchers$$3$$[0], $oldContext$$ = $currMatcher$$1_filterId$$.$context$, $matchedComponents$$1$$ = $page$$204$$.$matchComponents$($currMatcher$$1_filterId$$.filter, $oldContext$$), $matcherIndex$$1$$ = 1;0 < $matchedComponents$$1$$.length && $matcherIndex$$1$$ < $matchCount$$1$$;) {
    if($currMatcher$$1_filterId$$ = $oldContext$$.$filterId$) {
      $filterOutput$$1$$[$currMatcher$$1_filterId$$] = $oldContext$$.$output$
    }
    var $currMatcher$$1_filterId$$ = $nameMatchers$$3$$[$matcherIndex$$1$$], $currContext$$1$$ = $currMatcher$$1_filterId$$.$context$;
    $currContext$$1$$.input = $oldContext$$.$output$;
    $matchedComponents$$1$$ = $page$$204$$.$reduceMatchedComponents$($matchedComponents$$1$$, $currMatcher$$1_filterId$$.filter, $currContext$$1$$);
    $oldContext$$ = $currContext$$1$$;
    $matcherIndex$$1$$++
  }
  return $matchedComponents$$1$$
};
$AdfLocators$$.$_executeMatchers$ = function $$AdfLocators$$$$_executeMatchers$$($nameMatchers$$4$$, $conditionMatchers$$5$$) {
  var $filterOutput$$2$$ = {}, $matchedComponents$$2$$ = $AdfLocators$$.$_executeNameMatchers$($nameMatchers$$4$$, $filterOutput$$2$$);
  return 0 == $matchedComponents$$2$$.length ? [] : $AdfLocators$$.$_executeConditionMatchers$($conditionMatchers$$5$$, $filterOutput$$2$$, $matchedComponents$$2$$)
};
