@riverty/web-components 6.2.0 → 6.3.0

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 (397) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +78 -0
  3. package/custom-elements.json +4 -0
  4. package/package.json +3 -2
  5. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  6. package/dist/cjs/focusable-Oll_rmtP.js +0 -28
  7. package/dist/cjs/formData-B2DZyLxP.js +0 -44
  8. package/dist/cjs/index-BnETQtSf.js +0 -1834
  9. package/dist/cjs/index.cjs.js +0 -2
  10. package/dist/cjs/loader.cjs.js +0 -13
  11. package/dist/cjs/r-accordion-panel.cjs.entry.js +0 -24
  12. package/dist/cjs/r-accordion-section.cjs.entry.js +0 -125
  13. package/dist/cjs/r-accordion-trigger.cjs.entry.js +0 -93
  14. package/dist/cjs/r-accordion.cjs.entry.js +0 -20
  15. package/dist/cjs/r-alert.cjs.entry.js +0 -146
  16. package/dist/cjs/r-badge.cjs.entry.js +0 -40
  17. package/dist/cjs/r-button.cjs.entry.js +0 -149
  18. package/dist/cjs/r-checkbox-group.cjs.entry.js +0 -232
  19. package/dist/cjs/r-checkbox.cjs.entry.js +0 -269
  20. package/dist/cjs/r-design-system-devtools.cjs.entry.js +0 -31
  21. package/dist/cjs/r-dialog.cjs.entry.js +0 -107
  22. package/dist/cjs/r-hint_2.cjs.entry.js +0 -50
  23. package/dist/cjs/r-icon-button_2.cjs.entry.js +0 -467
  24. package/dist/cjs/r-icon.cjs.entry.js +0 -284
  25. package/dist/cjs/r-illustration.cjs.entry.js +0 -396
  26. package/dist/cjs/r-input-code.cjs.entry.js +0 -432
  27. package/dist/cjs/r-input-date.cjs.entry.js +0 -519
  28. package/dist/cjs/r-input-password.cjs.entry.js +0 -265
  29. package/dist/cjs/r-input-phone-number.cjs.entry.js +0 -2525
  30. package/dist/cjs/r-input.cjs.entry.js +0 -402
  31. package/dist/cjs/r-list-item.cjs.entry.js +0 -109
  32. package/dist/cjs/r-pagination.cjs.entry.js +0 -314
  33. package/dist/cjs/r-panel.cjs.entry.js +0 -184
  34. package/dist/cjs/r-popover-action.cjs.entry.js +0 -80
  35. package/dist/cjs/r-popover-content.cjs.entry.js +0 -62
  36. package/dist/cjs/r-popover-headline.cjs.entry.js +0 -28
  37. package/dist/cjs/r-popover-trigger.cjs.entry.js +0 -70
  38. package/dist/cjs/r-popover.cjs.entry.js +0 -347
  39. package/dist/cjs/r-progress-bar.cjs.entry.js +0 -25
  40. package/dist/cjs/r-radio-button-description.cjs.entry.js +0 -18
  41. package/dist/cjs/r-radio-button-leading.cjs.entry.js +0 -18
  42. package/dist/cjs/r-radio-button-title.cjs.entry.js +0 -18
  43. package/dist/cjs/r-radio-button-trailing.cjs.entry.js +0 -18
  44. package/dist/cjs/r-radio-button.cjs.entry.js +0 -139
  45. package/dist/cjs/r-radio-group.cjs.entry.js +0 -425
  46. package/dist/cjs/r-select-option.cjs.entry.js +0 -130
  47. package/dist/cjs/r-select.cjs.entry.js +0 -1101
  48. package/dist/cjs/r-skip-link.cjs.entry.js +0 -19
  49. package/dist/cjs/r-stepper-item.cjs.entry.js +0 -42
  50. package/dist/cjs/r-stepper.cjs.entry.js +0 -99
  51. package/dist/cjs/r-tab-panel.cjs.entry.js +0 -26
  52. package/dist/cjs/r-tab.cjs.entry.js +0 -62
  53. package/dist/cjs/r-tabs-list.cjs.entry.js +0 -175
  54. package/dist/cjs/r-tabs.cjs.entry.js +0 -277
  55. package/dist/cjs/r-textarea.cjs.entry.js +0 -270
  56. package/dist/cjs/r-toast-group.cjs.entry.js +0 -46
  57. package/dist/cjs/r-toast.cjs.entry.js +0 -306
  58. package/dist/cjs/style-observer-D9zSP9wP.js +0 -1118
  59. package/dist/cjs/theming-NqxjhVJS.js +0 -109
  60. package/dist/cjs/web-components.cjs.js +0 -25
  61. package/dist/collection/collection-manifest.json +0 -60
  62. package/dist/collection/components/accordion/accordion.css +0 -24
  63. package/dist/collection/components/accordion/accordion.js +0 -90
  64. package/dist/collection/components/accordion/exports.js +0 -1
  65. package/dist/collection/components/accordion-panel/accordion-panel.css +0 -50
  66. package/dist/collection/components/accordion-panel/accordion-panel.js +0 -86
  67. package/dist/collection/components/accordion-section/accordion-section.css +0 -27
  68. package/dist/collection/components/accordion-section/accordion-section.js +0 -235
  69. package/dist/collection/components/accordion-trigger/accordion-trigger.css +0 -93
  70. package/dist/collection/components/accordion-trigger/accordion-trigger.js +0 -220
  71. package/dist/collection/components/alert/alert.css +0 -119
  72. package/dist/collection/components/alert/alert.js +0 -526
  73. package/dist/collection/components/alert/exports.js +0 -2
  74. package/dist/collection/components/badge/badge.css +0 -52
  75. package/dist/collection/components/badge/badge.js +0 -120
  76. package/dist/collection/components/badge/exports.js +0 -1
  77. package/dist/collection/components/button/button.css +0 -180
  78. package/dist/collection/components/button/button.js +0 -510
  79. package/dist/collection/components/button/exports.js +0 -5
  80. package/dist/collection/components/checkbox/checkbox.css +0 -116
  81. package/dist/collection/components/checkbox/checkbox.js +0 -777
  82. package/dist/collection/components/checkbox-group/checkbox-group.css +0 -48
  83. package/dist/collection/components/checkbox-group/checkbox-group.js +0 -718
  84. package/dist/collection/components/design-system-devtools/design-system-devtools.js +0 -59
  85. package/dist/collection/components/dialog/dialog.css +0 -125
  86. package/dist/collection/components/dialog/dialog.js +0 -345
  87. package/dist/collection/components/dialog/exports.js +0 -9
  88. package/dist/collection/components/hint/exports.js +0 -1
  89. package/dist/collection/components/hint/hint.css +0 -63
  90. package/dist/collection/components/hint/hint.js +0 -114
  91. package/dist/collection/components/icon/all-kit.js +0 -2
  92. package/dist/collection/components/icon/data.js +0 -90
  93. package/dist/collection/components/icon/exports.js +0 -7
  94. package/dist/collection/components/icon/icon.css +0 -105
  95. package/dist/collection/components/icon/icon.js +0 -379
  96. package/dist/collection/components/icon/riverty-kit.js +0 -2
  97. package/dist/collection/components/icon-button/icon-button.css +0 -105
  98. package/dist/collection/components/icon-button/icon-button.js +0 -343
  99. package/dist/collection/components/illustration/data.js +0 -112
  100. package/dist/collection/components/illustration/exports.js +0 -3
  101. package/dist/collection/components/illustration/illustration.js +0 -540
  102. package/dist/collection/components/illustration/illustration.scss +0 -56
  103. package/dist/collection/components/illustration/illustrations-ui-kit.js +0 -2
  104. package/dist/collection/components/input/exports.js +0 -16
  105. package/dist/collection/components/input/input.css +0 -180
  106. package/dist/collection/components/input/input.js +0 -1572
  107. package/dist/collection/components/input-code/exports.js +0 -2
  108. package/dist/collection/components/input-code/input-code.css +0 -127
  109. package/dist/collection/components/input-code/input-code.js +0 -1139
  110. package/dist/collection/components/input-date/exports.js +0 -1
  111. package/dist/collection/components/input-date/input-date.css +0 -148
  112. package/dist/collection/components/input-date/input-date.js +0 -1228
  113. package/dist/collection/components/input-password/exports.js +0 -1
  114. package/dist/collection/components/input-password/input-password.css +0 -25
  115. package/dist/collection/components/input-password/input-password.js +0 -1051
  116. package/dist/collection/components/input-phone-number/input-phone-number.css +0 -61
  117. package/dist/collection/components/input-phone-number/input-phone-number.js +0 -874
  118. package/dist/collection/components/label/label.css +0 -38
  119. package/dist/collection/components/label/label.js +0 -47
  120. package/dist/collection/components/list-item/list-item/exports.js +0 -2
  121. package/dist/collection/components/list-item/list-item/list-item.css +0 -199
  122. package/dist/collection/components/list-item/list-item/list-item.js +0 -467
  123. package/dist/collection/components/pagination/exports.js +0 -3
  124. package/dist/collection/components/pagination/pagination.css +0 -118
  125. package/dist/collection/components/pagination/pagination.js +0 -799
  126. package/dist/collection/components/panel/exports.js +0 -1
  127. package/dist/collection/components/panel/panel.css +0 -192
  128. package/dist/collection/components/panel/panel.js +0 -473
  129. package/dist/collection/components/popover/exports.js +0 -3
  130. package/dist/collection/components/popover/popover.css +0 -251
  131. package/dist/collection/components/popover/popover.js +0 -741
  132. package/dist/collection/components/popover-action/popover-action.css +0 -21
  133. package/dist/collection/components/popover-action/popover-action.js +0 -150
  134. package/dist/collection/components/popover-content/popover-content.css +0 -9
  135. package/dist/collection/components/popover-content/popover-content.js +0 -130
  136. package/dist/collection/components/popover-headline/popover-headline.css +0 -7
  137. package/dist/collection/components/popover-headline/popover-headline.js +0 -28
  138. package/dist/collection/components/popover-trigger/exports.js +0 -1
  139. package/dist/collection/components/popover-trigger/popover-trigger.css +0 -4
  140. package/dist/collection/components/popover-trigger/popover-trigger.js +0 -163
  141. package/dist/collection/components/progress-bar/progress-bar.css +0 -41
  142. package/dist/collection/components/progress-bar/progress-bar.js +0 -71
  143. package/dist/collection/components/radio-button/radio-button.css +0 -126
  144. package/dist/collection/components/radio-button/radio-button.js +0 -559
  145. package/dist/collection/components/radio-button-description/radio-button-description.css +0 -5
  146. package/dist/collection/components/radio-button-description/radio-button-description.js +0 -22
  147. package/dist/collection/components/radio-button-leading/radio-button-leading.css +0 -3
  148. package/dist/collection/components/radio-button-leading/radio-button-leading.js +0 -22
  149. package/dist/collection/components/radio-button-title/radio-button-title.css +0 -8
  150. package/dist/collection/components/radio-button-title/radio-button-title.js +0 -22
  151. package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +0 -6
  152. package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +0 -22
  153. package/dist/collection/components/radio-group/exports.js +0 -1
  154. package/dist/collection/components/radio-group/radio-group.css +0 -65
  155. package/dist/collection/components/radio-group/radio-group.js +0 -1020
  156. package/dist/collection/components/select/exports.js +0 -1
  157. package/dist/collection/components/select/select.css +0 -247
  158. package/dist/collection/components/select/select.js +0 -2011
  159. package/dist/collection/components/select-option/select-option.css +0 -93
  160. package/dist/collection/components/select-option/select-option.js +0 -459
  161. package/dist/collection/components/skip-link/exports.js +0 -1
  162. package/dist/collection/components/skip-link/skip-link.css +0 -37
  163. package/dist/collection/components/skip-link/skip-link.js +0 -52
  164. package/dist/collection/components/stepper/stepper.css +0 -25
  165. package/dist/collection/components/stepper/stepper.js +0 -216
  166. package/dist/collection/components/stepper-item/stepper-item.css +0 -62
  167. package/dist/collection/components/stepper-item/stepper-item.js +0 -171
  168. package/dist/collection/components/tab/tab.css +0 -81
  169. package/dist/collection/components/tab/tab.js +0 -169
  170. package/dist/collection/components/tab-panel/tab-panel.css +0 -19
  171. package/dist/collection/components/tab-panel/tab-panel.js +0 -72
  172. package/dist/collection/components/tabs/tabs.css +0 -4
  173. package/dist/collection/components/tabs/tabs.js +0 -345
  174. package/dist/collection/components/tabs-list/exports.js +0 -2
  175. package/dist/collection/components/tabs-list/tabs-list.css +0 -58
  176. package/dist/collection/components/tabs-list/tabs-list.js +0 -294
  177. package/dist/collection/components/textarea/exports.js +0 -8
  178. package/dist/collection/components/textarea/textarea.css +0 -148
  179. package/dist/collection/components/textarea/textarea.js +0 -1055
  180. package/dist/collection/components/toast/exports.js +0 -3
  181. package/dist/collection/components/toast/toast.css +0 -179
  182. package/dist/collection/components/toast/toast.js +0 -812
  183. package/dist/collection/components/toast-group/exports.js +0 -1
  184. package/dist/collection/components/toast-group/toast-group.css +0 -37
  185. package/dist/collection/components/toast-group/toast-group.js +0 -49
  186. package/dist/collection/components/tooltip/exports.js +0 -3
  187. package/dist/collection/components/tooltip/tooltip.css +0 -106
  188. package/dist/collection/components/tooltip/tooltip.js +0 -500
  189. package/dist/collection/index.js +0 -1
  190. package/dist/collection/utils/focusable.js +0 -24
  191. package/dist/collection/utils/formData.js +0 -40
  192. package/dist/collection/utils/theming.js +0 -103
  193. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  194. package/dist/esm/focusable-ky1yonnS.js +0 -26
  195. package/dist/esm/formData-DvLT8-y3.js +0 -42
  196. package/dist/esm/index-CTxpqopm.js +0 -1806
  197. package/dist/esm/index.js +0 -1
  198. package/dist/esm/loader.js +0 -11
  199. package/dist/esm/r-accordion-panel.entry.js +0 -22
  200. package/dist/esm/r-accordion-section.entry.js +0 -123
  201. package/dist/esm/r-accordion-trigger.entry.js +0 -91
  202. package/dist/esm/r-accordion.entry.js +0 -18
  203. package/dist/esm/r-alert.entry.js +0 -144
  204. package/dist/esm/r-badge.entry.js +0 -38
  205. package/dist/esm/r-button.entry.js +0 -147
  206. package/dist/esm/r-checkbox-group.entry.js +0 -230
  207. package/dist/esm/r-checkbox.entry.js +0 -267
  208. package/dist/esm/r-design-system-devtools.entry.js +0 -29
  209. package/dist/esm/r-dialog.entry.js +0 -105
  210. package/dist/esm/r-hint_2.entry.js +0 -47
  211. package/dist/esm/r-icon-button_2.entry.js +0 -464
  212. package/dist/esm/r-icon.entry.js +0 -282
  213. package/dist/esm/r-illustration.entry.js +0 -394
  214. package/dist/esm/r-input-code.entry.js +0 -430
  215. package/dist/esm/r-input-date.entry.js +0 -517
  216. package/dist/esm/r-input-password.entry.js +0 -263
  217. package/dist/esm/r-input-phone-number.entry.js +0 -2523
  218. package/dist/esm/r-input.entry.js +0 -400
  219. package/dist/esm/r-list-item.entry.js +0 -107
  220. package/dist/esm/r-pagination.entry.js +0 -312
  221. package/dist/esm/r-panel.entry.js +0 -182
  222. package/dist/esm/r-popover-action.entry.js +0 -78
  223. package/dist/esm/r-popover-content.entry.js +0 -60
  224. package/dist/esm/r-popover-headline.entry.js +0 -26
  225. package/dist/esm/r-popover-trigger.entry.js +0 -68
  226. package/dist/esm/r-popover.entry.js +0 -345
  227. package/dist/esm/r-progress-bar.entry.js +0 -23
  228. package/dist/esm/r-radio-button-description.entry.js +0 -16
  229. package/dist/esm/r-radio-button-leading.entry.js +0 -16
  230. package/dist/esm/r-radio-button-title.entry.js +0 -16
  231. package/dist/esm/r-radio-button-trailing.entry.js +0 -16
  232. package/dist/esm/r-radio-button.entry.js +0 -137
  233. package/dist/esm/r-radio-group.entry.js +0 -423
  234. package/dist/esm/r-select-option.entry.js +0 -128
  235. package/dist/esm/r-select.entry.js +0 -1099
  236. package/dist/esm/r-skip-link.entry.js +0 -17
  237. package/dist/esm/r-stepper-item.entry.js +0 -40
  238. package/dist/esm/r-stepper.entry.js +0 -97
  239. package/dist/esm/r-tab-panel.entry.js +0 -24
  240. package/dist/esm/r-tab.entry.js +0 -60
  241. package/dist/esm/r-tabs-list.entry.js +0 -173
  242. package/dist/esm/r-tabs.entry.js +0 -275
  243. package/dist/esm/r-textarea.entry.js +0 -268
  244. package/dist/esm/r-toast-group.entry.js +0 -44
  245. package/dist/esm/r-toast.entry.js +0 -304
  246. package/dist/esm/style-observer-4Uv3PpKT.js +0 -1116
  247. package/dist/esm/theming-DD2IrjpG.js +0 -106
  248. package/dist/esm/web-components.js +0 -21
  249. package/dist/index.cjs.js +0 -1
  250. package/dist/index.js +0 -1
  251. package/dist/types/components/accordion/accordion.d.ts +0 -27
  252. package/dist/types/components/accordion/exports.d.ts +0 -2
  253. package/dist/types/components/accordion-panel/accordion-panel.d.ts +0 -10
  254. package/dist/types/components/accordion-section/accordion-section.d.ts +0 -36
  255. package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +0 -33
  256. package/dist/types/components/alert/alert.d.ts +0 -67
  257. package/dist/types/components/alert/exports.d.ts +0 -4
  258. package/dist/types/components/badge/badge.d.ts +0 -23
  259. package/dist/types/components/badge/exports.d.ts +0 -2
  260. package/dist/types/components/button/button.d.ts +0 -89
  261. package/dist/types/components/button/exports.d.ts +0 -10
  262. package/dist/types/components/checkbox/checkbox.d.ts +0 -136
  263. package/dist/types/components/checkbox-group/checkbox-group.d.ts +0 -122
  264. package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +0 -15
  265. package/dist/types/components/dialog/dialog.d.ts +0 -69
  266. package/dist/types/components/dialog/exports.d.ts +0 -10
  267. package/dist/types/components/hint/exports.d.ts +0 -2
  268. package/dist/types/components/hint/hint.d.ts +0 -20
  269. package/dist/types/components/icon/all-kit.d.ts +0 -2890
  270. package/dist/types/components/icon/data.d.ts +0 -145
  271. package/dist/types/components/icon/exports.d.ts +0 -152
  272. package/dist/types/components/icon/icon.d.ts +0 -37
  273. package/dist/types/components/icon/riverty-kit.d.ts +0 -139
  274. package/dist/types/components/icon-button/icon-button.d.ts +0 -69
  275. package/dist/types/components/illustration/data.d.ts +0 -52
  276. package/dist/types/components/illustration/exports.d.ts +0 -23
  277. package/dist/types/components/illustration/illustration.d.ts +0 -51
  278. package/dist/types/components/illustration/illustrations-ui-kit.d.ts +0 -21
  279. package/dist/types/components/input/exports.d.ts +0 -10
  280. package/dist/types/components/input/input.d.ts +0 -300
  281. package/dist/types/components/input-code/exports.d.ts +0 -4
  282. package/dist/types/components/input-code/input-code.d.ts +0 -175
  283. package/dist/types/components/input-date/exports.d.ts +0 -5
  284. package/dist/types/components/input-date/input-date.d.ts +0 -172
  285. package/dist/types/components/input-password/exports.d.ts +0 -1
  286. package/dist/types/components/input-password/input-password.d.ts +0 -184
  287. package/dist/types/components/input-phone-number/input-phone-number.d.ts +0 -128
  288. package/dist/types/components/label/label.d.ts +0 -9
  289. package/dist/types/components/list-item/list-item/exports.d.ts +0 -4
  290. package/dist/types/components/list-item/list-item/list-item.d.ts +0 -61
  291. package/dist/types/components/pagination/exports.d.ts +0 -6
  292. package/dist/types/components/pagination/pagination.d.ts +0 -140
  293. package/dist/types/components/panel/exports.d.ts +0 -2
  294. package/dist/types/components/panel/panel.d.ts +0 -56
  295. package/dist/types/components/popover/exports.d.ts +0 -6
  296. package/dist/types/components/popover/popover.d.ts +0 -131
  297. package/dist/types/components/popover-action/popover-action.d.ts +0 -24
  298. package/dist/types/components/popover-content/popover-content.d.ts +0 -22
  299. package/dist/types/components/popover-headline/popover-headline.d.ts +0 -6
  300. package/dist/types/components/popover-trigger/exports.d.ts +0 -2
  301. package/dist/types/components/popover-trigger/popover-trigger.d.ts +0 -31
  302. package/dist/types/components/progress-bar/progress-bar.d.ts +0 -10
  303. package/dist/types/components/radio-button/radio-button.d.ts +0 -92
  304. package/dist/types/components/radio-button-description/radio-button-description.d.ts +0 -8
  305. package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +0 -8
  306. package/dist/types/components/radio-button-title/radio-button-title.d.ts +0 -8
  307. package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +0 -8
  308. package/dist/types/components/radio-group/exports.d.ts +0 -2
  309. package/dist/types/components/radio-group/radio-group.d.ts +0 -178
  310. package/dist/types/components/select/exports.d.ts +0 -2
  311. package/dist/types/components/select/select.d.ts +0 -317
  312. package/dist/types/components/select-option/select-option.d.ts +0 -113
  313. package/dist/types/components/skip-link/exports.d.ts +0 -2
  314. package/dist/types/components/skip-link/skip-link.d.ts +0 -6
  315. package/dist/types/components/stepper/stepper.d.ts +0 -22
  316. package/dist/types/components/stepper-item/stepper-item.d.ts +0 -23
  317. package/dist/types/components/tab/tab.d.ts +0 -23
  318. package/dist/types/components/tab-panel/tab-panel.d.ts +0 -7
  319. package/dist/types/components/tabs/tabs.d.ts +0 -49
  320. package/dist/types/components/tabs-list/exports.d.ts +0 -4
  321. package/dist/types/components/tabs-list/tabs-list.d.ts +0 -41
  322. package/dist/types/components/textarea/exports.d.ts +0 -2
  323. package/dist/types/components/textarea/textarea.d.ts +0 -158
  324. package/dist/types/components/toast/exports.d.ts +0 -6
  325. package/dist/types/components/toast/toast.d.ts +0 -146
  326. package/dist/types/components/toast-group/exports.d.ts +0 -2
  327. package/dist/types/components/toast-group/toast-group.d.ts +0 -9
  328. package/dist/types/components/tooltip/exports.d.ts +0 -6
  329. package/dist/types/components/tooltip/tooltip.d.ts +0 -131
  330. package/dist/types/components.d.ts +0 -6286
  331. package/dist/types/index.d.ts +0 -1
  332. package/dist/types/stencil-public-runtime.d.ts +0 -1732
  333. package/dist/types/types/jsx-shim.d.ts +0 -13
  334. package/dist/types/types/style-observer.d.ts +0 -20
  335. package/dist/types/utils/focusable.d.ts +0 -1
  336. package/dist/types/utils/formData.d.ts +0 -1
  337. package/dist/types/utils/theming.d.ts +0 -15
  338. package/dist/web-components/index.esm.js +0 -0
  339. package/dist/web-components/p-02b22f8e.entry.js +0 -1
  340. package/dist/web-components/p-075a8dc8.entry.js +0 -1
  341. package/dist/web-components/p-0a34d33b.entry.js +0 -1
  342. package/dist/web-components/p-10cc9983.entry.js +0 -1
  343. package/dist/web-components/p-253068b9.entry.js +0 -1
  344. package/dist/web-components/p-3b8c8951.entry.js +0 -1
  345. package/dist/web-components/p-3beacdab.entry.js +0 -1
  346. package/dist/web-components/p-4214867d.entry.js +0 -1
  347. package/dist/web-components/p-42c857e9.entry.js +0 -1
  348. package/dist/web-components/p-44f87e16.entry.js +0 -1
  349. package/dist/web-components/p-477614c5.entry.js +0 -1
  350. package/dist/web-components/p-495ba3d2.entry.js +0 -1
  351. package/dist/web-components/p-4Uv3PpKT.js +0 -1
  352. package/dist/web-components/p-4de76291.entry.js +0 -1
  353. package/dist/web-components/p-55600d47.entry.js +0 -1
  354. package/dist/web-components/p-562051aa.entry.js +0 -1
  355. package/dist/web-components/p-5b850e0f.entry.js +0 -1
  356. package/dist/web-components/p-6013dfc8.entry.js +0 -1
  357. package/dist/web-components/p-62e7ae04.entry.js +0 -1
  358. package/dist/web-components/p-71519d37.entry.js +0 -1
  359. package/dist/web-components/p-88f7b47f.entry.js +0 -1
  360. package/dist/web-components/p-8975a6a3.entry.js +0 -1
  361. package/dist/web-components/p-8e125826.entry.js +0 -1
  362. package/dist/web-components/p-91cc0bde.entry.js +0 -1
  363. package/dist/web-components/p-93435fcd.entry.js +0 -1
  364. package/dist/web-components/p-947969d7.entry.js +0 -1
  365. package/dist/web-components/p-95396b5c.entry.js +0 -1
  366. package/dist/web-components/p-9de3a1a5.entry.js +0 -1
  367. package/dist/web-components/p-9f583ed1.entry.js +0 -1
  368. package/dist/web-components/p-B9rsR6cQ.js +0 -1
  369. package/dist/web-components/p-CTxpqopm.js +0 -2
  370. package/dist/web-components/p-DQuL1Twl.js +0 -1
  371. package/dist/web-components/p-DvLT8-y3.js +0 -1
  372. package/dist/web-components/p-a1086abe.entry.js +0 -1
  373. package/dist/web-components/p-bbba6d79.entry.js +0 -1
  374. package/dist/web-components/p-bde44ec4.entry.js +0 -1
  375. package/dist/web-components/p-bfc7e6c0.entry.js +0 -1
  376. package/dist/web-components/p-c1030394.entry.js +0 -1
  377. package/dist/web-components/p-c1f59ed1.entry.js +0 -1
  378. package/dist/web-components/p-c80a5541.entry.js +0 -1
  379. package/dist/web-components/p-c96ee61a.entry.js +0 -1
  380. package/dist/web-components/p-caf8f067.entry.js +0 -1
  381. package/dist/web-components/p-cc363c3d.entry.js +0 -1
  382. package/dist/web-components/p-cf4ff357.entry.js +0 -1
  383. package/dist/web-components/p-d0310ed4.entry.js +0 -1
  384. package/dist/web-components/p-d1412932.entry.js +0 -1
  385. package/dist/web-components/p-d2447e30.entry.js +0 -1
  386. package/dist/web-components/p-dc9cca06.entry.js +0 -1
  387. package/dist/web-components/p-e5b943a2.entry.js +0 -1
  388. package/dist/web-components/p-e67b13df.entry.js +0 -1
  389. package/dist/web-components/p-efec231a.entry.js +0 -1
  390. package/dist/web-components/p-f867e4c3.entry.js +0 -1
  391. package/dist/web-components/p-ky1yonnS.js +0 -1
  392. package/dist/web-components/web-components.esm.js +0 -1
  393. package/loader/cdn.js +0 -1
  394. package/loader/index.cjs.js +0 -1
  395. package/loader/index.d.ts +0 -24
  396. package/loader/index.es2017.js +0 -1
  397. package/loader/index.js +0 -2
@@ -1,2525 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-BnETQtSf.js');
4
- var formData = require('./formData-B2DZyLxP.js');
5
-
6
- var dist = {};
7
-
8
- var country_phone_data = {};
9
-
10
- var hasRequiredCountry_phone_data;
11
-
12
- function requireCountry_phone_data () {
13
- if (hasRequiredCountry_phone_data) return country_phone_data;
14
- hasRequiredCountry_phone_data = 1;
15
- Object.defineProperty(country_phone_data, "__esModule", { value: true });
16
- country_phone_data.default = [
17
- {
18
- alpha2: 'US',
19
- alpha3: 'USA',
20
- country_code: '1',
21
- country_name: 'United States',
22
- mobile_begin_with: ['201', '202', '203', '205', '206', '207', '208', '209', '210', '212', '213', '214', '215',
23
- '216', '217', '218', '219', '220', '223', '224', '225', '227', '228', '229', '231', '234', '239', '240',
24
- '248', '251', '252', '253', '254', '256', '260', '262', '267', '269', '270', '272', '274', '276', '278',
25
- '281', '283', '301', '302', '303', '304', '305', '307', '308', '309', '310', '312', '313', '314', '315',
26
- '316', '317', '318', '319', '320', '321', '323', '325', '327', '329', '330', '331', '332', '334', '336', '337',
27
- '339', '341', '346', '347', '351', '352', '353', '360', '361', '364', '369', '380', '385', '386', '401', '402',
28
- '404', '405', '406', '407', '408', '409', '410', '412', '413', '414', '415', '417', '419', '423', '424',
29
- '425', '430', '432', '434', '435', '440', '441', '442', '443', '445', '447', '458', '463', '464', '469', '470', '472', '475',
30
- '478', '479', '480', '484', '501', '502', '503', '504', '505', '507', '508', '509', '510', '512', '513',
31
- '515', '516', '517', '518', '520', '530', '531', '534', '539', '540', '541', '551', '557', '559', '561',
32
- '562', '563', '564', '567', '570', '571', '572', '573', '574', '575', '580', '582', '585', '586', '601', '602',
33
- '603', '605', '606', '607', '608', '609', '610', '612', '614', '615', '616', '617', '618', '619', '620',
34
- '623', '626', '627', '628', '629', '630', '631', '636', '640', '641', '645', '646', '650', '651', '656', '657', '659', '660',
35
- '661', '662', '667', '669', '678', '679', '680', '681', '682', '689', '701', '702', '703', '704', '706', '707',
36
- '708', '712', '713', '714', '715', '716', '717', '718', '719', '720', '724', '725', '726', '727', '728', '730', '731',
37
- '732', '734', '737', '740', '743', '747', '752', '754', '757', '760', '762', '763', '764', '765', '769', '770', '771',
38
- '772', '773', '774', '775', '779', '781', '785', '786', '787', '801', '802', '803', '804', '805', '806', '808',
39
- '810', '812', '813', '814', '815', '816', '817', '818', '820', '828', '830', '831', '832', '835', '838', '840', '843', '845',
40
- '847', '848', '850', '854', '856', '857', '858', '859', '860', '862', '863', '864', '865', '870', '872',
41
- '878', '901', '903', '904', '906', '907', '908', '909', '910', '912', '913', '914', '915', '916', '917',
42
- '918', '919', '920', '925', '927', '928', '929', '930', '931', '934', '935', '936', '937', '938', '939', '940', '941', '945',
43
- '947', '949', '951', '952', '954', '956', '957', '959', '970', '971', '972', '973', '975', '978', '979',
44
- '980', '984', '985', '986', '989', '888', '800', '833', '844', '855', '866', '877', '279', '340', '983', '448', '943', '363',
45
- '326', '839', '826', '948', '924'
46
- ],
47
- phone_number_lengths: [10]
48
- },
49
- // https://en.wikipedia.org/wiki/Telephone_numbers_in_Aruba
50
- {
51
- alpha2: 'AW',
52
- alpha3: 'ABW',
53
- country_code: '297',
54
- country_name: 'Aruba',
55
- mobile_begin_with: ['56', '59', '64', '73', '74', '99'],
56
- phone_number_lengths: [7]
57
- },
58
- {
59
- alpha2: 'AF',
60
- alpha3: 'AFG',
61
- country_code: '93',
62
- country_name: 'Afghanistan',
63
- mobile_begin_with: ['7'],
64
- phone_number_lengths: [9]
65
- },
66
- {
67
- alpha2: 'AO',
68
- alpha3: 'AGO',
69
- country_code: '244',
70
- country_name: 'Angola',
71
- mobile_begin_with: ['9'],
72
- phone_number_lengths: [9]
73
- },
74
- {
75
- alpha2: 'AI',
76
- alpha3: 'AIA',
77
- country_code: '1',
78
- country_name: 'Anguilla',
79
- mobile_begin_with: ['2642', '2644', '2645', '2647'],
80
- phone_number_lengths: [10]
81
- },
82
- {
83
- alpha2: 'AX',
84
- alpha3: 'ALA',
85
- country_code: '358',
86
- country_name: 'Åland Islands',
87
- mobile_begin_with: ['18'],
88
- phone_number_lengths: [6, 7, 8]
89
- },
90
- {
91
- alpha2: 'AL',
92
- alpha3: 'ALB',
93
- country_code: '355',
94
- country_name: 'Albania',
95
- mobile_begin_with: ['6'],
96
- phone_number_lengths: [9]
97
- },
98
- {
99
- alpha2: 'AD',
100
- alpha3: 'AND',
101
- country_code: '376',
102
- country_name: 'Andorra',
103
- mobile_begin_with: ['3', '4', '6'],
104
- phone_number_lengths: [6]
105
- },
106
- // https://en.wikipedia.org/wiki/Telephone_numbers_in_Cura%C3%A7ao_and_the_Caribbean_Netherlands
107
- {
108
- alpha2: "BQ",
109
- alpha3: "BES",
110
- country_code: "599",
111
- country_name: "Caribbean Netherlands",
112
- mobile_begin_with: ['3', '416', '700', '701', '795'],
113
- phone_number_lengths: [7]
114
- },
115
- {
116
- alpha2: 'AE',
117
- alpha3: 'ARE',
118
- country_code: '971',
119
- country_name: 'United Arab Emirates',
120
- mobile_begin_with: ['5'],
121
- phone_number_lengths: [9]
122
- },
123
- {
124
- alpha2: 'AR',
125
- alpha3: 'ARG',
126
- country_code: '54',
127
- country_name: 'Argentina',
128
- mobile_begin_with: ['1', '2', '3'], // Same for mobile and landlines
129
- phone_number_lengths: [8, 9, 10, 11, 12]
130
- },
131
- {
132
- alpha2: 'AM',
133
- alpha3: 'ARM',
134
- country_code: '374',
135
- country_name: 'Armenia',
136
- mobile_begin_with: ['3', '4', '5', '7', '9'],
137
- phone_number_lengths: [8]
138
- },
139
- // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=american_samoa
140
- {
141
- alpha2: 'AS',
142
- alpha3: 'ASM',
143
- country_code: '1',
144
- country_name: 'American Samoa',
145
- mobile_begin_with: ['684733', '684258'],
146
- phone_number_lengths: [10]
147
- },
148
- // {alpha2: "AQ", alpha3: "ATA", country_code: "672", country_name: "Antarctica", mobile_begin_with: [], phone_number_lengths: []},
149
- // {alpha2: "TF", alpha3: "ATF", country_code: "", country_name: "French Southern Territories", mobile_begin_with: [], phone_number_lengths: []},
150
- // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=antigua_barbuda
151
- {
152
- alpha2: 'AG',
153
- alpha3: 'ATG',
154
- country_code: '1',
155
- country_name: 'Antigua and Barbuda',
156
- mobile_begin_with: ['2687'],
157
- phone_number_lengths: [10]
158
- },
159
- {
160
- alpha2: 'AU',
161
- alpha3: 'AUS',
162
- country_code: '61',
163
- country_name: 'Australia',
164
- mobile_begin_with: ['4'],
165
- phone_number_lengths: [9]
166
- },
167
- {
168
- alpha2: 'AT',
169
- alpha3: 'AUT',
170
- country_code: '43',
171
- country_name: 'Austria',
172
- mobile_begin_with: ['6'],
173
- phone_number_lengths: [10, 11, 12, 13, 14]
174
- },
175
- {
176
- alpha2: 'AZ',
177
- alpha3: 'AZE',
178
- country_code: '994',
179
- country_name: 'Azerbaijan',
180
- mobile_begin_with: ['10', '50', '51', '55', '60', '70', '77', '99'],
181
- phone_number_lengths: [9]
182
- },
183
- {
184
- alpha2: 'BI',
185
- alpha3: 'BDI',
186
- country_code: '257',
187
- country_name: 'Burundi',
188
- mobile_begin_with: ['71', '72', '75', '76', '77', '79', '29', '61', '68', '69'],
189
- phone_number_lengths: [8]
190
- },
191
- {
192
- alpha2: 'BE',
193
- alpha3: 'BEL',
194
- country_code: '32',
195
- country_name: 'Belgium',
196
- mobile_begin_with: ['4', '3'],
197
- phone_number_lengths: [9, 8]
198
- },
199
- {
200
- alpha2: 'BJ',
201
- alpha3: 'BEN',
202
- country_code: '229',
203
- country_name: 'Benin',
204
- mobile_begin_with: ['4', '6', '9'],
205
- phone_number_lengths: [8]
206
- },
207
- {
208
- alpha2: 'BF',
209
- alpha3: 'BFA',
210
- country_code: '226',
211
- country_name: 'Burkina Faso',
212
- mobile_begin_with: ['6', '7'],
213
- phone_number_lengths: [8]
214
- },
215
- {
216
- alpha2: 'BD',
217
- alpha3: 'BGD',
218
- country_code: '880',
219
- country_name: 'Bangladesh',
220
- mobile_begin_with: ['1'],
221
- phone_number_lengths: [8, 9, 10]
222
- },
223
- {
224
- alpha2: 'BG',
225
- alpha3: 'BGR',
226
- country_code: '359',
227
- country_name: 'Bulgaria',
228
- mobile_begin_with: ['87', '88', '89', '98', '99', '43'],
229
- phone_number_lengths: [8, 9]
230
- },
231
- {
232
- alpha2: 'BH',
233
- alpha3: 'BHR',
234
- country_code: '973',
235
- country_name: 'Bahrain',
236
- mobile_begin_with: ['3'],
237
- phone_number_lengths: [8]
238
- },
239
- {
240
- alpha2: 'BS',
241
- alpha3: 'BHS',
242
- country_code: '1',
243
- country_name: 'Bahamas',
244
- mobile_begin_with: ['242'],
245
- phone_number_lengths: [10]
246
- },
247
- {
248
- alpha2: 'BA',
249
- alpha3: 'BIH',
250
- country_code: '387',
251
- country_name: 'Bosnia and Herzegovina',
252
- mobile_begin_with: ['6'],
253
- phone_number_lengths: [8, 9]
254
- },
255
- // {alpha2: "BL", alpha3: "BLM", country_code: "590", country_name: "Saint Barthélemy", mobile_begin_with: [], phone_number_lengths: []},
256
- {
257
- alpha2: 'BY',
258
- alpha3: 'BLR',
259
- country_code: '375',
260
- country_name: 'Belarus',
261
- mobile_begin_with: ['25', '29', '33', '44'],
262
- phone_number_lengths: [9]
263
- },
264
- {
265
- alpha2: 'BZ',
266
- alpha3: 'BLZ',
267
- country_code: '501',
268
- country_name: 'Belize',
269
- mobile_begin_with: ['6'],
270
- phone_number_lengths: [7]
271
- },
272
- // http://www.howtocallabroad.com/results.php?callfrom=united_states&callto=bermuda
273
- {
274
- alpha2: 'BM',
275
- alpha3: 'BMU',
276
- country_code: '1',
277
- country_name: 'Bermuda',
278
- mobile_begin_with: ['4413', '4415', '4417'],
279
- phone_number_lengths: [10]
280
- },
281
- {
282
- alpha2: 'BO',
283
- alpha3: 'BOL',
284
- country_code: '591',
285
- country_name: 'Bolivia',
286
- mobile_begin_with: ['6', '7'],
287
- phone_number_lengths: [8]
288
- },
289
- {
290
- alpha2: 'BR',
291
- alpha3: 'BRA',
292
- country_code: '55',
293
- country_name: 'Brazil',
294
- mobile_begin_with: [
295
- '119', '129', '139', '149', '159', '169', '179', '189', '199', '219', '229', '249', '279', '289',
296
- '319', '329', '339', '349', '359', '379', '389',
297
- '419', '429', '439', '449', '459', '469', '479', '489', '499',
298
- '519', '539', '549', '559',
299
- '619', '629', '639', '649', '659', '669', '679', '689', '699',
300
- '719', '739', '749', '759', '779', '799',
301
- '819', '829', '839', '849', '859', '869', '879', '889', '899',
302
- '919', '929', '939', '949', '959', '969', '979', '989', '999',
303
- ],
304
- phone_number_lengths: [10, 11]
305
- },
306
- {
307
- alpha2: 'BB',
308
- alpha3: 'BRB',
309
- country_code: '1',
310
- country_name: 'Barbados',
311
- mobile_begin_with: ['246'],
312
- phone_number_lengths: [10]
313
- },
314
- {
315
- alpha2: 'BN',
316
- alpha3: 'BRN',
317
- country_code: '673',
318
- country_name: 'Brunei Darussalam',
319
- mobile_begin_with: ['7', '8'],
320
- phone_number_lengths: [7]
321
- },
322
- {
323
- alpha2: 'BT',
324
- alpha3: 'BTN',
325
- country_code: '975',
326
- country_name: 'Bhutan',
327
- mobile_begin_with: ['17'],
328
- phone_number_lengths: [8]
329
- },
330
- // {alpha2: "BV", alpha3: "BVT", country_code: "", country_name: "Bouvet Island", mobile_begin_with: [], phone_number_lengths: []},
331
- {
332
- alpha2: 'BW',
333
- alpha3: 'BWA',
334
- country_code: '267',
335
- country_name: 'Botswana',
336
- mobile_begin_with: ['71', '72', '73', '74', '75', '76', '77', '78', '79'],
337
- phone_number_lengths: [8]
338
- },
339
- {
340
- alpha2: 'CF',
341
- alpha3: 'CAF',
342
- country_code: '236',
343
- country_name: 'Central African Republic',
344
- mobile_begin_with: ['7'],
345
- phone_number_lengths: [8]
346
- },
347
- // http://www.howtocallabroad.com/canada/
348
- // http://areacode.org/
349
- // http://countrycode.org/canada
350
- {
351
- alpha2: 'CA',
352
- alpha3: 'CAN',
353
- country_code: '1',
354
- country_name: 'Canada',
355
- mobile_begin_with: [
356
- '204', '226', '236', '249', '250', '263', '289', '306', '343', '354',
357
- '365', '367', '368', '403', '416', '418', '431', '437', '438', '450',
358
- '468', '474', '506', '514', '519', '548', '579', '581', '584', '587',
359
- '600', '604', '613', '639', '647', '672', '683', '705', '709', '742',
360
- '753', '778', '780', '782', '807', '819', '825', '867', '873', '902',
361
- '905', '428', '382', '942'
362
- ],
363
- phone_number_lengths: [10]
364
- },
365
- // {alpha2: "CC", alpha3: "CCK", country_code: "61", country_name: "Cocos (Keeling) Islands", mobile_begin_with: [], phone_number_lengths: []},
366
- {
367
- alpha2: 'CH',
368
- alpha3: 'CHE',
369
- country_code: '41',
370
- country_name: 'Switzerland',
371
- mobile_begin_with: ['74', '75', '76', '77', '78', '79'],
372
- phone_number_lengths: [9]
373
- },
374
- {
375
- alpha2: 'CL',
376
- alpha3: 'CHL',
377
- country_code: '56',
378
- country_name: 'Chile',
379
- mobile_begin_with: ['9'],
380
- phone_number_lengths: [9]
381
- },
382
- {
383
- alpha2: 'CN',
384
- alpha3: 'CHN',
385
- country_code: '86',
386
- country_name: 'China',
387
- mobile_begin_with: ['13', '14', '15', '17', '18', '19', '16'],
388
- phone_number_lengths: [11]
389
- },
390
- {
391
- alpha2: 'CI',
392
- alpha3: 'CIV',
393
- country_code: '225',
394
- country_name: "Côte D'Ivoire",
395
- mobile_begin_with: ['0', '4', '5', '6', '7', '8'],
396
- phone_number_lengths: [10]
397
- },
398
- {
399
- alpha2: 'CM',
400
- alpha3: 'CMR',
401
- country_code: '237',
402
- country_name: 'Cameroon',
403
- mobile_begin_with: ['6'],
404
- phone_number_lengths: [9]
405
- },
406
- {
407
- alpha2: 'CD',
408
- alpha3: 'COD',
409
- country_code: '243',
410
- country_name: 'Congo, The Democratic Republic Of The',
411
- mobile_begin_with: ['8', '9'],
412
- phone_number_lengths: [9]
413
- },
414
- {
415
- alpha2: 'CG',
416
- alpha3: 'COG',
417
- country_code: '242',
418
- country_name: 'Congo',
419
- mobile_begin_with: ['0'],
420
- phone_number_lengths: [9]
421
- },
422
- {
423
- alpha2: 'CK',
424
- alpha3: 'COK',
425
- country_code: '682',
426
- country_name: 'Cook Islands',
427
- mobile_begin_with: ['5', '7'],
428
- phone_number_lengths: [5]
429
- },
430
- {
431
- alpha2: 'CO',
432
- alpha3: 'COL',
433
- country_code: '57',
434
- country_name: 'Colombia',
435
- mobile_begin_with: ['3'],
436
- phone_number_lengths: [10]
437
- },
438
- {
439
- alpha2: 'CW',
440
- alpha3: 'CUW',
441
- country_code: '599',
442
- country_name: 'Curaçao',
443
- mobile_begin_with: ['95', '96'],
444
- phone_number_lengths: [8]
445
- },
446
- {
447
- alpha2: 'KM',
448
- alpha3: 'COM',
449
- country_code: '269',
450
- country_name: 'Comoros',
451
- mobile_begin_with: ['3', '76'],
452
- phone_number_lengths: [7]
453
- },
454
- {
455
- alpha2: 'CV',
456
- alpha3: 'CPV',
457
- country_code: '238',
458
- country_name: 'Cape Verde',
459
- mobile_begin_with: ['5', '9'],
460
- phone_number_lengths: [7]
461
- },
462
- {
463
- alpha2: 'CR',
464
- alpha3: 'CRI',
465
- country_code: '506',
466
- country_name: 'Costa Rica',
467
- mobile_begin_with: ['5', '6', '7', '8'],
468
- phone_number_lengths: [8]
469
- },
470
- {
471
- alpha2: 'CU',
472
- alpha3: 'CUB',
473
- country_code: '53',
474
- country_name: 'Cuba',
475
- mobile_begin_with: ['5', '6'],
476
- phone_number_lengths: [8]
477
- },
478
- // {alpha2: "CX", alpha3: "CXR", country_code: "61", country_name: "Christmas Island", mobile_begin_with: [], phone_number_lengths: []},
479
- {
480
- alpha2: 'KY',
481
- alpha3: 'CYM',
482
- country_code: '1',
483
- country_name: 'Cayman Islands',
484
- mobile_begin_with: ['345'],
485
- phone_number_lengths: [10]
486
- },
487
- {
488
- alpha2: 'CY',
489
- alpha3: 'CYP',
490
- country_code: '357',
491
- country_name: 'Cyprus',
492
- mobile_begin_with: ['9'],
493
- phone_number_lengths: [8]
494
- },
495
- {
496
- alpha2: 'CZ',
497
- alpha3: 'CZE',
498
- country_code: '420',
499
- country_name: 'Czech Republic',
500
- mobile_begin_with: ['6', '7'],
501
- phone_number_lengths: [9]
502
- },
503
- {
504
- alpha2: 'DE',
505
- alpha3: 'DEU',
506
- country_code: '49',
507
- country_name: 'Germany',
508
- mobile_begin_with: ['15', '16', '17'],
509
- phone_number_lengths: [10, 11]
510
- },
511
- {
512
- alpha2: 'DJ',
513
- alpha3: 'DJI',
514
- country_code: '253',
515
- country_name: 'Djibouti',
516
- mobile_begin_with: ['77'],
517
- phone_number_lengths: [8]
518
- },
519
- {
520
- alpha2: 'DM',
521
- alpha3: 'DMA',
522
- country_code: '1',
523
- country_name: 'Dominica',
524
- mobile_begin_with: ['767'],
525
- phone_number_lengths: [10]
526
- },
527
- {
528
- alpha2: 'DK',
529
- alpha3: 'DNK',
530
- country_code: '45',
531
- country_name: 'Denmark',
532
- mobile_begin_with: [
533
- '2', '30', '31', '40', '41', '42', '50', '51', '52', '53', '60', '61', '71', '81', '91', '92', '93',
534
- '342', '344', '345', '346', '347', '348', '349', '356', '357', '359', '362',
535
- '365', '366', '389', '398', '431', '441', '462', '466', '468', '472', '474',
536
- '476', '478', '485', '486', '488', '489', '493', '494', '495', '496', '498',
537
- '499', '542', '543', '545', '551', '552', '556', '571', '572', '573', '574',
538
- '577', '579', '584', '586', '587', '589', '597', '598', '627', '629', '641',
539
- '649', '658', '662', '663', '664', '665', '667', '692', '693', '694', '697',
540
- '771', '772', '782', '783', '785', '786', '788', '789', '826', '827', '829'
541
- ],
542
- phone_number_lengths: [8]
543
- },
544
- {
545
- alpha2: 'DO',
546
- alpha3: 'DOM',
547
- country_code: '1',
548
- country_name: 'Dominican Republic',
549
- mobile_begin_with: ['809', '829', '849'],
550
- phone_number_lengths: [10]
551
- },
552
- {
553
- alpha2: 'DZ',
554
- alpha3: 'DZA',
555
- country_code: '213',
556
- country_name: 'Algeria',
557
- mobile_begin_with: ['5', '6', '7'],
558
- phone_number_lengths: [9]
559
- },
560
- {
561
- alpha2: 'EC',
562
- alpha3: 'ECU',
563
- country_code: '593',
564
- country_name: 'Ecuador',
565
- mobile_begin_with: ['9'],
566
- phone_number_lengths: [9]
567
- },
568
- {
569
- alpha2: 'EG',
570
- alpha3: 'EGY',
571
- country_code: '20',
572
- country_name: 'Egypt',
573
- mobile_begin_with: ['1'],
574
- phone_number_lengths: [10, 8]
575
- },
576
- {
577
- alpha2: 'ER',
578
- alpha3: 'ERI',
579
- country_code: '291',
580
- country_name: 'Eritrea',
581
- mobile_begin_with: ['1', '7', '8'],
582
- phone_number_lengths: [7]
583
- },
584
- // {alpha2: "EH", alpha3: "ESH", country_code: "212", country_name: "Western Sahara", mobile_begin_with: [], phone_number_lengths: []},
585
- {
586
- alpha2: 'ES',
587
- alpha3: 'ESP',
588
- country_code: '34',
589
- country_name: 'Spain',
590
- mobile_begin_with: ['6', '7'],
591
- phone_number_lengths: [9]
592
- },
593
- {
594
- alpha2: 'EE',
595
- alpha3: 'EST',
596
- country_code: '372',
597
- country_name: 'Estonia',
598
- mobile_begin_with: ['5', '81', '82', '83'],
599
- phone_number_lengths: [7, 8]
600
- },
601
- {
602
- alpha2: 'ET',
603
- alpha3: 'ETH',
604
- country_code: '251',
605
- country_name: 'Ethiopia',
606
- mobile_begin_with: ['7', '9'],
607
- phone_number_lengths: [9]
608
- },
609
- {
610
- alpha2: 'FI',
611
- alpha3: 'FIN',
612
- country_code: '358',
613
- country_name: 'Finland',
614
- mobile_begin_with: ['4', '5'],
615
- phone_number_lengths: [6, 7, 9, 10]
616
- },
617
- {
618
- alpha2: 'FJ',
619
- alpha3: 'FJI',
620
- country_code: '679',
621
- country_name: 'Fiji',
622
- mobile_begin_with: ['2', '7', '8', '9'],
623
- phone_number_lengths: [7]
624
- },
625
- {
626
- alpha2: 'FK',
627
- alpha3: 'FLK',
628
- country_code: '500',
629
- country_name: 'Falkland Islands (Malvinas)',
630
- mobile_begin_with: ['5', '6'],
631
- phone_number_lengths: [5]
632
- },
633
- {
634
- alpha2: 'FR',
635
- alpha3: 'FRA',
636
- country_code: '33',
637
- country_name: 'France',
638
- mobile_begin_with: ['6', '7'],
639
- phone_number_lengths: [9]
640
- },
641
- {
642
- alpha2: 'FO',
643
- alpha3: 'FRO',
644
- country_code: '298',
645
- country_name: 'Faroe Islands',
646
- mobile_begin_with: [],
647
- phone_number_lengths: [6]
648
- },
649
- {
650
- alpha2: 'FM',
651
- alpha3: 'FSM',
652
- country_code: '691',
653
- country_name: 'Micronesia, Federated States Of',
654
- mobile_begin_with: [],
655
- phone_number_lengths: [7]
656
- },
657
- {
658
- alpha2: 'GA',
659
- alpha3: 'GAB',
660
- country_code: '241',
661
- country_name: 'Gabon',
662
- mobile_begin_with: ['2', '3', '4', '5', '6', '7'],
663
- phone_number_lengths: [7]
664
- },
665
- {
666
- alpha2: 'GB',
667
- alpha3: 'GBR',
668
- country_code: '44',
669
- country_name: 'United Kingdom',
670
- mobile_begin_with: ['7'],
671
- phone_number_lengths: [10]
672
- },
673
- {
674
- alpha2: 'GE',
675
- alpha3: 'GEO',
676
- country_code: '995',
677
- country_name: 'Georgia',
678
- mobile_begin_with: ['5', '7'],
679
- phone_number_lengths: [9]
680
- },
681
- // {alpha2: "GG", alpha3: "GGY", country_code: "44", country_name: "Guernsey", mobile_begin_with: [], phone_number_lengths: []},
682
- {
683
- alpha2: 'GH',
684
- alpha3: 'GHA',
685
- country_code: '233',
686
- country_name: 'Ghana',
687
- mobile_begin_with: ['2', '5'],
688
- phone_number_lengths: [9]
689
- },
690
- {
691
- alpha2: 'GI',
692
- alpha3: 'GIB',
693
- country_code: '350',
694
- country_name: 'Gibraltar',
695
- mobile_begin_with: ['5'],
696
- phone_number_lengths: [8]
697
- },
698
- {
699
- alpha2: 'GN',
700
- alpha3: 'GIN',
701
- country_code: '224',
702
- country_name: 'Guinea',
703
- mobile_begin_with: ['6'],
704
- phone_number_lengths: [9]
705
- },
706
- {
707
- alpha2: 'GP',
708
- alpha3: 'GLP',
709
- country_code: '590',
710
- country_name: 'Guadeloupe',
711
- mobile_begin_with: ['690', '691'],
712
- phone_number_lengths: [9]
713
- },
714
- {
715
- alpha2: 'GM',
716
- alpha3: 'GMB',
717
- country_code: '220',
718
- country_name: 'Gambia',
719
- mobile_begin_with: ['7', '9'],
720
- phone_number_lengths: [7]
721
- },
722
- {
723
- alpha2: 'GW',
724
- alpha3: 'GNB',
725
- country_code: '245',
726
- country_name: 'Guinea-Bissau',
727
- mobile_begin_with: ['5', '6', '7'],
728
- phone_number_lengths: [7]
729
- },
730
- {
731
- alpha2: 'GQ',
732
- alpha3: 'GNQ',
733
- country_code: '240',
734
- country_name: 'Equatorial Guinea',
735
- mobile_begin_with: ['222', '551'],
736
- phone_number_lengths: [9]
737
- },
738
- {
739
- alpha2: 'GR',
740
- alpha3: 'GRC',
741
- country_code: '30',
742
- country_name: 'Greece',
743
- mobile_begin_with: ['6'],
744
- phone_number_lengths: [10]
745
- },
746
- {
747
- alpha2: 'GD',
748
- alpha3: 'GRD',
749
- country_code: '1',
750
- country_name: 'Grenada',
751
- mobile_begin_with: ['473'],
752
- phone_number_lengths: [10]
753
- },
754
- {
755
- alpha2: 'GL',
756
- alpha3: 'GRL',
757
- country_code: '299',
758
- country_name: 'Greenland',
759
- mobile_begin_with: ['2', '4', '5'],
760
- phone_number_lengths: [6]
761
- },
762
- {
763
- alpha2: 'GT',
764
- alpha3: 'GTM',
765
- country_code: '502',
766
- country_name: 'Guatemala',
767
- mobile_begin_with: ['3', '4', '5'],
768
- phone_number_lengths: [8]
769
- },
770
- {
771
- alpha2: 'GF',
772
- alpha3: 'GUF',
773
- country_code: '594',
774
- country_name: 'French Guiana',
775
- mobile_begin_with: ['694'],
776
- phone_number_lengths: [9]
777
- },
778
- {
779
- alpha2: 'GU',
780
- alpha3: 'GUM',
781
- country_code: '1',
782
- country_name: 'Guam',
783
- mobile_begin_with: ['671'],
784
- phone_number_lengths: [10]
785
- },
786
- {
787
- alpha2: 'GY',
788
- alpha3: 'GUY',
789
- country_code: '592',
790
- country_name: 'Guyana',
791
- mobile_begin_with: ['6'],
792
- phone_number_lengths: [7]
793
- },
794
- {
795
- alpha2: 'HK',
796
- alpha3: 'HKG',
797
- country_code: '852',
798
- country_name: 'Hong Kong',
799
- mobile_begin_with: ['4', '5', '6', '70', '71', '72', '73', '81', '82', '83', '84', '85', '86', '87', '88', '89', '9'],
800
- phone_number_lengths: [8]
801
- },
802
- // {alpha2: "HM", alpha3: "HMD", country_code: "", country_name: "Heard and McDonald Islands", mobile_begin_with: [], phone_number_lengths: []},
803
- {
804
- alpha2: 'HN',
805
- alpha3: 'HND',
806
- country_code: '504',
807
- country_name: 'Honduras',
808
- mobile_begin_with: ['3', '7', '8', '9'],
809
- phone_number_lengths: [8]
810
- },
811
- {
812
- alpha2: 'HR',
813
- alpha3: 'HRV',
814
- country_code: '385',
815
- country_name: 'Croatia',
816
- mobile_begin_with: ['9'],
817
- phone_number_lengths: [8, 9]
818
- },
819
- {
820
- alpha2: 'HT',
821
- alpha3: 'HTI',
822
- country_code: '509',
823
- country_name: 'Haiti',
824
- mobile_begin_with: ['3', '4'],
825
- phone_number_lengths: [8]
826
- },
827
- {
828
- alpha2: 'HU',
829
- alpha3: 'HUN',
830
- country_code: '36',
831
- country_name: 'Hungary',
832
- mobile_begin_with: ['20', '30', '31', '50', '70'],
833
- phone_number_lengths: [9]
834
- },
835
- {
836
- alpha2: 'ID',
837
- alpha3: 'IDN',
838
- country_code: '62',
839
- country_name: 'Indonesia',
840
- mobile_begin_with: ['8'],
841
- phone_number_lengths: [9, 10, 11, 12]
842
- },
843
- // {alpha2: "IM", alpha3: "IMN", country_code: "44", country_name: "Isle of Man", mobile_begin_with: [], phone_number_lengths: []},
844
- {
845
- alpha2: 'IN',
846
- alpha3: 'IND',
847
- country_code: '91',
848
- country_name: 'India',
849
- mobile_begin_with: ['6', '7', '8', '9'],
850
- phone_number_lengths: [10]
851
- },
852
- // {alpha2: "IO", alpha3: "IOT", country_code: "246", country_name: "British Indian Ocean Territory", mobile_begin_with: [], phone_number_lengths: []},
853
- {
854
- alpha2: 'IE',
855
- alpha3: 'IRL',
856
- country_code: '353',
857
- country_name: 'Ireland',
858
- mobile_begin_with: ['82', '83', '84', '85', '86', '87', '88', '89'],
859
- phone_number_lengths: [9]
860
- },
861
- {
862
- alpha2: 'IR',
863
- alpha3: 'IRN',
864
- country_code: '98',
865
- country_name: 'Iran, Islamic Republic Of',
866
- mobile_begin_with: ['9'],
867
- phone_number_lengths: [10]
868
- },
869
- {
870
- alpha2: 'IQ',
871
- alpha3: 'IRQ',
872
- country_code: '964',
873
- country_name: 'Iraq',
874
- mobile_begin_with: ['7'],
875
- phone_number_lengths: [10]
876
- },
877
- {
878
- alpha2: 'IS',
879
- alpha3: 'ISL',
880
- country_code: '354',
881
- country_name: 'Iceland',
882
- mobile_begin_with: ['6', '7', '8'],
883
- phone_number_lengths: [7]
884
- },
885
- {
886
- alpha2: 'IL',
887
- alpha3: 'ISR',
888
- country_code: '972',
889
- country_name: 'Israel',
890
- mobile_begin_with: ['5'],
891
- phone_number_lengths: [9]
892
- },
893
- {
894
- alpha2: 'IT',
895
- alpha3: 'ITA',
896
- country_code: '39',
897
- country_name: 'Italy',
898
- mobile_begin_with: ['3'],
899
- phone_number_lengths: [9, 10]
900
- },
901
- {
902
- alpha2: 'JM',
903
- alpha3: 'JAM',
904
- country_code: '1',
905
- country_name: 'Jamaica',
906
- mobile_begin_with: ['876'],
907
- phone_number_lengths: [10]
908
- },
909
- // {alpha2: "JE", alpha3: "JEY", country_code: "44", country_name: "Jersey", mobile_begin_with: [], phone_number_lengths: []},
910
- {
911
- alpha2: 'JO',
912
- alpha3: 'JOR',
913
- country_code: '962',
914
- country_name: 'Jordan',
915
- mobile_begin_with: ['7'],
916
- phone_number_lengths: [9]
917
- },
918
- {
919
- alpha2: 'JP',
920
- alpha3: 'JPN',
921
- country_code: '81',
922
- country_name: 'Japan',
923
- mobile_begin_with: ['70', '80', '90'],
924
- phone_number_lengths: [10]
925
- },
926
- {
927
- alpha2: 'KZ',
928
- alpha3: 'KAZ',
929
- country_code: '7',
930
- country_name: 'Kazakhstan',
931
- mobile_begin_with: ['70', '74', '77'],
932
- phone_number_lengths: [10]
933
- },
934
- {
935
- alpha2: 'KE',
936
- alpha3: 'KEN',
937
- country_code: '254',
938
- country_name: 'Kenya',
939
- mobile_begin_with: ['7', '1'],
940
- phone_number_lengths: [9]
941
- },
942
- {
943
- alpha2: 'KG',
944
- alpha3: 'KGZ',
945
- country_code: '996',
946
- country_name: 'Kyrgyzstan',
947
- mobile_begin_with: ['20', '22', '31258', '312973', '5', '600', '7', '88', '912', '99'],
948
- phone_number_lengths: [9]
949
- },
950
- {
951
- alpha2: 'KH',
952
- alpha3: 'KHM',
953
- country_code: '855',
954
- country_name: 'Cambodia',
955
- mobile_begin_with: ['1', '6', '7', '8', '9'],
956
- phone_number_lengths: [8, 9]
957
- },
958
- {
959
- alpha2: 'KI',
960
- alpha3: 'KIR',
961
- country_code: '686',
962
- country_name: 'Kiribati',
963
- mobile_begin_with: ['9', '30'],
964
- phone_number_lengths: [5]
965
- },
966
- {
967
- alpha2: 'KN',
968
- alpha3: 'KNA',
969
- country_code: '1',
970
- country_name: 'Saint Kitts And Nevis',
971
- mobile_begin_with: ['869'],
972
- phone_number_lengths: [10]
973
- },
974
- {
975
- alpha2: 'KR',
976
- alpha3: 'KOR',
977
- country_code: '82',
978
- country_name: 'Korea, Republic of',
979
- mobile_begin_with: ['1'],
980
- phone_number_lengths: [9, 10]
981
- },
982
- // https://www.howtocallabroad.com/kosovo/
983
- // https://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo
984
- {
985
- alpha2: "XK",
986
- alpha3: "XKX",
987
- country_code: "383",
988
- country_name: "Kosovo, Republic of",
989
- mobile_begin_with: ["43", "44", "45", "46", "47", "48", "49"],
990
- phone_number_lengths: [8],
991
- },
992
- {
993
- alpha2: 'KW',
994
- alpha3: 'KWT',
995
- country_code: '965',
996
- country_name: 'Kuwait',
997
- mobile_begin_with: ['5', '6', '9'],
998
- phone_number_lengths: [8]
999
- },
1000
- {
1001
- alpha2: 'LA',
1002
- alpha3: 'LAO',
1003
- country_code: '856',
1004
- country_name: "Lao People's Democratic Republic",
1005
- mobile_begin_with: ['20'],
1006
- phone_number_lengths: [10]
1007
- },
1008
- {
1009
- alpha2: 'LB',
1010
- alpha3: 'LBN',
1011
- country_code: '961',
1012
- country_name: 'Lebanon',
1013
- mobile_begin_with: ['3', '7', '8'],
1014
- phone_number_lengths: [7, 8]
1015
- },
1016
- {
1017
- alpha2: 'LR',
1018
- alpha3: 'LBR',
1019
- country_code: '231',
1020
- country_name: 'Liberia',
1021
- mobile_begin_with: ['4', '5', '6', '7'],
1022
- phone_number_lengths: [7, 8]
1023
- },
1024
- {
1025
- alpha2: 'LY',
1026
- alpha3: 'LBY',
1027
- country_code: '218',
1028
- country_name: 'Libyan Arab Jamahiriya',
1029
- mobile_begin_with: ['9'],
1030
- phone_number_lengths: [9]
1031
- },
1032
- {
1033
- alpha2: 'LC',
1034
- alpha3: 'LCA',
1035
- country_code: '1',
1036
- country_name: 'Saint Lucia',
1037
- mobile_begin_with: ['758'],
1038
- phone_number_lengths: [10]
1039
- },
1040
- {
1041
- alpha2: 'LI',
1042
- alpha3: 'LIE',
1043
- country_code: '423',
1044
- country_name: 'Liechtenstein',
1045
- mobile_begin_with: ['7'],
1046
- phone_number_lengths: [7]
1047
- },
1048
- {
1049
- alpha2: 'LK',
1050
- alpha3: 'LKA',
1051
- country_code: '94',
1052
- country_name: 'Sri Lanka',
1053
- mobile_begin_with: ['7'],
1054
- phone_number_lengths: [9]
1055
- },
1056
- {
1057
- alpha2: 'LS',
1058
- alpha3: 'LSO',
1059
- country_code: '266',
1060
- country_name: 'Lesotho',
1061
- mobile_begin_with: ['5', '6'],
1062
- phone_number_lengths: [8]
1063
- },
1064
- {
1065
- alpha2: 'LT',
1066
- alpha3: 'LTU',
1067
- country_code: '370',
1068
- country_name: 'Lithuania',
1069
- mobile_begin_with: ['6'],
1070
- phone_number_lengths: [8]
1071
- },
1072
- {
1073
- alpha2: 'LU',
1074
- alpha3: 'LUX',
1075
- country_code: '352',
1076
- country_name: 'Luxembourg',
1077
- mobile_begin_with: ['6'],
1078
- phone_number_lengths: [9]
1079
- },
1080
- {
1081
- alpha2: 'LV',
1082
- alpha3: 'LVA',
1083
- country_code: '371',
1084
- country_name: 'Latvia',
1085
- mobile_begin_with: ['2'],
1086
- phone_number_lengths: [8]
1087
- },
1088
- {
1089
- alpha2: 'MO',
1090
- alpha3: 'MAC',
1091
- country_code: '853',
1092
- country_name: 'Macao',
1093
- mobile_begin_with: ['6'],
1094
- phone_number_lengths: [8]
1095
- },
1096
- // {alpha2: "MF", alpha3: "MAF", country_code: "590", country_name: "Saint Martin", mobile_begin_with: [], phone_number_lengths: []},
1097
- {
1098
- alpha2: 'MA',
1099
- alpha3: 'MAR',
1100
- country_code: '212',
1101
- country_name: 'Morocco',
1102
- mobile_begin_with: ['6', '7'],
1103
- phone_number_lengths: [9]
1104
- },
1105
- {
1106
- alpha2: 'MC',
1107
- alpha3: 'MCO',
1108
- country_code: '377',
1109
- country_name: 'Monaco',
1110
- mobile_begin_with: ['4', '6'],
1111
- phone_number_lengths: [8, 9]
1112
- },
1113
- {
1114
- alpha2: 'MD',
1115
- alpha3: 'MDA',
1116
- country_code: '373',
1117
- country_name: 'Moldova, Republic of',
1118
- mobile_begin_with: ['6', '7'],
1119
- phone_number_lengths: [8]
1120
- },
1121
- {
1122
- alpha2: 'MG',
1123
- alpha3: 'MDG',
1124
- country_code: '261',
1125
- country_name: 'Madagascar',
1126
- mobile_begin_with: ['3'],
1127
- phone_number_lengths: [9]
1128
- },
1129
- {
1130
- alpha2: 'MV',
1131
- alpha3: 'MDV',
1132
- country_code: '960',
1133
- country_name: 'Maldives',
1134
- mobile_begin_with: ['7', '9'],
1135
- phone_number_lengths: [7]
1136
- },
1137
- {
1138
- alpha2: 'MX',
1139
- alpha3: 'MEX',
1140
- country_code: '52',
1141
- country_name: 'Mexico',
1142
- mobile_begin_with: [''],
1143
- phone_number_lengths: [10, 11]
1144
- },
1145
- {
1146
- alpha2: 'MH',
1147
- alpha3: 'MHL',
1148
- country_code: '692',
1149
- country_name: 'Marshall Islands',
1150
- mobile_begin_with: [],
1151
- phone_number_lengths: [7]
1152
- },
1153
- {
1154
- alpha2: 'MK',
1155
- alpha3: 'MKD',
1156
- country_code: '389',
1157
- country_name: 'Macedonia, the Former Yugoslav Republic Of',
1158
- mobile_begin_with: ['7'],
1159
- phone_number_lengths: [8]
1160
- },
1161
- {
1162
- alpha2: 'ML',
1163
- alpha3: 'MLI',
1164
- country_code: '223',
1165
- country_name: 'Mali',
1166
- mobile_begin_with: ['6', '7'],
1167
- phone_number_lengths: [8]
1168
- },
1169
- {
1170
- alpha2: 'MT',
1171
- alpha3: 'MLT',
1172
- country_code: '356',
1173
- country_name: 'Malta',
1174
- mobile_begin_with: ['7', '9'],
1175
- phone_number_lengths: [8]
1176
- },
1177
- {
1178
- alpha2: 'MM',
1179
- alpha3: 'MMR',
1180
- country_code: '95',
1181
- country_name: 'Myanmar',
1182
- mobile_begin_with: ['9'],
1183
- phone_number_lengths: [8, 9, 10]
1184
- },
1185
- {
1186
- alpha2: 'ME',
1187
- alpha3: 'MNE',
1188
- country_code: '382',
1189
- country_name: 'Montenegro',
1190
- mobile_begin_with: ['6'],
1191
- phone_number_lengths: [8]
1192
- },
1193
- {
1194
- alpha2: 'MN',
1195
- alpha3: 'MNG',
1196
- country_code: '976',
1197
- country_name: 'Mongolia',
1198
- mobile_begin_with: ['5', '8', '9'],
1199
- phone_number_lengths: [8]
1200
- },
1201
- {
1202
- alpha2: 'MP',
1203
- alpha3: 'MNP',
1204
- country_code: '1',
1205
- country_name: 'Northern Mariana Islands',
1206
- mobile_begin_with: ['670'],
1207
- phone_number_lengths: [10]
1208
- },
1209
- {
1210
- alpha2: 'MZ',
1211
- alpha3: 'MOZ',
1212
- country_code: '258',
1213
- country_name: 'Mozambique',
1214
- mobile_begin_with: ['8'],
1215
- phone_number_lengths: [9]
1216
- },
1217
- {
1218
- alpha2: 'MR',
1219
- alpha3: 'MRT',
1220
- country_code: '222',
1221
- country_name: 'Mauritania',
1222
- mobile_begin_with: [],
1223
- phone_number_lengths: [8]
1224
- },
1225
- {
1226
- alpha2: 'MS',
1227
- alpha3: 'MSR',
1228
- country_code: '1',
1229
- country_name: 'Montserrat',
1230
- mobile_begin_with: ['664'],
1231
- phone_number_lengths: [10]
1232
- },
1233
- {
1234
- alpha2: 'MQ',
1235
- alpha3: 'MTQ',
1236
- country_code: '596',
1237
- country_name: 'Martinique',
1238
- mobile_begin_with: ['696', '697'],
1239
- phone_number_lengths: [9]
1240
- },
1241
- {
1242
- alpha2: 'MU',
1243
- alpha3: 'MUS',
1244
- country_code: '230',
1245
- country_name: 'Mauritius',
1246
- mobile_begin_with: ['5'],
1247
- phone_number_lengths: [8]
1248
- },
1249
- {
1250
- alpha2: 'MW',
1251
- alpha3: 'MWI',
1252
- country_code: '265',
1253
- country_name: 'Malawi',
1254
- mobile_begin_with: ['77', '88', '99'],
1255
- phone_number_lengths: [9]
1256
- },
1257
- {
1258
- alpha2: 'MY',
1259
- alpha3: 'MYS',
1260
- country_code: '60',
1261
- country_name: 'Malaysia',
1262
- mobile_begin_with: ['1', '6'],
1263
- phone_number_lengths: [9, 10, 8]
1264
- },
1265
- {
1266
- alpha2: 'YT',
1267
- alpha3: 'MYT',
1268
- country_code: '262',
1269
- country_name: 'Mayotte',
1270
- mobile_begin_with: ['639'],
1271
- phone_number_lengths: [9]
1272
- },
1273
- {
1274
- alpha2: 'NA',
1275
- alpha3: 'NAM',
1276
- country_code: '264',
1277
- country_name: 'Namibia',
1278
- mobile_begin_with: ['60', '81', '82', '85'],
1279
- phone_number_lengths: [9]
1280
- },
1281
- {
1282
- alpha2: 'NC',
1283
- alpha3: 'NCL',
1284
- country_code: '687',
1285
- country_name: 'New Caledonia',
1286
- mobile_begin_with: ['5', '7', '8', '9'],
1287
- phone_number_lengths: [6]
1288
- },
1289
- {
1290
- alpha2: 'NE',
1291
- alpha3: 'NER',
1292
- country_code: '227',
1293
- country_name: 'Niger',
1294
- mobile_begin_with: ['9'],
1295
- phone_number_lengths: [8]
1296
- },
1297
- {
1298
- alpha2: 'NF',
1299
- alpha3: 'NFK',
1300
- country_code: '672',
1301
- country_name: 'Norfolk Island',
1302
- mobile_begin_with: ['5', '8'],
1303
- phone_number_lengths: [5]
1304
- },
1305
- {
1306
- alpha2: 'NG',
1307
- alpha3: 'NGA',
1308
- country_code: '234',
1309
- country_name: 'Nigeria',
1310
- mobile_begin_with: ['70', '80', '81', '90', '91'],
1311
- phone_number_lengths: [10]
1312
- },
1313
- {
1314
- alpha2: 'NI',
1315
- alpha3: 'NIC',
1316
- country_code: '505',
1317
- country_name: 'Nicaragua',
1318
- mobile_begin_with: ['7', '8'],
1319
- phone_number_lengths: [8]
1320
- },
1321
- {
1322
- alpha2: 'NU',
1323
- alpha3: 'NIU',
1324
- country_code: '683',
1325
- country_name: 'Niue',
1326
- mobile_begin_with: [],
1327
- phone_number_lengths: [4]
1328
- },
1329
- {
1330
- alpha2: 'NL',
1331
- alpha3: 'NLD',
1332
- country_code: '31',
1333
- country_name: 'Netherlands',
1334
- mobile_begin_with: ['6', '97'],
1335
- phone_number_lengths: [9, 11]
1336
- },
1337
- {
1338
- alpha2: 'NO',
1339
- alpha3: 'NOR',
1340
- country_code: '47',
1341
- country_name: 'Norway',
1342
- mobile_begin_with: ['4', '9'],
1343
- phone_number_lengths: [8]
1344
- },
1345
- {
1346
- alpha2: 'NP',
1347
- alpha3: 'NPL',
1348
- country_code: '977',
1349
- country_name: 'Nepal',
1350
- mobile_begin_with: ['97', '98'],
1351
- phone_number_lengths: [10]
1352
- },
1353
- {
1354
- alpha2: 'NR',
1355
- alpha3: 'NRU',
1356
- country_code: '674',
1357
- country_name: 'Nauru',
1358
- mobile_begin_with: ['555'],
1359
- phone_number_lengths: [7]
1360
- },
1361
- {
1362
- alpha2: 'NZ',
1363
- alpha3: 'NZL',
1364
- country_code: '64',
1365
- country_name: 'New Zealand',
1366
- mobile_begin_with: ['2'],
1367
- phone_number_lengths: [8, 9, 10]
1368
- },
1369
- {
1370
- alpha2: 'OM',
1371
- alpha3: 'OMN',
1372
- country_code: '968',
1373
- country_name: 'Oman',
1374
- mobile_begin_with: ['7', '9'],
1375
- phone_number_lengths: [8]
1376
- },
1377
- {
1378
- alpha2: 'PK',
1379
- alpha3: 'PAK',
1380
- country_code: '92',
1381
- country_name: 'Pakistan',
1382
- mobile_begin_with: ['3'],
1383
- phone_number_lengths: [10]
1384
- },
1385
- {
1386
- alpha2: 'PA',
1387
- alpha3: 'PAN',
1388
- country_code: '507',
1389
- country_name: 'Panama',
1390
- mobile_begin_with: ['6'],
1391
- phone_number_lengths: [8]
1392
- },
1393
- // {alpha2: "PN", alpha3: "PCN", country_code: "", country_name: "Pitcairn", mobile_begin_with: [], phone_number_lengths: []},
1394
- {
1395
- alpha2: 'PE',
1396
- alpha3: 'PER',
1397
- country_code: '51',
1398
- country_name: 'Peru',
1399
- mobile_begin_with: ['9'],
1400
- phone_number_lengths: [9]
1401
- },
1402
- {
1403
- alpha2: 'PH',
1404
- alpha3: 'PHL',
1405
- country_code: '63',
1406
- country_name: 'Philippines',
1407
- mobile_begin_with: ['9'],
1408
- phone_number_lengths: [10]
1409
- },
1410
- {
1411
- alpha2: 'PW',
1412
- alpha3: 'PLW',
1413
- country_code: '680',
1414
- country_name: 'Palau',
1415
- mobile_begin_with: [],
1416
- phone_number_lengths: [7]
1417
- },
1418
- {
1419
- alpha2: 'PG',
1420
- alpha3: 'PNG',
1421
- country_code: '675',
1422
- country_name: 'Papua New Guinea',
1423
- mobile_begin_with: ['7'],
1424
- phone_number_lengths: [8]
1425
- },
1426
- {
1427
- alpha2: 'PL',
1428
- alpha3: 'POL',
1429
- country_code: '48',
1430
- country_name: 'Poland',
1431
- mobile_begin_with: ['4', '5', '6', '7', '8'],
1432
- phone_number_lengths: [9]
1433
- },
1434
- {
1435
- alpha2: 'PR',
1436
- alpha3: 'PRI',
1437
- country_code: '1',
1438
- country_name: 'Puerto Rico',
1439
- mobile_begin_with: ['787', '939'],
1440
- phone_number_lengths: [10]
1441
- },
1442
- // {alpha2: "KP", alpha3: "PRK", country_code: "850", country_name: "Korea, Democratic People's Republic Of", mobile_begin_with: [], phone_number_lengths: []},
1443
- {
1444
- alpha2: 'PT',
1445
- alpha3: 'PRT',
1446
- country_code: '351',
1447
- country_name: 'Portugal',
1448
- mobile_begin_with: ['9'],
1449
- phone_number_lengths: [9]
1450
- },
1451
- {
1452
- alpha2: 'PY',
1453
- alpha3: 'PRY',
1454
- country_code: '595',
1455
- country_name: 'Paraguay',
1456
- mobile_begin_with: ['9'],
1457
- phone_number_lengths: [9]
1458
- },
1459
- {
1460
- alpha2: 'PS',
1461
- alpha3: 'PSE',
1462
- country_code: '970',
1463
- country_name: 'Palestinian Territory, Occupied',
1464
- mobile_begin_with: ['5'],
1465
- phone_number_lengths: [9]
1466
- },
1467
- {
1468
- alpha2: 'PF',
1469
- alpha3: 'PYF',
1470
- country_code: '689',
1471
- country_name: 'French Polynesia',
1472
- mobile_begin_with: ['8'],
1473
- phone_number_lengths: [8]
1474
- },
1475
- {
1476
- alpha2: 'QA',
1477
- alpha3: 'QAT',
1478
- country_code: '974',
1479
- country_name: 'Qatar',
1480
- mobile_begin_with: ['3', '5', '6', '7'],
1481
- phone_number_lengths: [8]
1482
- },
1483
- {
1484
- alpha2: 'RE',
1485
- alpha3: 'REU',
1486
- country_code: '262',
1487
- country_name: 'Réunion',
1488
- mobile_begin_with: ['692', '693'],
1489
- phone_number_lengths: [9]
1490
- },
1491
- {
1492
- alpha2: 'RO',
1493
- alpha3: 'ROU',
1494
- country_code: '40',
1495
- country_name: 'Romania',
1496
- mobile_begin_with: ['7'],
1497
- phone_number_lengths: [9]
1498
- },
1499
- {
1500
- alpha2: 'RU',
1501
- alpha3: 'RUS',
1502
- country_code: '7',
1503
- country_name: 'Russian Federation',
1504
- mobile_begin_with: ['9', '495', '498', '499', '835'],
1505
- phone_number_lengths: [10]
1506
- },
1507
- {
1508
- alpha2: 'RW',
1509
- alpha3: 'RWA',
1510
- country_code: '250',
1511
- country_name: 'Rwanda',
1512
- mobile_begin_with: ['7'],
1513
- phone_number_lengths: [9]
1514
- },
1515
- {
1516
- alpha2: 'SA',
1517
- alpha3: 'SAU',
1518
- country_code: '966',
1519
- country_name: 'Saudi Arabia',
1520
- mobile_begin_with: ['5'],
1521
- phone_number_lengths: [9]
1522
- },
1523
- {
1524
- alpha2: 'SD',
1525
- alpha3: 'SDN',
1526
- country_code: '249',
1527
- country_name: 'Sudan',
1528
- mobile_begin_with: ['9'],
1529
- phone_number_lengths: [9]
1530
- },
1531
- {
1532
- alpha2: 'SS',
1533
- alpha3: 'SSD',
1534
- country_code: '211',
1535
- country_name: 'South Sudan',
1536
- mobile_begin_with: ['9'],
1537
- phone_number_lengths: [9]
1538
- },
1539
- {
1540
- alpha2: 'SN',
1541
- alpha3: 'SEN',
1542
- country_code: '221',
1543
- country_name: 'Senegal',
1544
- mobile_begin_with: ['7'],
1545
- phone_number_lengths: [9]
1546
- },
1547
- {
1548
- alpha2: 'SG',
1549
- alpha3: 'SGP',
1550
- country_code: '65',
1551
- country_name: 'Singapore',
1552
- mobile_begin_with: ['8', '9'],
1553
- phone_number_lengths: [8]
1554
- },
1555
- // {alpha2: "GS", alpha3: "SGS", country_code: "500", country_name: "South Georgia and the South Sandwich Islands", mobile_begin_with: [], phone_number_lengths: []},
1556
- {
1557
- alpha2: 'SH',
1558
- alpha3: 'SHN',
1559
- country_code: '290',
1560
- country_name: 'Saint Helena',
1561
- mobile_begin_with: [],
1562
- phone_number_lengths: [4]
1563
- },
1564
- {
1565
- alpha2: 'SJ',
1566
- alpha3: 'SJM',
1567
- country_code: '47',
1568
- country_name: 'Svalbard And Jan Mayen',
1569
- mobile_begin_with: ['79'],
1570
- phone_number_lengths: [8]
1571
- },
1572
- {
1573
- alpha2: 'SB',
1574
- alpha3: 'SLB',
1575
- country_code: '677',
1576
- country_name: 'Solomon Islands',
1577
- mobile_begin_with: ['7', '8'],
1578
- phone_number_lengths: [7]
1579
- },
1580
- {
1581
- alpha2: 'SL',
1582
- alpha3: 'SLE',
1583
- country_code: '232',
1584
- country_name: 'Sierra Leone',
1585
- mobile_begin_with: ['21', '25', '30', '33', '34', '40', '44', '50', '55', '76', '77', '78', '79', '88'],
1586
- phone_number_lengths: [8]
1587
- },
1588
- {
1589
- alpha2: 'SV',
1590
- alpha3: 'SLV',
1591
- country_code: '503',
1592
- country_name: 'El Salvador',
1593
- mobile_begin_with: ['6', '7'],
1594
- phone_number_lengths: [8]
1595
- },
1596
- {
1597
- alpha2: 'SM',
1598
- alpha3: 'SMR',
1599
- country_code: '378',
1600
- country_name: 'San Marino',
1601
- mobile_begin_with: ['3', '6'],
1602
- phone_number_lengths: [10]
1603
- },
1604
- {
1605
- alpha2: 'SO',
1606
- alpha3: 'SOM',
1607
- country_code: '252',
1608
- country_name: 'Somalia',
1609
- mobile_begin_with: ['61', '62', '63', '65', '66', '68', '69', '71', '90'],
1610
- phone_number_lengths: [9]
1611
- },
1612
- {
1613
- alpha2: 'SX',
1614
- alpha3: 'SXM',
1615
- country_code: '1',
1616
- country_name: 'Sint Maarten',
1617
- mobile_begin_with: ['721'],
1618
- phone_number_lengths: [10]
1619
- },
1620
- {
1621
- alpha2: 'PM',
1622
- alpha3: 'SPM',
1623
- country_code: '508',
1624
- country_name: 'Saint Pierre And Miquelon',
1625
- mobile_begin_with: ['55', '41'],
1626
- phone_number_lengths: [6]
1627
- },
1628
- {
1629
- alpha2: 'RS',
1630
- alpha3: 'SRB',
1631
- country_code: '381',
1632
- country_name: 'Serbia',
1633
- mobile_begin_with: ['6'],
1634
- phone_number_lengths: [8, 9]
1635
- },
1636
- {
1637
- alpha2: 'ST',
1638
- alpha3: 'STP',
1639
- country_code: '239',
1640
- country_name: 'Sao Tome and Principe',
1641
- mobile_begin_with: ['98', '99'],
1642
- phone_number_lengths: [7]
1643
- },
1644
- {
1645
- alpha2: 'SR',
1646
- alpha3: 'SUR',
1647
- country_code: '597',
1648
- country_name: 'Suriname',
1649
- mobile_begin_with: ['6', '7', '8'],
1650
- phone_number_lengths: [7]
1651
- },
1652
- {
1653
- alpha2: 'SK',
1654
- alpha3: 'SVK',
1655
- country_code: '421',
1656
- country_name: 'Slovakia',
1657
- mobile_begin_with: ['9'],
1658
- phone_number_lengths: [9]
1659
- },
1660
- {
1661
- alpha2: 'SI',
1662
- alpha3: 'SVN',
1663
- country_code: '386',
1664
- country_name: 'Slovenia',
1665
- mobile_begin_with: ['3', '4', '5', '6', '7'],
1666
- phone_number_lengths: [8]
1667
- },
1668
- {
1669
- alpha2: 'SE',
1670
- alpha3: 'SWE',
1671
- country_code: '46',
1672
- country_name: 'Sweden',
1673
- mobile_begin_with: ['7'],
1674
- phone_number_lengths: [9]
1675
- },
1676
- {
1677
- alpha2: 'SZ',
1678
- alpha3: 'SWZ',
1679
- country_code: '268',
1680
- country_name: 'Swaziland',
1681
- mobile_begin_with: ['76', '77', '78', '79'],
1682
- phone_number_lengths: [8]
1683
- },
1684
- {
1685
- alpha2: 'SC',
1686
- alpha3: 'SYC',
1687
- country_code: '248',
1688
- country_name: 'Seychelles',
1689
- mobile_begin_with: ['2'],
1690
- phone_number_lengths: [7]
1691
- },
1692
- {
1693
- alpha2: 'SY',
1694
- alpha3: 'SYR',
1695
- country_code: '963',
1696
- country_name: 'Syrian Arab Republic',
1697
- mobile_begin_with: ['9'],
1698
- phone_number_lengths: [9]
1699
- },
1700
- // http://www.howtocallabroad.com/turks-caicos/
1701
- {
1702
- alpha2: 'TC',
1703
- alpha3: 'TCA',
1704
- country_code: '1',
1705
- country_name: 'Turks and Caicos Islands',
1706
- mobile_begin_with: ['6492', '6493', '6494'],
1707
- phone_number_lengths: [10]
1708
- },
1709
- {
1710
- alpha2: 'TD',
1711
- alpha3: 'TCD',
1712
- country_code: '235',
1713
- country_name: 'Chad',
1714
- mobile_begin_with: ['6', '7', '9'],
1715
- phone_number_lengths: [8]
1716
- },
1717
- {
1718
- alpha2: 'TG',
1719
- alpha3: 'TGO',
1720
- country_code: '228',
1721
- country_name: 'Togo',
1722
- mobile_begin_with: ['9'],
1723
- phone_number_lengths: [8]
1724
- },
1725
- {
1726
- alpha2: 'TH',
1727
- alpha3: 'THA',
1728
- country_code: '66',
1729
- country_name: 'Thailand',
1730
- mobile_begin_with: ['6', '8', '9'],
1731
- phone_number_lengths: [9]
1732
- },
1733
- {
1734
- alpha2: 'TJ',
1735
- alpha3: 'TJK',
1736
- country_code: '992',
1737
- country_name: 'Tajikistan',
1738
- mobile_begin_with: ['9'],
1739
- phone_number_lengths: [9]
1740
- },
1741
- {
1742
- alpha2: 'TK',
1743
- alpha3: 'TKL',
1744
- country_code: '690',
1745
- country_name: 'Tokelau',
1746
- mobile_begin_with: [],
1747
- phone_number_lengths: [4]
1748
- },
1749
- {
1750
- alpha2: 'TM',
1751
- alpha3: 'TKM',
1752
- country_code: '993',
1753
- country_name: 'Turkmenistan',
1754
- mobile_begin_with: ['6'],
1755
- phone_number_lengths: [8]
1756
- },
1757
- {
1758
- alpha2: 'TL',
1759
- alpha3: 'TLS',
1760
- country_code: '670',
1761
- country_name: 'Timor-Leste',
1762
- mobile_begin_with: ['7'],
1763
- phone_number_lengths: [8]
1764
- },
1765
- {
1766
- alpha2: 'TO',
1767
- alpha3: 'TON',
1768
- country_code: '676',
1769
- country_name: 'Tonga',
1770
- mobile_begin_with: [],
1771
- phone_number_lengths: [5]
1772
- },
1773
- {
1774
- alpha2: 'TT',
1775
- alpha3: 'TTO',
1776
- country_code: '1',
1777
- country_name: 'Trinidad and Tobago',
1778
- mobile_begin_with: ['868'],
1779
- phone_number_lengths: [10]
1780
- },
1781
- {
1782
- alpha2: 'TN',
1783
- alpha3: 'TUN',
1784
- country_code: '216',
1785
- country_name: 'Tunisia',
1786
- mobile_begin_with: ['2', '4', '5', '9'],
1787
- phone_number_lengths: [8]
1788
- },
1789
- {
1790
- alpha2: 'TR',
1791
- alpha3: 'TUR',
1792
- country_code: '90',
1793
- country_name: 'Turkey',
1794
- mobile_begin_with: ['5'],
1795
- phone_number_lengths: [10]
1796
- },
1797
- {
1798
- alpha2: 'TV',
1799
- alpha3: 'TUV',
1800
- country_code: '688',
1801
- country_name: 'Tuvalu',
1802
- mobile_begin_with: [],
1803
- phone_number_lengths: [5]
1804
- },
1805
- {
1806
- alpha2: 'TW',
1807
- alpha3: 'TWN',
1808
- country_code: '886',
1809
- country_name: 'Taiwan',
1810
- mobile_begin_with: ['9'],
1811
- phone_number_lengths: [9]
1812
- },
1813
- {
1814
- alpha2: 'TZ',
1815
- alpha3: 'TZA',
1816
- country_code: '255',
1817
- country_name: 'Tanzania, United Republic of',
1818
- mobile_begin_with: ['7', '6'],
1819
- phone_number_lengths: [9]
1820
- },
1821
- {
1822
- alpha2: 'UG',
1823
- alpha3: 'UGA',
1824
- country_code: '256',
1825
- country_name: 'Uganda',
1826
- mobile_begin_with: ['7'],
1827
- phone_number_lengths: [9]
1828
- },
1829
- {
1830
- alpha2: 'UA',
1831
- alpha3: 'UKR',
1832
- country_code: '380',
1833
- country_name: 'Ukraine',
1834
- mobile_begin_with: ['39', '50', '63', '66', '67', '68', '73', '75', '77', '9'],
1835
- phone_number_lengths: [9]
1836
- },
1837
- // {alpha2: "UM", alpha3: "UMI", country_code: "", country_name: "United States Minor Outlying Islands", mobile_begin_with: [], phone_number_lengths: []},
1838
- {
1839
- alpha2: 'UY',
1840
- alpha3: 'URY',
1841
- country_code: '598',
1842
- country_name: 'Uruguay',
1843
- mobile_begin_with: ['9'],
1844
- phone_number_lengths: [8]
1845
- },
1846
- {
1847
- alpha2: 'UZ',
1848
- alpha3: 'UZB',
1849
- country_code: '998',
1850
- country_name: 'Uzbekistan',
1851
- mobile_begin_with: ['9', '88', '33'],
1852
- phone_number_lengths: [9]
1853
- },
1854
- // {alpha2: "VA", alpha3: "VAT", country_code: "39", country_name: "Holy See (Vatican City State)", mobile_begin_with: [], phone_number_lengths: []},
1855
- {
1856
- alpha2: 'VC',
1857
- alpha3: 'VCT',
1858
- country_code: '1',
1859
- country_name: 'Saint Vincent And The Grenedines',
1860
- mobile_begin_with: ['784'],
1861
- phone_number_lengths: [10]
1862
- },
1863
- {
1864
- alpha2: 'VE',
1865
- alpha3: 'VEN',
1866
- country_code: '58',
1867
- country_name: 'Venezuela, Bolivarian Republic of',
1868
- mobile_begin_with: ['4'],
1869
- phone_number_lengths: [10]
1870
- },
1871
- {
1872
- alpha2: 'VG',
1873
- alpha3: 'VGB',
1874
- country_code: '1',
1875
- country_name: 'Virgin Islands, British',
1876
- mobile_begin_with: ['284'],
1877
- phone_number_lengths: [10]
1878
- },
1879
- {
1880
- alpha2: 'VI',
1881
- alpha3: 'VIR',
1882
- country_code: '1',
1883
- country_name: 'Virgin Islands, U.S.',
1884
- mobile_begin_with: ['340'],
1885
- phone_number_lengths: [10]
1886
- },
1887
- {
1888
- alpha2: 'VN',
1889
- alpha3: 'VNM',
1890
- country_code: '84',
1891
- country_name: 'Viet Nam',
1892
- mobile_begin_with: ['8', '9', '3', '7', '5'],
1893
- phone_number_lengths: [9]
1894
- },
1895
- {
1896
- alpha2: 'VU',
1897
- alpha3: 'VUT',
1898
- country_code: '678',
1899
- country_name: 'Vanuatu',
1900
- mobile_begin_with: ['5', '7'],
1901
- phone_number_lengths: [7]
1902
- },
1903
- {
1904
- alpha2: 'WF',
1905
- alpha3: 'WLF',
1906
- country_code: '681',
1907
- country_name: 'Wallis and Futuna',
1908
- mobile_begin_with: [],
1909
- phone_number_lengths: [6]
1910
- },
1911
- {
1912
- alpha2: 'WS',
1913
- alpha3: 'WSM',
1914
- country_code: '685',
1915
- country_name: 'Samoa',
1916
- mobile_begin_with: ['7'],
1917
- phone_number_lengths: [7]
1918
- },
1919
- {
1920
- alpha2: 'YE',
1921
- alpha3: 'YEM',
1922
- country_code: '967',
1923
- country_name: 'Yemen',
1924
- mobile_begin_with: ['7'],
1925
- phone_number_lengths: [9]
1926
- },
1927
- {
1928
- alpha2: 'ZA',
1929
- alpha3: 'ZAF',
1930
- country_code: '27',
1931
- country_name: 'South Africa',
1932
- mobile_begin_with: ['1', '2', '3', '4', '5', '6', '7', '8'],
1933
- phone_number_lengths: [9]
1934
- },
1935
- {
1936
- alpha2: 'ZM',
1937
- alpha3: 'ZMB',
1938
- country_code: '260',
1939
- country_name: 'Zambia',
1940
- mobile_begin_with: ['9', '7'],
1941
- phone_number_lengths: [9]
1942
- },
1943
- {
1944
- alpha2: 'ZW',
1945
- alpha3: 'ZWE',
1946
- country_code: '263',
1947
- country_name: 'Zimbabwe',
1948
- mobile_begin_with: ['71', '73', '77', '78'],
1949
- phone_number_lengths: [9]
1950
- }
1951
- ];
1952
- return country_phone_data;
1953
- }
1954
-
1955
- var utility = {};
1956
-
1957
- var hasRequiredUtility;
1958
-
1959
- function requireUtility () {
1960
- if (hasRequiredUtility) return utility;
1961
- hasRequiredUtility = 1;
1962
- var __importDefault = (utility && utility.__importDefault) || function (mod) {
1963
- return (mod && mod.__esModule) ? mod : { "default": mod };
1964
- };
1965
- Object.defineProperty(utility, "__esModule", { value: true });
1966
- utility.findCountryPhoneDataByCountry = findCountryPhoneDataByCountry;
1967
- utility.findExactCountryPhoneData = findExactCountryPhoneData;
1968
- utility.findPossibleCountryPhoneData = findPossibleCountryPhoneData;
1969
- utility.findCountryPhoneDataByPhoneNumber = findCountryPhoneDataByPhoneNumber;
1970
- utility.validatePhoneISO3166 = validatePhoneISO3166;
1971
- const country_phone_data_1 = __importDefault(requireCountry_phone_data());
1972
- /**
1973
- * @param {string=} country - country code alpha 2 or 3
1974
- * @returns {{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with, phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string, string, string, string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string], phone_number_lengths: [number]}|{country_code: string, alpha2: string, country_name: string, alpha3: string, mobile_begin_with: [string, string], phone_number_lengths: [number]}|null}
1975
- */
1976
- function findCountryPhoneDataByCountry(country) {
1977
- // if no country provided, assume it's USA
1978
- if (!country) {
1979
- return country_phone_data_1.default.find(countryPhoneDatum => countryPhoneDatum.alpha3 === 'USA') || null;
1980
- }
1981
- if (country.length === 2) {
1982
- return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.alpha2) || null;
1983
- }
1984
- if (country.length === 3) {
1985
- return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.alpha3) || null;
1986
- }
1987
- return country_phone_data_1.default.find(countryPhoneDatum => country.toUpperCase() === countryPhoneDatum.country_name.toUpperCase()) || null;
1988
- }
1989
- function findExactCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum) {
1990
- // check if the phone number length match any one of the length config
1991
- const phoneNumberLengthMatched = countryPhoneDatum.phone_number_lengths.some(length => {
1992
- // as the phone number must include the country code,
1993
- // but countryPhoneDatum.phone_number_lengths is the length without country code
1994
- // therefore need to add back countryPhoneDatum.country_code.length to length
1995
- return (countryPhoneDatum.country_code.length + length === phoneNumber.length);
1996
- });
1997
- if (!phoneNumberLengthMatched) {
1998
- return null;
1999
- }
2000
- // if no need to validate mobile prefix or the country data does not have mobile begin with
2001
- // pick the current one as the answer directly
2002
- if (!countryPhoneDatum.mobile_begin_with.length || !validateMobilePrefix) {
2003
- return countryPhoneDatum;
2004
- }
2005
- // if the mobile begin with is correct, pick as the correct answer
2006
- if (countryPhoneDatum.mobile_begin_with.some(beginWith => {
2007
- return phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code + beginWith));
2008
- })) {
2009
- return countryPhoneDatum;
2010
- }
2011
- return null;
2012
- }
2013
- function findPossibleCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum) {
2014
- // check if the phone number length match any one of the length config
2015
- const phoneNumberLengthMatched = countryPhoneDatum.phone_number_lengths.some(length => {
2016
- // the phone number must include the country code
2017
- // countryPhoneDatum.phone_number_lengths is the length without country code
2018
- // + 1 is assuming there is an unwanted trunk code prepended to the phone number
2019
- return (countryPhoneDatum.country_code.length + length + 1 === phoneNumber.length);
2020
- });
2021
- if (!phoneNumberLengthMatched) {
2022
- return null;
2023
- }
2024
- // if no need to validate mobile prefix or the country data does not have mobile begin with
2025
- // pick the current one as the answer directly
2026
- if (!countryPhoneDatum.mobile_begin_with.length || !validateMobilePrefix) {
2027
- return countryPhoneDatum;
2028
- }
2029
- // if the mobile begin with is correct, pick as the correct answer
2030
- // match another \d for the unwanted trunk code prepended to the phone number
2031
- if (countryPhoneDatum.mobile_begin_with.some(beginWith => {
2032
- return phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code + '\\d?' + beginWith));
2033
- })) {
2034
- return countryPhoneDatum;
2035
- }
2036
- }
2037
- /**
2038
- * get country phone data by phone number
2039
- * the phone number must include country code as the complete phone number includes the plus sign
2040
- * @param phoneNumber
2041
- * @param validateMobilePrefix
2042
- * @returns {{exactCountryPhoneData: (*), possibleCountryPhoneData: (*)}}
2043
- */
2044
- function findCountryPhoneDataByPhoneNumber(phoneNumber, validateMobilePrefix) {
2045
- let exactCountryPhoneData;
2046
- let possibleCountryPhoneData;
2047
- for (const countryPhoneDatum of country_phone_data_1.default) {
2048
- // if the country code is wrong, skip directly
2049
- if (!phoneNumber.match(new RegExp('^' + countryPhoneDatum.country_code))) {
2050
- continue;
2051
- }
2052
- // process only if exact match not found yet
2053
- if (!exactCountryPhoneData) {
2054
- exactCountryPhoneData = findExactCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum);
2055
- }
2056
- if (!possibleCountryPhoneData) {
2057
- possibleCountryPhoneData = findPossibleCountryPhoneData(phoneNumber, validateMobilePrefix, countryPhoneDatum);
2058
- }
2059
- }
2060
- return {
2061
- exactCountryPhoneData,
2062
- possibleCountryPhoneData
2063
- };
2064
- }
2065
- /**
2066
- *
2067
- * @param {string} phone - phone number without plus sign, with or without country calling code
2068
- * @param {Object} countryPhoneDatum - iso 3166 data
2069
- * @param {String} countryPhoneDatum.country_code - country calling codes
2070
- * @param {Array} countryPhoneDatum.phone_number_lengths - all available phone number lengths for this country
2071
- * @param {Array} countryPhoneDatum.mobile_begin_with - mobile begin with number
2072
- * @param {boolean} validateMobilePrefix - true if we skip mobile begin with checking
2073
- * @param {boolean} plusSign - true if the input contains a plus sign
2074
- * @returns {*|boolean}
2075
- */
2076
- function validatePhoneISO3166(phone, countryPhoneDatum, validateMobilePrefix, plusSign) {
2077
- if (!countryPhoneDatum.phone_number_lengths) {
2078
- return false;
2079
- }
2080
- // remove country calling code from the phone number
2081
- const phoneWithoutCountry = phone.replace(new RegExp('^' + countryPhoneDatum.country_code), '');
2082
- // if the phone number have +, countryPhoneDatum detected,
2083
- // but the phone number does not have country calling code
2084
- // then should consider the phone number as invalid
2085
- if (plusSign && countryPhoneDatum && phoneWithoutCountry.length === phone.length) {
2086
- return false;
2087
- }
2088
- const phone_number_lengths = countryPhoneDatum.phone_number_lengths;
2089
- const mobile_begin_with = countryPhoneDatum.mobile_begin_with;
2090
- const isLengthValid = phone_number_lengths.some(length => phoneWithoutCountry.length === length);
2091
- // some country doesn't have mobile_begin_with
2092
- const isBeginWithValid = mobile_begin_with.length ?
2093
- mobile_begin_with.some(beginWith => phoneWithoutCountry.match(new RegExp('^' + beginWith))) :
2094
- true;
2095
- return isLengthValid && (!validateMobilePrefix || isBeginWithValid);
2096
- }
2097
- return utility;
2098
- }
2099
-
2100
- var hasRequiredDist;
2101
-
2102
- function requireDist () {
2103
- if (hasRequiredDist) return dist;
2104
- hasRequiredDist = 1;
2105
- var __importDefault = (dist && dist.__importDefault) || function (mod) {
2106
- return (mod && mod.__esModule) ? mod : { "default": mod };
2107
- };
2108
- Object.defineProperty(dist, "__esModule", { value: true });
2109
- dist.countryPhoneData = void 0;
2110
- dist.default = phone;
2111
- dist.phone = phone;
2112
- const country_phone_data_1 = __importDefault(requireCountry_phone_data());
2113
- dist.countryPhoneData = country_phone_data_1.default;
2114
- const utility_1 = requireUtility();
2115
- /**
2116
- * @typedef {Object} Option
2117
- * @property {string=} country - country code in ISO3166 alpha 2 or 3
2118
- * @property {boolean=} validateMobilePrefix - true to validate phone number prefix
2119
- * @property {boolean=} strictDetection - true to disable remove truck code and detection logic
2120
- *
2121
- * @param {string} phoneNumber - phone number
2122
- * @param {Option} option
2123
- * @returns {{phoneNumber: string|null, countryIso2: string|null, countryIso3: string|null}}
2124
- */
2125
- function phone(phoneNumber, { country = '', validateMobilePrefix = true, strictDetection = false } = {}) {
2126
- const invalidResult = {
2127
- isValid: false,
2128
- phoneNumber: null,
2129
- countryIso2: null,
2130
- countryIso3: null,
2131
- countryCode: null
2132
- };
2133
- let processedPhoneNumber = (typeof phoneNumber !== 'string') ? '' : phoneNumber.trim();
2134
- const processedCountry = (typeof country !== 'string') ? '' : country.trim();
2135
- const hasPlusSign = Boolean(processedPhoneNumber.match(/^\+/));
2136
- // remove any non-digit character, included the +
2137
- processedPhoneNumber = processedPhoneNumber.replace(/\D/g, '');
2138
- let foundCountryPhoneData = (0, utility_1.findCountryPhoneDataByCountry)(processedCountry);
2139
- if (!foundCountryPhoneData) {
2140
- return invalidResult;
2141
- }
2142
- let defaultCountry = false;
2143
- // if country provided, only reformat the phone number
2144
- if (processedCountry) {
2145
- // remove leading 0s for all countries except 'CIV', 'COG'
2146
- if (!['CIV', 'COG'].includes(foundCountryPhoneData.alpha3)) {
2147
- processedPhoneNumber = processedPhoneNumber.replace(/^0+/, '');
2148
- }
2149
- // if input 89234567890, RUS, remove the 8
2150
- if (foundCountryPhoneData.alpha3 === 'RUS' && processedPhoneNumber.length === 11 && processedPhoneNumber.match(/^89/) !== null) {
2151
- processedPhoneNumber = processedPhoneNumber.replace(/^8+/, '');
2152
- }
2153
- // if there's no plus sign and the phone number length is one of the valid length under country phone data
2154
- // then assume there's no country code, hence add back the country code
2155
- if (!hasPlusSign && foundCountryPhoneData.phone_number_lengths.includes(processedPhoneNumber.length)) {
2156
- processedPhoneNumber = `${foundCountryPhoneData.country_code}${processedPhoneNumber}`;
2157
- }
2158
- }
2159
- else if (hasPlusSign) {
2160
- // if there is a plus sign but no country provided
2161
- // try to find the country phone data by the phone number
2162
- const { exactCountryPhoneData, possibleCountryPhoneData } = (0, utility_1.findCountryPhoneDataByPhoneNumber)(processedPhoneNumber, validateMobilePrefix);
2163
- if (exactCountryPhoneData) {
2164
- foundCountryPhoneData = exactCountryPhoneData;
2165
- }
2166
- else if (possibleCountryPhoneData && !strictDetection) {
2167
- // for some countries, the phone number usually includes one trunk prefix for local use
2168
- // The UK mobile phone number ‘07911 123456’ in international format is ‘+44 7911 123456’, so without the first zero.
2169
- // 8 (AAA) BBB-BB-BB, 0AA-BBBBBBB
2170
- // the numbers should be omitted in international calls
2171
- foundCountryPhoneData = possibleCountryPhoneData;
2172
- processedPhoneNumber = foundCountryPhoneData.country_code + processedPhoneNumber.replace(new RegExp(`^${foundCountryPhoneData.country_code}\\d`), '');
2173
- }
2174
- else {
2175
- foundCountryPhoneData = null;
2176
- }
2177
- }
2178
- else if (foundCountryPhoneData.phone_number_lengths.indexOf(processedPhoneNumber.length) !== -1) {
2179
- // B: no country, no plus sign --> treat it as USA
2180
- // 1. check length if == 11, or 10, if 10, add +1, then go go D
2181
- // no plus sign, no country is given. then it must be USA
2182
- // iso3166 = iso3166_data[0]; already assign by the default value
2183
- processedPhoneNumber = `1${processedPhoneNumber}`;
2184
- defaultCountry = true;
2185
- }
2186
- if (!foundCountryPhoneData) {
2187
- return invalidResult;
2188
- }
2189
- let validateResult = (0, utility_1.validatePhoneISO3166)(processedPhoneNumber, foundCountryPhoneData, validateMobilePrefix, hasPlusSign);
2190
- if (validateResult) {
2191
- return {
2192
- isValid: true,
2193
- phoneNumber: `+${processedPhoneNumber}`,
2194
- countryIso2: foundCountryPhoneData.alpha2,
2195
- countryIso3: foundCountryPhoneData.alpha3,
2196
- countryCode: `+${foundCountryPhoneData.country_code}`
2197
- };
2198
- }
2199
- if (defaultCountry) {
2200
- // also try to validate against CAN for default country, as CAN is also start with +1
2201
- foundCountryPhoneData = (0, utility_1.findCountryPhoneDataByCountry)('CAN');
2202
- validateResult = (0, utility_1.validatePhoneISO3166)(processedPhoneNumber, foundCountryPhoneData, validateMobilePrefix, hasPlusSign);
2203
- if (validateResult) {
2204
- return {
2205
- isValid: true,
2206
- phoneNumber: `+${processedPhoneNumber}`,
2207
- countryIso2: foundCountryPhoneData.alpha2,
2208
- countryIso3: foundCountryPhoneData.alpha3,
2209
- countryCode: `+${foundCountryPhoneData.country_code}`
2210
- };
2211
- }
2212
- }
2213
- return invalidResult;
2214
- }
2215
- return dist;
2216
- }
2217
-
2218
- var distExports = requireDist();
2219
-
2220
- const inputPhoneNumberCss = ":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-input--container--margin-top:0;--r-input--container--margin-bottom:0}:host slot{display:contents}:host ::slotted(r-select){min-width:var(--r-input-phone-number--select--min-width, 7rem);width:var(--r-input-phone-number--select--width, fit-content)}:host r-input.focused{--r-input--container--border-style:solid}:host([full-width]:not([full-width=false])){width:100%}.r-input-phone-number{margin-top:var(--r-input-phone-number--margin-top, var(--r-spacing-025, 0.25rem));margin-bottom:var(--r-input-phone-number--margin-bottom, var(--r-spacing-025, 0.25rem));width:var(--r-input-phone-number--width, 100%);display:var(--r-input-phone-number--display, inline-flex);justify-content:var(--r-input-phone-number--justify-content, center);align-items:var(--r-input-phone-number--align-items, center);gap:var(--r-input-phone-number--gap, 0)}.r-input-phone-number--label-container{display:var(--r-input-phone-number--label-container--display, flex);gap:var(--r-input-phone-number--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-phone-number--label-container--align-items, center);justify-content:var(--r-input-phone-number--label-container--align-items, space-between)}.r-input-phone-number--label-container ::slotted([slot=popover]){display:var(--r-input-phone-number--popover--display, inline-flex);height:var(--r-input-phone-number--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-phone-number--popover--align-items, center);justify-content:var(--r-input-phone-number--popover--justify-content, center);margin-right:var(--r-input-phone-number--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-phone-number--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-phone-number--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-phone-number r-input{margin-left:-1px;flex:1}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
2221
-
2222
- const InputPhoneNumber = class {
2223
- constructor(hostRef) {
2224
- index.registerInstance(this, hostRef);
2225
- this.rInput = index.createEvent(this, "rInput");
2226
- this.rChange = index.createEvent(this, "rChange");
2227
- this.rValidate = index.createEvent(this, "rValidate");
2228
- this.rReset = index.createEvent(this, "rReset");
2229
- /** Specifies a name for an input for submitting within formData object. */
2230
- this.name = 'phone-number';
2231
- /** Label for phone input */
2232
- this.inputLabel = 'Phone number without country code';
2233
- /** Label for countryCode code */
2234
- this.countryCodeLabel = 'Country code';
2235
- this.fullPhoneNumber = '';
2236
- this.phoneNumber = '';
2237
- this.validityState = '';
2238
- this.validityMessage = '';
2239
- this.uniqueId = `r-input-phone-number-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
2240
- /**
2241
- * Initial attributes state
2242
- * */
2243
- this.initial = {};
2244
- this.handleOnInput = (event) => {
2245
- if (this.readonly)
2246
- return;
2247
- this.phoneNumber = event.target.value;
2248
- this.fullPhoneNumber = this.phoneNumber ? this.countryCode + this.phoneNumber : '';
2249
- const { host, phoneNumber, countryCode, value } = this;
2250
- this.rInput.emit({ element: host, value, countryCode, phoneNumber });
2251
- this.validateFormElement(this.nativeElement);
2252
- };
2253
- this.handleInputOnChange = (event) => {
2254
- if (this.readonly)
2255
- return;
2256
- this.phoneNumber = event.target.value;
2257
- this.handleValueChange();
2258
- };
2259
- this.handleValueChange = () => {
2260
- if (this.readonly)
2261
- return;
2262
- this.fullPhoneNumber = this.phoneNumber ? this.countryCode + this.phoneNumber : '';
2263
- const { host, phoneNumber, countryCode, value } = this;
2264
- this.rChange.emit({ element: host, value, countryCode, phoneNumber });
2265
- this.validateFormElement(this.nativeElement);
2266
- };
2267
- this.validateFormElement = (element) => {
2268
- if (this.readonly)
2269
- return;
2270
- if (element === null)
2271
- return;
2272
- if (this.isNoValidate)
2273
- return;
2274
- if (this.error)
2275
- return;
2276
- const { validityState, validityMessage } = this.getValidityStateData();
2277
- this.validityState = validityState;
2278
- this.validityMessage = validityMessage;
2279
- const isValid = this.validityState === 'valid';
2280
- this.valid = isValid;
2281
- this.invalid = !isValid;
2282
- this.rValidate.emit({
2283
- state: this.validityState,
2284
- message: this.validityMessage
2285
- });
2286
- };
2287
- this.getValidityStateData = () => {
2288
- var _a, _b;
2289
- let validityState = '';
2290
- let validityMessage = '';
2291
- if (!this.required && !((_a = this.phoneNumber) === null || _a === void 0 ? void 0 : _a.length)) {
2292
- validityState = 'valid';
2293
- return { validityState, validityMessage };
2294
- }
2295
- if (!((_b = this.phoneNumber) === null || _b === void 0 ? void 0 : _b.length)) {
2296
- validityState = 'valueMissing';
2297
- validityMessage = this.valueMissingMessage;
2298
- return { validityState, validityMessage };
2299
- }
2300
- const isPhoneNumberValid = this.countryCode ? this.getPhoneValidationResult(this.phoneNumber, this.countryCode).isValid : false;
2301
- if (!isPhoneNumberValid) {
2302
- validityState = 'invalid';
2303
- validityMessage = this.customErrorMessage;
2304
- return { validityState, validityMessage };
2305
- }
2306
- validityState = 'valid';
2307
- return { validityState, validityMessage };
2308
- };
2309
- this.onSubmitForm = (event) => {
2310
- if (this.isNoValidate)
2311
- return;
2312
- this.validateFormElement(this.nativeElement);
2313
- if (this.invalid) {
2314
- event.preventDefault();
2315
- event.stopPropagation();
2316
- }
2317
- };
2318
- this.contributeToFormData = (event) => {
2319
- formData.appendControlToFormData(this.nativeElement || this.host, event.formData);
2320
- };
2321
- this.onResetForm = () => {
2322
- var _a;
2323
- if (this.readonly)
2324
- return;
2325
- this.validityState = null;
2326
- this.validityMessage = null;
2327
- this.phoneNumber = '';
2328
- this.invalid = this.initial['invalid'];
2329
- this.valid = !this.invalid;
2330
- (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.reset();
2331
- this.updateValues(this.initial['value']);
2332
- const { host, value } = this;
2333
- this.rReset.emit({ element: host, value });
2334
- };
2335
- }
2336
- /** Returns the element value. */
2337
- async getValue() {
2338
- return this.fullPhoneNumber;
2339
- }
2340
- /** Set the element value. */
2341
- async setValue(value) {
2342
- this.updateValues(value);
2343
- }
2344
- /** Validates an element, displays provided message in case value is invalid. */
2345
- async setCustomValidity(message) {
2346
- this.customErrorMessage = message;
2347
- this.validateFormElement(this.nativeElement);
2348
- }
2349
- /**
2350
- * Validates the input phone number without triggering UI and returns a boolean indicating its validity.
2351
- * @returns A boolean indicating whether the input phone number is valid.
2352
- */
2353
- async checkValidity() {
2354
- const { validityState } = this.getValidityStateData();
2355
- return validityState === 'valid';
2356
- }
2357
- /** Check validity and reveal validation state. */
2358
- async reportValidity() {
2359
- this.validateFormElement(this.nativeElement);
2360
- return this.validityState === 'valid';
2361
- }
2362
- /** Reset phone number input to its initial state */
2363
- async reset() {
2364
- this.onResetForm();
2365
- }
2366
- watchValueChange(value) {
2367
- this.updateValues(value);
2368
- this.validateFormElement(this.nativeElement);
2369
- }
2370
- handleDisabledChange() {
2371
- this.setCountryCodeElementAttributes({
2372
- 'disabled': `${!!this.disabled}`
2373
- });
2374
- }
2375
- handleRequiredChange() {
2376
- this.setCountryCodeElementAttributes({
2377
- 'required': `${!!this.required}`
2378
- });
2379
- }
2380
- handleReadonlyChange() {
2381
- this.setCountryCodeElementAttributes({
2382
- 'readonly': `${!!this.readonly}`
2383
- });
2384
- }
2385
- handleLabelChange() {
2386
- this.setCountryCodeElementAttributes({
2387
- 'label': this.countryCodeLabel
2388
- });
2389
- }
2390
- /** Identify wrapping form element */
2391
- get parentFormEl() {
2392
- return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
2393
- }
2394
- get countryCodeElement() {
2395
- return this.host.querySelector('r-select');
2396
- }
2397
- get countryCode() {
2398
- return this.host.querySelector('r-select').value || '';
2399
- }
2400
- get ariaDescribedBy() {
2401
- const describedBy = `${this.uniqueId}-message`;
2402
- return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
2403
- }
2404
- get hasError() {
2405
- var _a;
2406
- return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
2407
- }
2408
- get hasValidationError() {
2409
- var _a;
2410
- return this.validityState !== 'valid' && !!((_a = this.validityMessage) === null || _a === void 0 ? void 0 : _a.length);
2411
- }
2412
- get hasMessage() {
2413
- return this.hasError || this.hasValidationError;
2414
- }
2415
- get errorMessage() {
2416
- return this.hasError && this.error || this.hasValidationError && this.validityMessage;
2417
- }
2418
- /**
2419
- * Determine whether this element should be ignored
2420
- * during Constraint Validation API validation.
2421
- * */
2422
- get isNoValidate() {
2423
- var _a;
2424
- return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
2425
- this.novalidate ||
2426
- false);
2427
- }
2428
- updateValues(value) {
2429
- var _a, _b;
2430
- this.fullPhoneNumber = value || '';
2431
- if (!value) {
2432
- (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.reset();
2433
- this.phoneNumber = '';
2434
- return;
2435
- }
2436
- if (!this.getPhoneValidationResult(value).isValid) {
2437
- console.error('Provided phone number is not valid');
2438
- return;
2439
- }
2440
- const countryCode = this.getPhoneValidationResult(value).countryCode;
2441
- this.phoneNumber = value.replace(countryCode, '');
2442
- (_b = this.countryCodeElement) === null || _b === void 0 ? void 0 : _b.setValue(countryCode);
2443
- }
2444
- setCountryCodeElementAttributes(attributes) {
2445
- Object.entries(attributes || {}).forEach(([key, val]) => {
2446
- var _a, _b;
2447
- if (val === false || val === null || val === undefined) {
2448
- (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.removeAttribute(key);
2449
- }
2450
- else {
2451
- (_b = this.countryCodeElement) === null || _b === void 0 ? void 0 : _b.setAttribute(key, String(val));
2452
- }
2453
- });
2454
- }
2455
- getPhoneValidationResult(phoneNumber, countryCode = '') {
2456
- return distExports.phone(countryCode + phoneNumber, { validateMobilePrefix: false });
2457
- }
2458
- connectEventListeners() {
2459
- var _a, _b, _c, _d;
2460
- (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('rChange', this.handleValueChange);
2461
- (_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('formdata', this.contributeToFormData);
2462
- (_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('submit', this.onSubmitForm, { capture: true });
2463
- (_d = this.parentFormEl) === null || _d === void 0 ? void 0 : _d.addEventListener('reset', this.onResetForm);
2464
- }
2465
- disconnectEventListeners() {
2466
- var _a, _b, _c, _d;
2467
- (_a = this.countryCodeElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('rChange', this.handleValueChange);
2468
- (_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('formdata', this.contributeToFormData);
2469
- (_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('submit', this.onSubmitForm);
2470
- (_d = this.parentFormEl) === null || _d === void 0 ? void 0 : _d.removeEventListener('reset', this.onResetForm);
2471
- }
2472
- componentWillLoad() {
2473
- this.initial['value'] = this.value;
2474
- this.initial['invalid'] = this.invalid;
2475
- this.updateValues(this.value);
2476
- const staticAttributes = {
2477
- 'show-leading-icon': 'true',
2478
- 'leading-icon': 'globe',
2479
- 'placeholder': '+00',
2480
- 'internal': 'true'
2481
- };
2482
- const dynamicAttributes = {
2483
- 'disabled': `${!!this.disabled}`,
2484
- 'required': `${!!this.required}`,
2485
- 'readonly': `${!!this.readonly}`,
2486
- 'label': this.countryCodeLabel
2487
- };
2488
- this.setCountryCodeElementAttributes(Object.assign(Object.assign({}, staticAttributes), dynamicAttributes));
2489
- }
2490
- componentDidLoad() {
2491
- this.connectEventListeners();
2492
- }
2493
- disconnectedCallback() {
2494
- this.disconnectEventListeners();
2495
- }
2496
- render() {
2497
- const { label, fieldIndicator, hint, name, form, inputLabel, disabled, uniqueId, required, valid, invalid, novalidate, phoneNumber, fullPhoneNumber, fullWidth } = this;
2498
- const labelAttr = {
2499
- fieldIndicator
2500
- };
2501
- const inputAttrs = {
2502
- id: uniqueId,
2503
- form,
2504
- name,
2505
- novalidate,
2506
- required,
2507
- disabled,
2508
- 'aria-describedby': this.ariaDescribedBy
2509
- };
2510
- return (index.h(index.Host, { key: '609e5cd2c326c30866617a238f7c92bb8b2d5e8d' }, index.h("div", { key: '44eaa8f48fddbdc9dfe43700b4b68650345e1352', class: "r-input-phone-number--label-container" }, index.h("label", { key: 'fd55a14c4491ed6cad0885aaa5add8d827ae4215', id: `${uniqueId}-label` }, label &&
2511
- index.h("r-label", Object.assign({ key: 'bdeb1325cefaf4ac82628e497133c3eabfa685d3' }, labelAttr), label)), index.h("slot", { key: '38a4fd3c1f5ed0748ef9df0e2f6cd93ff8d1d39f', name: "popover" })), hint &&
2512
- index.h("r-hint", { key: '9fddd5b8053220e2339fe073cf1d897d0c34c23e', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: 'c493d4fe2f75cfa25fc404e985800175dfc75603', class: "r-input-phone-number", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.ariaDescribedBy }, index.h("slot", { key: 'ee98939143432df877ac2b7c2bbb7d87fd01f0a7' }), index.h("r-input", { key: '552c038f9225dd60b3b1957aaa1ceb3587c5f64d', label: inputLabel, value: phoneNumber, internal: true, valid: valid, invalid: invalid, required: required, readonly: this.readonly, novalidate: true, fullWidth: fullWidth, type: "tel", error: this.errorMessage || '', onRInput: this.handleOnInput, onRChange: this.handleInputOnChange, disabled: disabled })), index.h("input", Object.assign({ key: '11edb8cd2f8d6459ffbdef96263016ee25818fc0', type: "hidden" }, inputAttrs, { readonly: this.readonly, value: fullPhoneNumber, ref: el => this.nativeElement = el })), index.h("r-hint", { key: '809dbf93afc32271fd6d4930c0f547d8464b4db0', "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: "error" }, this.hasMessage ? (this.hasError ? this.error : this.validityMessage) : '')));
2513
- }
2514
- get host() { return index.getElement(this); }
2515
- static get watchers() { return {
2516
- "value": ["watchValueChange"],
2517
- "disabled": ["handleDisabledChange"],
2518
- "required": ["handleRequiredChange"],
2519
- "readonly": ["handleReadonlyChange"],
2520
- "label": ["handleLabelChange"]
2521
- }; }
2522
- };
2523
- InputPhoneNumber.style = inputPhoneNumberCss;
2524
-
2525
- exports.r_input_phone_number = InputPhoneNumber;