@riverty/web-components 6.3.0 → 6.3.1

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