twitter_cldr_js 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/History.txt +5 -0
  4. data/README.md +28 -3
  5. data/lib/assets/javascripts/twitter_cldr/af.js +108 -73
  6. data/lib/assets/javascripts/twitter_cldr/ar.js +108 -73
  7. data/lib/assets/javascripts/twitter_cldr/be.js +108 -73
  8. data/lib/assets/javascripts/twitter_cldr/bg.js +108 -73
  9. data/lib/assets/javascripts/twitter_cldr/bn.js +108 -73
  10. data/lib/assets/javascripts/twitter_cldr/ca.js +108 -73
  11. data/lib/assets/javascripts/twitter_cldr/cs.js +108 -73
  12. data/lib/assets/javascripts/twitter_cldr/cy.js +108 -73
  13. data/lib/assets/javascripts/twitter_cldr/da.js +108 -73
  14. data/lib/assets/javascripts/twitter_cldr/de.js +108 -73
  15. data/lib/assets/javascripts/twitter_cldr/el.js +108 -73
  16. data/lib/assets/javascripts/twitter_cldr/en-GB.js +109 -74
  17. data/lib/assets/javascripts/twitter_cldr/en.js +108 -73
  18. data/lib/assets/javascripts/twitter_cldr/es.js +108 -73
  19. data/lib/assets/javascripts/twitter_cldr/eu.js +108 -73
  20. data/lib/assets/javascripts/twitter_cldr/fa.js +108 -73
  21. data/lib/assets/javascripts/twitter_cldr/fi.js +108 -73
  22. data/lib/assets/javascripts/twitter_cldr/fil.js +108 -73
  23. data/lib/assets/javascripts/twitter_cldr/fr.js +108 -73
  24. data/lib/assets/javascripts/twitter_cldr/ga.js +108 -73
  25. data/lib/assets/javascripts/twitter_cldr/gl.js +108 -73
  26. data/lib/assets/javascripts/twitter_cldr/he.js +108 -73
  27. data/lib/assets/javascripts/twitter_cldr/hi.js +108 -73
  28. data/lib/assets/javascripts/twitter_cldr/hr.js +108 -73
  29. data/lib/assets/javascripts/twitter_cldr/hu.js +108 -73
  30. data/lib/assets/javascripts/twitter_cldr/id.js +108 -73
  31. data/lib/assets/javascripts/twitter_cldr/is.js +108 -73
  32. data/lib/assets/javascripts/twitter_cldr/it.js +108 -73
  33. data/lib/assets/javascripts/twitter_cldr/ja.js +108 -73
  34. data/lib/assets/javascripts/twitter_cldr/ko.js +108 -73
  35. data/lib/assets/javascripts/twitter_cldr/lv.js +108 -73
  36. data/lib/assets/javascripts/twitter_cldr/msa.js +108 -73
  37. data/lib/assets/javascripts/twitter_cldr/nl.js +108 -73
  38. data/lib/assets/javascripts/twitter_cldr/no.js +108 -73
  39. data/lib/assets/javascripts/twitter_cldr/pl.js +108 -73
  40. data/lib/assets/javascripts/twitter_cldr/pt.js +108 -73
  41. data/lib/assets/javascripts/twitter_cldr/ro.js +108 -73
  42. data/lib/assets/javascripts/twitter_cldr/ru.js +108 -73
  43. data/lib/assets/javascripts/twitter_cldr/sk.js +108 -73
  44. data/lib/assets/javascripts/twitter_cldr/sq.js +108 -73
  45. data/lib/assets/javascripts/twitter_cldr/sr.js +108 -73
  46. data/lib/assets/javascripts/twitter_cldr/sv.js +108 -73
  47. data/lib/assets/javascripts/twitter_cldr/ta.js +108 -73
  48. data/lib/assets/javascripts/twitter_cldr/th.js +108 -73
  49. data/lib/assets/javascripts/twitter_cldr/tr.js +108 -73
  50. data/lib/assets/javascripts/twitter_cldr/uk.js +108 -73
  51. data/lib/assets/javascripts/twitter_cldr/ur.js +108 -73
  52. data/lib/assets/javascripts/twitter_cldr/vi.js +108 -73
  53. data/lib/assets/javascripts/twitter_cldr/zh-cn.js +108 -73
  54. data/lib/assets/javascripts/twitter_cldr/zh-tw.js +108 -73
  55. data/lib/twitter_cldr/js/compiler.rb +1 -0
  56. data/lib/twitter_cldr/js/mustache/shared/lists.coffee +1 -1
  57. data/lib/twitter_cldr/js/mustache/shared/phone_codes.coffee +16 -0
  58. data/lib/twitter_cldr/js/renderers.rb +1 -0
  59. data/lib/twitter_cldr/js/renderers/shared/phone_codes_renderer.rb +23 -0
  60. data/lib/twitter_cldr/js/version.rb +1 -1
  61. data/spec/js/shared/lists.spec.js +8 -0
  62. data/spec/js/shared/phone_codes.spec.js +24 -0
  63. metadata +14 -11
@@ -1,21 +1,22 @@
1
+
1
2
  /*
2
3
  // Copyright 2012 Twitter, Inc
3
4
  // http://www.apache.org/licenses/LICENSE-2.0
4
5
 
5
- // TwitterCLDR (JavaScript) v2.2.3
6
+ // TwitterCLDR (JavaScript) v2.2.4
6
7
  // Authors: Cameron Dutro [@camertron]
7
8
  Kirill Lashuk [@KL_7]
8
9
  portions by Sven Fuchs [@svenfuchs]
9
10
  // Homepage: https://twitter.com
10
11
  // Description: Provides date, time, number, and list formatting functionality for various Twitter-supported locales in Javascript.
11
- */
12
-
12
+ */
13
13
 
14
- /*<<module_def>>*/
15
14
 
15
+ /*-module-*/
16
+ /*_lib/twitter_cldr_*/
16
17
 
17
18
  (function() {
18
- var TwitterCldr, key, obj, root, _ref, _ref1, _ref2, _ref3,
19
+ var TwitterCldr, key, obj, root,
19
20
  __hasProp = {}.hasOwnProperty,
20
21
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21
22
 
@@ -288,22 +289,23 @@
288
289
  }
289
290
 
290
291
  DateTimeFormatter.prototype.format = function(obj, options) {
291
- var format_token, token, tokens,
292
- _this = this;
293
- format_token = function(token) {
294
- var result;
295
- result = "";
296
- switch (token.type) {
297
- case "pattern":
298
- return _this.result_for_token(token, obj);
299
- default:
300
- if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {
301
- return token.value.substring(1, token.value.length - 1);
302
- } else {
303
- return token.value;
304
- }
305
- }
306
- };
292
+ var format_token, token, tokens;
293
+ format_token = (function(_this) {
294
+ return function(token) {
295
+ var result;
296
+ result = "";
297
+ switch (token.type) {
298
+ case "pattern":
299
+ return _this.result_for_token(token, obj);
300
+ default:
301
+ if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {
302
+ return token.value.substring(1, token.value.length - 1);
303
+ } else {
304
+ return token.value;
305
+ }
306
+ }
307
+ };
308
+ })(this);
307
309
  tokens = this.get_tokens(obj, options);
308
310
  return ((function() {
309
311
  var _i, _len, _results;
@@ -850,8 +852,7 @@
850
852
  __extends(DecimalFormatter, _super);
851
853
 
852
854
  function DecimalFormatter() {
853
- _ref = DecimalFormatter.__super__.constructor.apply(this, arguments);
854
- return _ref;
855
+ return DecimalFormatter.__super__.constructor.apply(this, arguments);
855
856
  }
856
857
 
857
858
  DecimalFormatter.prototype.format = function(number, options) {
@@ -955,8 +956,7 @@
955
956
  __extends(AbbreviatedNumberFormatter, _super);
956
957
 
957
958
  function AbbreviatedNumberFormatter() {
958
- _ref1 = AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);
959
- return _ref1;
959
+ return AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);
960
960
  }
961
961
 
962
962
  AbbreviatedNumberFormatter.prototype.NUMBER_MAX = Math.pow(10, 15);
@@ -976,9 +976,9 @@
976
976
  AbbreviatedNumberFormatter.prototype.get_key = function(number) {
977
977
  var i, zeroes;
978
978
  zeroes = ((function() {
979
- var _i, _ref2, _results;
979
+ var _i, _ref, _results;
980
980
  _results = [];
981
- for (i = _i = 0, _ref2 = Math.floor(number).toString().length - 1; 0 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 0 <= _ref2 ? ++_i : --_i) {
981
+ for (i = _i = 0, _ref = Math.floor(number).toString().length - 1; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
982
982
  _results.push("0");
983
983
  }
984
984
  return _results;
@@ -1020,8 +1020,7 @@
1020
1020
  __extends(ShortDecimalFormatter, _super);
1021
1021
 
1022
1022
  function ShortDecimalFormatter() {
1023
- _ref2 = ShortDecimalFormatter.__super__.constructor.apply(this, arguments);
1024
- return _ref2;
1023
+ return ShortDecimalFormatter.__super__.constructor.apply(this, arguments);
1025
1024
  }
1026
1025
 
1027
1026
  ShortDecimalFormatter.prototype.get_type = function() {
@@ -1036,8 +1035,7 @@
1036
1035
  __extends(LongDecimalFormatter, _super);
1037
1036
 
1038
1037
  function LongDecimalFormatter() {
1039
- _ref3 = LongDecimalFormatter.__super__.constructor.apply(this, arguments);
1040
- return _ref3;
1038
+ return LongDecimalFormatter.__super__.constructor.apply(this, arguments);
1041
1039
  }
1042
1040
 
1043
1041
  LongDecimalFormatter.prototype.get_type = function() {
@@ -1158,9 +1156,9 @@
1158
1156
  })();
1159
1157
  widths.reverse();
1160
1158
  return ((function() {
1161
- var _i, _ref4, _results;
1159
+ var _i, _ref, _results;
1162
1160
  _results = [];
1163
- for (index = _i = 0, _ref4 = widths.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; index = 0 <= _ref4 ? ++_i : --_i) {
1161
+ for (index = _i = 0, _ref = widths.length; 0 <= _ref ? _i < _ref : _i > _ref; index = 0 <= _ref ? ++_i : --_i) {
1164
1162
  if (widths.indexOf(widths[index], index + 1) === -1) {
1165
1163
  _results.push(widths[index]);
1166
1164
  }
@@ -1239,11 +1237,11 @@
1239
1237
  Currencies.currency_codes = function() {
1240
1238
  var data, _;
1241
1239
  return this.codes || (this.codes = (function() {
1242
- var _ref4, _results;
1243
- _ref4 = this.currencies;
1240
+ var _ref, _results;
1241
+ _ref = this.currencies;
1244
1242
  _results = [];
1245
- for (_ in _ref4) {
1246
- data = _ref4[_];
1243
+ for (_ in _ref) {
1244
+ data = _ref[_];
1247
1245
  _results.push(data.code);
1248
1246
  }
1249
1247
  return _results;
@@ -1251,11 +1249,11 @@
1251
1249
  };
1252
1250
 
1253
1251
  Currencies.for_code = function(currency_code) {
1254
- var country_name, data, result, _ref4;
1252
+ var country_name, data, result, _ref;
1255
1253
  result = null;
1256
- _ref4 = this.currencies;
1257
- for (country_name in _ref4) {
1258
- data = _ref4[country_name];
1254
+ _ref = this.currencies;
1255
+ for (country_name in _ref) {
1256
+ data = _ref[country_name];
1259
1257
  if (data.currency === currency_code) {
1260
1258
  result = {
1261
1259
  country: country_name,
@@ -1290,10 +1288,10 @@
1290
1288
  };
1291
1289
 
1292
1290
  ListFormatter.prototype.compose_list = function(list) {
1293
- var format_key, i, result, _i, _ref4;
1291
+ var format_key, i, result, _i, _ref;
1294
1292
  result = this.compose(this.formats.end || this.formats.middle || "", [list[list.length - 2], list[list.length - 1]]);
1295
1293
  if (list.length > 2) {
1296
- for (i = _i = 3, _ref4 = list.length; 3 <= _ref4 ? _i <= _ref4 : _i >= _ref4; i = 3 <= _ref4 ? ++_i : --_i) {
1294
+ for (i = _i = 3, _ref = list.length; 3 <= _ref ? _i <= _ref : _i >= _ref; i = 3 <= _ref ? ++_i : --_i) {
1297
1295
  format_key = i === list.length ? "start" : "middle";
1298
1296
  if (this.formats[format_key] == null) {
1299
1297
  format_key = "middle";
@@ -1311,7 +1309,7 @@
1311
1309
  _results = [];
1312
1310
  for (_i = 0, _len = elements.length; _i < _len; _i++) {
1313
1311
  element = elements[_i];
1314
- if (element !== null) {
1312
+ if (element != null) {
1315
1313
  _results.push(element);
1316
1314
  }
1317
1315
  }
@@ -1359,10 +1357,10 @@
1359
1357
  }
1360
1358
 
1361
1359
  Bidi.bidi_class_for = function(code_point) {
1362
- var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref4;
1363
- _ref4 = this.bidi_classes;
1364
- for (bidi_class in _ref4) {
1365
- ranges = _ref4[bidi_class];
1360
+ var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref;
1361
+ _ref = this.bidi_classes;
1362
+ for (bidi_class in _ref) {
1363
+ ranges = _ref[bidi_class];
1366
1364
  for (range_offset in ranges) {
1367
1365
  range_list = ranges[range_offset];
1368
1366
  for (_i = 0, _len = range_list.length; _i < _len; _i++) {
@@ -1412,15 +1410,15 @@
1412
1410
  };
1413
1411
 
1414
1412
  Bidi.prototype.reorder_visually = function() {
1415
- var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref4, _ref5;
1413
+ var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref, _ref1;
1416
1414
  if (!this.string_arr) {
1417
1415
  throw "No string given!";
1418
1416
  }
1419
1417
  max = 0;
1420
1418
  lowest_odd = MAX_DEPTH + 1;
1421
- _ref4 = this.levels;
1422
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
1423
- level = _ref4[_i];
1419
+ _ref = this.levels;
1420
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1421
+ level = _ref[_i];
1424
1422
  max = TwitterCldr.Utilities.max([level, max]);
1425
1423
  if (!TwitterCldr.Utilities.is_even(level)) {
1426
1424
  lowest_odd = TwitterCldr.Utilities.min([lowest_odd, level]);
@@ -1439,7 +1437,7 @@
1439
1437
  while (finish < this.levels.length && this.levels[finish] >= depth) {
1440
1438
  finish += 1;
1441
1439
  }
1442
- for (i = _k = 0, _ref5 = (finish - start) / 2; 0 <= _ref5 ? _k < _ref5 : _k > _ref5; i = 0 <= _ref5 ? ++_k : --_k) {
1440
+ for (i = _k = 0, _ref1 = (finish - start) / 2; 0 <= _ref1 ? _k < _ref1 : _k > _ref1; i = 0 <= _ref1 ? ++_k : --_k) {
1443
1441
  tmpb = this.levels[finish - i - 1];
1444
1442
  this.levels[finish - i - 1] = this.levels[start + i];
1445
1443
  this.levels[start + i] = tmpb;
@@ -1454,7 +1452,7 @@
1454
1452
  };
1455
1453
 
1456
1454
  Bidi.prototype.compute_paragraph_embedding_level = function() {
1457
- var type, _i, _len, _ref4;
1455
+ var type, _i, _len, _ref;
1458
1456
  if (["LTR", "RTL"].indexOf(this.direction) > -1) {
1459
1457
  if (this.direction === "LTR") {
1460
1458
  return 0;
@@ -1462,9 +1460,9 @@
1462
1460
  return 1;
1463
1461
  }
1464
1462
  } else {
1465
- _ref4 = this.types;
1466
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
1467
- type = _ref4[_i];
1463
+ _ref = this.types;
1464
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1465
+ type = _ref[_i];
1468
1466
  if (type === "L") {
1469
1467
  return 0;
1470
1468
  }
@@ -1481,13 +1479,13 @@
1481
1479
  };
1482
1480
 
1483
1481
  Bidi.prototype.compute_explicit_levels = function() {
1484
- var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref4, _ref5;
1482
+ var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref, _ref1;
1485
1483
  current_embedding = this.base_embedding;
1486
1484
  directional_override = -1;
1487
1485
  embedding_stack = [];
1488
1486
  this.formatter_indices || (this.formatter_indices = []);
1489
1487
  sp = 0;
1490
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1488
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1491
1489
  is_ltr = false;
1492
1490
  is_special = true;
1493
1491
  is_ltr = this.types[i] === "LRE" || this.types[i] === "LRO";
@@ -1512,7 +1510,7 @@
1512
1510
  sp -= 1;
1513
1511
  new_embedding = embedding_stack[sp];
1514
1512
  current_embedding = new_embedding & 0x7f;
1515
- directional_override = new_embedding < 0 ? (_ref5 = (new_embedding & 1) === 0) != null ? _ref5 : {
1513
+ directional_override = new_embedding < 0 ? (_ref1 = (new_embedding & 1) === 0) != null ? _ref1 : {
1516
1514
  "L": "R"
1517
1515
  } : -1;
1518
1516
  }
@@ -1542,10 +1540,10 @@
1542
1540
  };
1543
1541
 
1544
1542
  Bidi.prototype.compute_runs = function() {
1545
- var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref4, _ref5;
1543
+ var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref, _ref1;
1546
1544
  run_count = 0;
1547
1545
  current_embedding = this.base_embedding;
1548
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1546
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1549
1547
  if (this.levels[i] !== current_embedding) {
1550
1548
  current_embedding = this.levels[i];
1551
1549
  run_count += 1;
@@ -1554,7 +1552,7 @@
1554
1552
  where = 0;
1555
1553
  last_run_start = 0;
1556
1554
  current_embedding = this.base_embedding;
1557
- for (i = _j = 0, _ref5 = this.length; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; i = 0 <= _ref5 ? ++_j : --_j) {
1555
+ for (i = _j = 0, _ref1 = this.length; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
1558
1556
  if (this.levels[i] !== current_embedding) {
1559
1557
  this.runs[where] = last_run_start;
1560
1558
  where += 1;
@@ -1649,8 +1647,8 @@
1649
1647
  };
1650
1648
 
1651
1649
  Bidi.prototype.resolve_implicit_levels = function() {
1652
- var i, _i, _ref4;
1653
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1650
+ var i, _i, _ref;
1651
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1654
1652
  if ((this.levels[i] & 1) === 0) {
1655
1653
  if (this.types[i] === "R") {
1656
1654
  this.levels[i] += 1;
@@ -1719,11 +1717,11 @@
1719
1717
  };
1720
1718
 
1721
1719
  Bidi.prototype.reinsert_formatting_codes = function() {
1722
- var index, input, left_level, len, next_fmt, output, right_level, _i, _ref4;
1720
+ var index, input, left_level, len, next_fmt, output, right_level, _i, _ref;
1723
1721
  if ((this.formatter_indices != null) && this.formatter_indices.length > 0) {
1724
1722
  input = this.length;
1725
1723
  output = this.levels.length;
1726
- for (index = _i = _ref4 = this.formatter_indices.length - 1; _ref4 <= 0 ? _i <= 0 : _i >= 0; index = _ref4 <= 0 ? ++_i : --_i) {
1724
+ for (index = _i = _ref = this.formatter_indices.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; index = _ref <= 0 ? ++_i : --_i) {
1727
1725
  next_fmt = this.formatter_indices[index];
1728
1726
  len = output - next_fmt - 1;
1729
1727
  output = next_fmt;
@@ -1781,13 +1779,13 @@
1781
1779
  };
1782
1780
 
1783
1781
  Calendar.get_root = function(key, options) {
1784
- var format, names_form, root, _ref4;
1782
+ var format, names_form, root, _ref;
1785
1783
  if (options == null) {
1786
1784
  options = {};
1787
1785
  }
1788
1786
  root = this.calendar[key];
1789
1787
  names_form = options["names_form"] || "wide";
1790
- format = options.format || ((root != null ? (_ref4 = root["stand-alone"]) != null ? _ref4[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");
1788
+ format = options.format || ((root != null ? (_ref = root["stand-alone"]) != null ? _ref[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");
1791
1789
  return root[format][names_form];
1792
1790
  };
1793
1791
 
@@ -1795,6 +1793,43 @@
1795
1793
 
1796
1794
  })();
1797
1795
 
1796
+ TwitterCldr.PhoneCodes = (function() {
1797
+ function PhoneCodes() {}
1798
+
1799
+ PhoneCodes.phone_codes = {"ac":"247","ad":"376","ae":"971","af":"93","ag":"1","ai":"1","al":"355","am":"374","an":"599","ao":"244","aq":"672","ar":"54","as":"1","at":"43","au":"61","aw":"297","ax":"358","az":"994","ba":"387","bb":"1","bd":"880","be":"32","bf":"226","bg":"359","bh":"973","bi":"257","bj":"229","bl":"590","bm":"1","bn":"673","bo":"591","br":"55","bs":"1","bt":"975","bw":"267","by":"375","bz":"501","ca":"1","cc":"61","cd":"243","cf":"236","cg":"242","ch":"41","ci":"225","ck":"682","cl":"56","cm":"237","cn":"86","co":"57","cr":"506","cu":"53","cv":"238","cx":"61","cy":"357","cz":"420","de":"49","dj":"253","dk":"45","dm":"1","do":"1","dz":"213","ec":"593","ee":"372","eg":"20","er":"291","es":"34","et":"251","fi":"358","fj":"679","fk":"500","fm":"691","fo":"298","fr":"33","ga":"241","gb":"44","gd":"1","ge":"995","gf":"594","gg":"44","gh":"233","gi":"350","gl":"299","gm":"220","gn":"224","gp":"590","gq":"240","gr":"30","gt":"502","gu":"1","gw":"245","gy":"592","hk":"852","hn":"504","hr":"385","ht":"509","hu":"36","id":"62","ie":"353","il":"972","im":"44","in":"91","io":"246","iq":"964","ir":"98","is":"354","it":"39","je":"44","jm":"1","jo":"962","jp":"81","ke":"254","kg":"996","kh":"855","ki":"686","km":"269","kn":"1","kp":"850","kr":"82","kw":"965","ky":"1","kz":"7","la":"856","lb":"961","lc":"1","li":"423","lk":"94","lr":"231","ls":"266","lt":"370","lu":"352","lv":"371","ly":"218","ma":"212","mc":"377","md":"373","me":"382","mg":"261","mh":"692","mk":"389","ml":"223","mm":"95","mn":"976","mo":"853","mp":"1","mq":"596","mr":"222","ms":"1","mt":"356","mu":"230","mv":"960","mw":"265","mx":"52","my":"60","mz":"258","na":"264","nc":"687","ne":"227","nf":"672","ng":"234","ni":"505","nl":"31","no":"47","np":"977","nr":"674","nu":"683","nz":"64","om":"968","pa":"507","pe":"51","pf":"689","pg":"675","ph":"63","pk":"92","pl":"48","pm":"508","pr":"1","ps":"972","pt":"351","pw":"680","py":"595","qa":"974","re":"262","ro":"40","rs":"381","ru":"7","rw":"250","sa":"966","sb":"677","sc":"248","sd":"249","se":"46","sg":"65","sh":"290","si":"386","sj":"47","sk":"421","sl":"232","sm":"378","sn":"221","so":"252","sr":"597","ss":"211","st":"239","sv":"503","sy":"963","sz":"268","tc":"1","td":"235","tf":"262","tg":"228","th":"66","tj":"992","tk":"690","tl":"670","tm":"993","tn":"216","to":"676","tr":"90","tt":"1","tv":"688","tw":"886","tz":"255","ua":"380","ug":"256","us":"1","uy":"598","uz":"998","va":"39","vc":"1","ve":"58","vg":"1","vi":"1","vn":"84","vu":"678","wf":"681","ws":"685","ye":"967","yt":"262","za":"27","zm":"260","zw":"263"};
1800
+
1801
+ PhoneCodes.territories = function() {
1802
+ var data, _;
1803
+ return this.codes || (this.codes = (function() {
1804
+ var _ref, _results;
1805
+ _ref = this.phone_codes;
1806
+ _results = [];
1807
+ for (data in _ref) {
1808
+ _ = _ref[data];
1809
+ _results.push(data);
1810
+ }
1811
+ return _results;
1812
+ }).call(this));
1813
+ };
1814
+
1815
+ PhoneCodes.code_for_territory = function(territory) {
1816
+ var phone_code, result, territory_code, _ref;
1817
+ result = null;
1818
+ _ref = this.phone_codes;
1819
+ for (territory_code in _ref) {
1820
+ phone_code = _ref[territory_code];
1821
+ if (territory_code === territory) {
1822
+ result = phone_code;
1823
+ break;
1824
+ }
1825
+ }
1826
+ return result;
1827
+ };
1828
+
1829
+ return PhoneCodes;
1830
+
1831
+ })();
1832
+
1798
1833
  TwitterCldr.NumberParser = (function() {
1799
1834
  function NumberParser() {
1800
1835
  this.group_separator = " ";
@@ -1830,11 +1865,11 @@
1830
1865
  }
1831
1866
  if (punct_list.length > 0 && punct_list.slice(-1)[0]["type"] === "decimal") {
1832
1867
  result = parseInt(((function() {
1833
- var _j, _len1, _ref4, _results;
1834
- _ref4 = num_list.slice(0, -1);
1868
+ var _j, _len1, _ref, _results;
1869
+ _ref = num_list.slice(0, -1);
1835
1870
  _results = [];
1836
- for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
1837
- num = _ref4[_j];
1871
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
1872
+ num = _ref[_j];
1838
1873
  _results.push(num.value);
1839
1874
  }
1840
1875
  return _results;
@@ -1,21 +1,22 @@
1
+
1
2
  /*
2
3
  // Copyright 2012 Twitter, Inc
3
4
  // http://www.apache.org/licenses/LICENSE-2.0
4
5
 
5
- // TwitterCLDR (JavaScript) v2.2.3
6
+ // TwitterCLDR (JavaScript) v2.2.4
6
7
  // Authors: Cameron Dutro [@camertron]
7
8
  Kirill Lashuk [@KL_7]
8
9
  portions by Sven Fuchs [@svenfuchs]
9
10
  // Homepage: https://twitter.com
10
11
  // Description: Provides date, time, number, and list formatting functionality for various Twitter-supported locales in Javascript.
11
- */
12
-
12
+ */
13
13
 
14
- /*<<module_def>>*/
15
14
 
15
+ /*-module-*/
16
+ /*_lib/twitter_cldr_*/
16
17
 
17
18
  (function() {
18
- var TwitterCldr, key, obj, root, _ref, _ref1, _ref2, _ref3,
19
+ var TwitterCldr, key, obj, root,
19
20
  __hasProp = {}.hasOwnProperty,
20
21
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
21
22
 
@@ -288,22 +289,23 @@
288
289
  }
289
290
 
290
291
  DateTimeFormatter.prototype.format = function(obj, options) {
291
- var format_token, token, tokens,
292
- _this = this;
293
- format_token = function(token) {
294
- var result;
295
- result = "";
296
- switch (token.type) {
297
- case "pattern":
298
- return _this.result_for_token(token, obj);
299
- default:
300
- if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {
301
- return token.value.substring(1, token.value.length - 1);
302
- } else {
303
- return token.value;
304
- }
305
- }
306
- };
292
+ var format_token, token, tokens;
293
+ format_token = (function(_this) {
294
+ return function(token) {
295
+ var result;
296
+ result = "";
297
+ switch (token.type) {
298
+ case "pattern":
299
+ return _this.result_for_token(token, obj);
300
+ default:
301
+ if (token.value.length > 0 && token.value[0] === "'" && token.value[token.value.length - 1] === "'") {
302
+ return token.value.substring(1, token.value.length - 1);
303
+ } else {
304
+ return token.value;
305
+ }
306
+ }
307
+ };
308
+ })(this);
307
309
  tokens = this.get_tokens(obj, options);
308
310
  return ((function() {
309
311
  var _i, _len, _results;
@@ -850,8 +852,7 @@
850
852
  __extends(DecimalFormatter, _super);
851
853
 
852
854
  function DecimalFormatter() {
853
- _ref = DecimalFormatter.__super__.constructor.apply(this, arguments);
854
- return _ref;
855
+ return DecimalFormatter.__super__.constructor.apply(this, arguments);
855
856
  }
856
857
 
857
858
  DecimalFormatter.prototype.format = function(number, options) {
@@ -955,8 +956,7 @@
955
956
  __extends(AbbreviatedNumberFormatter, _super);
956
957
 
957
958
  function AbbreviatedNumberFormatter() {
958
- _ref1 = AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);
959
- return _ref1;
959
+ return AbbreviatedNumberFormatter.__super__.constructor.apply(this, arguments);
960
960
  }
961
961
 
962
962
  AbbreviatedNumberFormatter.prototype.NUMBER_MAX = Math.pow(10, 15);
@@ -976,9 +976,9 @@
976
976
  AbbreviatedNumberFormatter.prototype.get_key = function(number) {
977
977
  var i, zeroes;
978
978
  zeroes = ((function() {
979
- var _i, _ref2, _results;
979
+ var _i, _ref, _results;
980
980
  _results = [];
981
- for (i = _i = 0, _ref2 = Math.floor(number).toString().length - 1; 0 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 0 <= _ref2 ? ++_i : --_i) {
981
+ for (i = _i = 0, _ref = Math.floor(number).toString().length - 1; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
982
982
  _results.push("0");
983
983
  }
984
984
  return _results;
@@ -1020,8 +1020,7 @@
1020
1020
  __extends(ShortDecimalFormatter, _super);
1021
1021
 
1022
1022
  function ShortDecimalFormatter() {
1023
- _ref2 = ShortDecimalFormatter.__super__.constructor.apply(this, arguments);
1024
- return _ref2;
1023
+ return ShortDecimalFormatter.__super__.constructor.apply(this, arguments);
1025
1024
  }
1026
1025
 
1027
1026
  ShortDecimalFormatter.prototype.get_type = function() {
@@ -1036,8 +1035,7 @@
1036
1035
  __extends(LongDecimalFormatter, _super);
1037
1036
 
1038
1037
  function LongDecimalFormatter() {
1039
- _ref3 = LongDecimalFormatter.__super__.constructor.apply(this, arguments);
1040
- return _ref3;
1038
+ return LongDecimalFormatter.__super__.constructor.apply(this, arguments);
1041
1039
  }
1042
1040
 
1043
1041
  LongDecimalFormatter.prototype.get_type = function() {
@@ -1158,9 +1156,9 @@
1158
1156
  })();
1159
1157
  widths.reverse();
1160
1158
  return ((function() {
1161
- var _i, _ref4, _results;
1159
+ var _i, _ref, _results;
1162
1160
  _results = [];
1163
- for (index = _i = 0, _ref4 = widths.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; index = 0 <= _ref4 ? ++_i : --_i) {
1161
+ for (index = _i = 0, _ref = widths.length; 0 <= _ref ? _i < _ref : _i > _ref; index = 0 <= _ref ? ++_i : --_i) {
1164
1162
  if (widths.indexOf(widths[index], index + 1) === -1) {
1165
1163
  _results.push(widths[index]);
1166
1164
  }
@@ -1239,11 +1237,11 @@
1239
1237
  Currencies.currency_codes = function() {
1240
1238
  var data, _;
1241
1239
  return this.codes || (this.codes = (function() {
1242
- var _ref4, _results;
1243
- _ref4 = this.currencies;
1240
+ var _ref, _results;
1241
+ _ref = this.currencies;
1244
1242
  _results = [];
1245
- for (_ in _ref4) {
1246
- data = _ref4[_];
1243
+ for (_ in _ref) {
1244
+ data = _ref[_];
1247
1245
  _results.push(data.code);
1248
1246
  }
1249
1247
  return _results;
@@ -1251,11 +1249,11 @@
1251
1249
  };
1252
1250
 
1253
1251
  Currencies.for_code = function(currency_code) {
1254
- var country_name, data, result, _ref4;
1252
+ var country_name, data, result, _ref;
1255
1253
  result = null;
1256
- _ref4 = this.currencies;
1257
- for (country_name in _ref4) {
1258
- data = _ref4[country_name];
1254
+ _ref = this.currencies;
1255
+ for (country_name in _ref) {
1256
+ data = _ref[country_name];
1259
1257
  if (data.currency === currency_code) {
1260
1258
  result = {
1261
1259
  country: country_name,
@@ -1290,10 +1288,10 @@
1290
1288
  };
1291
1289
 
1292
1290
  ListFormatter.prototype.compose_list = function(list) {
1293
- var format_key, i, result, _i, _ref4;
1291
+ var format_key, i, result, _i, _ref;
1294
1292
  result = this.compose(this.formats.end || this.formats.middle || "", [list[list.length - 2], list[list.length - 1]]);
1295
1293
  if (list.length > 2) {
1296
- for (i = _i = 3, _ref4 = list.length; 3 <= _ref4 ? _i <= _ref4 : _i >= _ref4; i = 3 <= _ref4 ? ++_i : --_i) {
1294
+ for (i = _i = 3, _ref = list.length; 3 <= _ref ? _i <= _ref : _i >= _ref; i = 3 <= _ref ? ++_i : --_i) {
1297
1295
  format_key = i === list.length ? "start" : "middle";
1298
1296
  if (this.formats[format_key] == null) {
1299
1297
  format_key = "middle";
@@ -1311,7 +1309,7 @@
1311
1309
  _results = [];
1312
1310
  for (_i = 0, _len = elements.length; _i < _len; _i++) {
1313
1311
  element = elements[_i];
1314
- if (element !== null) {
1312
+ if (element != null) {
1315
1313
  _results.push(element);
1316
1314
  }
1317
1315
  }
@@ -1359,10 +1357,10 @@
1359
1357
  }
1360
1358
 
1361
1359
  Bidi.bidi_class_for = function(code_point) {
1362
- var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref4;
1363
- _ref4 = this.bidi_classes;
1364
- for (bidi_class in _ref4) {
1365
- ranges = _ref4[bidi_class];
1360
+ var bidi_class, end, range, range_list, range_offset, ranges, start, _i, _len, _ref;
1361
+ _ref = this.bidi_classes;
1362
+ for (bidi_class in _ref) {
1363
+ ranges = _ref[bidi_class];
1366
1364
  for (range_offset in ranges) {
1367
1365
  range_list = ranges[range_offset];
1368
1366
  for (_i = 0, _len = range_list.length; _i < _len; _i++) {
@@ -1412,15 +1410,15 @@
1412
1410
  };
1413
1411
 
1414
1412
  Bidi.prototype.reorder_visually = function() {
1415
- var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref4, _ref5;
1413
+ var depth, finish, i, level, lowest_odd, max, start, tmpb, tmpo, _i, _j, _k, _len, _ref, _ref1;
1416
1414
  if (!this.string_arr) {
1417
1415
  throw "No string given!";
1418
1416
  }
1419
1417
  max = 0;
1420
1418
  lowest_odd = MAX_DEPTH + 1;
1421
- _ref4 = this.levels;
1422
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
1423
- level = _ref4[_i];
1419
+ _ref = this.levels;
1420
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1421
+ level = _ref[_i];
1424
1422
  max = TwitterCldr.Utilities.max([level, max]);
1425
1423
  if (!TwitterCldr.Utilities.is_even(level)) {
1426
1424
  lowest_odd = TwitterCldr.Utilities.min([lowest_odd, level]);
@@ -1439,7 +1437,7 @@
1439
1437
  while (finish < this.levels.length && this.levels[finish] >= depth) {
1440
1438
  finish += 1;
1441
1439
  }
1442
- for (i = _k = 0, _ref5 = (finish - start) / 2; 0 <= _ref5 ? _k < _ref5 : _k > _ref5; i = 0 <= _ref5 ? ++_k : --_k) {
1440
+ for (i = _k = 0, _ref1 = (finish - start) / 2; 0 <= _ref1 ? _k < _ref1 : _k > _ref1; i = 0 <= _ref1 ? ++_k : --_k) {
1443
1441
  tmpb = this.levels[finish - i - 1];
1444
1442
  this.levels[finish - i - 1] = this.levels[start + i];
1445
1443
  this.levels[start + i] = tmpb;
@@ -1454,7 +1452,7 @@
1454
1452
  };
1455
1453
 
1456
1454
  Bidi.prototype.compute_paragraph_embedding_level = function() {
1457
- var type, _i, _len, _ref4;
1455
+ var type, _i, _len, _ref;
1458
1456
  if (["LTR", "RTL"].indexOf(this.direction) > -1) {
1459
1457
  if (this.direction === "LTR") {
1460
1458
  return 0;
@@ -1462,9 +1460,9 @@
1462
1460
  return 1;
1463
1461
  }
1464
1462
  } else {
1465
- _ref4 = this.types;
1466
- for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
1467
- type = _ref4[_i];
1463
+ _ref = this.types;
1464
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1465
+ type = _ref[_i];
1468
1466
  if (type === "L") {
1469
1467
  return 0;
1470
1468
  }
@@ -1481,13 +1479,13 @@
1481
1479
  };
1482
1480
 
1483
1481
  Bidi.prototype.compute_explicit_levels = function() {
1484
- var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref4, _ref5;
1482
+ var current_embedding, directional_override, embedding_stack, i, input, is_ltr, is_special, len, new_embedding, next_fmt, output, size, sp, _i, _j, _ref, _ref1;
1485
1483
  current_embedding = this.base_embedding;
1486
1484
  directional_override = -1;
1487
1485
  embedding_stack = [];
1488
1486
  this.formatter_indices || (this.formatter_indices = []);
1489
1487
  sp = 0;
1490
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1488
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1491
1489
  is_ltr = false;
1492
1490
  is_special = true;
1493
1491
  is_ltr = this.types[i] === "LRE" || this.types[i] === "LRO";
@@ -1512,7 +1510,7 @@
1512
1510
  sp -= 1;
1513
1511
  new_embedding = embedding_stack[sp];
1514
1512
  current_embedding = new_embedding & 0x7f;
1515
- directional_override = new_embedding < 0 ? (_ref5 = (new_embedding & 1) === 0) != null ? _ref5 : {
1513
+ directional_override = new_embedding < 0 ? (_ref1 = (new_embedding & 1) === 0) != null ? _ref1 : {
1516
1514
  "L": "R"
1517
1515
  } : -1;
1518
1516
  }
@@ -1542,10 +1540,10 @@
1542
1540
  };
1543
1541
 
1544
1542
  Bidi.prototype.compute_runs = function() {
1545
- var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref4, _ref5;
1543
+ var current_embedding, i, last_run_start, run_count, where, _i, _j, _ref, _ref1;
1546
1544
  run_count = 0;
1547
1545
  current_embedding = this.base_embedding;
1548
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1546
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1549
1547
  if (this.levels[i] !== current_embedding) {
1550
1548
  current_embedding = this.levels[i];
1551
1549
  run_count += 1;
@@ -1554,7 +1552,7 @@
1554
1552
  where = 0;
1555
1553
  last_run_start = 0;
1556
1554
  current_embedding = this.base_embedding;
1557
- for (i = _j = 0, _ref5 = this.length; 0 <= _ref5 ? _j < _ref5 : _j > _ref5; i = 0 <= _ref5 ? ++_j : --_j) {
1555
+ for (i = _j = 0, _ref1 = this.length; 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
1558
1556
  if (this.levels[i] !== current_embedding) {
1559
1557
  this.runs[where] = last_run_start;
1560
1558
  where += 1;
@@ -1649,8 +1647,8 @@
1649
1647
  };
1650
1648
 
1651
1649
  Bidi.prototype.resolve_implicit_levels = function() {
1652
- var i, _i, _ref4;
1653
- for (i = _i = 0, _ref4 = this.length; 0 <= _ref4 ? _i < _ref4 : _i > _ref4; i = 0 <= _ref4 ? ++_i : --_i) {
1650
+ var i, _i, _ref;
1651
+ for (i = _i = 0, _ref = this.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
1654
1652
  if ((this.levels[i] & 1) === 0) {
1655
1653
  if (this.types[i] === "R") {
1656
1654
  this.levels[i] += 1;
@@ -1719,11 +1717,11 @@
1719
1717
  };
1720
1718
 
1721
1719
  Bidi.prototype.reinsert_formatting_codes = function() {
1722
- var index, input, left_level, len, next_fmt, output, right_level, _i, _ref4;
1720
+ var index, input, left_level, len, next_fmt, output, right_level, _i, _ref;
1723
1721
  if ((this.formatter_indices != null) && this.formatter_indices.length > 0) {
1724
1722
  input = this.length;
1725
1723
  output = this.levels.length;
1726
- for (index = _i = _ref4 = this.formatter_indices.length - 1; _ref4 <= 0 ? _i <= 0 : _i >= 0; index = _ref4 <= 0 ? ++_i : --_i) {
1724
+ for (index = _i = _ref = this.formatter_indices.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; index = _ref <= 0 ? ++_i : --_i) {
1727
1725
  next_fmt = this.formatter_indices[index];
1728
1726
  len = output - next_fmt - 1;
1729
1727
  output = next_fmt;
@@ -1781,13 +1779,13 @@
1781
1779
  };
1782
1780
 
1783
1781
  Calendar.get_root = function(key, options) {
1784
- var format, names_form, root, _ref4;
1782
+ var format, names_form, root, _ref;
1785
1783
  if (options == null) {
1786
1784
  options = {};
1787
1785
  }
1788
1786
  root = this.calendar[key];
1789
1787
  names_form = options["names_form"] || "wide";
1790
- format = options.format || ((root != null ? (_ref4 = root["stand-alone"]) != null ? _ref4[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");
1788
+ format = options.format || ((root != null ? (_ref = root["stand-alone"]) != null ? _ref[names_form] : void 0 : void 0) != null ? "stand-alone" : "format");
1791
1789
  return root[format][names_form];
1792
1790
  };
1793
1791
 
@@ -1795,6 +1793,43 @@
1795
1793
 
1796
1794
  })();
1797
1795
 
1796
+ TwitterCldr.PhoneCodes = (function() {
1797
+ function PhoneCodes() {}
1798
+
1799
+ PhoneCodes.phone_codes = {"ac":"247","ad":"376","ae":"971","af":"93","ag":"1","ai":"1","al":"355","am":"374","an":"599","ao":"244","aq":"672","ar":"54","as":"1","at":"43","au":"61","aw":"297","ax":"358","az":"994","ba":"387","bb":"1","bd":"880","be":"32","bf":"226","bg":"359","bh":"973","bi":"257","bj":"229","bl":"590","bm":"1","bn":"673","bo":"591","br":"55","bs":"1","bt":"975","bw":"267","by":"375","bz":"501","ca":"1","cc":"61","cd":"243","cf":"236","cg":"242","ch":"41","ci":"225","ck":"682","cl":"56","cm":"237","cn":"86","co":"57","cr":"506","cu":"53","cv":"238","cx":"61","cy":"357","cz":"420","de":"49","dj":"253","dk":"45","dm":"1","do":"1","dz":"213","ec":"593","ee":"372","eg":"20","er":"291","es":"34","et":"251","fi":"358","fj":"679","fk":"500","fm":"691","fo":"298","fr":"33","ga":"241","gb":"44","gd":"1","ge":"995","gf":"594","gg":"44","gh":"233","gi":"350","gl":"299","gm":"220","gn":"224","gp":"590","gq":"240","gr":"30","gt":"502","gu":"1","gw":"245","gy":"592","hk":"852","hn":"504","hr":"385","ht":"509","hu":"36","id":"62","ie":"353","il":"972","im":"44","in":"91","io":"246","iq":"964","ir":"98","is":"354","it":"39","je":"44","jm":"1","jo":"962","jp":"81","ke":"254","kg":"996","kh":"855","ki":"686","km":"269","kn":"1","kp":"850","kr":"82","kw":"965","ky":"1","kz":"7","la":"856","lb":"961","lc":"1","li":"423","lk":"94","lr":"231","ls":"266","lt":"370","lu":"352","lv":"371","ly":"218","ma":"212","mc":"377","md":"373","me":"382","mg":"261","mh":"692","mk":"389","ml":"223","mm":"95","mn":"976","mo":"853","mp":"1","mq":"596","mr":"222","ms":"1","mt":"356","mu":"230","mv":"960","mw":"265","mx":"52","my":"60","mz":"258","na":"264","nc":"687","ne":"227","nf":"672","ng":"234","ni":"505","nl":"31","no":"47","np":"977","nr":"674","nu":"683","nz":"64","om":"968","pa":"507","pe":"51","pf":"689","pg":"675","ph":"63","pk":"92","pl":"48","pm":"508","pr":"1","ps":"972","pt":"351","pw":"680","py":"595","qa":"974","re":"262","ro":"40","rs":"381","ru":"7","rw":"250","sa":"966","sb":"677","sc":"248","sd":"249","se":"46","sg":"65","sh":"290","si":"386","sj":"47","sk":"421","sl":"232","sm":"378","sn":"221","so":"252","sr":"597","ss":"211","st":"239","sv":"503","sy":"963","sz":"268","tc":"1","td":"235","tf":"262","tg":"228","th":"66","tj":"992","tk":"690","tl":"670","tm":"993","tn":"216","to":"676","tr":"90","tt":"1","tv":"688","tw":"886","tz":"255","ua":"380","ug":"256","us":"1","uy":"598","uz":"998","va":"39","vc":"1","ve":"58","vg":"1","vi":"1","vn":"84","vu":"678","wf":"681","ws":"685","ye":"967","yt":"262","za":"27","zm":"260","zw":"263"};
1800
+
1801
+ PhoneCodes.territories = function() {
1802
+ var data, _;
1803
+ return this.codes || (this.codes = (function() {
1804
+ var _ref, _results;
1805
+ _ref = this.phone_codes;
1806
+ _results = [];
1807
+ for (data in _ref) {
1808
+ _ = _ref[data];
1809
+ _results.push(data);
1810
+ }
1811
+ return _results;
1812
+ }).call(this));
1813
+ };
1814
+
1815
+ PhoneCodes.code_for_territory = function(territory) {
1816
+ var phone_code, result, territory_code, _ref;
1817
+ result = null;
1818
+ _ref = this.phone_codes;
1819
+ for (territory_code in _ref) {
1820
+ phone_code = _ref[territory_code];
1821
+ if (territory_code === territory) {
1822
+ result = phone_code;
1823
+ break;
1824
+ }
1825
+ }
1826
+ return result;
1827
+ };
1828
+
1829
+ return PhoneCodes;
1830
+
1831
+ })();
1832
+
1798
1833
  TwitterCldr.NumberParser = (function() {
1799
1834
  function NumberParser() {
1800
1835
  this.group_separator = ",";
@@ -1830,11 +1865,11 @@
1830
1865
  }
1831
1866
  if (punct_list.length > 0 && punct_list.slice(-1)[0]["type"] === "decimal") {
1832
1867
  result = parseInt(((function() {
1833
- var _j, _len1, _ref4, _results;
1834
- _ref4 = num_list.slice(0, -1);
1868
+ var _j, _len1, _ref, _results;
1869
+ _ref = num_list.slice(0, -1);
1835
1870
  _results = [];
1836
- for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
1837
- num = _ref4[_j];
1871
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
1872
+ num = _ref[_j];
1838
1873
  _results.push(num.value);
1839
1874
  }
1840
1875
  return _results;