GSI - Employe Self Service Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

2 months ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.regionInLocation = exports.DUAL_REGION_MAPPING = exports.MULTI_REGION_MAPPING = void 0;
  4. exports.MULTI_REGION_MAPPING = {
  5. "us-central1": "us",
  6. "us-east1": "us",
  7. "us-east4": "us",
  8. "us-west1": "us",
  9. "us-west2": "us",
  10. "us-west3": "us",
  11. "us-west4": "us",
  12. "europe-central2": "eu",
  13. "europe-north1": "eu",
  14. "europe-west1": "eu",
  15. "europe-west3": "eu",
  16. "europe-west4": "eu",
  17. "europe-west5": "eu",
  18. "asia-east1": "asia",
  19. "asia-east2": "asia",
  20. "asia-northeast1": "asia",
  21. "asia-northeast2": "asia",
  22. "asia-northeast3": "asia",
  23. "asia-south1": "asia",
  24. "asia-south2": "asia",
  25. "asia-southeast1": "asia",
  26. "asia-southeast2": "asia",
  27. };
  28. exports.DUAL_REGION_MAPPING = {
  29. "asia-northeast1": "asia1",
  30. "asia-northeast2": "asia1",
  31. "europe-north1": "eur4",
  32. "europe-west4": "eur4",
  33. "us-central1": "nam4",
  34. "us-east1": "nam4",
  35. };
  36. function regionInLocation(region, location) {
  37. region = region.toLowerCase();
  38. location = location.toLowerCase();
  39. if (exports.MULTI_REGION_MAPPING[region] === location || exports.DUAL_REGION_MAPPING[region] === location) {
  40. return true;
  41. }
  42. return false;
  43. }
  44. exports.regionInLocation = regionInLocation;