function $AdfDhtmlChooseDateTimeZoneUtils$$() {
}
$goog$exportSymbol$$("AdfDhtmlChooseDateTimeZoneUtils", $AdfDhtmlChooseDateTimeZoneUtils$$);
$AdfDhtmlChooseDateTimeZoneUtils$$.$getTimeZones$ = function $$AdfDhtmlChooseDateTimeZoneUtils$$$$getTimeZones$$($timeZones$$, $addTimeZone$$1$$) {
  if ($timeZones$$) {
    for (var $addTimeZoneValue_i$$172$$ = "", $addTimeZoneOffset$$ = -1, $addTimeZoneObject$$ = {}, $added$$2$$ = !1, $allTimeZones$$ = $AdfRichTimeZoneTranslations$$.$getTimeZoneTranslations$(), $allTimeZonesKeys$$ = [], $addTimeZoneValue_i$$172$$ = 0;$addTimeZoneValue_i$$172$$ < $allTimeZones$$.length;$addTimeZoneValue_i$$172$$++) {
      $allTimeZonesKeys$$[$addTimeZoneValue_i$$172$$] = $AdfDhtmlChooseDateDOMUtils$$.$getKeys$($allTimeZones$$[$addTimeZoneValue_i$$172$$])[0];
    }
    $addTimeZone$$1$$ && (-1 != $timeZones$$.indexOf($addTimeZone$$1$$) ? $added$$2$$ = !0 : ($addTimeZoneValue_i$$172$$ = $allTimeZones$$[$allTimeZonesKeys$$.indexOf($addTimeZone$$1$$)][$addTimeZone$$1$$], $addTimeZoneOffset$$ = $AdfDhtmlChooseDateTimeZoneUtils$$.$_getMinutesFromTimeZoneValue$($addTimeZoneValue_i$$172$$), $addTimeZoneObject$$[$addTimeZone$$1$$] = $addTimeZoneValue_i$$172$$));
    for (var $preferredTimeZones$$ = [], $totalTimeZones$$ = $timeZones$$.length + ($addTimeZone$$1$$ && !$added$$2$$ ? 1 : 0), $count$$13$$ = 0, $addTimeZoneValue_i$$172$$ = 0;$addTimeZoneValue_i$$172$$ < $totalTimeZones$$ && $count$$13$$ < $timeZones$$.length;$addTimeZoneValue_i$$172$$++) {
      var $timeZoneObject$$ = {}, $key$$48$$ = $timeZones$$[$count$$13$$];
      $count$$13$$++;
      var $index$$106$$ = $allTimeZonesKeys$$.indexOf($key$$48$$);
      -1 != $index$$106$$ && ($timeZoneObject$$[$key$$48$$] = $allTimeZones$$[$index$$106$$][$key$$48$$], $addTimeZone$$1$$ && !$added$$2$$ && $AdfDhtmlChooseDateTimeZoneUtils$$.$_getMinutesFromTimeZoneValue$($timeZoneObject$$[$key$$48$$]) > $addTimeZoneOffset$$ && ($preferredTimeZones$$[$addTimeZoneValue_i$$172$$] = $addTimeZoneObject$$, $addTimeZoneValue_i$$172$$++, $added$$2$$ = !0), $preferredTimeZones$$[$addTimeZoneValue_i$$172$$] = $timeZoneObject$$);
    }
    $addTimeZone$$1$$ && !$added$$2$$ && ($preferredTimeZones$$[$totalTimeZones$$ - 1] = $addTimeZoneObject$$);
    return $preferredTimeZones$$;
  }
  return $AdfDhtmlChooseDateTimeZoneUtils$$.$_getDefaultTimeZones$($addTimeZone$$1$$);
};
$goog$exportSymbol$$("AdfDhtmlChooseDateTimeZoneUtils.getTimeZones", $AdfDhtmlChooseDateTimeZoneUtils$$.$getTimeZones$);
$AdfDhtmlChooseDateTimeZoneUtils$$.$_getDefaultTimeZones$ = function $$AdfDhtmlChooseDateTimeZoneUtils$$$$_getDefaultTimeZones$$($addTimeZone$$2$$) {
  var $allTimeZones$$1$$ = $AdfRichTimeZoneTranslations$$.$getTimeZoneTranslations$(), $added$$3$$ = !1, $commonTimeZones$$ = [];
  if ($AdfDhtmlChooseDateTimeZoneUtils$$.$_CACHED_COMMON_TIMEZONES$) {
    $commonTimeZones$$ = $AdfDhtmlChooseDateTimeZoneUtils$$.$_CACHED_COMMON_TIMEZONES$;
  } else {
    for (var $allTimeZones$$1$$ = $allTimeZones$$1$$.slice(0), $i$$173$$ = 0;$i$$173$$ < $allTimeZones$$1$$.length;$i$$173$$++) {
      var $curTz$$ = $allTimeZones$$1$$[$i$$173$$];
      if ("true" != $curTz$$.common) {
        break;
      }
      delete $curTz$$.$common$;
      $commonTimeZones$$[$i$$173$$] = $curTz$$;
      $curTz$$[$AdfDhtmlChooseDateDOMUtils$$.$getKeys$($curTz$$)] == $addTimeZone$$2$$ && ($added$$3$$ = !0);
    }
    $AdfDhtmlChooseDateTimeZoneUtils$$.$_CACHED_COMMON_TIMEZONES$ = $commonTimeZones$$;
  }
  return $addTimeZone$$2$$ ? $added$$3$$ ? $commonTimeZones$$ : $AdfDhtmlChooseDateTimeZoneUtils$$.$_getCommonListWithAdditionalTimeZoneInjected$($commonTimeZones$$, $addTimeZone$$2$$) : $commonTimeZones$$;
};
$AdfDhtmlChooseDateTimeZoneUtils$$.$_getCommonListWithAdditionalTimeZoneInjected$ = function $$AdfDhtmlChooseDateTimeZoneUtils$$$$_getCommonListWithAdditionalTimeZoneInjected$$($commonTimeZones$$1$$, $addTimeZone$$3$$) {
  for (var $addTimeZoneObject$$1_allTimeZones$$2$$ = $AdfRichTimeZoneTranslations$$.$getTimeZoneTranslations$(), $cloneCommonTimeZones$$ = $commonTimeZones$$1$$.slice(0), $added$$4$$ = !1, $addTimeZoneIndex$$ = -1, $addTimeZoneValue$$1$$, $addTimeZoneOffset$$1$$, $i$$174$$ = $cloneCommonTimeZones$$.length - 1;$i$$174$$ < $addTimeZoneObject$$1_allTimeZones$$2$$.length;$i$$174$$++) {
    if ($AdfDhtmlChooseDateDOMUtils$$.$getKeys$($addTimeZoneObject$$1_allTimeZones$$2$$[$i$$174$$])[0] == $addTimeZone$$3$$) {
      $addTimeZoneValue$$1$$ = $addTimeZoneObject$$1_allTimeZones$$2$$[$i$$174$$][$addTimeZone$$3$$];
      $addTimeZoneOffset$$1$$ = $AdfDhtmlChooseDateTimeZoneUtils$$.$_getMinutesFromTimeZoneValue$($addTimeZoneValue$$1$$);
      break;
    }
  }
  for ($i$$174$$ = 0;$i$$174$$ < $cloneCommonTimeZones$$.length;$i$$174$$++) {
    if ($AdfDhtmlChooseDateDOMUtils$$.$getKeys$($cloneCommonTimeZones$$[$i$$174$$])[0] == $addTimeZone$$3$$) {
      $added$$4$$ = !0;
      break;
    }
    if ($AdfDhtmlChooseDateTimeZoneUtils$$.$_getMinutesFromTimeZoneValue$($cloneCommonTimeZones$$[$i$$174$$][$AdfDhtmlChooseDateDOMUtils$$.$getKeys$($cloneCommonTimeZones$$[$i$$174$$])[0]]) > $addTimeZoneOffset$$1$$) {
      $addTimeZoneIndex$$ = $i$$174$$;
      break;
    }
  }
  $added$$4$$ || (-1 == $addTimeZoneIndex$$ && ($addTimeZoneIndex$$ = $cloneCommonTimeZones$$.length), $addTimeZoneValue$$1$$ && ($addTimeZoneObject$$1_allTimeZones$$2$$ = {}, $addTimeZoneObject$$1_allTimeZones$$2$$[$addTimeZone$$3$$] = $addTimeZoneValue$$1$$, $cloneCommonTimeZones$$.splice($addTimeZoneIndex$$, 0, $addTimeZoneObject$$1_allTimeZones$$2$$)));
  return $cloneCommonTimeZones$$;
};
$AdfDhtmlChooseDateTimeZoneUtils$$.$_getMinutesFromTimeZoneValue$ = function $$AdfDhtmlChooseDateTimeZoneUtils$$$$_getMinutesFromTimeZoneValue$$($offset$$15_value$$165$$) {
  $offset$$15_value$$165$$ = $offset$$15_value$$165$$.match("[+-][0-9]{2}:[0-9]{2}")[0];
  var $hours$$4$$ = parseInt($offset$$15_value$$165$$.match("[0-9]{2}")), $min$$1$$ = parseInt($offset$$15_value$$165$$.match("(?![0-9]{2}:)[0-9]{2}"));
  return parseInt($offset$$15_value$$165$$[0] + (60 * $hours$$4$$ + $min$$1$$));
};
