@ozdao/prometheus-framework 0.2.87 → 0.2.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. package/dist/auth.server.js +0 -16
  2. package/dist/auth.server.mjs +0 -16
  3. package/dist/community.server.js +0 -24
  4. package/dist/community.server.mjs +0 -24
  5. package/dist/events.server.js +0 -16
  6. package/dist/events.server.mjs +0 -16
  7. package/dist/files.server.js +0 -8
  8. package/dist/files.server.mjs +0 -8
  9. package/dist/gallery.server.js +0 -8
  10. package/dist/gallery.server.mjs +0 -8
  11. package/dist/main-Bw0PvTs-.mjs +13616 -0
  12. package/dist/main-D8gNZLSa.js +92 -0
  13. package/dist/main.css +1 -1
  14. package/dist/node_modules/@adraffy/ens-normalize/dist/index.cjs +1 -1
  15. package/dist/node_modules/@adraffy/ens-normalize/dist/index.js +180 -180
  16. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -1
  17. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +5 -5
  18. package/dist/node_modules/@noble/hashes/esm/_u64.cjs +1 -1
  19. package/dist/node_modules/@noble/hashes/esm/_u64.js +16 -61
  20. package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.cjs +1 -1
  21. package/dist/node_modules/ethereum-cryptography/esm/pbkdf2.js +9 -10
  22. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +1 -1
  23. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +1 -1
  24. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs +3 -3
  25. package/dist/node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js +9 -9
  26. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.cjs +1 -1
  27. package/dist/node_modules/web3-eth/lib/esm/utils/get_transaction_error.js +33 -33
  28. package/dist/node_modules/web3-eth-abi/lib/esm/utils.cjs +1 -1
  29. package/dist/node_modules/web3-eth-abi/lib/esm/utils.js +24 -24
  30. package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.cjs +1 -1
  31. package/dist/node_modules/web3-eth-accounts/lib/esm/common/utils.js +30 -30
  32. package/dist/node_modules/web3-validator/lib/esm/validation/string.cjs +1 -1
  33. package/dist/node_modules/web3-validator/lib/esm/validation/string.js +9 -9
  34. package/dist/organizations.server.js +0 -32
  35. package/dist/organizations.server.mjs +0 -32
  36. package/dist/products.server.js +0 -20
  37. package/dist/products.server.mjs +0 -20
  38. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  39. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +3046 -2899
  40. package/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -1
  41. package/dist/prometheus-framework/node_modules/axios/lib/axios.js +1 -2
  42. package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -1
  43. package/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +1 -2
  44. package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -1
  45. package/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +18 -19
  46. package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -2
  47. package/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +66 -67
  48. package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -1
  49. package/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +38 -39
  50. package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -1
  51. package/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +1 -2
  52. package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.cjs +1 -1
  53. package/dist/prometheus-framework/node_modules/date-fns/eachDayOfInterval.js +13 -16
  54. package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.cjs +1 -1
  55. package/dist/prometheus-framework/node_modules/date-fns/eachQuarterOfInterval.js +13 -16
  56. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.cjs +1 -1
  57. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/ParseError.js +45 -51
  58. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.cjs +1 -1
  59. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/PhoneNumber.js +56 -56
  60. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.cjs +2 -2
  61. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/format.js +14 -14
  62. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs +1 -1
  63. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +8 -16
  64. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs +1 -1
  65. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +4 -6
  66. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs +1 -1
  67. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +5 -9
  68. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs +2 -2
  69. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +4 -4
  70. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  71. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +35 -35
  72. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  73. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +13 -13
  74. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs +2 -2
  75. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +9 -16
  76. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  77. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  78. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  80. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -73
  82. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  83. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
  84. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  86. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  87. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  88. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  90. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  91. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  92. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +29 -29
  94. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +31 -31
  96. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +15 -14
  100. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  104. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  107. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  108. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  109. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  110. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  112. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  116. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
  118. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +15 -15
  120. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  121. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +6 -5
  122. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  124. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  128. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  134. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  136. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +20 -20
  138. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +19 -19
  142. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  150. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  152. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +4 -4
  154. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +11 -11
  156. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  158. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +20 -20
  162. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  164. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  166. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  170. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  172. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  174. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  180. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  182. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  184. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  186. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  188. package/dist/prometheus-framework.cjs.js +1 -1
  189. package/dist/prometheus-framework.es.js +1 -1
  190. package/dist/reports.server.js +0 -8
  191. package/dist/reports.server.mjs +0 -8
  192. package/dist/style.css +1 -1
  193. package/dist/users.server.js +0 -8
  194. package/dist/users.server.mjs +0 -8
  195. package/dist/wallet.server.js +0 -4
  196. package/dist/wallet.server.mjs +0 -4
  197. package/dist/web-CciQvENI.js +1 -0
  198. package/dist/web-nVxTNRH4.mjs +54 -0
  199. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import d from "../metadata.js";
2
2
  import s from "./getNumberType.js";
3
- function m(t, e) {
3
+ function c(t, e) {
4
4
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
5
5
  if (r)
6
6
  return (r = r.call(t)).next.bind(r);
7
- if (Array.isArray(t) || (r = y(t)) || e && t && typeof t.length == "number") {
7
+ if (Array.isArray(t) || (r = m(t)) || e) {
8
8
  r && (t = r);
9
9
  var a = 0;
10
10
  return function() {
@@ -14,7 +14,7 @@ function m(t, e) {
14
14
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
15
15
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
16
16
  }
17
- function y(t, e) {
17
+ function m(t, e) {
18
18
  if (t) {
19
19
  if (typeof t == "string")
20
20
  return o(t, e);
@@ -34,7 +34,7 @@ function o(t, e) {
34
34
  function g(t, e) {
35
35
  var r = e.countries, a = e.defaultCountry, i = e.metadata;
36
36
  i = new d(i);
37
- for (var u = [], l = m(r), f; !(f = l()).done; ) {
37
+ for (var u = [], l = c(r), f; !(f = l()).done; ) {
38
38
  var n = f.value;
39
39
  if (i.country(n), i.leadingDigits()) {
40
40
  if (t && t.search(i.leadingDigits()) === 0)
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../metadata.cjs"),f=require("./matchesEntirely.cjs");function I(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=c(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(r,t){if(r){if(typeof r=="string")return o(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(r,t)}}function o(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var s=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function y(r,t,e){if(t=t||{},!(!r.country&&!r.countryCallingCode)){e=new E.default(e),e.selectNumberingPlan(r.country,r.countryCallingCode);var n=t.v2?r.nationalNumber:r.phone;if(f.default(n,e.nationalNumberPattern())){if(u(n,"FIXED_LINE",e))return e.type("MOBILE")&&e.type("MOBILE").pattern()===""||!e.type("MOBILE")||u(n,"MOBILE",e)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=I(s),i;!(i=a()).done;){var l=i.value;if(u(n,l,e))return l}}}}function u(r,t,e){return t=e.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(r.length)<0?!1:f.default(r,t.pattern())}exports.default=y;exports.isNumberTypeEqualTo=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../metadata.cjs"),f=require("./matchesEntirely.cjs");function I(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=c(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(e,t){if(e){if(typeof e=="string")return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}}function l(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function O(e,t,r){if(t=t||{},!(!e.country&&!e.countryCallingCode)){r=new E.default(r),r.selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(f.default(n,r.nationalNumberPattern())){if(u(n,"FIXED_LINE",r))return r.type("MOBILE")&&r.type("MOBILE").pattern()===""||!r.type("MOBILE")||u(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=I(s),i;!(i=a()).done;){var o=i.value;if(u(n,o,r))return o}}}}function u(e,t,r){return t=r.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0?!1:f.default(e,t.pattern())}exports.default=O;exports.isNumberTypeEqualTo=u;
@@ -1,56 +1,56 @@
1
1
  import a from "../metadata.js";
2
2
  import l from "./matchesEntirely.js";
3
- function I(r, n) {
4
- var e = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
5
- if (e)
6
- return (e = e.call(r)).next.bind(e);
7
- if (Array.isArray(r) || (e = c(r)) || n && r && typeof r.length == "number") {
8
- e && (r = e);
3
+ function I(e, n) {
4
+ var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
5
+ if (r)
6
+ return (r = r.call(e)).next.bind(r);
7
+ if (Array.isArray(e) || (r = c(e)) || n) {
8
+ r && (e = r);
9
9
  var t = 0;
10
10
  return function() {
11
- return t >= r.length ? { done: !0 } : { done: !1, value: r[t++] };
11
+ return t >= e.length ? { done: !0 } : { done: !1, value: e[t++] };
12
12
  };
13
13
  }
14
14
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
15
15
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
16
16
  }
17
- function c(r, n) {
18
- if (r) {
19
- if (typeof r == "string")
20
- return f(r, n);
21
- var e = Object.prototype.toString.call(r).slice(8, -1);
22
- if (e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set")
23
- return Array.from(r);
24
- if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
25
- return f(r, n);
17
+ function c(e, n) {
18
+ if (e) {
19
+ if (typeof e == "string")
20
+ return f(e, n);
21
+ var r = Object.prototype.toString.call(e).slice(8, -1);
22
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
23
+ return Array.from(e);
24
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
25
+ return f(e, n);
26
26
  }
27
27
  }
28
- function f(r, n) {
29
- (n == null || n > r.length) && (n = r.length);
30
- for (var e = 0, t = new Array(n); e < n; e++)
31
- t[e] = r[e];
28
+ function f(e, n) {
29
+ (n == null || n > e.length) && (n = e.length);
30
+ for (var r = 0, t = new Array(n); r < n; r++)
31
+ t[r] = e[r];
32
32
  return t;
33
33
  }
34
34
  var s = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
35
- function L(r, n, e) {
36
- if (n = n || {}, !(!r.country && !r.countryCallingCode)) {
37
- e = new a(e), e.selectNumberingPlan(r.country, r.countryCallingCode);
38
- var t = n.v2 ? r.nationalNumber : r.phone;
39
- if (l(t, e.nationalNumberPattern())) {
40
- if (u(t, "FIXED_LINE", e))
41
- return e.type("MOBILE") && e.type("MOBILE").pattern() === "" || !e.type("MOBILE") || u(t, "MOBILE", e) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
42
- for (var E = I(s), i; !(i = E()).done; ) {
43
- var o = i.value;
44
- if (u(t, o, e))
45
- return o;
35
+ function _(e, n, r) {
36
+ if (n = n || {}, !(!e.country && !e.countryCallingCode)) {
37
+ r = new a(r), r.selectNumberingPlan(e.country, e.countryCallingCode);
38
+ var t = n.v2 ? e.nationalNumber : e.phone;
39
+ if (l(t, r.nationalNumberPattern())) {
40
+ if (i(t, "FIXED_LINE", r))
41
+ return r.type("MOBILE") && r.type("MOBILE").pattern() === "" || !r.type("MOBILE") || i(t, "MOBILE", r) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
42
+ for (var E = I(s), o; !(o = E()).done; ) {
43
+ var u = o.value;
44
+ if (i(t, u, r))
45
+ return u;
46
46
  }
47
47
  }
48
48
  }
49
49
  }
50
- function u(r, n, e) {
51
- return n = e.type(n), !n || !n.pattern() || n.possibleLengths() && n.possibleLengths().indexOf(r.length) < 0 ? !1 : l(r, n.pattern());
50
+ function i(e, n, r) {
51
+ return n = r.type(n), !n || !n.pattern() || n.possibleLengths() && n.possibleLengths().indexOf(e.length) < 0 ? !1 : l(e, n.pattern());
52
52
  }
53
53
  export {
54
- L as default,
55
- u as isNumberTypeEqualTo
54
+ _ as default,
55
+ i as isNumberTypeEqualTo
56
56
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./tools/semver-compare.cjs"),s=require("./helpers/isObject.cjs");function l(n){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(n)}function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function h(n,t){for(var e=0;e<t.length;e++){var a=t[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function o(n,t,e){return t&&h(n.prototype,t),e&&h(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}var d="1.2.0",C="1.7.35",g=" ext. ",p=/^\d+$/,m=function(){function n(t){r(this,n),v(t),this.metadata=t,P.call(this,t)}return o(n,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return e!=="001"})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return this.getCountryMetadata(e)!==void 0}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var a=this.countryCallingCodes()[e];if(a&&a.length===1&&a[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,a){if(e&&p.test(e)&&(a=e,e=null),e&&e!=="001"){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new c(this.getCountryMetadata(e),this)}else if(a){if(!this.hasCallingCode(a))throw new Error("Unknown calling code: ".concat(a));this.numberingPlan=new c(this.getNumberingPlanMetadata(a),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var a=this.countryCallingCodes()[e];if(a)return a.length===1&&a[0].length===3?void 0:a}},{key:"getCountryCodeForCallingCode",value:function(e){var a=this.getCountryCodesForCallingCode(e);if(a)return a[0]}},{key:"getNumberingPlanMetadata",value:function(e){var a=this.getCountryCodeForCallingCode(e);if(a)return this.getCountryMetadata(a);if(this.nonGeographic()){var i=this.nonGeographic()[e];if(i)return i}else{var u=this.countryCallingCodes()[e];if(u&&u.length===1&&u[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),n}(),c=function(){function n(t,e){r(this,n),this.globalMetadataObject=e,this.metadata=t,P.call(this,e.metadata)}return o(n,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,a=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return a.map(function(i){return new b(i,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&y(this.types(),e))return new k(y(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?g:this.metadata[13]||g}}]),n}(),b=function(){function n(t,e){r(this,n),this._format=t,this.metadata=e}return o(n,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!F.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),n}(),F=/^\(?\$1\)?$/,k=function(){function n(t,e){r(this,n),this.type=t,this.metadata=e}return o(n,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),n}();function y(n,t){switch(t){case"FIXED_LINE":return n[0];case"MOBILE":return n[1];case"TOLL_FREE":return n[2];case"PREMIUM_RATE":return n[3];case"PERSONAL_NUMBER":return n[4];case"VOICEMAIL":return n[5];case"UAN":return n[6];case"PAGER":return n[7];case"VOIP":return n[8];case"SHARED_COST":return n[9]}}function v(n){if(!n)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!s.default(n)||!s.default(n.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(s.default(n)?"an object of shape: { "+Object.keys(n).join(", ")+" }":"a "+x(n)+": "+n,"."))}var x=function(t){return l(t)};function _(n,t){if(t=new m(t),t.hasCountry(n))return t.country(n).countryCallingCode();throw new Error("Unknown country: ".concat(n))}function N(n,t){return t.countries.hasOwnProperty(n)}function P(n){var t=n.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?f.default(t,d)===-1?this.v2=!0:f.default(t,C)===-1?this.v3=!0:this.v4=!0:this.v1=!0}exports.default=m;exports.getCountryCallingCode=_;exports.isSupportedCountry=N;exports.validateMetadata=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./tools/semver-compare.cjs"),s=require("./helpers/isObject.cjs");function l(n){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(n)}function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function P(n,t){for(var e=0;e<t.length;e++){var a=t[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function o(n,t,e){return t&&P(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var d="1.2.0",C="1.7.35",h=" ext. ",p=/^\d+$/,y=function(){function n(t){r(this,n),m(t),this.metadata=t,v.call(this,t)}return o(n,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return e!=="001"})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return this.getCountryMetadata(e)!==void 0}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var a=this.countryCallingCodes()[e];if(a&&a.length===1&&a[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,a){if(e&&p.test(e)&&(a=e,e=null),e&&e!=="001"){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new g(this.getCountryMetadata(e),this)}else if(a){if(!this.hasCallingCode(a))throw new Error("Unknown calling code: ".concat(a));this.numberingPlan=new g(this.getNumberingPlanMetadata(a),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var a=this.countryCallingCodes()[e];if(a)return a.length===1&&a[0].length===3?void 0:a}},{key:"getCountryCodeForCallingCode",value:function(e){var a=this.getCountryCodesForCallingCode(e);if(a)return a[0]}},{key:"getNumberingPlanMetadata",value:function(e){var a=this.getCountryCodeForCallingCode(e);if(a)return this.getCountryMetadata(a);if(this.nonGeographic()){var i=this.nonGeographic()[e];if(i)return i}else{var u=this.countryCallingCodes()[e];if(u&&u.length===1&&u[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),n}(),g=function(){function n(t,e){r(this,n),this.globalMetadataObject=e,this.metadata=t,v.call(this,e.metadata)}return o(n,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,a=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return a.map(function(i){return new b(i,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&c(this.types(),e))return new k(c(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?h:this.metadata[13]||h}}]),n}(),b=function(){function n(t,e){r(this,n),this._format=t,this.metadata=e}return o(n,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!F.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),n}(),F=/^\(?\$1\)?$/,k=function(){function n(t,e){r(this,n),this.type=t,this.metadata=e}return o(n,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),n}();function c(n,t){switch(t){case"FIXED_LINE":return n[0];case"MOBILE":return n[1];case"TOLL_FREE":return n[2];case"PREMIUM_RATE":return n[3];case"PERSONAL_NUMBER":return n[4];case"VOICEMAIL":return n[5];case"UAN":return n[6];case"PAGER":return n[7];case"VOIP":return n[8];case"SHARED_COST":return n[9]}}function m(n){if(!n)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!s.default(n)||!s.default(n.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(s.default(n)?"an object of shape: { "+Object.keys(n).join(", ")+" }":"a "+x(n)+": "+n,"."))}var x=function(t){return l(t)};function _(n,t){if(t=new y(t),t.hasCountry(n))return t.country(n).countryCallingCode();throw new Error("Unknown country: ".concat(n))}function N(n,t){return t.countries.hasOwnProperty(n)}function v(n){var t=n.version;typeof t=="number"?(this.v1=t===1,this.v2=t===2,this.v3=t===3,this.v4=t===4):t?f.default(t,d)===-1?this.v2=!0:f.default(t,C)===-1?this.v3=!0:this.v4=!0:this.v1=!0}exports.default=y;exports.getCountryCallingCode=_;exports.isSupportedCountry=N;exports.validateMetadata=m;
@@ -12,18 +12,18 @@ function r(n, t) {
12
12
  if (!(n instanceof t))
13
13
  throw new TypeError("Cannot call a class as a function");
14
14
  }
15
- function h(n, t) {
15
+ function y(n, t) {
16
16
  for (var e = 0; e < t.length; e++) {
17
17
  var a = t[e];
18
18
  a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(n, a.key, a);
19
19
  }
20
20
  }
21
21
  function o(n, t, e) {
22
- return t && h(n.prototype, t), e && h(n, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
22
+ return t && y(n.prototype, t), Object.defineProperty(n, "prototype", { writable: !1 }), n;
23
23
  }
24
- var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ function() {
24
+ var v = "1.2.0", P = "1.7.35", h = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ function() {
25
25
  function n(t) {
26
- r(this, n), k(t), this.metadata = t, y.call(this, t);
26
+ r(this, n), k(t), this.metadata = t, m.call(this, t);
27
27
  }
28
28
  return o(n, [{
29
29
  key: "getCountries",
@@ -79,11 +79,11 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
79
79
  if (e && d.test(e) && (a = e, e = null), e && e !== "001") {
80
80
  if (!this.hasCountry(e))
81
81
  throw new Error("Unknown country: ".concat(e));
82
- this.numberingPlan = new c(this.getCountryMetadata(e), this);
82
+ this.numberingPlan = new g(this.getCountryMetadata(e), this);
83
83
  } else if (a) {
84
84
  if (!this.hasCallingCode(a))
85
85
  throw new Error("Unknown calling code: ".concat(a));
86
- this.numberingPlan = new c(this.getNumberingPlanMetadata(a), this);
86
+ this.numberingPlan = new g(this.getNumberingPlanMetadata(a), this);
87
87
  } else
88
88
  this.numberingPlan = void 0;
89
89
  return this;
@@ -207,9 +207,9 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
207
207
  return this.numberingPlan !== void 0;
208
208
  }
209
209
  }]), n;
210
- }(), c = /* @__PURE__ */ function() {
210
+ }(), g = /* @__PURE__ */ function() {
211
211
  function n(t, e) {
212
- r(this, n), this.globalMetadataObject = e, this.metadata = t, y.call(this, e.metadata);
212
+ r(this, n), this.globalMetadataObject = e, this.metadata = t, m.call(this, e.metadata);
213
213
  }
214
214
  return o(n, [{
215
215
  key: "callingCode",
@@ -334,13 +334,13 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
334
334
  }, {
335
335
  key: "type",
336
336
  value: function(e) {
337
- if (this.hasTypes() && m(this.types(), e))
338
- return new F(m(this.types(), e), this);
337
+ if (this.hasTypes() && c(this.types(), e))
338
+ return new F(c(this.types(), e), this);
339
339
  }
340
340
  }, {
341
341
  key: "ext",
342
342
  value: function() {
343
- return this.v1 || this.v2 ? g : this.metadata[13] || g;
343
+ return this.v1 || this.v2 ? h : this.metadata[13] || h;
344
344
  }
345
345
  }]), n;
346
346
  }(), p = /* @__PURE__ */ function() {
@@ -407,7 +407,7 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
407
407
  }
408
408
  }]), n;
409
409
  }();
410
- function m(n, t) {
410
+ function c(n, t) {
411
411
  switch (t) {
412
412
  case "FIXED_LINE":
413
413
  return n[0];
@@ -448,7 +448,7 @@ function I(n, t) {
448
448
  function D(n, t) {
449
449
  return t.countries.hasOwnProperty(n);
450
450
  }
451
- function y(n) {
451
+ function m(n) {
452
452
  var t = n.version;
453
453
  typeof t == "number" ? (this.v1 = t === 1, this.v2 = t === 2, this.v3 = t === 3, this.v4 = t === 4) : t ? f(t, v) === -1 ? this.v2 = !0 : f(t, P) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
454
454
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./helpers/parseDigits.cjs");function f(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=l(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(r,t){if(r){if(typeof r=="string")return a(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return a(r,t)}}function a(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function s(r){for(var t="",e=f(r.split("")),n;!(n=e()).done;){var i=n.value;t+=u(i,t)||""}return t}function u(r,t,e){if(r==="+"){if(t){typeof e=="function"&&e("end");return}return"+"}return o.parseDigit(r)}exports.default=s;exports.parsePhoneNumberCharacter=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./helpers/parseDigits.cjs");function f(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e)return(e=e.call(r)).next.bind(e);if(Array.isArray(r)||(e=l(r))||t){e&&(r=e);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(r,t){if(r){if(typeof r=="string")return a(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return a(r,t)}}function a(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function s(r){for(var t="",e=f(r.split("")),n;!(n=e()).done;){var i=n.value;t+=u(i,t)||""}return t}function u(r,t,e){return r==="+"?t?void 0:"+":o.parseDigit(r)}exports.default=s;exports.parsePhoneNumberCharacter=u;
@@ -1,9 +1,9 @@
1
- import { parseDigit as u } from "./helpers/parseDigits.js";
2
- function i(r, e) {
1
+ import { parseDigit as o } from "./helpers/parseDigits.js";
2
+ function u(r, e) {
3
3
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
4
4
  if (t)
5
5
  return (t = t.call(r)).next.bind(t);
6
- if (Array.isArray(r) || (t = f(r)) || e && r && typeof r.length == "number") {
6
+ if (Array.isArray(r) || (t = f(r)) || e) {
7
7
  t && (r = t);
8
8
  var n = 0;
9
9
  return function() {
@@ -30,24 +30,17 @@ function a(r, e) {
30
30
  n[t] = r[t];
31
31
  return n;
32
32
  }
33
- function p(r) {
34
- for (var e = "", t = i(r.split("")), n; !(n = t()).done; ) {
35
- var o = n.value;
36
- e += l(o, e) || "";
33
+ function s(r) {
34
+ for (var e = "", t = u(r.split("")), n; !(n = t()).done; ) {
35
+ var i = n.value;
36
+ e += l(i, e) || "";
37
37
  }
38
38
  return e;
39
39
  }
40
40
  function l(r, e, t) {
41
- if (r === "+") {
42
- if (e) {
43
- typeof t == "function" && t("end");
44
- return;
45
- }
46
- return "+";
47
- }
48
- return u(r);
41
+ return r === "+" ? e ? void 0 : "+" : o(r);
49
42
  }
50
43
  export {
51
- p as default,
44
+ s as default,
52
45
  l as parsePhoneNumberCharacter
53
46
  };