adp-web-components 0.1.59 → 0.1.60

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 (295) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +7 -6
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +9 -5
  4. package/dist/cjs/form-date-picker.cjs.entry.js +2 -2
  5. package/dist/cjs/form-dialog_8.cjs.entry.js +40 -36
  6. package/dist/cjs/{form-error-message-CrGiKsoO.js → form-error-message-B2s83XoL.js} +1 -1
  7. package/dist/cjs/form-input-BZp9_abd.js +24 -0
  8. package/dist/cjs/form-input_4.cjs.entry.js +24 -18
  9. package/dist/cjs/form-switch.cjs.entry.js +9 -5
  10. package/dist/cjs/form-time-picker.cjs.entry.js +2 -2
  11. package/dist/cjs/general-inquiry-form.cjs.entry.js +24 -22
  12. package/dist/cjs/get-local-language-DV1oVchQ.js +194 -0
  13. package/dist/cjs/information-table.cjs.entry.js +1 -1
  14. package/dist/cjs/{loader-icon-qrSyqpQO.js → loader-icon-OTnFBvzm.js} +1150 -263
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  17. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +8 -7
  18. package/dist/cjs/part-lookup.cjs.entry.js +6 -5
  19. package/dist/cjs/service-booking-form.cjs.entry.js +11 -9
  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 +11 -9
  26. package/dist/cjs/state-object-DFBHdqbr.js +172 -0
  27. package/dist/cjs/test-drive-form.cjs.entry.js +11 -9
  28. package/dist/cjs/{type-BqNpIYcE.js → type-BSH0OxyO.js} +3 -3
  29. package/dist/cjs/{type-B8LchmnL.js → type-BvWomz0N.js} +2 -2
  30. package/dist/cjs/{type-BrzZ5GMr.js → type-NRLY9OsL.js} +9 -9
  31. package/dist/cjs/{get-local-language-CMptyFxH.js → types-B3WMBBhs.js} +4 -187
  32. package/dist/cjs/validation-BxmICJwK.js +89 -0
  33. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +18 -17
  34. package/dist/cjs/vehicle-lookup.cjs.entry.js +6 -5
  35. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +15 -14
  36. package/dist/collection/collection-manifest.json +1 -1
  37. package/dist/collection/components/components/empty.css +1 -1
  38. package/dist/collection/components/components/flexible-container.css +1 -1
  39. package/dist/collection/components/components/information-table.css +1 -1
  40. package/dist/collection/components/components/loading-spinner.css +1 -1
  41. package/dist/collection/components/components/shift-tab-content.css +1 -1
  42. package/dist/collection/components/components/shift-tabs.css +1 -1
  43. package/dist/collection/components/form-elements/components/form-error-message.js +1 -1
  44. package/dist/collection/components/form-elements/form-checkbox.js +29 -4
  45. package/dist/collection/components/form-elements/form-input.js +30 -5
  46. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  47. package/dist/collection/components/form-elements/form-phone-number.js +30 -5
  48. package/dist/collection/components/form-elements/form-picker-input.js +30 -5
  49. package/dist/collection/components/form-elements/form-select.js +30 -4
  50. package/dist/collection/components/form-elements/form-submit.js +31 -4
  51. package/dist/collection/components/form-elements/form-switch.js +29 -4
  52. package/dist/collection/components/form-elements/form-text-area.js +32 -6
  53. package/dist/collection/components/form-elements/form-vin-input.js +53 -9
  54. package/dist/collection/components/forms/defaults/mappers.js +58 -46
  55. package/dist/collection/components/forms/defaults/style.css +1 -1
  56. package/dist/collection/components/forms/defaults/validation.js +73 -75
  57. package/dist/collection/components/forms/general-inquiry.js +20 -20
  58. package/dist/collection/components/forms/service-booking.js +6 -7
  59. package/dist/collection/components/forms/ssc-lookup.js +6 -7
  60. package/dist/collection/components/forms/test-drive.js +6 -7
  61. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  62. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  63. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  64. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +1 -1
  65. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  66. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  67. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  68. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  69. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  70. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  71. package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
  72. package/dist/collection/features/form-hook/functions.js +14 -10
  73. package/dist/collection/features/form-hook/inputs/form-input.js +19 -1
  74. package/dist/collection/features/form-hook/render-structure.js +1 -1
  75. package/dist/components/dead-stock-lookup.js +1 -1
  76. package/dist/components/distributor-lookup.js +1 -1
  77. package/dist/components/flexible-container.js +1 -1
  78. package/dist/components/form-checkbox.js +1 -1
  79. package/dist/components/form-date-picker.js +1 -1
  80. package/dist/components/form-dialog.js +1 -1
  81. package/dist/components/form-input.js +1 -1
  82. package/dist/components/form-phone-number.js +1 -1
  83. package/dist/components/form-picker-input.js +1 -1
  84. package/dist/components/form-select.js +1 -1
  85. package/dist/components/form-shadow-input.js +1 -1
  86. package/dist/components/form-structure-error.js +1 -1
  87. package/dist/components/form-structure.js +1 -1
  88. package/dist/components/form-submit.js +1 -1
  89. package/dist/components/form-switch.js +1 -1
  90. package/dist/components/form-text-area.js +1 -1
  91. package/dist/components/form-time-picker.js +1 -1
  92. package/dist/components/form-vin-input.js +1 -1
  93. package/dist/components/general-inquiry-form.js +1 -1
  94. package/dist/components/information-table.js +1 -1
  95. package/dist/components/loading-spinner.js +1 -1
  96. package/dist/components/manufacturer-lookup.js +1 -1
  97. package/dist/components/manufacturer-part-lookup.js +1 -1
  98. package/dist/components/p--ZWu5kfe.js +5 -0
  99. package/dist/components/p-3o70TTPM.js +5 -0
  100. package/dist/components/p-9Jshpnf4.js +5 -0
  101. package/dist/components/{p-CwQEFAEF.js → p-B6mLLQ5Z.js} +1 -1
  102. package/dist/components/p-B6yxFkGn.js +5 -0
  103. package/dist/components/{p-CHdx52dw.js → p-BFvKdyvP.js} +1 -1
  104. package/dist/components/p-BMqwfA7R.js +5 -0
  105. package/dist/components/p-BNfiYxny.js +5 -0
  106. package/dist/components/{p-BsFKuBtC.js → p-BPtyEnCf.js} +1 -1
  107. package/dist/components/p-BW74FG6u.js +5 -0
  108. package/dist/components/p-Bau2XePf.js +5 -0
  109. package/dist/components/p-BnRsfejo.js +5 -0
  110. package/dist/components/p-BrEz2vz_.js +5 -0
  111. package/dist/components/p-C9lmL_jC.js +5 -0
  112. package/dist/components/p-CD_2-fK9.js +5 -0
  113. package/dist/components/{p-CRhdQvF0.js → p-CGKHe5aV.js} +1 -1
  114. package/dist/components/p-CL_w2QQD.js +5 -0
  115. package/dist/components/p-CTnFqaoj.js +5 -0
  116. package/dist/components/{p-D930Q75B.js → p-ChgSU1Ua.js} +1 -1
  117. package/dist/components/{p-DqNmAqS_.js → p-CiwfnrB-.js} +1 -1
  118. package/dist/components/p-Crd-9v2B.js +5 -0
  119. package/dist/components/{p-CBXAxKky.js → p-Cu6cHcY1.js} +1 -1
  120. package/dist/components/p-CzffKzcR.js +5 -0
  121. package/dist/components/{p-7y7dFWS-.js → p-D39ljWpy.js} +1 -1
  122. package/dist/components/p-DLBJDU-Z.js +5 -0
  123. package/dist/components/p-DVOFEN__.js +5 -0
  124. package/dist/components/p-DW9tnza0.js +5 -0
  125. package/dist/components/p-DXV8vbHa.js +5 -0
  126. package/dist/components/{p-B_QEyJOO.js → p-DYUVoVJU.js} +1 -1
  127. package/dist/components/p-Dbq3Z3a7.js +5 -0
  128. package/dist/components/p-DodX8HCB.js +5 -0
  129. package/dist/components/p-Dq5EPmKC.js +5 -0
  130. package/dist/components/{p-DJaWpqrV.js → p-DvwR_CeT.js} +1 -1
  131. package/dist/components/p-GjSy7W7d.js +5 -0
  132. package/dist/components/p-KrwBOds5.js +5 -0
  133. package/dist/components/p-VJzNTmbc.js +5 -0
  134. package/dist/components/p-to4xqGcM.js +5 -0
  135. package/dist/components/p-vJNV_Y5G.js +5 -0
  136. package/dist/components/part-lookup.js +1 -1
  137. package/dist/components/service-booking-form.js +1 -1
  138. package/dist/components/shift-accordion.js +1 -1
  139. package/dist/components/shift-checkbox.js +1 -1
  140. package/dist/components/shift-slider.js +1 -1
  141. package/dist/components/shift-switch.js +1 -1
  142. package/dist/components/shift-tab-content.js +1 -1
  143. package/dist/components/shift-tabs.js +1 -1
  144. package/dist/components/ssc-lookup-form.js +1 -1
  145. package/dist/components/test-drive-form.js +1 -1
  146. package/dist/components/vehicle-accessories.js +1 -1
  147. package/dist/components/vehicle-claimable-items.js +1 -1
  148. package/dist/components/vehicle-item-claim-form.js +1 -1
  149. package/dist/components/vehicle-lookup.js +1 -1
  150. package/dist/components/vehicle-paint-thickness.js +1 -1
  151. package/dist/components/vehicle-quotation-form.js +1 -1
  152. package/dist/components/vehicle-sale-information.js +1 -1
  153. package/dist/components/vehicle-service-history.js +1 -1
  154. package/dist/components/vehicle-specification.js +1 -1
  155. package/dist/components/vehicle-warranty-details.js +1 -1
  156. package/dist/components/vin-extractor.js +1 -1
  157. package/dist/esm/dead-stock-lookup_3.entry.js +4 -3
  158. package/dist/esm/flexible-container.entry.js +1 -1
  159. package/dist/esm/form-checkbox.entry.js +9 -5
  160. package/dist/esm/form-date-picker.entry.js +2 -2
  161. package/dist/esm/form-dialog_8.entry.js +37 -33
  162. package/dist/esm/{form-error-message-BRYZJjPy.js → form-error-message-C4gzgw8C.js} +1 -1
  163. package/dist/esm/form-input-DRd-doY1.js +22 -0
  164. package/dist/esm/form-input_4.entry.js +24 -18
  165. package/dist/esm/form-switch.entry.js +9 -5
  166. package/dist/esm/form-time-picker.entry.js +2 -2
  167. package/dist/esm/general-inquiry-form.entry.js +24 -22
  168. package/dist/esm/get-local-language-DJl5eWCY.js +189 -0
  169. package/dist/esm/information-table.entry.js +1 -1
  170. package/dist/esm/{loader-icon-DhBPTC5g.js → loader-icon-DUMSCofl.js} +1150 -263
  171. package/dist/esm/loader.js +1 -1
  172. package/dist/esm/loading-spinner.entry.js +1 -1
  173. package/dist/esm/manufacturer-part-lookup.entry.js +3 -2
  174. package/dist/esm/part-lookup.entry.js +4 -3
  175. package/dist/esm/service-booking-form.entry.js +11 -9
  176. package/dist/esm/shift-checkbox.entry.js +1 -1
  177. package/dist/esm/shift-components.js +1 -1
  178. package/dist/esm/shift-switch.entry.js +1 -1
  179. package/dist/esm/shift-tab-content.entry.js +1 -1
  180. package/dist/esm/shift-tabs_2.entry.js +2 -2
  181. package/dist/esm/ssc-lookup-form.entry.js +10 -8
  182. package/dist/esm/state-object-D7JLK2vI.js +169 -0
  183. package/dist/esm/test-drive-form.entry.js +10 -8
  184. package/dist/esm/{type-BluG_k1P.js → type-BJF9x4jt.js} +1 -1
  185. package/dist/esm/{type-D_rpjbuj.js → type-TpJOuSTQ.js} +1 -1
  186. package/dist/esm/{type-zroDKO0U.js → type-r4cI4JJY.js} +1 -1
  187. package/dist/esm/{get-local-language-CCj6E27L.js → types-Cn7YOi83.js} +1 -184
  188. package/dist/esm/validation-BsxDkThF.js +86 -0
  189. package/dist/esm/vehicle-accessories_7.entry.js +10 -9
  190. package/dist/esm/vehicle-lookup.entry.js +4 -3
  191. package/dist/esm/vehicle-quotation-form.entry.js +3 -2
  192. package/dist/shift-components/{p-d7da1152.entry.js → p-16e95508.entry.js} +1 -1
  193. package/dist/shift-components/{p-2fe3538e.entry.js → p-2c9950cc.entry.js} +1 -1
  194. package/dist/shift-components/p-380144df.entry.js +5 -0
  195. package/dist/shift-components/p-3853ea20.entry.js +5 -0
  196. package/dist/shift-components/{p-0e630c66.entry.js → p-3a91a272.entry.js} +1 -1
  197. package/dist/shift-components/{p-b4231e50.entry.js → p-5b587a6a.entry.js} +1 -1
  198. package/dist/shift-components/p-694d921f.entry.js +5 -0
  199. package/dist/shift-components/p-8a97341b.entry.js +5 -0
  200. package/dist/shift-components/p-8e6d183e.entry.js +5 -0
  201. package/dist/shift-components/p-98b10e49.entry.js +5 -0
  202. package/dist/shift-components/p-B-Ttz-dC.js +5 -0
  203. package/dist/shift-components/p-BUbNT08a.js +5 -0
  204. package/dist/shift-components/p-B_8bnsuC.js +5 -0
  205. package/dist/shift-components/{p-Bfkguwb-.js → p-B_HWC4v3.js} +1 -1
  206. package/dist/shift-components/p-Cn7YOi83.js +5 -0
  207. package/dist/shift-components/{p-B-8v_CQL.js → p-CpygzMlx.js} +1 -1
  208. package/dist/shift-components/p-DDiSIFiM.js +5 -0
  209. package/dist/shift-components/p-a9ee64a7.entry.js +5 -0
  210. package/dist/shift-components/p-aa72cb3d.entry.js +5 -0
  211. package/dist/shift-components/p-aae6a6e7.entry.js +5 -0
  212. package/dist/shift-components/p-bea5d49e.entry.js +5 -0
  213. package/dist/shift-components/p-c61723de.entry.js +5 -0
  214. package/dist/shift-components/p-cb348218.entry.js +5 -0
  215. package/dist/shift-components/{p-0a728fec.entry.js → p-d09cd43d.entry.js} +1 -1
  216. package/dist/shift-components/p-d1543879.entry.js +5 -0
  217. package/dist/shift-components/{p-f4914abc.entry.js → p-d7bb6f3a.entry.js} +1 -1
  218. package/dist/shift-components/{p-BW6seqLB.js → p-det1AUh4.js} +1 -1
  219. package/dist/shift-components/p-e4b69987.entry.js +5 -0
  220. package/dist/shift-components/p-eed5e111.entry.js +5 -0
  221. package/dist/shift-components/p-fd48f8b4.entry.js +5 -0
  222. package/dist/shift-components/p-fd626a4f.entry.js +5 -0
  223. package/dist/shift-components/{p-BK4ZcuiW.js → p-gokv-pzN.js} +1 -1
  224. package/dist/shift-components/p-nfwRLPgJ.js +5 -0
  225. package/dist/shift-components/shift-components.esm.js +1 -1
  226. package/dist/types/components/form-elements/form-checkbox.d.ts +2 -1
  227. package/dist/types/components/form-elements/form-input.d.ts +2 -0
  228. package/dist/types/components/form-elements/form-phone-number.d.ts +2 -1
  229. package/dist/types/components/form-elements/form-picker-input.d.ts +2 -0
  230. package/dist/types/components/form-elements/form-select.d.ts +2 -1
  231. package/dist/types/components/form-elements/form-submit.d.ts +2 -1
  232. package/dist/types/components/form-elements/form-switch.d.ts +2 -1
  233. package/dist/types/components/form-elements/form-text-area.d.ts +2 -1
  234. package/dist/types/components/form-elements/form-vin-input.d.ts +5 -0
  235. package/dist/types/components/forms/defaults/mappers.d.ts +7 -5
  236. package/dist/types/components/forms/defaults/validation.d.ts +29 -12
  237. package/dist/types/components.d.ts +76 -2
  238. package/dist/types/features/form-hook/inputs/form-input.d.ts +13 -0
  239. package/dist/types/features/form-hook/inputs/form-select.d.ts +2 -0
  240. package/dist/types/locales/vehicleLookup/claimableItems/type.d.ts +4 -4
  241. package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
  242. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +4 -4
  243. package/package.json +1 -1
  244. package/dist/cjs/state-object-B_0-oj8G.js +0 -243
  245. package/dist/collection/components/forms/service-booking/element-mapper.js +0 -134
  246. package/dist/collection/components/forms/service-booking/validations.js +0 -56
  247. package/dist/components/p-3WjYFbnU.js +0 -5
  248. package/dist/components/p-64G0Y_tC.js +0 -5
  249. package/dist/components/p-BEClgvwe.js +0 -5
  250. package/dist/components/p-BTqv9A1K.js +0 -5
  251. package/dist/components/p-Bd2-gh8M.js +0 -5
  252. package/dist/components/p-BffBGA_K.js +0 -5
  253. package/dist/components/p-Bon4whdT.js +0 -5
  254. package/dist/components/p-C-4CT4ZF.js +0 -5
  255. package/dist/components/p-C6WhIy7O.js +0 -5
  256. package/dist/components/p-CEM5EBP0.js +0 -5
  257. package/dist/components/p-Cxfsh87m.js +0 -5
  258. package/dist/components/p-D-tlRZMk.js +0 -5
  259. package/dist/components/p-DA0taq65.js +0 -5
  260. package/dist/components/p-DJKERvsE.js +0 -5
  261. package/dist/components/p-DNn44A0I.js +0 -5
  262. package/dist/components/p-DdWYx3mw.js +0 -5
  263. package/dist/components/p-Df56BNKV.js +0 -5
  264. package/dist/components/p-DjDUhW2q.js +0 -5
  265. package/dist/components/p-DkA_i--O.js +0 -5
  266. package/dist/components/p-DuNp8sSh.js +0 -5
  267. package/dist/components/p-NEl9bwNq.js +0 -5
  268. package/dist/components/p-RInF2GNQ.js +0 -5
  269. package/dist/components/p-_C-vBKCe.js +0 -5
  270. package/dist/components/p-eTLWmtnI.js +0 -5
  271. package/dist/components/p-vEsQVFLN.js +0 -5
  272. package/dist/components/p-zofQKKfh.js +0 -5
  273. package/dist/esm/state-object-Cwph5K2Q.js +0 -238
  274. package/dist/shift-components/p-0f83786b.entry.js +0 -5
  275. package/dist/shift-components/p-1c93d5e6.entry.js +0 -5
  276. package/dist/shift-components/p-26f3e6da.entry.js +0 -5
  277. package/dist/shift-components/p-3a7196d4.entry.js +0 -5
  278. package/dist/shift-components/p-45670df9.entry.js +0 -5
  279. package/dist/shift-components/p-4aa6f707.entry.js +0 -5
  280. package/dist/shift-components/p-50fd9d29.entry.js +0 -5
  281. package/dist/shift-components/p-63e1e80e.entry.js +0 -5
  282. package/dist/shift-components/p-67476178.entry.js +0 -5
  283. package/dist/shift-components/p-683f3ab3.entry.js +0 -5
  284. package/dist/shift-components/p-8700e868.entry.js +0 -5
  285. package/dist/shift-components/p-90a6803f.entry.js +0 -5
  286. package/dist/shift-components/p-BVMG8UaH.js +0 -5
  287. package/dist/shift-components/p-BnQp2Q8E.js +0 -5
  288. package/dist/shift-components/p-C3YLTa2J.js +0 -5
  289. package/dist/shift-components/p-c7eaf245.entry.js +0 -5
  290. package/dist/shift-components/p-f7692371.entry.js +0 -5
  291. package/dist/shift-components/p-f8ac59ee.entry.js +0 -5
  292. package/dist/shift-components/p-fac0fdb9.entry.js +0 -5
  293. package/dist/shift-components/p-fe02d5ed.entry.js +0 -5
  294. package/dist/types/components/forms/service-booking/element-mapper.d.ts +0 -7
  295. package/dist/types/components/forms/service-booking/validations.d.ts +0 -25
@@ -5,7 +5,8 @@
5
5
  'use strict';
6
6
 
7
7
  var getLanguageFromUrl = require('./get-language-from-url-CfLHbGsq.js');
8
- var getLocalLanguage = require('./get-local-language-CMptyFxH.js');
8
+ require('./types-B3WMBBhs.js');
9
+ var getLocalLanguage = require('./get-local-language-DV1oVchQ.js');
9
10
  var index = require('./index-D5c513Xn.js');
10
11
  var index$1 = require('./index-CmK48vN3.js');
11
12
 
@@ -59,208 +60,20 @@ async function fetchJson(url) {
59
60
  return data;
60
61
  }
61
62
 
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 onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
142
- 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;
143
- try {
144
- context.setIsLoading(true);
145
- Object.keys(formValues).forEach(key => {
146
- if (context[`${key}-format`]) {
147
- formValues[key] = context[`${key}-format`];
148
- }
149
- });
150
- 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);
151
- let additionalData = {};
152
- let payload = Object.assign({}, formValues);
153
- if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
154
- 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);
155
- if (hasAdditionalData)
156
- payload.additionalData = additionalData;
157
- if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
158
- payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
159
- if (hasAdditionalData) {
160
- 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]) => {
161
- if (Array.isArray(truncateValue)) {
162
- let constructNewValue = '';
163
- truncateValue.forEach(key => {
164
- constructNewValue += payload[key.toString()] || key.toString();
165
- });
166
- payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
167
- }
168
- else if (typeof truncateValue === 'string' && truncateValue) {
169
- if (oldKey.startsWith('parse date: ')) {
170
- let tempKey = oldKey.replaceAll('parse date: ', '');
171
- payload[tempKey] = index.dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
172
- }
173
- else if (oldKey.startsWith('format date: ')) {
174
- let tempKey = oldKey.replaceAll('format date: ', '');
175
- payload[tempKey] = index.dateFnsExports.formatISO(payload[tempKey]);
176
- }
177
- else {
178
- additionalData[truncateValue] = payload[oldKey];
179
- delete payload[oldKey];
180
- }
181
- }
182
- });
183
- }
184
- let header = {
185
- 'Content-Type': 'application/json',
186
- 'Accept-Language': context.localeLanguage || 'en',
187
- };
188
- if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
189
- header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
190
- if (!!((_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.extraHeader))
191
- header = Object.assign(Object.assign({}, header), (_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader);
192
- let requestEndpoint = '';
193
- if (context.isMobileForm) {
194
- const token = await context.getMobileToken();
195
- if (token.toLowerCase().startsWith('bearer')) {
196
- header['Authorization'] = token;
197
- requestEndpoint = (_s = (_r = context.structure) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.requestAppUrl;
198
- }
199
- else {
200
- header['verification-token'] = token;
201
- requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppCheckUrl;
202
- }
203
- }
204
- else {
205
- requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestUrl;
206
- if ((_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.recaptchaKey) {
207
- const token = await grecaptcha.execute((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey, { action: 'submit' });
208
- header['Recaptcha-Token'] = token;
209
- }
210
- }
211
- if (context.isDev)
212
- requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
213
- if (!requestEndpoint) {
214
- throw new Error('Request endpoint is not configured');
215
- }
216
- if (middleware) {
217
- const middlewareRes = middleware(payload, header, requestEndpoint);
218
- payload = Object.assign({}, middlewareRes.payload);
219
- header = Object.assign({}, middlewareRes.header);
220
- requestEndpoint = middlewareRes.url;
221
- }
222
- const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_2 = (_1 = context.structure) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.requestMethod) || 'POST' }, (((_5 = (_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) === null || _5 === void 0 ? void 0 : _5.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
223
- if (response.ok) {
224
- const result = await (response === null || response === void 0 ? void 0 : response.json());
225
- if (afterSuccess)
226
- await afterSuccess(payload, header);
227
- context.setSuccessCallback(result);
228
- setTimeout(() => {
229
- context.form.reset();
230
- context.form.rerender({ rerenderForm: true, rerenderAll: true });
231
- }, 100);
232
- }
233
- else {
234
- const contentType = response.headers.get('content-type');
235
- const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_7 = (_6 = (await response.json())) === null || _6 === void 0 ? void 0 : _6.message) === null || _7 === void 0 ? void 0 : _7.body : await response.text();
236
- throw new Error(errorText);
237
- }
238
- }
239
- catch (error) {
240
- console.error(error);
241
- context.setErrorCallback(error);
242
- }
243
- finally {
244
- context.setIsLoading(false);
245
- }
246
- };
247
- const functionHooks = {
248
- formLanguageChange,
249
- formErrorHandler,
250
- handleFormSubmit,
251
- formLoadingHandler,
252
- formSuccessHandler,
253
- formDidLoadHandler,
254
- formGetFormHandler,
255
- onFormSubmit,
256
- formStructureRenderedHandler,
257
- };
258
-
259
63
  // This file is a workaround for a bug in web browsers' "native"
260
64
  // ES6 importing system which is uncapable of importing "*.json" files.
261
65
  // https://github.com/catamphetamine/libphonenumber-js/issues/239
262
66
  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}"]]]}};
263
67
 
68
+ // Importing from a ".js" file is a workaround for Node.js "ES Modules"
69
+ // importing system which is even uncapable of importing "*.json" files.
70
+
71
+ function withMetadataArgument(func, _arguments) {
72
+ var args = Array.prototype.slice.call(_arguments);
73
+ args.push(metadata);
74
+ return func.apply(this, args)
75
+ }
76
+
264
77
  // Copy-pasted from:
265
78
  // https://github.com/substack/semver-compare/blob/master/index.js
266
79
  //
@@ -293,12 +106,12 @@ function isObject(object) {
293
106
  return object !== undefined && object !== null && object.constructor === objectConstructor;
294
107
  }
295
108
 
296
- 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); }
297
- function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
298
- 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); } }
299
- function _createClass$7(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
300
- function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
301
- 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); }
109
+ 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); }
110
+ function _classCallCheck$8(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
111
+ 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); } }
112
+ function _createClass$8(e, r, t) { return r && _defineProperties$7(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
113
+ function _toPropertyKey$b(t) { var i = _toPrimitive$b(t, "string"); return "symbol" == _typeof$c(i) ? i : i + ""; }
114
+ 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); }
302
115
 
303
116
  // Added "idd_prefix" and "default_idd_prefix".
304
117
  var V3 = '1.2.0';
@@ -313,12 +126,12 @@ var CALLING_CODE_REG_EXP = /^\d+$/;
313
126
  */
314
127
  var Metadata = /*#__PURE__*/function () {
315
128
  function Metadata(metadata) {
316
- _classCallCheck$7(this, Metadata);
129
+ _classCallCheck$8(this, Metadata);
317
130
  validateMetadata(metadata);
318
131
  this.metadata = metadata;
319
132
  setVersion.call(this, metadata);
320
133
  }
321
- return _createClass$7(Metadata, [{
134
+ return _createClass$8(Metadata, [{
322
135
  key: "getCountries",
323
136
  value: function getCountries() {
324
137
  return Object.keys(this.metadata.countries).filter(function (_) {
@@ -559,12 +372,12 @@ var Metadata = /*#__PURE__*/function () {
559
372
  }();
560
373
  var NumberingPlan = /*#__PURE__*/function () {
561
374
  function NumberingPlan(metadata, globalMetadataObject) {
562
- _classCallCheck$7(this, NumberingPlan);
375
+ _classCallCheck$8(this, NumberingPlan);
563
376
  this.globalMetadataObject = globalMetadataObject;
564
377
  this.metadata = metadata;
565
378
  setVersion.call(this, globalMetadataObject.metadata);
566
379
  }
567
- return _createClass$7(NumberingPlan, [{
380
+ return _createClass$8(NumberingPlan, [{
568
381
  key: "callingCode",
569
382
  value: function callingCode() {
570
383
  return this.metadata[0];
@@ -719,11 +532,11 @@ var NumberingPlan = /*#__PURE__*/function () {
719
532
  }();
720
533
  var Format = /*#__PURE__*/function () {
721
534
  function Format(format, metadata) {
722
- _classCallCheck$7(this, Format);
535
+ _classCallCheck$8(this, Format);
723
536
  this._format = format;
724
537
  this.metadata = metadata;
725
538
  }
726
- return _createClass$7(Format, [{
539
+ return _createClass$8(Format, [{
727
540
  key: "pattern",
728
541
  value: function pattern() {
729
542
  return this._format[0];
@@ -787,11 +600,11 @@ var Format = /*#__PURE__*/function () {
787
600
  var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
788
601
  var Type = /*#__PURE__*/function () {
789
602
  function Type(type, metadata) {
790
- _classCallCheck$7(this, Type);
603
+ _classCallCheck$8(this, Type);
791
604
  this.type = type;
792
605
  this.metadata = metadata;
793
606
  }
794
- return _createClass$7(Type, [{
607
+ return _createClass$8(Type, [{
795
608
  key: "pattern",
796
609
  value: function pattern() {
797
610
  if (this.metadata.v1) return this.type;
@@ -846,7 +659,7 @@ function validateMetadata(metadata) {
846
659
  // so istanbul will show this as "branch not covered".
847
660
  /* istanbul ignore next */
848
661
  var typeOf = function typeOf(_) {
849
- return _typeof$7(_);
662
+ return _typeof$c(_);
850
663
  };
851
664
 
852
665
  /**
@@ -866,6 +679,11 @@ function getCountryCallingCode(country, metadata) {
866
679
  }
867
680
  throw new Error("Unknown country: ".concat(country));
868
681
  }
682
+ function isSupportedCountry(country, metadata) {
683
+ // metadata = new Metadata(metadata)
684
+ // return metadata.hasCountry(country)
685
+ return metadata.countries.hasOwnProperty(country);
686
+ }
869
687
  function setVersion(metadata) {
870
688
  var version = metadata.version;
871
689
  if (typeof version === 'number') {
@@ -1056,9 +874,9 @@ function matchesEntirely(text, regularExpressionText) {
1056
874
  return new RegExp('^(?:' + regularExpressionText + ')$').test(text);
1057
875
  }
1058
876
 
1059
- 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."); }
1060
- 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; } }
1061
- 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; }
877
+ 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."); }
878
+ 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; } }
879
+ 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; }
1062
880
  var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
1063
881
 
1064
882
  // Finds out national phone number type (fixed line, mobile, etc)
@@ -1114,7 +932,7 @@ function getNumberType(input, options, metadata) {
1114
932
  }
1115
933
  return 'FIXED_LINE';
1116
934
  }
1117
- for (var _iterator = _createForOfIteratorHelperLoose$5(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
935
+ for (var _iterator = _createForOfIteratorHelperLoose$6(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
1118
936
  var type = _step.value;
1119
937
  if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
1120
938
  return type;
@@ -1218,6 +1036,11 @@ function couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {
1218
1036
  }
1219
1037
 
1220
1038
  // The minimum length of the national significant number.
1039
+ var MIN_LENGTH_FOR_NSN = 2;
1040
+
1041
+ // The ITU says the maximum length should be 15,
1042
+ // but one can find longer numbers in Germany.
1043
+ var MAX_LENGTH_FOR_NSN = 17;
1221
1044
 
1222
1045
  // The maximum length of the country calling code.
1223
1046
  var MAX_LENGTH_COUNTRY_CODE = 3;
@@ -1372,9 +1195,9 @@ function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
1372
1195
  };
1373
1196
  }
1374
1197
 
1375
- 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."); }
1376
- 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; } }
1377
- 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; }
1198
+ 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."); }
1199
+ 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; } }
1200
+ 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; }
1378
1201
 
1379
1202
  // Returns the exact country that the `nationalPhoneNumber` belongs to
1380
1203
  // in cases of ambiguity, i.e. when multiple countries share the same "country calling code".
@@ -1386,7 +1209,7 @@ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
1386
1209
 
1387
1210
  // const matchingCountries = []
1388
1211
 
1389
- for (var _iterator = _createForOfIteratorHelperLoose$4(countries), _step; !(_step = _iterator()).done;) {
1212
+ for (var _iterator = _createForOfIteratorHelperLoose$5(countries), _step; !(_step = _iterator()).done;) {
1390
1213
  var country = _step.value;
1391
1214
  metadata.selectNumberingPlan(country);
1392
1215
  // "Leading digits" patterns are only defined for about 20% of all countries.
@@ -1844,6 +1667,173 @@ function getIddPrefix(country, callingCode, metadata) {
1844
1667
  }
1845
1668
  }
1846
1669
 
1670
+ // The RFC 3966 format for extensions.
1671
+ var RFC3966_EXTN_PREFIX = ';ext=';
1672
+
1673
+ /**
1674
+ * Helper method for constructing regular expressions for parsing. Creates
1675
+ * an expression that captures up to max_length digits.
1676
+ * @return {string} RegEx pattern to capture extension digits.
1677
+ */
1678
+ var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
1679
+ return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
1680
+ };
1681
+
1682
+ /**
1683
+ * Helper initialiser method to create the regular-expression pattern to match
1684
+ * extensions.
1685
+ * Copy-pasted from Google's `libphonenumber`:
1686
+ * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
1687
+ * @return {string} RegEx pattern to capture extensions.
1688
+ */
1689
+ function createExtensionPattern(purpose) {
1690
+ // We cap the maximum length of an extension based on the ambiguity of the way
1691
+ // the extension is prefixed. As per ITU, the officially allowed length for
1692
+ // extensions is actually 40, but we don't support this since we haven't seen real
1693
+ // examples and this introduces many false interpretations as the extension labels
1694
+ // are not standardized.
1695
+ /** @type {string} */
1696
+ var extLimitAfterExplicitLabel = '20';
1697
+ /** @type {string} */
1698
+ var extLimitAfterLikelyLabel = '15';
1699
+ /** @type {string} */
1700
+ var extLimitAfterAmbiguousChar = '9';
1701
+ /** @type {string} */
1702
+ var extLimitWhenNotSure = '6';
1703
+
1704
+ /** @type {string} */
1705
+ var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
1706
+ // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
1707
+ /** @type {string} */
1708
+ var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
1709
+ /** @type {string} */
1710
+ var optionalExtnSuffix = "#?";
1711
+
1712
+ // Here the extension is called out in more explicit way, i.e mentioning it obvious
1713
+ // patterns like "ext.".
1714
+ /** @type {string} */
1715
+ var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)";
1716
+ // One-character symbols that can be used to indicate an extension, and less
1717
+ // commonly used or more ambiguous extension labels.
1718
+ /** @type {string} */
1719
+ var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)";
1720
+ // When extension is not separated clearly.
1721
+ /** @type {string} */
1722
+ var ambiguousSeparator = "[- ]+";
1723
+ // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
1724
+ // comma as extension label may have it.
1725
+ /** @type {string} */
1726
+ var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
1727
+ // ",," is commonly used for auto dialling the extension when connected. First
1728
+ // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
1729
+ // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
1730
+ // button with the extension number following.
1731
+ /** @type {string} */
1732
+ var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
1733
+
1734
+ /** @type {string} */
1735
+ var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
1736
+ /** @type {string} */
1737
+ var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
1738
+ /** @type {string} */
1739
+ var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1740
+ /** @type {string} */
1741
+ var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
1742
+
1743
+ /** @type {string} */
1744
+ var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
1745
+ /** @type {string} */
1746
+ var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
1747
+
1748
+ // The first regular expression covers RFC 3966 format, where the extension is added
1749
+ // using ";ext=". The second more generic where extension is mentioned with explicit
1750
+ // labels like "ext:". In both the above cases we allow more numbers in extension than
1751
+ // any other extension labels. The third one captures when single character extension
1752
+ // labels or less commonly used labels are used. In such cases we capture fewer
1753
+ // extension digits in order to reduce the chance of falsely interpreting two
1754
+ // numbers beside each other as a number + extension. The fourth one covers the
1755
+ // special case of American numbers where the extension is written with a hash
1756
+ // at the end, such as "- 503#". The fifth one is exclusively for extension
1757
+ // autodialling formats which are used when dialling and in this case we accept longer
1758
+ // extensions. The last one is more liberal on the number of commas that acts as
1759
+ // extension labels, so we have a strict cap on the number of digits in such extensions.
1760
+ return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
1761
+ }
1762
+
1763
+ // Regular expression of viable phone numbers. This is location independent.
1764
+ // Checks we have at least three leading digits, and only valid punctuation,
1765
+ // alpha characters and digits in the phone number. Does not include extension
1766
+ // data. The symbol 'x' is allowed here as valid punctuation since it is often
1767
+ // used as a placeholder for carrier codes, for example in Brazilian phone
1768
+ // numbers. We also allow multiple '+' characters at the start.
1769
+ //
1770
+ // Corresponds to the following:
1771
+ // [digits]{minLengthNsn}|
1772
+ // plus_sign*
1773
+ // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
1774
+ //
1775
+ // The first reg-ex is to allow short numbers (two digits long) to be parsed if
1776
+ // they are entered as "15" etc, but only if there is no punctuation in them.
1777
+ // The second expression restricts the number of digits to three or more, but
1778
+ // then allows them to be in international form, and to have alpha-characters
1779
+ // and punctuation. We split up the two reg-exes here and combine them when
1780
+ // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
1781
+ // with ^ and append $ to each branch.
1782
+ //
1783
+ // "Note VALID_PUNCTUATION starts with a -,
1784
+ // so must be the first in the range" (c) Google devs.
1785
+ // (wtf did they mean by saying that; probably nothing)
1786
+ //
1787
+ var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
1788
+ //
1789
+ // And this is the second reg-exp:
1790
+ // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
1791
+ //
1792
+ var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
1793
+
1794
+ // This regular expression isn't present in Google's `libphonenumber`
1795
+ // and is only used to determine whether the phone number being input
1796
+ // is too short for it to even consider it a "valid" number.
1797
+ // This is just a way to differentiate between a really invalid phone
1798
+ // number like "abcde" and a valid phone number that a user has just
1799
+ // started inputting, like "+1" or "1": both these cases would be
1800
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1801
+ // library can provide a more detailed error message — whether it's
1802
+ // really "not a number", or is it just a start of a valid phone number.
1803
+ var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
1804
+ var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
1805
+ // Phone number extensions
1806
+ '(?:' + createExtensionPattern() + ')?';
1807
+
1808
+ // The combined regular expression for valid phone numbers:
1809
+ //
1810
+ var VALID_PHONE_NUMBER_PATTERN = new RegExp(
1811
+ // Either a short two-digit-only phone number
1812
+ '^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
1813
+ // Or a longer fully parsed phone number (min 3 characters)
1814
+ '^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
1815
+
1816
+ // Checks to see if the string of characters could possibly be a phone number at
1817
+ // all. At the moment, checks to see that the string begins with at least 2
1818
+ // digits, ignoring any punctuation commonly found in phone numbers. This method
1819
+ // does not require the number to be normalized in advance - but does assume
1820
+ // that leading non-number symbols have been removed, such as by the method
1821
+ // `extract_possible_number`.
1822
+ //
1823
+ function isViablePhoneNumber(number) {
1824
+ return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
1825
+ }
1826
+
1827
+ // This is just a way to differentiate between a really invalid phone
1828
+ // number like "abcde" and a valid phone number that a user has just
1829
+ // started inputting, like "+1" or "1": both these cases would be
1830
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1831
+ // library can provide a more detailed error message — whether it's
1832
+ // really "not a number", or is it just a start of a valid phone number.
1833
+ function isViablePhoneNumberStart(number) {
1834
+ return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
1835
+ }
1836
+
1847
1837
  /**
1848
1838
  * @param {object} - `{ ?number, ?extension }`.
1849
1839
  * @return {string} Phone URI (RFC 3966).
@@ -2061,15 +2051,15 @@ function pickFirstMatchingElement(elements, testFunction) {
2061
2051
  }
2062
2052
  }
2063
2053
 
2064
- 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); }
2065
- 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; }
2066
- 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; }
2067
- 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; }
2068
- function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2069
- 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); } }
2070
- function _createClass$6(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2071
- function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
2072
- 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); }
2054
+ 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); }
2055
+ 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; }
2056
+ 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; }
2057
+ 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; }
2058
+ function _classCallCheck$7(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2059
+ 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); } }
2060
+ function _createClass$7(e, r, t) { return r && _defineProperties$6(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
2061
+ function _toPropertyKey$a(t) { var i = _toPrimitive$a(t, "string"); return "symbol" == _typeof$b(i) ? i : i + ""; }
2062
+ 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); }
2073
2063
  var PhoneNumber = /*#__PURE__*/function () {
2074
2064
  /**
2075
2065
  * @param {string} countryOrCountryCallingCode
@@ -2078,7 +2068,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2078
2068
  * @return {PhoneNumber}
2079
2069
  */
2080
2070
  function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
2081
- _classCallCheck$6(this, PhoneNumber);
2071
+ _classCallCheck$7(this, PhoneNumber);
2082
2072
  // Validate `countryOrCountryCallingCode` argument.
2083
2073
  if (!countryOrCountryCallingCode) {
2084
2074
  throw new TypeError('First argument is required');
@@ -2136,7 +2126,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2136
2126
  return metadata;
2137
2127
  };
2138
2128
  }
2139
- return _createClass$6(PhoneNumber, [{
2129
+ return _createClass$7(PhoneNumber, [{
2140
2130
  key: "setExt",
2141
2131
  value: function setExt(ext) {
2142
2132
  this.ext = ext;
@@ -2199,7 +2189,7 @@ var PhoneNumber = /*#__PURE__*/function () {
2199
2189
  }, {
2200
2190
  key: "format",
2201
2191
  value: function format(_format, options) {
2202
- return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {
2192
+ return formatNumber(this, _format, options ? _objectSpread$4(_objectSpread$4({}, options), {}, {
2203
2193
  v2: true
2204
2194
  }) : {
2205
2195
  v2: true
@@ -2245,9 +2235,70 @@ function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJs
2245
2235
  }
2246
2236
  var E164_NUMBER_REGEXP = /^\+\d+$/;
2247
2237
 
2248
- 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."); }
2249
- 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; } }
2250
- 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; }
2238
+ 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); }
2239
+ function _createClass$6(e, r, t) { return Object.defineProperty(e, "prototype", { writable: false }), e; }
2240
+ function _classCallCheck$6(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
2241
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
2242
+ 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); }
2243
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
2244
+ 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); }
2245
+ 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); }
2246
+ 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; }
2247
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
2248
+ function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
2249
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
2250
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
2251
+ // https://stackoverflow.com/a/46971044/970769
2252
+ // "Breaking changes in Typescript 2.1"
2253
+ // "Extending built-ins like Error, Array, and Map may no longer work."
2254
+ // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
2255
+ // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
2256
+ var ParseError = /*#__PURE__*/function (_Error) {
2257
+ function ParseError(code) {
2258
+ var _this;
2259
+ _classCallCheck$6(this, ParseError);
2260
+ _this = _callSuper(this, ParseError, [code]);
2261
+ // Set the prototype explicitly.
2262
+ // Any subclass of FooError will have to manually set the prototype as well.
2263
+ Object.setPrototypeOf(_this, ParseError.prototype);
2264
+ _this.name = _this.constructor.name;
2265
+ return _this;
2266
+ }
2267
+ _inherits(ParseError, _Error);
2268
+ return _createClass$6(ParseError);
2269
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
2270
+
2271
+ // Regexp of all known extension prefixes used by different regions followed by
2272
+ // 1 or more valid digits, for use when parsing.
2273
+ var EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');
2274
+
2275
+ // Strips any extension (as in, the part of the number dialled after the call is
2276
+ // connected, usually indicated with extn, ext, x or similar) from the end of
2277
+ // the number, and returns it.
2278
+ function extractExtension(number) {
2279
+ var start = number.search(EXTN_PATTERN);
2280
+ if (start < 0) {
2281
+ return {};
2282
+ }
2283
+ // If we find a potential extension, and the number preceding this is a viable
2284
+ // number, we assume it is an extension.
2285
+ var numberWithoutExtension = number.slice(0, start);
2286
+ var matches = number.match(EXTN_PATTERN);
2287
+ var i = 1;
2288
+ while (i < matches.length) {
2289
+ if (matches[i]) {
2290
+ return {
2291
+ number: numberWithoutExtension,
2292
+ ext: matches[i]
2293
+ };
2294
+ }
2295
+ i++;
2296
+ }
2297
+ }
2298
+
2299
+ 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."); }
2300
+ 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; } }
2301
+ 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; }
2251
2302
  // These mappings map a character (key) to a specific digit that should
2252
2303
  // replace it for normalization purposes. Non-European digits that
2253
2304
  // may be used in phone numbers are mapped to a European equivalent.
@@ -2329,35 +2380,667 @@ function parseDigit(character) {
2329
2380
  return DIGITS[character];
2330
2381
  }
2331
2382
 
2332
- /**
2333
- * Parses phone number digits from a string.
2334
- * Drops all punctuation leaving only digits.
2335
- * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
2336
- * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
2337
- * @param {string} string
2338
- * @return {string}
2339
- * @example
2340
- * ```js
2341
- * parseDigits('8 (800) 555')
2342
- * // Outputs '8800555'.
2343
- * ```
2344
- */
2345
- function parseDigits(string) {
2346
- var result = '';
2347
- // Using `.split('')` here instead of normal `for ... of`
2348
- // because the importing application doesn't neccessarily include an ES6 polyfill.
2349
- // The `.split('')` approach discards "exotic" UTF-8 characters
2350
- // (the ones consisting of four bytes) but digits
2351
- // (including non-European ones) don't fall into that range
2352
- // so such "exotic" characters would be discarded anyway.
2353
- for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2354
- var character = _step.value;
2355
- var digit = parseDigit(character);
2356
- if (digit) {
2357
- result += digit;
2383
+ /**
2384
+ * Parses phone number digits from a string.
2385
+ * Drops all punctuation leaving only digits.
2386
+ * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
2387
+ * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
2388
+ * @param {string} string
2389
+ * @return {string}
2390
+ * @example
2391
+ * ```js
2392
+ * parseDigits('8 (800) 555')
2393
+ * // Outputs '8800555'.
2394
+ * ```
2395
+ */
2396
+ function parseDigits(string) {
2397
+ var result = '';
2398
+ // Using `.split('')` here instead of normal `for ... of`
2399
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
2400
+ // The `.split('')` approach discards "exotic" UTF-8 characters
2401
+ // (the ones consisting of four bytes) but digits
2402
+ // (including non-European ones) don't fall into that range
2403
+ // so such "exotic" characters would be discarded anyway.
2404
+ for (var _iterator = _createForOfIteratorHelperLoose$4(string.split('')), _step; !(_step = _iterator()).done;) {
2405
+ var character = _step.value;
2406
+ var digit = parseDigit(character);
2407
+ if (digit) {
2408
+ result += digit;
2409
+ }
2410
+ }
2411
+ return result;
2412
+ }
2413
+
2414
+ 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."); }
2415
+ 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; } }
2416
+ 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; }
2417
+
2418
+ /**
2419
+ * Parses phone number characters from a string.
2420
+ * Drops all punctuation leaving only digits and the leading `+` sign (if any).
2421
+ * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
2422
+ * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
2423
+ * @param {string} string
2424
+ * @return {string}
2425
+ * @example
2426
+ * ```js
2427
+ * // Outputs '8800555'.
2428
+ * parseIncompletePhoneNumber('8 (800) 555')
2429
+ * // Outputs '+7800555'.
2430
+ * parseIncompletePhoneNumber('+7 800 555')
2431
+ * ```
2432
+ */
2433
+ function parseIncompletePhoneNumber(string) {
2434
+ var result = '';
2435
+ // Using `.split('')` here instead of normal `for ... of`
2436
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
2437
+ // The `.split('')` approach discards "exotic" UTF-8 characters
2438
+ // (the ones consisting of four bytes) but digits
2439
+ // (including non-European ones) don't fall into that range
2440
+ // so such "exotic" characters would be discarded anyway.
2441
+ for (var _iterator = _createForOfIteratorHelperLoose$3(string.split('')), _step; !(_step = _iterator()).done;) {
2442
+ var character = _step.value;
2443
+ result += parsePhoneNumberCharacter(character, result) || '';
2444
+ }
2445
+ return result;
2446
+ }
2447
+
2448
+ /**
2449
+ * Parses next character while parsing phone number digits (including a `+`)
2450
+ * from text: discards everything except `+` and digits, and `+` is only allowed
2451
+ * at the start of a phone number.
2452
+ * For example, is used in `react-phone-number-input` where it uses
2453
+ * [`input-format`](https://gitlab.com/catamphetamine/input-format).
2454
+ * @param {string} character - Yet another character from raw input string.
2455
+ * @param {string?} prevParsedCharacters - Previous parsed characters.
2456
+ * @param {function?} eventListener - An optional "on event" function.
2457
+ * @return {string?} The parsed character.
2458
+ */
2459
+ function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
2460
+ // Only allow a leading `+`.
2461
+ if (character === '+') {
2462
+ // If this `+` is not the first parsed character
2463
+ // then discard it.
2464
+ if (prevParsedCharacters) {
2465
+ return;
2466
+ }
2467
+ return '+';
2468
+ }
2469
+ // Allow digits.
2470
+ return parseDigit(character);
2471
+ }
2472
+
2473
+ // When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
2474
+ // they can have their "calling code" part written separately in a `phone-context` parameter.
2475
+ // Example: `"tel:12133734253;phone-context=+1"`.
2476
+ // This function parses the full phone number from the local number and the `phone-context`
2477
+ // when the `phone-context` contains a `+` sign.
2478
+
2479
+ var PLUS_SIGN = '+';
2480
+ var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
2481
+ var RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';
2482
+ var RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';
2483
+
2484
+ /**
2485
+ * Regular expression of valid global-number-digits for the phone-context
2486
+ * parameter, following the syntax defined in RFC3966.
2487
+ */
2488
+ var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');
2489
+
2490
+ // In this port of Google's library, we don't accept alpha characters in phone numbers.
2491
+ // const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
2492
+ var ALPHANUM_ = VALID_DIGITS;
2493
+ var RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2494
+ var VALID_ALPHA_ = 'a-zA-Z';
2495
+ var RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
2496
+ var RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\.)*' + RFC3966_TOPLABEL_ + '\\.?$';
2497
+
2498
+ /**
2499
+ * Regular expression of valid domainname for the phone-context parameter,
2500
+ * following the syntax defined in RFC3966.
2501
+ */
2502
+ var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');
2503
+ var RFC3966_PREFIX_ = 'tel:';
2504
+ var RFC3966_PHONE_CONTEXT_ = ';phone-context=';
2505
+ var RFC3966_ISDN_SUBADDRESS_ = ';isub=';
2506
+
2507
+ /**
2508
+ * Extracts the value of the phone-context parameter of `numberToExtractFrom`,
2509
+ * following the syntax defined in RFC3966.
2510
+ *
2511
+ * @param {string} numberToExtractFrom
2512
+ * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
2513
+ */
2514
+ function extractPhoneContext(numberToExtractFrom) {
2515
+ var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
2516
+ // If no phone-context parameter is present
2517
+ if (indexOfPhoneContext < 0) {
2518
+ return null;
2519
+ }
2520
+ var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
2521
+ // If phone-context parameter is empty
2522
+ if (phoneContextStart >= numberToExtractFrom.length) {
2523
+ return '';
2524
+ }
2525
+ var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);
2526
+ // If phone-context is not the last parameter
2527
+ if (phoneContextEnd >= 0) {
2528
+ return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
2529
+ } else {
2530
+ return numberToExtractFrom.substring(phoneContextStart);
2531
+ }
2532
+ }
2533
+
2534
+ /**
2535
+ * Returns whether the value of phoneContext follows the syntax defined in RFC3966.
2536
+ *
2537
+ * @param {string|null} phoneContext
2538
+ * @return {boolean}
2539
+ */
2540
+ function isPhoneContextValid(phoneContext) {
2541
+ if (phoneContext === null) {
2542
+ return true;
2543
+ }
2544
+ if (phoneContext.length === 0) {
2545
+ return false;
2546
+ }
2547
+
2548
+ // Does phone-context value match pattern of global-number-digits or domainname.
2549
+ return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
2550
+ }
2551
+
2552
+ /**
2553
+ * @param {string} numberToParse
2554
+ * @param {string} nationalNumber
2555
+ * @return {}
2556
+ */
2557
+ function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
2558
+ var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
2559
+ var phoneContext = extractPhoneContext(numberToParse);
2560
+ if (!isPhoneContextValid(phoneContext)) {
2561
+ throw new ParseError('NOT_A_NUMBER');
2562
+ }
2563
+ var phoneNumberString;
2564
+ if (phoneContext === null) {
2565
+ // Extract a possible number from the string passed in.
2566
+ // (this strips leading characters that could not be the start of a phone number)
2567
+ phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';
2568
+ } else {
2569
+ phoneNumberString = '';
2570
+
2571
+ // If the phone context contains a phone number prefix, we need to capture
2572
+ // it, whereas domains will be ignored.
2573
+ if (phoneContext.charAt(0) === PLUS_SIGN) {
2574
+ phoneNumberString += phoneContext;
2575
+ }
2576
+
2577
+ // Now append everything between the "tel:" prefix and the phone-context.
2578
+ // This should include the national number, an optional extension or
2579
+ // isdn-subaddress component. Note we also handle the case when "tel:" is
2580
+ // missing, as we have seen in some of the phone number inputs.
2581
+ // In that case, we append everything from the beginning.
2582
+ var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
2583
+ var indexOfNationalNumber;
2584
+ // RFC 3966 "tel:" prefix is preset at this stage because
2585
+ // `isPhoneContextValid()` requires it to be present.
2586
+ /* istanbul ignore else */
2587
+ if (indexOfRfc3966Prefix >= 0) {
2588
+ indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
2589
+ } else {
2590
+ indexOfNationalNumber = 0;
2591
+ }
2592
+ var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
2593
+ phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
2594
+ }
2595
+
2596
+ // Delete the isdn-subaddress and everything after it if it is present.
2597
+ // Note extension won't appear at the same time with isdn-subaddress
2598
+ // according to paragraph 5.3 of the RFC3966 spec.
2599
+ var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
2600
+ if (indexOfIsdn > 0) {
2601
+ phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
2602
+ }
2603
+ // If both phone context and isdn-subaddress are absent but other
2604
+ // parameters are present, the parameters are left in nationalNumber.
2605
+ // This is because we are concerned about deleting content from a potential
2606
+ // number string when there is no strong evidence that the number is
2607
+ // actually written in RFC3966.
2608
+
2609
+ if (phoneNumberString !== '') {
2610
+ return phoneNumberString;
2611
+ }
2612
+ }
2613
+
2614
+ // This is a port of Google Android `libphonenumber`'s
2615
+ // `phonenumberutil.js` of December 31th, 2018.
2616
+ //
2617
+ // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
2618
+
2619
+
2620
+ // We don't allow input strings for parsing to be longer than 250 chars.
2621
+ // This prevents malicious input from consuming CPU.
2622
+ var MAX_INPUT_STRING_LENGTH = 250;
2623
+
2624
+ // This consists of the plus symbol, digits, and arabic-indic digits.
2625
+ var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
2626
+
2627
+ // Regular expression of trailing characters that we want to remove.
2628
+ // A trailing `#` is sometimes used when writing phone numbers with extensions in US.
2629
+ // Example: "+1 (645) 123 1234-910#" number has extension "910".
2630
+ var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
2631
+
2632
+ // Examples:
2633
+ //
2634
+ // ```js
2635
+ // parse('8 (800) 555-35-35', 'RU')
2636
+ // parse('8 (800) 555-35-35', 'RU', metadata)
2637
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } })
2638
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
2639
+ // parse('+7 800 555 35 35')
2640
+ // parse('+7 800 555 35 35', metadata)
2641
+ // ```
2642
+ //
2643
+
2644
+ /**
2645
+ * Parses a phone number.
2646
+ *
2647
+ * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
2648
+ * parse('123456789', { defaultCountry: 'RU' }, metadata)
2649
+ * parse('123456789', undefined, metadata)
2650
+ *
2651
+ * @param {string} input
2652
+ * @param {object} [options]
2653
+ * @param {object} metadata
2654
+ * @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).
2655
+ */
2656
+ function parse(text, options, metadata) {
2657
+ // If assigning the `{}` default value is moved to the arguments above,
2658
+ // code coverage would decrease for some weird reason.
2659
+ options = options || {};
2660
+ metadata = new Metadata(metadata);
2661
+
2662
+ // Validate `defaultCountry`.
2663
+ if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
2664
+ if (options.v2) {
2665
+ throw new ParseError('INVALID_COUNTRY');
2666
+ }
2667
+ throw new Error("Unknown country: ".concat(options.defaultCountry));
2668
+ }
2669
+
2670
+ // Parse the phone number.
2671
+ var _parseInput = parseInput(text, options.v2, options.extract),
2672
+ formattedPhoneNumber = _parseInput.number,
2673
+ ext = _parseInput.ext,
2674
+ error = _parseInput.error;
2675
+
2676
+ // If the phone number is not viable then return nothing.
2677
+ if (!formattedPhoneNumber) {
2678
+ if (options.v2) {
2679
+ if (error === 'TOO_SHORT') {
2680
+ throw new ParseError('TOO_SHORT');
2681
+ }
2682
+ throw new ParseError('NOT_A_NUMBER');
2683
+ }
2684
+ return {};
2685
+ }
2686
+ var _parsePhoneNumber = parsePhoneNumber$1(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),
2687
+ country = _parsePhoneNumber.country,
2688
+ nationalNumber = _parsePhoneNumber.nationalNumber,
2689
+ countryCallingCode = _parsePhoneNumber.countryCallingCode,
2690
+ countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,
2691
+ carrierCode = _parsePhoneNumber.carrierCode;
2692
+ if (!metadata.hasSelectedNumberingPlan()) {
2693
+ if (options.v2) {
2694
+ throw new ParseError('INVALID_COUNTRY');
2695
+ }
2696
+ return {};
2697
+ }
2698
+
2699
+ // Validate national (significant) number length.
2700
+ if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
2701
+ // Won't throw here because the regexp already demands length > 1.
2702
+ /* istanbul ignore if */
2703
+ if (options.v2) {
2704
+ throw new ParseError('TOO_SHORT');
2705
+ }
2706
+ // Google's demo just throws an error in this case.
2707
+ return {};
2708
+ }
2709
+
2710
+ // Validate national (significant) number length.
2711
+ //
2712
+ // A sidenote:
2713
+ //
2714
+ // They say that sometimes national (significant) numbers
2715
+ // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
2716
+ // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
2717
+ // Such numbers will just be discarded.
2718
+ //
2719
+ if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
2720
+ if (options.v2) {
2721
+ throw new ParseError('TOO_LONG');
2722
+ }
2723
+ // Google's demo just throws an error in this case.
2724
+ return {};
2725
+ }
2726
+ if (options.v2) {
2727
+ var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
2728
+ if (country) {
2729
+ phoneNumber.country = country;
2730
+ }
2731
+ if (carrierCode) {
2732
+ phoneNumber.carrierCode = carrierCode;
2733
+ }
2734
+ if (ext) {
2735
+ phoneNumber.ext = ext;
2736
+ }
2737
+ phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
2738
+ return phoneNumber;
2739
+ }
2740
+
2741
+ // Check if national phone number pattern matches the number.
2742
+ // National number pattern is different for each country,
2743
+ // even for those ones which are part of the "NANPA" group.
2744
+ var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
2745
+ if (!options.extended) {
2746
+ return valid ? result(country, nationalNumber, ext) : {};
2747
+ }
2748
+
2749
+ // isInternational: countryCallingCode !== undefined
2750
+
2751
+ return {
2752
+ country: country,
2753
+ countryCallingCode: countryCallingCode,
2754
+ carrierCode: carrierCode,
2755
+ valid: valid,
2756
+ possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, country, metadata) ? true : false,
2757
+ phone: nationalNumber,
2758
+ ext: ext
2759
+ };
2760
+ }
2761
+
2762
+ /**
2763
+ * Extracts a formatted phone number from text.
2764
+ * Doesn't guarantee that the extracted phone number
2765
+ * is a valid phone number (for example, doesn't validate its length).
2766
+ * @param {string} text
2767
+ * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
2768
+ * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
2769
+ * @return {string}
2770
+ * @example
2771
+ * // Returns "(213) 373-4253".
2772
+ * extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
2773
+ */
2774
+ function _extractFormattedPhoneNumber(text, extract, throwOnError) {
2775
+ if (!text) {
2776
+ return;
2777
+ }
2778
+ if (text.length > MAX_INPUT_STRING_LENGTH) {
2779
+ if (throwOnError) {
2780
+ throw new ParseError('TOO_LONG');
2781
+ }
2782
+ return;
2783
+ }
2784
+ if (extract === false) {
2785
+ return text;
2786
+ }
2787
+ // Attempt to extract a possible number from the string passed in
2788
+ var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
2789
+ if (startsAt < 0) {
2790
+ return;
2791
+ }
2792
+ return text
2793
+ // Trim everything to the left of the phone number
2794
+ .slice(startsAt)
2795
+ // Remove trailing non-numerical characters
2796
+ .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
2797
+ }
2798
+
2799
+ /**
2800
+ * @param {string} text - Input.
2801
+ * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
2802
+ * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
2803
+ * @return {object} `{ ?number, ?ext }`.
2804
+ */
2805
+ function parseInput(text, v2, extract) {
2806
+ // // Parse RFC 3966 phone number URI.
2807
+ // if (text && text.indexOf('tel:') === 0) {
2808
+ // return parseRFC3966(text)
2809
+ // }
2810
+ // let number = extractFormattedPhoneNumber(text, extract, v2)
2811
+ var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
2812
+ extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
2813
+ return _extractFormattedPhoneNumber(text, extract, v2);
2814
+ }
2815
+ });
2816
+ // If the phone number is not viable, then abort.
2817
+ if (!number) {
2818
+ return {};
2819
+ }
2820
+ if (!isViablePhoneNumber(number)) {
2821
+ if (isViablePhoneNumberStart(number)) {
2822
+ return {
2823
+ error: 'TOO_SHORT'
2824
+ };
2825
+ }
2826
+ return {};
2827
+ }
2828
+ // Attempt to parse extension first, since it doesn't require region-specific
2829
+ // data and we want to have the non-normalised number here.
2830
+ var withExtensionStripped = extractExtension(number);
2831
+ if (withExtensionStripped.ext) {
2832
+ return withExtensionStripped;
2833
+ }
2834
+ return {
2835
+ number: number
2836
+ };
2837
+ }
2838
+
2839
+ /**
2840
+ * Creates `parse()` result object.
2841
+ */
2842
+ function result(country, nationalNumber, ext) {
2843
+ var result = {
2844
+ country: country,
2845
+ phone: nationalNumber
2846
+ };
2847
+ if (ext) {
2848
+ result.ext = ext;
2849
+ }
2850
+ return result;
2851
+ }
2852
+
2853
+ /**
2854
+ * Parses a viable phone number.
2855
+ * @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
2856
+ * @param {string} [defaultCountry]
2857
+ * @param {string} [defaultCallingCode]
2858
+ * @param {Metadata} metadata
2859
+ * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
2860
+ */
2861
+ function parsePhoneNumber$1(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
2862
+ // Extract calling code from phone number.
2863
+ var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata),
2864
+ countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
2865
+ countryCallingCode = _extractCountryCallin.countryCallingCode,
2866
+ number = _extractCountryCallin.number;
2867
+
2868
+ // The exact country of the phone number
2869
+ var country;
2870
+
2871
+ // If `formattedPhoneNumber` is passed in "international" format,
2872
+ // choose a country by `countryCallingCode`.
2873
+ if (countryCallingCode) {
2874
+ metadata.selectNumberingPlan(countryCallingCode);
2875
+ }
2876
+ // Else, if `formattedPhoneNumber` is passed in "national" format,
2877
+ // then `number` is defined and `countryCallingCode` is `undefined`.
2878
+ else if (number && (defaultCountry || defaultCallingCode)) {
2879
+ metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
2880
+ if (defaultCountry) {
2881
+ country = defaultCountry;
2882
+ }
2883
+ countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
2884
+ } else return {};
2885
+ if (!number) {
2886
+ return {
2887
+ countryCallingCodeSource: countryCallingCodeSource,
2888
+ countryCallingCode: countryCallingCode
2889
+ };
2890
+ }
2891
+ var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), country, metadata),
2892
+ nationalNumber = _extractNationalNumbe.nationalNumber,
2893
+ carrierCode = _extractNationalNumbe.carrierCode;
2894
+
2895
+ // Sometimes there are several countries
2896
+ // corresponding to the same country phone code
2897
+ // (e.g. NANPA countries all having `1` country phone code).
2898
+ // Therefore, to reliably determine the exact country,
2899
+ // national (significant) number should have been parsed first.
2900
+ //
2901
+ // When `metadata.json` is generated, all "ambiguous" country phone codes
2902
+ // get their countries populated with the full set of
2903
+ // "phone number type" regular expressions.
2904
+ //
2905
+ var exactCountry = getCountryByCallingCode(countryCallingCode, {
2906
+ nationalNumber: nationalNumber,
2907
+ metadata: metadata
2908
+ });
2909
+ if (exactCountry) {
2910
+ country = exactCountry;
2911
+ /* istanbul ignore if */
2912
+ if (exactCountry === '001') ; else {
2913
+ metadata.selectNumberingPlan(country);
2914
+ }
2915
+ }
2916
+ return {
2917
+ country: country,
2918
+ countryCallingCode: countryCallingCode,
2919
+ countryCallingCodeSource: countryCallingCodeSource,
2920
+ nationalNumber: nationalNumber,
2921
+ carrierCode: carrierCode
2922
+ };
2923
+ }
2924
+
2925
+ 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); }
2926
+ 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; }
2927
+ 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; }
2928
+ 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; }
2929
+ function _toPropertyKey$9(t) { var i = _toPrimitive$9(t, "string"); return "symbol" == _typeof$9(i) ? i : i + ""; }
2930
+ 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); }
2931
+ function parsePhoneNumberWithError(text, options, metadata) {
2932
+ return parse(text, _objectSpread$3(_objectSpread$3({}, options), {}, {
2933
+ v2: true
2934
+ }), metadata);
2935
+ }
2936
+
2937
+ 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); }
2938
+ 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; }
2939
+ 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; }
2940
+ 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; }
2941
+ function _toPropertyKey$8(t) { var i = _toPrimitive$8(t, "string"); return "symbol" == _typeof$8(i) ? i : i + ""; }
2942
+ 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); }
2943
+ function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$5(r, e) || _nonIterableRest$2(); }
2944
+ 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."); }
2945
+ 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; } }
2946
+ 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; }
2947
+ 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; } }
2948
+ function _arrayWithHoles$2(r) { if (Array.isArray(r)) return r; }
2949
+
2950
+ // Extracts the following properties from function arguments:
2951
+ // * input `text`
2952
+ // * `options` object
2953
+ // * `metadata` JSON
2954
+ function normalizeArguments(args) {
2955
+ var _Array$prototype$slic = Array.prototype.slice.call(args),
2956
+ _Array$prototype$slic2 = _slicedToArray$2(_Array$prototype$slic, 4),
2957
+ arg_1 = _Array$prototype$slic2[0],
2958
+ arg_2 = _Array$prototype$slic2[1],
2959
+ arg_3 = _Array$prototype$slic2[2],
2960
+ arg_4 = _Array$prototype$slic2[3];
2961
+ var text;
2962
+ var options;
2963
+ var metadata;
2964
+
2965
+ // If the phone number is passed as a string.
2966
+ // `parsePhoneNumber('88005553535', ...)`.
2967
+ if (typeof arg_1 === 'string') {
2968
+ text = arg_1;
2969
+ } else throw new TypeError('A text for parsing must be a string.');
2970
+
2971
+ // If "default country" argument is being passed then move it to `options`.
2972
+ // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
2973
+ if (!arg_2 || typeof arg_2 === 'string') {
2974
+ if (arg_4) {
2975
+ options = arg_3;
2976
+ metadata = arg_4;
2977
+ } else {
2978
+ options = undefined;
2979
+ metadata = arg_3;
2980
+ }
2981
+ if (arg_2) {
2982
+ options = _objectSpread$2({
2983
+ defaultCountry: arg_2
2984
+ }, options);
2358
2985
  }
2359
2986
  }
2360
- return result;
2987
+ // `defaultCountry` is not passed.
2988
+ // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
2989
+ else if (isObject(arg_2)) {
2990
+ if (arg_3) {
2991
+ options = arg_2;
2992
+ metadata = arg_3;
2993
+ } else {
2994
+ metadata = arg_2;
2995
+ }
2996
+ } else throw new Error("Invalid second argument: ".concat(arg_2));
2997
+ return {
2998
+ text: text,
2999
+ options: options,
3000
+ metadata: metadata
3001
+ };
3002
+ }
3003
+
3004
+ 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); }
3005
+ 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; }
3006
+ 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; }
3007
+ 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; }
3008
+ function _toPropertyKey$7(t) { var i = _toPrimitive$7(t, "string"); return "symbol" == _typeof$7(i) ? i : i + ""; }
3009
+ 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); }
3010
+ function parsePhoneNumber(text, options, metadata) {
3011
+ // Validate `defaultCountry`.
3012
+ if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {
3013
+ options = _objectSpread$1(_objectSpread$1({}, options), {}, {
3014
+ defaultCountry: undefined
3015
+ });
3016
+ }
3017
+ // Parse phone number.
3018
+ try {
3019
+ return parsePhoneNumberWithError(text, options, metadata);
3020
+ } catch (error) {
3021
+ /* istanbul ignore else */
3022
+ if (error instanceof ParseError) ; else {
3023
+ throw error;
3024
+ }
3025
+ }
3026
+ }
3027
+
3028
+ 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); }
3029
+ 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; }
3030
+ 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; }
3031
+ 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; }
3032
+ function _toPropertyKey$6(t) { var i = _toPrimitive$6(t, "string"); return "symbol" == _typeof$6(i) ? i : i + ""; }
3033
+ 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); }
3034
+ function isValidPhoneNumber$1() {
3035
+ var _normalizeArguments = normalizeArguments(arguments),
3036
+ text = _normalizeArguments.text,
3037
+ options = _normalizeArguments.options,
3038
+ metadata = _normalizeArguments.metadata;
3039
+ options = _objectSpread(_objectSpread({}, options), {}, {
3040
+ extract: false
3041
+ });
3042
+ var phoneNumber = parsePhoneNumber(text, options, metadata);
3043
+ return phoneNumber && phoneNumber.isValid() || false;
2361
3044
  }
2362
3045
 
2363
3046
  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); }
@@ -4700,6 +5383,10 @@ var AsYouType$1 = /*#__PURE__*/function () {
4700
5383
  }]);
4701
5384
  }();
4702
5385
 
5386
+ function isValidPhoneNumber() {
5387
+ return withMetadataArgument(isValidPhoneNumber$1, arguments)
5388
+ }
5389
+
4703
5390
  // Importing from a ".js" file is a workaround for Node.js "ES Modules"
4704
5391
  // importing system which is even uncapable of importing "*.json" files.
4705
5392
 
@@ -4710,6 +5397,206 @@ function AsYouType(country) {
4710
5397
  AsYouType.prototype = Object.create(AsYouType$1.prototype, {});
4711
5398
  AsYouType.prototype.constructor = AsYouType;
4712
5399
 
5400
+ const formLanguageChange = async (formContext, newLanguage) => {
5401
+ var _a, _b, _c, _d, _e;
5402
+ const sharedLocales = await getLocalLanguage.getSharedFormLocal(newLanguage);
5403
+ const LS = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.localization;
5404
+ 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 : {}) : {};
5405
+ formContext.locale = Object.assign(Object.assign({}, structureLocalization), { sharedFormLocales: Object.assign(Object.assign({}, sharedLocales), structureLocalization === null || structureLocalization === void 0 ? void 0 : structureLocalization.sharedFormLocales) });
5406
+ formContext.localeLanguage = newLanguage;
5407
+ (_e = formContext.form) === null || _e === void 0 ? void 0 : _e.rerender({ rerenderAll: true });
5408
+ };
5409
+ const formErrorHandler = async (formContext, error) => {
5410
+ var _a, _b, _c;
5411
+ 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) || '';
5412
+ if (formContext === null || formContext === void 0 ? void 0 : formContext.errorCallback)
5413
+ formContext.errorCallback(error, message);
5414
+ else
5415
+ formContext.errorMessage = message;
5416
+ };
5417
+ const formLoadingHandler = async (formContext, isLoading) => {
5418
+ formContext.isLoading = isLoading;
5419
+ if (formContext.loadingChanges)
5420
+ formContext.loadingChanges(isLoading);
5421
+ };
5422
+ const formSuccessHandler = async (formContext, data) => {
5423
+ if (formContext.successCallback)
5424
+ formContext.successCallback(data, formContext.locale['Form submitted successfully.'] || '');
5425
+ else
5426
+ formContext.form.openDialog();
5427
+ if (!formContext.disableScrollToTop) {
5428
+ const formDom = formContext.el.shadowRoot || formContext.el;
5429
+ let targetElement = formDom instanceof ShadowRoot ? formDom.firstElementChild : formDom;
5430
+ const yOffset = -100;
5431
+ const y = targetElement.getBoundingClientRect().top + window.pageYOffset + yOffset;
5432
+ window.scrollTo({ top: Math.max(y, 0), behavior: 'smooth' });
5433
+ }
5434
+ };
5435
+ const formDidLoadHandler = async (formContext, validator) => {
5436
+ var _a, _b;
5437
+ if (!formContext.structure) {
5438
+ if (formContext.gistId) {
5439
+ const [newGistStructure] = await Promise.all([gistLoader(formContext.gistId), formContext.changeLanguage(formContext.language)]);
5440
+ formContext.structure = newGistStructure;
5441
+ }
5442
+ else if (formContext.structureUrl) {
5443
+ const [newGistStructure] = await Promise.all([fetchJson(formContext.structureUrl), formContext.changeLanguage(formContext.language)]);
5444
+ formContext.structure = newGistStructure;
5445
+ }
5446
+ }
5447
+ formContext.localeLanguage = formContext.language;
5448
+ await formContext.changeLanguage(formContext.language);
5449
+ if (!formContext.isMobileForm) {
5450
+ try {
5451
+ const key = (_b = (_a = formContext.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recaptchaKey;
5452
+ if (key) {
5453
+ const script = document.createElement('script');
5454
+ script.src = `https://www.google.com/recaptcha/api.js?render=${key}&hl=${formContext.language}`;
5455
+ script.async = true;
5456
+ script.defer = true;
5457
+ document.head.appendChild(script);
5458
+ }
5459
+ }
5460
+ catch (error) {
5461
+ console.log(error);
5462
+ }
5463
+ }
5464
+ formContext.form = new getLanguageFromUrl.FormHook(formContext, validator);
5465
+ };
5466
+ const formGetFormHandler = async (formContext) => {
5467
+ if (formContext.form)
5468
+ return formContext.form;
5469
+ };
5470
+ const handleFormSubmit = async (formContext) => {
5471
+ if (formContext.form)
5472
+ return formContext.form.submit();
5473
+ };
5474
+ const formStructureRenderedHandler = async (formContext, isRendered) => {
5475
+ var _a;
5476
+ if (isRendered)
5477
+ (_a = formContext.formReadyCallback) === null || _a === void 0 ? void 0 : _a.call(formContext);
5478
+ };
5479
+ const onFormSubmit = async ({ context, formValues, middleware, afterSuccess }) => {
5480
+ 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;
5481
+ try {
5482
+ context.setIsLoading(true);
5483
+ if ((formValues === null || formValues === void 0 ? void 0 : formValues['phone']) && !isValidPhoneNumber(formValues === null || formValues === void 0 ? void 0 : formValues['phone']))
5484
+ formValues === null || formValues === void 0 ? true : delete formValues['phone'];
5485
+ Object.keys(formValues).forEach(key => {
5486
+ if (context[`${key}-format`]) {
5487
+ formValues[key] = context[`${key}-format`];
5488
+ }
5489
+ });
5490
+ 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);
5491
+ let additionalData = {};
5492
+ let payload = Object.assign({}, formValues);
5493
+ if ((_g = (_f = context.structure) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.extraPayload)
5494
+ 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);
5495
+ if (hasAdditionalData)
5496
+ payload.additionalData = additionalData;
5497
+ if (!!(context === null || context === void 0 ? void 0 : context.extraPayload))
5498
+ payload = Object.assign(Object.assign({}, payload), context === null || context === void 0 ? void 0 : context.extraPayload);
5499
+ if (hasAdditionalData) {
5500
+ 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]) => {
5501
+ if (Array.isArray(truncateValue)) {
5502
+ let constructNewValue = '';
5503
+ truncateValue.forEach(key => {
5504
+ constructNewValue += payload[key.toString()] || key.toString();
5505
+ });
5506
+ payload = Object.assign(Object.assign({}, payload), { [oldKey]: constructNewValue });
5507
+ }
5508
+ else if (typeof truncateValue === 'string' && truncateValue) {
5509
+ if (oldKey.startsWith('parse date: ')) {
5510
+ let tempKey = oldKey.replaceAll('parse date: ', '');
5511
+ payload[tempKey] = index.dateFnsExports.parse(payload[tempKey], truncateValue, new Date());
5512
+ }
5513
+ else if (oldKey.startsWith('format date: ')) {
5514
+ let tempKey = oldKey.replaceAll('format date: ', '');
5515
+ payload[tempKey] = index.dateFnsExports.formatISO(payload[tempKey]);
5516
+ }
5517
+ else {
5518
+ additionalData[truncateValue] = payload[oldKey];
5519
+ delete payload[oldKey];
5520
+ }
5521
+ }
5522
+ });
5523
+ }
5524
+ let header = {
5525
+ 'Content-Type': 'application/json',
5526
+ 'Brand': (_o = (_m = context.structure) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.brandId,
5527
+ 'Accept-Language': context.localeLanguage || 'en',
5528
+ };
5529
+ if (!!(context === null || context === void 0 ? void 0 : context.extraHeader))
5530
+ header = Object.assign(Object.assign({}, header), context === null || context === void 0 ? void 0 : context.extraHeader);
5531
+ if (!!((_q = (_p = context.structure) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.extraHeader))
5532
+ 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);
5533
+ let requestEndpoint = '';
5534
+ if (context.isMobileForm) {
5535
+ const token = await context.getMobileToken();
5536
+ if (token.toLowerCase().startsWith('bearer')) {
5537
+ header['Authorization'] = token;
5538
+ requestEndpoint = (_u = (_t = context.structure) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.requestAppUrl;
5539
+ }
5540
+ else {
5541
+ header['verification-token'] = token;
5542
+ requestEndpoint = (_w = (_v = context.structure) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.requestAppCheckUrl;
5543
+ }
5544
+ }
5545
+ else {
5546
+ requestEndpoint = (_y = (_x = context.structure) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.requestUrl;
5547
+ if ((_0 = (_z = context.structure) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.recaptchaKey) {
5548
+ 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' });
5549
+ header['Recaptcha-Token'] = token;
5550
+ }
5551
+ }
5552
+ if (context.isDev)
5553
+ requestEndpoint = requestEndpoint.replaceAll('production=true', 'production=false');
5554
+ if (!requestEndpoint) {
5555
+ throw new Error('Request endpoint is not configured');
5556
+ }
5557
+ if (middleware) {
5558
+ const middlewareRes = middleware(payload, header, requestEndpoint);
5559
+ payload = Object.assign({}, middlewareRes.payload);
5560
+ header = Object.assign({}, middlewareRes.header);
5561
+ requestEndpoint = middlewareRes.url;
5562
+ }
5563
+ const response = await fetch(requestEndpoint, Object.assign({ headers: header, method: ((_4 = (_3 = context.structure) === null || _3 === void 0 ? void 0 : _3.data) === null || _4 === void 0 ? void 0 : _4.requestMethod) || 'POST' }, (((_7 = (_6 = (_5 = context.structure) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.requestMethod) === null || _7 === void 0 ? void 0 : _7.toLowerCase()) === 'get' ? {} : { body: JSON.stringify(payload) })));
5564
+ if (response.ok) {
5565
+ const result = await (response === null || response === void 0 ? void 0 : response.json());
5566
+ if (afterSuccess)
5567
+ await afterSuccess(payload, header);
5568
+ context.setSuccessCallback(result);
5569
+ setTimeout(() => {
5570
+ context.form.reset();
5571
+ context.form.rerender({ rerenderForm: true, rerenderAll: true });
5572
+ }, 100);
5573
+ }
5574
+ else {
5575
+ const contentType = response.headers.get('content-type');
5576
+ const errorText = (contentType === null || contentType === void 0 ? void 0 : contentType.includes('application/json')) ? (_9 = (_8 = (await response.json())) === null || _8 === void 0 ? void 0 : _8.message) === null || _9 === void 0 ? void 0 : _9.body : await response.text();
5577
+ throw new Error(errorText);
5578
+ }
5579
+ }
5580
+ catch (error) {
5581
+ console.error(error);
5582
+ context.setErrorCallback(error);
5583
+ }
5584
+ finally {
5585
+ context.setIsLoading(false);
5586
+ }
5587
+ };
5588
+ const functionHooks = {
5589
+ formLanguageChange,
5590
+ formErrorHandler,
5591
+ handleFormSubmit,
5592
+ formLoadingHandler,
5593
+ formSuccessHandler,
5594
+ formDidLoadHandler,
5595
+ formGetFormHandler,
5596
+ onFormSubmit,
5597
+ formStructureRenderedHandler,
5598
+ };
5599
+
4713
5600
  const getPhoneValidator = (countryCode) => {
4714
5601
  const phoneValidator = new AsYouType(Array.isArray(countryCode) ? undefined : countryCode);
4715
5602
  if (Array.isArray(countryCode)) {