adp-web-components 0.1.80 → 0.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +8 -50
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +2 -2
  4. package/dist/cjs/form-dialog_13.cjs.entry.js +18 -5
  5. package/dist/cjs/{form-input-DH-U4kEM.js → form-input-CfVsbpFP.js} +1 -1
  6. package/dist/cjs/form-input_4.cjs.entry.js +4 -3
  7. package/dist/cjs/form-switch.cjs.entry.js +2 -2
  8. package/dist/cjs/general-form.cjs.entry.js +5 -5
  9. package/dist/cjs/general-inquiry-form.cjs.entry.js +5 -5
  10. package/dist/cjs/{get-language-from-url-D5rCyA1u.js → get-language-from-url-DoohcPbK.js} +3 -2
  11. package/dist/cjs/{get-local-language-D02WksZl.js → get-local-language-BqsQehIb.js} +1 -1
  12. package/dist/cjs/get-mock-files-C2Z4_Unw.js +53 -0
  13. package/dist/cjs/information-table.cjs.entry.js +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  16. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
  17. package/dist/cjs/part-lookup.cjs.entry.js +2 -2
  18. package/dist/cjs/{phone-validator-D6nzYTs8.js → phone-validator-CxBpDoPc.js} +300 -1184
  19. package/dist/cjs/service-booking-form.cjs.entry.js +5 -5
  20. package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
  21. package/dist/cjs/shift-components.cjs.js +1 -1
  22. package/dist/cjs/shift-switch.cjs.entry.js +1 -1
  23. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  24. package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
  25. package/dist/cjs/ssc-lookup-form.cjs.entry.js +5 -5
  26. package/dist/cjs/{state-object-B2D8PkT8.js → state-object-Cemo_BvB.js} +23 -1
  27. package/dist/cjs/test-drive-form.cjs.entry.js +5 -5
  28. package/dist/cjs/{validation-N-XMdEIM.js → validation-BAHdEc4w.js} +6 -0
  29. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +8 -8
  30. package/dist/cjs/vehicle-lookup.cjs.entry.js +20 -2
  31. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +3 -3
  32. package/dist/collection/components/components/empty.css +1 -1
  33. package/dist/collection/components/components/flexible-container.css +1 -1
  34. package/dist/collection/components/components/information-table.css +1 -1
  35. package/dist/collection/components/components/loading-spinner.css +1 -1
  36. package/dist/collection/components/components/shift-tab-content.css +1 -1
  37. package/dist/collection/components/components/shift-tabs.css +1 -1
  38. package/dist/collection/components/form-elements/form-input-preview.js +15 -2
  39. package/dist/collection/components/form-elements/form-select.js +22 -1
  40. package/dist/collection/components/forms/defaults/mappers.js +22 -0
  41. package/dist/collection/components/forms/defaults/validation.js +6 -0
  42. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  43. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  44. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  45. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  46. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  47. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  48. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  49. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  50. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  51. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +40 -0
  52. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  53. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  54. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  55. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  56. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  57. package/dist/collection/features/form-hook/form-hook.js +3 -2
  58. package/dist/collection/features/form-hook/functions.js +1 -3
  59. package/dist/collection/features/mocks/types.js +2 -2
  60. package/dist/collection/templates/vehicle-lookup/mock-loader.js +26 -0
  61. package/dist/components/dead-stock-lookup.js +1 -1
  62. package/dist/components/distributor-lookup.js +1 -1
  63. package/dist/components/flexible-container.js +1 -1
  64. package/dist/components/form-checkbox.js +1 -1
  65. package/dist/components/form-file.js +1 -1
  66. package/dist/components/form-input-preview.js +1 -1
  67. package/dist/components/form-input.js +1 -1
  68. package/dist/components/form-phone-number.js +1 -1
  69. package/dist/components/form-picker-input.js +1 -1
  70. package/dist/components/form-select.js +1 -1
  71. package/dist/components/form-structure-error.js +1 -1
  72. package/dist/components/form-structure.js +1 -1
  73. package/dist/components/form-switch.js +1 -1
  74. package/dist/components/form-text-area.js +1 -1
  75. package/dist/components/form-vin-input.js +1 -1
  76. package/dist/components/general-form.js +1 -1
  77. package/dist/components/general-inquiry-form.js +1 -1
  78. package/dist/components/information-table.js +1 -1
  79. package/dist/components/loading-spinner.js +1 -1
  80. package/dist/components/manufacturer-lookup.js +1 -1
  81. package/dist/components/manufacturer-part-lookup.js +1 -1
  82. package/dist/components/p-2M80mQ92.js +5 -0
  83. package/dist/components/{p-BiRjebkj.js → p-B7266ldU.js} +1 -1
  84. package/dist/components/p-BAn6k5iz.js +5 -0
  85. package/dist/components/{p-DY9gBU2J.js → p-BDvrnHcY.js} +1 -1
  86. package/dist/components/{p-DwyZCgYl.js → p-BUfelosa.js} +1 -1
  87. package/dist/components/{p-B14TvlWp.js → p-B_3K7xd3.js} +1 -1
  88. package/dist/components/p-Bcsn5xTx.js +5 -0
  89. package/dist/components/p-Buh0GWQA.js +5 -0
  90. package/dist/components/{p-BN3IFAWI.js → p-BwhGGY5t.js} +1 -1
  91. package/dist/components/{p-BFaCcwNv.js → p-C2FTnHaq.js} +1 -1
  92. package/dist/components/p-CAVJT1jj.js +5 -0
  93. package/dist/components/{p-DtCTkfsR.js → p-CCNDnApR.js} +1 -1
  94. package/dist/components/{p-CvoSPdhp.js → p-CFEn7Z9i.js} +1 -1
  95. package/dist/components/p-CHHtVaQS.js +5 -0
  96. package/dist/components/{p-DhQjm81u.js → p-CJDU6RVS.js} +1 -1
  97. package/dist/components/{p-CXoG03EM.js → p-COPzLsOv.js} +1 -1
  98. package/dist/components/{p-COS-bXsj.js → p-CRhdQvF0.js} +1 -1
  99. package/dist/components/{p-dM4PJkDk.js → p-C_A19Fb6.js} +1 -1
  100. package/dist/components/p-CfQGsxXq.js +5 -0
  101. package/dist/components/{p-D0oHH_yi.js → p-DGTzlRjc.js} +1 -1
  102. package/dist/components/{p-MJwr71KB.js → p-DJaWpqrV.js} +1 -1
  103. package/dist/components/p-DUL5kvyB.js +5 -0
  104. package/dist/components/p-DecFn5UV.js +5 -0
  105. package/dist/components/p-DesHNFME.js +5 -0
  106. package/dist/components/{p-8IdtkeX1.js → p-Dlt99ZuK.js} +1 -1
  107. package/dist/components/{p-B807sG0U.js → p-DqPjMHKd.js} +1 -1
  108. package/dist/components/{p-CeUdMJED.js → p-Dwo9gLGh.js} +1 -1
  109. package/dist/components/{p-CqTxdwgo.js → p-Dzxpac8N.js} +1 -1
  110. package/dist/components/p-DzzFOOEI.js +5 -0
  111. package/dist/components/{p-QsYqPaPW.js → p-HrmJ9PLe.js} +1 -1
  112. package/dist/components/{p-Dj3_tuTX.js → p-RMnat5PD.js} +1 -1
  113. package/dist/components/p-RvrrVwVv.js +5 -0
  114. package/dist/components/p-YHkues1M.js +5 -0
  115. package/dist/components/p-d53FlScY.js +5 -0
  116. package/dist/components/{p-CjZxWPIE.js → p-pjW67FwP.js} +1 -1
  117. package/dist/components/p-ri6ceTKZ.js +5 -0
  118. package/dist/components/part-lookup.js +1 -1
  119. package/dist/components/service-booking-form.js +1 -1
  120. package/dist/components/shift-accordion.js +1 -1
  121. package/dist/components/shift-checkbox.js +1 -1
  122. package/dist/components/shift-slider.js +1 -1
  123. package/dist/components/shift-switch.js +1 -1
  124. package/dist/components/shift-tab-content.js +1 -1
  125. package/dist/components/shift-tabs.js +1 -1
  126. package/dist/components/ssc-lookup-form.js +1 -1
  127. package/dist/components/test-drive-form.js +1 -1
  128. package/dist/components/vehicle-accessories.js +1 -1
  129. package/dist/components/vehicle-claimable-items.js +1 -1
  130. package/dist/components/vehicle-item-claim-form.js +1 -1
  131. package/dist/components/vehicle-lookup.js +1 -1
  132. package/dist/components/vehicle-paint-thickness.js +1 -1
  133. package/dist/components/vehicle-quotation-form.js +1 -1
  134. package/dist/components/vehicle-sale-information.js +1 -1
  135. package/dist/components/vehicle-service-history.js +1 -1
  136. package/dist/components/vehicle-specification.js +1 -1
  137. package/dist/components/vehicle-warranty-details.js +1 -1
  138. package/dist/esm/dead-stock-lookup_3.entry.js +5 -47
  139. package/dist/esm/flexible-container.entry.js +1 -1
  140. package/dist/esm/form-checkbox.entry.js +2 -2
  141. package/dist/esm/form-dialog_13.entry.js +18 -5
  142. package/dist/esm/{form-input-DKjuSVBS.js → form-input-BZhw7_xV.js} +1 -1
  143. package/dist/esm/form-input_4.entry.js +4 -3
  144. package/dist/esm/form-switch.entry.js +2 -2
  145. package/dist/esm/general-form.entry.js +5 -5
  146. package/dist/esm/general-inquiry-form.entry.js +5 -5
  147. package/dist/esm/{get-language-from-url-fGWv4JfI.js → get-language-from-url-X9X1Ax8Z.js} +3 -2
  148. package/dist/esm/{get-local-language-DtdpsfQH.js → get-local-language-DdBv5ynw.js} +1 -1
  149. package/dist/esm/get-mock-files-Crv0Pee_.js +51 -0
  150. package/dist/esm/information-table.entry.js +1 -1
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/loading-spinner.entry.js +1 -1
  153. package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
  154. package/dist/esm/part-lookup.entry.js +2 -2
  155. package/dist/esm/{phone-validator-CW0vHN1w.js → phone-validator-B48RfgJW.js} +300 -1184
  156. package/dist/esm/service-booking-form.entry.js +5 -5
  157. package/dist/esm/shift-checkbox.entry.js +1 -1
  158. package/dist/esm/shift-components.js +1 -1
  159. package/dist/esm/shift-switch.entry.js +1 -1
  160. package/dist/esm/shift-tab-content.entry.js +1 -1
  161. package/dist/esm/shift-tabs_2.entry.js +2 -2
  162. package/dist/esm/ssc-lookup-form.entry.js +5 -5
  163. package/dist/esm/{state-object-D__N3A52.js → state-object-DkkyIaIc.js} +23 -1
  164. package/dist/esm/test-drive-form.entry.js +5 -5
  165. package/dist/esm/{validation-CjIBF497.js → validation-DI1MnYKr.js} +6 -0
  166. package/dist/esm/vehicle-accessories_7.entry.js +8 -8
  167. package/dist/esm/vehicle-lookup.entry.js +20 -2
  168. package/dist/esm/vehicle-quotation-form.entry.js +3 -3
  169. package/dist/mocks/generated/standard-dealer/part-lookup.json +129 -0
  170. package/dist/mocks/generated/standard-dealer/vehicle-lookup.json +240 -0
  171. package/dist/shift-components/{p-9d25df8c.entry.js → p-17d8199b.entry.js} +1 -1
  172. package/dist/shift-components/{p-a6ad0fdf.entry.js → p-1cb2457b.entry.js} +1 -1
  173. package/dist/shift-components/{p-fd8ec358.entry.js → p-296ccfd9.entry.js} +1 -1
  174. package/dist/shift-components/{p-dcde6026.entry.js → p-2e50289a.entry.js} +1 -1
  175. package/dist/shift-components/{p-0ea039a0.entry.js → p-2fe3538e.entry.js} +1 -1
  176. package/dist/shift-components/{p-49803ea5.entry.js → p-417600b6.entry.js} +1 -1
  177. package/dist/shift-components/p-573d1313.entry.js +5 -0
  178. package/dist/shift-components/{p-136ce48d.entry.js → p-57fdf787.entry.js} +1 -1
  179. package/dist/shift-components/{p-00514dfd.entry.js → p-7de1057e.entry.js} +1 -1
  180. package/dist/shift-components/{p-37bbc653.entry.js → p-8079b426.entry.js} +1 -1
  181. package/dist/shift-components/p-880c7995.entry.js +5 -0
  182. package/dist/shift-components/p-93d7eaa0.entry.js +5 -0
  183. package/dist/shift-components/{p-DOaMIJLj.js → p-B1_PA5hq.js} +1 -1
  184. package/dist/shift-components/{p-zqc-VRCh.js → p-BJJ8dVwO.js} +1 -1
  185. package/dist/shift-components/{p-DFsecEMm.js → p-BO1gEyb6.js} +1 -1
  186. package/dist/shift-components/p-CIjUcLUD.js +5 -0
  187. package/dist/shift-components/p-CUEKpDuL.js +5 -0
  188. package/dist/shift-components/p-Cm_2J53u.js +5 -0
  189. package/dist/shift-components/p-LS7zYjdk.js +5 -0
  190. package/dist/shift-components/{p-2cb2cf2c.entry.js → p-a65c7ffb.entry.js} +1 -1
  191. package/dist/shift-components/p-b5f4ae44.entry.js +5 -0
  192. package/dist/shift-components/{p-fa57b412.entry.js → p-bc069fd2.entry.js} +1 -1
  193. package/dist/shift-components/p-cd20a29e.entry.js +5 -0
  194. package/dist/shift-components/{p-3eb1890a.entry.js → p-cff21232.entry.js} +1 -1
  195. package/dist/shift-components/p-df2434ff.entry.js +5 -0
  196. package/dist/shift-components/p-e7ac7d2c.entry.js +5 -0
  197. package/dist/shift-components/{p-8049016c.entry.js → p-f4914abc.entry.js} +1 -1
  198. package/dist/shift-components/p-f78a1839.entry.js +5 -0
  199. package/dist/shift-components/{p-31193ab5.entry.js → p-face9d3f.entry.js} +1 -1
  200. package/dist/shift-components/shift-components.esm.js +1 -1
  201. package/dist/types/components/form-elements/form-input-preview.d.ts +1 -0
  202. package/dist/types/components/form-elements/form-select.d.ts +1 -0
  203. package/dist/types/components/forms/defaults/mappers.d.ts +4 -0
  204. package/dist/types/components/forms/defaults/validation.d.ts +2 -0
  205. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +3 -0
  206. package/dist/types/components.d.ts +16 -0
  207. package/dist/types/features/mocks/types.d.ts +2 -2
  208. package/package.json +1 -1
  209. package/dist/components/p-B68P3DtP.js +0 -5
  210. package/dist/components/p-B9Kquvk4.js +0 -5
  211. package/dist/components/p-CPGswmtd.js +0 -5
  212. package/dist/components/p-CXzb5oyt.js +0 -5
  213. package/dist/components/p-CZ_bF39p.js +0 -5
  214. package/dist/components/p-DKzEP2g4.js +0 -5
  215. package/dist/components/p-DOS_lP0E.js +0 -5
  216. package/dist/components/p-D_bnut2e.js +0 -5
  217. package/dist/components/p-MdiEjk1X.js +0 -5
  218. package/dist/components/p-VufjPJkT.js +0 -5
  219. package/dist/components/p-aHqL2KKd.js +0 -5
  220. package/dist/components/p-gEeo-RSf.js +0 -5
  221. package/dist/components/p-rvbbkr0i.js +0 -5
  222. package/dist/components/p-zyFVlTck.js +0 -5
  223. package/dist/mocks/part-lookup.json +0 -281
  224. package/dist/shift-components/p-16eb4c57.entry.js +0 -5
  225. package/dist/shift-components/p-6fca3b48.entry.js +0 -5
  226. package/dist/shift-components/p-9b910889.entry.js +0 -5
  227. package/dist/shift-components/p-D-IGTVAo.js +0 -5
  228. package/dist/shift-components/p-DCHyQw_L.js +0 -5
  229. package/dist/shift-components/p-D_IVXzoK.js +0 -5
  230. package/dist/shift-components/p-b1f9f6e3.entry.js +0 -5
  231. package/dist/shift-components/p-baa868f8.entry.js +0 -5
  232. package/dist/shift-components/p-d26ff83d.entry.js +0 -5
  233. package/dist/shift-components/p-d915cd1c.entry.js +0 -5
  234. package/dist/shift-components/p-e2d72fb9.entry.js +0 -5
@@ -4,9 +4,9 @@
4
4
  */
5
5
  'use strict';
6
6
 
7
- var getLanguageFromUrl = require('./get-language-from-url-D5rCyA1u.js');
7
+ var getLanguageFromUrl = require('./get-language-from-url-DoohcPbK.js');
8
8
  require('./types-DV_cOCRi.js');
9
- var getLocalLanguage = require('./get-local-language-D02WksZl.js');
9
+ var getLocalLanguage = require('./get-local-language-BqsQehIb.js');
10
10
  var loaderIcon = require('./loader-icon-j5dMQ4bN.js');
11
11
 
12
12
  function parseLooseJson(loose) {
@@ -59,20 +59,239 @@ async function fetchJson(url) {
59
59
  return data;
60
60
  }
61
61
 
62
+ const formLanguageChange = async (formContext, newLanguage) => {
63
+ var _a, _b, _c, _d, _e;
64
+ const sharedLocales = await getLocalLanguage.getSharedFormLocal(newLanguage);
65
+ const LS = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.localization;
66
+ const structureLocalization = typeof LS === 'object' ? ((_d = (_c = LS === null || LS === void 0 ? void 0 : LS[newLanguage]) !== null && _c !== void 0 ? _c : LS === null || LS === void 0 ? void 0 : LS.en) !== null && _d !== void 0 ? _d : {}) : {};
67
+ formContext.locale = Object.assign(Object.assign({}, structureLocalization), { sharedFormLocales: Object.assign(Object.assign({}, sharedLocales), structureLocalization === null || structureLocalization === void 0 ? void 0 : structureLocalization.sharedFormLocales) });
68
+ formContext.localeLanguage = newLanguage;
69
+ (_e = formContext.form) === null || _e === void 0 ? void 0 : _e.rerender({ rerenderAll: true });
70
+ };
71
+ const formErrorHandler = async (formContext, error) => {
72
+ var _a, _b, _c;
73
+ const message = error.message || ((_c = (_b = (_a = formContext.locale) === null || _a === void 0 ? void 0 : _a.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.wildCard) || '';
74
+ if (formContext === null || formContext === void 0 ? void 0 : formContext.errorCallback)
75
+ formContext.errorCallback(error, message);
76
+ else
77
+ formContext.errorMessage = message;
78
+ };
79
+ const formLoadingHandler = async (formContext, isLoading) => {
80
+ formContext.isLoading = isLoading;
81
+ if (formContext.loadingChanges)
82
+ formContext.loadingChanges(isLoading);
83
+ };
84
+ const formSuccessHandler = async (formContext, data) => {
85
+ if (formContext.successCallback)
86
+ formContext.successCallback(data, formContext.locale['Form submitted successfully.'] || '');
87
+ else
88
+ formContext.form.openDialog();
89
+ if (!formContext.disableScrollToTop) {
90
+ const formDom = formContext.el.shadowRoot || formContext.el;
91
+ let targetElement = formDom instanceof ShadowRoot ? formDom.firstElementChild : formDom;
92
+ const yOffset = -100;
93
+ const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
94
+ window.scrollTo({ top: Math.max(y, 0), behavior: 'smooth' });
95
+ }
96
+ };
97
+ const formDidLoadHandler = async (formContext, validator) => {
98
+ var _a, _b;
99
+ if (!formContext.structure) {
100
+ if (formContext.gistId) {
101
+ const [newGistStructure] = await Promise.all([gistLoader(formContext.gistId), formContext.changeLanguage(formContext.language)]);
102
+ formContext.structure = newGistStructure;
103
+ }
104
+ else if (formContext.structureUrl) {
105
+ const [newGistStructure] = await Promise.all([fetchJson(formContext.structureUrl), formContext.changeLanguage(formContext.language)]);
106
+ formContext.structure = newGistStructure;
107
+ }
108
+ }
109
+ formContext.localeLanguage = formContext.language;
110
+ await formContext.changeLanguage(formContext.language);
111
+ if (!formContext.isMobileForm) {
112
+ try {
113
+ const key = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recaptchaKey;
114
+ if (key) {
115
+ const script = document.createElement('script');
116
+ script.src = `https://www.google.com/recaptcha/api.js?render=${key}&hl=${formContext.language}`;
117
+ script.async = true;
118
+ script.defer = true;
119
+ document.head.appendChild(script);
120
+ }
121
+ }
122
+ catch (error) {
123
+ console.log(error);
124
+ }
125
+ }
126
+ formContext.form = new getLanguageFromUrl.FormHook(formContext, validator);
127
+ };
128
+ const formGetFormHandler = async (formContext) => {
129
+ if (formContext.form)
130
+ return formContext.form;
131
+ };
132
+ const handleFormSubmit = async (formContext) => {
133
+ if (formContext.form)
134
+ return formContext.form.submit();
135
+ };
136
+ const formStructureRenderedHandler = async (formContext, isRendered) => {
137
+ var _a;
138
+ if (isRendered)
139
+ (_a = formContext.formReadyCallback) === null || _a === void 0 ? void 0 : _a.call(formContext);
140
+ };
141
+ const marketingQueryParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gclid', 'fbclid'];
142
+ const getMarketingValues = (structure) => {
143
+ var _a;
144
+ if ((_a = structure === null || structure === void 0 ? void 0 : structure.data) === null || _a === void 0 ? void 0 : _a.disableUTMLog)
145
+ return {};
146
+ const params = new URLSearchParams(window.location.search);
147
+ if (typeof params.get('disable_utm_log') === 'string' && params.get('disable_utm_log') === 'true')
148
+ return {};
149
+ const marketingValues = {};
150
+ marketingQueryParams.forEach(param => {
151
+ if (!!params.get(param))
152
+ marketingValues[param] = params.get(param);
153
+ });
154
+ return marketingValues;
155
+ };
156
+ const onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
158
+ try {
159
+ context.setIsLoading(true);
160
+ // if (formValues?.['phone'] && !isValidPhoneNumber(formValues?.['phone'])) delete formValues?.['phone'];
161
+ Object.keys(formValues).forEach(key => {
162
+ if (context[`${key}-format`]) {
163
+ formValues[key] = context[`${key}-format`];
164
+ }
165
+ });
166
+ const hasAdditionalData = !!((_b = (_a = context.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.truncatedFields) && !!((_e = Object.keys((_d = (_c = context.structure) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.truncatedFields)) === null || _e === void 0 ? void 0 : _e.length);
167
+ let additionalData = {};
168
+ const marketingValues = getMarketingValues(context === null || context === void 0 ? void 0 : context.structure);
169
+ let payload = Object.assign({}, formValues);
170
+ if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
171
+ payload = Object.assign(Object.assign({}, payload), (_j = (_h = context.structure) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.extraPayload);
172
+ if (hasAdditionalData)
173
+ payload.additionalData = Object.assign({}, additionalData);
174
+ if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
175
+ payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
176
+ if (hasAdditionalData) {
177
+ Object.entries((_l = (_k = context.structure) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.truncatedFields).forEach(([oldKey, truncateValue]) => {
178
+ if (Array.isArray(truncateValue)) {
179
+ let constructNewValue = '';
180
+ truncateValue.forEach(key => {
181
+ constructNewValue += payload[key.toString()] || key.toString();
182
+ });
183
+ payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
184
+ }
185
+ else if (typeof truncateValue === 'string' && truncateValue) {
186
+ if (oldKey.startsWith('parse date: ')) {
187
+ let tempKey = oldKey.replaceAll('parse date: ', '');
188
+ payload[tempKey] = loaderIcon.dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
189
+ }
190
+ else if (oldKey.startsWith('format date: ')) {
191
+ let tempKey = oldKey.replaceAll('format date: ', '');
192
+ payload[tempKey] = loaderIcon.dateFnsExports.formatISO(payload[tempKey]);
193
+ }
194
+ else {
195
+ additionalData[truncateValue] = payload[oldKey];
196
+ delete payload[oldKey];
197
+ }
198
+ }
199
+ });
200
+ }
201
+ let header = {
202
+ 'Content-Type': 'application/json',
203
+ 'Brand': (_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.brandId,
204
+ 'Accept-Language': context.localeLanguage || 'en',
205
+ };
206
+ if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
207
+ header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
208
+ if (!!((_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader))
209
+ header = Object.assign(Object.assign({}, header), (_s = (_r = context.structure) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.extraHeader);
210
+ let requestEndpoint = '';
211
+ if (context.isMobileForm) {
212
+ const token = await context.getMobileToken();
213
+ if (token.toLowerCase().startsWith('bearer')) {
214
+ header['Authorization'] = token;
215
+ requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppUrl;
216
+ }
217
+ else {
218
+ header['verification-token'] = token;
219
+ requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestAppCheckUrl;
220
+ }
221
+ }
222
+ else {
223
+ requestEndpoint = (_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.requestUrl;
224
+ if ((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey) {
225
+ const token = await grecaptcha.execute((_2 = (_1 = context.structure) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.recaptchaKey, { action: 'submit' });
226
+ header['Recaptcha-Token'] = token;
227
+ }
228
+ }
229
+ if (context.isDev)
230
+ requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
231
+ if (!requestEndpoint) {
232
+ throw new Error('Request endpoint is not configured');
233
+ }
234
+ const method = ((_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) || 'POST';
235
+ if (['get', 'head'].includes(method.toLowerCase()))
236
+ header = Object.assign(Object.assign({}, header), marketingValues);
237
+ else
238
+ payload = Object.assign(Object.assign({}, payload), marketingValues);
239
+ if (middleware) {
240
+ const middlewareRes = middleware(payload, header, requestEndpoint);
241
+ payload = Object.assign({}, middlewareRes.payload);
242
+ header = Object.assign({}, middlewareRes.header);
243
+ requestEndpoint = middlewareRes.url;
244
+ }
245
+ Object.values(context.form.pendingRequests).forEach(async (req) => {
246
+ try {
247
+ await req();
248
+ }
249
+ catch (error) {
250
+ console.error(error);
251
+ }
252
+ });
253
+ const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_6 = (_5 = context.structure) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.requestMethod) || 'POST' }, (((_9 = (_8 = (_7 = context.structure) === null || _7 === void 0 ? void 0 : _7.data) === null || _8 === void 0 ? void 0 : _8.requestMethod) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
254
+ if (response.ok) {
255
+ const result = await (response === null || response === void 0 ? void 0 : response.json());
256
+ if (afterSuccess)
257
+ await afterSuccess(payload, header);
258
+ context.setSuccessCallback(result);
259
+ setTimeout(() => {
260
+ context.form.reset();
261
+ context.form.rerender({ rerenderForm: true, rerenderAll: true });
262
+ }, 100);
263
+ }
264
+ else {
265
+ const contentType = response.headers.get('content-type');
266
+ const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_11 = (_10 = (await response.json())) === null || _10 === void 0 ? void 0 : _10.message) === null || _11 === void 0 ? void 0 : _11.body : await response.text();
267
+ throw new Error(errorText);
268
+ }
269
+ }
270
+ catch (error) {
271
+ console.error(error);
272
+ context.setErrorCallback(error);
273
+ }
274
+ finally {
275
+ context.setIsLoading(false);
276
+ }
277
+ };
278
+ const functionHooks = {
279
+ formLanguageChange,
280
+ formErrorHandler,
281
+ handleFormSubmit,
282
+ formLoadingHandler,
283
+ formSuccessHandler,
284
+ formDidLoadHandler,
285
+ formGetFormHandler,
286
+ onFormSubmit,
287
+ formStructureRenderedHandler,
288
+ };
289
+
62
290
  // This file is a workaround for a bug in web browsers' "native"
63
291
  // ES6 importing system which is uncapable of importing "*.json" files.
64
292
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
65
293
  var metadata = {"version":4,"country_calling_codes":{"1":["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],"7":["RU","KZ"],"20":["EG"],"27":["ZA"],"30":["GR"],"31":["NL"],"32":["BE"],"33":["FR"],"34":["ES"],"36":["HU"],"39":["IT","VA"],"40":["RO"],"41":["CH"],"43":["AT"],"44":["GB","GG","IM","JE"],"45":["DK"],"46":["SE"],"47":["NO","SJ"],"48":["PL"],"49":["DE"],"51":["PE"],"52":["MX"],"53":["CU"],"54":["AR"],"55":["BR"],"56":["CL"],"57":["CO"],"58":["VE"],"60":["MY"],"61":["AU","CC","CX"],"62":["ID"],"63":["PH"],"64":["NZ"],"65":["SG"],"66":["TH"],"81":["JP"],"82":["KR"],"84":["VN"],"86":["CN"],"90":["TR"],"91":["IN"],"92":["PK"],"93":["AF"],"94":["LK"],"95":["MM"],"98":["IR"],"211":["SS"],"212":["MA","EH"],"213":["DZ"],"216":["TN"],"218":["LY"],"220":["GM"],"221":["SN"],"222":["MR"],"223":["ML"],"224":["GN"],"225":["CI"],"226":["BF"],"227":["NE"],"228":["TG"],"229":["BJ"],"230":["MU"],"231":["LR"],"232":["SL"],"233":["GH"],"234":["NG"],"235":["TD"],"236":["CF"],"237":["CM"],"238":["CV"],"239":["ST"],"240":["GQ"],"241":["GA"],"242":["CG"],"243":["CD"],"244":["AO"],"245":["GW"],"246":["IO"],"247":["AC"],"248":["SC"],"249":["SD"],"250":["RW"],"251":["ET"],"252":["SO"],"253":["DJ"],"254":["KE"],"255":["TZ"],"256":["UG"],"257":["BI"],"258":["MZ"],"260":["ZM"],"261":["MG"],"262":["RE","YT"],"263":["ZW"],"264":["NA"],"265":["MW"],"266":["LS"],"267":["BW"],"268":["SZ"],"269":["KM"],"290":["SH","TA"],"291":["ER"],"297":["AW"],"298":["FO"],"299":["GL"],"350":["GI"],"351":["PT"],"352":["LU"],"353":["IE"],"354":["IS"],"355":["AL"],"356":["MT"],"357":["CY"],"358":["FI","AX"],"359":["BG"],"370":["LT"],"371":["LV"],"372":["EE"],"373":["MD"],"374":["AM"],"375":["BY"],"376":["AD"],"377":["MC"],"378":["SM"],"380":["UA"],"381":["RS"],"382":["ME"],"383":["XK"],"385":["HR"],"386":["SI"],"387":["BA"],"389":["MK"],"420":["CZ"],"421":["SK"],"423":["LI"],"500":["FK"],"501":["BZ"],"502":["GT"],"503":["SV"],"504":["HN"],"505":["NI"],"506":["CR"],"507":["PA"],"508":["PM"],"509":["HT"],"590":["GP","BL","MF"],"591":["BO"],"592":["GY"],"593":["EC"],"594":["GF"],"595":["PY"],"596":["MQ"],"597":["SR"],"598":["UY"],"599":["CW","BQ"],"670":["TL"],"672":["NF"],"673":["BN"],"674":["NR"],"675":["PG"],"676":["TO"],"677":["SB"],"678":["VU"],"679":["FJ"],"680":["PW"],"681":["WF"],"682":["CK"],"683":["NU"],"685":["WS"],"686":["KI"],"687":["NC"],"688":["TV"],"689":["PF"],"690":["TK"],"691":["FM"],"692":["MH"],"850":["KP"],"852":["HK"],"853":["MO"],"855":["KH"],"856":["LA"],"880":["BD"],"886":["TW"],"960":["MV"],"961":["LB"],"962":["JO"],"963":["SY"],"964":["IQ"],"965":["KW"],"966":["SA"],"967":["YE"],"968":["OM"],"970":["PS"],"971":["AE"],"972":["IL"],"973":["BH"],"974":["QA"],"975":["BT"],"976":["MN"],"977":["NP"],"992":["TJ"],"993":["TM"],"994":["AZ"],"995":["GE"],"996":["KG"],"998":["UZ"]},"countries":{"AC":["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],"AD":["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],"AE":["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],"AF":["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],"AG":["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],"AI":["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],"AL":["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],"AM":["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],"AO":["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],"AR":["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],"AS":["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],"AT":["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],"AU":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"AW":["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],"AX":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],"AZ":["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],"BA":["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],"BB":["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],"BD":["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],"BE":["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],"BF":["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],"BG":["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],"BH":["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],"BI":["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],"BJ":["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],"BL":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"BM":["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],"BN":["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],"BO":["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],"BQ":["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],"BR":["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],"BS":["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],"BT":["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],"BW":["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],"BY":["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],"BZ":["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],"CA":["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],"CC":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CD":["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],"CF":["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],"CG":["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],"CH":["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],"CI":["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],"CK":["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],"CL":["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],"CM":["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],"CN":["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],"CO":["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],"CR":["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],"CU":["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],"CV":["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],"CW":["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],"CX":["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],"CY":["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],"CZ":["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],"DE":["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],"DJ":["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],"DK":["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],"DM":["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],"DO":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],"DZ":["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],"EC":["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],"EE":["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"EG":["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],"EH":["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],"ER":["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],"ES":["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],"ET":["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],"FI":["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],"FJ":["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],"FK":["500","00","[2-7]\\d{4}",[5]],"FM":["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],"FO":["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],"FR":["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],"GA":["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],"GB":["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],"GD":["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],"GE":["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],"GF":["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],"GG":["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],"GH":["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],"GI":["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],"GL":["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],"GM":["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"GN":["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],"GP":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"GQ":["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],"GR":["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],"GT":["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"GU":["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],"GW":["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],"GY":["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"HK":["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],"HN":["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],"HR":["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],"HT":["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],"HU":["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],"ID":["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],"IE":["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"IL":["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],"IM":["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],"IN":["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689])\\d|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],"IO":["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],"IQ":["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],"IR":["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],"IS":["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],"IT":["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],"JE":["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],"JM":["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],"JO":["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],"JP":["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],"KE":["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],"KG":["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"KH":["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"KI":["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],"KM":["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],"KN":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],"KP":["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],"KR":["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],"KW":["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],"KY":["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],"KZ":["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],"LA":["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],"LB":["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],"LC":["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],"LI":["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],"LK":["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],"LR":["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],"LS":["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],"LT":["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],"LU":["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],"LV":["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],"LY":["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],"MA":["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:[19]|2[2-46-9]|3[3-9])|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:(?:18|4[0679]|5[03])\\d|2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9]))\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],"MC":["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],"MD":["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],"ME":["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],"MF":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],"MG":["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],"MH":["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],"MK":["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],"ML":["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],"MM":["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],"MN":["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],"MO":["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],"MP":["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],"MQ":["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"MR":["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],"MS":["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],"MT":["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],"MU":["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],"MV":["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],"MW":["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],"MX":["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],"MY":["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],"MZ":["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],"NA":["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"NC":["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],"NE":["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],"NF":["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],"NG":["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],"NI":["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],"NL":["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],"NO":["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],"NP":["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],"NR":["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],"NU":["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],"NZ":["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],"OM":["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],"PA":["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],"PE":["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],"PF":["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"PG":["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],"PH":["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],"PK":["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],"PL":["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],"PM":["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],"PR":["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],"PS":["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"PT":["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],"PW":["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"PY":["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],"QA":["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],"RE":["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],"RO":["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],"RS":["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],"RU":["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],"RW":["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],"SA":["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],"SB":["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],"SC":["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],"SD":["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],"SE":["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],"SG":["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],"SH":["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],"SI":["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],"SJ":["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],"SK":["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],"SL":["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],"SM":["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],"SN":["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],"SO":["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],"SR":["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],"SS":["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],"ST":["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],"SV":["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],"SX":["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],"SY":["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],"SZ":["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],"TA":["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],"TC":["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],"TD":["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],"TG":["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],"TH":["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],"TJ":["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],"TK":["690","00","[2-47]\\d{3,6}",[4,5,6,7]],"TL":["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],"TM":["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],"TN":["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],"TO":["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],"TR":["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],"TT":["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],"TV":["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"TW":["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],"TZ":["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],"UA":["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],"UG":["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],"US":["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],"UY":["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],"UZ":["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],"VA":["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],"VC":["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],"VE":["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],"VG":["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],"VI":["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],"VN":["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],"VU":["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],"WF":["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],"WS":["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],"XK":["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],"YE":["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],"YT":["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],"ZA":["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],"ZM":["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],"ZW":["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},"nonGeographic":{"800":["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],"808":["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],"870":["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],"878":["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],"881":["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],"882":["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],"883":["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],"888":["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],"979":["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};
66
294
 
67
- // Importing from a ".js" file is a workaround for Node.js "ES Modules"
68
- // importing system which is even uncapable of importing "*.json" files.
69
-
70
- function withMetadataArgument(func, _arguments) {
71
- var args = Array.prototype.slice.call(_arguments);
72
- args.push(metadata);
73
- return func.apply(this, args)
74
- }
75
-
76
295
  // Copy-pasted from:
77
296
  // https://github.com/substack/semver-compare/blob/master/index.js
78
297
  //
@@ -105,12 +324,12 @@ function isObject(object) {
105
324
  return object !== undefined && object !== null && object.constructor === objectConstructor;
106
325
  }
107
326
 
108
- function _typeof$c(o) { "@babel/helpers - typeof"; return _typeof$c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$c(o); }
109
- function _classCallCheck$8(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
110
- function _defineProperties$7(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$b(o.key), o); } }
111
- function _createClass$8(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
112
- function _toPropertyKey$b(t) { var i = _toPrimitive$b(t, "string"); return "symbol" == _typeof$c(i) ? i : i + ""; }
113
- function _toPrimitive$b(t, r) { if ("object" != _typeof$c(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$c(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
327
+ function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
328
+ function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
329
+ function _defineProperties$7(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o); } }
330
+ function _createClass$7(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
331
+ function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
332
+ function _toPrimitive$7(t, r) { if ("object" != _typeof$7(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$7(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
114
333
 
115
334
  // Added "idd_prefix" and "default_idd_prefix".
116
335
  var V3 = '1.2.0';
@@ -125,12 +344,12 @@ var CALLING_CODE_REG_EXP = /^\d+$/;
125
344
  */
126
345
  var Metadata = /*#__PURE__*/function () {
127
346
  function Metadata(metadata) {
128
- _classCallCheck$8(this, Metadata);
347
+ _classCallCheck$7(this, Metadata);
129
348
  validateMetadata(metadata);
130
349
  this.metadata = metadata;
131
350
  setVersion.call(this, metadata);
132
351
  }
133
- return _createClass$8(Metadata, [{
352
+ return _createClass$7(Metadata, [{
134
353
  key: "getCountries",
135
354
  value: function getCountries() {
136
355
  return Object.keys(this.metadata.countries).filter(function (_) {
@@ -371,12 +590,12 @@ var Metadata = /*#__PURE__*/function () {
371
590
  }();
372
591
  var NumberingPlan = /*#__PURE__*/function () {
373
592
  function NumberingPlan(metadata, globalMetadataObject) {
374
- _classCallCheck$8(this, NumberingPlan);
593
+ _classCallCheck$7(this, NumberingPlan);
375
594
  this.globalMetadataObject = globalMetadataObject;
376
595
  this.metadata = metadata;
377
596
  setVersion.call(this, globalMetadataObject.metadata);
378
597
  }
379
- return _createClass$8(NumberingPlan, [{
598
+ return _createClass$7(NumberingPlan, [{
380
599
  key: "callingCode",
381
600
  value: function callingCode() {
382
601
  return this.metadata[0];
@@ -531,11 +750,11 @@ var NumberingPlan = /*#__PURE__*/function () {
531
750
  }();
532
751
  var Format = /*#__PURE__*/function () {
533
752
  function Format(format, metadata) {
534
- _classCallCheck$8(this, Format);
753
+ _classCallCheck$7(this, Format);
535
754
  this._format = format;
536
755
  this.metadata = metadata;
537
756
  }
538
- return _createClass$8(Format, [{
757
+ return _createClass$7(Format, [{
539
758
  key: "pattern",
540
759
  value: function pattern() {
541
760
  return this._format[0];
@@ -599,11 +818,11 @@ var Format = /*#__PURE__*/function () {
599
818
  var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
600
819
  var Type = /*#__PURE__*/function () {
601
820
  function Type(type, metadata) {
602
- _classCallCheck$8(this, Type);
821
+ _classCallCheck$7(this, Type);
603
822
  this.type = type;
604
823
  this.metadata = metadata;
605
824
  }
606
- return _createClass$8(Type, [{
825
+ return _createClass$7(Type, [{
607
826
  key: "pattern",
608
827
  value: function pattern() {
609
828
  if (this.metadata.v1) return this.type;
@@ -658,7 +877,7 @@ function validateMetadata(metadata) {
658
877
  // so istanbul will show this as "branch not covered".
659
878
  /* istanbul ignore next */
660
879
  var typeOf = function typeOf(_) {
661
- return _typeof$c(_);
880
+ return _typeof$7(_);
662
881
  };
663
882
 
664
883
  /**
@@ -678,11 +897,6 @@ function getCountryCallingCode(country, metadata) {
678
897
  }
679
898
  throw new Error("Unknown country: ".concat(country));
680
899
  }
681
- function isSupportedCountry(country, metadata) {
682
- // metadata = new Metadata(metadata)
683
- // return metadata.hasCountry(country)
684
- return metadata.countries.hasOwnProperty(country);
685
- }
686
900
  function setVersion(metadata) {
687
901
  var version = metadata.version;
688
902
  if (typeof version === 'number') {
@@ -873,9 +1087,9 @@ function matchesEntirely(text, regularExpressionText) {
873
1087
  return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
874
1088
  }
875
1089
 
876
- function _createForOfIteratorHelperLoose$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
877
- function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
878
- function _arrayLikeToArray$9(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1090
+ function _createForOfIteratorHelperLoose$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1091
+ function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
1092
+ function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
879
1093
  var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
880
1094
 
881
1095
  // Finds out national phone number type (fixed line, mobile, etc)
@@ -931,7 +1145,7 @@ function getNumberType(input, options, metadata) {
931
1145
  }
932
1146
  return 'FIXED_LINE';
933
1147
  }
934
- for (var _iterator = _createForOfIteratorHelperLoose$6(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
1148
+ for (var _iterator = _createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
935
1149
  var type = _step.value;
936
1150
  if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
937
1151
  return type;
@@ -1035,11 +1249,6 @@ function couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {
1035
1249
  }
1036
1250
 
1037
1251
  // The minimum length of the national significant number.
1038
- var MIN_LENGTH_FOR_NSN = 2;
1039
-
1040
- // The ITU says the maximum length should be 15,
1041
- // but one can find longer numbers in Germany.
1042
- var MAX_LENGTH_FOR_NSN = 17;
1043
1252
 
1044
1253
  // The maximum length of the country calling code.
1045
1254
  var MAX_LENGTH_COUNTRY_CODE = 3;
@@ -1194,9 +1403,9 @@ function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
1194
1403
  };
1195
1404
  }
1196
1405
 
1197
- function _createForOfIteratorHelperLoose$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1198
- function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
1199
- function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1406
+ function _createForOfIteratorHelperLoose$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1407
+ function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
1408
+ function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1200
1409
 
1201
1410
  // Returns the exact country that the `nationalPhoneNumber` belongs to
1202
1411
  // in cases of ambiguity, i.e. when multiple countries share the same "country calling code".
@@ -1208,7 +1417,7 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
1208
1417
 
1209
1418
  // const matchingCountries = []
1210
1419
 
1211
- for (var _iterator = _createForOfIteratorHelperLoose$5(countries), _step; !(_step = _iterator()).done;) {
1420
+ for (var _iterator = _createForOfIteratorHelperLoose$4(countries), _step; !(_step = _iterator()).done;) {
1212
1421
  var country = _step.value;
1213
1422
  metadata.selectNumberingPlan(country);
1214
1423
  // "Leading digits" patterns are only defined for about 20% of all countries.
@@ -1666,188 +1875,21 @@ function getIddPrefix(country, callingCode, metadata) {
1666
1875
  }
1667
1876
  }
1668
1877
 
1669
- // The RFC 3966 format for extensions.
1670
- var RFC3966_EXTN_PREFIX = ';ext=';
1671
-
1672
1878
  /**
1673
- * Helper method for constructing regular expressions for parsing. Creates
1674
- * an expression that captures up to max_length digits.
1675
- * @return {string} RegEx pattern to capture extension digits.
1879
+ * @param {object} - `{ ?number, ?extension }`.
1880
+ * @return {string} Phone URI (RFC 3966).
1676
1881
  */
1677
- var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
1678
- return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
1679
- };
1680
-
1681
- /**
1682
- * Helper initialiser method to create the regular-expression pattern to match
1683
- * extensions.
1684
- * Copy-pasted from Google's `libphonenumber`:
1685
- * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
1686
- * @return {string} RegEx pattern to capture extensions.
1687
- */
1688
- function createExtensionPattern(purpose) {
1689
- // We cap the maximum length of an extension based on the ambiguity of the way
1690
- // the extension is prefixed. As per ITU, the officially allowed length for
1691
- // extensions is actually 40, but we don't support this since we haven't seen real
1692
- // examples and this introduces many false interpretations as the extension labels
1693
- // are not standardized.
1694
- /** @type {string} */
1695
- var extLimitAfterExplicitLabel = '20';
1696
- /** @type {string} */
1697
- var extLimitAfterLikelyLabel = '15';
1698
- /** @type {string} */
1699
- var extLimitAfterAmbiguousChar = '9';
1700
- /** @type {string} */
1701
- var extLimitWhenNotSure = '6';
1702
-
1703
- /** @type {string} */
1704
- var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
1705
- // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
1706
- /** @type {string} */
1707
- var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
1708
- /** @type {string} */
1709
- var optionalExtnSuffix = "#?";
1710
-
1711
- // Here the extension is called out in more explicit way, i.e mentioning it obvious
1712
- // patterns like "ext.".
1713
- /** @type {string} */
1714
- var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)";
1715
- // One-character symbols that can be used to indicate an extension, and less
1716
- // commonly used or more ambiguous extension labels.
1717
- /** @type {string} */
1718
- var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)";
1719
- // When extension is not separated clearly.
1720
- /** @type {string} */
1721
- var ambiguousSeparator = "[- ]+";
1722
- // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
1723
- // comma as extension label may have it.
1724
- /** @type {string} */
1725
- var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
1726
- // ",," is commonly used for auto dialling the extension when connected. First
1727
- // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
1728
- // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
1729
- // button with the extension number following.
1730
- /** @type {string} */
1731
- var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
1732
-
1733
- /** @type {string} */
1734
- var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
1735
- /** @type {string} */
1736
- var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
1737
- /** @type {string} */
1738
- var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1739
- /** @type {string} */
1740
- var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
1741
-
1742
- /** @type {string} */
1743
- var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
1744
- /** @type {string} */
1745
- var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1746
-
1747
- // The first regular expression covers RFC 3966 format, where the extension is added
1748
- // using ";ext=". The second more generic where extension is mentioned with explicit
1749
- // labels like "ext:". In both the above cases we allow more numbers in extension than
1750
- // any other extension labels. The third one captures when single character extension
1751
- // labels or less commonly used labels are used. In such cases we capture fewer
1752
- // extension digits in order to reduce the chance of falsely interpreting two
1753
- // numbers beside each other as a number + extension. The fourth one covers the
1754
- // special case of American numbers where the extension is written with a hash
1755
- // at the end, such as "- 503#". The fifth one is exclusively for extension
1756
- // autodialling formats which are used when dialling and in this case we accept longer
1757
- // extensions. The last one is more liberal on the number of commas that acts as
1758
- // extension labels, so we have a strict cap on the number of digits in such extensions.
1759
- return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
1760
- }
1761
-
1762
- // Regular expression of viable phone numbers. This is location independent.
1763
- // Checks we have at least three leading digits, and only valid punctuation,
1764
- // alpha characters and digits in the phone number. Does not include extension
1765
- // data. The symbol 'x' is allowed here as valid punctuation since it is often
1766
- // used as a placeholder for carrier codes, for example in Brazilian phone
1767
- // numbers. We also allow multiple '+' characters at the start.
1768
- //
1769
- // Corresponds to the following:
1770
- // [digits]{minLengthNsn}|
1771
- // plus_sign*
1772
- // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
1773
- //
1774
- // The first reg-ex is to allow short numbers (two digits long) to be parsed if
1775
- // they are entered as "15" etc, but only if there is no punctuation in them.
1776
- // The second expression restricts the number of digits to three or more, but
1777
- // then allows them to be in international form, and to have alpha-characters
1778
- // and punctuation. We split up the two reg-exes here and combine them when
1779
- // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
1780
- // with ^ and append $ to each branch.
1781
- //
1782
- // "Note VALID_PUNCTUATION starts with a -,
1783
- // so must be the first in the range" (c) Google devs.
1784
- // (wtf did they mean by saying that; probably nothing)
1785
- //
1786
- var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
1787
- //
1788
- // And this is the second reg-exp:
1789
- // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
1790
- //
1791
- var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
1792
-
1793
- // This regular expression isn't present in Google's `libphonenumber`
1794
- // and is only used to determine whether the phone number being input
1795
- // is too short for it to even consider it a "valid" number.
1796
- // This is just a way to differentiate between a really invalid phone
1797
- // number like "abcde" and a valid phone number that a user has just
1798
- // started inputting, like "+1" or "1": both these cases would be
1799
- // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1800
- // library can provide a more detailed error message — whether it's
1801
- // really "not a number", or is it just a start of a valid phone number.
1802
- var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
1803
- var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
1804
- // Phone number extensions
1805
- '(?:' + createExtensionPattern() + ')?';
1806
-
1807
- // The combined regular expression for valid phone numbers:
1808
- //
1809
- var VALID_PHONE_NUMBER_PATTERN = new RegExp(
1810
- // Either a short two-digit-only phone number
1811
- '^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
1812
- // Or a longer fully parsed phone number (min 3 characters)
1813
- '^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
1814
-
1815
- // Checks to see if the string of characters could possibly be a phone number at
1816
- // all. At the moment, checks to see that the string begins with at least 2
1817
- // digits, ignoring any punctuation commonly found in phone numbers. This method
1818
- // does not require the number to be normalized in advance - but does assume
1819
- // that leading non-number symbols have been removed, such as by the method
1820
- // `extract_possible_number`.
1821
- //
1822
- function isViablePhoneNumber(number) {
1823
- return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
1824
- }
1825
-
1826
- // This is just a way to differentiate between a really invalid phone
1827
- // number like "abcde" and a valid phone number that a user has just
1828
- // started inputting, like "+1" or "1": both these cases would be
1829
- // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1830
- // library can provide a more detailed error message — whether it's
1831
- // really "not a number", or is it just a start of a valid phone number.
1832
- function isViablePhoneNumberStart(number) {
1833
- return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
1834
- }
1835
-
1836
- /**
1837
- * @param {object} - `{ ?number, ?extension }`.
1838
- * @return {string} Phone URI (RFC 3966).
1839
- */
1840
- function formatRFC3966(_ref) {
1841
- var number = _ref.number,
1842
- ext = _ref.ext;
1843
- if (!number) {
1844
- return '';
1845
- }
1846
- if (number[0] !== '+') {
1847
- throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
1848
- }
1849
- return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
1850
- }
1882
+ function formatRFC3966(_ref) {
1883
+ var number = _ref.number,
1884
+ ext = _ref.ext;
1885
+ if (!number) {
1886
+ return '';
1887
+ }
1888
+ if (number[0] !== '+') {
1889
+ throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
1890
+ }
1891
+ return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
1892
+ }
1851
1893
 
1852
1894
  // This is a port of Google Android `libphonenumber`'s
1853
1895
  // `phonenumberutil.js` of December 31th, 2018.
@@ -2050,15 +2092,15 @@ function pickFirstMatchingElement(elements, testFunction) {
2050
2092
  }
2051
2093
  }
2052
2094
 
2053
- function _typeof$b(o) { "@babel/helpers - typeof"; return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$b(o); }
2054
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2055
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2056
- function _defineProperty$4(e, r, t) { return (r = _toPropertyKey$a(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2057
- function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2058
- function _defineProperties$6(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$a(o.key), o); } }
2059
- function _createClass$7(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2060
- function _toPropertyKey$a(t) { var i = _toPrimitive$a(t, "string"); return "symbol" == _typeof$b(i) ? i : i + ""; }
2061
- function _toPrimitive$a(t, r) { if ("object" != _typeof$b(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$b(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
2095
+ function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
2096
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2097
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2098
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2099
+ function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2100
+ function _defineProperties$6(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$6(o.key), o); } }
2101
+ function _createClass$6(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2102
+ function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
2103
+ function _toPrimitive$6(t, r) { if ("object" != _typeof$6(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$6(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
2062
2104
  var PhoneNumber = /*#__PURE__*/function () {
2063
2105
  /**
2064
2106
  * @param {string} countryOrCountryCallingCode
@@ -2067,7 +2109,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2067
2109
  * @return {PhoneNumber}
2068
2110
  */
2069
2111
  function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
2070
- _classCallCheck$7(this, PhoneNumber);
2112
+ _classCallCheck$6(this, PhoneNumber);
2071
2113
  // Validate `countryOrCountryCallingCode` argument.
2072
2114
  if (!countryOrCountryCallingCode) {
2073
2115
  throw new TypeError('First argument is required');
@@ -2125,7 +2167,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2125
2167
  return metadata;
2126
2168
  };
2127
2169
  }
2128
- return _createClass$7(PhoneNumber, [{
2170
+ return _createClass$6(PhoneNumber, [{
2129
2171
  key: "setExt",
2130
2172
  value: function setExt(ext) {
2131
2173
  this.ext = ext;
@@ -2188,7 +2230,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2188
2230
  }, {
2189
2231
  key: "format",
2190
2232
  value: function format(_format, options) {
2191
- return formatNumber(this, _format, options ? _objectSpread$4(_objectSpread$4({}, options), {}, {
2233
+ return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {
2192
2234
  v2: true
2193
2235
  }) : {
2194
2236
  v2: true
@@ -2234,70 +2276,9 @@ function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJs
2234
2276
  }
2235
2277
  var E164_NUMBER_REGEXP = /^\+\d+$/;
2236
2278
 
2237
- function _typeof$a(o) { "@babel/helpers - typeof"; return _typeof$a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$a(o); }
2238
- function _createClass$6(e, r, t) { return Object.defineProperty(e, "prototype", { writable: false }), e; }
2239
- function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2240
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
2241
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof$a(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
2242
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
2243
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf(t, e); }
2244
- function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
2245
- function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
2246
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2247
- function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
2248
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
2249
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
2250
- // https://stackoverflow.com/a/46971044/970769
2251
- // "Breaking changes in Typescript 2.1"
2252
- // "Extending built-ins like Error, Array, and Map may no longer work."
2253
- // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
2254
- // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
2255
- var ParseError = /*#__PURE__*/function (_Error) {
2256
- function ParseError(code) {
2257
- var _this;
2258
- _classCallCheck$6(this, ParseError);
2259
- _this = _callSuper(this, ParseError, [code]);
2260
- // Set the prototype explicitly.
2261
- // Any subclass of FooError will have to manually set the prototype as well.
2262
- Object.setPrototypeOf(_this, ParseError.prototype);
2263
- _this.name = _this.constructor.name;
2264
- return _this;
2265
- }
2266
- _inherits(ParseError, _Error);
2267
- return _createClass$6(ParseError);
2268
- }(/*#__PURE__*/_wrapNativeSuper(Error));
2269
-
2270
- // Regexp of all known extension prefixes used by different regions followed by
2271
- // 1 or more valid digits, for use when parsing.
2272
- var EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');
2273
-
2274
- // Strips any extension (as in, the part of the number dialled after the call is
2275
- // connected, usually indicated with extn, ext, x or similar) from the end of
2276
- // the number, and returns it.
2277
- function extractExtension(number) {
2278
- var start = number.search(EXTN_PATTERN);
2279
- if (start < 0) {
2280
- return {};
2281
- }
2282
- // If we find a potential extension, and the number preceding this is a viable
2283
- // number, we assume it is an extension.
2284
- var numberWithoutExtension = number.slice(0, start);
2285
- var matches = number.match(EXTN_PATTERN);
2286
- var i = 1;
2287
- while (i < matches.length) {
2288
- if (matches[i]) {
2289
- return {
2290
- number: numberWithoutExtension,
2291
- ext: matches[i]
2292
- };
2293
- }
2294
- i++;
2295
- }
2296
- }
2297
-
2298
- function _createForOfIteratorHelperLoose$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2299
- function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$7(r, a) : void 0; } }
2300
- function _arrayLikeToArray$7(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2279
+ function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2280
+ function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
2281
+ function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2301
2282
  // These mappings map a character (key) to a specific digit that should
2302
2283
  // replace it for normalization purposes. Non-European digits that
2303
2284
  // may be used in phone numbers are mapped to a European equivalent.
@@ -2387,659 +2368,27 @@ function parseDigit(character) {
2387
2368
  * @param {string} string
2388
2369
  * @return {string}
2389
2370
  * @example
2390
- * ```js
2391
- * parseDigits('8 (800) 555')
2392
- * // Outputs '8800555'.
2393
- * ```
2394
- */
2395
- function parseDigits(string) {
2396
- var result = '';
2397
- // Using `.split('')` here instead of normal `for ... of`
2398
- // because the importing application doesn't neccessarily include an ES6 polyfill.
2399
- // The `.split('')` approach discards "exotic" UTF-8 characters
2400
- // (the ones consisting of four bytes) but digits
2401
- // (including non-European ones) don't fall into that range
2402
- // so such "exotic" characters would be discarded anyway.
2403
- for (var _iterator = _createForOfIteratorHelperLoose$4(string.split('')), _step; !(_step = _iterator()).done;) {
2404
- var character = _step.value;
2405
- var digit = parseDigit(character);
2406
- if (digit) {
2407
- result += digit;
2408
- }
2409
- }
2410
- return result;
2411
- }
2412
-
2413
- function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2414
- function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$6(r, a) : void 0; } }
2415
- function _arrayLikeToArray$6(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2416
-
2417
- /**
2418
- * Parses phone number characters from a string.
2419
- * Drops all punctuation leaving only digits and the leading `+` sign (if any).
2420
- * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
2421
- * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
2422
- * @param {string} string
2423
- * @return {string}
2424
- * @example
2425
- * ```js
2426
- * // Outputs '8800555'.
2427
- * parseIncompletePhoneNumber('8 (800) 555')
2428
- * // Outputs '+7800555'.
2429
- * parseIncompletePhoneNumber('+7 800 555')
2430
- * ```
2431
- */
2432
- function parseIncompletePhoneNumber(string) {
2433
- var result = '';
2434
- // Using `.split('')` here instead of normal `for ... of`
2435
- // because the importing application doesn't neccessarily include an ES6 polyfill.
2436
- // The `.split('')` approach discards "exotic" UTF-8 characters
2437
- // (the ones consisting of four bytes) but digits
2438
- // (including non-European ones) don't fall into that range
2439
- // so such "exotic" characters would be discarded anyway.
2440
- for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2441
- var character = _step.value;
2442
- result += parsePhoneNumberCharacter(character, result) || '';
2443
- }
2444
- return result;
2445
- }
2446
-
2447
- /**
2448
- * Parses next character while parsing phone number digits (including a `+`)
2449
- * from text: discards everything except `+` and digits, and `+` is only allowed
2450
- * at the start of a phone number.
2451
- * For example, is used in `react-phone-number-input` where it uses
2452
- * [`input-format`](https://gitlab.com/catamphetamine/input-format).
2453
- * @param {string} character - Yet another character from raw input string.
2454
- * @param {string?} prevParsedCharacters - Previous parsed characters.
2455
- * @param {function?} eventListener - An optional "on event" function.
2456
- * @return {string?} The parsed character.
2457
- */
2458
- function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
2459
- // Only allow a leading `+`.
2460
- if (character === '+') {
2461
- // If this `+` is not the first parsed character
2462
- // then discard it.
2463
- if (prevParsedCharacters) {
2464
- return;
2465
- }
2466
- return '+';
2467
- }
2468
- // Allow digits.
2469
- return parseDigit(character);
2470
- }
2471
-
2472
- // When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
2473
- // they can have their "calling code" part written separately in a `phone-context` parameter.
2474
- // Example: `"tel:12133734253;phone-context=+1"`.
2475
- // This function parses the full phone number from the local number and the `phone-context`
2476
- // when the `phone-context` contains a `+` sign.
2477
-
2478
- var PLUS_SIGN = '+';
2479
- var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
2480
- var RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';
2481
- var RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';
2482
-
2483
- /**
2484
- * Regular expression of valid global-number-digits for the phone-context
2485
- * parameter, following the syntax defined in RFC3966.
2486
- */
2487
- var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');
2488
-
2489
- // In this port of Google's library, we don't accept alpha characters in phone numbers.
2490
- // const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
2491
- var ALPHANUM_ = VALID_DIGITS;
2492
- var RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2493
- var VALID_ALPHA_ = 'a-zA-Z';
2494
- var RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2495
- var RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\.)*' + RFC3966_TOPLABEL_ + '\\.?$';
2496
-
2497
- /**
2498
- * Regular expression of valid domainname for the phone-context parameter,
2499
- * following the syntax defined in RFC3966.
2500
- */
2501
- var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');
2502
- var RFC3966_PREFIX_ = 'tel:';
2503
- var RFC3966_PHONE_CONTEXT_ = ';phone-context=';
2504
- var RFC3966_ISDN_SUBADDRESS_ = ';isub=';
2505
-
2506
- /**
2507
- * Extracts the value of the phone-context parameter of `numberToExtractFrom`,
2508
- * following the syntax defined in RFC3966.
2509
- *
2510
- * @param {string} numberToExtractFrom
2511
- * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
2512
- */
2513
- function extractPhoneContext(numberToExtractFrom) {
2514
- var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
2515
- // If no phone-context parameter is present
2516
- if (indexOfPhoneContext < 0) {
2517
- return null;
2518
- }
2519
- var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
2520
- // If phone-context parameter is empty
2521
- if (phoneContextStart >= numberToExtractFrom.length) {
2522
- return '';
2523
- }
2524
- var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);
2525
- // If phone-context is not the last parameter
2526
- if (phoneContextEnd >= 0) {
2527
- return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
2528
- } else {
2529
- return numberToExtractFrom.substring(phoneContextStart);
2530
- }
2531
- }
2532
-
2533
- /**
2534
- * Returns whether the value of phoneContext follows the syntax defined in RFC3966.
2535
- *
2536
- * @param {string|null} phoneContext
2537
- * @return {boolean}
2538
- */
2539
- function isPhoneContextValid(phoneContext) {
2540
- if (phoneContext === null) {
2541
- return true;
2542
- }
2543
- if (phoneContext.length === 0) {
2544
- return false;
2545
- }
2546
-
2547
- // Does phone-context value match pattern of global-number-digits or domainname.
2548
- return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
2549
- }
2550
-
2551
- /**
2552
- * @param {string} numberToParse
2553
- * @param {string} nationalNumber
2554
- * @return {}
2555
- */
2556
- function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
2557
- var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
2558
- var phoneContext = extractPhoneContext(numberToParse);
2559
- if (!isPhoneContextValid(phoneContext)) {
2560
- throw new ParseError('NOT_A_NUMBER');
2561
- }
2562
- var phoneNumberString;
2563
- if (phoneContext === null) {
2564
- // Extract a possible number from the string passed in.
2565
- // (this strips leading characters that could not be the start of a phone number)
2566
- phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';
2567
- } else {
2568
- phoneNumberString = '';
2569
-
2570
- // If the phone context contains a phone number prefix, we need to capture
2571
- // it, whereas domains will be ignored.
2572
- if (phoneContext.charAt(0) === PLUS_SIGN) {
2573
- phoneNumberString += phoneContext;
2574
- }
2575
-
2576
- // Now append everything between the "tel:" prefix and the phone-context.
2577
- // This should include the national number, an optional extension or
2578
- // isdn-subaddress component. Note we also handle the case when "tel:" is
2579
- // missing, as we have seen in some of the phone number inputs.
2580
- // In that case, we append everything from the beginning.
2581
- var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
2582
- var indexOfNationalNumber;
2583
- // RFC 3966 "tel:" prefix is preset at this stage because
2584
- // `isPhoneContextValid()` requires it to be present.
2585
- /* istanbul ignore else */
2586
- if (indexOfRfc3966Prefix >= 0) {
2587
- indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
2588
- } else {
2589
- indexOfNationalNumber = 0;
2590
- }
2591
- var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
2592
- phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
2593
- }
2594
-
2595
- // Delete the isdn-subaddress and everything after it if it is present.
2596
- // Note extension won't appear at the same time with isdn-subaddress
2597
- // according to paragraph 5.3 of the RFC3966 spec.
2598
- var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
2599
- if (indexOfIsdn > 0) {
2600
- phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
2601
- }
2602
- // If both phone context and isdn-subaddress are absent but other
2603
- // parameters are present, the parameters are left in nationalNumber.
2604
- // This is because we are concerned about deleting content from a potential
2605
- // number string when there is no strong evidence that the number is
2606
- // actually written in RFC3966.
2607
-
2608
- if (phoneNumberString !== '') {
2609
- return phoneNumberString;
2610
- }
2611
- }
2612
-
2613
- // This is a port of Google Android `libphonenumber`'s
2614
- // `phonenumberutil.js` of December 31th, 2018.
2615
- //
2616
- // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
2617
-
2618
-
2619
- // We don't allow input strings for parsing to be longer than 250 chars.
2620
- // This prevents malicious input from consuming CPU.
2621
- var MAX_INPUT_STRING_LENGTH = 250;
2622
-
2623
- // This consists of the plus symbol, digits, and arabic-indic digits.
2624
- var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
2625
-
2626
- // Regular expression of trailing characters that we want to remove.
2627
- // A trailing `#` is sometimes used when writing phone numbers with extensions in US.
2628
- // Example: "+1 (645) 123 1234-910#" number has extension "910".
2629
- var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
2630
-
2631
- // Examples:
2632
- //
2633
- // ```js
2634
- // parse('8 (800) 555-35-35', 'RU')
2635
- // parse('8 (800) 555-35-35', 'RU', metadata)
2636
- // parse('8 (800) 555-35-35', { country: { default: 'RU' } })
2637
- // parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
2638
- // parse('+7 800 555 35 35')
2639
- // parse('+7 800 555 35 35', metadata)
2640
- // ```
2641
- //
2642
-
2643
- /**
2644
- * Parses a phone number.
2645
- *
2646
- * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
2647
- * parse('123456789', { defaultCountry: 'RU' }, metadata)
2648
- * parse('123456789', undefined, metadata)
2649
- *
2650
- * @param {string} input
2651
- * @param {object} [options]
2652
- * @param {object} metadata
2653
- * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
2654
- */
2655
- function parse(text, options, metadata) {
2656
- // If assigning the `{}` default value is moved to the arguments above,
2657
- // code coverage would decrease for some weird reason.
2658
- options = options || {};
2659
- metadata = new Metadata(metadata);
2660
-
2661
- // Validate `defaultCountry`.
2662
- if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
2663
- if (options.v2) {
2664
- throw new ParseError('INVALID_COUNTRY');
2665
- }
2666
- throw new Error("Unknown country: ".concat(options.defaultCountry));
2667
- }
2668
-
2669
- // Parse the phone number.
2670
- var _parseInput = parseInput(text, options.v2, options.extract),
2671
- formattedPhoneNumber = _parseInput.number,
2672
- ext = _parseInput.ext,
2673
- error = _parseInput.error;
2674
-
2675
- // If the phone number is not viable then return nothing.
2676
- if (!formattedPhoneNumber) {
2677
- if (options.v2) {
2678
- if (error === 'TOO_SHORT') {
2679
- throw new ParseError('TOO_SHORT');
2680
- }
2681
- throw new ParseError('NOT_A_NUMBER');
2682
- }
2683
- return {};
2684
- }
2685
- var _parsePhoneNumber = parsePhoneNumber$1(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),
2686
- country = _parsePhoneNumber.country,
2687
- nationalNumber = _parsePhoneNumber.nationalNumber,
2688
- countryCallingCode = _parsePhoneNumber.countryCallingCode,
2689
- countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,
2690
- carrierCode = _parsePhoneNumber.carrierCode;
2691
- if (!metadata.hasSelectedNumberingPlan()) {
2692
- if (options.v2) {
2693
- throw new ParseError('INVALID_COUNTRY');
2694
- }
2695
- return {};
2696
- }
2697
-
2698
- // Validate national (significant) number length.
2699
- if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
2700
- // Won't throw here because the regexp already demands length > 1.
2701
- /* istanbul ignore if */
2702
- if (options.v2) {
2703
- throw new ParseError('TOO_SHORT');
2704
- }
2705
- // Google's demo just throws an error in this case.
2706
- return {};
2707
- }
2708
-
2709
- // Validate national (significant) number length.
2710
- //
2711
- // A sidenote:
2712
- //
2713
- // They say that sometimes national (significant) numbers
2714
- // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
2715
- // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
2716
- // Such numbers will just be discarded.
2717
- //
2718
- if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
2719
- if (options.v2) {
2720
- throw new ParseError('TOO_LONG');
2721
- }
2722
- // Google's demo just throws an error in this case.
2723
- return {};
2724
- }
2725
- if (options.v2) {
2726
- var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
2727
- if (country) {
2728
- phoneNumber.country = country;
2729
- }
2730
- if (carrierCode) {
2731
- phoneNumber.carrierCode = carrierCode;
2732
- }
2733
- if (ext) {
2734
- phoneNumber.ext = ext;
2735
- }
2736
- phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
2737
- return phoneNumber;
2738
- }
2739
-
2740
- // Check if national phone number pattern matches the number.
2741
- // National number pattern is different for each country,
2742
- // even for those ones which are part of the "NANPA" group.
2743
- var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
2744
- if (!options.extended) {
2745
- return valid ? result(country, nationalNumber, ext) : {};
2746
- }
2747
-
2748
- // isInternational: countryCallingCode !== undefined
2749
-
2750
- return {
2751
- country: country,
2752
- countryCallingCode: countryCallingCode,
2753
- carrierCode: carrierCode,
2754
- valid: valid,
2755
- possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,
2756
- phone: nationalNumber,
2757
- ext: ext
2758
- };
2759
- }
2760
-
2761
- /**
2762
- * Extracts a formatted phone number from text.
2763
- * Doesn't guarantee that the extracted phone number
2764
- * is a valid phone number (for example, doesn't validate its length).
2765
- * @param {string} text
2766
- * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
2767
- * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
2768
- * @return {string}
2769
- * @example
2770
- * // Returns "(213) 373-4253".
2771
- * extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
2772
- */
2773
- function _extractFormattedPhoneNumber(text, extract, throwOnError) {
2774
- if (!text) {
2775
- return;
2776
- }
2777
- if (text.length > MAX_INPUT_STRING_LENGTH) {
2778
- if (throwOnError) {
2779
- throw new ParseError('TOO_LONG');
2780
- }
2781
- return;
2782
- }
2783
- if (extract === false) {
2784
- return text;
2785
- }
2786
- // Attempt to extract a possible number from the string passed in
2787
- var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
2788
- if (startsAt < 0) {
2789
- return;
2790
- }
2791
- return text
2792
- // Trim everything to the left of the phone number
2793
- .slice(startsAt)
2794
- // Remove trailing non-numerical characters
2795
- .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
2796
- }
2797
-
2798
- /**
2799
- * @param {string} text - Input.
2800
- * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
2801
- * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
2802
- * @return {object} `{ ?number, ?ext }`.
2803
- */
2804
- function parseInput(text, v2, extract) {
2805
- // // Parse RFC 3966 phone number URI.
2806
- // if (text && text.indexOf('tel:') === 0) {
2807
- // return parseRFC3966(text)
2808
- // }
2809
- // let number = extractFormattedPhoneNumber(text, extract, v2)
2810
- var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
2811
- extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
2812
- return _extractFormattedPhoneNumber(text, extract, v2);
2813
- }
2814
- });
2815
- // If the phone number is not viable, then abort.
2816
- if (!number) {
2817
- return {};
2818
- }
2819
- if (!isViablePhoneNumber(number)) {
2820
- if (isViablePhoneNumberStart(number)) {
2821
- return {
2822
- error: 'TOO_SHORT'
2823
- };
2824
- }
2825
- return {};
2826
- }
2827
- // Attempt to parse extension first, since it doesn't require region-specific
2828
- // data and we want to have the non-normalised number here.
2829
- var withExtensionStripped = extractExtension(number);
2830
- if (withExtensionStripped.ext) {
2831
- return withExtensionStripped;
2832
- }
2833
- return {
2834
- number: number
2835
- };
2836
- }
2837
-
2838
- /**
2839
- * Creates `parse()` result object.
2840
- */
2841
- function result(country, nationalNumber, ext) {
2842
- var result = {
2843
- country: country,
2844
- phone: nationalNumber
2845
- };
2846
- if (ext) {
2847
- result.ext = ext;
2848
- }
2849
- return result;
2850
- }
2851
-
2852
- /**
2853
- * Parses a viable phone number.
2854
- * @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
2855
- * @param {string} [defaultCountry]
2856
- * @param {string} [defaultCallingCode]
2857
- * @param {Metadata} metadata
2858
- * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
2859
- */
2860
- function parsePhoneNumber$1(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
2861
- // Extract calling code from phone number.
2862
- var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),
2863
- countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
2864
- countryCallingCode = _extractCountryCallin.countryCallingCode,
2865
- number = _extractCountryCallin.number;
2866
-
2867
- // The exact country of the phone number
2868
- var country;
2869
-
2870
- // If `formattedPhoneNumber` is passed in "international" format,
2871
- // choose a country by `countryCallingCode`.
2872
- if (countryCallingCode) {
2873
- metadata.selectNumberingPlan(countryCallingCode);
2874
- }
2875
- // Else, if `formattedPhoneNumber` is passed in "national" format,
2876
- // then `number` is defined and `countryCallingCode` is `undefined`.
2877
- else if (number && (defaultCountry || defaultCallingCode)) {
2878
- metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
2879
- if (defaultCountry) {
2880
- country = defaultCountry;
2881
- }
2882
- countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
2883
- } else return {};
2884
- if (!number) {
2885
- return {
2886
- countryCallingCodeSource: countryCallingCodeSource,
2887
- countryCallingCode: countryCallingCode
2888
- };
2889
- }
2890
- var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),
2891
- nationalNumber = _extractNationalNumbe.nationalNumber,
2892
- carrierCode = _extractNationalNumbe.carrierCode;
2893
-
2894
- // Sometimes there are several countries
2895
- // corresponding to the same country phone code
2896
- // (e.g. NANPA countries all having `1` country phone code).
2897
- // Therefore, to reliably determine the exact country,
2898
- // national (significant) number should have been parsed first.
2899
- //
2900
- // When `metadata.json` is generated, all "ambiguous" country phone codes
2901
- // get their countries populated with the full set of
2902
- // "phone number type" regular expressions.
2903
- //
2904
- var exactCountry = getCountryByCallingCode(countryCallingCode, {
2905
- nationalNumber: nationalNumber,
2906
- metadata: metadata
2907
- });
2908
- if (exactCountry) {
2909
- country = exactCountry;
2910
- /* istanbul ignore if */
2911
- if (exactCountry === '001') ; else {
2912
- metadata.selectNumberingPlan(country);
2913
- }
2914
- }
2915
- return {
2916
- country: country,
2917
- countryCallingCode: countryCallingCode,
2918
- countryCallingCodeSource: countryCallingCodeSource,
2919
- nationalNumber: nationalNumber,
2920
- carrierCode: carrierCode
2921
- };
2922
- }
2923
-
2924
- function _typeof$9(o) { "@babel/helpers - typeof"; return _typeof$9 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$9(o); }
2925
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2926
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty$3(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2927
- function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$9(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2928
- function _toPropertyKey$9(t) { var i = _toPrimitive$9(t, "string"); return "symbol" == _typeof$9(i) ? i : i + ""; }
2929
- function _toPrimitive$9(t, r) { if ("object" != _typeof$9(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$9(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2930
- function parsePhoneNumberWithError(text, options, metadata) {
2931
- return parse(text, _objectSpread$3(_objectSpread$3({}, options), {}, {
2932
- v2: true
2933
- }), metadata);
2934
- }
2935
-
2936
- function _typeof$8(o) { "@babel/helpers - typeof"; return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$8(o); }
2937
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2938
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2939
- function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$8(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
2940
- function _toPropertyKey$8(t) { var i = _toPrimitive$8(t, "string"); return "symbol" == _typeof$8(i) ? i : i + ""; }
2941
- function _toPrimitive$8(t, r) { if ("object" != _typeof$8(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$8(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2942
- function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$5(r, e) || _nonIterableRest$2(); }
2943
- function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2944
- function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$5(r, a) : void 0; } }
2945
- function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2946
- function _iterableToArrayLimit$2(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true); } catch (r) { o = true, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2947
- function _arrayWithHoles$2(r) { if (Array.isArray(r)) return r; }
2948
-
2949
- // Extracts the following properties from function arguments:
2950
- // * input `text`
2951
- // * `options` object
2952
- // * `metadata` JSON
2953
- function normalizeArguments(args) {
2954
- var _Array$prototype$slic = Array.prototype.slice.call(args),
2955
- _Array$prototype$slic2 = _slicedToArray$2(_Array$prototype$slic, 4),
2956
- arg_1 = _Array$prototype$slic2[0],
2957
- arg_2 = _Array$prototype$slic2[1],
2958
- arg_3 = _Array$prototype$slic2[2],
2959
- arg_4 = _Array$prototype$slic2[3];
2960
- var text;
2961
- var options;
2962
- var metadata;
2963
-
2964
- // If the phone number is passed as a string.
2965
- // `parsePhoneNumber('88005553535', ...)`.
2966
- if (typeof arg_1 === 'string') {
2967
- text = arg_1;
2968
- } else throw new TypeError('A text for parsing must be a string.');
2969
-
2970
- // If "default country" argument is being passed then move it to `options`.
2971
- // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
2972
- if (!arg_2 || typeof arg_2 === 'string') {
2973
- if (arg_4) {
2974
- options = arg_3;
2975
- metadata = arg_4;
2976
- } else {
2977
- options = undefined;
2978
- metadata = arg_3;
2979
- }
2980
- if (arg_2) {
2981
- options = _objectSpread$2({
2982
- defaultCountry: arg_2
2983
- }, options);
2984
- }
2985
- }
2986
- // `defaultCountry` is not passed.
2987
- // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
2988
- else if (isObject(arg_2)) {
2989
- if (arg_3) {
2990
- options = arg_2;
2991
- metadata = arg_3;
2992
- } else {
2993
- metadata = arg_2;
2994
- }
2995
- } else throw new Error("Invalid second argument: ".concat(arg_2));
2996
- return {
2997
- text: text,
2998
- options: options,
2999
- metadata: metadata
3000
- };
3001
- }
3002
-
3003
- function _typeof$7(o) { "@babel/helpers - typeof"; return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$7(o); }
3004
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3005
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3006
- function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$7(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
3007
- function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
3008
- function _toPrimitive$7(t, r) { if ("object" != _typeof$7(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$7(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3009
- function parsePhoneNumber(text, options, metadata) {
3010
- // Validate `defaultCountry`.
3011
- if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {
3012
- options = _objectSpread$1(_objectSpread$1({}, options), {}, {
3013
- defaultCountry: undefined
3014
- });
3015
- }
3016
- // Parse phone number.
3017
- try {
3018
- return parsePhoneNumberWithError(text, options, metadata);
3019
- } catch (error) {
3020
- /* istanbul ignore else */
3021
- if (error instanceof ParseError) ; else {
3022
- throw error;
2371
+ * ```js
2372
+ * parseDigits('8 (800) 555')
2373
+ * // Outputs '8800555'.
2374
+ * ```
2375
+ */
2376
+ function parseDigits(string) {
2377
+ var result = '';
2378
+ // Using `.split('')` here instead of normal `for ... of`
2379
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
2380
+ // The `.split('')` approach discards "exotic" UTF-8 characters
2381
+ // (the ones consisting of four bytes) but digits
2382
+ // (including non-European ones) don't fall into that range
2383
+ // so such "exotic" characters would be discarded anyway.
2384
+ for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2385
+ var character = _step.value;
2386
+ var digit = parseDigit(character);
2387
+ if (digit) {
2388
+ result += digit;
3023
2389
  }
3024
2390
  }
3025
- }
3026
-
3027
- function _typeof$6(o) { "@babel/helpers - typeof"; return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$6(o); }
3028
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3029
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3030
- function _defineProperty(e, r, t) { return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; }
3031
- function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
3032
- function _toPrimitive$6(t, r) { if ("object" != _typeof$6(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$6(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3033
- function isValidPhoneNumber$1() {
3034
- var _normalizeArguments = normalizeArguments(arguments),
3035
- text = _normalizeArguments.text,
3036
- options = _normalizeArguments.options,
3037
- metadata = _normalizeArguments.metadata;
3038
- options = _objectSpread(_objectSpread({}, options), {}, {
3039
- extract: false
3040
- });
3041
- var phoneNumber = parsePhoneNumber(text, options, metadata);
3042
- return phoneNumber && phoneNumber.isValid() || false;
2391
+ return result;
3043
2392
  }
3044
2393
 
3045
2394
  function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
@@ -5382,10 +4731,6 @@ var AsYouType$1 = /*#__PURE__*/function () {
5382
4731
  }]);
5383
4732
  }();
5384
4733
 
5385
- function isValidPhoneNumber() {
5386
- return withMetadataArgument(isValidPhoneNumber$1, arguments)
5387
- }
5388
-
5389
4734
  // Importing from a ".js" file is a workaround for Node.js "ES Modules"
5390
4735
  // importing system which is even uncapable of importing "*.json" files.
5391
4736
 
@@ -5396,235 +4741,6 @@ function AsYouType(country) {
5396
4741
  AsYouType.prototype = Object.create(AsYouType$1.prototype, {});
5397
4742
  AsYouType.prototype.constructor = AsYouType;
5398
4743
 
5399
- const formLanguageChange = async (formContext, newLanguage) => {
5400
- var _a, _b, _c, _d, _e;
5401
- const sharedLocales = await getLocalLanguage.getSharedFormLocal(newLanguage);
5402
- const LS = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.localization;
5403
- const structureLocalization = typeof LS === 'object' ? ((_d = (_c = LS === null || LS === void 0 ? void 0 : LS[newLanguage]) !== null && _c !== void 0 ? _c : LS === null || LS === void 0 ? void 0 : LS.en) !== null && _d !== void 0 ? _d : {}) : {};
5404
- formContext.locale = Object.assign(Object.assign({}, structureLocalization), { sharedFormLocales: Object.assign(Object.assign({}, sharedLocales), structureLocalization === null || structureLocalization === void 0 ? void 0 : structureLocalization.sharedFormLocales) });
5405
- formContext.localeLanguage = newLanguage;
5406
- (_e = formContext.form) === null || _e === void 0 ? void 0 : _e.rerender({ rerenderAll: true });
5407
- };
5408
- const formErrorHandler = async (formContext, error) => {
5409
- var _a, _b, _c;
5410
- const message = error.message || ((_c = (_b = (_a = formContext.locale) === null || _a === void 0 ? void 0 : _a.sharedFormLocales) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.wildCard) || '';
5411
- if (formContext === null || formContext === void 0 ? void 0 : formContext.errorCallback)
5412
- formContext.errorCallback(error, message);
5413
- else
5414
- formContext.errorMessage = message;
5415
- };
5416
- const formLoadingHandler = async (formContext, isLoading) => {
5417
- formContext.isLoading = isLoading;
5418
- if (formContext.loadingChanges)
5419
- formContext.loadingChanges(isLoading);
5420
- };
5421
- const formSuccessHandler = async (formContext, data) => {
5422
- if (formContext.successCallback)
5423
- formContext.successCallback(data, formContext.locale['Form submitted successfully.'] || '');
5424
- else
5425
- formContext.form.openDialog();
5426
- if (!formContext.disableScrollToTop) {
5427
- const formDom = formContext.el.shadowRoot || formContext.el;
5428
- let targetElement = formDom instanceof ShadowRoot ? formDom.firstElementChild : formDom;
5429
- const yOffset = -100;
5430
- const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
5431
- window.scrollTo({ top: Math.max(y, 0), behavior: 'smooth' });
5432
- }
5433
- };
5434
- const formDidLoadHandler = async (formContext, validator) => {
5435
- var _a, _b;
5436
- if (!formContext.structure) {
5437
- if (formContext.gistId) {
5438
- const [newGistStructure] = await Promise.all([gistLoader(formContext.gistId), formContext.changeLanguage(formContext.language)]);
5439
- formContext.structure = newGistStructure;
5440
- }
5441
- else if (formContext.structureUrl) {
5442
- const [newGistStructure] = await Promise.all([fetchJson(formContext.structureUrl), formContext.changeLanguage(formContext.language)]);
5443
- formContext.structure = newGistStructure;
5444
- }
5445
- }
5446
- formContext.localeLanguage = formContext.language;
5447
- await formContext.changeLanguage(formContext.language);
5448
- if (!formContext.isMobileForm) {
5449
- try {
5450
- const key = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recaptchaKey;
5451
- if (key) {
5452
- const script = document.createElement('script');
5453
- script.src = `https://www.google.com/recaptcha/api.js?render=${key}&hl=${formContext.language}`;
5454
- script.async = true;
5455
- script.defer = true;
5456
- document.head.appendChild(script);
5457
- }
5458
- }
5459
- catch (error) {
5460
- console.log(error);
5461
- }
5462
- }
5463
- formContext.form = new getLanguageFromUrl.FormHook(formContext, validator);
5464
- };
5465
- const formGetFormHandler = async (formContext) => {
5466
- if (formContext.form)
5467
- return formContext.form;
5468
- };
5469
- const handleFormSubmit = async (formContext) => {
5470
- if (formContext.form)
5471
- return formContext.form.submit();
5472
- };
5473
- const formStructureRenderedHandler = async (formContext, isRendered) => {
5474
- var _a;
5475
- if (isRendered)
5476
- (_a = formContext.formReadyCallback) === null || _a === void 0 ? void 0 : _a.call(formContext);
5477
- };
5478
- const marketingQueryParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'gclid', 'fbclid'];
5479
- const getMarketingValues = (structure) => {
5480
- var _a;
5481
- if ((_a = structure === null || structure === void 0 ? void 0 : structure.data) === null || _a === void 0 ? void 0 : _a.disableUTMLog)
5482
- return {};
5483
- const params = new URLSearchParams(window.location.search);
5484
- if (typeof params.get('disable_utm_log') === 'string' && params.get('disable_utm_log') === 'true')
5485
- return {};
5486
- const marketingValues = {};
5487
- marketingQueryParams.forEach(param => {
5488
- if (!!params.get(param))
5489
- marketingValues[param] = params.get(param);
5490
- });
5491
- return marketingValues;
5492
- };
5493
- const onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
5494
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
5495
- try {
5496
- context.setIsLoading(true);
5497
- if ((formValues === null || formValues === void 0 ? void 0 : formValues['phone']) && !isValidPhoneNumber(formValues === null || formValues === void 0 ? void 0 : formValues['phone']))
5498
- formValues === null || formValues === void 0 ? true : delete formValues['phone'];
5499
- Object.keys(formValues).forEach(key => {
5500
- if (context[`${key}-format`]) {
5501
- formValues[key] = context[`${key}-format`];
5502
- }
5503
- });
5504
- const hasAdditionalData = !!((_b = (_a = context.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.truncatedFields) && !!((_e = Object.keys((_d = (_c = context.structure) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.truncatedFields)) === null || _e === void 0 ? void 0 : _e.length);
5505
- let additionalData = {};
5506
- const marketingValues = getMarketingValues(context === null || context === void 0 ? void 0 : context.structure);
5507
- let payload = Object.assign({}, formValues);
5508
- if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
5509
- payload = Object.assign(Object.assign({}, payload), (_j = (_h = context.structure) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.extraPayload);
5510
- if (hasAdditionalData)
5511
- payload.additionalData = Object.assign({}, additionalData);
5512
- if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
5513
- payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
5514
- if (hasAdditionalData) {
5515
- Object.entries((_l = (_k = context.structure) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.truncatedFields).forEach(([oldKey, truncateValue]) => {
5516
- if (Array.isArray(truncateValue)) {
5517
- let constructNewValue = '';
5518
- truncateValue.forEach(key => {
5519
- constructNewValue += payload[key.toString()] || key.toString();
5520
- });
5521
- payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
5522
- }
5523
- else if (typeof truncateValue === 'string' && truncateValue) {
5524
- if (oldKey.startsWith('parse date: ')) {
5525
- let tempKey = oldKey.replaceAll('parse date: ', '');
5526
- payload[tempKey] = loaderIcon.dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
5527
- }
5528
- else if (oldKey.startsWith('format date: ')) {
5529
- let tempKey = oldKey.replaceAll('format date: ', '');
5530
- payload[tempKey] = loaderIcon.dateFnsExports.formatISO(payload[tempKey]);
5531
- }
5532
- else {
5533
- additionalData[truncateValue] = payload[oldKey];
5534
- delete payload[oldKey];
5535
- }
5536
- }
5537
- });
5538
- }
5539
- let header = {
5540
- 'Content-Type': 'application/json',
5541
- 'Brand': (_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.brandId,
5542
- 'Accept-Language': context.localeLanguage || 'en',
5543
- };
5544
- if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
5545
- header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
5546
- if (!!((_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader))
5547
- header = Object.assign(Object.assign({}, header), (_s = (_r = context.structure) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.extraHeader);
5548
- let requestEndpoint = '';
5549
- if (context.isMobileForm) {
5550
- const token = await context.getMobileToken();
5551
- if (token.toLowerCase().startsWith('bearer')) {
5552
- header['Authorization'] = token;
5553
- requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppUrl;
5554
- }
5555
- else {
5556
- header['verification-token'] = token;
5557
- requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestAppCheckUrl;
5558
- }
5559
- }
5560
- else {
5561
- requestEndpoint = (_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.requestUrl;
5562
- if ((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey) {
5563
- const token = await grecaptcha.execute((_2 = (_1 = context.structure) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.recaptchaKey, { action: 'submit' });
5564
- header['Recaptcha-Token'] = token;
5565
- }
5566
- }
5567
- if (context.isDev)
5568
- requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
5569
- if (!requestEndpoint) {
5570
- throw new Error('Request endpoint is not configured');
5571
- }
5572
- const method = ((_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) || 'POST';
5573
- if (['get', 'head'].includes(method.toLowerCase()))
5574
- header = Object.assign(Object.assign({}, header), marketingValues);
5575
- else
5576
- payload = Object.assign(Object.assign({}, payload), marketingValues);
5577
- if (middleware) {
5578
- const middlewareRes = middleware(payload, header, requestEndpoint);
5579
- payload = Object.assign({}, middlewareRes.payload);
5580
- header = Object.assign({}, middlewareRes.header);
5581
- requestEndpoint = middlewareRes.url;
5582
- }
5583
- Object.values(context.form.pendingRequests).forEach(async (req) => {
5584
- try {
5585
- await req();
5586
- }
5587
- catch (error) {
5588
- console.error(error);
5589
- }
5590
- });
5591
- const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_6 = (_5 = context.structure) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.requestMethod) || 'POST' }, (((_9 = (_8 = (_7 = context.structure) === null || _7 === void 0 ? void 0 : _7.data) === null || _8 === void 0 ? void 0 : _8.requestMethod) === null || _9 === void 0 ? void 0 : _9.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
5592
- if (response.ok) {
5593
- const result = await (response === null || response === void 0 ? void 0 : response.json());
5594
- if (afterSuccess)
5595
- await afterSuccess(payload, header);
5596
- context.setSuccessCallback(result);
5597
- setTimeout(() => {
5598
- context.form.reset();
5599
- context.form.rerender({ rerenderForm: true, rerenderAll: true });
5600
- }, 100);
5601
- }
5602
- else {
5603
- const contentType = response.headers.get('content-type');
5604
- const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_11 = (_10 = (await response.json())) === null || _10 === void 0 ? void 0 : _10.message) === null || _11 === void 0 ? void 0 : _11.body : await response.text();
5605
- throw new Error(errorText);
5606
- }
5607
- }
5608
- catch (error) {
5609
- console.error(error);
5610
- context.setErrorCallback(error);
5611
- }
5612
- finally {
5613
- context.setIsLoading(false);
5614
- }
5615
- };
5616
- const functionHooks = {
5617
- formLanguageChange,
5618
- formErrorHandler,
5619
- handleFormSubmit,
5620
- formLoadingHandler,
5621
- formSuccessHandler,
5622
- formDidLoadHandler,
5623
- formGetFormHandler,
5624
- onFormSubmit,
5625
- formStructureRenderedHandler,
5626
- };
5627
-
5628
4744
  const getPhoneValidator = (countryCode) => {
5629
4745
  const phoneValidator = new AsYouType(Array.isArray(countryCode) ? undefined : countryCode);
5630
4746
  if (Array.isArray(countryCode)) {