@zonos/elements 1.3.285 → 1.3.287

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 (660) hide show
  1. package/README.md +9 -1
  2. package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
  3. package/dist/cjs/{cart-94908542.js → cart-CV4buPlT.js} +43 -30
  4. package/dist/cjs/{collect-0c05e2b4.js → collect-jzWKzrV7.js} +17 -113
  5. package/dist/cjs/debounce-5sZmmlCI.js +9 -0
  6. package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
  7. package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
  8. package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
  9. package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
  10. package/dist/cjs/{getMissingRequiredShippingFields-124b3f20.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
  11. package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
  12. package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
  13. package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
  14. package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
  15. package/dist/cjs/index.cjs.js +17 -21
  16. package/dist/cjs/{invoice-205fb5bc.js → invoice-CHw-mJdS.js} +6 -6
  17. package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
  18. package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
  19. package/dist/cjs/loader.cjs.js +3 -5
  20. package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
  21. package/dist/cjs/{paypal-45ca5301.js → paypal-BLuHeOJH.js} +10 -9
  22. package/dist/cjs/{placeTestOrder-302b6862.js → placeTestOrder-VK_CMeq0.js} +3 -3
  23. package/dist/cjs/{renderCheckoutCurrency-1b0cd5f2.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
  24. package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
  25. package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
  26. package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
  27. package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
  28. package/dist/cjs/throttle-BcxGntLr.js +87 -0
  29. package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
  30. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
  31. package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
  32. package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
  33. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
  34. package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
  35. package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
  36. package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
  37. package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
  38. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +101 -87
  39. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
  40. package/dist/cjs/zonos-checkout.cjs.entry.js +151 -37
  41. package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
  42. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
  43. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
  44. package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
  45. package/dist/cjs/zonos-component.cjs.entry.js +3 -6
  46. package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
  47. package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
  48. package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
  49. package/dist/cjs/zonos-elements.cjs.js +7 -7
  50. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
  51. package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
  52. package/dist/cjs/zonos-input.cjs.entry.js +10 -11
  53. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
  54. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
  55. package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
  56. package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
  57. package/dist/cjs/zonos-link.cjs.entry.js +3 -6
  58. package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
  59. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
  60. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
  61. package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
  62. package/dist/cjs/zonos-text.cjs.entry.js +8 -11
  63. package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
  64. package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
  65. package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
  66. package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
  69. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
  70. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
  71. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
  72. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
  73. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +21 -9
  74. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
  75. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
  76. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
  77. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
  78. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
  79. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +121 -18
  80. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
  81. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
  82. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
  83. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
  84. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
  85. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
  86. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
  87. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  88. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
  89. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
  90. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
  91. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
  92. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
  93. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
  94. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  95. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
  96. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
  97. package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
  98. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
  99. package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
  100. package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
  101. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
  102. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
  103. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  104. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
  105. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
  106. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  107. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
  108. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
  109. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
  110. package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
  111. package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
  112. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
  113. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
  114. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
  115. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
  116. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
  117. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
  118. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
  119. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
  120. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
  121. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
  122. package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
  123. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
  124. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  125. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
  126. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
  127. package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
  128. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
  129. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
  130. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
  131. package/dist/collection/components/main/zonos-controller.js +18 -10
  132. package/dist/collection/components/store/checkout/cart.js +14 -1
  133. package/dist/collection/components/store/checkout/stripe.js +1 -1
  134. package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
  135. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
  136. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
  137. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
  138. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
  139. package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
  140. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
  141. package/dist/collection/components/utils/validateCheckoutSession.js +11 -3
  142. package/dist/collection/scripts/cart/_setupCartData.js +2 -2
  143. package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
  144. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  145. package/dist/collection/types/generated/graphql.internal.types.js +76 -6
  146. package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
  147. package/dist/esm/{cart-2e407f7b.js → cart-ekBk_gxV.js} +42 -31
  148. package/dist/esm/{collect-19428e18.js → collect-33rMINDo.js} +17 -113
  149. package/dist/esm/debounce-D4ko2kvZ.js +403 -0
  150. package/dist/esm/debounce-DWPsxJsW.js +7 -0
  151. package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
  152. package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
  153. package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
  154. package/dist/esm/{getMissingRequiredShippingFields-719b206f.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
  155. package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
  156. package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
  157. package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
  158. package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
  159. package/dist/esm/index.js +20 -22
  160. package/dist/esm/{invoice-67a47785.js → invoice-BNDWuVsD.js} +6 -6
  161. package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
  162. package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
  163. package/dist/esm/loader.js +4 -4
  164. package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
  165. package/dist/esm/{paypal-6dca6567.js → paypal-CW1D2XqZ.js} +10 -9
  166. package/dist/esm/{placeTestOrder-9563c89a.js → placeTestOrder-nhmsLLOA.js} +3 -3
  167. package/dist/esm/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
  168. package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  169. package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
  170. package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
  171. package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
  172. package/dist/esm/throttle-D5GyA3yr.js +85 -0
  173. package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
  174. package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
  175. package/dist/esm/zonos-address-display_2.entry.js +13 -15
  176. package/dist/esm/zonos-address_4.entry.js +50 -38
  177. package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
  178. package/dist/esm/zonos-badge.entry.js +7 -8
  179. package/dist/esm/zonos-banner.entry.js +6 -7
  180. package/dist/esm/zonos-button_3.entry.js +18 -19
  181. package/dist/esm/zonos-card_5.entry.js +34 -33
  182. package/dist/esm/zonos-cart-items_12.entry.js +101 -85
  183. package/dist/esm/zonos-checkbox_2.entry.js +10 -12
  184. package/dist/esm/zonos-checkout.entry.js +151 -35
  185. package/dist/esm/zonos-collapse.entry.js +5 -6
  186. package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
  187. package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
  188. package/dist/esm/zonos-collect.entry.js +20 -21
  189. package/dist/esm/zonos-component.entry.js +3 -4
  190. package/dist/esm/zonos-controller.entry.js +13 -14
  191. package/dist/esm/zonos-country-flag.entry.js +8 -9
  192. package/dist/esm/zonos-country-select_4.entry.js +68 -55
  193. package/dist/esm/zonos-elements.js +6 -5
  194. package/dist/esm/zonos-hello-dialog.entry.js +22 -21
  195. package/dist/esm/zonos-hello.entry.js +19 -15
  196. package/dist/esm/zonos-input.entry.js +10 -9
  197. package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
  198. package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
  199. package/dist/esm/zonos-invoice.entry.js +19 -20
  200. package/dist/esm/zonos-language-select_2.entry.js +11 -13
  201. package/dist/esm/zonos-link.entry.js +3 -4
  202. package/dist/esm/zonos-logo.entry.js +6 -7
  203. package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
  204. package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
  205. package/dist/esm/zonos-stripe-input.entry.js +15 -12
  206. package/dist/esm/zonos-text.entry.js +8 -9
  207. package/dist/esm/zonos-tooltip.entry.js +4 -5
  208. package/dist/esm/zonos-v-stack.entry.js +6 -7
  209. package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
  210. package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
  211. package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
  212. package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
  213. package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
  214. package/dist/esm-es5/classes-BJHSB96f.js +10 -0
  215. package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
  216. package/dist/esm-es5/collect-33rMINDo.js +241 -0
  217. package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
  218. package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
  219. package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
  220. package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
  221. package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
  222. package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
  223. package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
  224. package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
  225. package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
  226. package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
  227. package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
  228. package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
  229. package/dist/esm-es5/index-_lt63o7c.js +162 -0
  230. package/dist/esm-es5/index.js +227 -1
  231. package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
  232. package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
  233. package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
  234. package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
  235. package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
  236. package/dist/esm-es5/loader.js +1 -1
  237. package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
  238. package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
  239. package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
  240. package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
  241. package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  242. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
  243. package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
  244. package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
  245. package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
  246. package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
  247. package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
  248. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
  249. package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
  250. package/dist/esm-es5/zonos-address_4.entry.js +179 -1
  251. package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
  252. package/dist/esm-es5/zonos-badge.entry.js +25 -1
  253. package/dist/esm-es5/zonos-banner.entry.js +7 -1
  254. package/dist/esm-es5/zonos-button_3.entry.js +116 -1
  255. package/dist/esm-es5/zonos-card_5.entry.js +33 -1
  256. package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
  257. package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
  258. package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
  259. package/dist/esm-es5/zonos-collapse.entry.js +15 -1
  260. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
  261. package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
  262. package/dist/esm-es5/zonos-collect.entry.js +171 -1
  263. package/dist/esm-es5/zonos-component.entry.js +10 -1
  264. package/dist/esm-es5/zonos-controller.entry.js +198 -1
  265. package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
  266. package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
  267. package/dist/esm-es5/zonos-elements.js +4 -1
  268. package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
  269. package/dist/esm-es5/zonos-hello.entry.js +121 -1
  270. package/dist/esm-es5/zonos-input.entry.js +16 -1
  271. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
  272. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
  273. package/dist/esm-es5/zonos-invoice.entry.js +115 -1
  274. package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
  275. package/dist/esm-es5/zonos-link.entry.js +4 -1
  276. package/dist/esm-es5/zonos-logo.entry.js +7 -1
  277. package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
  278. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
  279. package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
  280. package/dist/esm-es5/zonos-text.entry.js +24 -1
  281. package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
  282. package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
  283. package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
  284. package/dist/scripts/index.d.ts +1167 -514
  285. package/dist/scripts/index.js +1 -1
  286. package/dist/scripts/loadZonos.js +1 -1
  287. package/dist/scripts/zonos.js +1 -1
  288. package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
  289. package/dist/types/__tests__/vitest-globals.d.ts +1 -0
  290. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +14 -0
  291. package/dist/types/components/store/checkout/cart.d.ts +19 -10
  292. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
  293. package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
  294. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
  295. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
  296. package/dist/types/components.d.ts +797 -147
  297. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +124 -124
  298. package/dist/types/stencil-public-runtime.d.ts +205 -12
  299. package/dist/types/types/generated/graphql.frontend.types.d.ts +62 -60
  300. package/dist/types/types/generated/graphql.frontend.types.ts +57 -55
  301. package/dist/types/types/generated/graphql.internal.types.d.ts +1346 -1251
  302. package/dist/types/types/generated/graphql.internal.types.ts +1187 -1075
  303. package/dist/zonos-elements/index.esm.js +1 -1
  304. package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
  305. package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
  306. package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
  307. package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
  308. package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
  309. package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
  310. package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
  311. package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
  312. package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
  313. package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
  314. package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
  315. package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
  316. package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
  317. package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
  318. package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
  319. package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
  320. package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
  321. package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
  322. package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
  323. package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
  324. package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
  325. package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
  326. package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
  327. package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
  328. package/dist/zonos-elements/p-629f09dc.system.entry.js +171 -0
  329. package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
  330. package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
  331. package/dist/zonos-elements/p-6f742021.entry.js +1 -0
  332. package/dist/zonos-elements/p-7681798d.entry.js +1 -0
  333. package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
  334. package/dist/zonos-elements/{p-b1e95f95.entry.js → p-7ae48e31.entry.js} +1 -1
  335. package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
  336. package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
  337. package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
  338. package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
  339. package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
  340. package/dist/zonos-elements/p-9818f823.entry.js +1 -0
  341. package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
  342. package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
  343. package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
  344. package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
  345. package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
  346. package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
  347. package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
  348. package/dist/zonos-elements/p-BJufDgh3.js +1 -0
  349. package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
  350. package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
  351. package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
  352. package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
  353. package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
  354. package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
  355. package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
  356. package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
  357. package/dist/zonos-elements/p-C19J2XSh.js +1 -0
  358. package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
  359. package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
  360. package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
  361. package/dist/zonos-elements/p-CICjAi70.js +1 -0
  362. package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
  363. package/dist/zonos-elements/{p-e5c76a9b.js → p-CJCoACvU.js} +2 -2
  364. package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
  365. package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
  366. package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
  367. package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
  368. package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
  369. package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
  370. package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
  371. package/dist/zonos-elements/p-CaAod213.system.js +8 -0
  372. package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
  373. package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
  374. package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
  375. package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
  376. package/dist/zonos-elements/p-D0erXw7p.js +1 -0
  377. package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
  378. package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
  379. package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
  380. package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
  381. package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
  382. package/dist/zonos-elements/p-DHwpNxG9.js +1 -0
  383. package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
  384. package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
  385. package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
  386. package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
  387. package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
  388. package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
  389. package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
  390. package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
  391. package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
  392. package/dist/zonos-elements/p-Dw-5yD9y.system.js +227 -0
  393. package/dist/zonos-elements/{p-46cd14e5.js → p-LypTHRUC.js} +1 -1
  394. package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
  395. package/dist/zonos-elements/p-YdrG78th.js +1 -0
  396. package/dist/zonos-elements/p-_lt63o7c.js +3 -0
  397. package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
  398. package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
  399. package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
  400. package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
  401. package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
  402. package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
  403. package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
  404. package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
  405. package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
  406. package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
  407. package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
  408. package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
  409. package/dist/zonos-elements/{p-bced320e.entry.js → p-cdffc9b6.entry.js} +1 -1
  410. package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
  411. package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
  412. package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
  413. package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
  414. package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
  415. package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
  416. package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
  417. package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
  418. package/dist/zonos-elements/{p-8311edc7.entry.js → p-e9320825.entry.js} +1 -1
  419. package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
  420. package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
  421. package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
  422. package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
  423. package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
  424. package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
  425. package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
  426. package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
  427. package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
  428. package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
  429. package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
  430. package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
  431. package/dist/zonos-elements/p-pfIceXbY.js +1 -0
  432. package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
  433. package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
  434. package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
  435. package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
  436. package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
  437. package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
  438. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  439. package/dist/zonos-elements/zonos-elements.js +1 -1
  440. package/loader/index.d.ts +1 -1
  441. package/package.json +28 -32
  442. package/dist/cjs/RemoveIcon-081ac073.js +0 -5
  443. package/dist/cjs/debounce-7ca3c878.js +0 -357
  444. package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
  445. package/dist/cjs/throttle-366c204b.js +0 -76
  446. package/dist/cjs/zonosStore-0af0b937.js +0 -3030
  447. package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
  448. package/dist/esm/debounce-84ade9c2.js +0 -355
  449. package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
  450. package/dist/esm/throttle-c4c24e86.js +0 -74
  451. package/dist/esm/zonosStore-eca1e364.js +0 -3017
  452. package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
  453. package/dist/esm-es5/cart-2e407f7b.js +0 -1
  454. package/dist/esm-es5/classes-0d95c529.js +0 -1
  455. package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
  456. package/dist/esm-es5/collect-19428e18.js +0 -1
  457. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
  458. package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
  459. package/dist/esm-es5/debounce-84ade9c2.js +0 -1
  460. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
  461. package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
  462. package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
  463. package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
  464. package/dist/esm-es5/getMissingRequiredShippingFields-719b206f.js +0 -1
  465. package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
  466. package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
  467. package/dist/esm-es5/helpers-2f6955b1.js +0 -1
  468. package/dist/esm-es5/index-cfd394c8.js +0 -13
  469. package/dist/esm-es5/invoice-67a47785.js +0 -1
  470. package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
  471. package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
  472. package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
  473. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
  474. package/dist/esm-es5/localization-36a4dc22.js +0 -1
  475. package/dist/esm-es5/paypal-6dca6567.js +0 -17
  476. package/dist/esm-es5/placeTestOrder-9563c89a.js +0 -1
  477. package/dist/esm-es5/renderCheckoutCurrency-282384f0.js +0 -1
  478. package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
  479. package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
  480. package/dist/esm-es5/styles-6fc2fad9.js +0 -1
  481. package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
  482. package/dist/esm-es5/throttle-c4c24e86.js +0 -1
  483. package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
  484. package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
  485. package/dist/zonos-elements/p-01174496.system.js +0 -1
  486. package/dist/zonos-elements/p-06f798ee.system.js +0 -1
  487. package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
  488. package/dist/zonos-elements/p-08e7107d.js +0 -1
  489. package/dist/zonos-elements/p-0b29169b.js +0 -1
  490. package/dist/zonos-elements/p-0c9fec73.js +0 -1
  491. package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
  492. package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
  493. package/dist/zonos-elements/p-0ff845ec.js +0 -1
  494. package/dist/zonos-elements/p-1277abac.system.entry.js +0 -1
  495. package/dist/zonos-elements/p-14afffa8.system.js +0 -1
  496. package/dist/zonos-elements/p-1834f486.js +0 -1
  497. package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
  498. package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
  499. package/dist/zonos-elements/p-1b8771bb.js +0 -1
  500. package/dist/zonos-elements/p-1cdd27ec.js +0 -1
  501. package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
  502. package/dist/zonos-elements/p-22e10b7d.entry.js +0 -1
  503. package/dist/zonos-elements/p-23e7c655.system.js +0 -1
  504. package/dist/zonos-elements/p-260ad739.system.entry.js +0 -1
  505. package/dist/zonos-elements/p-2670438c.system.js +0 -1
  506. package/dist/zonos-elements/p-27660512.js +0 -1
  507. package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
  508. package/dist/zonos-elements/p-2b8c96e3.system.js +0 -1
  509. package/dist/zonos-elements/p-2b97f7ed.js +0 -1
  510. package/dist/zonos-elements/p-2bbe9d91.js +0 -1
  511. package/dist/zonos-elements/p-2c2afed4.entry.js +0 -1
  512. package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
  513. package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
  514. package/dist/zonos-elements/p-2cdd1b49.system.entry.js +0 -1
  515. package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
  516. package/dist/zonos-elements/p-398d9022.system.js +0 -1
  517. package/dist/zonos-elements/p-3a13e58c.system.js +0 -1
  518. package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
  519. package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
  520. package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
  521. package/dist/zonos-elements/p-4a20893e.system.js +0 -1
  522. package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
  523. package/dist/zonos-elements/p-502d6eeb.js +0 -1
  524. package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
  525. package/dist/zonos-elements/p-551fa762.system.js +0 -1
  526. package/dist/zonos-elements/p-5a491f28.js +0 -1
  527. package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
  528. package/dist/zonos-elements/p-5ebb7ae6.entry.js +0 -1
  529. package/dist/zonos-elements/p-60832726.system.js +0 -1
  530. package/dist/zonos-elements/p-60a6b71d.system.js +0 -1
  531. package/dist/zonos-elements/p-62f6a757.entry.js +0 -1
  532. package/dist/zonos-elements/p-65c1f51e.entry.js +0 -1
  533. package/dist/zonos-elements/p-6695de06.system.js +0 -1
  534. package/dist/zonos-elements/p-67426156.system.js +0 -1
  535. package/dist/zonos-elements/p-6890e060.system.js +0 -1
  536. package/dist/zonos-elements/p-6dde1e85.system.entry.js +0 -1
  537. package/dist/zonos-elements/p-7176f582.entry.js +0 -1
  538. package/dist/zonos-elements/p-7261e245.system.js +0 -13
  539. package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
  540. package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
  541. package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
  542. package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
  543. package/dist/zonos-elements/p-8a6c4017.js +0 -1
  544. package/dist/zonos-elements/p-8b298971.system.entry.js +0 -1
  545. package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
  546. package/dist/zonos-elements/p-8bfe5b2b.entry.js +0 -1
  547. package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
  548. package/dist/zonos-elements/p-916228fb.system.js +0 -1
  549. package/dist/zonos-elements/p-94722bf6.system.entry.js +0 -1
  550. package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
  551. package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
  552. package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
  553. package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
  554. package/dist/zonos-elements/p-a07e5011.entry.js +0 -1
  555. package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
  556. package/dist/zonos-elements/p-a553e132.js +0 -1
  557. package/dist/zonos-elements/p-a9ad74e5.system.entry.js +0 -1
  558. package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
  559. package/dist/zonos-elements/p-ae0de3e4.entry.js +0 -1
  560. package/dist/zonos-elements/p-aecb5d61.entry.js +0 -1
  561. package/dist/zonos-elements/p-af19722c.system.js +0 -1
  562. package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
  563. package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
  564. package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
  565. package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
  566. package/dist/zonos-elements/p-c1631c9c.js +0 -1
  567. package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
  568. package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
  569. package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
  570. package/dist/zonos-elements/p-cb49dcfe.entry.js +0 -1
  571. package/dist/zonos-elements/p-cb4cb5a3.system.js +0 -1
  572. package/dist/zonos-elements/p-ce75b047.js +0 -2
  573. package/dist/zonos-elements/p-d20fe2c2.system.entry.js +0 -1
  574. package/dist/zonos-elements/p-d42bd250.system.entry.js +0 -1
  575. package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
  576. package/dist/zonos-elements/p-d938f42f.system.js +0 -1
  577. package/dist/zonos-elements/p-dc80cb87.js +0 -1
  578. package/dist/zonos-elements/p-dd3c00d6.system.entry.js +0 -1
  579. package/dist/zonos-elements/p-de58684b.system.js +0 -1
  580. package/dist/zonos-elements/p-e160b75f.js +0 -1
  581. package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
  582. package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
  583. package/dist/zonos-elements/p-e2b4c082.system.entry.js +0 -1
  584. package/dist/zonos-elements/p-e32ee011.system.entry.js +0 -1
  585. package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
  586. package/dist/zonos-elements/p-e8587f9f.system.entry.js +0 -1
  587. package/dist/zonos-elements/p-eb5f3451.system.js +0 -18
  588. package/dist/zonos-elements/p-ebbda085.system.js +0 -1
  589. package/dist/zonos-elements/p-f4720b0a.js +0 -1
  590. package/dist/zonos-elements/p-f4acce01.js +0 -1
  591. package/dist/zonos-elements/p-f59a0129.system.entry.js +0 -1
  592. package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
  593. package/dist/zonos-elements/p-fe5f05fc.system.js +0 -1
  594. package/dist/zonos-elements/p-ff4e6811.entry.js +0 -1
  595. package/loader/package.json +0 -11
  596. /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
  597. /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
  598. /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
  599. /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
  600. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  601. /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
  602. /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
  603. /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
  604. /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
  605. /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
  606. /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
  607. /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
  608. /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
  609. /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
  610. /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
  611. /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
  612. /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
  613. /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
  614. /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  615. /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  616. /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
  617. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  618. /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
  619. /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
  620. /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
  621. /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
  622. /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
  623. /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
  624. /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  625. /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  626. /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
  627. /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  628. /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
  629. /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
  630. /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
  631. /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  632. /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  633. /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  634. /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  635. /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  636. /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  637. /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
  638. /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
  639. /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
  640. /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
  641. /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
  642. /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
  643. /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
  644. /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
  645. /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
  646. /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
  647. /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
  648. /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
  649. /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
  650. /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
  651. /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
  652. /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
  653. /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
  654. /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  655. /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
  656. /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
  657. /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
  658. /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
  659. /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
  660. /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
@@ -0,0 +1,2966 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,o){function d(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function i(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?n(e.value):d(e.value).then(i,s)}a((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,d,r,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=s(0),i["throw"]=s(1),i["return"]=s(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return a([e,t])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(n=0)),n)try{if(o=1,d&&(r=s[0]&2?d["return"]:s[0]?d["throw"]||((r=d["return"])&&r.call(d),0):d.next)&&!(r=r.call(d,s[1])).done)return r;if(d=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;d=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){n.label=s[1];break}if(s[0]===6&&n.label<r[1]){n.label=r[1];r=s;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(s);break}if(r[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];d=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var o=0,d=t.length,r;o<d;o++){if(r||!(o in t)){if(!r)r=Array.prototype.slice.call(t,0,o);r[o]=t[o]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-CIevpRv_.system.js","./p-DIJaXkiE.system.js","./p-CPnR_T0a.system.js","./p-D31lQiWo.system.js","./p-C2j7R11h.system.js","./p-DPW1yXt9.system.js","./p-0D0aCMu6.system.js","./p-BgSx82zO.system.js","./p-BSgVcCxT.system.js","./p-CZl1nwqv.system.js","./p-zVLAvre1.system.js","./p-Bi-s0fp_.system.js","./p-BbgqQIHv.system.js","./p-Cby4EkFu.system.js","./p-d05Ku7gM.system.js","./p-DW-fW8yR.system.js","./p-CaUXHglQ.system.js","./p-C29tlYn0.system.js"],(function(e){"use strict";var t,n,o,d,r,i,s,a,u,l,$,f,c,h,p,v,b,y,m,g,z,w,x,k,C,S,O,E,N,I,A;return{setters:[function(e){t=e.r;n=e.d;o=e.h;d=e.a;r=e.g},function(e){i=e.t;s=e.s;a=e.y;u=e.l},function(e){l=e.z;$=e.a},function(e){f=e.M},function(e){c=e.c},function(e){h=e.U;p=e.b;v=e.w;b=e.t},function(e){y=e.R},function(e){m=e.i;g=e.c},function(e){z=e.g},function(e){w=e.t},function(e){x=e.i},function(e){k=e.a;C=e.s},function(e){S=e.l},function(e){O=e.c;E=e.s},function(e){N=e.i;I=e.a},function(e){A=e.i},null,null],execute:function(){var j=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}"};var T=e("zonos_address_completion_dialog",/** @class */function(){function e(e){var d=this;t(this,e);this.closeCompletionDialog=n(this,"closeCompletionDialog",7);this.completionSubmit=n(this,"completionSubmit",7);
2
+ /**
3
+ * Whether or not the continue button is loading
4
+ */this.continueLoading=false;
5
+ /**
6
+ * Whether or not the dialog is open
7
+ */this.dialogOpen=false;
8
+ /**
9
+ * Whether or not the dialog is rendered in mobile mode
10
+ */this.isMobile=false;
11
+ /**
12
+ * The Zonos-required fields still missing from the selected address
13
+ */this.missingFields=[];
14
+ /**
15
+ * Local values for the captured fields, keyed by the missing field key
16
+ */this.values={};
17
+ /**
18
+ * Whether to show validation errors (after a submit attempt with empty fields)
19
+ */this.showError=false;this.isFieldMissing=function(e){return d.missingFields.some((function(t){return t.key===e}))};
20
+ /**
21
+ * A captured field is valid when it has a value. Postal code additionally enforces the same
22
+ * minimum length as the landed-cost readiness / detection check, so the dialog can't emit a
23
+ * too-short postal code that would still be considered "missing" downstream.
24
+ */this.isFieldValid=function(e){var t,n,o;if(e==="postal_code"){return((n=(t=d.values.postal_code)===null||t===void 0?void 0:t.trim().length)!==null&&n!==void 0?n:0)>=f}return!!((o=d.values[e])===null||o===void 0?void 0:o.trim())};this.getFieldError=function(e){return d.showError&&!d.isFieldValid(e)};this.updateValue=function(e,t){var n;d.values=Object.assign(Object.assign({},d.values),(n={},n[e]=t,n));
25
+ // Once the customer starts fixing the fields, re-evaluate whether errors remain
26
+ if(d.showError){d.showError=!d.isComplete()}};this.isComplete=function(){return d.missingFields.every((function(e){
27
+ // A missing last name also requires a first name (both are edited together).
28
+ if(e.key==="lastName"){return d.isFieldValid("firstName")&&d.isFieldValid("lastName")}return d.isFieldValid(e.key)}))};this.submitHandler=function(){if(!d.isComplete()){d.showError=true;return}d.completionSubmit.emit(d.values)};this.renderInput=function(e){var t=e.key,n=e.label;return o("zonos-input",{class:"zonos--completion-input zonos--completion-".concat(t),inputLabel:n,inputValue:d.values[t]||"",isError:d.getFieldError(t),onInputChange:function(e){return d.updateValue(t,e.detail)}})};this.renderField=function(e,t){if(!d.isFieldMissing(e)){return null}return d.renderInput({key:e,label:t})};
29
+ /**
30
+ * When the last name is missing, render both first and last name inputs so the customer can
31
+ * correct the full name together (Link's single name input often yields only a first name).
32
+ */this.renderNameFields=function(){if(!d.isFieldMissing("lastName")){return null}return o("div",{class:"zonos--completion-name-row"},d.renderInput({key:"firstName",label:i("First name")}),d.renderInput({key:"lastName",label:i("Last name")}))}}
33
+ /**
34
+ * The dialog stays mounted, so clear any previously-entered values whenever it opens.
35
+ * Without this, values typed for one address could be reapplied to a different address
36
+ * the next time the dialog opens.
37
+ */
38
+ // Only reset on open, not on `shippingAddress`: the parent rebuilds that prop object on
39
+ // every render, and watching it would wipe in-progress input while the dialog is open.
40
+ e.prototype.watchDialogOpen=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(o){switch(o.label){case 0:if(!e)return[3/*break*/,2];
41
+ // Wait for shippingAddress prop to be updated before resetting the values
42
+ return[4/*yield*/,new Promise((function(e){return setTimeout(e,100)}))];case 1:
43
+ // Wait for shippingAddress prop to be updated before resetting the values
44
+ o.sent();n=h({name:(t=this.shippingAddress)===null||t===void 0?void 0:t.name}).firstName;this.values=this.isFieldMissing("lastName")?{firstName:n}:{};this.showError=false;o.label=2;case 2:return[2/*return*/]}}))}))};e.prototype.render=function(){var e=this;var t=this.submitBtnColor||l.appearance.colorSecondary;
45
+ // dialog background is white, so a white button needs an outline to stay visible
46
+ var n=t==="#ffffff"?"outline":this.submitBtnType||"standard";return o(d,{key:"9a89376022ebd8f5793882fb13a3502deca001f8",class:c(["zonos--address-completion-dialog zonos--elements",this.isMobile&&"mobile"])},o("zonos-dialog",{key:"00ff3912a7bf8d021441440f0de2825b49f7b78e",isLoading:false,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeCompletionDialog.emit()},open:this.dialogOpen,width:"568px"},o("div",{key:"1ba1cd333bd1f362a77f1f114ac50c309ed5ccd6",class:"zonos--body"},o("div",{key:"ccf9f54ff4b26e5443ff5c8276e5c5d36aac332b",class:"zonos--dialog-header"},o("div",{key:"01e073aa559c4040a6599aefb3bf8cb967928929",class:"zonos--dialog-title"},o("zonos-text",{key:"8472a72f6274646bb87d150c82722f93c861ae72",type:"title"},i("Complete your shipping address")),o("zonos-button",{key:"e9a6c2cbc3d64bf87e94850c1126119687f75e7d",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close checkout dialog",content:y}),noBackground:true,onClick:function(){return e.closeCompletionDialog.emit()},title:"Close checkout dialog"})),o("zonos-text",{key:"c9ff785b746810f0c266071ee9a3f433ad645a2b"},i("This saved address is missing information required to ship internationally. Please add the details below."))),o("div",{key:"86e2b0da7dbcd1370b80fc8c53e8a7de4c11ed74",class:"zonos--group"},o("div",{key:"1542bb7f0b9df16f5ce36d38dc9408a1b3e836a7",class:"zonos--selected-address"},o("zonos-text",{key:"2572e3e44a9c81f6694e4939de39951ec659c8fa",class:"zonos--selected-label",type:"semiBoldLabel"},i("Selected address")),o("zonos-address-display",{key:"8781622b3d057cfbdba59e13d5fabf76f3a7a7dd",addressType:"shipping",currentAddress:this.shippingAddress})),o("div",{key:"ac3a5f6566c2179045a784b661b7e82c7b371a3f",class:"zonos--completion-fields"},this.renderNameFields(),this.renderField("state",i("State/Province")),this.renderField("postal_code",i("Postal code")))),o("div",{key:"1007d7f6c671fbd94dd3027332d2d7ac1edeef6e",class:"zonos--group-btn"},o("div",{key:"22fe2c8d03d7b3c680eea2b4afebf1868b5b6c0b",class:"zonos--button-wrapper"},o("zonos-button",{key:"dbcf1aa175992bff762ecc36108bf94090b7df0e",class:"zonos--cancel-btn",onClick:function(){return e.closeCompletionDialog.emit()},variant:"subtle"},i("Cancel")),o("zonos-button",{key:"63b0f966565e86ea9bac640b2fa690287c94b11f",backgroundColor:this.submitBtnColor,class:"zonos--submit-btn",loading:this.continueLoading,onClick:function(){return e.submitHandler()},size:"sm",variant:n},i("Save and continue")))))))};Object.defineProperty(e,"watchers",{get:function(){return{dialogOpen:[{watchDialogOpen:0}]}},enumerable:false,configurable:true});return e}());T.style=j();var L=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:20px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:20px;-ms-flex-direction:column;flex-direction:column;margin:1px}:host .zonos--contact{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--address-row>*{-ms-flex:1;flex:1}:host .zonos--address{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}"};var P=e("zonos_address_form",/** @class */function(){function e(e){var o=this;t(this,e);this.addressChange=n(this,"addressChange",7);
47
+ /**
48
+ * Local address to update
49
+ */this.localAddress=this.currentAddress;this.onInputChange=function(e){var t;var n=e.key,d=e.value;o.addressChange.emit(Object.assign(Object.assign({},o.localAddress),(t={},t[n]=d,t)))}}e.prototype.watchCurrentAddress=function(){var e,t,n,o,d,r;var i=this.currentAddress,s=i.city,a=i.line1,u=i.line2,l=i.name,$=i.postal_code,f=i.state;
50
+ // Update the local address when the current address changes
51
+ // If translated address is available, use that instead
52
+ this.localAddress=Object.assign(Object.assign({},this.currentAddress),{city:((e=this.translatedAddress.city)===null||e===void 0?void 0:e[s])||s,line1:((t=this.translatedAddress.line1)===null||t===void 0?void 0:t[a])||a,line2:((n=this.translatedAddress.line2)===null||n===void 0?void 0:n[u])||u,name:((o=this.translatedAddress.name)===null||o===void 0?void 0:o[l])||l,postal_code:((d=this.translatedAddress.postal_code)===null||d===void 0?void 0:d[$])||$,state:((r=this.translatedAddress.state)===null||r===void 0?void 0:r[f])||f})};e.prototype.componentWillLoad=function(){this.watchCurrentAddress()};e.prototype.render=function(){var e=this;var t=this.localAddress,n=t.city,r=t.country,s=t.line1,a=t.line2,u=t.name,l=t.phone,$=t.postal_code,f=t.state;var c=h({name:u}),p=c.firstName,v=c.lastName;return o(d,{key:"44edb799473e427b08e17d6d20f08a028a3cc688",class:"zonos--address-form zonos--elements"},o("div",{key:"99c2d5b58464bebd7bb3e5c2a4ac3aa04d80b47f",class:"zonos--title"},o("zonos-text",{key:"5a86048c7d768b795db1416182e2b22458924601",textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?i("Shipping"):i("Billing"))),o("div",{key:"a907058d970cb6674b403f79c0946e36a0e61f69",class:"zonos--address-group"},o("div",{key:"fad2f71614c6963015f95e74e297c58a4adee95b",class:"zonos--contact"},o("zonos-text",{key:"0c661050b1b95da56af1046fac39c7fa6de18685",type:"label"},i("Contact")),o("zonos-input",{key:"3e35a5f9d4bca373ef9403da0de53ea895aca61f",class:"zonos--form-email",inputLabel:i("Email"),inputValue:this.currentAddress.email,isDisabled:true}),o("div",{key:"093cdcc771b4ade381a392a1023d9d037d4e3e35",class:"zonos--name zonos--address-row"},o("zonos-input",{key:"e9d957551070a855179b78da655beaf3b4e731e2",class:"zonos--form-first-name",inputLabel:i("First name"),inputValue:p,isError:m(p),onInputChange:function(t){return e.onInputChange({key:"name",value:"".concat(t.detail," ").concat(v)})}}),o("zonos-input",{key:"0b86805e872607d367446f5e6ef074974f9840c2",class:"zonos--form-last-name",inputLabel:i("Last name"),inputValue:v,isError:m(v),onInputChange:function(t){return e.onInputChange({key:"name",value:"".concat(p," ").concat(t.detail)})}}))),o("div",{key:"6447f55e8d173d18cd46cba829527c4d487631a2",class:"zonos--address"},o("zonos-text",{key:"18ef146cc44f658524c6535e851281b62249fa26",type:"label"},i("Address")),o("zonos-input",{key:"95cfb115c4304e8a142ab2e952fc8c4bfbe39e43",class:"zonos--form-country",inputLabel:i("Country"),inputValue:r,isDisabled:true}),o("zonos-input",{key:"e3774713ec0b0e861981aa9f2c62f6749125e174",class:"zonos--form-line1",inputLabel:i("Address line 1"),inputValue:s,isError:m(s),onInputChange:function(t){return e.onInputChange({key:"line1",value:t.detail})}}),o("zonos-input",{key:"0d1fce85ad42e42b266ad411d4e3a96e4b8b8bf3",class:"zonos--form-line2",inputLabel:i("Address line 2"),inputValue:a,isError:m(a),onInputChange:function(t){return e.onInputChange({key:"line2",value:t.detail})}}),o("div",{key:"5d5e740b711ff65a0366a6c4891f22684f32c74b",class:"zonos--address-row"},o("zonos-input",{key:"8f124a91865c59096ba5c624ec229a3d1545c985",class:"zonos--form-city",inputLabel:i("City"),inputValue:n,isError:m(n),onInputChange:function(t){return e.onInputChange({key:"city",value:t.detail})}}),this.currentAddress.state&&o("zonos-input",{key:"50e852953ba88573929a200bce4c67fab2146245",class:"zonos--form-state",inputLabel:i("State/Province"),inputValue:f,isError:m(f),onInputChange:function(t){return e.onInputChange({key:"state",value:t.detail})}})),o("zonos-input",{key:"74c17f1d1a77af3f90100a6832b2c8fe7bdca24e",class:"zonos--form-postal-code",inputLabel:i("Postal code"),inputValue:$,isError:m($),onInputChange:function(t){return e.onInputChange({key:"postal_code",value:t.detail})}}),o("zonos-input",{key:"20775c4a944fe9305446898109637e5b38229a1d",class:"zonos--form-phone",inputLabel:i("Phone number"),inputValue:l,onInputChange:function(t){return e.onInputChange({key:"phone",value:t.detail})}}))))};Object.defineProperty(e,"watchers",{get:function(){return{translatedAddress:[{watchCurrentAddress:0}]}},enumerable:false,configurable:true});return e}());P.style=L();var M='<svg color="var(--zonos-elements-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var R=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:relative}:host .wrapper{position:absolute;margin-top:4px;top:100%;left:0;right:0;z-index:3;max-height:300px;overflow-y:auto;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));-webkit-box-shadow:var(--zonos-elements-shadow-select-active);box-shadow:var(--zonos-elements-shadow-select-active);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;list-style:none;padding:0;background-color:var(--zonos-elements-surface-color)}:host .wrapper .option{padding:8px;background-color:var(--zonos-elements-surface-color);outline:none;border:none;text-align:left}:host .wrapper .option.last-hovered{background-color:var(--zonos-elements-gray-100)}:host .wrapper .option .highlight{font-weight:600;color:var(--zonos-elements-gray-1000)}:host .wrapper>.powered-by{padding:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}:host .wrapper>.powered-by .powered-by-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;gap:5px;-ms-flex:1;flex:1}:host .wrapper>.suggestion{cursor:pointer}:host .wrapper>.suggestion:hover{background-color:var(--zonos-elements-gray-100)}"};var _=e("zonos_address_suggestions",/** @class */function(){function e(e){var o=this;t(this,e);this.suggestionSelected=n(this,"suggestionSelected",7);
53
+ /**
54
+ * Suggestions to display
55
+ */this.suggestions=[];
56
+ /**
57
+ * Selected suggestion id
58
+ */this.selectedSuggestionId=null;
59
+ /**
60
+ * Local suggestions to display
61
+ */this.localSuggestions=[];this.lastHoveredSuggestionId=null;
62
+ /**
63
+ * Handle clicks outside of the suggestions component
64
+ */this.handleClickOutside=function(e){if(!o.el.contains(e.target)){o.localSuggestions=[]}}}e.prototype.suggestionsChanged=function(){var e,t;this.localSuggestions=this.suggestions;
65
+ // set last hovered suggestion id to the first suggestion id
66
+ this.lastHoveredSuggestionId=(t=(e=this.suggestions[0])===null||e===void 0?void 0:e.id)!==null&&t!==void 0?t:null};e.prototype.componentDidLoad=function(){document.addEventListener("click",this.handleClickOutside)};e.prototype.disconnectedCallback=function(){document.removeEventListener("click",this.handleClickOutside)};
67
+ /**
68
+ * Split text into segments based on matches array for highlighting
69
+ */e.prototype.getHighlightedText=function(e,t){if(!(t===null||t===void 0?void 0:t.length))return[{isMatch:false,text:e}];var n=[];var o=0;
70
+ // Sort matches by startOffset to process in order
71
+ var d=__spreadArray([],t,true).sort((function(e,t){return e.startOffset-t.startOffset}));d.forEach((function(t){
72
+ // Add non-matching segment before match if exists
73
+ if(t.startOffset>o){n.push({isMatch:false,text:e.slice(o,t.startOffset)})}
74
+ // Add matching segment
75
+ n.push({isMatch:true,text:e.slice(t.startOffset,t.endOffset)});o=t.endOffset}));
76
+ // Add remaining non-matching text if exists
77
+ if(o<e.length){n.push({isMatch:false,text:e.slice(o)})}return n};e.prototype.render=function(){var e=this;return o(d,{key:"9de4179f1bd0057ac71d6b9ed646c034035382f7",class:"zonos--address-suggestions",role:"group",style:{"--zonos--border-radius":z()}},o("ul",{key:"62fa5ed92fafcdd641f9a7eb36e36e62309c9f52","aria-label":"Suggestions",class:"wrapper",role:"listbox"},!!this.localSuggestions.length&&o("li",{key:"27c61b5693720d0b33a75385841476787f92b884","aria-selected":false,class:"powered-by option",role:"option"},o("div",{key:"fea9f2e8f65cd50fdf28fc45e18beb8976320f0d",class:"powered-by-container"},o("zonos-text",{key:"1fec46f543e3673433b6924f7dca1cbd84e0ef16",type:"caption"},"Suggestions powered by"),o("zonos-text",{key:"7b3fd93c18d4320522d61e07278f5388d14c8bbb",type:"semiBoldLabel"},"Google")),o("zonos-button",{key:"61a8362ab0514a78dd71eaa9bd638dc8b50e2a9c","aria-label":"Clear suggestions",icon:o("zonos-icon",{content:M}),noBackground:true,onClick:function(){e.localSuggestions=[]}})),this.localSuggestions.map((function(t){
78
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events
79
+ return o("li",{"aria-selected":e.selectedSuggestionId===t.id,class:c(["suggestion","option",e.lastHoveredSuggestionId===t.id&&"last-hovered"]),key:t.id,onClick:function(){e.selectedSuggestionId=t.id;e.suggestionSelected.emit({placeId:t.id,type:e.type})},onMouseEnter:function(){e.lastHoveredSuggestionId=t.id},role:"option",tabIndex:0},o("zonos-text",null,e.getHighlightedText(t.place,t.matches).map((function(e,t){return o("span",{class:e.isMatch?"highlight":undefined,key:"".concat(t,"-").concat(e.text)},e.text)}))))}))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{suggestions:[{suggestionsChanged:0}]}},enumerable:false,configurable:true});return e}());_.style=R();var F=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:32px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--group::-webkit-scrollbar{width:10px}:host .zonos--group::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--group::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--group::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--group{-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--address-display-group{display:-ms-flexbox;display:flex;gap:8px;margin-bottom:20px}:host .zonos--address-display-group zonos-address-display{-ms-flex:1;flex:1}:host .zonos--what-you-entered{margin-bottom:8px}:host .zonos--address-form-section{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--update-btn{-ms-flex-order:1;order:1}"};var B=e("zonos_address_update_dialog",/** @class */function(){function e(e){var o=this;t(this,e);this.closeUpdateDialog=n(this,"closeUpdateDialog",7);this.continueClicked=n(this,"continueClicked",7);
80
+ /**
81
+ * Whether or not the continue button is loading
82
+ */this.continueLoading=false;
83
+ /**
84
+ * Whether or not the dialog is open
85
+ */this.dialogOpen=false;
86
+ /**
87
+ * Whether or not the dialog is open
88
+ */this.isMobile=false;
89
+ /**
90
+ * Due to Stripe's validation difficulties, we need to show a banner when users hasn't filled out the form correctly but clicked continue
91
+ */this.showErrorBanner=false;
92
+ /**
93
+ * State of shipping address input fields
94
+ */this.translatedShippingAddressState={};
95
+ /**
96
+ * State of billing address input fields
97
+ */this.translatedBillingAddressState={};
98
+ /**
99
+ * handler for close button click
100
+ */this.closeUpdateDialogHandler=function(){o.closeUpdateDialog.emit()};
101
+ /**
102
+ * Extract value from translated object
103
+ */this.getTranslatedAddress=function(e){var t=e.currentAddress,n=e.translatedAddress;var o,d,r,i,s,a;var u=t.city,l=t.line1,$=t.line2,f=t.name,c=t.postal_code,h=t.state;return{city:((o=n.city)===null||o===void 0?void 0:o[u])||u,line1:((d=n.line1)===null||d===void 0?void 0:d[l])||l,line2:((r=n.line2)===null||r===void 0?void 0:r[$])||$,name:((i=n.name)===null||i===void 0?void 0:i[f])||f,postal_code:((s=n.postal_code)===null||s===void 0?void 0:s[c])||c,state:((a=n.state)===null||a===void 0?void 0:a[h])||h}};
104
+ /**
105
+ * handler for continue button click
106
+ */this.continueClickHandler=function(){return __awaiter(o,void 0,void 0,(function(){var e,t,n,o,d,r,i,s,a,u,l,$,f;return __generator(this,(function(c){
107
+ // set spinner for the continue button
108
+ this.continueLoading=true;o=this.billingAddress?this.getTranslatedAddress({currentAddress:this.billingAddress,translatedAddress:this.translatedBillingAddressState}):null;d=this.getTranslatedAddress({currentAddress:this.shippingAddress,translatedAddress:this.translatedShippingAddressState});r=g(Object.assign(Object.assign({},d),{country:this.shippingAddress.country}));i=o&&this.billingAddress&&g(Object.assign(Object.assign({},o),{country:this.billingAddress.country}));s=!!Object.keys(r).length;a=!!i&&!!Object.keys(i).length;
109
+ // if there are non-latin characters in the translated address, scroll to the error input so user can see and fix it
110
+ if(s||a){u=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("zonos-address-form");l=u===null||u===void 0?void 0:u[0];$=u===null||u===void 0?void 0:u[1];f=((t=l===null||l===void 0?void 0:l.shadowRoot)===null||t===void 0?void 0:t.querySelector(".has-error"))||((n=$===null||$===void 0?void 0:$.shadowRoot)===null||n===void 0?void 0:n.querySelector(".has-error"));
111
+ // scroll to the first error input
112
+ if(f){f.scrollIntoView({behavior:"smooth",block:"center"})}this.continueLoading=false;return[2/*return*/]}
113
+ // Submit the translated address to the parent component
114
+ this.continueClicked.emit({billingAddress:o,shippingAddress:d});return[2/*return*/]}))}))};
115
+ /**
116
+ * This function builds a state object for a translated address.
117
+ * It takes the current and translated address as input and returns an object where each field is an object itself.
118
+ * The key of each field's object is the current address's field value and the value is the corresponding translated address's field value.
119
+ *
120
+ * @param {Object} params - The parameters for the function.
121
+ * @param {EnteredInfo} params.currentAddress - The current address information.
122
+ * @param {EnteredInfo} params.translatedAddress - The translated address information.
123
+ *
124
+ */this.buildTranslateAddressState=function(e){var t,n,o,d,r,i;var s=e.currentAddress,a=e.translatedAddress;var u=s.city,l=s.line1,$=s.line2,f=s.name,c=s.postal_code,h=s.state;return{city:(t={},t[u]=a.city,t),line1:(n={},n[l]=a.line1,n),line2:(o={},o[$]=a.line2,o),name:(d={},d[f]=a.name,d),postal_code:(r={},r[c]=a.postal_code,r),state:(i={},i[h]=a.state,i)}}}e.prototype.watchTranslatedShippingAddress=function(){this.translatedShippingAddressState=this.translatedShippingAddress};e.prototype.watchTranslatedBillingAddress=function(){this.translatedBillingAddressState=this.translatedBillingAddress};e.prototype.componentWillLoad=function(){
125
+ // update the state with the initial props
126
+ this.watchTranslatedBillingAddress();this.watchTranslatedShippingAddress()};e.prototype.render=function(){var e=this;
127
+ // dialog background white, so when the button background is also white, we need to change the button type to outline so it's visible
128
+ var t=this.submitBtnColor||l.appearance.colorSecondary;var n=t==="#ffffff"?"outline":this.submitBtnType||"standard";var r=this.billingAddress;var s=this.shippingAddress;return o(d,{key:"655845cef04f4af526b1a1c4e49243c4f2b4c7f6",class:c(["zonos--address-update-dialog zonos--elements",this.isMobile&&"mobile"])},o("zonos-dialog",{key:"eab429bb78ce6f05ba463d8748d7edd5499402fa",isLoading:this.dialogLoading,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeUpdateDialog.emit()},open:this.dialogOpen,width:"568px"},o("div",{key:"08f0400e62addfcaffd91bf5200999d29bbd2da9",class:"zonos--body"},o("div",{key:"8699df5e2f823e19066fbb552ba2a66c127c05e9",class:"zonos--dialog-header"},o("div",{key:"92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3",class:"zonos--dialog-title"},o("zonos-text",{key:"aaac3375526bddb319ce7c8f49bde30da7210264",type:"title"},i("Update your address")),o("zonos-button",{key:"474cc2421cd3150daa46bfe215da6ae7df9c6087",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close checkout dialog",content:y}),noBackground:true,onClick:function(){return e.closeUpdateDialogHandler()},title:"Close checkout dialog"})),o("zonos-text",{key:"6d019250cce57e8b30dd790a184df7273bdb234f"},i("To ensure delivery all address details must be in Latin characters."))),o("div",{key:"80ee681844f4f4f43fce69d977b634b1fbc3d5f5",class:"zonos--group"},o("zonos-text",{key:"940e510eceec156a74f32de84cf58ffebd796435",class:"zonos--what-you-entered",type:"semiBoldLabel"},i("What you entered")),o("div",{key:"f626127f5c399c29ab1022deb66aaee8f8a49601",class:"zonos--address-display-group"},o("zonos-address-display",{key:"9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f",addressType:"shipping",currentAddress:s}),r&&o("zonos-address-display",{key:"fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9",addressType:"billing",currentAddress:r})),o("div",{key:"5a82195018ff8cdfd1126f4424062a26c25ee757",class:"zonos--address-form-section"},o("zonos-text",{key:"f694dfad166697e4c034cea51057133b69b1c144",type:"semiBoldLabel"},i("Translated address")),o("zonos-address-form",{key:"4a99c841cf4800de43c612cce3d56d956d02c22f",addressType:"shipping",class:"zonos--shipping-address-form",currentAddress:s,onAddressChange:function(t){var n=t.detail;e.translatedShippingAddressState=e.buildTranslateAddressState({currentAddress:s,translatedAddress:n})},translatedAddress:this.translatedShippingAddressState}),r&&o("zonos-address-form",{key:"311fd702d29a9517203597890bd46bd268dfc6d3",addressType:"billing",class:"zonos--billing-address-form",currentAddress:r,onAddressChange:function(t){var n=t.detail;e.translatedBillingAddressState=e.buildTranslateAddressState({currentAddress:r,translatedAddress:n})},translatedAddress:this.translatedBillingAddressState}))),o("div",{key:"918c3271579c3fc7a7efff0473b0ccf48fb575a2",class:"zonos--group-btn"},o("div",{key:"f73be0c1124d3a4d340bc6e8512f6be8356c655d",class:"zonos--button-wrapper"},o("zonos-button",{key:"172a6cc0a7b75afb400802ef6b87faae6e7e2483",class:"zonos--cancel-btn",onClick:function(){return e.closeUpdateDialogHandler()},variant:"subtle"},i("Cancel")),o("zonos-button",{key:"8fd08bc79b60eb9a0064c06ff9d840b1ecb09123",backgroundColor:this.submitBtnColor,class:"zonos--update-btn",loading:this.continueLoading,onClick:function(){return e.continueClickHandler()},size:"sm",variant:n},i("Update address")))))))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{translatedShippingAddress:[{watchTranslatedShippingAddress:0}],translatedBillingAddress:[{watchTranslatedBillingAddress:0}]}},enumerable:false,configurable:true});return e}());B.style=F();var D=function(e){var t=e.countryFields,n=e.zip;if(!t){return true}if(!t.zipShow){return true}
129
+ // If zip is not required, zip value can be empty
130
+ if(!t.zipRequired){return true}
131
+ // If zip regex is set, it's always required and must be validated
132
+ if(t.zipRegex){return new RegExp(t.zipRegex).test(n)}
133
+ // If zip is required, zip value must be non-empty
134
+ return t.zipRequired&&!!n};var G=function(e){return!!e&&Object.keys(e).length>0};
135
+ /**
136
+ * Builds the country options for an address form's country dropdown.
137
+ *
138
+ * Shipping addresses are restricted to the merchant's shipping zone, since we
139
+ * can only fulfill orders to those countries. Billing addresses are not — a
140
+ * shopper's card can be billed to any country, so restricting the billing
141
+ * country prevents them from checking out at all (05CHECK-915).
142
+ *
143
+ * When the full country list is unavailable we fall back to the shipping zone
144
+ * so the dropdown is never empty.
145
+ */var U=function(e){var t=e.allCountries,n=e.shippingZoneCountries,o=e.type;var d=o==="billing"&&G(t)?t:n;return Object.values(d||{}).map((function(e){return{label:e.displayName,value:e.code}})).sort((function(e,t){return e.label.localeCompare(t.label)}))};var V=function(e){var t=e.addresses,n=e.delimiter,o=n===void 0?" ":n;
146
+ // Remove duplicate addresses
147
+ var d=new Set(t.filter(Boolean));return Array.from(d).join(o)};var H=function(){return".sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}"};var K=undefined&&undefined.__rest||function(e,t){var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0)n[o]=e[o];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var d=0,o=Object.getOwnPropertySymbols(e);d<o.length;d++){if(t.indexOf(o[d])<0&&Object.prototype.propertyIsEnumerable.call(e,o[d]))n[o[d]]=e[o[d]]}return n};var W=e("zonos_custom_address",/** @class */function(){function e(e){var o=this;t(this,e);this.invalidCharacters=n(this,"invalidCharacters",7);this.addressChange=n(this,"addressChange",7);this.onStoreCheckoutSessionIdChangedSubscription=function(){};
148
+ /**
149
+ * Default address for stripe
150
+ */this.defaultAddress=[];
151
+ /**
152
+ * Error message for tax id input
153
+ */this.taxIdErrorMessage="";
154
+ /**
155
+ * Error message for short address code input
156
+ */this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;
157
+ /**
158
+ * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
159
+ */this.isDirtyAddress=false;
160
+ /**
161
+ * Local address event for stripe address element
162
+ */this.isAddressFilled=false;
163
+ /**
164
+ * Whether the address line 1 is already entered greater than 3 characters once
165
+ */this.isAddressLine1Entered=false;
166
+ /**
167
+ * Address suggestions from google place api
168
+ */this.addressSuggestions=[];
169
+ /**
170
+ * Country fields for the current country
171
+ */this.countryField=null;
172
+ /**
173
+ * Whether to start google place suggestions
174
+ */this.startGooglePlaceSuggestions=false;this.city="";this.country="";this.firstName="";this.lastName="";this.line1="";this.line2=null;this.phone="";this.postalCode="";this.state="";this.cityError="";this.stateError="";this.postalCodeError="";this.phoneError="";this.firstNameError="";this.lastNameError="";
175
+ /**
176
+ * Whether the address element is loaded
177
+ */this.isFirstInitialization=true;
178
+ /**
179
+ * Address service instance
180
+ */this.addressService=null;
181
+ /**
182
+ * Local checkout session id to check if the address is filled after checkout is loaded
183
+ */this.checkoutSessionId=s.checkoutSessionId;
184
+ /**
185
+ * Whether the suggestion is clicked
186
+ */this.suggestionClicked=false;
187
+ /**
188
+ * Check if the tracking event is sent
189
+ */this.trackingSent=false;
190
+ /**
191
+ * Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
192
+ */this.isAutoCompleteAdjusted=false;
193
+ /**
194
+ * Memoized country options, keyed on the store references they derive from.
195
+ * `render()` runs on every keystroke, and rebuilding the list each time would
196
+ * re-sort ~244 countries and hand `zonos-stripe-select` a new array identity,
197
+ * re-rendering it needlessly. `@stencil/store` replaces these references
198
+ * wholesale rather than mutating them, so reference equality is a safe key.
199
+ */this.countryOptionsCache=null;
200
+ // Create a single throttled instance that persists
201
+ this.throttledGetAddressSuggestions=w((function(){if(l.checkoutAddressService){l.checkoutAddressService.getAddressSuggestions({country:o.country,query:[o.line1,o.state,o.postalCode].filter(Boolean).join(", "),type:o.type})}}),1e3);
202
+ // Map the custom address form to stripe address event data
203
+ this.setCustomAddressFormToStripeAddressEventData=function(){
204
+ // If the field is not shown, set it to an empty string
205
+ var e=!o.countryField||o.countryField.cityShow?o.city:"";var t=!o.countryField||o.countryField.stateShow?o.state:"";var n=!o.countryField||o.countryField.zipShow?o.postalCode:"";var d={complete:o.getIsComplete(),elementMode:o.type,elementType:"address",empty:!o.getIsComplete(),isNewAddress:true,value:{address:{city:e,country:o.country,line1:o.line1,line2:o.line2,postal_code:n,state:t},firstName:o.firstName,lastName:o.lastName,name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}};o.updateAddressEventData({event:d,type:o.type});o.addressChange.emit({errors:o.getCustomAddressErrors(),type:o.type,value:d})};this.getCustomAddressErrors=function(){return o.type==="shipping"?p.customAddressErrors:p.customBillingAddressErrors};this.validate=function(e){var t=e.phoneValidateInfo,n=e.type,d=e.value,r=e.valueType;var s,a,u,l,$;var f=Object.assign({},o.getCustomAddressErrors());switch(r){case"city":{var c=!((s=o.countryField)===null||s===void 0?void 0:s.cityRequired)||((a=o.countryField)===null||a===void 0?void 0:a.cityRequired)&&!!(d===null||d===void 0?void 0:d.trim());f.city="";if(!c){f.city=i("The field is incomplete")}break}case"state":{var c=!((u=o.countryField)===null||u===void 0?void 0:u.stateRequired)||((l=o.countryField)===null||l===void 0?void 0:l.stateRequired)&&!!(d===null||d===void 0?void 0:d.trim());f.state="";if(!c){f.state=i("The field is incomplete")}break}case"postalCode":{var c=D({countryFields:o.countryField,zip:d||""});f.postalCode="";if(!c){f.postalCode=i("Your [zipLabel] is invalid",{zipLabel:(($=o.countryField)===null||$===void 0?void 0:$.zipLabel)||"ZIP"})}break}case"firstName":{var c=!!(d===null||d===void 0?void 0:d.trim());f.firstName="";if(!c){f.firstName=i("Please provide your first name.")}break}case"lastName":{var c=!!(d===null||d===void 0?void 0:d.trim());f.lastName="";if(!c){f.lastName=i("Please provide your last name.")}break}case"line1":{var c=!!(d===null||d===void 0?void 0:d.trim());f.line1="";if(!c){f.line1=i("The field is incomplete")}break}case"phone":{
206
+ // If the phone validate info is not provided, we need to validate the phone number
207
+ if(!t){var c=!!(d===null||d===void 0?void 0:d.trim());f.phone="";if(!c){f.phone=i("Please provide a mobile phone number.")}}else{f.phone="";
208
+ // If the phone number is empty, set the error message
209
+ if(t.isEmpty){f.phone=i("Please provide a mobile phone number.")}else if(t.wrongFormat){f.phone=i("Your mobile phone number is incomplete.")}}break}}if(n==="shipping"){p.customAddressErrors=f}else{p.customBillingAddressErrors=f}};this.onStoreCheckoutSessionIdChanged=function(){var e=function(){o.checkoutSessionId=s.checkoutSessionId};
210
+ // Trigger it once on init because onChange doesn't get triggered on initial load
211
+ e();o.onStoreCheckoutSessionIdChangedSubscription=a("checkoutSessionId",e)}}e.prototype.getCountryOptions=function(){var e=u.allCountries,t=u.shippingZoneCountries;var n=this.countryOptionsCache;if(n&&n.allCountries===e&&n.shippingZoneCountries===t&&n.type===this.type){return n.options}var o=U({allCountries:e,shippingZoneCountries:t,type:this.type});this.countryOptionsCache={allCountries:e,options:o,shippingZoneCountries:t,type:this.type};return o};e.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:p.stripeBillingAddressElement,stripeAddressEventData:p.stripeBillingAddressEventData,stripeElements:p.stripeElementsForBillingAddress}}return{stripeAddressElement:p.stripeAddressElement,stripeAddressEventData:p.stripeAddressEventData,stripeElements:p.stripeElements}};e.prototype.updateAddressEventData=function(e){var t=e.event,n=e.type;switch(n){case"billing":p.stripeBillingAddressEventData=t;break;default:{p.stripeAddressEventData=t;
212
+ // send request to prefetch landed cost
213
+ void v();break}}};e.prototype.isAddressFilledChanged=function(){
214
+ // Sometimes address elements is loaded with prefilled data before checkout is loaded, need to not send the event if checkout session id is not available, and send the event after checkout is loaded
215
+ if(!s.checkoutSessionId){return}
216
+ // Only need to track the event if the shipping address is filled
217
+ if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var e=s.checkoutSessionId;void b({checkoutSessionId:e,eventName:"checkout_customerInfoFilled"})}};e.prototype.defaultAddressChanged=function(e,t){
218
+ // check if stringified json of oldAddress is different from newAddress
219
+ var n=JSON.stringify(t);var o=JSON.stringify(e);
220
+ // No need to reset address element if the default address is the same
221
+ if(n===o){return}S("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});
222
+ // Reset stripe address event data
223
+ if(this.type==="shipping"){p.stripeAddressEventData=null}else{p.stripeBillingAddressEventData=null}this.initDefaultCustomAddressForm()};e.prototype.getIsComplete=function(){var e=this.getCustomAddressErrors(),t=e.city,n=e.firstName,o=e.lastName,d=e.line1,r=e.phone,i=e.postalCode,s=e.state;if(!this.line1||!this.firstName||!this.lastName||!this.phone){return false}
224
+ // has any errors from any of the fields
225
+ var a=d||i||s||t||n||o||r;return!a};e.prototype.isInTaxIdCountry=function(e){return O.includes(e)};
226
+ /**
227
+ * Render tax id input based on ship to country code
228
+ */e.prototype.renderTaxIdInput=function(){var e;
229
+ // No need to render tax id input for billing address
230
+ if(this.type==="billing"){return null}var t=(e=p.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country;
231
+ // Don't render tax id input if the country is not provided
232
+ if(!t){return null}
233
+ // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
234
+ if(!this.isInTaxIdCountry(t)){return null}var n=k({companyName:p.companyName,countryCode:t});
235
+ // Don't render tax id input if the country doesn't require tax id
236
+ if(!n){return null}var d=E[t];return o("div",{class:"zonos--tax-id-input"},o("zonos-stripe-input",{error:this.taxIdErrorMessage,inputLabel:i(d.friendlyName),inputPlaceholder:d.placeholder,inputValue:p.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(e){p.taxId=e.detail}}))};
237
+ /**
238
+ * Render short address code input based on ship to country code
239
+ */e.prototype.renderShortAddressCodeInput=function(){var e;
240
+ // No need to render short address code input for billing address
241
+ if(this.type==="billing"){return null}var t=(e=p.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country;
242
+ // Don't render short address code input if the country is not provided
243
+ if(!t){return null}var n=C({countryCode:t});
244
+ // Don't render short address code input if the country doesn't require short address code
245
+ if(!n){return null}return o("div",{class:"zonos--short-address-code-input"},o("zonos-stripe-input",{inputLabel:i("Short address code"),inputPlaceholder:"RRRD2929",inputValue:p.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(e){p.shortAddressCode=e.detail}}),this.shortAddressCodeErrorMessage&&o("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};e.prototype.renderCompanyNameInput=function(){
246
+ // No need to render company name for billing address
247
+ if(this.type==="billing"){return null}
248
+ // only render the company input if the setting is enabled
249
+ var e=l.checkoutSettings.companyFieldsStatus==="ENABLED";if(!e){return null}return o("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:i("Company name (optional)"),inputValue:p.companyName,onInputChange:function(e){p.companyName=e.detail}})};e.prototype.initCountryField=function(e){var t,n,o;this.countryField=((t=l.genericSettings)===null||t===void 0?void 0:t.countryFields)&&e?(o=(n=l.genericSettings)===null||n===void 0?void 0:n.countryFields)===null||o===void 0?void 0:o[e]:null};e.prototype.initDefaultCustomAddressForm=function(){S("initDefaultCustomAddressForm","info",this.type);var e=this.getStripeAddressInstance().stripeAddressEventData;
250
+ // Use data from Stripe address element if it's available (This may happen when user has already at shipping selection page but go back to customer page)
251
+ if(e){var t=e.value.address.country||u.selectedCountryCode||"US";this.setFormValues({city:e.value.address.city,country:t,firstName:e.value.firstName||"",lastName:e.value.lastName||"",line1:e.value.address.line1,line2:e.value.address.line2||"",phone:e.value.phone||"",postal_code:e.value.address.postal_code,state:e.value.address.state});this.initCountryField(t);return}
252
+ // Use data from default address if it's available
253
+ var n=this.defaultAddress[0];if(n){var o=h({name:n.name}),d=o.firstName,r=o.lastName;var i=n.address.country||u.selectedCountryCode||"US";this.setFormValues({city:n.address.city,country:i,firstName:d,lastName:r,line1:n.address.line1,line2:n.address.line2||"",phone:n.phone||"",postal_code:n.address.postal_code,state:n.address.state});this.initCountryField(i);return}var s=u.selectedCountryCode||"US";
254
+ // Set default values
255
+ this.setFormValues({city:"",country:s,firstName:"",lastName:"",line1:"",line2:"",phone:"",postal_code:"",state:""});this.initCountryField(s);
256
+ // Set the first initialization to false when the address element is initialized
257
+ this.isFirstInitialization=false};e.prototype.line1Changed=function(){var e=this;var t=this.getStripeAddressInstance().stripeAddressEventData;var n=!t||this.line1!==(t===null||t===void 0?void 0:t.value.address.line1);
258
+ // Start requesting google place suggestions when address line 1 is more than 3 characters
259
+ if(n&&this.line1.length>3){
260
+ // Turn on the suggestion when the address line 1 is changed
261
+ this.startGooglePlaceSuggestions=true;this.isAddressLine1Entered=true;
262
+ // Turn off the suggestion when the address suggestion is clicked, but next time the address line 1 is changed, the suggestion will be turned on again
263
+ if(this.suggestionClicked){this.suggestionClicked=false;this.startGooglePlaceSuggestions=false}if(!this.isDirtyAddress){this.isDirtyAddress=true;
264
+ // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
265
+ setTimeout((function(){if(!e.isAutoCompleteAdjusted){if(x()){e.el.scrollIntoView({behavior:"smooth",block:"end"})}else{
266
+ // scroll into the end of the page so the address placeholder won't be hidden
267
+ var t=e.type==="shipping"?100:600;var n=e.el.closest(".zonos--group");var o=e.el.getBoundingClientRect().top+t;n===null||n===void 0?void 0:n.scrollTo({behavior:"smooth",top:o})}}}),600)}}this.setCustomAddressFormToStripeAddressEventData();
268
+ // Start requesting google place suggestions when address line 1 is more than 3 characters (No need to request suggestions on first initialization if address is pre-filled)
269
+ if(this.startGooglePlaceSuggestions&&l.checkoutAddressService&&!this.isFirstInitialization){this.throttledGetAddressSuggestions()}};e.prototype.formFieldsChanged=function(){this.setCustomAddressFormToStripeAddressEventData()};e.prototype.addressSuggestionSelected=function(e){var t=e.placeDetails;var n,o,d,r,i,s,a,u,l,$,f,c,h,p,v;
270
+ // Set the trigger to true when the address suggestion is selected so we won't trigger the suggestion again
271
+ this.suggestionClicked=true;this.startGooglePlaceSuggestions=false;var b=t.addressComponents;var y=V({addresses:[(n=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("street_number")})))===null||n===void 0?void 0:n.longText,(o=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("route")})))===null||o===void 0?void 0:o.longText]});var m=V({addresses:[(d=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("premise")})))===null||d===void 0?void 0:d.longText,((r=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("sublocality_level_2")})))===null||r===void 0?void 0:r.longText)||((i=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("sublocality_level_3")})))===null||i===void 0?void 0:i.longText)||((s=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("sublocality_level_4")})))===null||s===void 0?void 0:s.longText)||((a=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("sublocality_level_5")})))===null||a===void 0?void 0:a.longText)]});var g=V({addresses:[(u=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("subpremise")})))===null||u===void 0?void 0:u.longText,(l=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("neighborhood")})))===null||l===void 0?void 0:l.longText],delimiter:", "});var z=V({addresses:[(($=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("locality")})))===null||$===void 0?void 0:$.longText)||((f=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("sublocality_level_1")})))===null||f===void 0?void 0:f.longText)||((c=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("administrative_area_level_1")})))===null||c===void 0?void 0:c.longText)]});var w=V({addresses:[(h=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("administrative_area_level_1")})))===null||h===void 0?void 0:h.shortText]});var x=V({addresses:[(p=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("postal_code")})))===null||p===void 0?void 0:p.longText]});var k=V({addresses:[(v=b===null||b===void 0?void 0:b.find((function(e){return e.types.includes("country")})))===null||v===void 0?void 0:v.shortText]});this.setFormValues({city:z,country:k,
272
+ // Use the address line 1 from the address suggestion if it's available, otherwise use the address line 1 from the custom address form that the user has entered
273
+ line1:y||m||this.line1,line2:g,postal_code:x,state:w})};e.prototype.setFormValues=function(e){if(e.city!==undefined)this.city=e.city;if(e.country!==undefined)this.country=e.country;if(e.firstName!==undefined)this.firstName=e.firstName;if(e.lastName!==undefined)this.lastName=e.lastName;if(e.line1!==undefined)this.line1=e.line1;if(e.line2!==undefined)this.line2=e.line2;if(e.phone!==undefined)this.phone=e.phone;if(e.postal_code!==undefined)this.postalCode=e.postal_code;if(e.state!==undefined)this.state=e.state};
274
+ /**
275
+ * Initialize the address suggestions
276
+ */e.prototype.initAddressSuggestions=function(){var e=this;
277
+ // Only initialize the address suggestions if the address service is not already initialized
278
+ if(!l.checkoutAddressService||!!this.onAddressSuggestionsUnsubscribe&&!!this.onAddressSelectedUnsubscribe){return}S("on initAddressSuggestions","info");this.onAddressSuggestionsUnsubscribe=l.checkoutAddressService.onAddressSuggestions((function(t){var n=t.suggestions,o=t.type;
279
+ // Only update the address suggestions if the type matches the current type
280
+ if(o!==e.type){return}e.addressSuggestions=n}));this.onAddressSelectedUnsubscribe=l.checkoutAddressService.onAddressSelected((function(t){if(t.type!==e.type){return}e.addressSuggestions=[];e.addressSuggestionSelected(t)}));this.validate({type:this.type,value:this.firstName,valueType:"firstName"});this.validate({type:this.type,value:this.lastName,valueType:"lastName"});this.validate({type:this.type,value:this.line1,valueType:"line1"});this.validate({type:this.type,value:this.phone,valueType:"phone"});this.validate({type:this.type,value:this.postalCode,valueType:"postalCode"});this.validate({type:this.type,value:this.state,valueType:"state"});this.validate({type:this.type,value:this.city,valueType:"city"});this.validate({type:this.type,value:this.phone,valueType:"phone"})};e.prototype.countryChanged=function(e){var t,n;var o=(t=l.genericSettings)===null||t===void 0?void 0:t.countryFields;var d=o===null||o===void 0?void 0:o[e];
281
+ // If the country code of countryFields are the same as current selected country code, do nothing
282
+ if(((n=this.countryField)===null||n===void 0?void 0:n.countryCode)===this.country){return}if(o&&d){this.countryField=d;return}this.countryField=null};e.prototype.shouldEnabledCustomAddressChanged=function(){
283
+ // Only initialize the address suggestions if the address service is not already initialized
284
+ this.initAddressSuggestions();this.initDefaultCustomAddressForm()};e.prototype.renderCustomAddressForm=function(){var e=this;var t,n,d,r,s,a,$,f,h,p,v,b,y,m,g,z;var w=this.getCustomAddressErrors(),x=w.showError,k=K(w,["showError"]);var C=this.getStripeAddressInstance().stripeAddressEventData;var S=C===null||C===void 0?void 0:C.value.address.country;
285
+ /**
286
+ * Billing addresses are not limited to the shipping zone: a shopper's card
287
+ * can be billed to any country, so restricting it would block them from
288
+ * checking out entirely (05CHECK-915).
289
+ */var O=this.getCountryOptions();var E=O[0];var N=Object.entries(((t=this.countryField)===null||t===void 0?void 0:t.regions)||{}).map((function(e){var t=e[0],n=e[1];return{label:t,value:n.interpayCode}})).sort((function(e,t){return e.label.localeCompare(t.label)}));return o("div",{"aria-label":"".concat(this.type," address form"),class:"zonos--custom-address-form",role:"form"},o("zonos-stripe-input",{"aria-required":"true",class:"zonos--custom-address-form-input",error:x?k.firstName:undefined,inputLabel:i("First name"),inputValue:C===null||C===void 0?void 0:C.value.firstName,onInputChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"firstName"});
290
+ /**
291
+ * Order of operations is important here:
292
+ * 1. validate() updates all input error states
293
+ * 2. Setting postalCode triggers @Watch('postalCode')
294
+ * 3. getIsComplete() checks customAddressErrors state
295
+ * Therefore, we must update the value after validation to ensure correct error state
296
+ */e.firstName=t.detail},required:true}),o("zonos-stripe-input",{"aria-required":"true",class:"zonos--custom-address-form-input",error:x?k.lastName:undefined,inputLabel:i("Last name"),inputValue:C===null||C===void 0?void 0:C.value.lastName,onInputChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"lastName"});
297
+ /**
298
+ * Order of operations is important here:
299
+ * 1. validate() updates all input error states
300
+ * 2. Setting postalCode triggers @Watch('postalCode')
301
+ * 3. getIsComplete() checks customAddressErrors state
302
+ * Therefore, we must update the value after validation to ensure correct error state
303
+ */e.lastName=t.detail},required:true}),o("zonos-stripe-select",{"aria-required":"true",autoComplete:"".concat(this.type," country"),class:"zonos--custom-address-form-input",name:"".concat(this.type,"-country"),onSelectChange:function(t){e.countryChanged(t.detail);
304
+ // revalidate the postal code since with empty value so it would reset the customAddressErrors
305
+ e.validate({type:e.type,value:"",valueType:"postalCode"});e.validate({type:e.type,value:"",valueType:"city"});e.validate({type:e.type,value:"",valueType:"state"});
306
+ /**
307
+ * Order of operations is important here:
308
+ * 1. validate() updates all input error states
309
+ * 2. Setting postalCode triggers @Watch('postalCode')
310
+ * 3. getIsComplete() checks customAddressErrors state
311
+ * Therefore, we must update the value after validation to ensure correct error state
312
+ */e.country=t.detail;e.city="";e.state="";e.postalCode=""},options:O,required:true,selectLabel:i("Country"),selectedValue:(C===null||C===void 0?void 0:C.value.address.country)||u.selectedCountryCode||(E===null||E===void 0?void 0:E.value),title:"".concat(this.type," country")}),o("div",{class:"zonos--custom-address-form-line1-wrapper"},o("zonos-stripe-input",{"aria-autocomplete":"list","aria-controls":"autocomplete-search","aria-required":"true",autoComplete:"".concat(this.type," address-line1"),class:"zonos--custom-address-form-input",error:x?k.line1:undefined,inputLabel:i("Address line 1"),inputValue:C===null||C===void 0?void 0:C.value.address.line1,name:"address-line1",onInputChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"line1"});
313
+ /**
314
+ * Order of operations is important here:
315
+ * 1. validate() updates all input error states
316
+ * 2. Setting postalCode triggers @Watch('postalCode')
317
+ * 3. getIsComplete() checks customAddressErrors state
318
+ * Therefore, we must update the value after validation to ensure correct error state
319
+ */e.line1=t.detail},onKeyDown:function(t){
320
+ // Clear the address suggestions when the user presses the escape key
321
+ if(t.key==="Escape"){t.preventDefault();t.stopPropagation();e.addressSuggestions=[]}},required:true}),o("zonos-address-suggestions",{onSuggestionSelected:function(t){var n;var o=t.detail.placeId;(n=l.checkoutAddressService)===null||n===void 0?void 0:n.selectAddress({placeId:o,type:e.type})},suggestions:this.addressSuggestions,type:this.type})),o("div",{"aria-label":"Additional address details",class:c(["zonos--custom-address-form-additional-fields",S&&this.isAddressLine1Entered?"zonos--show":""]),role:"group"},o("zonos-stripe-input",{"aria-required":"false",autoComplete:"".concat(this.type," address-line2"),class:"zonos--custom-address-form-input",inputLabel:i(((n=this.countryField)===null||n===void 0?void 0:n.address2Label)||"Address line 2"),inputValue:(C===null||C===void 0?void 0:C.value.address.line2)||"",onInputChange:function(t){e.line2=t.detail}}),((d=this.countryField)===null||d===void 0?void 0:d.cityShow)&&o("zonos-stripe-input",{"aria-required":((r=this.countryField)===null||r===void 0?void 0:r.cityRequired)?"true":"false",autoComplete:"".concat(this.type," address-level2"),class:"zonos--custom-address-form-input",error:x?k.city:undefined,inputLabel:i(((s=this.countryField)===null||s===void 0?void 0:s.cityLabel)||"City"),inputValue:(C===null||C===void 0?void 0:C.value.address.city)||"",name:"locality",onInputChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"city"});
322
+ /**
323
+ * Order of operations is important here:
324
+ * 1. validate() updates all input error states
325
+ * 2. Setting postalCode triggers @Watch('postalCode')
326
+ * 3. getIsComplete() checks customAddressErrors state
327
+ * Therefore, we must update the value after validation to ensure correct error state
328
+ */e.city=t.detail},required:(a=this.countryField)===null||a===void 0?void 0:a.cityRequired}),o("div",{class:"zonos--custom-address-form-state-zip-wrapper"},(($=this.countryField)===null||$===void 0?void 0:$.stateShow)&&o("zonos-stripe-select",{"aria-required":((f=this.countryField)===null||f===void 0?void 0:f.stateRequired)?"true":"false",autoComplete:"".concat(this.type," address-level1"),class:"zonos--custom-address-form-input",error:x?k.state:undefined,isError:x&&!!k.state,name:"".concat(this.type,"-state"),onSelectChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"state"});
329
+ /**
330
+ * Order of operations is important here:
331
+ * 1. validate() updates all input error states
332
+ * 2. Setting postalCode triggers @Watch('postalCode')
333
+ * 3. getIsComplete() checks customAddressErrors state
334
+ * Therefore, we must update the value after validation to ensure correct error state
335
+ */e.state=t.detail},options:N,required:(h=this.countryField)===null||h===void 0?void 0:h.stateRequired,selectLabel:i(((p=this.countryField)===null||p===void 0?void 0:p.stateLabel)||"State"),selectedValue:C===null||C===void 0?void 0:C.value.address.state,title:"".concat(this.type," state")}),((v=this.countryField)===null||v===void 0?void 0:v.zipShow)&&o("zonos-stripe-input",{"aria-describedby":((b=this.countryField)===null||b===void 0?void 0:b.zipFormat)?"zip-format-".concat(this.type):undefined,"aria-required":((y=this.countryField)===null||y===void 0?void 0:y.zipRequired)?"true":"false",autoComplete:"".concat(this.type," postal-code"),class:"zonos--custom-address-form-input",error:x?k.postalCode:undefined,inputLabel:i(((m=this.countryField)===null||m===void 0?void 0:m.zipLabel)||"Zip"),inputValue:(C===null||C===void 0?void 0:C.value.address.postal_code)||"",name:"postalCode",onInputChange:function(t){e.validate({type:e.type,value:t.detail,valueType:"postalCode"});
336
+ /**
337
+ * Order of operations is important here:
338
+ * 1. validate() updates all input error states
339
+ * 2. Setting postalCode triggers @Watch('postalCode')
340
+ * 3. getIsComplete() checks customAddressErrors state
341
+ * Therefore, we must update the value after validation to ensure correct error state
342
+ */e.postalCode=t.detail},required:(g=this.countryField)===null||g===void 0?void 0:g.zipRequired,title:"".concat(this.type," zip code")})),o("zonos-stripe-phone-input",{autoComplete:"".concat(this.type," tel"),class:"zonos--custom-address-form-input",countryCode:C===null||C===void 0?void 0:C.value.address.country,countryOptions:(z=l.genericSettings)===null||z===void 0?void 0:z.countryFields,error:x?k.phone:undefined,inputLabel:i("Phone number"),inputValue:(C===null||C===void 0?void 0:C.value.phone)||"",onInputValueChange:function(t){var n=t.detail,o=n.isEmpty,d=n.phoneNumber,r=n.valid,i=n.wrongFormat;
343
+ // Validate the phone number
344
+ e.validate({phoneValidateInfo:{isEmpty:o,isValid:r,wrongFormat:i},type:e.type,value:d,valueType:"phone"});
345
+ /**
346
+ * Order of operations is important here:
347
+ * 1. validate() updates all input error states
348
+ * 2. Setting postalCode triggers @Watch('postalCode')
349
+ * 3. getIsComplete() checks customAddressErrors state
350
+ * Therefore, we must update the value after validation to ensure correct error state
351
+ */e.phone=d}})))};e.prototype.disconnectedCallback=function(){var e,t;
352
+ // destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
353
+ var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.destroy();
354
+ // unsubscribe from address suggestions when this component is removed from the DOM
355
+ (e=this.onAddressSuggestionsUnsubscribe)===null||e===void 0?void 0:e.call(this);(t=this.onAddressSelectedUnsubscribe)===null||t===void 0?void 0:t.call(this);
356
+ // cleanup checkout session id subscription
357
+ this.onStoreCheckoutSessionIdChangedSubscription()};e.prototype.componentWillLoad=function(){if(l.checkoutAddressService){this.initDefaultCustomAddressForm()}};e.prototype.componentDidLoad=function(){var e=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!e&&e.value.address.line1.length>0;
358
+ // @Watch doesn't get trigger on initial load
359
+ this.initAddressSuggestions();this.isFirstInitialization=false;
360
+ // subscribe to checkout session id changes from storage store
361
+ this.onStoreCheckoutSessionIdChanged();this.countryChanged((e===null||e===void 0?void 0:e.value.address.country)||"US")};e.prototype.render=function(){var e;this.addressService=l.checkoutAddressService;if((e=p.stripeAddressEventData)===null||e===void 0?void 0:e.complete){this.isAddressFilled=true}
362
+ // Only set country if custom address form is enabled
363
+ if(!this.country&&u.selectedCountryCode){this.country=u.selectedCountryCode}
364
+ // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
365
+ return o(d,{key:"b4e39a6e92e646f98c0061bf3de8e028c9285556",class:c(["zonos--address zonos--elements","zonos--".concat(this.type,"-address")])},o("zonos-text",{key:"28d21737c78a1b8125c5170c67f214e3f39939ff",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("slot",{key:"97357f001b27197b8648d6158b786b153c31a7ba",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),this.renderCustomAddressForm())};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{checkoutSessionId:[{isAddressFilledChanged:0}],isAddressFilled:[{isAddressFilledChanged:0}],defaultAddress:[{defaultAddressChanged:0}],line1:[{line1Changed:0}],city:[{formFieldsChanged:0}],country:[{formFieldsChanged:0},{countryChanged:0}],firstName:[{formFieldsChanged:0}],lastName:[{formFieldsChanged:0}],line2:[{formFieldsChanged:0}],phone:[{formFieldsChanged:0}],postalCode:[{formFieldsChanged:0}],state:[{formFieldsChanged:0}],addressService:[{shouldEnabledCustomAddressChanged:0}]}},enumerable:false,configurable:true});return e}());W.style=H();
366
+ // This file is a workaround for a bug in web browsers' "native"
367
+ // ES6 importing system which is uncapable of importing "*.json" files.
368
+ // https://github.com/catamphetamine/libphonenumber-js/issues/239
369
+ var Z={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[2-467])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[024-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-7]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]|50"]],["(\\d{8})","$1",["[5-7]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","8776\\d{4}|(?:[27]\\d|61)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-8]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,0,[["528[89]\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","(?:400|[5-9]\\d\\d)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[4-9]"]]]],ET:["251","00","(?:11|[2-57-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|80[6-9]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","[235]\\d{8}|800\\d{5,6}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2358]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[48]\\d{8}|[2-9]\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|4(?:[0-35]|4[16-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[48]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|80[6-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1(?:05|[2-9]))","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["16|[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["18[06]","18[06]0"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","8\\d{13}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["20"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["20"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{4})(\\d{5})","$1-$2",["892"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8(?:0[0-7]|9)"],"0$1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[5-8]"],"0$1"]],"0",0,0,0,0,"[5-8]"],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],["8[129]\\d{7}"],0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["11|2[16]"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-37-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85[02-46-9]"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[78]\\d{8}|[2-9]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["3[289]|4[246-8]|61|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"[3489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[013]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|9[2-9]"]],["(\\d)(\\d{7})","$1 $2",["[267]|904"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[346-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-9]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[3689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["826"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["83"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["82"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[25]0|37|49|8[09]"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-478])|7[1-9]","[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024","20240"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["20[0-35-7]|4(?:6[45]|[7-9])|[7-9]","20(?:[0135-7]|2[5-9])|4(?:6[45]|[7-9])|[7-9]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[2-4]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:472[2-47-9]|983[2-57-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}",[7,8,9,10],[["(\\d{4})(\\d{4,6})","$1 $2",["1(?:2[02]|[89])"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[26]|6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","(?:13|8\\d{4})\\d{5}|[235-8]\\d{8}|[2-689]\\d{6}",[7,9,10],[["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|29|58)|67[0-46-9]|(?:55|68)[0-69]"],"0$1"],["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|[27]|48)|37|675|(?:55|68)[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["548"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[256]|39|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["3"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|5[12]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};
370
+ // Importing from a ".js" file is a workaround for Node.js "ES Modules"
371
+ // importing system which is even uncapable of importing "*.json" files.
372
+ function Y(e,t){var n=Array.prototype.slice.call(t);n.push(Z);return e.apply(this,n)}
373
+ // Copy-pasted from:
374
+ // https://github.com/substack/semver-compare/blob/master/index.js
375
+
376
+ // Inlining this function because some users reported issues with
377
+ // importing from `semver-compare` in a browser with ES6 "native" modules.
378
+
379
+ // Fixes `semver-compare` not being able to compare versions with alpha/beta/etc "tags".
380
+ // https://github.com/catamphetamine/libphonenumber-js/issues/381
381
+ function q(e,t){e=e.split("-");t=t.split("-");var n=e[0].split(".");var o=t[0].split(".");for(var d=0;d<3;d++){var r=Number(n[d]);var i=Number(o[d]);if(r>i)return 1;if(i>r)return-1;if(!isNaN(r)&&isNaN(i))return 1;if(isNaN(r)&&!isNaN(i))return-1}if(e[1]&&t[1]){return e[1]>t[1]?1:e[1]<t[1]?-1:0}return!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}var J={}.constructor;function X(e){return e!==undefined&&e!==null&&e.constructor===J}var Q=/^\d+$/;function ee(e){return Q.test(e)}function te(e){"@babel/helpers - typeof";return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,re(o.key),o)}}function de(e,t,n){return t&&oe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function re(e){var t=ie(e,"string");return"symbol"==te(t)?t:t+""}function ie(e,t){if("object"!=te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=te(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}
382
+ // Added "idd_prefix" and "default_idd_prefix".
383
+ var se="1.2.0";
384
+ // Moved `001` country code to "nonGeographic" section of metadata.
385
+ var ae="1.7.35";var ue=" ext. ";
386
+ /**
387
+ * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md
388
+ */var le=function(){
389
+ /**
390
+ * @param {object} metadata — Metadata JSON.
391
+ */
392
+ function e(t){ne(this,e);ve(t);this.metadata=t;ge.call(this,t)}return de(e,[{key:"getCountries",value:function e(){return Object.keys(this.metadata.countries).filter((function(e){return e!=="001"}))}},{key:"getCountryMetadata",value:function e(t){return this.metadata.countries[t]}},{key:"nonGeographic",value:function e(){if(this.v1||this.v2||this.v3)return;
393
+ // `nonGeographical` was a typo.
394
+ // It's present in metadata generated from `1.7.35` to `1.7.37`.
395
+ // The test case could be found by searching for "nonGeographical".
396
+ return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function e(t){return this.getCountryMetadata(t)!==undefined}},{key:"hasCallingCode",value:function e(t){if(this.getCountryCodesForCallingCode(t)){return true}if(this.nonGeographic()){if(this.nonGeographic()[t]){return true}}else{
397
+ // A hacky workaround for old custom metadata (generated before V4).
398
+ var n=this.countryCallingCodes()[t];if(n&&n.length===1&&n[0]==="001"){return true}}}},{key:"isNonGeographicCallingCode",value:function e(t){if(this.nonGeographic()){return this.nonGeographic()[t]?true:false}else{return this.getCountryCodesForCallingCode(t)?false:true}}
399
+ // Deprecated.
400
+ },{key:"country",value:function e(t){return this.selectNumberingPlan(t)}
401
+ /**
402
+ * Selects a telephone numbering plan based on either a country code or a calling code.
403
+ * @param {string} argument — Country code or calling code.
404
+ * @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed.
405
+ */},{key:"selectNumberingPlan",value:function e(t,n){var o;var d;if(t){if(ee(t)){d=t}else{o=t}}
406
+ // Previously, the signature of this method was: `.selectNumberingPlan(country, callingCode)`.
407
+ // And if `country` argument wasn't passed, it looked into the second argument `callingCode`.
408
+ // Now it's preferred to only pass either `country` or `callingCode` as the first argument.
409
+ if(n){d=n}
410
+ // Select a telephone numbering plan.
411
+ if(o&&o!=="001"){var r=this.getCountryMetadata(o);if(!r){throw new Error("Unknown country: ".concat(o))}this.numberingPlan=new $e(r,this)}else if(d){if(!this.hasCallingCode(d)){throw new Error("Unknown calling code: ".concat(d))}this.numberingPlan=new $e(this.getNumberingPlanMetadata(d),this)}else{this.numberingPlan=undefined}return this}},{key:"getCountryCodesForCallingCode",value:function e(t){var n=this.countryCallingCodes()[t];if(n){
412
+ // Metadata before V4 included "non-geographic entity" calling codes
413
+ // inside `country_calling_codes` (for example, `"881":["001"]`).
414
+ // Now the semantics of `country_calling_codes` has changed:
415
+ // it's specifically for "countries" now.
416
+ // Older versions of custom metadata will simply skip parsing
417
+ // "non-geographic entity" phone numbers with new versions
418
+ // of this library: it's not considered a bug,
419
+ // because such numbers are extremely rare,
420
+ // and developers extremely rarely use custom metadata.
421
+ if(n.length===1&&n[0].length===3){return}return n}}},{key:"getCountryCodeForCallingCode",value:function e(t){var n=this.getCountryCodesForCallingCode(t);if(n){return n[0]}}},{key:"getNumberingPlanMetadata",value:function e(t){
422
+ // If a calling code is specified, choose the telephone numbering plan
423
+ // of the "default" country for this calling code.
424
+ // For example, if calling code `1` is passed,
425
+ // the telephone numbering plan of `US` will be selected.
426
+ var n=this.getCountryCodeForCallingCode(t);if(n){return this.getCountryMetadata(n)}if(this.nonGeographic()){var o=this.nonGeographic()[t];if(o){return o}}else{
427
+ // A hacky workaround for old custom metadata (generated before V4).
428
+ // In that metadata, there was no concept of "non-geographic" metadata
429
+ // so metadata for `001` country code was stored along with other countries.
430
+ // The test case can be found by searching for:
431
+ // "should work around `nonGeographic` metadata not existing".
432
+ var d=this.countryCallingCodes()[t];if(d&&d.length===1&&d[0]==="001"){return this.metadata.countries["001"]}}}
433
+ // Deprecated.
434
+ },{key:"countryCallingCode",value:function e(){return this.numberingPlan.callingCode()}
435
+ // Deprecated.
436
+ },{key:"IDDPrefix",value:function e(){return this.numberingPlan.IDDPrefix()}
437
+ // Deprecated.
438
+ },{key:"defaultIDDPrefix",value:function e(){return this.numberingPlan.defaultIDDPrefix()}
439
+ // Deprecated.
440
+ },{key:"nationalNumberPattern",value:function e(){return this.numberingPlan.nationalNumberPattern()}
441
+ // Deprecated.
442
+ },{key:"possibleLengths",value:function e(){return this.numberingPlan.possibleLengths()}
443
+ // Deprecated.
444
+ },{key:"formats",value:function e(){return this.numberingPlan.formats()}
445
+ // Deprecated.
446
+ },{key:"nationalPrefixForParsing",value:function e(){return this.numberingPlan.nationalPrefixForParsing()}
447
+ // Deprecated.
448
+ },{key:"nationalPrefixTransformRule",value:function e(){return this.numberingPlan.nationalPrefixTransformRule()}
449
+ // Deprecated.
450
+ },{key:"leadingDigits",value:function e(){return this.numberingPlan.leadingDigits()}
451
+ // Deprecated.
452
+ },{key:"hasTypes",value:function e(){return this.numberingPlan.hasTypes()}
453
+ // Deprecated.
454
+ },{key:"type",value:function e(t){return this.numberingPlan.type(t)}
455
+ // Deprecated.
456
+ },{key:"ext",value:function e(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function e(){if(this.v1)return this.metadata.country_phone_code_to_countries;return this.metadata.country_calling_codes}
457
+ // Deprecated.
458
+ },{key:"chooseCountryByCountryCallingCode",value:function e(t){return this.selectNumberingPlan(t)}},{key:"hasSelectedNumberingPlan",value:function e(){return this.numberingPlan!==undefined}}])}();var $e=function(){function e(t,n){ne(this,e);this.globalMetadataObject=n;this.metadata=t;ge.call(this,n.metadata)}return de(e,[{key:"callingCode",value:function e(){return this.metadata[0]}
459
+ // When multiple countries share the same calling code,
460
+ // all phone number formatting rules are included in the metadata
461
+ // of the "default" country for that calling code.
462
+ // Any other countries' metdata doesn't include any formatting rules.
463
+ // Google developers said that such storage architecture was chosen for performance reasons.
464
+
465
+ // For example, for NANPA region ("North American Numbering Plan Administration",
466
+ // which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules
467
+ // are contained in the metadata of `US` country.
468
+
469
+ // This is not public API.
470
+
471
+ },{key:"_getDefaultCountryMetadataForThisCallingCode",value:function e(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}
472
+ // Deprecated.
473
+ },{key:"getDefaultCountryMetadataForRegion",value:function e(){return this._getDefaultCountryMetadataForThisCallingCode()}
474
+ // Is always present.
475
+ },{key:"IDDPrefix",value:function e(){if(this.v1||this.v2)return;return this.metadata[1]}
476
+ // Is only present when a country supports multiple IDD prefixes.
477
+ },{key:"defaultIDDPrefix",value:function e(){if(this.v1||this.v2)return;return this.metadata[12]}},{key:"nationalNumberPattern",value:function e(){if(this.v1||this.v2)return this.metadata[1];return this.metadata[2]}
478
+ // "possible length" data is always present in Google's metadata.
479
+ },{key:"possibleLengths",value:function e(){if(this.v1)return;return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function e(t){return t[this.v1?2:this.v2?3:4]}
480
+ // For countries of the same region (e.g. NANPA)
481
+ // formats are all stored in the "main" country for that region.
482
+ // E.g. "RU" and "KZ", "US" and "CA".
483
+ },{key:"formats",value:function e(){var t=this;var e=this._getFormats(this.metadata)||this._getFormats(this._getDefaultCountryMetadataForThisCallingCode())||[];return e.map((function(e){return new fe(e,t)}))}},{key:"nationalPrefix",value:function e(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function e(t){return t[this.v1?4:this.v2?5:6]}
484
+ // For countries of the same region (e.g. NANPA)
485
+ // national prefix formatting rule is stored in the "main" country for that region.
486
+ // E.g. "RU" and "KZ", "US" and "CA".
487
+ },{key:"nationalPrefixFormattingRule",value:function e(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"_nationalPrefixForParsing",value:function e(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function e(){
488
+ // If `national_prefix_for_parsing` is not set explicitly,
489
+ // then infer it from `national_prefix` (if any)
490
+ return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function e(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function e(){return!!this.metadata[this.v1?7:this.v2?8:9]}
491
+ // For countries of the same region (e.g. NANPA)
492
+ // "national prefix is optional when formatting" flag is
493
+ // stored in the "main" country for that region.
494
+ // E.g. "RU" and "KZ", "US" and "CA".
495
+ },{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function e(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())}},{key:"leadingDigits",value:function e(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function e(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function e(){
496
+ // Versions 1.2.0 - 1.2.4: can be `[]`.
497
+ /* istanbul ignore next */
498
+ if(this.types()&&this.types().length===0){return false}
499
+ // Versions <= 1.2.4: can be `undefined`.
500
+ // Version >= 1.2.5: can be `0`.
501
+ return!!this.types()}},{key:"type",value:function e(t){if(this.hasTypes()&&pe(this.types(),t)){return new he(pe(this.types(),t),this)}}},{key:"ext",value:function e(){if(this.v1||this.v2)return ue;return this.metadata[13]||ue}}])}();var fe=function(){function e(t,n){ne(this,e);this._format=t;this.metadata=n}return de(e,[{key:"pattern",value:function e(){return this._format[0]}},{key:"format",value:function e(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function e(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function e(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function e(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function e(){
502
+ // National prefix is omitted if there's no national prefix formatting rule
503
+ // set for this country, or when the national prefix formatting rule
504
+ // contains no national prefix itself, or when this rule is set but
505
+ // national prefix is optional for this phone number format
506
+ // (and it is not enforced explicitly)
507
+ return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}
508
+ // Checks whether national prefix formatting rule contains national prefix.
509
+ },{key:"usesNationalPrefix",value:function e(){return this.nationalPrefixFormattingRule()&&
510
+ // Check that national prefix formatting rule is not a "dummy" one.
511
+ !ce.test(this.nationalPrefixFormattingRule())?true:false}},{key:"internationalFormat",value:function e(){return this._format[5]||this.format()}}])}();
512
+ /**
513
+ * A pattern that is used to determine if the national prefix formatting rule
514
+ * has the first group only, i.e., does not start with the national prefix.
515
+ * Note that the pattern explicitly allows for unbalanced parentheses.
516
+ */var ce=/^\(?\$1\)?$/;var he=function(){function e(t,n){ne(this,e);this.type=t;this.metadata=n}return de(e,[{key:"pattern",value:function e(){if(this.metadata.v1)return this.type;return this.type[0]}},{key:"possibleLengths",value:function e(){if(this.metadata.v1)return;return this.type[1]||this.metadata.possibleLengths()}}])}();function pe(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function ve(e){if(!e){throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.")}
517
+ // `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.
518
+ // For that reason, it's not used in this detection algorithm.
519
+ // Instead, it detects by `countries: {}` property existence.
520
+ if(!X(e)||!X(e.countries)){throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(X(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+be(e)+": "+e,"."))}}
521
+ // Babel transforms `typeof` into some "branches"
522
+ // so istanbul will show this as "branch not covered".
523
+ /* istanbul ignore next */var be=function e(t){return te(t)};
524
+ /**
525
+ * Returns "country calling code" for a country.
526
+ * Throws an error if the country doesn't exist or isn't supported by this library.
527
+ * @param {string} country
528
+ * @param {object} metadataJson
529
+ * @return {string}
530
+ * @example
531
+ * // Returns "44"
532
+ * getCountryCallingCode("GB")
533
+ */function ye(e,t){var n=new le(t);if(n.hasCountry(e)){return n.selectNumberingPlan(e).countryCallingCode()}throw new Error("Unknown country: ".concat(e))}
534
+ /**
535
+ * Tells if a country code is supported.
536
+ * @param {string} country
537
+ * @param {object} metadataJson
538
+ * @return {boolean}
539
+ * @example
540
+ * // Returns `true`
541
+ * isSupportedCountry("GB")
542
+ */function me(e,t){
543
+ // const metadata = new Metadata(metadataJson)
544
+ // return metadata.hasCountry(country)
545
+ return t.countries.hasOwnProperty(e)}
546
+ /**
547
+ * Sets `v1`/`v2`/`v3`/`v4` properties on `this` object.
548
+ * @param {object} metadata — Metadata JSON
549
+ */function ge(e){var t=e.version;if(typeof t==="number"){this.v1=t===1;this.v2=t===2;this.v3=t===3;this.v4=t===4}else{if(!t){this.v1=true}else if(q(t,se)===-1){this.v2=true}else if(q(t,ae)===-1){this.v3=true}else{this.v4=true}}}
550
+ /**
551
+ * Checks phone number length against the phone numbering plan selected in metadata.
552
+ * Optionally, it could be restrained by a specific country.
553
+ * @param {string} nationalNumber
554
+ * @param {string?} country — Specific country to use rather than the one that is pre-selected in the metadata instance.
555
+ * @param {Metadata} metadata — Metadata instance with a selected numbering plan.
556
+ * @returns {string}
557
+ */function ze(e,t,n){return we(e,undefined,t,n)}
558
+ /**
559
+ * Checks phone number length against the phone numbering plan selected in metadata.
560
+ * Optionally, it could be restrained by a specific phone number type or a specific country.
561
+ * @param {string} nationalNumber
562
+ * @param {string?} type — Specific phone number type.
563
+ * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.
564
+ * @param {Metadata} metadata — Metadata instance with a selected numbering plan.
565
+ * @returns {string} See the README on `validatePhoneNumberLength()` function, with an addition of a special case: when phone numbers of type `type` aren't possible in the telephone numbering plan, it will return "INVALID_LENGTH".
566
+ */
567
+ // Checks whether a number is possible for a certain `country` based on the number length.
568
+
569
+ // This function is not supported by metadata generated with ancient versions of
570
+ // `libphonenumber-js` (before version `1.0.18`) which didn't include "possible lengths".
571
+
572
+ // There was also a known issue with `checkNumberLength()` function:
573
+ // if a number is possible only in a certain `country` among several `countries`
574
+ // that share the same "country calling code", that function would check
575
+ // the possibility of the phone number only in the "main" `country` for the "country calling code"
576
+ // and would not check if it's actually be possible in the speciifc `country`.
577
+
578
+ // For example, "+1310xxxx" numbers are valid in Canada.
579
+ // However, they are not possible in the US due to being too short.
580
+ // Since Canada and the US share the same country calling code — "+1" —
581
+ // `checkNumberLength()` function used to return not "IS_POSSIBLE" for "+1310xxxx" numbers.
582
+
583
+ // In such cases, when using "/max" metadata, `isValid()` could output `true`
584
+ // but at the same time `isPossible()` could output `false`, which was contradictory.
585
+
586
+ // See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.
587
+
588
+ // The solution suggested by Google was implemented: an optional `country` argument
589
+ // was added to `checkNumberLength()` function. If present, that `country` will be used
590
+ // to check phone number length for that specific `country` rather than the "main" country
591
+ // for the shared "country calling code".
592
+
593
+ function we(e,t,n,o){if(n){
594
+ // If a specific `country` is specified, re-create a metadata instance with it.
595
+ o=new le(o.metadata);o.selectNumberingPlan(n)}var d=o.type(t);
596
+ // There should always be "<possiblePengths/>" set for every type element.
597
+ // This is declared in the XML schema.
598
+ // For size efficiency, where a sub-description (e.g. fixed-line)
599
+ // has the same "<possiblePengths/>" as the "general description", this is missing,
600
+ // so we fall back to the "general description". Where no numbers of the type
601
+ // exist at all, there is one possible length (-1) which is guaranteed
602
+ // not to match the length of any real phone number.
603
+ var r=d&&d.possibleLengths()||o.possibleLengths();
604
+ // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()
605
+ // Metadata before version `1.0.18` didn't contain `possible_lengths`.
606
+ if(!r){return"IS_POSSIBLE"}var i=e.length;
607
+ // In `libphonenumber-js` all "local-only" formats are dropped for simplicity.
608
+ // // This is safe because there is never an overlap beween the possible lengths
609
+ // // and the local-only lengths; this is checked at build time.
610
+ // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)
611
+ // {
612
+ // return 'IS_POSSIBLE_LOCAL_ONLY'
613
+ // }
614
+ var s=r[0];if(s===i){return"IS_POSSIBLE"}if(s>i){return"TOO_SHORT"}if(r[r.length-1]<i){return"TOO_LONG"}
615
+ // We skip the first element since we've already checked it.
616
+ return r.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}
617
+ /**
618
+ * Checks if a phone number is "possible" (basically just checks its length).
619
+ *
620
+ * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)
621
+ *
622
+ * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
623
+ * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
624
+ *
625
+ * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
626
+ * @param {object} [options]
627
+ * @param {object} metadataJson
628
+ * @return {string}
629
+ */function xe(e,t,n){
630
+ /* istanbul ignore if */
631
+ if(t===undefined){t={}}var o=new le(n);if(t.v2){if(!e.countryCallingCode){throw new Error("Invalid phone number object passed")}o.selectNumberingPlan(e.country||e.countryCallingCode)}else{if(!e.phone){return false}if(e.country){if(!o.hasCountry(e.country)){throw new Error("Unknown country: ".concat(e.country))}o.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode){throw new Error("Invalid phone number object passed")}o.selectNumberingPlan(e.countryCallingCode)}}
632
+ // Old (legacy) metadata (< 1.0.18) had no "possible length" data.
633
+ // So `isPossibleNumber()` function is supported only for non-legacy metadata.
634
+ if(o.possibleLengths()){return ke(e.phone||e.nationalNumber,o)}
635
+ // There was a bug in versions from `1.7.35` to `1.7.37` of `libphonenumber-js`
636
+ // where "possible_lengths" property was missing from "non-geographical" numbering plans' metadata.
637
+ // After that, the bug was noticed and fixed.
638
+ // So for versions from `1.7.35` to `1.7.37`, just assume that all "non=geotraphical" numbers are possible.
639
+ // The reason is that the bug was noticed relatively quickly (within a day or so)
640
+ // and it's unlikely that anyone generated their custom metadata in that short time span.
641
+ // And if they didn't generate any custom metadata then a follow-up package update would've silently fixed the bug.
642
+ if(e.countryCallingCode&&o.isNonGeographicCallingCode(e.countryCallingCode)){return true}
643
+ // `isPossibleNumber()` function is not supported.
644
+ throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}
645
+ /**
646
+ * Tells if a given national (significant) number is possible
647
+ * @param {string} nationalNumber
648
+ * @param {Metadata} metadata = Metadata instance with a pre-selected telephone numbering plan.
649
+ * @returns {boolean}
650
+ */function ke(e,t){switch(ze(e,undefined,t)){case"IS_POSSIBLE":return true;
651
+ // This library ignores "local-only" phone numbers (for simplicity).
652
+ // See the readme for more info on what are "local-only" phone numbers.
653
+ // case 'IS_POSSIBLE_LOCAL_ONLY':
654
+ // return !isInternational
655
+ default:return false}}
656
+ /**
657
+ * Checks whether the entire input sequence can be matched
658
+ * against the regular expression.
659
+ * @return {boolean}
660
+ */function Ce(e,t){
661
+ // If the assigning of the `''` default value is moved to the arguments above,
662
+ // the code coverage would decrease for some weird reason.
663
+ e=e||"";return new RegExp("^(?:"+t+")$").test(e)}function Se(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Oe(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Oe(e,t){if(e){if("string"==typeof e)return Ee(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ee(e,t):void 0}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Ne=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];
664
+ // Finds out national phone number type (fixed line, mobile, etc)
665
+ function Ie(e,t,n){
666
+ // If assigning the `{}` default value is moved to the arguments above,
667
+ // code coverage would decrease for some weird reason.
668
+ t=t||{};
669
+ // When `parse()` returns an empty object — `{}` —
670
+ // that means that the phone number is malformed,
671
+ // so it can't possibly be valid.
672
+ if(!e.country&&!e.countryCallingCode){return}var o=new le(n);o.selectNumberingPlan(e.country||e.countryCallingCode);var d=t.v2?e.nationalNumber:e.phone;
673
+ // The following is copy-pasted from the original function:
674
+ // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835
675
+ // Is this national number even valid for this country
676
+ if(!Ce(d,o.nationalNumberPattern())){return}
677
+ // Is it fixed line number
678
+ if(Ae(d,"FIXED_LINE",o)){
679
+ // Because duplicate regular expressions are removed
680
+ // to reduce metadata size, if "mobile" pattern is ""
681
+ // then it means it was removed due to being a duplicate of the fixed-line pattern.
682
+ if(o.type("MOBILE")&&o.type("MOBILE").pattern()===""){return"FIXED_LINE_OR_MOBILE"}
683
+ // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.
684
+ // For example, for "US" country.
685
+ // Old metadata (< `1.0.18`) had a specific "types" data structure
686
+ // that happened to be `undefined` for `MOBILE` in that case.
687
+ // Newer metadata (>= `1.0.18`) has another data structure that is
688
+ // not `undefined` for `MOBILE` in that case (it's just an empty array).
689
+ // So this `if` is just for backwards compatibility with old metadata.
690
+ if(!o.type("MOBILE")){return"FIXED_LINE_OR_MOBILE"}
691
+ // Check if the number happens to qualify as both fixed line and mobile.
692
+ // (no such country in the minimal metadata set)
693
+ /* istanbul ignore if */if(Ae(d,"MOBILE",o)){return"FIXED_LINE_OR_MOBILE"}return"FIXED_LINE"}for(var r=Se(Ne),i;!(i=r()).done;){var s=i.value;if(Ae(d,s,o)){return s}}}function Ae(e,t,n){var o=n.type(t);if(!o||!o.pattern()){return false}
694
+ // Check if any possible number lengths are present;
695
+ // if so, we use them to avoid checking
696
+ // the validation pattern if they don't match.
697
+ // If they are absent, this means they match
698
+ // the general description, which we have
699
+ // already checked before a specific number type.
700
+ if(o.possibleLengths()&&o.possibleLengths().indexOf(e.length)<0){return false}return Ce(e,o.pattern())}
701
+ /**
702
+ * Checks if a given phone number is valid.
703
+ *
704
+ * isValid(phoneNumberInstance, { ..., v2: true }, metadata)
705
+ *
706
+ * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
707
+ * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
708
+ *
709
+ * If the `number` is a string, it will be parsed to an object,
710
+ * but only if it contains only valid phone number characters (including punctuation).
711
+ * If the `number` is an object, it is used as is.
712
+ *
713
+ * The optional `defaultCountry` argument is the default country.
714
+ * I.e. it does not restrict to just that country,
715
+ * e.g. in those cases where several countries share
716
+ * the same phone numbering rules (NANPA, Britain, etc).
717
+ * For example, even though the number `07624 369230`
718
+ * belongs to the Isle of Man ("IM" country code)
719
+ * calling `isValidNumber('07624369230', 'GB', metadata)`
720
+ * still returns `true` because the country is not restricted to `GB`,
721
+ * it's just that `GB` is the default one for the phone numbering rules.
722
+ * For restricting the country see `isValidNumberForRegion()`
723
+ * though restricting a country might not be a good idea.
724
+ * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion
725
+ *
726
+ * Examples:
727
+ *
728
+ * ```js
729
+ * isValidNumber('+78005553535', metadata)
730
+ * isValidNumber('8005553535', 'RU', metadata)
731
+ * isValidNumber('88005553535', 'RU', metadata)
732
+ * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)
733
+ * ```
734
+ */function je(e,t,n){
735
+ // If assigning the `{}` default value is moved to the arguments above,
736
+ // code coverage would decrease for some weird reason.
737
+ t=t||{};var o=new le(n);o.selectNumberingPlan(e.country||e.countryCallingCode);
738
+ // By default, countries only have type regexps when it's required for
739
+ // distinguishing different countries having the same `countryCallingCode`.
740
+ if(o.hasTypes()){return Ie(e,t,o.metadata)!==undefined}
741
+ // If there are no type regexps for this country in metadata then use
742
+ // `nationalNumberPattern` as a "better than nothing" replacement.
743
+ var d=t.v2?e.nationalNumber:e.phone;return Ce(d,o.nationalNumberPattern())}var Te=/^[A-Z]{2}$/;function Le(e){return Te.test(e)}function Pe(e,t){var n;var o;var d=new le(t);
744
+ // If country code is passed then derive `countryCallingCode` from it.
745
+ // Also store the country code as `.country`.
746
+ if(Le(e)){n=e;d.selectNumberingPlan(n);o=d.countryCallingCode()}else{o=e}return{country:n,callingCode:o}}
747
+ /**
748
+ * Returns a list of countries that the phone number could potentially belong to.
749
+ * @param {string} callingCode — Calling code.
750
+ * @param {string} nationalNumber — National (significant) number.
751
+ * @param {object} metadata — Metadata.
752
+ * @return {string[]} A list of possible countries.
753
+ */function Me(e,t,n){var o=new le(n);var d=o.getCountryCodesForCallingCode(e);if(!d){return[]}return d.filter((function(e){return Re(t,e,n)}))}function Re(e,t,n){var o=new le(n);o.selectNumberingPlan(t);return o.numberingPlan.possibleLengths().indexOf(e.length)>=0}
754
+ // The minimum length of the national significant number.
755
+ var _e=2;
756
+ // The ITU says the maximum length should be 15,
757
+ // but one can find longer numbers in Germany.
758
+ var Fe=17;
759
+ // The maximum length of the country calling code.
760
+ var Be=3;
761
+ // Digits accepted in phone numbers
762
+ // (ascii, fullwidth, arabic-indic, and eastern arabic digits).
763
+ var De="0-90-9٠-٩۰-۹";
764
+ // `DASHES` will be right after the opening square bracket of the "character class"
765
+ var Ge="-‐-―−ー-";var Ue="//";var Ve="..";var He="  ­​⁠ ";var Ke="()()[]\\[\\]";
766
+ // export const OPENING_BRACKETS = '(\uFF08\uFF3B\\\['
767
+ var We="~⁓∼~";
768
+ // Regular expression of acceptable punctuation found in phone numbers. This
769
+ // excludes punctuation found as a leading character only. This consists of dash
770
+ // characters, white space characters, full stops, slashes, square brackets,
771
+ // parentheses and tildes. Full-width variants are also present.
772
+ var Ze="".concat(Ge).concat(Ue).concat(Ve).concat(He).concat(Ke).concat(We);var Ye="++";
773
+ // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')
774
+ var qe=new RegExp("(["+De+"])");function Je(e,t,n,o){if(!t){return}
775
+ // Get the IDD prefix pattern.
776
+ var d=new le(o);d.selectNumberingPlan(t||n);var r=new RegExp(d.IDDPrefix());
777
+ // Check if the number is IDD-prefixed.
778
+ if(e.search(r)!==0){return}
779
+ // Strip IDD prefix.
780
+ e=e.slice(e.match(r)[0].length);
781
+ // If there're any digits after an IDD prefix,
782
+ // then those digits are a country calling code.
783
+ // Since no country code starts with a `0`,
784
+ // the code below validates that the next digit (if present) is not `0`.
785
+ var i=e.match(qe);if(i&&i[1]!=null&&i[1].length>0){if(i[1]==="0"){return}}return e}
786
+ /**
787
+ * Strips any national prefix (such as 0, 1) present in a
788
+ * (possibly incomplete) number provided.
789
+ * "Carrier codes" are only used in Colombia and Brazil,
790
+ * and only when dialing within those countries from a mobile phone to a fixed line number.
791
+ * Sometimes it won't actually strip national prefix
792
+ * and will instead prepend some digits to the `number`:
793
+ * for example, when number `2345678` is passed with `VI` country selected,
794
+ * it will return `{ number: "3402345678" }`, because `340` area code is prepended.
795
+ * @param {string} number — National number digits.
796
+ * @param {object} metadata — Metadata with country selected.
797
+ * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.
798
+ */function Xe(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){
799
+ // See METADATA.md for the description of
800
+ // `national_prefix_for_parsing` and `national_prefix_transform_rule`.
801
+ // Attempt to parse the first digits as a national prefix.
802
+ var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")");var o=n.exec(e);if(o){var d;var r;
803
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
804
+ // If a `national_prefix_for_parsing` has any "capturing groups"
805
+ // then it means that the national (significant) number is equal to
806
+ // those "capturing groups" transformed via `national_prefix_transform_rule`,
807
+ // and nothing could be said about the actual national prefix:
808
+ // what is it and was it even there.
809
+ // If a `national_prefix_for_parsing` doesn't have any "capturing groups",
810
+ // then everything it matches is a national prefix.
811
+ // To determine whether `national_prefix_for_parsing` matched any
812
+ // "capturing groups", the value of the result of calling `.exec()`
813
+ // is looked at, and if it has non-undefined values where there're
814
+ // "capturing groups" in the regular expression, then it means
815
+ // that "capturing groups" have been matched.
816
+ // It's not possible to tell whether there'll be any "capturing gropus"
817
+ // before the matching process, because a `national_prefix_for_parsing`
818
+ // could exhibit both behaviors.
819
+ var i=o.length-1;var s=i>0&&o[i];if(t.nationalPrefixTransformRule()&&s){d=e.replace(n,t.nationalPrefixTransformRule());
820
+ // If there's more than one captured group,
821
+ // then carrier code is the second one.
822
+ if(i>1){r=o[1]}}
823
+ // If there're no "capturing groups",
824
+ // or if there're "capturing groups" but no
825
+ // `national_prefix_transform_rule`,
826
+ // then just strip the national prefix from the number,
827
+ // and possibly a carrier code.
828
+ // Seems like there could be more.
829
+ else{
830
+ // `prefixBeforeNationalNumber` is the whole substring matched by
831
+ // the `national_prefix_for_parsing` regular expression.
832
+ // There seem to be no guarantees that it's just a national prefix.
833
+ // For example, if there's a carrier code, it's gonna be a
834
+ // part of `prefixBeforeNationalNumber` too.
835
+ var a=o[0];d=e.slice(a.length);
836
+ // If there's at least one captured group,
837
+ // then carrier code is the first one.
838
+ if(s){r=o[1]}}
839
+ // Tries to guess whether a national prefix was present in the input.
840
+ // This is not something copy-pasted from Google's library:
841
+ // they don't seem to have an equivalent for that.
842
+ // So this isn't an "officially approved" way of doing something like that.
843
+ // But since there seems no other existing method, this library uses it.
844
+ var u;if(s){var l=e.indexOf(o[1]);var $=e.slice(0,l);
845
+ // Example: an Argentinian (AR) phone number `0111523456789`.
846
+ // `prefixMatch[0]` is `01115`, and `$1` is `11`,
847
+ // and the rest of the phone number is `23456789`.
848
+ // The national number is transformed via `9$1` to `91123456789`.
849
+ // National prefix `0` is detected being present at the start.
850
+ // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {
851
+ if($===t.numberingPlan.nationalPrefix()){u=t.numberingPlan.nationalPrefix()}}else{u=o[0]}return{nationalNumber:d,nationalPrefix:u,carrierCode:r}}}return{nationalNumber:e}}function Qe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=et(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function et(e,t){if(e){if("string"==typeof e)return tt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(e,t):void 0}}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}
852
+ /**
853
+ * Returns the exact country that a given national (significant) number belongs to
854
+ * in case of ambiguity, i.e. when multiple countries share the same "country calling code".
855
+ * @param {string} [nationalNumber]
856
+ * @param {string[]} countries — A list of countries that share the same calling code.
857
+ * @param {object} metadata — Metadata JSON.
858
+ * @returns {string?} Returns the exact country this number belongs to, or `undefined` if the exact country couldn't be determined.
859
+ */function nt(e,t,n){
860
+ // Create a new `metadata` instance because it will be selecting a `country`.
861
+ var o=new le(n);
862
+ // const matchingCountries = []
863
+ for(var d=Qe(t),r;!(r=d()).done;){var i=r.value;o.selectNumberingPlan(i);
864
+ // "Leading digits" patterns are only defined for about 20% of all countries.
865
+ // By definition, matching "leading digits" is a sufficient but not a necessary
866
+ // condition for a phone number to belong to a country.
867
+ // The point of "leading digits" check is that it's the fastest one to get a match.
868
+ // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits
869
+ // I'd suppose that "leading digits" patterns are mutually exclusive for different countries
870
+ // because of the intended use of that feature.
871
+ if(o.leadingDigits()){if(e&&e.search(o.leadingDigits())===0){return i}}
872
+ // Else perform full validation with all of those
873
+ // fixed-line/mobile/etc regular expressions.
874
+ else if(Ie({phone:e,country:i},undefined,o.metadata)){
875
+ // When multiple countries share the same "country calling code",
876
+ // type patterns aren't guaranteed to be unique among them.
877
+ // For example, both `US` and `CA` have the same pattern for `toll_free` numbers.
878
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572
879
+ // That means that this `if` condition could be `true` for multiple countries from the list.
880
+ // Currently, it just returns the first one, which is also the "main" country for the "country calling code".
881
+ // In an example with `toll_free` numbers above, `"US"` would be returned even though
882
+ // it could as well be `"CA"`.
883
+ // There was also a time when this attempted to be overly smart
884
+ // and kept track of all such multiple matching countries
885
+ // and then picked the one that matched the `defaultCountry`, if provided.
886
+ // For example, with `toll_free` numbers above, and with `defaultCountry: "CA"`,
887
+ // it would've returned `"CA"` instead of `"US"`.
888
+ // Later it turned out that such "overly smart" behavior turned out to be just confusing,
889
+ // so this "overly smart" country detection was reverted to returning the "main" country
890
+ // for the "country calling code".
891
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154
892
+ return i;
893
+
894
+ // The "overly smart" behavior code:
895
+
896
+ // if (defaultCountry) {
897
+ // if (country === defaultCountry) {
898
+ // return country
899
+ // } else {
900
+ // matchingCountries.push(country)
901
+ // }
902
+ // } else {
903
+ // return country
904
+ // }
905
+ }}
906
+ // // Return the first ("main") one of the `matchingCountries`.
907
+ // if (matchingCountries.length > 0) {
908
+ // return matchingCountries[0]
909
+ // }
910
+ }
911
+ /**
912
+ * Returns the exact country that a given national (significant) number belongs to
913
+ * in case of ambiguity, i.e. when multiple countries share the same "country calling code".
914
+ * @param {string} [callingCode]
915
+ * @param {string} [options.nationalNumber] — National (significant) number.
916
+ * @param {Metadata} options.metadata — Metadata instance.
917
+ * @returns {string?} Returns the most suitable country for this calling code and national (significant) number.
918
+ */function ot(e,t){var n=t.nationalNumber,o=t.metadata;var d=o.getCountryCodesForCallingCode(e);if(!d){return}
919
+ // If there's just one country corresponding to the country code,
920
+ // then just return it, without further phone number digits validation.
921
+ if(d.length===1){return d[0]}return nt(n,d,o.metadata)}
922
+ /**
923
+ * Strips national prefix and carrier code from a complete phone number.
924
+ * The difference from the non-"FromCompleteNumber" function is that
925
+ * it won't extract national prefix if the resultant number is too short
926
+ * to be a complete number for the selected phone numbering plan.
927
+ * @param {string} number — Complete phone number digits.
928
+ * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.
929
+ * @param {Metadata} metadata — Metadata instance with a selected numbering plan.
930
+ * @return {object} `{ nationalNumber: string, carrierCode: string? }`.
931
+ */function dt(e,t,n){
932
+ // Parsing national prefixes and carrier codes
933
+ // is only required for local phone numbers
934
+ // but some people don't understand that
935
+ // and sometimes write international phone numbers
936
+ // with national prefixes (or maybe even carrier codes).
937
+ // http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html
938
+ // Google's original library forgives such mistakes
939
+ // and so does this library, because it has been requested:
940
+ // https://github.com/catamphetamine/libphonenumber-js/issues/127
941
+ var o=Xe(e,n),d=o.carrierCode,r=o.nationalNumber;if(r!==e){if(!rt(e,r,n)){
942
+ // Don't strip the national prefix.
943
+ return{nationalNumber:e}}
944
+ // Check the national (significant) number length after extracting national prefix and carrier code.
945
+ // Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature,
946
+ // so this `if` will only be executed with newer metadata.
947
+ if(n.numberingPlan.possibleLengths()){
948
+ // If an exact `country` is not specified, attempt to detect it from the assumed national number.
949
+ if(!t){t=ot(n.numberingPlan.callingCode(),{nationalNumber:r,metadata:n})}
950
+ // The number remaining after stripping the national prefix and carrier code
951
+ // should be long enough to have a possible length for the country.
952
+ // Otherwise, don't strip the national prefix and carrier code,
953
+ // since the original number could be a valid number.
954
+ // This check has been copy-pasted "as is" from Google's original library:
955
+ // https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250
956
+ // It doesn't check for the "possibility" of the original `number`.
957
+ // I guess it's fine not checking that one. It works as is anyway.
958
+ if(!it(r,t,n)){
959
+ // Don't strip the national prefix.
960
+ return{nationalNumber:e}}}}return{nationalNumber:r,carrierCode:d}}
961
+ // In some countries, the same digit could be a national prefix
962
+ // or a leading digit of a valid phone number.
963
+ // For example, in Russia, national prefix is `8`,
964
+ // and also `800 555 35 35` is a valid number
965
+ // in which `8` is not a national prefix, but the first digit
966
+ // of a national (significant) number.
967
+ // Same's with Belarus:
968
+ // `82004910060` is a valid national (significant) number,
969
+ // but `2004910060` is not.
970
+ // To support such cases (to prevent the code from always stripping
971
+ // national prefix), a condition is imposed: a national prefix
972
+ // is not extracted when the original number is "viable" and the
973
+ // resultant number is not, a "viable" national number being the one
974
+ // that matches `national_number_pattern`.
975
+ function rt(e,t,n){
976
+ // The equivalent in Google's code is:
977
+ // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004
978
+ if(Ce(e,n.nationalNumberPattern())&&!Ce(t,n.nationalNumberPattern())){return false}
979
+ // This "is possible" national number (length) check has been commented out
980
+ // because it's superceded by the (effectively) same check done in the
981
+ // `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.
982
+ // In other words, why run the same check twice if it could only be run once.
983
+ // // Check the national (significant) number length after extracting national prefix and carrier code.
984
+ // // Fixes a minor "weird behavior" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57
985
+ // // (Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature).
986
+ // if (metadata.possibleLengths()) {
987
+ // if (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&
988
+ // !isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {
989
+ // return false
990
+ // }
991
+ // }
992
+ return true}
993
+ /**
994
+ * Tells if a given incomplete national number is possible or not.
995
+ * @param {string} nationalNumber
996
+ * @param {string?} country — Specific country rather than the one that is pre-selected in the metadata instance.
997
+ * @param {Metadata} metadata — Metadata instance with a selected numbering plan.
998
+ * @returns {boolean}
999
+ */function it(e,t,n){switch(ze(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":
1000
+ // This library ignores "local-only" phone numbers (for simplicity).
1001
+ // See the readme for more info on what are "local-only" phone numbers.
1002
+ // case 'IS_POSSIBLE_LOCAL_ONLY':
1003
+ return false;default:return true}}
1004
+ /**
1005
+ * Sometimes some people incorrectly input international phone numbers
1006
+ * without the leading `+`. This function corrects such input.
1007
+ * @param {string} number — Phone number digits (only digits, no `+`).
1008
+ * @param {string} [country] — Exact country of the phone number.
1009
+ * @param {string} [defaultCountry]
1010
+ * @param {string} [defaultCallingCode]
1011
+ * @param {object} metadataJson
1012
+ * @return {object} `{ countryCallingCode: string?, number: string }`, where `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code.
1013
+ */function st(e,t,n,o,d){
1014
+ // Validate arguments.
1015
+ // The `number` is known to be in a non-international form
1016
+ // because there's no leading "+" character.
1017
+ // Therefore, there must be either `country` or `defaultCountry` or `defaultCallingCode`.
1018
+ // Otherwise, there'd be no source for the calling code to search for in the `number`.
1019
+ if(!(t||n||o)){
1020
+ // There's no source for the calling code to search for in the `number`.
1021
+ return{number:e}}var r=t||n?ye(t||n,d):o;if(e.indexOf(r)===0){var i=new le(d);i.selectNumberingPlan(t||n||o);var s=e.slice(r.length);var a=dt(s,undefined,i),u=a.nationalNumber;var l=dt(e,undefined,i),$=l.nationalNumber;
1022
+ // If the number was not valid before but is valid now,
1023
+ // or if it was too long before, we consider the number
1024
+ // with the country calling code stripped to be a better result
1025
+ // and keep that instead.
1026
+ // For example, in Germany (+49), `49` is a valid area code,
1027
+ // so if a number starts with `49`, it could be both a valid
1028
+ // national German number or an international number without
1029
+ // a leading `+`.
1030
+ if(!Ce($,i.nationalNumberPattern())&&Ce(u,i.nationalNumberPattern())||ze($,undefined,i)==="TOO_LONG"){return{countryCallingCode:r,number:s}}}return{number:e}}
1031
+ /**
1032
+ * Attempts to extract a calling code from a phone number.
1033
+ * * If the phone number is found to be "international":
1034
+ * * It will attempt to identify the calling code part of it and whether that part is complete and valid.
1035
+ * * If the calling code part is complete and valid, it will return two properties:
1036
+ * that calling code part (without `+`) and the rest of the digits.
1037
+ * * Otherwise, i.e. if the calling code part is incomplete or invalid,
1038
+ * it will return an empty object.
1039
+ * * Otherwise, i.e. if the phone number is national, there's no callind code to extract
1040
+ * so it will just return the originally-passed `number` string as the only property.
1041
+ * @param {string} number — Phone number digits (possibly with a `+`).
1042
+ * @param {string} [country] — Country.
1043
+ * @param {string} [defaultCountry] — Default country.
1044
+ * @param {string} [defaultCallingCode] — Default calling code (some phone numbering plans are non-geographic).
1045
+ * @param {object} metadataJson
1046
+ * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`, where `countryCallingCodeSource` tells how the returned calling code was extracted (if it was extracted), `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code (and without a `+`). If the calling code is present but incomplete or invalid, it will return an empty object.
1047
+ * @example
1048
+ * // Returns `{ countryCallingCode: "1", number: "2133734253" }`.
1049
+ * extractCountryCallingCode('2133734253', 'US', null, null, metadata)
1050
+ * extractCountryCallingCode('2133734253', null, 'US', null, metadata)
1051
+ * extractCountryCallingCode('2133734253', null, null, '1', metadata)
1052
+ * extractCountryCallingCode('+12133734253', null, null, null, metadata)
1053
+ * extractCountryCallingCode('+12133734253', null, 'RU', null, metadata)
1054
+ */function at(e,t,n,o,d){if(!e){return{}}var r;
1055
+ // If this is not an international phone number,
1056
+ // then either extract an "IDD" prefix, or extract a
1057
+ // country calling code from a number by autocorrecting it
1058
+ // by prepending a leading `+` in cases when it starts
1059
+ // with the country calling code.
1060
+ // https://wikitravel.org/en/International_dialling_prefix
1061
+ // https://github.com/catamphetamine/libphonenumber-js/issues/376
1062
+ if(e[0]!=="+"){
1063
+ // Convert an "out-of-country" dialing phone number
1064
+ // to a proper international phone number.
1065
+ var i=Je(e,t||n,o,d);
1066
+ // If an IDD prefix was stripped then
1067
+ // convert the number to international one
1068
+ // for subsequent parsing.
1069
+ if(i&&i!==e){r=true;e="+"+i}else{
1070
+ // Check to see if the number starts with the country calling code
1071
+ // for the default country. If so, we remove the country calling code,
1072
+ // and do some checks on the validity of the number before and after.
1073
+ // https://github.com/catamphetamine/libphonenumber-js/issues/376
1074
+ if(t||n||o){var s=st(e,t,n,o,d),a=s.countryCallingCode,u=s.number;if(a){return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:u}}}return{
1075
+ // No need to set it to `UNSPECIFIED`. It can be just `undefined`.
1076
+ // countryCallingCodeSource: 'UNSPECIFIED',
1077
+ number:e}}}
1078
+ // `number` can only be international at this point.
1079
+ // Fast abortion: country codes do not begin with a '0'
1080
+ if(e[1]==="0"){return{}}var l=new le(d);
1081
+ // The thing with country phone codes
1082
+ // is that they are orthogonal to each other
1083
+ // i.e. there's no such country phone code A
1084
+ // for which country phone code B exists
1085
+ // where B starts with A.
1086
+ // Therefore, while scanning digits,
1087
+ // if a valid country code is found,
1088
+ // that means that it is the country code.
1089
+
1090
+ var $=2;while($-1<=Be&&$<=e.length){var f=e.slice(1,$);if(l.hasCallingCode(f)){l.selectNumberingPlan(f);return{countryCallingCodeSource:r?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:f,number:e.slice($)}}$++}return{}}
1091
+ // The possible values for the returned `countryCallingCodeSource` are:
1092
+
1093
+ // Copy-pasted from:
1094
+ // https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto
1095
+
1096
+ // // The source from which the country_code is derived. This is not set in the
1097
+ // // general parsing method, but in the method that parses and keeps raw_input.
1098
+ // // New fields could be added upon request.
1099
+ // enum CountryCodeSource {
1100
+ // // Default value returned if this is not set, because the phone number was
1101
+ // // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will
1102
+ // // return false if this is the case.
1103
+ // UNSPECIFIED = 0;
1104
+
1105
+ // // The country_code is derived based on a phone number with a leading "+",
1106
+ // // e.g. the French number "+33 1 42 68 53 00".
1107
+ // FROM_NUMBER_WITH_PLUS_SIGN = 1;
1108
+
1109
+ // // The country_code is derived based on a phone number with a leading IDD,
1110
+ // // e.g. the French number "011 33 1 42 68 53 00", as it is dialled from US.
1111
+ // FROM_NUMBER_WITH_IDD = 5;
1112
+
1113
+ // // The country_code is derived based on a phone number without a leading
1114
+ // // "+", e.g. the French number "33 1 42 68 53 00" when defaultCountry is
1115
+ // // supplied as France.
1116
+ // FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;
1117
+
1118
+ // // The country_code is derived NOT based on the phone number itself, but
1119
+ // // from the defaultCountry parameter provided in the parsing function by the
1120
+ // // clients. This happens mostly for numbers written in the national format
1121
+ // // (without country code). For example, this would be set when parsing the
1122
+ // // French number "01 42 68 53 00", when defaultCountry is supplied as
1123
+ // // France.
1124
+ // FROM_DEFAULT_COUNTRY = 20;
1125
+ // }
1126
+ // Removes brackets and replaces dashes with spaces.
1127
+
1128
+ // E.g. "(999) 111-22-33" -> "999 111 22 33"
1129
+
1130
+ // For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.
1131
+ // Meanwhile, there's no single opinion about using punctuation in international phone numbers.
1132
+
1133
+ // For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.
1134
+ // And here's a quote from WikiPedia's "North American Numbering Plan" page:
1135
+ // https://en.wikipedia.org/wiki/North_American_Numbering_Plan
1136
+
1137
+ // "The country calling code for all countries participating in the NANP is 1.
1138
+ // In international format, an NANP number should be listed as +1 301 555 01 00,
1139
+ // where 301 is an area code (Maryland)."
1140
+
1141
+ // I personally prefer the international format without any punctuation.
1142
+ // For example, brackets are remnants of the old age, meaning that the
1143
+ // phone number part in brackets (so called "area code") can be omitted
1144
+ // if dialing within the same "area".
1145
+ // And hyphens were clearly introduced for splitting local numbers into memorizable groups.
1146
+ // For example, remembering "5553535" is difficult but "555-35-35" is much simpler.
1147
+ // Imagine a man taking a bus from home to work and seeing an ad with a phone number.
1148
+ // He has a couple of seconds to memorize that number until it passes by.
1149
+ // If it were spaces instead of hyphens the man wouldn't necessarily get it,
1150
+ // but with hyphens instead of spaces the grouping is more explicit.
1151
+ // I personally think that hyphens introduce visual clutter,
1152
+ // so I prefer replacing them with spaces in international numbers.
1153
+ // In the modern age all output is done on displays where spaces are clearly distinguishable
1154
+ // so hyphens can be safely replaced with spaces without losing any legibility.
1155
+
1156
+ function ut(e){return e.replace(new RegExp("[".concat(Ze,"]+"),"g")," ").trim()}
1157
+ // This was originally set to $1 but there are some countries for which the
1158
+ // first group is not used in the national pattern (e.g. Argentina) so the $1
1159
+ // group does not match correctly. Therefore, we use `\d`, so that the first
1160
+ // group actually used in the pattern will be matched.
1161
+ var lt=/(\$\d)/;function $t(e,t,n){var o=n.useInternationalFormat,d=n.withNationalPrefix;var r=e.replace(new RegExp(t.pattern()),o?t.internationalFormat():
1162
+ // This library doesn't use `domestic_carrier_code_formatting_rule`,
1163
+ // because that one is only used when formatting phone numbers
1164
+ // for dialing from a mobile phone, and this is not a dialing library.
1165
+ // carrierCode && format.domesticCarrierCodeFormattingRule()
1166
+ // // First, replace the $CC in the formatting rule with the desired carrier code.
1167
+ // // Then, replace the $FG in the formatting rule with the first group
1168
+ // // and the carrier code combined in the appropriate way.
1169
+ // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))
1170
+ // : (
1171
+ // withNationalPrefix && format.nationalPrefixFormattingRule()
1172
+ // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
1173
+ // : format.format()
1174
+ // )
1175
+ d&&t.nationalPrefixFormattingRule()?t.format().replace(lt,t.nationalPrefixFormattingRule()):t.format());if(o){return ut(r)}return r}
1176
+ /**
1177
+ * Pattern that makes it easy to distinguish whether a region has a single
1178
+ * international dialing prefix or not. If a region has a single international
1179
+ * prefix (e.g. 011 in USA), it will be represented as a string that contains
1180
+ * a sequence of ASCII digits, and possibly a tilde, which signals waiting for
1181
+ * the tone. If there are multiple available international prefixes in a
1182
+ * region, they will be represented as a regex string that always contains one
1183
+ * or more characters that are not ASCII digits or a tilde.
1184
+ */var ft=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
1185
+ // If the `country` supports IDD calling, it returns a preferred IDD prefix.
1186
+ // If the `country` doesn't support IDD calling, it returns `undefined`.
1187
+ function ct(e,t,n){var o=new le(n);o.selectNumberingPlan(e||t);if(o.defaultIDDPrefix()){return o.defaultIDDPrefix()}if(ft.test(o.IDDPrefix())){return o.IDDPrefix()}}
1188
+ // The RFC 3966 format for extensions.
1189
+ var ht=";ext=";
1190
+ /**
1191
+ * Helper method for constructing regular expressions for parsing. Creates
1192
+ * an expression that captures up to max_length digits.
1193
+ * @return {string} RegEx pattern to capture extension digits.
1194
+ */var pt=function e(t){return"([".concat(De,"]{1,").concat(t,"})")};
1195
+ /**
1196
+ * Helper initialiser method to create the regular-expression pattern to match
1197
+ * extensions.
1198
+ * Copy-pasted from Google's `libphonenumber`:
1199
+ * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
1200
+ * @return {string} RegEx pattern to capture extensions.
1201
+ */function vt(e){
1202
+ // We cap the maximum length of an extension based on the ambiguity of the way
1203
+ // the extension is prefixed. As per ITU, the officially allowed length for
1204
+ // extensions is actually 40, but we don't support this since we haven't seen real
1205
+ // examples and this introduces many false interpretations as the extension labels
1206
+ // are not standardized.
1207
+ /** @type {string} */
1208
+ var t="20";
1209
+ /** @type {string} */var n="15";
1210
+ /** @type {string} */var o="9";
1211
+ /** @type {string} */var d="6";
1212
+ /** @type {string} */var r="[  \\t,]*";
1213
+ // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
1214
+ /** @type {string} */var i="[:\\..]?[  \\t,-]*";
1215
+ /** @type {string} */var s="#?";
1216
+ // Here the extension is called out in more explicit way, i.e mentioning it obvious
1217
+ // patterns like "ext.".
1218
+ /** @type {string} */var a="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)";
1219
+ // One-character symbols that can be used to indicate an extension, and less
1220
+ // commonly used or more ambiguous extension labels.
1221
+ /** @type {string} */var u="(?:[xx##~~]|int|int)";
1222
+ // When extension is not separated clearly.
1223
+ /** @type {string} */var l="[- ]+";
1224
+ // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
1225
+ // comma as extension label may have it.
1226
+ /** @type {string} */var $="[  \\t]*";
1227
+ // ",," is commonly used for auto dialling the extension when connected. First
1228
+ // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
1229
+ // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
1230
+ // button with the extension number following.
1231
+ /** @type {string} */var f="(?:,{2}|;)";
1232
+ /** @type {string} */var c=ht+pt(t);
1233
+ /** @type {string} */var h=r+a+i+pt(t)+s;
1234
+ /** @type {string} */var p=r+u+i+pt(o)+s;
1235
+ /** @type {string} */var v=l+pt(d)+"#";
1236
+ /** @type {string} */var b=$+f+i+pt(n)+s;
1237
+ /** @type {string} */var y=$+"(?:,)+"+i+pt(o)+s;
1238
+ // The first regular expression covers RFC 3966 format, where the extension is added
1239
+ // using ";ext=". The second more generic where extension is mentioned with explicit
1240
+ // labels like "ext:". In both the above cases we allow more numbers in extension than
1241
+ // any other extension labels. The third one captures when single character extension
1242
+ // labels or less commonly used labels are used. In such cases we capture fewer
1243
+ // extension digits in order to reduce the chance of falsely interpreting two
1244
+ // numbers beside each other as a number + extension. The fourth one covers the
1245
+ // special case of American numbers where the extension is written with a hash
1246
+ // at the end, such as "- 503#". The fifth one is exclusively for extension
1247
+ // autodialling formats which are used when dialling and in this case we accept longer
1248
+ // extensions. The last one is more liberal on the number of commas that acts as
1249
+ // extension labels, so we have a strict cap on the number of digits in such extensions.
1250
+ return c+"|"+h+"|"+p+"|"+v+"|"+b+"|"+y}
1251
+ // Regular expression of viable phone numbers. This is location independent.
1252
+ // Checks we have at least three leading digits, and only valid punctuation,
1253
+ // alpha characters and digits in the phone number. Does not include extension
1254
+ // data. The symbol 'x' is allowed here as valid punctuation since it is often
1255
+ // used as a placeholder for carrier codes, for example in Brazilian phone
1256
+ // numbers. We also allow multiple '+' characters at the start.
1257
+
1258
+ // Corresponds to the following:
1259
+ // [digits]{minLengthNsn}|
1260
+ // plus_sign*
1261
+ // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
1262
+
1263
+ // The first reg-ex is to allow short numbers (two digits long) to be parsed if
1264
+ // they are entered as "15" etc, but only if there is no punctuation in them.
1265
+ // The second expression restricts the number of digits to three or more, but
1266
+ // then allows them to be in international form, and to have alpha-characters
1267
+ // and punctuation. We split up the two reg-exes here and combine them when
1268
+ // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
1269
+ // with ^ and append $ to each branch.
1270
+
1271
+ // "Note VALID_PUNCTUATION starts with a -,
1272
+ // so must be the first in the range" (c) Google devs.
1273
+ // (wtf did they mean by saying that; probably nothing)
1274
+
1275
+ var bt="["+De+"]{"+_e+"}";
1276
+
1277
+ // And this is the second reg-exp:
1278
+ // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
1279
+
1280
+ var yt="["+Ye+"]{0,1}"+"(?:"+"["+Ze+"]*"+"["+De+"]"+"){3,}"+"["+Ze+De+"]*";
1281
+ // This regular expression isn't present in Google's `libphonenumber`
1282
+ // and is only used to determine whether the phone number being input
1283
+ // is too short for it to even consider it a "valid" number.
1284
+ // This is just a way to differentiate between a really invalid phone
1285
+ // number like "abcde" and a valid phone number that a user has just
1286
+ // started inputting, like "+1" or "1": both these cases would be
1287
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1288
+ // library can provide a more detailed error message — whether it's
1289
+ // really "not a number", or is it just a start of a valid phone number.
1290
+ var mt=new RegExp("^"+"["+Ye+"]{0,1}"+"(?:"+"["+Ze+"]*"+"["+De+"]"+"){1,2}"+"$","i");var gt=yt+
1291
+ // Phone number extensions
1292
+ "(?:"+vt()+")?";
1293
+ // The combined regular expression for valid phone numbers:
1294
+
1295
+ var zt=new RegExp(
1296
+ // Either a short two-digit-only phone number
1297
+ "^"+bt+"$"+"|"+
1298
+ // Or a longer fully parsed phone number (min 3 characters)
1299
+ "^"+gt+"$","i");
1300
+ // Checks to see if the string of characters could possibly be a phone number at
1301
+ // all. At the moment, checks to see that the string begins with at least 2
1302
+ // digits, ignoring any punctuation commonly found in phone numbers. This method
1303
+ // does not require the number to be normalized in advance - but does assume
1304
+ // that leading non-number symbols have been removed, such as by the method
1305
+ // `extract_possible_number`.
1306
+
1307
+ function wt(e){return e.length>=_e&&zt.test(e)}
1308
+ // This is just a way to differentiate between a really invalid phone
1309
+ // number like "abcde" and a valid phone number that a user has just
1310
+ // started inputting, like "+1" or "1": both these cases would be
1311
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
1312
+ // library can provide a more detailed error message — whether it's
1313
+ // really "not a number", or is it just a start of a valid phone number.
1314
+ function xt(e){return mt.test(e)}
1315
+ /**
1316
+ * @param {object} - `{ ?number, ?extension }`.
1317
+ * @return {string} Phone URI (RFC 3966).
1318
+ */function kt(e){var t=e.number,n=e.ext;if(!t){return""}if(t[0]!=="+"){throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.')}return"tel:".concat(t).concat(n?";ext="+n:"")}
1319
+ // This is a port of Google Android `libphonenumber`'s
1320
+ // `phonenumberutil.js` of December 31th, 2018.
1321
+
1322
+ // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
1323
+ var Ct={formatExtension:function e(t,n,o){return"".concat(t).concat(o.ext()).concat(n)}};
1324
+ /**
1325
+ * Formats a phone number.
1326
+ *
1327
+ * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)
1328
+ * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)
1329
+ *
1330
+ * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)
1331
+ * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)
1332
+ *
1333
+ * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
1334
+ * @param {string} format
1335
+ * @param {object} [options]
1336
+ * @param {object} metadataJson
1337
+ * @return {string}
1338
+ */function St(e,t,n,o){
1339
+ // Apply default options.
1340
+ if(n){
1341
+ // Using ES6 "rest spread" syntax here didn't work with `babel`/`istanbul`
1342
+ // for some weird reason: this line of code would cause the code coverage
1343
+ // to show as not 100%. That's because `babel`/`istanbul`, for some weird reason,
1344
+ // apparently doesn't know how to properly exclude Babel polyfills from code coverage.
1345
+ // options = { ...DEFAULT_OPTIONS, ...options }
1346
+ n=At({},Ct,n)}else{n=Ct}var d=new le(o);
1347
+ // Normally, the `input` object is supposed to be a `PhoneNumber` class instance.
1348
+ // Also, according to the `PhoneNumber` class source code, `country` can't be "001".
1349
+ // It means that normally `input.country` or `input.countryCallingCode` is supposed
1350
+ // to be present because either of the two is always required to exist in a `PhoneNumber` instance.
1351
+ // This means that realistically, it's gonna step into either the first `if`
1352
+ // or the following `else if`, and normally it won't even reach the legacy-compatibility
1353
+ // `else return input.phone || ''` part.
1354
+ // So normally, it won't ever return an empty string here.
1355
+ if(e.country&&e.country!=="001"){
1356
+ // Validate `input.country`.
1357
+ if(!d.hasCountry(e.country)){throw new Error("Unknown country: ".concat(e.country))}d.selectNumberingPlan(e.country)}else if(e.countryCallingCode){d.selectNumberingPlan(e.countryCallingCode)}else return e.phone||"";var r=d.countryCallingCode();var i=n.v2?e.nationalNumber:e.phone;
1358
+ // This variable should have been declared inside `case`s
1359
+ // but Babel has a bug and it says "duplicate variable declaration".
1360
+ var s;switch(t){case"NATIONAL":
1361
+ // Normally, the `input` object is supposed to be a `PhoneNumber` class instance,
1362
+ // and a `PhoneNumber` class instance is always required to have a `nationalNumber`.
1363
+ // This means that the `if (!nationalNumber)` below is just for legacy-compatibility
1364
+ // and it normally can't really happen, so normally it won't ever return an empty string here.
1365
+ if(!i){return""}s=Ot(i,e.carrierCode,"NATIONAL",d,n);return Nt(s,e.ext,d,n.formatExtension);case"INTERNATIONAL":
1366
+ // Legacy argument support.
1367
+ // (`{ country: ..., phone: '' }`)
1368
+ if(!i){return"+".concat(r)}s=Ot(i,null,"INTERNATIONAL",d,n);s="+".concat(r," ").concat(s);return Nt(s,e.ext,d,n.formatExtension);case"E.164":
1369
+ // `E.164` doesn't define "phone number extensions".
1370
+ return"+".concat(r).concat(i);case"RFC3966":return kt({number:"+".concat(r).concat(i),ext:e.ext});
1371
+ // For reference, here's Google's IDD formatter:
1372
+ // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
1373
+ // Not saying that this IDD formatter replicates it 1:1, but it seems to work.
1374
+ // Who would even need to format phone numbers in IDD format anyway?
1375
+ case"IDD":
1376
+ // If the required `fromCountry` parameter is not passed, it will return `undefined`.
1377
+ if(!n.fromCountry){return;
1378
+ // throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')
1379
+ }var a=It(i,e.carrierCode,r,n.fromCountry,d);
1380
+ // If the country of the phone number doesn't support IDD calling, it will return `undefined`.
1381
+ if(!a){return}return Nt(a,e.ext,d,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Ot(e,t,n,o,d){var r=Et(o.formats(),e);if(!r){return e}return $t(e,r,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&d&&d.nationalPrefix===false?false:true})}function Et(e,t){
1382
+ // Using a `for ... of` loop here didn't work with `babel`/`istanbul`:
1383
+ // for some weird reason, it showed code coverage less than 100%.
1384
+ // That's because `babel`/`istanbul`, for some weird reason,
1385
+ // apparently doesn't know how to properly exclude Babel polyfills from code coverage.
1386
+ // for (const format of availableFormats) { ... }
1387
+ return jt(e,(function(e){
1388
+ // Validate leading digits.
1389
+ // The test case for "else path" could be found by searching for
1390
+ // "format.leadingDigitsPatterns().length === 0".
1391
+ if(e.leadingDigitsPatterns().length>0){
1392
+ // The last leading_digits_pattern is used here, as it is the most detailed
1393
+ var n=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];
1394
+ // If leading digits don't match then move on to the next phone number format
1395
+ if(t.search(n)!==0){return false}}
1396
+ // Check that the national number matches the phone number format regular expression
1397
+ return Ce(t,e.pattern())}))}function Nt(e,t,n,o){return t?o(e,t,n):e}function It(e,t,n,o,d){var r=ye(o,d.metadata);
1398
+ // When calling within the same country calling code.
1399
+ if(r===n){var i=Ot(e,t,"NATIONAL",d);
1400
+ // For NANPA regions, return the national format for these regions
1401
+ // but prefix it with the country calling code.
1402
+ if(n==="1"){return n+" "+i}
1403
+ // If regions share a country calling code, the country calling code need
1404
+ // not be dialled. This also applies when dialling within a region, so this
1405
+ // if clause covers both these cases. Technically this is the case for
1406
+ // dialling from La Reunion to other overseas departments of France (French
1407
+ // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
1408
+ // this edge case for now and for those cases return the version including
1409
+ // country calling code. Details here:
1410
+ // http://www.petitfute.com/voyage/225-info-pratiques-reunion
1411
+
1412
+ return i}var s=ct(o,undefined,d.metadata);if(s){return"".concat(s," ").concat(n," ").concat(Ot(e,null,"INTERNATIONAL",d))}}function At(){var e=1;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++){n[o]=arguments[o]}while(e<n.length){if(n[e]){for(var d in n[e]){n[0][d]=n[e][d]}}e++}return n[0]}function jt(e,t){var n=0;while(n<e.length){if(t(e[n])){return e[n]}n++}}function Tt(e){"@babel/helpers - typeof";return Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tt(e)}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),true).forEach((function(t){Mt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e,t,n){return(t=Bt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,Bt(o.key),o)}}function Ft(e,t,n){return t&&_t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function Bt(e){var t=Dt(e,"string");return"symbol"==Tt(t)?t:t+""}function Dt(e,t){if("object"!=Tt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Tt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gt=function(){
1413
+ /**
1414
+ * @param {string} countryOrCountryCallingCode
1415
+ * @param {string} nationalNumber
1416
+ * @param {object} metadata — Metadata JSON
1417
+ * @return {PhoneNumber}
1418
+ */
1419
+ function e(t,n,o){Rt(this,e);
1420
+ // Validate `countryOrCountryCallingCode` argument.
1421
+ if(!t){throw new TypeError("First argument is required")}if(typeof t!=="string"){throw new TypeError("First argument must be a string")}
1422
+ // In case of public API use: `constructor(number, metadata)`.
1423
+ // Transform the arguments from `constructor(number, metadata)` to
1424
+ // `constructor(countryOrCountryCallingCode, nationalNumber, metadata)`.
1425
+ if(t[0]==="+"&&!n){throw new TypeError("`metadata` argument not passed")}if(X(n)&&X(n.countries)){o=n;var d=t;if(!Ut.test(d)){throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits')}var r=at(d,undefined,undefined,undefined,o),i=r.countryCallingCode,s=r.number;n=s;t=i;if(!n){throw new Error("Invalid `number` argument passed: too short")}}
1426
+ // Validate `nationalNumber` argument.
1427
+ if(!n){throw new TypeError("`nationalNumber` argument is required")}if(typeof n!=="string"){throw new TypeError("`nationalNumber` argument must be a string")}
1428
+ // Validate `metadata` argument.
1429
+ ve(o);
1430
+ // Initialize properties.
1431
+ var a=Pe(t,o),u=a.country,l=a.callingCode;this.country=u;this.countryCallingCode=l;this.nationalNumber=n;this.number="+"+this.countryCallingCode+this.nationalNumber;
1432
+ // Exclude `metadata` property output from `PhoneNumber.toString()`
1433
+ // so that it doesn't clutter the console output of Node.js.
1434
+ // Previously, when Node.js did `console.log(new PhoneNumber(...))`,
1435
+ // it would output the whole internal structure of the `metadata` object.
1436
+ this.getMetadata=function(){return o}}return Ft(e,[{key:"setExt",value:function e(t){this.ext=t}},{key:"getPossibleCountries",value:function e(){if(this.country){return[this.country]}return Me(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function e(){return xe(this,{v2:true},this.getMetadata())}},{key:"isValid",value:function e(){return je(this,{v2:true},this.getMetadata())}},{key:"isNonGeographic",value:function e(){var t=new le(this.getMetadata());return t.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function e(t){return this.number===t.number&&this.ext===t.ext}
1437
+ // `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`.
1438
+
1439
+ // Later, it became apparent that it's not really a true equivalent.
1440
+ // The reason is that a `PhoneNumber` instance is not created
1441
+ // when the phone number string is too short for it to be considered a valid phone number:
1442
+ // * When there must be at least 2 national (significant) number digits: `"1"`.
1443
+ // * When the country calling code part of an international number is incomplete: `"+12"`.
1444
+
1445
+ // So leaving this `validateLength()` method here would suggest a hidden anti-pattern
1446
+ // of using it instead of `validatePhoneNumberLength()` while ignoring
1447
+ // the "too short to be even possible" case from phone number length validation.
1448
+ // And ignoring that case wouldn't make any sense in a real-world application
1449
+ // because it would still be a valid case that should be handled.
1450
+
1451
+ // Because of that, this method was eventually commented out in order to not introduce
1452
+ // that kind of an anti-pattern.
1453
+
1454
+ // validateLength() {
1455
+ // const result = checkNumberLength(
1456
+ // this.nationalNumber,
1457
+ // undefined,
1458
+ // this.getMetadata()
1459
+ // )
1460
+ // if (result !== 'IS_POSSIBLE') {
1461
+ // return result
1462
+ // }
1463
+ // }
1464
+ },{key:"getType",value:function e(){return Ie(this,{v2:true},this.getMetadata())}},{key:"format",value:function e(t,n){return St(this,t,n?Pt(Pt({},n),{},{v2:true}):{v2:true},this.getMetadata())}},{key:"formatNational",value:function e(t){return this.format("NATIONAL",t)}},{key:"formatInternational",value:function e(t){return this.format("INTERNATIONAL",t)}},{key:"getURI",value:function e(t){return this.format("RFC3966",t)}}])}();var Ut=/^\+\d+$/;function Vt(e){"@babel/helpers - typeof";return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(e)}function Ht(e,t,n){return Object.defineProperty(e,"prototype",{writable:false}),e}function Kt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wt(e,t,n){return t=nn(t),Zt(e,Qt()?Reflect.construct(t,n||[],nn(e).constructor):t.apply(e,n))}function Zt(e,t){if(t&&("object"==Vt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yt(e)}function Yt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}}),Object.defineProperty(e,"prototype",{writable:false}),t&&tn(e,t)}function Jt(e){var t="function"==typeof Map?new Map:void 0;return Jt=function e(n){if(null===n||!en(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(n))return t.get(n);t.set(n,o)}function o(){return Xt(n,arguments,nn(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:false,writable:true,configurable:true}}),tn(o,n)},Jt(e)}function Xt(e,t,n){if(Qt())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var d=new(e.bind.apply(e,o));return n&&tn(d,n.prototype),d}function Qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Qt=function t(){return!!e})()}function en(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function tn(e,t){return tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tn(e,t)}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}
1465
+ // https://stackoverflow.com/a/46971044/970769
1466
+ // "Breaking changes in Typescript 2.1"
1467
+ // "Extending built-ins like Error, Array, and Map may no longer work."
1468
+ // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
1469
+ // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
1470
+ var on=function(e){function t(e){var n;Kt(this,t);n=Wt(this,t,[e]);
1471
+ // Set the prototype explicitly.
1472
+ // Any subclass of FooError will have to manually set the prototype as well.
1473
+ Object.setPrototypeOf(n,t.prototype);n.name=n.constructor.name;return n}qt(t,e);return Ht(t)}(Jt(Error));
1474
+ // Regexp of all known extension prefixes used by different regions followed by
1475
+ // 1 or more valid digits, for use when parsing.
1476
+ var dn=new RegExp("(?:"+vt()+")$","i");
1477
+ // Strips any extension (as in, the part of the number dialled after the call is
1478
+ // connected, usually indicated with extn, ext, x or similar) from the end of
1479
+ // the number, and returns it.
1480
+ function rn(e){var t=e.search(dn);if(t<0){return{}}
1481
+ // If we find a potential extension, and the number preceding this is a viable
1482
+ // number, we assume it is an extension.
1483
+ var n=e.slice(0,t);var o=e.match(dn);var d=1;while(d<o.length){if(o[d]){return{number:n,ext:o[d]}}d++}}function sn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=an(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function an(e,t){if(e){if("string"==typeof e)return un(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?un(e,t):void 0}}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}
1484
+ // These mappings map a character (key) to a specific digit that should
1485
+ // replace it for normalization purposes. Non-European digits that
1486
+ // may be used in phone numbers are mapped to a European equivalent.
1487
+
1488
+ // E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
1489
+
1490
+ var ln={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0",
1491
+ // Fullwidth digit 0
1492
+ "1":"1",
1493
+ // Fullwidth digit 1
1494
+ "2":"2",
1495
+ // Fullwidth digit 2
1496
+ "3":"3",
1497
+ // Fullwidth digit 3
1498
+ "4":"4",
1499
+ // Fullwidth digit 4
1500
+ "5":"5",
1501
+ // Fullwidth digit 5
1502
+ "6":"6",
1503
+ // Fullwidth digit 6
1504
+ "7":"7",
1505
+ // Fullwidth digit 7
1506
+ "8":"8",
1507
+ // Fullwidth digit 8
1508
+ "9":"9",
1509
+ // Fullwidth digit 9
1510
+ "٠":"0",
1511
+ // Arabic-indic digit 0
1512
+ "١":"1",
1513
+ // Arabic-indic digit 1
1514
+ "٢":"2",
1515
+ // Arabic-indic digit 2
1516
+ "٣":"3",
1517
+ // Arabic-indic digit 3
1518
+ "٤":"4",
1519
+ // Arabic-indic digit 4
1520
+ "٥":"5",
1521
+ // Arabic-indic digit 5
1522
+ "٦":"6",
1523
+ // Arabic-indic digit 6
1524
+ "٧":"7",
1525
+ // Arabic-indic digit 7
1526
+ "٨":"8",
1527
+ // Arabic-indic digit 8
1528
+ "٩":"9",
1529
+ // Arabic-indic digit 9
1530
+ "۰":"0",
1531
+ // Eastern-Arabic digit 0
1532
+ "۱":"1",
1533
+ // Eastern-Arabic digit 1
1534
+ "۲":"2",
1535
+ // Eastern-Arabic digit 2
1536
+ "۳":"3",
1537
+ // Eastern-Arabic digit 3
1538
+ "۴":"4",
1539
+ // Eastern-Arabic digit 4
1540
+ "۵":"5",
1541
+ // Eastern-Arabic digit 5
1542
+ "۶":"6",
1543
+ // Eastern-Arabic digit 6
1544
+ "۷":"7",
1545
+ // Eastern-Arabic digit 7
1546
+ "۸":"8",
1547
+ // Eastern-Arabic digit 8
1548
+ "۹":"9"};function $n(e){return ln[e]}
1549
+ /**
1550
+ * Parses phone number digits from a string.
1551
+ * Drops all punctuation leaving only digits.
1552
+ * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
1553
+ * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
1554
+ * @param {string} string
1555
+ * @return {string}
1556
+ * @example
1557
+ * ```js
1558
+ * parseDigits('8 (800) 555')
1559
+ * // Outputs '8800555'.
1560
+ * ```
1561
+ */function fn(e){var t="";
1562
+ // Using `.split('')` here instead of normal `for ... of`
1563
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
1564
+ // The `.split('')` approach discards "exotic" UTF-8 characters
1565
+ // (the ones consisting of four bytes) but digits
1566
+ // (including non-European ones) don't fall into that range
1567
+ // so such "exotic" characters would be discarded anyway.
1568
+ for(var n=sn(e.split("")),o;!(o=n()).done;){var d=o.value;var r=$n(d);if(r){t+=r}}return t}function cn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=hn(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hn(e,t){if(e){if("string"==typeof e)return pn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(e,t):void 0}}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}
1569
+ /**
1570
+ * Parses phone number characters from a string.
1571
+ * Drops all punctuation leaving only digits and the leading `+` sign (if any).
1572
+ * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
1573
+ * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
1574
+ * @param {string} string
1575
+ * @return {string}
1576
+ * @example
1577
+ * ```js
1578
+ * // Outputs '8800555'.
1579
+ * parseIncompletePhoneNumber('8 (800) 555')
1580
+ * // Outputs '+7800555'.
1581
+ * parseIncompletePhoneNumber('+7 800 555')
1582
+ * ```
1583
+ */function vn(e){var t="";
1584
+ // Using `.split('')` here instead of normal `for ... of`
1585
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
1586
+ // The `.split('')` approach discards "exotic" UTF-8 characters
1587
+ // (the ones consisting of four bytes) but digits
1588
+ // (including non-European ones) don't fall into that range
1589
+ // so such "exotic" characters would be discarded anyway.
1590
+ for(var n=cn(e.split("")),o;!(o=n()).done;){var d=o.value;t+=bn(d,t)||""}return t}
1591
+ /**
1592
+ * Parses next character while parsing phone number digits (including a `+`)
1593
+ * from text: discards everything except `+` and digits, and `+` is only allowed
1594
+ * at the start of a phone number.
1595
+ * For example, is used in `react-phone-number-input` where it uses
1596
+ * [`input-format`](https://gitlab.com/catamphetamine/input-format).
1597
+ * @param {string} character - Yet another character from raw input string.
1598
+ * @param {string?} prevParsedCharacters - Previous parsed characters.
1599
+ * @param {function?} eventListener - An optional "on event" function.
1600
+ * @return {string?} The parsed character.
1601
+ */function bn(e,t,n){
1602
+ // Only allow a leading `+`.
1603
+ if(e==="+"){
1604
+ // If this `+` is not the first parsed character
1605
+ // then discard it.
1606
+ if(t){return}return"+"}
1607
+ // Allow digits.
1608
+ return $n(e)}
1609
+ // When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
1610
+ // they can have their "calling code" part written separately in a `phone-context` parameter.
1611
+ // Example: `"tel:12133734253;phone-context=+1"`.
1612
+ // This function parses the full phone number from the local number and the `phone-context`
1613
+ // when the `phone-context` contains a `+` sign.
1614
+ var yn="+";var mn="[\\-\\.\\(\\)]?";var gn="("+"["+De+"]"+"|"+mn+")";var zn="^"+"\\"+yn+gn+"*"+"["+De+"]"+gn+"*"+"$";
1615
+ /**
1616
+ * Regular expression of valid global-number-digits for the phone-context
1617
+ * parameter, following the syntax defined in RFC3966.
1618
+ */var wn=new RegExp(zn,"g");
1619
+ // In this port of Google's library, we don't accept alpha characters in phone numbers.
1620
+ // const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
1621
+ var xn=De;var kn="["+xn+"]+((\\-)*["+xn+"])*";var Cn="a-zA-Z";var Sn="["+Cn+"]+((\\-)*["+xn+"])*";var On="^("+kn+"\\.)*"+Sn+"\\.?$";
1622
+ /**
1623
+ * Regular expression of valid domainname for the phone-context parameter,
1624
+ * following the syntax defined in RFC3966.
1625
+ */var En=new RegExp(On,"g");var Nn="tel:";var In=";phone-context=";var An=";isub=";
1626
+ /**
1627
+ * Extracts the value of the phone-context parameter of `numberToExtractFrom`,
1628
+ * following the syntax defined in RFC3966.
1629
+ *
1630
+ * @param {string} numberToExtractFrom
1631
+ * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
1632
+ */function jn(e){var t=e.indexOf(In);
1633
+ // If no phone-context parameter is present
1634
+ if(t<0){return null}var n=t+In.length;
1635
+ // If phone-context parameter is empty
1636
+ if(n>=e.length){return""}var o=e.indexOf(";",n);
1637
+ // If phone-context is not the last parameter
1638
+ if(o>=0){return e.substring(n,o)}else{return e.substring(n)}}
1639
+ /**
1640
+ * Returns whether the value of phoneContext follows the syntax defined in RFC3966.
1641
+ *
1642
+ * @param {string|null} phoneContext
1643
+ * @return {boolean}
1644
+ */function Tn(e){if(e===null){return true}if(e.length===0){return false}
1645
+ // Does phone-context value match pattern of global-number-digits or domainname.
1646
+ return wn.test(e)||En.test(e)}
1647
+ /**
1648
+ * @param {string} numberToParse
1649
+ * @param {string} nationalNumber
1650
+ * @return {}
1651
+ */function Ln(e,t){var n=t.extractFormattedPhoneNumber;var o=jn(e);if(!Tn(o)){throw new on("NOT_A_NUMBER")}var d;if(o===null){
1652
+ // Extract a possible number from the string passed in.
1653
+ // (this strips leading characters that could not be the start of a phone number)
1654
+ d=n(e)||""}else{d="";
1655
+ // If the phone context contains a phone number prefix, we need to capture
1656
+ // it, whereas domains will be ignored.
1657
+ if(o.charAt(0)===yn){d+=o}
1658
+ // Now append everything between the "tel:" prefix and the phone-context.
1659
+ // This should include the national number, an optional extension or
1660
+ // isdn-subaddress component. Note we also handle the case when "tel:" is
1661
+ // missing, as we have seen in some of the phone number inputs.
1662
+ // In that case, we append everything from the beginning.
1663
+ var r=e.indexOf(Nn);var i;
1664
+ // RFC 3966 "tel:" prefix is preset at this stage because
1665
+ // `isPhoneContextValid()` requires it to be present.
1666
+ /* istanbul ignore else */if(r>=0){i=r+Nn.length}else{i=0}var s=e.indexOf(In);d+=e.substring(i,s)}
1667
+ // Delete the isdn-subaddress and everything after it if it is present.
1668
+ // Note extension won't appear at the same time with isdn-subaddress
1669
+ // according to paragraph 5.3 of the RFC3966 spec.
1670
+ var a=d.indexOf(An);if(a>0){d=d.substring(0,a)}
1671
+ // If both phone context and isdn-subaddress are absent but other
1672
+ // parameters are present, the parameters are left in nationalNumber.
1673
+ // This is because we are concerned about deleting content from a potential
1674
+ // number string when there is no strong evidence that the number is
1675
+ // actually written in RFC3966.
1676
+ if(d!==""){return d}}
1677
+ // This is a port of Google Android `libphonenumber`'s
1678
+ // `phonenumberutil.js` of December 31th, 2018.
1679
+
1680
+ // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
1681
+ // We don't allow input strings for parsing to be longer than 250 chars.
1682
+ // This prevents malicious input from consuming CPU.
1683
+ var Pn=250;
1684
+ // This consists of the plus symbol, digits, and arabic-indic digits.
1685
+ var Mn=new RegExp("["+Ye+De+"]");
1686
+ // Regular expression of trailing characters that we want to remove.
1687
+ // A trailing `#` is sometimes used when writing phone numbers with extensions in US.
1688
+ // Example: "+1 (645) 123 1234-910#" number has extension "910".
1689
+ var Rn=new RegExp("[^"+De+"#"+"]+$");
1690
+ // Examples:
1691
+
1692
+ // ```js
1693
+ // parse('8 (800) 555-35-35', 'RU')
1694
+ // parse('8 (800) 555-35-35', 'RU', metadata)
1695
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } })
1696
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
1697
+ // parse('+7 800 555 35 35')
1698
+ // parse('+7 800 555 35 35', metadata)
1699
+ // ```
1700
+
1701
+ /**
1702
+ * Parses a phone number.
1703
+ *
1704
+ * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
1705
+ * parse('123456789', { defaultCountry: 'RU' }, metadata)
1706
+ * parse('123456789', undefined, metadata)
1707
+ *
1708
+ * @param {string} input
1709
+ * @param {object} [options]
1710
+ * @param {object} metadataJson
1711
+ * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
1712
+ */function _n(e,t,n){
1713
+ // If assigning the `{}` default value is moved to the arguments above,
1714
+ // code coverage would decrease for some weird reason.
1715
+ t=t||{};var o=new le(n);
1716
+ // Validate `defaultCountry`.
1717
+ if(t.defaultCountry&&!o.hasCountry(t.defaultCountry)){if(t.v2){throw new on("INVALID_COUNTRY")}throw new Error("Unknown country: ".concat(t.defaultCountry))}
1718
+ // Parse the phone number.
1719
+ var d=Bn(e,t.v2,t.extract),r=d.number,i=d.ext,s=d.error;
1720
+ // If the phone number is not viable then return nothing.
1721
+ if(!r){if(t.v2){if(s==="TOO_SHORT"){throw new on("TOO_SHORT")}throw new on("NOT_A_NUMBER")}return{}}var a=Gn(r,t.defaultCountry,t.defaultCallingCode,
1722
+ // If `country` is returned, its numbering plan will also be selected in `metadata`.
1723
+ // Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`.
1724
+ // Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.
1725
+ o),u=a.country,l=a.nationalNumber,$=a.countryCallingCode,f=a.countryCallingCodeSource,c=a.carrierCode;if(!o.hasSelectedNumberingPlan()){if(t.v2){throw new on("INVALID_COUNTRY")}return{}}
1726
+ // Validate national (significant) number length.
1727
+ if(!l||l.length<_e){
1728
+ // Won't throw here because the regexp already demands length > 1.
1729
+ /* istanbul ignore if */
1730
+ if(t.v2){throw new on("TOO_SHORT")}
1731
+ // Google's demo just throws an error in this case.
1732
+ return{}}
1733
+ // Validate national (significant) number length.
1734
+
1735
+ // A sidenote:
1736
+
1737
+ // They say that sometimes national (significant) numbers
1738
+ // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
1739
+ // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
1740
+ // Such numbers will just be discarded.
1741
+
1742
+ if(l.length>Fe){if(t.v2){throw new on("TOO_LONG")}
1743
+ // Google's demo just throws an error in this case.
1744
+ return{}}if(t.v2){var h=new Gt($,l,o.metadata);if(u){h.country=u}if(c){h.carrierCode=c}if(i){h.ext=i}h.__countryCallingCodeSource=f;return h}
1745
+ // Check if national phone number pattern matches the number.
1746
+ // National number pattern is different for each country,
1747
+ // even for those ones which are part of the "NANPA" group.
1748
+ var p=(t.extended?o.hasSelectedNumberingPlan():u)?Ce(l,o.nationalNumberPattern()):false;if(!t.extended){return p?Dn(u,l,i):{}}
1749
+ // isInternational: countryCallingCode !== undefined
1750
+ return{country:u,countryCallingCode:$,carrierCode:c,valid:p,possible:p?true:t.extended===true&&o.possibleLengths()&&ke(l,o)?true:false,phone:l,ext:i}}
1751
+ /**
1752
+ * Extracts a formatted phone number from text.
1753
+ * Doesn't guarantee that the extracted phone number
1754
+ * is a valid phone number (for example, doesn't validate its length).
1755
+ * @param {string} text
1756
+ * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
1757
+ * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
1758
+ * @return {string}
1759
+ * @example
1760
+ * // Returns "(213) 373-4253".
1761
+ * extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
1762
+ */function Fn(e,t,n){if(!e){return}if(e.length>Pn){if(n){throw new on("TOO_LONG")}return}if(t===false){return e}
1763
+ // Attempt to extract a possible number from the string passed in
1764
+ var o=e.search(Mn);if(o<0){return}return e.slice(o).replace(Rn,"")}
1765
+ /**
1766
+ * @param {string} text - Input.
1767
+ * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
1768
+ * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
1769
+ * @return {object} `{ ?number, ?ext }`.
1770
+ */function Bn(e,t,n){
1771
+ // // Parse RFC 3966 phone number URI.
1772
+ // if (text && text.indexOf('tel:') === 0) {
1773
+ // return parseRFC3966(text)
1774
+ // }
1775
+ // let number = extractFormattedPhoneNumber(text, extract, v2)
1776
+ var o=Ln(e,{extractFormattedPhoneNumber:function e(o){return Fn(o,n,t)}});
1777
+ // If the phone number is not viable, then abort.
1778
+ if(!o){return{}}if(!wt(o)){if(xt(o)){return{error:"TOO_SHORT"}}return{}}
1779
+ // Attempt to parse extension first, since it doesn't require region-specific
1780
+ // data and we want to have the non-normalised number here.
1781
+ var d=rn(o);if(d.ext){return d}return{number:o}}
1782
+ /**
1783
+ * Creates `parse()` result object.
1784
+ */function Dn(e,t,n){var o={country:e,phone:t};if(n){o.ext=n}return o}
1785
+ /**
1786
+ * Parses a viable phone number.
1787
+ * @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
1788
+ * @param {string} [defaultCountry]
1789
+ * @param {string} [defaultCallingCode]
1790
+ * @param {Metadata} metadata — Metadata instance with no pre-selected numbering plan. If `country` is returned, its numbering plan will also be selected in `metadata`. Otherwise, if `countryCallingCode` is returned, its numbering plan will also be selected in `metadata`. Otherwise, if neither `country` nor `countryCallingCode` are returned, no numbering plan will be selected in `metadata`.
1791
+ * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
1792
+ */function Gn(e,t,n,o){
1793
+ // Attempt to extract a calling code from a phone number.
1794
+ // * If the phone number is found to be "international":
1795
+ // * It will attempt to identify the calling code part of it and whether that part is complete and valid.
1796
+ // * If the calling code part is complete and valid, it will return two properties:
1797
+ // that calling code part (without `+`) and the rest of the digits.
1798
+ // * Otherwise, i.e. if the calling code part is incomplete or invalid,
1799
+ // it will return an empty object.
1800
+ // * Otherwise, i.e. if the phone number is national, there's no callind code to extract
1801
+ // so it will just return the originally-passed `number` string as the only property.
1802
+ var d=at(vn(e),undefined,
1803
+ // `defaultCountry` and `defaultCallingCode` are only used to detect
1804
+ // if it's an "international" phone number or not. They won't be used
1805
+ // to derive the resulting `countryCallingCode` from them, or anything like that.
1806
+ t,n,o.metadata),r=d.countryCallingCodeSource,i=d.countryCallingCode,s=d.number;
1807
+ // The exact country of the phone number
1808
+ var a;
1809
+ // If `formattedPhoneNumber` is passed in "international" format,
1810
+ // choose a country by `countryCallingCode`.
1811
+ if(i){o.selectNumberingPlan(i)}
1812
+ // Else, if `formattedPhoneNumber` is passed in "national" format,
1813
+ // then `number` is defined and `countryCallingCode` is `undefined`.
1814
+ else if(s&&(t||n)){if(t){a=t;o.selectNumberingPlan(t);i=o.numberingPlan.callingCode()}else{o.selectNumberingPlan(n);i=n}}else return{};
1815
+ // At this point, `country` could be `undefined` but `countryCallingCode` is always defined.
1816
+
1817
+ // Also, if `country` is defined, its numbering plan is selected in `metadata`.
1818
+ // Otherwise, the numering plan for the `countryCallingCode` is selected in `metadata`.
1819
+ if(!s){return{countryCallingCodeSource:r,countryCallingCode:i}}var u=dt(vn(s),undefined,o),l=u.nationalNumber,$=u.carrierCode;
1820
+ // Sometimes there are several countries
1821
+ // corresponding to the same country phone code
1822
+ // (e.g. NANPA countries all having `1` country phone code).
1823
+ // Therefore, to reliably determine the exact country,
1824
+ // national (significant) number should have been parsed first.
1825
+
1826
+ // When `metadata.json` is generated, all "ambiguous" country phone codes
1827
+ // get their countries populated with the full set of
1828
+ // "phone number type" regular expressions.
1829
+
1830
+ var f=ot(i,{nationalNumber:l,metadata:o});if(f){a=f;
1831
+ /* istanbul ignore if */if(f==="001");else{o.selectNumberingPlan(a)}}return{country:a,countryCallingCode:i,countryCallingCodeSource:r,nationalNumber:l,carrierCode:$}}function Un(e){"@babel/helpers - typeof";return Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(e)}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),true).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return(t=Wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function Wn(e){var t=Zn(e,"string");return"symbol"==Un(t)?t:t+""}function Zn(e,t){if("object"!=Un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Un(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Yn(e,t,n){return _n(e,Hn(Hn({},t),{},{v2:true}),n)}function qn(e){"@babel/helpers - typeof";return qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qn(e)}function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),true).forEach((function(t){Qn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qn(e,t,n){return(t=eo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function eo(e){var t=to(e,"string");return"symbol"==qn(t)?t:t+""}function to(e,t){if("object"!=qn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=qn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function no(e,t){return ao(e)||so(e,t)||ro(e,t)||oo()}function oo(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ro(e,t){if(e){if("string"==typeof e)return io(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?io(e,t):void 0}}function io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function so(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,d,r,i,s=[],a=true,u=false;try{if(r=(n=n.call(e)).next,0===t);else for(;!(a=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);a=true);}catch(e){u=true,d=e}finally{try{if(!a&&null!=n["return"]&&(i=n["return"](),Object(i)!==i))return}finally{if(u)throw d}}return s}}function ao(e){if(Array.isArray(e))return e}
1832
+ // Extracts the following properties from function arguments:
1833
+ // * input `text`
1834
+ // * `options` object
1835
+ // * `metadata` JSON
1836
+ function uo(e){var t=Array.prototype.slice.call(e),n=no(t,4),o=n[0],d=n[1],r=n[2],i=n[3];var s;var a;var u;
1837
+ // If the phone number is passed as a string.
1838
+ // `parsePhoneNumber('88005553535', ...)`.
1839
+ if(typeof o==="string"){s=o}else throw new TypeError("A text for parsing must be a string.");
1840
+ // If "default country" argument is being passed then move it to `options`.
1841
+ // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
1842
+ if(!d||typeof d==="string"){if(i){a=r;u=i}else{a=undefined;u=r}if(d){a=Xn({defaultCountry:d},a)}}
1843
+ // `defaultCountry` is not passed.
1844
+ // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
1845
+ else if(X(d)){if(r){a=d;u=r}else{u=d}}else throw new Error("Invalid second argument: ".concat(d));return{text:s,options:a,metadata:u}}function lo(e){"@babel/helpers - typeof";return lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lo(e)}function $o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$o(Object(n),true).forEach((function(t){co(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function co(e,t,n){return(t=ho(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function ho(e){var t=po(e,"string");return"symbol"==lo(t)?t:t+""}function po(e,t){if("object"!=lo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=lo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function vo(e,t,n){
1846
+ // Validate `defaultCountry`.
1847
+ if(t&&t.defaultCountry&&!me(t.defaultCountry,n)){t=fo(fo({},t),{},{defaultCountry:undefined})}
1848
+ // Parse phone number.
1849
+ try{return Yn(e,t,n)}catch(e){
1850
+ /* istanbul ignore else */
1851
+ if(e instanceof on);else{throw e}}}function bo(){var e=uo(arguments),t=e.text,n=e.options,o=e.metadata;return vo(t,n,o)}function yo(e){"@babel/helpers - typeof";return yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yo(e)}function mo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function go(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,wo(o.key),o)}}function zo(e,t,n){return t&&go(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function wo(e){var t=xo(e,"string");return"symbol"==yo(t)?t:t+""}function xo(e,t){if("object"!=yo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=yo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}
1852
+ // This "state" object simply holds the state of the "AsYouType" parser:
1853
+
1854
+ // Sidenote:
1855
+ // `state.callingCode` and `state.country` are somewhat independent from one another
1856
+ // and there could be situations when one is defined but the other is not.
1857
+ // * Situations when `state.country` would be defined but `state.callingCode` would be `undefined`:
1858
+ // * When `defaultCountry` is specified and inputting a phone number not in "international" format.
1859
+ // * When `defaultCountry` is specified and inputting a phone number in "international" format,
1860
+ // but before the `+` character has been input.
1861
+ // * Situations when `state.country` would be `undefined` but `state.callingCode` would be defined:
1862
+ // * When `defaultCountry` is not specified and inputting a phone number in "international" format,
1863
+ // and the "calling code" part is already complete, but multiple countries share this "calling code"
1864
+ // and there's not enough national (significant) number digits yet to determine the exact country.
1865
+ // * In any other sigutations, `state.country` and `state.callingCode` are either both defined or both `undefined`.
1866
+ // * When they're both defined, `state.callingCode` always corresponds to `state.country`.
1867
+ // So both are always consistent in this case.
1868
+
1869
+ // * `country?: string` — The exact country of the phone number, if it could be determined.
1870
+ // When inputting a phone number in "international" format, it will derive the `country` from "country calling code" and the phone number digits.
1871
+ // When inputting a phone number in "national" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.
1872
+ // Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for "non-geographic phone numbers" `state.country` would've been "001".
1873
+ // * `callingCode?: string` — "Country calling code" that has been extracted from the input phone number.
1874
+ // When inputting a phone number in "international" format, it will extract the "country calling code" from the digits that follow the "+" character.
1875
+ // When inputting a phone number in "national" format, `callingCode` will be `undefined`.
1876
+ // * `digits: string` — Phone number digits that have been input so far, including the "+" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.
1877
+ // * `international: boolean` — Whether the phone number is being input in "international" format, i.e. with a "+" character.
1878
+ // * `missingPlus: boolean` — Whether it's a phone number in "international" format that is missing the leading "+" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.
1879
+ // * `IDDPrefix?: string` — An "IDD prefix", when the phone number is being input in an "out-of-country dialing" format. https://wikitravel.org/en/International_dialling_prefix
1880
+ // * `carrierCode?: string` — A "carrier code", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.
1881
+ // * `nationalPrefix?: string` — "National prefix", if present in the phone number input.
1882
+ // * `nationalSignificantNumber?: string` — National (significant) number digits that have been input so far.
1883
+ // * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting "0343515551212999" Argentinian mobile number, the parsed national (significant) number is "93435551212999". There, one can see how it stripped "0" national prefix and prepended a "9", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's "modified" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
1884
+ // * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a "national prefix" but rather some other type of "utility" prefix.
1885
+ // For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.
1886
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
1887
+
1888
+ var ko=function(){function e(t){var n=t.onCountryChange,o=t.onCallingCodeChange;mo(this,e);this.onCountryChange=n;this.onCallingCodeChange=o}return zo(e,[{key:"reset",value:function e(t){var n=t.country,o=t.callingCode;this.international=false;this.missingPlus=false;this.IDDPrefix=undefined;this.callingCode=undefined;this.digits="";this.resetNationalSignificantNumber();this.initCountryAndCallingCode(n,o)}},{key:"resetNationalSignificantNumber",value:function e(){this.nationalSignificantNumber=this.getNationalDigits();this.nationalSignificantNumberIsModified=false;this.nationalPrefix=undefined;this.carrierCode=undefined;this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=undefined}},{key:"update",value:function e(t){for(var n=0,o=Object.keys(t);n<o.length;n++){var d=o[n];this[d]=t[d]}}},{key:"initCountryAndCallingCode",value:function e(t,n){this.setCountry(t);this.setCallingCode(n)}},{key:"setCountry",value:function e(t){this.country=t;this.onCountryChange(t)}},{key:"setCallingCode",value:function e(t){this.callingCode=t;this.onCallingCodeChange(t,this.country)}},{key:"startInternationalNumber",value:function e(t,n){
1889
+ // Prepend the `+` to parsed input.
1890
+ this.international=true;
1891
+ // If a default country was set then reset it
1892
+ // because an explicitly international phone
1893
+ // number is being entered.
1894
+ this.initCountryAndCallingCode(t,n)}},{key:"appendDigits",value:function e(t){this.digits+=t}},{key:"appendNationalSignificantNumberDigits",value:function e(t){this.nationalSignificantNumber+=t}
1895
+ /**
1896
+ * Returns the part of `this.digits` that corresponds to the national number.
1897
+ * Basically, all digits that have been input by the user, except for the
1898
+ * international prefix and the country calling code part
1899
+ * (if the number is an international one).
1900
+ * @return {string}
1901
+ */},{key:"getNationalDigits",value:function e(){if(this.international){return this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0))}return this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function e(){if(this.international){if(this.IDDPrefix){return this.digits.slice(this.IDDPrefix.length)}}return this.digits}}])}();function Co(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=So(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function So(e,t){if(e){if("string"==typeof e)return Oo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oo(e,t):void 0}}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}
1902
+ // Should be the same as `DIGIT_PLACEHOLDER` in `libphonenumber-metadata-generator`.
1903
+ var Eo="x";// '\u2008' (punctuation space)
1904
+ var No=new RegExp(Eo);
1905
+ // Repeats a string (or a symbol) N times.
1906
+ // http://stackoverflow.com/questions/202605/repeat-string-javascript
1907
+ function Io(e,t){if(t<1){return""}var n="";while(t>1){if(t&1){n+=e}t>>=1;e+=e}return n+e}function Ao(e,t){if(e[t]===")"){t++}return jo(e.slice(0,t))}function jo(e){var t=[];var n=0;while(n<e.length){if(e[n]==="("){t.push(n)}else if(e[n]===")"){t.pop()}n++}var o=0;var d="";t.push(e.length);for(var r=0,i=t;r<i.length;r++){var s=i[r];d+=e.slice(o,s);o=s+1}return d}function To(e,t,n){
1908
+ // Using `.split('')` to iterate through a string here
1909
+ // to avoid requiring `Symbol.iterator` polyfill.
1910
+ // `.split('')` is generally not safe for Unicode,
1911
+ // but in this particular case for `digits` it is safe.
1912
+ // for (const digit of digits)
1913
+ for(var o=Co(n.split("")),d;!(d=o()).done;){var r=d.value;
1914
+ // If there is room for more digits in current `template`,
1915
+ // then set the next digit in the `template`,
1916
+ // and return the formatted digits so far.
1917
+ // If more digits are entered than the current format could handle.
1918
+ if(e.slice(t+1).search(No)<0){return}t=e.search(No);e=e.replace(No,r)}return[e,t]}function Lo(e,t,n){var o=n.shouldTryNationalPrefixFormattingRule,d=n.getSeparatorAfterNationalPrefix;var r=new RegExp("^(?:".concat(t.pattern(),")$"));if(r.test(e.nationalSignificantNumber)){return Mo(e,t,{shouldTryNationalPrefixFormattingRule:o,getSeparatorAfterNationalPrefix:d})}}function Po(e,t){return ze(e,undefined,t)==="IS_POSSIBLE"}function Mo(e,t,n){var o=n.shouldTryNationalPrefixFormattingRule,d=n.getSeparatorAfterNationalPrefix;
1919
+ // Format the number with using `national_prefix_formatting_rule`.
1920
+ // If the resulting formatted number is a valid formatted number, then return it.
1921
+
1922
+ // Google's AsYouType formatter is different in a way that it doesn't try
1923
+ // to format using the "national prefix formatting rule", and instead it
1924
+ // simply prepends a national prefix followed by a " " character.
1925
+ // This code does that too, but as a fallback.
1926
+ // The reason is that "national prefix formatting rule" may use parentheses,
1927
+ // which wouldn't be included has it used the simpler Google's way.
1928
+
1929
+ if(o(t)){var r=Ro(e,t,{useNationalPrefixFormattingRule:true,getSeparatorAfterNationalPrefix:d});if(r){return r}}
1930
+ // Format the number without using `national_prefix_formatting_rule`.
1931
+ return Ro(e,t,{useNationalPrefixFormattingRule:false,getSeparatorAfterNationalPrefix:d})}function Ro(e,t,n){var o=n.useNationalPrefixFormattingRule,d=n.getSeparatorAfterNationalPrefix;var r=$t(e.nationalSignificantNumber,t,{useInternationalFormat:e.international,withNationalPrefix:o});if(!o){if(e.nationalPrefix){
1932
+ // If a national prefix was extracted, then just prepend it,
1933
+ // followed by a " " character.
1934
+ r=e.nationalPrefix+d(t)+r}else if(e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix){r=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+r}}if(_o(r,e)){return r}}
1935
+ // Check that the formatted phone number contains exactly
1936
+ // the same digits that have been input by the user.
1937
+ // For example, when "0111523456789" is input for `AR` country,
1938
+ // the extracted `this.nationalSignificantNumber` is "91123456789",
1939
+ // which means that the national part of `this.digits` isn't simply equal to
1940
+ // `this.nationalPrefix` + `this.nationalSignificantNumber`.
1941
+
1942
+ // Also, a `format` can add extra digits to the `this.nationalSignificantNumber`
1943
+ // being formatted via `metadata[country].national_prefix_transform_rule`.
1944
+ // For example, for `VI` country, it prepends `340` to the national number,
1945
+ // and if this check hasn't been implemented, then there would be a bug
1946
+ // when `340` "area coude" is "duplicated" during input for `VI` country:
1947
+ // https://github.com/catamphetamine/libphonenumber-js/issues/318
1948
+
1949
+ // So, all these "gotchas" are filtered out.
1950
+
1951
+ // In the original Google's code, the comments say:
1952
+ // "Check that we didn't remove nor add any extra digits when we matched
1953
+ // this formatting pattern. This usually happens after we entered the last
1954
+ // digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when
1955
+ // formatted but AYTF should retain all the number entered and not change
1956
+ // in order to match a format (of same leading digits and length) display
1957
+ // in that way."
1958
+ // "If it's the same (i.e entered number and format is same), then it's
1959
+ // safe to return this in formatted number as nothing is lost / added."
1960
+ // Otherwise, don't use this format.
1961
+ // https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5
1962
+ // https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b
1963
+
1964
+ function _o(e,t){return fn(e)===t.getNationalDigits()}function Fo(e){"@babel/helpers - typeof";return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Bo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Do(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,Uo(o.key),o)}}function Go(e,t,n){return t&&Do(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function Uo(e){var t=Vo(e,"string");return"symbol"==Fo(t)?t:t+""}function Vo(e,t){if("object"!=Fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Fo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ho=function(){function e(){Bo(this,e)}return Go(e,[{key:"parse",value:function e(t){this.context=[{or:true,instructions:[]}];this.parsePattern(t);if(this.context.length!==1){throw new Error("Non-finalized contexts left when pattern parse ended")}var n=this.context[0],o=n.branches,d=n.instructions;if(o){return{op:"|",args:o.concat([Yo(d)])}}
1965
+ /* istanbul ignore if */if(d.length===0){throw new Error("Pattern is required")}if(d.length===1){return d[0]}return d}},{key:"startContext",value:function e(t){this.context.push(t)}},{key:"endContext",value:function e(){this.context.pop()}},{key:"getContext",value:function e(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function e(t){if(!t){throw new Error("Pattern is required")}var n=t.match(Zo);if(!n){if(Wo.test(t)){throw new Error("Illegal characters found in a pattern: ".concat(t))}this.getContext().instructions=this.getContext().instructions.concat(t.split(""));return}var o=n[1];var d=t.slice(0,n.index);var r=t.slice(n.index+o.length);switch(o){case"(?:":if(d){this.parsePattern(d)}this.startContext({or:true,instructions:[],branches:[]});break;case")":if(!this.getContext().or){throw new Error('")" operator must be preceded by "(?:" operator')}if(d){this.parsePattern(d)}if(this.getContext().instructions.length===0){throw new Error('No instructions found after "|" operator in an "or" group')}var i=this.getContext(),s=i.branches;s.push(Yo(this.getContext().instructions));this.endContext();this.getContext().instructions.push({op:"|",args:s});break;case"|":if(!this.getContext().or){throw new Error('"|" operator can only be used inside "or" groups')}if(d){this.parsePattern(d)}
1966
+ // The top-level is an implicit "or" group, if required.
1967
+ if(!this.getContext().branches){
1968
+ // `branches` are not defined only for the root implicit "or" operator.
1969
+ /* istanbul ignore else */
1970
+ if(this.context.length===1){this.getContext().branches=[]}else{throw new Error('"branches" not found in an "or" group context')}}this.getContext().branches.push(Yo(this.getContext().instructions));this.getContext().instructions=[];break;case"[":if(d){this.parsePattern(d)}this.startContext({oneOfSet:true});break;case"]":if(!this.getContext().oneOfSet){throw new Error('"]" operator must be preceded by "[" operator')}this.endContext();this.getContext().instructions.push({op:"[]",args:Ko(d)});break;
1971
+ /* istanbul ignore next */default:throw new Error("Unknown operator: ".concat(o))}if(r){this.parsePattern(r)}}}])}();function Ko(e){var t=[];var n=0;while(n<e.length){if(e[n]==="-"){if(n===0||n===e.length-1){throw new Error("Couldn't parse a one-of set pattern: ".concat(e))}var o=e[n-1].charCodeAt(0)+1;var d=e[n+1].charCodeAt(0)-1;var r=o;while(r<=d){t.push(String.fromCharCode(r));r++}}else{t.push(e[n])}n++}return t}var Wo=/[\(\)\[\]\?\:\|]/;var Zo=new RegExp(
1972
+ // any of:
1973
+ "("+
1974
+ // or operator
1975
+ "\\|"+
1976
+ // or
1977
+ "|"+
1978
+ // or group start
1979
+ "\\(\\?\\:"+
1980
+ // or
1981
+ "|"+
1982
+ // or group end
1983
+ "\\)"+
1984
+ // or
1985
+ "|"+
1986
+ // one-of set start
1987
+ "\\["+
1988
+ // or
1989
+ "|"+
1990
+ // one-of set end
1991
+ "\\]"+")");function Yo(e){if(e.length===1){return e[0]}return e}function qo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Jo(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jo(e,t){if(e){if("string"==typeof e)return Xo(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xo(e,t):void 0}}function Xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Qo(e){"@babel/helpers - typeof";return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qo(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,od(o.key),o)}}function nd(e,t,n){return t&&td(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function od(e){var t=dd(e,"string");return"symbol"==Qo(t)?t:t+""}function dd(e,t){if("object"!=Qo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Qo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rd=function(){function e(t){ed(this,e);this.matchTree=(new Ho).parse(t)}return nd(e,[{key:"match",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},o=n.allowOverflow;if(!t){throw new Error("String is required")}var d=id(t.split(""),this.matchTree,true);if(d&&d.match){delete d.matchedChars}if(d&&d.overflow){if(!o){return}}return d}}])}();function id(e,t,n){
1992
+ // If `tree` is a string, then `tree` is a single character.
1993
+ // That's because when a pattern is parsed, multi-character-string parts
1994
+ // of a pattern are compiled into arrays of single characters.
1995
+ // I still wrote this piece of code for a "general" hypothetical case
1996
+ // when `tree` could be a string of several characters, even though
1997
+ // such case is not possible with the current implementation.
1998
+ if(typeof t==="string"){var o=e.join("");if(t.indexOf(o)===0){
1999
+ // `tree` is always a single character.
2000
+ // If `tree.indexOf(characterString) === 0`
2001
+ // then `characters.length === tree.length`.
2002
+ /* istanbul ignore else */
2003
+ if(e.length===t.length){return{match:true,matchedChars:e}}
2004
+ // `tree` is always a single character.
2005
+ // If `tree.indexOf(characterString) === 0`
2006
+ // then `characters.length === tree.length`.
2007
+ /* istanbul ignore next */return{partialMatch:true}}if(o.indexOf(t)===0){if(n){
2008
+ // The `else` path is not possible because `tree` is always a single character.
2009
+ // The `else` case for `characters.length > tree.length` would be
2010
+ // `characters.length <= tree.length` which means `characters.length <= 1`.
2011
+ // `characters` array can't be empty, so that means `characters === [tree]`,
2012
+ // which would also mean `tree.indexOf(characterString) === 0` and that'd mean
2013
+ // that the `if (tree.indexOf(characterString) === 0)` condition before this
2014
+ // `if` condition would be entered, and returned from there, not reaching this code.
2015
+ /* istanbul ignore else */
2016
+ if(e.length>t.length){return{overflow:true}}}return{match:true,matchedChars:e.slice(0,t.length)}}return}if(Array.isArray(t)){var d=e.slice();var r=0;while(r<t.length){var i=t[r];var s=id(d,i,n&&r===t.length-1);if(!s){return}else if(s.overflow){return s}else if(s.match){
2017
+ // Continue with the next subtree with the rest of the characters.
2018
+ d=d.slice(s.matchedChars.length);if(d.length===0){if(r===t.length-1){return{match:true,matchedChars:e}}else{return{partialMatch:true}}}}else{
2019
+ /* istanbul ignore else */
2020
+ if(s.partialMatch){return{partialMatch:true}}else{throw new Error("Unsupported match result:\n".concat(JSON.stringify(s,null,2)))}}r++}
2021
+ // If `last` then overflow has already been checked
2022
+ // by the last element of the `tree` array.
2023
+ /* istanbul ignore if */if(n){return{overflow:true}}return{match:true,matchedChars:e.slice(0,e.length-d.length)}}switch(t.op){case"|":var a;for(var u=qo(t.args),l;!(l=u()).done;){var $=l.value;var f=id(e,$,n);if(f){if(f.overflow){return f}else if(f.match){return{match:true,matchedChars:f.matchedChars}}else{
2024
+ /* istanbul ignore else */
2025
+ if(f.partialMatch){a=true}else{throw new Error("Unsupported match result:\n".concat(JSON.stringify(f,null,2)))}}}}if(a){return{partialMatch:true}}
2026
+ // Not even a partial match.
2027
+ return;case"[]":for(var c=qo(t.args),h;!(h=c()).done;){var p=h.value;if(e[0]===p){if(e.length===1){return{match:true,matchedChars:e}}if(n){return{overflow:true}}return{match:true,matchedChars:[p]}}}
2028
+ // No character matches.
2029
+ return;
2030
+ /* istanbul ignore next */default:throw new Error("Unsupported instruction tree: ".concat(t))}}function sd(e){"@babel/helpers - typeof";return sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sd(e)}function ad(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ud(e))||t){n&&(e=n);var o=0;return function(){return o>=e.length?{done:true}:{done:false,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ud(e,t){if(e){if("string"==typeof e)return ld(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ld(e,t):void 0}}function ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function $d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fd(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,hd(o.key),o)}}function cd(e,t,n){return t&&fd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function hd(e){var t=pd(e,"string");return"symbol"==sd(t)?t:t+""}function pd(e,t){if("object"!=sd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=sd(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}
2031
+ // Used in phone number format template creation.
2032
+ // Could be any digit, I guess.
2033
+ var vd="9";
2034
+ // I don't know why is it exactly `15`
2035
+ var bd=15;
2036
+ // Create a phone number consisting only of the digit 9 that matches the
2037
+ // `number_pattern` by applying the pattern to the "longest phone number" string.
2038
+ var yd=Io(vd,bd);
2039
+ // A set of characters that, if found in a national prefix formatting rules, are an indicator to
2040
+ // us that we should separate the national prefix from the number when formatting.
2041
+ var md=/[- ]/;
2042
+ // A pattern that is used to match character classes in regular expressions.
2043
+ // An example of a character class is "[1-4]".
2044
+ var gd=function(){return/\[([^\[\]])*\]/g};
2045
+ // Any digit in a regular expression that actually denotes a digit. For
2046
+ // example, in the regular expression "80[0-2]\d{6,10}", the first 2 digits
2047
+ // (8 and 0) are standalone digits, but the rest are not.
2048
+ // Two look-aheads are needed because the number following \\d could be a
2049
+ // two-digit number, since the phone number can be as long as 15 digits.
2050
+ var zd=function(){return/\d(?=[^,}][^,}])/g};
2051
+ // A regular expression that is used to determine if a `format` is
2052
+ // suitable to be used in the "as you type formatter".
2053
+ // A `format` is suitable when the resulting formatted number has
2054
+ // the same digits as the user has entered.
2055
+
2056
+ // In the simplest case, that would mean that the format
2057
+ // doesn't add any additional digits when formatting a number.
2058
+ // Google says that it also shouldn't add "star" (`*`) characters,
2059
+ // like it does in some Israeli formats.
2060
+ // Such basic format would only contain "valid punctuation"
2061
+ // and "captured group" identifiers ($1, $2, etc).
2062
+
2063
+ // An example of a format that adds additional digits:
2064
+
2065
+ // Country: `AR` (Argentina).
2066
+ // Format:
2067
+ // {
2068
+ // "pattern": "(\\d)(\\d{2})(\\d{4})(\\d{4})",
2069
+ // "leading_digits_patterns": ["91"],
2070
+ // "national_prefix_formatting_rule": "0$1",
2071
+ // "format": "$2 15-$3-$4",
2072
+ // "international_format": "$1 $2 $3-$4"
2073
+ // }
2074
+
2075
+ // In the format above, the `format` adds `15` to the digits when formatting a number.
2076
+ // A sidenote: this format actually is suitable because `national_prefix_for_parsing`
2077
+ // has previously removed `15` from a national number, so re-adding `15` in `format`
2078
+ // doesn't actually result in any extra digits added to user's input.
2079
+ // But verifying that would be a complex procedure, so the code chooses a simpler path:
2080
+ // it simply filters out all `format`s that contain anything but "captured group" ids.
2081
+
2082
+ // This regular expression is called `ELIGIBLE_FORMAT_PATTERN` in Google's
2083
+ // `libphonenumber` code.
2084
+
2085
+ var wd=new RegExp("["+Ze+"]*"+
2086
+ // Google developers say:
2087
+ // "We require that the first matching group is present in the
2088
+ // output pattern to ensure no data is lost while formatting."
2089
+ "\\$1"+"["+Ze+"]*"+"(\\$\\d["+Ze+"]*)*"+"$");
2090
+ // This is the minimum length of the leading digits of a phone number
2091
+ // to guarantee the first "leading digits pattern" for a phone number format
2092
+ // to be preemptive.
2093
+ var xd=3;var kd=function(){function e(t){var n=t.metadata;$d(this,e);this.metadata=n;this.resetFormat()}return cd(e,[{key:"resetFormat",value:function e(){this.chosenFormat=undefined;this.template=undefined;this.nationalNumberTemplate=undefined;this.populatedNationalNumberTemplate=undefined;this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function e(t,n){this.resetFormat();if(t){this.isNANP=t.callingCode()==="1";this.matchingFormats=t.formats();if(n.nationalSignificantNumber){this.narrowDownMatchingFormats(n)}}else{this.isNANP=undefined;this.matchingFormats=[]}}
2094
+ /**
2095
+ * Formats an updated phone number.
2096
+ * @param {string} nextDigits — Additional phone number digits.
2097
+ * @param {object} state — `AsYouType` state.
2098
+ * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.
2099
+ */},{key:"format",value:function e(t,n){var o=this;
2100
+ // See if the phone number digits can be formatted as a complete phone number.
2101
+ // If not, use the results from `formatNationalNumberWithNextDigits()`,
2102
+ // which formats based on the chosen formatting pattern.
2103
+
2104
+ // Attempting to format complete phone number first is how it's done
2105
+ // in Google's `libphonenumber`, so this library just follows it.
2106
+ // Google's `libphonenumber` code doesn't explain in detail why does it
2107
+ // attempt to format digits as a complete phone number
2108
+ // instead of just going with a previoulsy (or newly) chosen `format`:
2109
+
2110
+ // "Checks to see if there is an exact pattern match for these digits.
2111
+ // If so, we should use this instead of any other formatting template
2112
+ // whose leadingDigitsPattern also matches the input."
2113
+
2114
+ if(Po(n.nationalSignificantNumber,this.metadata)){for(var d=ad(this.matchingFormats),r;!(r=d()).done;){var i=r.value;var s=Lo(n,i,{shouldTryNationalPrefixFormattingRule:function e(t){return o.shouldTryNationalPrefixFormattingRule(t,{international:n.international,nationalPrefix:n.nationalPrefix})},getSeparatorAfterNationalPrefix:function e(t){return o.getSeparatorAfterNationalPrefix(t)}});if(s){this.resetFormat();this.chosenFormat=i;this.setNationalNumberTemplate(s.replace(/\d/g,Eo),n);this.populatedNationalNumberTemplate=s;
2115
+ // With a new formatting template, the matched position
2116
+ // using the old template needs to be reset.
2117
+ this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(Eo);return s}}}
2118
+ // Format the digits as a partial (incomplete) phone number
2119
+ // using the previously chosen formatting pattern (or a newly chosen one).
2120
+ return this.formatNationalNumberWithNextDigits(t,n)}
2121
+ // Formats the next phone number digits.
2122
+ },{key:"formatNationalNumberWithNextDigits",value:function e(t,n){var o=this.chosenFormat;
2123
+ // Choose a format from the list of matching ones.
2124
+ var d=this.chooseFormat(n);if(d){if(d===o){
2125
+ // If it can format the next (current) digits
2126
+ // using the previously chosen phone number format
2127
+ // then return the updated formatted number.
2128
+ return this.formatNextNationalNumberDigits(t)}else{
2129
+ // If a more appropriate phone number format
2130
+ // has been chosen for these "leading digits",
2131
+ // then re-format the national phone number part
2132
+ // using the newly selected format.
2133
+ return this.formatNextNationalNumberDigits(n.getNationalDigits())}}}},{key:"narrowDownMatchingFormats",value:function e(t){var n=this;var o=t.nationalSignificantNumber,d=t.nationalPrefix,r=t.international;var i=o;
2134
+ // "leading digits" pattern list starts with a
2135
+ // "leading digits" pattern fitting a maximum of 3 leading digits.
2136
+ // So, after a user inputs 3 digits of a national (significant) phone number
2137
+ // this national (significant) number can already be formatted.
2138
+ // The next "leading digits" pattern is for 4 leading digits max,
2139
+ // and the "leading digits" pattern after it is for 5 leading digits max, etc.
2140
+ // This implementation is different from Google's
2141
+ // in that it searches for a fitting format
2142
+ // even if the user has entered less than
2143
+ // `MIN_LEADING_DIGITS_LENGTH` digits of a national number.
2144
+ // Because some leading digit patterns already match for a single first digit.
2145
+ var s=i.length-xd;if(s<0){s=0}this.matchingFormats=this.matchingFormats.filter((function(e){return n.formatSuits(e,r,d)&&n.formatMatches(e,i,s)}));
2146
+ // If there was a phone number format chosen
2147
+ // and it no longer holds given the new leading digits then reset it.
2148
+ // The test for this `if` condition is marked as:
2149
+ // "Reset a chosen format when it no longer holds given the new leading digits".
2150
+ // To construct a valid test case for this one can find a country
2151
+ // in `PhoneNumberMetadata.xml` yielding one format for 3 `<leadingDigits>`
2152
+ // and yielding another format for 4 `<leadingDigits>` (Australia in this case).
2153
+ if(this.chosenFormat&&this.matchingFormats.indexOf(this.chosenFormat)===-1){this.resetFormat()}}},{key:"formatSuits",value:function e(t,n,o){
2154
+ // When a prefix before a national (significant) number is
2155
+ // simply a national prefix, then it's parsed as `this.nationalPrefix`.
2156
+ // In more complex cases, a prefix before national (significant) number
2157
+ // could include a national prefix as well as some "capturing groups",
2158
+ // and in that case there's no info whether a national prefix has been parsed.
2159
+ // If national prefix is not used when formatting a phone number
2160
+ // using this format, but a national prefix has been entered by the user,
2161
+ // and was extracted, then discard such phone number format.
2162
+ // In Google's "AsYouType" formatter code, the equivalent would be this part:
2163
+ // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L175-L184
2164
+ if(o&&!t.usesNationalPrefix()&&
2165
+ // !format.domesticCarrierCodeFormattingRule() &&
2166
+ !t.nationalPrefixIsOptionalWhenFormattingInNationalFormat()){return false}
2167
+ // If national prefix is mandatory for this phone number format
2168
+ // and there're no guarantees that a national prefix is present in user input
2169
+ // then discard this phone number format as not suitable.
2170
+ // In Google's "AsYouType" formatter code, the equivalent would be this part:
2171
+ // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L185-L193
2172
+ if(!n&&!o&&t.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()){return false}return true}},{key:"formatMatches",value:function e(t,n,o){var d=t.leadingDigitsPatterns().length;
2173
+ // If this format is not restricted to a certain
2174
+ // leading digits pattern then it fits.
2175
+ // The test case could be found by searching for "leadingDigitsPatternsCount === 0".
2176
+ if(d===0){return true}
2177
+ // Start narrowing down the list of possible formats based on the leading digits.
2178
+ // (only previously matched formats take part in the narrowing down process)
2179
+ // `leading_digits_patterns` start with 3 digits min
2180
+ // and then go up from there one digit at a time.
2181
+ o=Math.min(o,d-1);var r=t.leadingDigitsPatterns()[o];
2182
+ // Google imposes a requirement on the leading digits
2183
+ // to be minimum 3 digits long in order to be eligible
2184
+ // for checking those with a leading digits pattern.
2185
+
2186
+ // Since `leading_digits_patterns` start with 3 digits min,
2187
+ // Google's original `libphonenumber` library only starts
2188
+ // excluding any non-matching formats only when the
2189
+ // national number entered so far is at least 3 digits long,
2190
+ // otherwise format matching would give false negatives.
2191
+
2192
+ // For example, when the digits entered so far are `2`
2193
+ // and the leading digits pattern is `21` –
2194
+ // it's quite obvious in this case that the format could be the one
2195
+ // but due to the absence of further digits it would give false negative.
2196
+
2197
+ // Also, `leading_digits_patterns` doesn't always correspond to a single
2198
+ // digits count. For example, `60|8` pattern would already match `8`
2199
+ // but the `60` part would require having at least two leading digits,
2200
+ // so the whole pattern would require inputting two digits first in order to
2201
+ // decide on whether it matches the input, even when the input is "80".
2202
+
2203
+ // This library — `libphonenumber-js` — allows filtering by `leading_digits_patterns`
2204
+ // even when there's only 1 or 2 digits of the national (significant) number.
2205
+ // To do that, it uses a non-strict pattern matcher written specifically for that.
2206
+
2207
+ if(n.length<xd){
2208
+ // Before leading digits < 3 matching was implemented:
2209
+ // return true
2210
+ // After leading digits < 3 matching was implemented:
2211
+ try{return new rd(r).match(n,{allowOverflow:true})!==undefined}catch(e){
2212
+ // There's a slight possibility that there could be some undiscovered bug
2213
+ // in the pattern matcher code. Since the "leading digits < 3 matching"
2214
+ // feature is not "essential" for operation, it can fall back to the old way
2215
+ // in case of any issues rather than halting the application's execution.
2216
+ console.error(e);return true}}
2217
+ // If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are
2218
+ // available then use the usual regular expression matching.
2219
+
2220
+ // The whole pattern is wrapped in round brackets (`()`) because
2221
+ // the pattern can use "or" operator (`|`) at the top level of the pattern.
2222
+
2223
+ return new RegExp("^(".concat(r,")")).test(n)}},{key:"getFormatFormat",value:function e(t,n){return n?t.internationalFormat():t.format()}},{key:"chooseFormat",value:function e(t){var n=this;var o=function e(){var o=i.value;
2224
+ // If this format is currently being used
2225
+ // and is still suitable, then stick to it.
2226
+ if(n.chosenFormat===o){return 0;// break
2227
+ }
2228
+ // Sometimes, a formatting rule inserts additional digits in a phone number,
2229
+ // and "as you type" formatter can't do that: it should only use the digits
2230
+ // that the user has input.
2231
+
2232
+ // For example, in Argentina, there's a format for mobile phone numbers:
2233
+
2234
+ // {
2235
+ // "pattern": "(\\d)(\\d{2})(\\d{4})(\\d{4})",
2236
+ // "leading_digits_patterns": ["91"],
2237
+ // "national_prefix_formatting_rule": "0$1",
2238
+ // "format": "$2 15-$3-$4",
2239
+ // "international_format": "$1 $2 $3-$4"
2240
+ // }
2241
+
2242
+ // In that format, `international_format` is used instead of `format`
2243
+ // because `format` inserts `15` in the formatted number,
2244
+ // and `AsYouType` formatter should only use the digits
2245
+ // the user has actually input, without adding any extra digits.
2246
+ // In this case, it wouldn't make a difference, because the `15`
2247
+ // is first stripped when applying `national_prefix_for_parsing`
2248
+ // and then re-added when using `format`, so in reality it doesn't
2249
+ // add any new digits to the number, but to detect that, the code
2250
+ // would have to be more complex: it would have to try formatting
2251
+ // the digits using the format and then see if any digits have
2252
+ // actually been added or removed, and then, every time a new digit
2253
+ // is input, it should re-check whether the chosen format doesn't
2254
+ // alter the digits.
2255
+
2256
+ // Google's code doesn't go that far, and so does this library:
2257
+ // it simply requires that a `format` doesn't add any additonal
2258
+ // digits to user's input.
2259
+
2260
+ // Also, people in general should move from inputting phone numbers
2261
+ // in national format (possibly with national prefixes)
2262
+ // and use international phone number format instead:
2263
+ // it's a logical thing in the modern age of mobile phones,
2264
+ // globalization and the internet.
2265
+
2266
+ /* istanbul ignore if */if(!wd.test(n.getFormatFormat(o,t.international))){return 1;// continue
2267
+ }if(!n.createTemplateForFormat(o,t)){
2268
+ // Remove the format if it can't generate a template.
2269
+ n.matchingFormats=n.matchingFormats.filter((function(e){return e!==o}));return 1;// continue
2270
+ }n.chosenFormat=o;return 0;// break
2271
+ },d;
2272
+ // When there are multiple available formats, the formatter uses the first
2273
+ // format where a formatting template could be created.
2274
+
2275
+ // For some weird reason, `istanbul` says "else path not taken"
2276
+ // for the `for of` line below. Supposedly that means that
2277
+ // the loop doesn't ever go over the last element in the list.
2278
+ // That's true because there always is `this.chosenFormat`
2279
+ // when `this.matchingFormats` is non-empty.
2280
+ // And, for some weird reason, it doesn't think that the case
2281
+ // with empty `this.matchingFormats` qualifies for a valid "else" path.
2282
+ // So simply muting this `istanbul` warning.
2283
+ // It doesn't skip the contents of the `for of` loop,
2284
+ // it just skips the `for of` line.
2285
+
2286
+ /* istanbul ignore next */for(var r=ad(this.matchingFormats.slice()),i;!(i=r()).done;){d=o();if(d===0)break;if(d===1)continue}if(!this.chosenFormat){
2287
+ // No format matches the national (significant) phone number.
2288
+ this.resetFormat()}return this.chosenFormat}},{key:"createTemplateForFormat",value:function e(t,n){
2289
+ // The formatter doesn't format numbers when numberPattern contains '|', e.g.
2290
+ // (20|3)\d{4}. In those cases we quickly return.
2291
+ // (Though there's no such format in current metadata)
2292
+ /* istanbul ignore if */
2293
+ if(t.pattern().indexOf("|")>=0){return}
2294
+ // Get formatting template for this phone number format
2295
+ var o=this.getTemplateForFormat(t,n);
2296
+ // If the national number entered is too long
2297
+ // for any phone number format, then abort.
2298
+ if(o){this.setNationalNumberTemplate(o,n);return true}}},{key:"getSeparatorAfterNationalPrefix",value:function e(t){
2299
+ // `US` metadata doesn't have a `national_prefix_formatting_rule`,
2300
+ // so the `if` condition below doesn't apply to `US`,
2301
+ // but in reality there shoudl be a separator
2302
+ // between a national prefix and a national (significant) number.
2303
+ // So `US` national prefix separator is a "special" "hardcoded" case.
2304
+ if(this.isNANP){return" "}
2305
+ // If a `format` has a `national_prefix_formatting_rule`
2306
+ // and that rule has a separator after a national prefix,
2307
+ // then it means that there should be a separator
2308
+ // between a national prefix and a national (significant) number.
2309
+ if(t&&t.nationalPrefixFormattingRule()&&md.test(t.nationalPrefixFormattingRule())){return" "}
2310
+ // At this point, there seems to be no clear evidence that
2311
+ // there should be a separator between a national prefix
2312
+ // and a national (significant) number. So don't insert one.
2313
+ return""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function e(t,n){var o=t.IDDPrefix,d=t.missingPlus;if(o){return n&&n.spacing===false?o:o+" "}if(d){return""}return"+"}},{key:"getTemplate",value:function e(t){if(!this.template){return}
2314
+ // `this.template` holds the template for a "complete" phone number.
2315
+ // The currently entered phone number is most likely not "complete",
2316
+ // so trim all non-populated digits.
2317
+ var n=-1;var o=0;var d=t.international?this.getInternationalPrefixBeforeCountryCallingCode(t,{spacing:false}):"";while(o<d.length+t.getDigitsWithoutInternationalPrefix().length){n=this.template.indexOf(Eo,n+1);o++}return Ao(this.template,n+1)}},{key:"setNationalNumberTemplate",value:function e(t,n){this.nationalNumberTemplate=t;this.populatedNationalNumberTemplate=t;
2318
+ // With a new formatting template, the matched position
2319
+ // using the old template needs to be reset.
2320
+ this.populatedNationalNumberTemplatePosition=-1;
2321
+ // For convenience, the public `.template` property
2322
+ // contains the whole international number
2323
+ // if the phone number being input is international:
2324
+ // 'x' for the '+' sign, 'x'es for the country phone code,
2325
+ // a spacebar and then the template for the formatted national number.
2326
+ if(n.international){this.template=this.getInternationalPrefixBeforeCountryCallingCode(n).replace(/[\d\+]/g,Eo)+Io(Eo,n.callingCode.length)+" "+t}else{this.template=t}}
2327
+ /**
2328
+ * Generates formatting template for a national phone number,
2329
+ * optionally containing a national prefix, for a format.
2330
+ * @param {Format} format
2331
+ * @param {string} nationalPrefix
2332
+ * @return {string}
2333
+ */},{key:"getTemplateForFormat",value:function e(t,n){var o=n.nationalSignificantNumber,d=n.international,r=n.nationalPrefix,i=n.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix;var s=t.pattern();
2334
+ /* istanbul ignore else */{s=s.replace(gd(),"\\d").replace(zd(),"\\d")}
2335
+ // Generate a dummy national number (consisting of `9`s)
2336
+ // that fits this format's `pattern`.
2337
+
2338
+ // This match will always succeed,
2339
+ // because the "longest dummy phone number"
2340
+ // has enough length to accomodate any possible
2341
+ // national phone number format pattern.
2342
+
2343
+ var a=yd.match(s)[0];
2344
+ // If the national number entered is too long
2345
+ // for any phone number format, then abort.
2346
+ if(o.length>a.length){return}
2347
+ // Get a formatting template which can be used to efficiently format
2348
+ // a partial number where digits are added one by one.
2349
+ // Below `strictPattern` is used for the
2350
+ // regular expression (with `^` and `$`).
2351
+ // This wasn't originally in Google's `libphonenumber`
2352
+ // and I guess they don't really need it
2353
+ // because they're not using "templates" to format phone numbers
2354
+ // but I added `strictPattern` after encountering
2355
+ // South Korean phone number formatting bug.
2356
+
2357
+ // Non-strict regular expression bug demonstration:
2358
+
2359
+ // this.nationalSignificantNumber : `111111111` (9 digits)
2360
+
2361
+ // pattern : (\d{2})(\d{3,4})(\d{4})
2362
+ // format : `$1 $2 $3`
2363
+ // digits : `9999999999` (10 digits)
2364
+
2365
+ // '9999999999'.replace(new RegExp(/(\d{2})(\d{3,4})(\d{4})/g), '$1 $2 $3') = "99 9999 9999"
2366
+
2367
+ // template : xx xxxx xxxx
2368
+
2369
+ // But the correct template in this case is `xx xxx xxxx`.
2370
+ // The template was generated incorrectly because of the
2371
+ // `{3,4}` variability in the `pattern`.
2372
+
2373
+ // The fix is, if `this.nationalSignificantNumber` has already sufficient length
2374
+ // to satisfy the `pattern` completely then `this.nationalSignificantNumber`
2375
+ // is used instead of `digits`.
2376
+ var u=new RegExp("^"+s+"$");var l=o.replace(/\d/g,vd);
2377
+ // If `this.nationalSignificantNumber` has already sufficient length
2378
+ // to satisfy the `pattern` completely then use it
2379
+ // instead of `digits`.
2380
+ if(u.test(l)){a=l}var $=this.getFormatFormat(t,d);var f;
2381
+ // If a user did input a national prefix (and that's guaranteed),
2382
+ // and if a `format` does have a national prefix formatting rule,
2383
+ // then see if that national prefix formatting rule
2384
+ // prepends exactly the same national prefix the user has input.
2385
+ // If that's the case, then use the `format` with the national prefix formatting rule.
2386
+ // Otherwise, use the `format` without the national prefix formatting rule,
2387
+ // and prepend a national prefix manually to it.
2388
+ if(this.shouldTryNationalPrefixFormattingRule(t,{international:d,nationalPrefix:r})){var c=$.replace(lt,t.nationalPrefixFormattingRule());
2389
+ // If `national_prefix_formatting_rule` of a `format` simply prepends
2390
+ // national prefix at the start of a national (significant) number,
2391
+ // then such formatting can be used with `AsYouType` formatter.
2392
+ // There seems to be no `else` case: everywhere in metadata,
2393
+ // national prefix formatting rule is national prefix + $1,
2394
+ // or `($1)`, in which case such format isn't even considered
2395
+ // when the user has input a national prefix.
2396
+ /* istanbul ignore else */if(fn(t.nationalPrefixFormattingRule())===(r||"")+fn("$1")){$=c;f=true;
2397
+ // Replace all digits of the national prefix in the formatting template
2398
+ // with `DIGIT_PLACEHOLDER`s.
2399
+ if(r){var h=r.length;while(h>0){$=$.replace(/\d/,Eo);h--}}}}
2400
+ // Generate formatting template for this phone number format.
2401
+ var p=a.replace(new RegExp(s),$).replace(new RegExp(vd,"g"),Eo);
2402
+ // If a prefix of a national (significant) number is not as simple
2403
+ // as just a basic national prefix, then just prepend such prefix
2404
+ // before the national (significant) number, optionally spacing
2405
+ // the two with a whitespace.
2406
+ if(!f){if(i){
2407
+ // Prepend the prefix to the template manually.
2408
+ p=Io(Eo,i.length)+" "+p}else if(r){
2409
+ // Prepend national prefix to the template manually.
2410
+ p=Io(Eo,r.length)+this.getSeparatorAfterNationalPrefix(t)+p}}if(d){p=ut(p)}return p}},{key:"formatNextNationalNumberDigits",value:function e(t){var n=To(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,t);if(!n){
2411
+ // Reset the format.
2412
+ this.resetFormat();return}this.populatedNationalNumberTemplate=n[0];this.populatedNationalNumberTemplatePosition=n[1];
2413
+ // Return the formatted phone number so far.
2414
+ return Ao(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);
2415
+ // The old way which was good for `input-format` but is not so good
2416
+ // for `react-phone-number-input`'s default input (`InputBasic`).
2417
+ // return closeNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)
2418
+ // .replace(new RegExp(DIGIT_PLACEHOLDER, 'g'), ' ')
2419
+ }},{key:"shouldTryNationalPrefixFormattingRule",value:function e(t,n){var o=n.international,d=n.nationalPrefix;if(t.nationalPrefixFormattingRule()){
2420
+ // In some countries, `national_prefix_formatting_rule` is `($1)`,
2421
+ // so it applies even if the user hasn't input a national prefix.
2422
+ // `format.usesNationalPrefix()` detects such cases.
2423
+ var r=t.usesNationalPrefix();if(r&&d||!r&&!o){return true}}}}])}();function Cd(e){"@babel/helpers - typeof";return Cd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cd(e)}function Sd(e,t){return Ad(e)||Id(e,t)||Ed(e,t)||Od()}function Od(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ed(e,t){if(e){if("string"==typeof e)return Nd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nd(e,t):void 0}}function Nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Id(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,d,r,i,s=[],a=true,u=false;try{if(r=(n=n.call(e)).next,0===t);else for(;!(a=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);a=true);}catch(e){u=true,d=e}finally{try{if(!a&&null!=n["return"]&&(i=n["return"](),Object(i)!==i))return}finally{if(u)throw d}}return s}}function Ad(e){if(Array.isArray(e))return e}function jd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Td(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,Pd(o.key),o)}}function Ld(e,t,n){return t&&Td(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function Pd(e){var t=Md(e,"string");return"symbol"==Cd(t)?t:t+""}function Md(e,t){if("object"!=Cd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Cd(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rd="["+Ze+De+"]+";var _d=new RegExp("^"+Rd+"$","i");var Fd="(?:"+"["+Ye+"]"+"["+Ze+De+"]*"+"|"+"["+Ze+De+"]+"+")";var Bd=new RegExp("[^"+Ze+De+"]+"+".*"+"$");
2424
+ // Tests whether `national_prefix_for_parsing` could match
2425
+ // different national prefixes.
2426
+ // Matches anything that's not a digit or a square bracket.
2427
+ var Dd=/[^\d\[\]]/;var Gd=function(){function e(t){var n=t.defaultCountry,o=t.defaultCallingCode,d=t.metadata,r=t.onNationalSignificantNumberChange;jd(this,e);this.defaultCountry=n;this.defaultCallingCode=o;this.metadata=d;this.onNationalSignificantNumberChange=r}return Ld(e,[{key:"input",value:function e(t,n){var o=Hd(t),d=Sd(o,2),r=d[0],i=d[1];var s=fn(r);
2428
+ // Checks for a special case: just a leading `+` has been entered.
2429
+ var a;if(i){if(!n.digits){n.startInternationalNumber(undefined,undefined);if(!s){a=true}}}if(s){this.inputDigits(s,n)}return{digits:s,justLeadingPlus:a}}
2430
+ /**
2431
+ * Inputs "next" phone number digits.
2432
+ * @param {string} digits
2433
+ * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means "don't format the national phone number at this stage".
2434
+ */},{key:"inputDigits",value:function e(t,n){var o=n.digits;var d=o.length<3&&o.length+t.length>=3;
2435
+ // Append phone number digits.
2436
+ n.appendDigits(t);
2437
+ // Attempt to extract IDD prefix:
2438
+ // Some users input their phone number in international format,
2439
+ // but in an "out-of-country" dialing format instead of using the leading `+`.
2440
+ // https://github.com/catamphetamine/libphonenumber-js/issues/185
2441
+ // Detect such numbers as soon as there're at least 3 digits.
2442
+ // Google's library attempts to extract IDD prefix at 3 digits,
2443
+ // so this library just copies that behavior.
2444
+ // I guess that's because the most commot IDD prefixes are
2445
+ // `00` (Europe) and `011` (US).
2446
+ // There exist really long IDD prefixes too:
2447
+ // for example, in Australia the default IDD prefix is `0011`,
2448
+ // and it could even be as long as `14880011`.
2449
+ // An IDD prefix is extracted here, and then every time when
2450
+ // there's a new digit and the number couldn't be formatted.
2451
+ if(d){this.extractIddPrefix(n)}if(this.isWaitingForCountryCallingCode(n)){if(!this.extractCountryCallingCode(n)){return}}else{n.appendNationalSignificantNumberDigits(t)}
2452
+ // If a phone number is being input in international format,
2453
+ // then it's not valid for it to have a national prefix.
2454
+ // Still, some people incorrectly input such numbers with a national prefix.
2455
+ // In such cases, only attempt to strip a national prefix if the number becomes too long.
2456
+ // (but that is done later, not here)
2457
+ if(!n.international){if(!this.hasExtractedNationalSignificantNumber){this.extractNationalSignificantNumber(n.getNationalDigits(),(function(e){return n.update(e)}))}}}},{key:"isWaitingForCountryCallingCode",value:function e(t){var n=t.international,o=t.callingCode;return n&&!o}
2458
+ // Extracts a country calling code from a number
2459
+ // being entered in internatonal format.
2460
+ },{key:"extractCountryCallingCode",value:function e(t){var n=at("+"+t.getDigitsWithoutInternationalPrefix(),t.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),o=n.countryCallingCode,d=n.number;if(o){t.setCallingCode(o);t.update({nationalSignificantNumber:d});return true}}},{key:"reset",value:function e(t){if(t){this.hasSelectedNumberingPlan=true;var n=t._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=n&&Dd.test(n)}else{this.hasSelectedNumberingPlan=undefined;this.couldPossiblyExtractAnotherNationalSignificantNumber=undefined}}
2461
+ /**
2462
+ * Extracts a national (significant) number from user input.
2463
+ * Google's library is different in that it only applies `national_prefix_for_parsing`
2464
+ * and doesn't apply `national_prefix_transform_rule` after that.
2465
+ * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539
2466
+ * @return {boolean} [extracted]
2467
+ */},{key:"extractNationalSignificantNumber",value:function e(t,n){if(!this.hasSelectedNumberingPlan){return}var o=Xe(t,this.metadata),d=o.nationalPrefix,r=o.nationalNumber,i=o.carrierCode;if(r===t){return}this.onExtractedNationalNumber(d,i,r,t,n);return true}
2468
+ /**
2469
+ * In Google's code this function is called "attempt to extract longer NDD".
2470
+ * "Some national prefixes are a substring of others", they say.
2471
+ * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.
2472
+ */},{key:"extractAnotherNationalSignificantNumber",value:function e(t,n,o){if(!this.hasExtractedNationalSignificantNumber){return this.extractNationalSignificantNumber(t,o)}if(!this.couldPossiblyExtractAnotherNationalSignificantNumber){return}var d=Xe(t,this.metadata),r=d.nationalPrefix,i=d.nationalNumber,s=d.carrierCode;
2473
+ // If a national prefix has been extracted previously,
2474
+ // then it's always extracted as additional digits are added.
2475
+ // That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`
2476
+ // doesn't do anything different from what it currently does.
2477
+ // So, just in case, here's this check, though it doesn't occur.
2478
+ /* istanbul ignore if */if(i===n){return}this.onExtractedNationalNumber(r,s,i,t,o);return true}},{key:"onExtractedNationalNumber",value:function e(t,n,o,d,r){
2479
+ // Tells if the parsed national (significant) number is present as-is in the input string.
2480
+ // For example, when inputting "0343515551212999" Argentinian mobile number,
2481
+ // the parsed national (significant) number is "93435551212999".
2482
+ // There, one can see how it stripped "0" national prefix and prepended a "9",
2483
+ // because that's how it is instructed to do in Argentina's metadata.
2484
+ // So in the described example, the parsed national (significant) number is not present
2485
+ // as-is in the input string. Instead, it's "modified" in the input string.
2486
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
2487
+ var i=false;
2488
+ // In some countries, a phone number could have a prefix that is not a "national prefix"
2489
+ // but rather some other type of "utility" prefix.
2490
+ // For example, when calling within Australia, one could prepend `1831` prefix to hide
2491
+ // caller's phone number.
2492
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
2493
+ var s;
2494
+ // `nationalSignificantNumber` could be empty. In that case, `.lastIndexOf()` still works correctly.
2495
+ var a=d.lastIndexOf(o);
2496
+ // If the parsed national (significant) number is the last substring of the `nationalDigits`,
2497
+ // then it means that it's present as-is in the input string.
2498
+ // In any other case, the parsed national (significant) number is "modified" in the input string.
2499
+ if(a<0||a!==d.length-o.length){i=true}else{var u=d.slice(0,a);
2500
+ // When national (significant) number is equal to the `nationalDigits`,
2501
+ // this `onExtractedNationalNumber()` function simply doesn't get called.
2502
+ // This means that at this point, `prefixBeforeNationalNumber` is always non-empty.
2503
+ // Still, added this `if` check just to prevent potential silly bugs.
2504
+ // The `!prefixBeforeNationalNumber` case is not really testable
2505
+ // so this line is exluded from the code coverage.
2506
+ /* istanbul ignore if */if(u){if(u!==t){s=u}}}r({nationalPrefix:t,carrierCode:n,nationalSignificantNumber:o,nationalSignificantNumberIsModified:i,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:s});
2507
+ // `onExtractedNationalNumber()` is only called when
2508
+ // the national (significant) number actually did change.
2509
+ this.hasExtractedNationalSignificantNumber=true;this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function e(t){
2510
+ // Attempt to extract a national prefix.
2511
+ // Some people incorrectly input national prefix
2512
+ // in an international phone number.
2513
+ // For example, some people write British phone numbers as `+44(0)...`.
2514
+ // Also, in some rare cases, it is valid for a national prefix
2515
+ // to be a part of an international phone number.
2516
+ // For example, mobile phone numbers in Mexico are supposed to be
2517
+ // dialled internationally using a `1` national prefix,
2518
+ // so the national prefix will be part of an international number.
2519
+ // Quote from:
2520
+ // https://www.mexperience.com/dialing-cell-phones-in-mexico/
2521
+ // "Dialing a Mexican cell phone from abroad
2522
+ // When you are calling a cell phone number in Mexico from outside Mexico,
2523
+ // it’s necessary to dial an additional “1” after Mexico’s country code
2524
+ // (which is “52”) and before the area code.
2525
+ // You also ignore the 045, and simply dial the area code and the
2526
+ // cell phone’s number.
2527
+ // If you don’t add the “1”, you’ll receive a recorded announcement
2528
+ // asking you to redial using it.
2529
+ // For example, if you are calling from the USA to a cell phone
2530
+ // in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.
2531
+ // (Note that this is different to calling a land line in Mexico City
2532
+ // from abroad, where the number dialed would be +52 – 55 – 1234 5678)".
2533
+ // Google's demo output:
2534
+ // https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX
2535
+ if(this.extractAnotherNationalSignificantNumber(t.getNationalDigits(),t.nationalSignificantNumber,(function(e){return t.update(e)}))){return true}
2536
+ // If no format matches the phone number, then it could be
2537
+ // "a really long IDD" (quote from a comment in Google's library).
2538
+ // An IDD prefix is first extracted when the user has entered at least 3 digits,
2539
+ // and then here — every time when there's a new digit and the number
2540
+ // couldn't be formatted.
2541
+ // For example, in Australia the default IDD prefix is `0011`,
2542
+ // and it could even be as long as `14880011`.
2543
+
2544
+ // Could also check `!hasReceivedThreeLeadingDigits` here
2545
+ // to filter out the case when this check duplicates the one
2546
+ // already performed when there're 3 leading digits,
2547
+ // but it's not a big deal, and in most cases there
2548
+ // will be a suitable `format` when there're 3 leading digits.
2549
+
2550
+ if(this.extractIddPrefix(t)){this.extractCallingCodeAndNationalSignificantNumber(t);return true}
2551
+ // Google's AsYouType formatter supports sort of an "autocorrection" feature
2552
+ // when it "autocorrects" numbers that have been input for a country
2553
+ // with that country's calling code.
2554
+ // Such "autocorrection" feature looks weird, but different people have been requesting it:
2555
+ // https://github.com/catamphetamine/libphonenumber-js/issues/376
2556
+ // https://github.com/catamphetamine/libphonenumber-js/issues/375
2557
+ // https://github.com/catamphetamine/libphonenumber-js/issues/316
2558
+ if(this.fixMissingPlus(t)){this.extractCallingCodeAndNationalSignificantNumber(t);return true}}},{key:"extractIddPrefix",value:function e(t){
2559
+ // An IDD prefix can't be present in a number written with a `+`.
2560
+ // Also, don't re-extract an IDD prefix if has already been extracted.
2561
+ var n=t.international,o=t.IDDPrefix,d=t.digits;if(n||o){return}
2562
+ // Some users input their phone number in "out-of-country"
2563
+ // dialing format instead of using the leading `+`.
2564
+ // https://github.com/catamphetamine/libphonenumber-js/issues/185
2565
+ // Detect such numbers.
2566
+ var r=Je(d,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(r!==undefined&&r!==d){
2567
+ // If an IDD prefix was stripped then convert the IDD-prefixed number
2568
+ // to international number for subsequent parsing.
2569
+ t.update({IDDPrefix:d.slice(0,d.length-r.length)});this.startInternationalNumber(t,{country:undefined,callingCode:undefined});return true}}},{key:"fixMissingPlus",value:function e(t){if(!t.international){var n=st(t.digits,t.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),o=n.countryCallingCode;if(o){t.update({missingPlus:true});this.startInternationalNumber(t,{country:t.country,callingCode:o});return true}}}},{key:"startInternationalNumber",value:function e(t,n){var o=n.country,d=n.callingCode;t.startInternationalNumber(o,d);
2570
+ // If a national (significant) number has been extracted before, reset it.
2571
+ if(t.nationalSignificantNumber){t.resetNationalSignificantNumber();this.onNationalSignificantNumberChange();this.hasExtractedNationalSignificantNumber=undefined}}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function e(t){if(this.extractCountryCallingCode(t)){
2572
+ // `this.extractCallingCode()` is currently called when the number
2573
+ // couldn't be formatted during the standard procedure.
2574
+ // Normally, the national prefix would be re-extracted
2575
+ // for an international number if such number couldn't be formatted,
2576
+ // but since it's already not able to be formatted,
2577
+ // there won't be yet another retry, so also extract national prefix here.
2578
+ this.extractNationalSignificantNumber(t.getNationalDigits(),(function(e){return t.update(e)}))}}}])}();function Ud(e){
2579
+ // Attempt to extract a possible number from the string passed in.
2580
+ var t=e.search(Fd);if(t<0){return}
2581
+ // Trim everything to the left of the phone number.
2582
+ e=e.slice(t);
2583
+ // Trim the `+`.
2584
+ var n;if(e[0]==="+"){n=true;e=e.slice("+".length)}
2585
+ // Trim everything to the right of the phone number.
2586
+ e=e.replace(Bd,"");
2587
+ // Re-add the previously trimmed `+`.
2588
+ if(n){e="+"+e}return e}
2589
+ /**
2590
+ * Extracts formatted phone number digits (and a `+`) from text (if there're any).
2591
+ * @param {string} text
2592
+ * @return {any[]}
2593
+ */function Vd(e){
2594
+ // Extract a formatted phone number part from text.
2595
+ var t=Ud(e)||"";
2596
+ // Trim a `+`.
2597
+ if(t[0]==="+"){return[t.slice("+".length),true]}return[t]}
2598
+ /**
2599
+ * Extracts formatted phone number digits (and a `+`) from text (if there're any).
2600
+ * @param {string} text
2601
+ * @return {any[]}
2602
+ */function Hd(e){var t=Vd(e),n=Sd(t,2),o=n[0],d=n[1];
2603
+ // If the extracted phone number part
2604
+ // can possibly be a part of some valid phone number
2605
+ // then parse phone number characters from a formatted phone number.
2606
+ if(!_d.test(o)){o=""}return[o,d]}function Kd(e){"@babel/helpers - typeof";return Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kd(e)}function Wd(e,t){return Xd(e)||Jd(e,t)||Yd(e,t)||Zd()}function Zd(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yd(e,t){if(e){if("string"==typeof e)return qd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qd(e,t):void 0}}function qd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Jd(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,d,r,i,s=[],a=true,u=false;try{if(r=(n=n.call(e)).next,0===t);else for(;!(a=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);a=true);}catch(e){u=true,d=e}finally{try{if(!a&&null!=n["return"]&&(i=n["return"](),Object(i)!==i))return}finally{if(u)throw d}}return s}}function Xd(e){if(Array.isArray(e))return e}function Qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function er(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||false,o.configurable=true,"value"in o&&(o.writable=true),Object.defineProperty(e,nr(o.key),o)}}function tr(e,t,n){return t&&er(e.prototype,t),Object.defineProperty(e,"prototype",{writable:false}),e}function nr(e){var t=or(e,"string");return"symbol"==Kd(t)?t:t+""}function or(e,t){if("object"!=Kd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=Kd(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dr=function(){
2607
+ /**
2608
+ * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.
2609
+ * @param {Object} metadata
2610
+ */
2611
+ function e(t,n){Qd(this,e);
2612
+ // Metadata instance is created once and stays constant.
2613
+ // This is required because other utility classes such as `AsYouTypeFormatter`
2614
+ // will use this metadata instance "reference" and will assume that it stays constant.
2615
+ this.metadata=new le(n);var o=this.getCountryAndCallingCode(t),d=Wd(o,2),r=d[0],i=d[1];
2616
+ // `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.
2617
+ // For example, `this.defaultCountry` could be `"AR"` and `this.defaultCallingCode` could be `undefined`.
2618
+ // So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.
2619
+ this.defaultCountry=r;this.defaultCallingCode=i;this.reset()}return tr(e,[{key:"getCountryAndCallingCode",value:function e(t){
2620
+ // Set `defaultCountry` and `defaultCallingCode` options.
2621
+ var n;var o;
2622
+ // Turns out `null` also has type "object". Weird.
2623
+ if(t){if(X(t)){n=t.defaultCountry;o=t.defaultCallingCode}else{n=t}}if(n&&!this.metadata.hasCountry(n)){n=undefined}return[n,o]}
2624
+ /**
2625
+ * Inputs "next" phone number characters.
2626
+ * @param {string} text
2627
+ * @return {string} Formatted phone number characters that have been input so far.
2628
+ */},{key:"input",value:function e(t){var n=this.parser.input(t,this.state),o=n.digits,d=n.justLeadingPlus;if(d){this.formattedOutput="+"}else if(o){this.determineTheCountryIfNeeded();
2629
+ // Match the available formats by the currently available leading digits.
2630
+ if(this.state.nationalSignificantNumber){this.formatter.narrowDownMatchingFormats(this.state)}var r;if(this.metadata.hasSelectedNumberingPlan()){r=this.formatter.format(o,this.state)}if(r===undefined){
2631
+ // See if another national (significant) number could be re-extracted.
2632
+ if(this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();
2633
+ // If it could, then re-try formatting the new national (significant) number.
2634
+ var i=this.state.getNationalDigits();if(i){r=this.formatter.format(i,this.state)}}}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function e(){var t=this;this.state=new ko({onCountryChange:function e(n){
2635
+ // Before version `1.6.0`, the official `AsYouType` formatter API
2636
+ // included a `.country` property on an `AsYouType` instance.
2637
+ // Since that property (along with the others) have been moved to
2638
+ // `this.state`, `this.country` property is emulated for compatibility
2639
+ // with the old versions.
2640
+ t.country=n},onCallingCodeChange:function e(n,o){t.metadata.selectNumberingPlan(o||n);t.formatter.reset(t.metadata.numberingPlan,t.state);t.parser.reset(t.metadata.numberingPlan)}});this.formatter=new kd({state:this.state,metadata:this.metadata});this.parser=new Gd({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function e(){t.determineTheCountryIfNeeded();t.formatter.reset(t.metadata.numberingPlan,t.state)}});this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode});this.formattedOutput="";return this}
2641
+ /**
2642
+ * Returns `true` if the phone number is being input in international format.
2643
+ * In other words, returns `true` if and only if the parsed phone number starts with a `"+"`.
2644
+ * @return {boolean}
2645
+ */},{key:"isInternational",value:function e(){return this.state.international}
2646
+ /**
2647
+ * Returns the "calling code" part of the phone number when it's being input
2648
+ * in an international format.
2649
+ * If no valid calling code has been entered so far, returns `undefined`.
2650
+ * @return {string} [callingCode]
2651
+ */},{key:"getCallingCode",value:function e(){
2652
+ // If the number is being input in national format and some "default calling code"
2653
+ // has been passed to `AsYouType` constructor, then `this.state.callingCode`
2654
+ // is equal to that "default calling code".
2655
+ // If the number is being input in national format and no "default calling code"
2656
+ // has been passed to `AsYouType` constructor, then returns `undefined`,
2657
+ // even if a "default country" has been passed to `AsYouType` constructor.
2658
+ if(this.isInternational()){return this.state.callingCode}}
2659
+ // A legacy alias.
2660
+ },{key:"getCountryCallingCode",value:function e(){return this.getCallingCode()}
2661
+ /**
2662
+ * Returns a two-letter country code of the phone number.
2663
+ * Returns `undefined` for "non-geographic" phone numbering plans.
2664
+ * Returns `undefined` if no phone number has been input yet.
2665
+ * @return {string} [country]
2666
+ */},{key:"getCountry",value:function e(){var t=this.state.digits;
2667
+ // Return `undefined` if no digits have been input yet.
2668
+ if(t){return this._getCountry()}}
2669
+ /**
2670
+ * Returns a two-letter country code of the phone number.
2671
+ * Returns `undefined` for "non-geographic" phone numbering plans.
2672
+ * @return {string} [country]
2673
+ */},{key:"_getCountry",value:function e(){var t=this.state.country;return t}},{key:"determineTheCountryIfNeeded",value:function e(){
2674
+ // Suppose a user enters a phone number in international format,
2675
+ // and there're several countries corresponding to that country calling code,
2676
+ // and a country has been derived from the number, and then
2677
+ // a user enters one more digit and the number is no longer
2678
+ // valid for the derived country, so the country should be re-derived
2679
+ // on every new digit in those cases.
2680
+ // If the phone number is being input in national format,
2681
+ // then it could be a case when `defaultCountry` wasn't specified
2682
+ // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,
2683
+ // and that "calling code" could correspond to a "non-geographic entity",
2684
+ // or there could be several countries corresponding to that country calling code.
2685
+ // In those cases, `this.country` is `undefined` and should be derived
2686
+ // from the number. Again, if country calling code is ambiguous, then
2687
+ // `this.country` should be re-derived with each new digit.
2688
+ if(!this.state.country||this.isCountryCallingCodeAmbiguous()){this.determineTheCountry()}}
2689
+ // Prepends `+CountryCode ` in case of an international phone number
2690
+ },{key:"getFullNumber",value:function e(t){var n=this;if(this.isInternational()){var o=function e(t){return n.formatter.getInternationalPrefixBeforeCountryCallingCode(n.state,{spacing:t?true:false})+t};var d=this.state.callingCode;if(!d){return o("".concat(this.state.getDigitsWithoutInternationalPrefix()))}if(!t){return o(d)}return o("".concat(d," ").concat(t))}return t}},{key:"getNonFormattedNationalNumberWithPrefix",value:function e(){var t=this.state,n=t.nationalSignificantNumber,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,d=t.nationalPrefix;var r=n;var i=o||d;if(i){r=i+r}return r}},{key:"getNonFormattedNumber",value:function e(){var t=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(t?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function e(){var t=this.getNonFormattedNumber();if(t){return t.replace(/[\+\d]/g,Eo)}}},{key:"isCountryCallingCodeAmbiguous",value:function e(){var t=this.state.callingCode;var n=this.metadata.getCountryCodesForCallingCode(t);return n&&n.length>1}
2691
+ // Determines the exact country of the phone number
2692
+ // entered so far based on the country phone code
2693
+ // and the national phone number.
2694
+ },{key:"determineTheCountry",value:function e(){
2695
+ // Get a more precise country code for this national number.
2696
+ // It is possible that the precise country couldn't be determined
2697
+ // in cases when there're multiple countries sharing the same calling code.
2698
+ // In that case, `country` will be `undefined`.
2699
+ var t=ot(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata});
2700
+ // If the derived country is indeed more precise,
2701
+ // or if no country could be derived for the updated phone number.
2702
+ if(t!==this.state.country){
2703
+ // Set (or reset) the more precise country.
2704
+ this.state.setCountry(t);
2705
+ // If a more precise country could be derived.
2706
+ if(t){
2707
+ // Select a more precise telephone numbering plan.
2708
+ // For example, consider that `AsYouType` instance was created with `defaultCountry: "US"` argument.
2709
+ // In that case, the metadata instance will be using "US" metadata.
2710
+ // But then the user could input a Canadian phone number, in which case
2711
+ // the metadata instance should be switched to Canadian telephone numbering plan.
2712
+ // It is required to do that because later `canFormatCompleteNumber()` function will be called,
2713
+ // and that function relies on the precise country being pre-selected in the metadata instance.
2714
+ // Or, for example, `checkNumberLength()` function also relies on same thing.
2715
+ this.metadata.selectNumberingPlan(t)}}}
2716
+ /**
2717
+ * Returns a E.164 phone number value for the user's input.
2718
+ *
2719
+ * For example, for country `"US"` and input `"(222) 333-4444"`
2720
+ * it will return `"+12223334444"`.
2721
+ *
2722
+ * For international phone number input, it will also auto-correct
2723
+ * some minor errors such as using a national prefix when writing
2724
+ * an international phone number. For example, if the user inputs
2725
+ * `"+44 0 7400 000000"` then it will return an auto-corrected
2726
+ * `"+447400000000"` phone number value.
2727
+ *
2728
+ * Will return `undefined` if no digits have been input,
2729
+ * or when inputting a phone number in national format and no
2730
+ * default country or default "country calling code" have been set.
2731
+ *
2732
+ * @return {string} [value]
2733
+ */},{key:"getNumberValue",value:function e(){var t=this.state,n=t.digits,o=t.callingCode,d=t.country,r=t.nationalSignificantNumber;
2734
+ // Will return `undefined` if no digits have been input.
2735
+ if(!n){return}if(this.isInternational()){if(o){return"+"+o+r}else{return"+"+n}}else{if(d||o){var i=d?this.metadata.countryCallingCode():o;return"+"+i+r}}}
2736
+ /**
2737
+ * Returns an instance of `PhoneNumber` class.
2738
+ * Will return `undefined` if no national (significant) number
2739
+ * digits have been entered so far, or if no `defaultCountry` has been
2740
+ * set and the user enters a phone number not in international format.
2741
+ */},{key:"getNumber",value:function e(){var t=this.state,n=t.nationalSignificantNumber,o=t.carrierCode,d=t.callingCode;if(!n){return}
2742
+ // `this._getCountry()` is basically same as `this.state.country`
2743
+ // with the only change that it returns `undefined` in case of a
2744
+ // "non-geographic" numbering plan instead of `"001"` "internal use" value.
2745
+ var r=this._getCountry();
2746
+ // Sidenote:
2747
+ // `state.callingCode` and `state.country` are somewhat independent from one another
2748
+ // and there could be situations when one is defined but the other is not.
2749
+ // See the comment in `AsYouTypeState.js` for more info on when that is possible.
2750
+ if(!r&&!d){return}
2751
+ // By default, if `defaultCountry` parameter was passed when
2752
+ // creating `AsYouType` instance, `state.country` is gonna be
2753
+ // that `defaultCountry`, which doesn't entirely conform with
2754
+ // `parsePhoneNumber()`'s behavior where it attempts to determine
2755
+ // the country more precisely in cases when multiple countries
2756
+ // could correspond to the same `countryCallingCode`.
2757
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969
2758
+
2759
+ // Because `AsYouType.getNumber()` method is supposed to be a 1:1
2760
+ // equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,
2761
+ // it means that it should also behave accordingly in such cases of `country` ambiguity.
2762
+ // That's how users of this library would expect it to behave anyway.
2763
+
2764
+ // So here it checks if `state.country` is same as the `defaultCountry`,
2765
+ // and if it is, it attempts to get rid of any potential ambiguity.
2766
+
2767
+ if(r){if(r===this.defaultCountry){
2768
+ // // Create a `Metadata` instance just to get the calling code of the `country`.
2769
+ // const metadata = new Metadata(this.metadata.metadata)
2770
+ // // `state.callingCode` and `state.country` are somewhat independent from one another
2771
+ // // and there could be situations when one is defined but the other is not.
2772
+ // // See the comment in `AsYouTypeState.js` for more info on when that is possible.
2773
+ // // Here, it only passes `state.country` because there's no need to pass `state.callingCode`
2774
+ // // because `state.country` is known to be defined.
2775
+ // metadata.selectNumberingPlan(country)
2776
+ // const countryCallingCode = metadata.numberingPlan.callingCode()
2777
+ // Instead of getting `countryCallingCode` value above,
2778
+ // it could simply read it from the existing metadata instance.
2779
+ var i=this.metadata.numberingPlan.callingCode();
2780
+ // Attempt to rule out any potential country code ambiguity, if present.
2781
+ var s=rr(i,n,this.metadata);if(s){r=s}}}var a=new Gt(r||d,n,this.metadata.metadata);if(o){a.carrierCode=o}
2782
+ // Phone number extensions are not supported by "As You Type" formatter.
2783
+ return a}
2784
+ /**
2785
+ * Returns `true` if the phone number is "possible".
2786
+ * Is just a shortcut for `PhoneNumber.isPossible()`.
2787
+ * @return {boolean}
2788
+ */},{key:"isPossible",value:function e(){var t=this.getNumber();if(!t){return false}return t.isPossible()}
2789
+ /**
2790
+ * Returns `true` if the phone number is "valid".
2791
+ * Is just a shortcut for `PhoneNumber.isValid()`.
2792
+ * @return {boolean}
2793
+ */},{key:"isValid",value:function e(){var t=this.getNumber();if(!t){return false}return t.isValid()}
2794
+ /**
2795
+ * Checks if the phone number length is valid.
2796
+ * If it is, nothing is returned.
2797
+ * Otherwise, a rejection reason is returned.
2798
+ * @return {string?}
2799
+ */},{key:"validateLength",value:function e(){var t=this.state,n=t.digits,o=t.nationalSignificantNumber;if(!n){return"NOT_A_NUMBER"}if(!this.metadata.numberingPlan){return"INVALID_COUNTRY"}if(!o){return"TOO_SHORT"}
2800
+ // `state.callingCode` and `state.country` are somewhat independent from one another
2801
+ // and there could be situations when one is defined but the other is not.
2802
+ // See the comment in `AsYouTypeState.js` for more info on when that is possible.
2803
+ // Here, it uses both: if `country` is defined then it will use that,
2804
+ // otherwise it will use `callingCode`.
2805
+ var d=ze(o,undefined,this.metadata);if(d!=="IS_POSSIBLE"){return d}}
2806
+ /**
2807
+ * @deprecated
2808
+ * This method is used in `react-phone-number-input/source/input-control.js`
2809
+ * in versions before `3.0.16`.
2810
+ */},{key:"getNationalNumber",value:function e(){return this.state.nationalSignificantNumber}
2811
+ /**
2812
+ * Returns the phone number characters entered by the user.
2813
+ * @return {string}
2814
+ */},{key:"getChars",value:function e(){return(this.state.international?"+":"")+this.state.digits}
2815
+ /**
2816
+ * Returns the template for the formatted phone number.
2817
+ * @return {string}
2818
+ */},{key:"getTemplate",value:function e(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])}();// In situations when multiple countries use the same calling code,
2819
+ function rr(e,t,n){var o=n.getCountryCodesForCallingCode(e);if(o.length>1){return nt(t,o,n.metadata)}}function ir(){return Y(bo,arguments)}
2820
+ // Importing from a ".js" file is a workaround for Node.js "ES Modules"
2821
+ // importing system which is even uncapable of importing "*.json" files.
2822
+ function sr(e){return dr.call(this,e,Z)}sr.prototype=Object.create(dr.prototype,{});sr.prototype.constructor=sr;
2823
+ // Sort out arguments
2824
+ function ar(e){
2825
+ // This line of code appeared to not work correctly with `babel`/`istanbul`:
2826
+ // for some weird reason, it caused coverage less than 100%.
2827
+ // That's because `babel`/`istanbul`, for some weird reason,
2828
+ // apparently doesn't know how to properly exclude Babel polyfills from code coverage.
2829
+ // const [arg_1, arg_2, arg_3, arg_4] = Array.prototype.slice.call(args)
2830
+ var t=e[0];var n=e[1];var o=e[2];var d=e[3];var r;var i={};var s;
2831
+ // If the phone number is passed as a string.
2832
+ // `getNumberType('88005553535', ...)`.
2833
+ if(typeof t==="string"){
2834
+ // If "default country" argument is being passed
2835
+ // then convert it to an `options` object.
2836
+ // `getNumberType('88005553535', 'RU', metadata)`.
2837
+ if(!X(n)){if(d){i=o;s=d}else{s=o}
2838
+ // `parse` extracts phone numbers from raw text,
2839
+ // therefore it will cut off all "garbage" characters,
2840
+ // while this `validate` function needs to verify
2841
+ // that the phone number contains no "garbage"
2842
+ // therefore the explicit `isViablePhoneNumber` check.
2843
+ if(wt(t)){r=_n(t,{defaultCountry:n},s)}else{r={}}}
2844
+ // No "resrict country" argument is being passed.
2845
+ // International phone number is passed.
2846
+ // `getNumberType('+78005553535', metadata)`.
2847
+ else{if(o){i=n;s=o}else{s=n}
2848
+ // `parse` extracts phone numbers from raw text,
2849
+ // therefore it will cut off all "garbage" characters,
2850
+ // while this `validate` function needs to verify
2851
+ // that the phone number contains no "garbage"
2852
+ // therefore the explicit `isViablePhoneNumber` check.
2853
+ if(wt(t)){r=_n(t,undefined,s)}else{r={}}}}
2854
+ // If the phone number is passed as a parsed phone number.
2855
+ // `getNumberType({ phone: '88005553535', country: 'RU' }, ...)`.
2856
+ else if(X(t)){r=t;if(o){i=n;s=o}else{s=n}}else throw new TypeError("A phone number must either be a string or an object of shape { phone, [country] }.");return{input:r,options:i,metadata:s}}
2857
+ /**
2858
+ * Checks if a given phone number is possible.
2859
+ * Which means it only checks phone number length
2860
+ * and doesn't test any regular expressions.
2861
+ *
2862
+ * Examples:
2863
+ *
2864
+ * ```js
2865
+ * isPossibleNumber('+78005553535', metadata)
2866
+ * isPossibleNumber('8005553535', 'RU', metadata)
2867
+ * isPossibleNumber('88005553535', 'RU', metadata)
2868
+ * isPossibleNumber({ phone: '8005553535', country: 'RU' }, metadata)
2869
+ * ```
2870
+ */function ur(){var e=ar(arguments),t=e.input,n=e.options,o=e.metadata;
2871
+ // `parseNumber()` would return `{}` when no phone number could be parsed from the input.
2872
+ if(!t.phone&&!(n&&n.v2)){return false}return xe(t,n,o)}
2873
+ // Deprecated.
2874
+ function lr(){return Y(ur,arguments)}var $r='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var fr=function(){return'.sc-zonos-stripe-phone-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-phone-input-h *.sc-zonos-stripe-phone-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-phone-input-h img.sc-zonos-stripe-phone-input{max-width:100%}.sc-zonos-stripe-phone-input-h dl.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h dd.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h1.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h2.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h3.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h4.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h5.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h h6.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h hr.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h figure.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h p.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h pre.sc-zonos-stripe-phone-input{margin:0}.sc-zonos-stripe-phone-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-phone-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%), 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8;margin:1px;position:relative;display:block}.dark.sc-zonos-stripe-phone-input-h,[data-theme=DARK].sc-zonos-stripe-phone-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5), 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%), 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-phone-input-h{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px;position:relative;width:100%}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.sc-zonos-stripe-phone-input{position:relative;width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;height:calc(var(--zonos-elements-size-xl) - 2px);background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;overflow:visible}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.sc-zonos-stripe-phone-input .zonos--select.sc-zonos-stripe-phone-input{position:absolute;opacity:0;inset:0;width:100%;cursor:pointer}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.sc-zonos-stripe-phone-input .zonos--input-group.sc-zonos-stripe-phone-input{display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;width:100%;height:100%;pointer-events:none}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.focused.sc-zonos-stripe-phone-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius);-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));pointer-events:none}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.has-error.sc-zonos-stripe-phone-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius);-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41;pointer-events:none}.sc-zonos-stripe-phone-input-h .zonos--label-wrapper.disabled.sc-zonos-stripe-phone-input{opacity:var(--zonos-elements-opacity-disabled);cursor:not-allowed;pointer-events:none}.sc-zonos-stripe-phone-input-h .zonos--select-wrapper.sc-zonos-stripe-phone-input{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer}.sc-zonos-stripe-phone-input-h .zonos--select-wrapper.sc-zonos-stripe-phone-input:hover{background-color:rgba(0, 0, 0, 0.02)}.sc-zonos-stripe-phone-input-h .zonos--input-container.sc-zonos-stripe-phone-input{-ms-flex:1;flex:1;position:relative;z-index:2;pointer-events:all}.sc-zonos-stripe-phone-input-h .zonos--input-container.has-label.sc-zonos-stripe-phone-input .zonos--floated-input.sc-zonos-stripe-phone-input{padding:24px 12px 2px}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input{background:transparent;border:none;width:100%;height:100%;padding:0 12px;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color);outline:none;-webkit-box-sizing:border-box;box-sizing:border-box}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:disabled{cursor:not-allowed}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input::-webkit-input-placeholder{opacity:0;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input::-moz-placeholder{opacity:0;-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:-ms-input-placeholder{opacity:0;-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input::-ms-input-placeholder{opacity:0;-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input::placeholder{opacity:0;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-phone-input-h .zonos--floated-input.sc-zonos-stripe-phone-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-phone-input-h .zonos--floated-label.sc-zonos-stripe-phone-input{display:block;max-height:0;pointer-events:none}.sc-zonos-stripe-phone-input-h .zonos--floated-label.sc-zonos-stripe-phone-input label.sc-zonos-stripe-phone-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);left:12px;top:calc(50% - 8px);z-index:1}.sc-zonos-stripe-phone-input-h .has-content.sc-zonos-stripe-phone-input .zonos--input-container.sc-zonos-stripe-phone-input .zonos--floated-label.sc-zonos-stripe-phone-input label.sc-zonos-stripe-phone-input,.sc-zonos-stripe-phone-input-h .focused.sc-zonos-stripe-phone-input .zonos--input-container.sc-zonos-stripe-phone-input .zonos--floated-label.sc-zonos-stripe-phone-input label.sc-zonos-stripe-phone-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.zonos--country-select.sc-zonos-stripe-phone-input{position:relative;height:100%}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--country-select-content.sc-zonos-stripe-phone-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:12px;height:100%;z-index:1}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--country-select-selected.sc-zonos-stripe-phone-input{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--select-chevron-wrapper.sc-zonos-stripe-phone-input{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--select-chevron-wrapper.sc-zonos-stripe-phone-input .zonos--select-chevron.sc-zonos-stripe-phone-input{pointer-events:none;color:var(--zonos-elements-gray-800);padding-left:4px}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--country-flag-wrapper.sc-zonos-stripe-phone-input{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--country-flag.sc-zonos-stripe-phone-input{border-radius:var(--zonos-elements-radius-4);width:20px;height:16px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium)}.zonos--country-select.sc-zonos-stripe-phone-input .zonos--country-code.sc-zonos-stripe-phone-input{font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color)}'};var cr=0;var hr=e("zonos_stripe_phone_input",/** @class */function(){function e(e){var o=this;t(this,e);this.inputValueChange=n(this,"inputValueChange",7);this.inputId="zonos--phone-input-".concat(++cr);
2875
+ /**
2876
+ * Inherited attributes from the host element
2877
+ */this.inheritedAttributes={};
2878
+ /**
2879
+ * The autoComplete attribute for the phone input
2880
+ */this.autoComplete="";
2881
+ /**
2882
+ * Available country options for the select dropdown
2883
+ */this.countryOptions=null;
2884
+ /**
2885
+ * Whether the input is disabled
2886
+ */this.disabled=false;
2887
+ /**
2888
+ * The country code of the phone input
2889
+ */this.countryCode=null;this.phoneNumber="";this.isFocused=false;this.isSelectOpen=false;this.handleCountryChange=function(e){var t;var n=e.target;var d=(t=o.countryOptions)===null||t===void 0?void 0:t[n.value];o.selectedCountry=d;
2890
+ // Update the phone formatter to use the new country code
2891
+ o.updatePhoneFormatter();var r=o.validatePhoneNumber(),i=r.isEmpty,s=r.valid,a=r.wrongFormat;o.inputValueChange.emit({countryCode:(d===null||d===void 0?void 0:d.countryCode)||null,isEmpty:i,phoneNumber:o.phoneNumber,valid:s,wrongFormat:a})};this.handlePhoneChange=function(e){var t,n;var d=e.target;var r=d.value.replace(/[^0-9]/g,"");if(o.asYouType){o.asYouType.reset();var i=o.asYouType.input(r);
2892
+ // Get the full number (including the country code) from the formatter (e.g. +17022920000)
2893
+ o.phoneNumber=((t=o.asYouType.getNumber())===null||t===void 0?void 0:t.number)||"";d.value=i}else{o.phoneNumber=r}var s=o.validatePhoneNumber(),a=s.isEmpty,u=s.valid,l=s.wrongFormat;o.inputValueChange.emit({countryCode:((n=o.selectedCountry)===null||n===void 0?void 0:n.countryCode)||null,isEmpty:a,phoneNumber:o.phoneNumber,valid:u,wrongFormat:l})};this.handleFocus=function(){o.isFocused=true};this.handleBlur=function(){o.isFocused=false};
2894
+ // Type guard to check if the country code is in the country options
2895
+ this.isCountryCode=function(e){var t;return((t=o.countryOptions)===null||t===void 0?void 0:t[e])!==undefined};this.initPhoneNumberValue=function(){var e;if(!o.countryOptions){return}
2896
+ // Guess the country code from the phone number
2897
+ var t=(e=ir(o.inputValue||"",{defaultCountry:o.countryCode}))===null||e===void 0?void 0:e.country;
2898
+ // If the guessed country code is not in the country options, use the provided country code
2899
+ var n=t&&o.isCountryCode(t)?t:o.countryCode;
2900
+ // Get the first available country from the options
2901
+ var d=Object.values(o.countryOptions).find(Boolean);
2902
+ // If no country code is provided, set the first available country
2903
+ if(!n){o.selectedCountry=d;var r=o.validatePhoneNumber(),i=r.isEmpty,s=r.valid,a=r.wrongFormat;
2904
+ // Emit the change event so the parent component can update the state to the first country
2905
+ o.inputValueChange.emit({countryCode:(d===null||d===void 0?void 0:d.countryCode)||null,isEmpty:i,phoneNumber:o.phoneNumber,valid:s,wrongFormat:a});return}o.selectedCountry=o.countryOptions[n]||d;o.phoneNumber=o.inputValue||"";
2906
+ // Update the phone formatter to use the new country code
2907
+ o.updatePhoneFormatter()}}e.prototype.onCountryCodeChange=function(){
2908
+ /**
2909
+ * Re-derive the dial code when the address country changes, otherwise a
2910
+ * shopper who changes country keeps the previous country's dial code — for
2911
+ * example a US billing address on a Mexico shipment would send a US phone
2912
+ * number prefixed with +52 (05CHECK-915).
2913
+ */
2914
+ this.initPhoneNumberValue()};e.prototype.onCountryOptionsChange=function(){
2915
+ // Re-initialize the phone number value when the country options change
2916
+ this.initPhoneNumberValue()};e.prototype.onSelectedCountryChange=function(){this.updatePhoneFormatter()};e.prototype.onPhoneNumberChange=function(){this.phoneNumber=this.inputValue||"";this.updatePhoneFormatter()};e.prototype.validatePhoneNumber=function(){var e;if(!this.phoneNumber){return{isEmpty:true,valid:false,wrongFormat:false}}
2917
+ // Just accept the phone number if the formatter is not available
2918
+ var t=((e=this.asYouType.getNumber())===null||e===void 0?void 0:e.number)||"";var n=lr(t);return{isEmpty:false,valid:n,wrongFormat:!n}};
2919
+ /**
2920
+ * Update the phone formatter to use the new country code
2921
+ */e.prototype.updatePhoneFormatter=function(){var e,t,n,o;var d=Object.values(this.countryOptions||[]).find(Boolean);var r=((e=this.selectedCountry)===null||e===void 0?void 0:e.countryCode)||(d===null||d===void 0?void 0:d.countryCode)||"US";this.asYouType=new sr(r);if(this.phoneNumber){
2922
+ // Re-format existing number with new formatter
2923
+ this.asYouType.input(this.phoneNumber);if(this.inputRef){this.inputRef.value=((t=this.asYouType.getNumber())===null||t===void 0?void 0:t.formatNational())||"";var i=this.validatePhoneNumber(),s=i.isEmpty,a=i.valid,u=i.wrongFormat;
2924
+ // emit the change event
2925
+ this.inputValueChange.emit({countryCode:((n=this.selectedCountry)===null||n===void 0?void 0:n.countryCode)||null,isEmpty:s,phoneNumber:((o=this.asYouType.getNumber())===null||o===void 0?void 0:o.number)||"",valid:a,wrongFormat:u})}}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},N(this.el)),I(this.el,["tabindex","title","data-form-type","dir"]));this.initPhoneNumberValue()};e.prototype.componentDidLoad=function(){this.initPhoneNumberValue()};e.prototype.render=function(){var e=this;var t;var n=this.overridePrimaryColor||l.appearance.colorPrimary;var r=this.overrideSecondaryColor||l.appearance.colorSecondary;var s=n&&A(n);var a=l.appearance.fontSizeInputValue||16;var u=!!this.phoneNumber;var f=this.countryOptions?Object.values(this.countryOptions).filter(Boolean).sort((function(e,t){return e.displayName.localeCompare(t.displayName)})):[];return o(d,{key:"e2a1fc4c2e5f57dc1ae904b70b5f7f421297ae0c",class:c(["zonos--phone-input zonos--elements",s&&"dark"]),"data-theme":s?"DARK":"LIGHT",style:Object.assign({"--zonos--border-radius":z(),"--zonos--font-family":$(),"--zonos--font-size":"".concat(a,"px"),"--zonos--primary-color":r},this.minWidth?{"--zonos--min-width":this.minWidth}:{})},o("div",{key:"61a2ee1f566234692a80fe68fbc4d171f36263dc",class:c(["zonos--label-wrapper",this.disabled&&"disabled",this.isFocused&&"focused",u&&"has-content",this.error&&"has-error",this.inputLabel&&"has-label"])},o("select",{key:"32602cf340a06a26c483f049595cdd812826275e",class:"zonos--select",disabled:this.disabled,onBlur:this.handleBlur,onChange:this.handleCountryChange,onFocus:this.handleFocus},f.map((function(t){var n;return o("option",{key:t.countryCode,selected:t.countryCode===((n=e.selectedCountry)===null||n===void 0?void 0:n.countryCode),value:t.countryCode},t.displayName," (+",t.phoneCode,")")}))),o("div",{key:"1a36aa363a853c420303241e75d89e5aa298dee9",class:"zonos--input-group"},o("div",{key:"7f4d30619c8f69b98422bfcab964113d598d45fa",class:"zonos--select-wrapper"},o("div",{key:"44d0f28dde38fc09ce612ad4cb78f9d1fbdbe951",class:"zonos--country-select"},o("div",{key:"c438e242374e303688150aec2c8eae51b6e1427d",class:"zonos--country-select-content"},this.selectedCountry&&o("div",{key:"2aaec2a6315d2ee84244c4458efce6d27c8598ad",class:"zonos--country-select-selected"},o("div",{key:"819a8b6fd270e43992c19a4b96a4ce5335ae166f",class:"zonos--country-flag-wrapper"},o("zonos-country-flag",{key:"090e6ce55541db022a55497b1b3a6fa7ff2b5406",class:"zonos--country-flag",countryCode:this.selectedCountry.countryCode})),o("div",{key:"021bc4bf590fb6dca736478cc8f9914ce764c1ab",class:"zonos--country-code"},"+",this.selectedCountry.phoneCode)),o("div",{key:"f7256f51c803d1b5aedb3b5d646a777cb553aa9d",class:"zonos--select-chevron-wrapper"},o("zonos-icon",{key:"a018c3fffc1c029df874d9be3c938307b4609d82","aria-label":"Expand collapsed section",class:"zonos--select-chevron",content:$r,iconColor:"gray-800"}))))),o("div",{key:"dd20516acf7d5cab10fe91ff4a6f59cc91600732",class:c(["zonos--input-container",this.inputLabel&&"has-label",u&&"has-content"])},o("input",Object.assign({key:"ed8b536ba7aac9bae8012692ceb9f8573640c5d6"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:"zonos--floated-input",disabled:this.disabled,id:this.inputId,onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handlePhoneChange,placeholder:((t=this.selectedCountry)===null||t===void 0?void 0:t.phonePlaceholder)||"",ref:function(t){return e.inputRef=t},type:"tel"})),this.inputLabel&&o("div",{key:"be2ae82b335dd291d53f48a73f9b23744392daf6",class:"zonos--floated-label"},o("label",{key:"1894a34c3a5ea09b2b45e8dfc9103d944ac69118",htmlFor:this.inputId},this.inputLabel||i("Phone number")))))),this.error&&o("zonos-text",{key:"ae0ab1f97abbecf8dda4eced5aa139d8c51decaf",textColor:"red-600"},this.error))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{countryCode:[{onCountryCodeChange:0}],countryOptions:[{onCountryOptionsChange:0}],selectedCountry:[{onSelectedCountryChange:0}],inputValue:[{onPhoneNumberChange:0}]}},enumerable:false,configurable:true});return e}());hr.style=fr();var pr='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var vr='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var br=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%), 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}:host(.dark){color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5), 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%), 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}:host{margin:1px;position:relative;min-width:var(--zonos--min-width, unset)}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:calc(var(--zonos-elements-size-xl) - 4px);width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px}:host .zonos--floated-select{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 36px 0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos--background-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}:host .zonos--floated-select.has-label{padding:24px 36px 2px 16px}:host .zonos--floated-select:focus{outline:none;border:var(--zonos--border)}:host .zonos--floated-select:focus~.zonos--floated-label::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}:host .zonos--floated-select.has-error+.zonos--floated-label::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}:host .zonos--floated-select.has-content,:host .zonos--floated-select:focus{color:var(--zonos-elements-text-color)}:host .zonos--floated-select.has-content~.zonos--floated-label label,:host .zonos--floated-select:focus~.zonos--floated-label label{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-select:-webkit-autofill,:host .zonos--floated-select:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-select option{background-color:var(--zonos--background-color);color:inherit}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label label{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .zonos--actions-wrapper{position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:1;pointer-events:none;display:-ms-flexbox;display:flex}:host .zonos--select-chevron{cursor:pointer;color:var(--zonos-elements-gray-800);z-index:1}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host .disabled .zonos--select-chevron{opacity:0.5}.zonos--clear-button{background:none;border:none;pointer-events:auto;cursor:pointer}.zonos--clear-button:hover{-webkit-filter:brightness(0.8);filter:brightness(0.8)}:host(.dark) .zonos--label-wrapper{background:#30313d}'};var yr=0;var mr=e("zonos_stripe_select",/** @class */function(){function e(e){var o=this;t(this,e);this.selectChange=n(this,"selectChange",7);
2926
+ /**
2927
+ * Inherited attributes from the host element
2928
+ */this.inheritedAttributes={};this.selectId="zonos--select-".concat(++yr);
2929
+ /**
2930
+ * Selected value of the select
2931
+ */this.selectedValue="";
2932
+ /**
2933
+ * Disables the select
2934
+ */this.isDisabled=false;
2935
+ /**
2936
+ * Error state of the select
2937
+ */this.isError=false;
2938
+ /**
2939
+ * Error message of the select
2940
+ */this.error="";
2941
+ /**
2942
+ * Placeholder for the select
2943
+ */this.selectPlaceholder="";
2944
+ /**
2945
+ * Options for the select. Must be set using a query selector.
2946
+ */this.options=[];
2947
+ /**
2948
+ * The autoComplete attribute for the select.
2949
+ */this.autoComplete="";
2950
+ /**
2951
+ * The value of the select.
2952
+ */this.value="";
2953
+ /**
2954
+ * Whether the select is required
2955
+ */this.required=false;
2956
+ /**
2957
+ * Whether the select can be cleared
2958
+ */this.isClearable=false;this.internalValue=this.selectedValue;this.internalOptions=this.options;this.handleClear=function(e){e.stopPropagation();o.internalValue="";o.selectChange.emit("");o.el.selectedValue="";o.el.dispatchEvent(new Event("change"))}}e.prototype.onOptionsChange=function(e){this.internalOptions=e};e.prototype.onSelectedValueChange=function(e){this.internalValue=e;this.selectChange.emit(e);this.value=e;
2959
+ // If the value is not found in the options, clear the value to force user to select an option
2960
+ this.handleNotFoundOption(e)};e.prototype.onValueChange=function(e){this.internalValue=e;
2961
+ // If the value is not found in the options, clear the value to force user to select an option
2962
+ this.handleNotFoundOption(e)};
2963
+ // If the value is not found in the options, clear the value to force user to select an option
2964
+ e.prototype.handleNotFoundOption=function(e){var t=this.internalOptions.find((function(t){return t.value===e||t.label===e}));if(!t){this.internalValue="";this.selectChange.emit("")}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},N(this.el)),I(this.el,["tabindex","title","data-form-type","dir"]))};e.prototype.render=function(){var e=this;var t=this.overridePrimaryColor||l.appearance.colorPrimary;var n=this.overrideSecondaryColor||l.appearance.colorSecondary;var r=t&&A(t);var s=l.appearance.fontSizeInputValue||16;var a=this.internalValue||this.selectPlaceholder;var u=this.isClearable&&this.internalValue&&!this.isDisabled;return o(d,{key:"c6bf5ed45fd7756985bd97b542933d25a472aa2c",class:c(["zonos--select zonos--elements",r&&"dark",this.isError&&"has-error"]),"data-theme":r?"DARK":"LIGHT",style:Object.assign({"--zonos--border-radius":z(),"--zonos--font-family":$(),"--zonos--font-size":"".concat(s,"px"),"--zonos--primary-color":n},this.minWidth?{"--zonos--min-width":this.minWidth}:{})},o("div",{key:"7ff61460b6ac3c5b3e6e35000f3713609a26ebe2",class:c(["zonos--label-wrapper",this.isDisabled&&"disabled"])},o("select",Object.assign({key:"9d644b04d7b46621245581c5143d7310e1d5396d"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:c(["zonos--floated-select",!!this.selectLabel&&"has-label",a&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,id:this.selectId,name:this.name,onChange:function(t){var n=t.target;e.selectChange.emit(n.value);e.selectedValue=n.value;e.el.dispatchEvent(new Event("change"))},required:this.required}),o("option",{key:"b448bc3c2a083334108afad566feff22bf89547a",disabled:true,selected:!this.internalValue,value:""},this.selectPlaceholder||i("Select")),this.internalOptions.map((function(t){return o("option",{key:t.value,selected:e.internalValue===t.value||
2965
+ // Sometimes google returns the label not the code for some countries
2966
+ e.internalValue===t.label,value:t.value},t.label)}))),o("div",{key:"14b3c9dad1202d432ba2a30d03e8335aebaafa89",class:"zonos--floated-label"},o("label",{key:"4e7870ce3eeaf4ea6fd116e3a486537bebb88c87",htmlFor:this.selectId},this.selectLabel)),o("div",{key:"4567ca19c1e018d483105c23ca781e0bbd1d2c3a",class:"zonos--actions-wrapper"},u&&o("button",{key:"cdceea7255fdd19177b82c42878a6c4a20690a1a","aria-label":"Clear selection",class:"zonos--clear-button",onClick:this.handleClear,tabIndex:0,type:"button"},o("zonos-icon",{key:"099b2f1a4fb475bfa76b0f4aeee9e66f27d473f3",class:"zonos--clear-icon",content:vr,iconColor:"gray-1200"})),o("zonos-icon",{key:"8c7fdaf2de40a14e4fa0f8f3598851edac1c1ae6","aria-label":"Expand collapsed section",class:"zonos--select-chevron",content:pr,iconColor:"gray-800"}))),this.error&&o("zonos-text",{key:"1cb569a7feeea85874c852a1c69cf88076fd6856",textColor:"red-600"},this.error))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{options:[{onOptionsChange:0}],selectedValue:[{onSelectedValueChange:0}],value:[{onValueChange:0}]}},enumerable:false,configurable:true});return e}());mr.style=br()}}}));