var $AdfLocators$$ = {};
$goog$exportSymbol$$("AdfLocators", $AdfLocators$$);
$AdfLocators$$.$findComponentByAbsoluteLocator$ = function $$AdfLocators$$$$findComponentByAbsoluteLocator$$($page$$227$$, $absoluteLocator$$7$$) {
  $AdfAssert$$.$assertNonEmptyString$($absoluteLocator$$7$$);
  var $colonIndex$$2_matchComponent$$1$$ = $page$$227$$.$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$$227$$, -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$$228$$, $absoluteLocator$$8$$) {
  for (window.$AdfDhtmlIteratorPeer$ && ($absoluteLocator$$8$$ = $AdfDhtmlIteratorPeer$$.$fixupIteratorAbsoluteLocator$($absoluteLocator$$8$$));$absoluteLocator$$8$$.length;) {
    var $colonIndex$$3_matchComponent$$2$$ = $page$$228$$.$findComponent$($absoluteLocator$$8$$);
    if ($colonIndex$$3_matchComponent$$2$$) {
      return $colonIndex$$3_matchComponent$$2$$;
    }
    var $colonIndex$$3_matchComponent$$2$$ = $absoluteLocator$$8$$.lastIndexOf(":"), $component$$2326_componentId$$55$$ = -1 == $colonIndex$$3_matchComponent$$2$$ ? $absoluteLocator$$8$$ : $absoluteLocator$$8$$.substring($colonIndex$$3_matchComponent$$2$$ + 1);
    if ($component$$2326_componentId$$55$$) {
      var $componentIdCharCount_leftBracketIndex$$ = $component$$2326_componentId$$55$$.length;
      "]" === $component$$2326_componentId$$55$$.charAt($componentIdCharCount_leftBracketIndex$$ - 1) && ($componentIdCharCount_leftBracketIndex$$ = $component$$2326_componentId$$55$$.lastIndexOf("[", $componentIdCharCount_leftBracketIndex$$ - 2), 0 <= $componentIdCharCount_leftBracketIndex$$ && ($component$$2326_componentId$$55$$ = $component$$2326_componentId$$55$$.substring(0, $componentIdCharCount_leftBracketIndex$$), $absoluteLocator$$8$$ = $absoluteLocator$$8$$.substring(0, $colonIndex$$3_matchComponent$$2$$ + 
      1 + $componentIdCharCount_leftBracketIndex$$)));
      if ($component$$2326_componentId$$55$$ && ($component$$2326_componentId$$55$$ = $AdfLocators$$.$_findComponentByAbsoluteLocator$($page$$228$$, $component$$2326_componentId$$55$$, $absoluteLocator$$8$$))) {
        return $component$$2326_componentId$$55$$;
      }
    }
    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 null;
};
$goog$exportSymbol$$("AdfLocators.findComponentOrAncestorByAbsoluteLocator", $AdfLocators$$.$findComponentOrAncestorByAbsoluteLocator$);
$AdfLocators$$.$findComponentByComplexLocator$ = function $$AdfLocators$$$$findComponentByComplexLocator$$($page$$229$$, $locator$$14$$) {
  var $component$$2327$$ = $page$$229$$.$findComponentByAbsoluteLocator$($locator$$14$$);
  if (!$component$$2327$$) {
    var $componentArray$$ = $AdfLocators$$.$_findComponentsByWildcardLocator$($locator$$14$$);
    1 == $componentArray$$.length && ($component$$2327$$ = $componentArray$$[0]);
  }
  return $component$$2327$$;
};
$goog$exportSymbol$$("AdfLocators.findComponentByComplexLocator", $AdfLocators$$.$findComponentByComplexLocator$);
$AdfLocators$$.$findComponentsByComplexLocator$ = function $$AdfLocators$$$$findComponentsByComplexLocator$$($page$$230$$, $locator$$15$$) {
  var $component$$2328$$ = $page$$230$$.$findComponentByAbsoluteLocator$($locator$$15$$), $componentArray$$1$$;
  $component$$2328$$ ? ($componentArray$$1$$ = [], $componentArray$$1$$.push($component$$2328$$)) : $componentArray$$1$$ = $AdfLocators$$.$_findComponentsByWildcardLocator$($locator$$15$$);
  return $componentArray$$1$$;
};
$goog$exportSymbol$$("AdfLocators.findComponentsByComplexLocator", $AdfLocators$$.$findComponentsByComplexLocator$);
$AdfLocators$$.$_findComponentByAbsoluteLocator$ = function $$AdfLocators$$$$_findComponentByAbsoluteLocator$$($ClIdToCompMap_page$$231$$, $componentId$$56$$, $absoluteLocator$$9$$) {
  var $idLength$$ = $componentId$$56$$.length;
  $ClIdToCompMap_page$$231$$ = $ClIdToCompMap_page$$231$$.$_clientIdToComponentMap$;
  for (var $currClientId$$8$$ in $ClIdToCompMap_page$$231$$) {
    if ($idLength$$ <= $currClientId$$8$$.length && $currClientId$$8$$.substring($currClientId$$8$$.length - $idLength$$) === $componentId$$56$$) {
      var $matchComponent$$3$$ = $ClIdToCompMap_page$$231$$[$currClientId$$8$$];
      if ($matchComponent$$3$$ && $matchComponent$$3$$.$getAbsoluteLocator$() === $absoluteLocator$$9$$) {
        return $matchComponent$$3$$;
      }
    }
  }
  return 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$$21$$, $nameMatchers$$2$$, $conditionMatchers$$2$$) {
  for (var $charCount$$2$$ = $locator$$19$$.length, $charIndex$$1$$ = $startIndex$$21$$;$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$$21$$, $charIndex$$1$$, $nameMatchers$$2$$), $isArrayExpression_isComplexExpression$$ = !$AdfLocators$$.$_isWildcardExpression$($arrayExpression_currChar$$), $charIndex$$1$$ += $arrayExpression_currChar$$.length + 1, $startIndex$$21$$ = 
        $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$$21$$, $charIndex$$1$$, $nameMatchers$$2$$);
    }
  }
  return $AdfLocators$$.$_addNameMatcher$($locator$$19$$, $startIndex$$21$$, $charIndex$$1$$, $nameMatchers$$2$$);
};
$AdfLocators$$.$_getBracketedExpression$ = function $$AdfLocators$$$$_getBracketedExpression$$($locator$$20$$, $startIndex$$22$$, $lBracket$$1$$, $rBracket$$) {
  for (var $charCount$$3$$ = $locator$$20$$.length, $lBracketCount$$ = 1, $inQuotes$$ = !1, $inSingleQuotes$$ = !1, $inDoubleQuotes$$ = !1, $escapeNextChar$$ = !1, $charIndex$$2$$ = $startIndex$$22$$;$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$$22$$, $charIndex$$2$$);
      }
    } else {
      $lBracket$$1$$ === $currChar$$1$$ ? $inQuotes$$ || $lBracketCount$$++ : "'" === $currChar$$1$$ ? $escapeNextChar$$ ? $escapeNextChar$$ = !1 : $inDoubleQuotes$$ || ($inQuotes$$ = $inSingleQuotes$$ = !$inSingleQuotes$$) : '"' === $currChar$$1$$ ? $escapeNextChar$$ ? $escapeNextChar$$ = !1 : $inSingleQuotes$$ || ($inQuotes$$ = $inDoubleQuotes$$ = !$inDoubleQuotes$$) : $inQuotes$$ && "\\" === $currChar$$1$$ && !$escapeNextChar$$ ? $escapeNextChar$$ = !0 : $escapeNextChar$$ && ($escapeNextChar$$ = 
      !1);
    }
  }
  throw Error("Missing '" + $rBracket$$ + "' in " + $locator$$20$$);
};
$AdfLocators$$.$_matchComponentByName$ = function $$AdfLocators$$$$_matchComponentByName$$($component$$2329_locator$$21$$) {
  $component$$2329_locator$$21$$ = $component$$2329_locator$$21$$.$getAbsoluteLocator$();
  var $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = 0, $inLocatorToSkipIndex_newSkipIndex$$ = this.input;
  $inLocatorToSkipIndex_newSkipIndex$$ && ($locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = $inLocatorToSkipIndex_newSkipIndex$$[$component$$2329_locator$$21$$]);
  var $matchChars_matchName$$ = this.name, $inLocatorToSkipIndex_newSkipIndex$$ = $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ + $matchChars_matchName$$.length;
  if ($matchChars_matchName$$ !== $component$$2329_locator$$21$$.substring($locatorCharCount_outLocatorToSkipIndex_skipIndex$$, $inLocatorToSkipIndex_newSkipIndex$$)) {
    return 0;
  }
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = $component$$2329_locator$$21$$.length;
  if (this.$wildcarded$) {
    for ($matchChars_matchName$$ = this.$arrayWildcarded$ ? "]" : ":[";$inLocatorToSkipIndex_newSkipIndex$$ < $locatorCharCount_outLocatorToSkipIndex_skipIndex$$;$inLocatorToSkipIndex_newSkipIndex$$++) {
      var $currChar$$2$$ = $component$$2329_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$;
  null == $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ && (this.$output$ = $locatorCharCount_outLocatorToSkipIndex_skipIndex$$ = {});
  $locatorCharCount_outLocatorToSkipIndex_skipIndex$$[$component$$2329_locator$$21$$] = $inLocatorToSkipIndex_newSkipIndex$$;
  return 1;
};
$AdfLocators$$.$_addNameMatcher$ = function $$AdfLocators$$$$_addNameMatcher$$($locator$$22$$, $startIndex$$23$$, $endIndex$$18$$, $matchers$$) {
  var $hasWildcard$$1$$ = !1, $hasArrayWildcard$$ = !1, $nextSearchIndex$$ = $endIndex$$18$$, $filterIdIndex$$ = $endIndex$$18$$;
  if ($endIndex$$18$$ < $locator$$22$$.length) {
    var $lastChar$$ = $locator$$22$$.charAt($endIndex$$18$$);
    if ("*" === $lastChar$$) {
      switch($hasWildcard$$1$$ = !0, $nextSearchIndex$$ = $endIndex$$18$$ + 1, $locator$$22$$.charAt($nextSearchIndex$$)) {
        case "":
        ;
        case ":":
        ;
        case "[":
        ;
        case "(":
          break;
        default:
          throw Error("Invalid character after wildcard in " + $locator$$22$$);;
      }
    } else {
      if ("[" === $lastChar$$ || "(" === $lastChar$$) {
        $hasArrayWildcard$$ = $hasWildcard$$1$$ = !0, $filterIdIndex$$++, "[" == $lastChar$$ && $endIndex$$18$$++;
      }
    }
  }
  $matchers$$.push({filter:$AdfLocators$$.$_matchComponentByName$, context:{$filterId$:$locator$$22$$.substring(0, $filterIdIndex$$), name:$locator$$22$$.substring($startIndex$$23$$, $endIndex$$18$$), $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$$2330$$) {
  try {
    return function anonymous$$21() {
      return this.$expression$;
    }.call($component$$2330$$);
  } catch ($e$$158$$) {
    $AdfLogger$$.$LOGGER$.severe("Error: " + $e$$158$$.message + "\nOriginal expression was: " + this.$expression$ + "\nCurrent component locator: " + $component$$2330$$.$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$$232$$ = $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$$232$$.$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$$233$$ = $AdfPage$$.$PAGE$, $currMatcher$$1_filterId$$ = $nameMatchers$$3$$[0], $oldContext$$ = $currMatcher$$1_filterId$$.context, $matchedComponents$$1$$ = $page$$233$$.$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$$233$$.$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$$);
};
