@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,20 +1,17 @@
1
- import { addQuarters as l } from "./addQuarters.js";
2
- import { startOfQuarter as a } from "./startOfQuarter.js";
1
+ import { addQuarters as f } from "./addQuarters.js";
2
+ import { startOfQuarter as e } from "./startOfQuarter.js";
3
3
  import { toDate as n } from "./toDate.js";
4
- function i(c, s) {
5
- const f = n(c.start), u = n(c.end);
6
- let e = +f > +u;
7
- const m = e ? +a(f) : +a(u);
8
- let r = e ? a(u) : a(f), t = (s == null ? void 0 : s.step) ?? 1;
9
- if (!t)
10
- return [];
11
- t < 0 && (t = -t, e = !e);
12
- const d = [];
13
- for (; +r <= m; )
14
- d.push(n(r)), r = l(r, t);
15
- return e ? d.reverse() : d;
4
+ function D(d, m) {
5
+ const r = n(d.start), a = n(d.end);
6
+ let o = +r > +a;
7
+ const u = o ? +e(r) : +e(a);
8
+ let t = o ? e(a) : e(r), c = 1;
9
+ const s = [];
10
+ for (; +t <= u; )
11
+ s.push(n(t)), t = f(t, c);
12
+ return o ? s.reverse() : s;
16
13
  }
17
14
  export {
18
- i as default,
19
- i as eachQuarterOfInterval
15
+ D as default,
16
+ D as eachQuarterOfInterval
20
17
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function p(t){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(t)}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function O(t,e,n){return e&&b(t.prototype,e),n&&b(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function w(t){var e=h();return function(){var r=i(t),o;if(e){var c=i(this).constructor;o=Reflect.construct(r,arguments,c)}else o=r.apply(this,arguments);return g(this,o)}}function g(t,e){if(e&&(p(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}function _(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){var e=typeof Map=="function"?new Map:void 0;return l=function(r){if(r===null||!P(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,o)}function o(){return f(r,arguments,i(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),u(o,r)},l(t)}function f(t,e,n){return h()?f=Reflect.construct:f=function(o,c,y){var a=[null];a.push.apply(a,c);var v=Function.bind.apply(o,a),s=new v;return y&&u(s,y.prototype),s},f.apply(null,arguments)}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function u(t,e){return u=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},u(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},i(t)}var S=function(t){d(n,t);var e=w(n);function n(r){var o;return m(this,n),o=e.call(this,r),Object.setPrototypeOf(_(o),n.prototype),o.name=o.constructor.name,o}return O(n)}(l(Error));exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function a(e){"@babel/helpers - typeof";return a=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},a(e)}function v(e,t,o){return Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function m(e){var t=b();return function(){var r=i(e),n;if(t){var f=i(this).constructor;n=Reflect.construct(r,arguments,f)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&(a(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function _(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){var t=typeof Map=="function"?new Map:void 0;return l=function(r){if(r===null||!P(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return c(r,arguments,i(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,r)},l(e)}function c(e,t,o){return b()?c=Reflect.construct:c=function(n,f,y){var p=[null];p.push.apply(p,f);var h=Function.bind.apply(n,p),s=new h;return y&&u(s,y.prototype),s},c.apply(null,arguments)}function b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function u(e,t){return u=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},u(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},i(e)}var g=function(e){O(o,e);var t=m(o);function o(r){var n;return d(this,o),n=t.call(this,r),Object.setPrototypeOf(_(n),o.prototype),n.name=n.constructor.name,n}return v(o)}(l(Error));exports.default=g;
@@ -1,43 +1,37 @@
1
- function p(e) {
1
+ function a(e) {
2
2
  "@babel/helpers - typeof";
3
- return p = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
3
+ return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
4
4
  return typeof t;
5
5
  } : function(t) {
6
6
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
7
- }, p(e);
7
+ }, a(e);
8
8
  }
9
- function s(e, t) {
10
- for (var n = 0; n < t.length; n++) {
11
- var r = t[n];
12
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
13
- }
14
- }
15
- function O(e, t, n) {
16
- return t && s(e.prototype, t), n && s(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
9
+ function v(e, t, o) {
10
+ return Object.defineProperty(e, "prototype", { writable: !1 }), e;
17
11
  }
18
- function m(e, t) {
12
+ function d(e, t) {
19
13
  if (!(e instanceof t))
20
14
  throw new TypeError("Cannot call a class as a function");
21
15
  }
22
- function w(e, t) {
16
+ function O(e, t) {
23
17
  if (typeof t != "function" && t !== null)
24
18
  throw new TypeError("Super expression must either be null or a function");
25
19
  e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && u(e, t);
26
20
  }
27
- function d(e) {
28
- var t = h();
21
+ function m(e) {
22
+ var t = b();
29
23
  return function() {
30
- var r = f(e), o;
24
+ var r = c(e), n;
31
25
  if (t) {
32
- var c = f(this).constructor;
33
- o = Reflect.construct(r, arguments, c);
26
+ var f = c(this).constructor;
27
+ n = Reflect.construct(r, arguments, f);
34
28
  } else
35
- o = r.apply(this, arguments);
36
- return g(this, o);
29
+ n = r.apply(this, arguments);
30
+ return w(this, n);
37
31
  };
38
32
  }
39
- function g(e, t) {
40
- if (t && (p(t) === "object" || typeof t == "function"))
33
+ function w(e, t) {
34
+ if (t && (a(t) === "object" || typeof t == "function"))
41
35
  return t;
42
36
  if (t !== void 0)
43
37
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -48,9 +42,9 @@ function _(e) {
48
42
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
49
43
  return e;
50
44
  }
51
- function l(e) {
45
+ function y(e) {
52
46
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
53
- return l = function(r) {
47
+ return y = function(r) {
54
48
  if (r === null || !P(r))
55
49
  return r;
56
50
  if (typeof r != "function")
@@ -58,23 +52,23 @@ function l(e) {
58
52
  if (typeof t < "u") {
59
53
  if (t.has(r))
60
54
  return t.get(r);
61
- t.set(r, o);
55
+ t.set(r, n);
62
56
  }
63
- function o() {
64
- return i(r, arguments, f(this).constructor);
57
+ function n() {
58
+ return i(r, arguments, c(this).constructor);
65
59
  }
66
- return o.prototype = Object.create(r.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), u(o, r);
67
- }, l(e);
60
+ return n.prototype = Object.create(r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), u(n, r);
61
+ }, y(e);
68
62
  }
69
- function i(e, t, n) {
70
- return h() ? i = Reflect.construct : i = function(o, c, y) {
71
- var a = [null];
72
- a.push.apply(a, c);
73
- var v = Function.bind.apply(o, a), b = new v();
74
- return y && u(b, y.prototype), b;
63
+ function i(e, t, o) {
64
+ return b() ? i = Reflect.construct : i = function(n, f, l) {
65
+ var p = [null];
66
+ p.push.apply(p, f);
67
+ var h = Function.bind.apply(n, p), s = new h();
68
+ return l && u(s, l.prototype), s;
75
69
  }, i.apply(null, arguments);
76
70
  }
77
- function h() {
71
+ function b() {
78
72
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
79
73
  return !1;
80
74
  if (typeof Proxy == "function")
@@ -90,24 +84,24 @@ function P(e) {
90
84
  return Function.toString.call(e).indexOf("[native code]") !== -1;
91
85
  }
92
86
  function u(e, t) {
93
- return u = Object.setPrototypeOf || function(r, o) {
94
- return r.__proto__ = o, r;
87
+ return u = Object.setPrototypeOf || function(r, n) {
88
+ return r.__proto__ = n, r;
95
89
  }, u(e, t);
96
90
  }
97
- function f(e) {
98
- return f = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
99
- return n.__proto__ || Object.getPrototypeOf(n);
100
- }, f(e);
91
+ function c(e) {
92
+ return c = Object.setPrototypeOf ? Object.getPrototypeOf : function(o) {
93
+ return o.__proto__ || Object.getPrototypeOf(o);
94
+ }, c(e);
101
95
  }
102
- var S = /* @__PURE__ */ function(e) {
103
- w(n, e);
104
- var t = d(n);
105
- function n(r) {
106
- var o;
107
- return m(this, n), o = t.call(this, r), Object.setPrototypeOf(_(o), n.prototype), o.name = o.constructor.name, o;
96
+ var g = /* @__PURE__ */ function(e) {
97
+ O(o, e);
98
+ var t = m(o);
99
+ function o(r) {
100
+ var n;
101
+ return d(this, o), n = t.call(this, r), Object.setPrototypeOf(_(n), o.prototype), n.name = n.constructor.name, n;
108
102
  }
109
- return O(n);
110
- }(/* @__PURE__ */ l(Error));
103
+ return v(o);
104
+ }(/* @__PURE__ */ y(Error));
111
105
  export {
112
- S as default
106
+ g as default
113
107
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./metadata.cjs"),c=require("./isPossible.cjs"),y=require("./isValid.cjs"),h=require("./helpers/getNumberType.cjs"),g=require("./helpers/getPossibleCountriesForNumber.cjs"),d=require("./format.cjs");function i(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),e.push.apply(e,r)}return e}function u(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?i(Object(e),!0).forEach(function(r){b(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function b(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function o(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function m(n,t,e){return t&&o(n.prototype,t),e&&o(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}var C=function(){function n(t,e,r){if(v(this,n),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!e)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=P(t,r),s=a.country,f=a.countryCallingCode;this.country=s,this.countryCallingCode=f,this.nationalNumber=e,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}return m(n,[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:g.default(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return c.default(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return y.default(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var e=new l.default(this.getMetadata());return e.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return h.default(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,r){return d.default(this,e,r?u(u({},r),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),n}(),p=function(t){return/^[A-Z]{2}$/.test(t)};function P(n,t){var e,r,a=new l.default(t);return p(n)?(e=n,a.selectNumberingPlan(e),r=a.countryCallingCode()):r=n,{country:e,countryCallingCode:r}}exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./metadata.cjs"),f=require("./isPossible.cjs"),c=require("./isValid.cjs"),y=require("./helpers/getNumberType.cjs"),h=require("./helpers/getPossibleCountriesForNumber.cjs"),g=require("./format.cjs");function i(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),e.push.apply(e,r)}return e}function u(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?i(Object(e),!0).forEach(function(r){d(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function d(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function b(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function v(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function m(n,t,e){return t&&v(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var C=function(){function n(t,e,r){if(b(this,n),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!e)throw new TypeError("`nationalNumber` not passed");if(!r)throw new TypeError("`metadata` not passed");var a=P(t,r),l=a.country,s=a.countryCallingCode;this.country=l,this.countryCallingCode=s,this.nationalNumber=e,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}}return m(n,[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:h.default(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return f.default(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return c.default(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var e=new o.default(this.getMetadata());return e.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return y.default(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,r){return g.default(this,e,r?u(u({},r),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}]),n}(),p=function(t){return/^[A-Z]{2}$/.test(t)};function P(n,t){var e,r,a=new o.default(t);return p(n)?(e=n,a.selectNumberingPlan(e),r=a.countryCallingCode()):r=n,{country:e,countryCallingCode:r}}exports.default=C;
@@ -1,93 +1,93 @@
1
- import l from "./metadata.js";
2
- import c from "./isPossible.js";
3
- import y from "./isValid.js";
4
- import h from "./helpers/getNumberType.js";
5
- import m from "./helpers/getPossibleCountriesForNumber.js";
6
- import g from "./format.js";
7
- function a(r, t) {
8
- var e = Object.keys(r);
1
+ import u from "./metadata.js";
2
+ import f from "./isPossible.js";
3
+ import c from "./isValid.js";
4
+ import y from "./helpers/getNumberType.js";
5
+ import h from "./helpers/getPossibleCountriesForNumber.js";
6
+ import m from "./format.js";
7
+ function i(r, e) {
8
+ var t = Object.keys(r);
9
9
  if (Object.getOwnPropertySymbols) {
10
10
  var n = Object.getOwnPropertySymbols(r);
11
- t && (n = n.filter(function(i) {
12
- return Object.getOwnPropertyDescriptor(r, i).enumerable;
13
- })), e.push.apply(e, n);
11
+ e && (n = n.filter(function(a) {
12
+ return Object.getOwnPropertyDescriptor(r, a).enumerable;
13
+ })), t.push.apply(t, n);
14
14
  }
15
- return e;
15
+ return t;
16
16
  }
17
17
  function o(r) {
18
- for (var t = 1; t < arguments.length; t++) {
19
- var e = arguments[t] != null ? arguments[t] : {};
20
- t % 2 ? a(Object(e), !0).forEach(function(n) {
21
- b(r, n, e[n]);
22
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : a(Object(e)).forEach(function(n) {
23
- Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(e, n));
18
+ for (var e = 1; e < arguments.length; e++) {
19
+ var t = arguments[e] != null ? arguments[e] : {};
20
+ e % 2 ? i(Object(t), !0).forEach(function(n) {
21
+ g(r, n, t[n]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : i(Object(t)).forEach(function(n) {
23
+ Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
24
24
  });
25
25
  }
26
26
  return r;
27
27
  }
28
- function b(r, t, e) {
29
- return t in r ? Object.defineProperty(r, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : r[t] = e, r;
28
+ function g(r, e, t) {
29
+ return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
30
30
  }
31
- function p(r, t) {
32
- if (!(r instanceof t))
31
+ function b(r, e) {
32
+ if (!(r instanceof e))
33
33
  throw new TypeError("Cannot call a class as a function");
34
34
  }
35
- function u(r, t) {
36
- for (var e = 0; e < t.length; e++) {
37
- var n = t[e];
35
+ function p(r, e) {
36
+ for (var t = 0; t < e.length; t++) {
37
+ var n = e[t];
38
38
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, n.key, n);
39
39
  }
40
40
  }
41
- function d(r, t, e) {
42
- return t && u(r.prototype, t), e && u(r, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
41
+ function d(r, e, t) {
42
+ return e && p(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
43
43
  }
44
44
  var j = /* @__PURE__ */ function() {
45
- function r(t, e, n) {
46
- if (p(this, r), !t)
45
+ function r(e, t, n) {
46
+ if (b(this, r), !e)
47
47
  throw new TypeError("`country` or `countryCallingCode` not passed");
48
- if (!e)
48
+ if (!t)
49
49
  throw new TypeError("`nationalNumber` not passed");
50
50
  if (!n)
51
51
  throw new TypeError("`metadata` not passed");
52
- var i = C(t, n), s = i.country, f = i.countryCallingCode;
53
- this.country = s, this.countryCallingCode = f, this.nationalNumber = e, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = function() {
52
+ var a = C(e, n), s = a.country, l = a.countryCallingCode;
53
+ this.country = s, this.countryCallingCode = l, this.nationalNumber = t, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = function() {
54
54
  return n;
55
55
  };
56
56
  }
57
57
  return d(r, [{
58
58
  key: "setExt",
59
- value: function(e) {
60
- this.ext = e;
59
+ value: function(t) {
60
+ this.ext = t;
61
61
  }
62
62
  }, {
63
63
  key: "getPossibleCountries",
64
64
  value: function() {
65
- return this.country ? [this.country] : m(this.countryCallingCode, this.nationalNumber, this.getMetadata());
65
+ return this.country ? [this.country] : h(this.countryCallingCode, this.nationalNumber, this.getMetadata());
66
66
  }
67
67
  }, {
68
68
  key: "isPossible",
69
69
  value: function() {
70
- return c(this, {
70
+ return f(this, {
71
71
  v2: !0
72
72
  }, this.getMetadata());
73
73
  }
74
74
  }, {
75
75
  key: "isValid",
76
76
  value: function() {
77
- return y(this, {
77
+ return c(this, {
78
78
  v2: !0
79
79
  }, this.getMetadata());
80
80
  }
81
81
  }, {
82
82
  key: "isNonGeographic",
83
83
  value: function() {
84
- var e = new l(this.getMetadata());
85
- return e.isNonGeographicCallingCode(this.countryCallingCode);
84
+ var t = new u(this.getMetadata());
85
+ return t.isNonGeographicCallingCode(this.countryCallingCode);
86
86
  }
87
87
  }, {
88
88
  key: "isEqual",
89
- value: function(e) {
90
- return this.number === e.number && this.ext === e.ext;
89
+ value: function(t) {
90
+ return this.number === t.number && this.ext === t.ext;
91
91
  }
92
92
  // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,
93
93
  // but later it was found out that it doesn't include the possible `TOO_SHORT` result
@@ -106,14 +106,14 @@ var j = /* @__PURE__ */ function() {
106
106
  }, {
107
107
  key: "getType",
108
108
  value: function() {
109
- return h(this, {
109
+ return y(this, {
110
110
  v2: !0
111
111
  }, this.getMetadata());
112
112
  }
113
113
  }, {
114
114
  key: "format",
115
- value: function(e, n) {
116
- return g(this, e, n ? o(o({}, n), {}, {
115
+ value: function(t, n) {
116
+ return m(this, t, n ? o(o({}, n), {}, {
117
117
  v2: !0
118
118
  }) : {
119
119
  v2: !0
@@ -121,27 +121,27 @@ var j = /* @__PURE__ */ function() {
121
121
  }
122
122
  }, {
123
123
  key: "formatNational",
124
- value: function(e) {
125
- return this.format("NATIONAL", e);
124
+ value: function(t) {
125
+ return this.format("NATIONAL", t);
126
126
  }
127
127
  }, {
128
128
  key: "formatInternational",
129
- value: function(e) {
130
- return this.format("INTERNATIONAL", e);
129
+ value: function(t) {
130
+ return this.format("INTERNATIONAL", t);
131
131
  }
132
132
  }, {
133
133
  key: "getURI",
134
- value: function(e) {
135
- return this.format("RFC3966", e);
134
+ value: function(t) {
135
+ return this.format("RFC3966", t);
136
136
  }
137
137
  }]), r;
138
- }(), v = function(t) {
139
- return /^[A-Z]{2}$/.test(t);
138
+ }(), v = function(e) {
139
+ return /^[A-Z]{2}$/.test(e);
140
140
  };
141
- function C(r, t) {
142
- var e, n, i = new l(t);
143
- return v(r) ? (e = r, i.selectNumberingPlan(e), n = i.countryCallingCode()) : n = r, {
144
- country: e,
141
+ function C(r, e) {
142
+ var t, n, a = new u(e);
143
+ return v(r) ? (t = r, a.selectNumberingPlan(t), n = a.countryCallingCode()) : n = r, {
144
+ country: t,
145
145
  countryCallingCode: n
146
146
  };
147
147
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./helpers/matchesEntirely.cjs"),N=require("./helpers/formatNationalNumberUsingFormat.cjs"),O=require("./metadata.cjs"),m=require("./helpers/getIddPrefix.cjs"),v=require("./helpers/RFC3966.cjs");function h(r,n){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=A(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0;return function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}}}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 A(r,n){if(r){if(typeof r=="string")return l(r,n);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 l(r,n)}}function l(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function s(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,t)}return e}function y(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?s(Object(e),!0).forEach(function(t){I(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function I(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var g={formatExtension:function(n,e,t){return"".concat(n).concat(t.ext()).concat(e)}};function P(r,n,e,t){if(e?e=y(y({},g),e):e=g,t=new O.default(t),r.country&&r.country!=="001"){if(!t.hasCountry(r.country))throw new Error("Unknown country: ".concat(r.country));t.country(r.country)}else if(r.countryCallingCode)t.selectNumberingPlan(r.countryCallingCode);else return r.phone||"";var o=t.countryCallingCode(),a=e.v2?r.nationalNumber:r.phone,c;switch(n){case"NATIONAL":return a?(c=i(a,r.carrierCode,"NATIONAL",t,e),f(c,r.ext,t,e.formatExtension)):"";case"INTERNATIONAL":return a?(c=i(a,null,"INTERNATIONAL",t,e),c="+".concat(o," ").concat(c),f(c,r.ext,t,e.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return v.formatRFC3966({number:"+".concat(o).concat(a),ext:r.ext});case"IDD":if(!e.fromCountry)return;var u=w(a,r.carrierCode,o,e.fromCountry,t);return f(u,r.ext,t,e.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function i(r,n,e,t,o){var a=b(t.formats(),r);return a?N.default(r,a,{useInternationalFormat:e==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:n,metadata:t}):r}function b(r,n){for(var e=h(r),t;!(t=e()).done;){var o=t.value;if(o.leadingDigitsPatterns().length>0){var a=o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length-1];if(n.search(a)!==0)continue}if(d.default(n,o.pattern()))return o}}function f(r,n,e,t){return n?t(r,n,e):r}function w(r,n,e,t,o){var a=O.getCountryCallingCode(t,o.metadata);if(a===e){var c=i(r,n,"NATIONAL",o);return e==="1"?e+" "+c:c}var u=m.default(t,void 0,o.metadata);if(u)return"".concat(u," ").concat(e," ").concat(i(r,null,"INTERNATIONAL",o))}exports.chooseFormatForNumber=b;exports.default=P;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./helpers/matchesEntirely.cjs"),N=require("./helpers/formatNationalNumberUsingFormat.cjs"),O=require("./metadata.cjs"),v=require("./helpers/getIddPrefix.cjs"),m=require("./helpers/RFC3966.cjs");function h(r,n){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=A(r))||n){e&&(r=e);var t=0;return function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}}}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 A(r,n){if(r){if(typeof r=="string")return l(r,n);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 l(r,n)}}function l(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function s(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,t)}return e}function y(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?s(Object(e),!0).forEach(function(t){I(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function I(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var g={formatExtension:function(n,e,t){return"".concat(n).concat(t.ext()).concat(e)}};function P(r,n,e,t){if(e?e=y(y({},g),e):e=g,t=new O.default(t),r.country&&r.country!=="001"){if(!t.hasCountry(r.country))throw new Error("Unknown country: ".concat(r.country));t.country(r.country)}else if(r.countryCallingCode)t.selectNumberingPlan(r.countryCallingCode);else return r.phone||"";var o=t.countryCallingCode(),a=e.v2?r.nationalNumber:r.phone,c;switch(n){case"NATIONAL":return a?(c=i(a,r.carrierCode,"NATIONAL",t,e),f(c,r.ext,t,e.formatExtension)):"";case"INTERNATIONAL":return a?(c=i(a,null,"INTERNATIONAL",t,e),c="+".concat(o," ").concat(c),f(c,r.ext,t,e.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return m.formatRFC3966({number:"+".concat(o).concat(a),ext:r.ext});case"IDD":if(!e.fromCountry)return;var u=w(a,r.carrierCode,o,e.fromCountry,t);return f(u,r.ext,t,e.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function i(r,n,e,t,o){var a=b(t.formats(),r);return a?N.default(r,a,{useInternationalFormat:e==="INTERNATIONAL",withNationalPrefix:!(a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&o&&o.nationalPrefix===!1),carrierCode:n,metadata:t}):r}function b(r,n){for(var e=h(r),t;!(t=e()).done;){var o=t.value;if(o.leadingDigitsPatterns().length>0){var a=o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length-1];if(n.search(a)!==0)continue}if(d.default(n,o.pattern()))return o}}function f(r,n,e,t){return n?t(r,n,e):r}function w(r,n,e,t,o){var a=O.getCountryCallingCode(t,o.metadata);if(a===e){var c=i(r,n,"NATIONAL",o);return e==="1"?e+" "+c:c}var u=v.default(t,void 0,o.metadata);if(u)return"".concat(u," ").concat(e," ").concat(i(r,null,"INTERNATIONAL",o))}exports.chooseFormatForNumber=b;exports.default=P;
@@ -2,12 +2,12 @@ import g from "./helpers/matchesEntirely.js";
2
2
  import O from "./helpers/formatNationalNumberUsingFormat.js";
3
3
  import b, { getCountryCallingCode as N } from "./metadata.js";
4
4
  import v from "./helpers/getIddPrefix.js";
5
- import { formatRFC3966 as h } from "./helpers/RFC3966.js";
6
- function d(r, n) {
5
+ import { formatRFC3966 as d } from "./helpers/RFC3966.js";
6
+ function h(r, n) {
7
7
  var e = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
8
8
  if (e)
9
9
  return (e = e.call(r)).next.bind(e);
10
- if (Array.isArray(r) || (e = A(r)) || n && r && typeof r.length == "number") {
10
+ if (Array.isArray(r) || (e = A(r)) || n) {
11
11
  e && (r = e);
12
12
  var t = 0;
13
13
  return function() {
@@ -75,26 +75,26 @@ function D(r, n, e, t) {
75
75
  var o = t.countryCallingCode(), a = e.v2 ? r.nationalNumber : r.phone, c;
76
76
  switch (n) {
77
77
  case "NATIONAL":
78
- return a ? (c = i(a, r.carrierCode, "NATIONAL", t, e), u(c, r.ext, t, e.formatExtension)) : "";
78
+ return a ? (c = f(a, r.carrierCode, "NATIONAL", t, e), u(c, r.ext, t, e.formatExtension)) : "";
79
79
  case "INTERNATIONAL":
80
- return a ? (c = i(a, null, "INTERNATIONAL", t, e), c = "+".concat(o, " ").concat(c), u(c, r.ext, t, e.formatExtension)) : "+".concat(o);
80
+ return a ? (c = f(a, null, "INTERNATIONAL", t, e), c = "+".concat(o, " ").concat(c), u(c, r.ext, t, e.formatExtension)) : "+".concat(o);
81
81
  case "E.164":
82
82
  return "+".concat(o).concat(a);
83
83
  case "RFC3966":
84
- return h({
84
+ return d({
85
85
  number: "+".concat(o).concat(a),
86
86
  ext: r.ext
87
87
  });
88
88
  case "IDD":
89
89
  if (!e.fromCountry)
90
90
  return;
91
- var f = P(a, r.carrierCode, o, e.fromCountry, t);
92
- return u(f, r.ext, t, e.formatExtension);
91
+ var i = P(a, r.carrierCode, o, e.fromCountry, t);
92
+ return u(i, r.ext, t, e.formatExtension);
93
93
  default:
94
94
  throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n, '"'));
95
95
  }
96
96
  }
97
- function i(r, n, e, t, o) {
97
+ function f(r, n, e, t, o) {
98
98
  var a = w(t.formats(), r);
99
99
  return a ? O(r, a, {
100
100
  useInternationalFormat: e === "INTERNATIONAL",
@@ -104,7 +104,7 @@ function i(r, n, e, t, o) {
104
104
  }) : r;
105
105
  }
106
106
  function w(r, n) {
107
- for (var e = d(r), t; !(t = e()).done; ) {
107
+ for (var e = h(r), t; !(t = e()).done; ) {
108
108
  var o = t.value;
109
109
  if (o.leadingDigitsPatterns().length > 0) {
110
110
  var a = o.leadingDigitsPatterns()[o.leadingDigitsPatterns().length - 1];
@@ -121,12 +121,12 @@ function u(r, n, e, t) {
121
121
  function P(r, n, e, t, o) {
122
122
  var a = N(t, o.metadata);
123
123
  if (a === e) {
124
- var c = i(r, n, "NATIONAL", o);
124
+ var c = f(r, n, "NATIONAL", o);
125
125
  return e === "1" ? e + " " + c : c;
126
126
  }
127
- var f = v(t, void 0, o.metadata);
128
- if (f)
129
- return "".concat(f, " ").concat(e, " ").concat(i(r, null, "INTERNATIONAL", o));
127
+ var i = v(t, void 0, o.metadata);
128
+ if (i)
129
+ return "".concat(i, " ").concat(e, " ").concat(f(r, null, "INTERNATIONAL", o));
130
130
  }
131
131
  export {
132
132
  w as chooseFormatForNumber,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./mergeArrays.cjs");function l(t,r){return s(t,void 0,r)}function s(t,r,n){var i=n.type(r),e=i&&i.possibleLengths()||n.possibleLengths();if(!e)return"IS_POSSIBLE";if(r==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return s(t,"MOBILE",n);var L=n.type("MOBILE");L&&(e=f.default(e,L.possibleLengths()))}else if(r&&!i)return"INVALID_LENGTH";var u=t.length,I=e[0];return I===u?"IS_POSSIBLE":I>u?"TOO_SHORT":e[e.length-1]<u?"TOO_LONG":e.indexOf(u,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}exports.checkNumberLengthForType=s;exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function o(t,r){return h(t,void 0,r)}function h(t,r,u){var i=u.type(r),e=i&&i.possibleLengths()||u.possibleLengths();if(!e)return"IS_POSSIBLE";var n=t.length,l=e[0];return l===n?"IS_POSSIBLE":l>n?"TOO_SHORT":e[e.length-1]<n?"TOO_LONG":e.indexOf(n,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}exports.checkNumberLengthForType=h;exports.default=o;
@@ -1,22 +1,14 @@
1
- import u from "./mergeArrays.js";
2
- function _(i, r) {
3
- return s(i, void 0, r);
1
+ function l(r, t) {
2
+ return f(r, void 0, t);
4
3
  }
5
- function s(i, r, n) {
6
- var I = n.type(r), e = I && I.possibleLengths() || n.possibleLengths();
4
+ function f(r, t, i) {
5
+ var u = i.type(t), e = u && u.possibleLengths() || i.possibleLengths();
7
6
  if (!e)
8
7
  return "IS_POSSIBLE";
9
- if (r === "FIXED_LINE_OR_MOBILE") {
10
- if (!n.type("FIXED_LINE"))
11
- return s(i, "MOBILE", n);
12
- var t = n.type("MOBILE");
13
- t && (e = u(e, t.possibleLengths()));
14
- } else if (r && !I)
15
- return "INVALID_LENGTH";
16
- var L = i.length, f = e[0];
17
- return f === L ? "IS_POSSIBLE" : f > L ? "TOO_SHORT" : e[e.length - 1] < L ? "TOO_LONG" : e.indexOf(L, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
8
+ var n = r.length, h = e[0];
9
+ return h === n ? "IS_POSSIBLE" : h > n ? "TOO_SHORT" : e[e.length - 1] < n ? "TOO_LONG" : e.indexOf(n, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
18
10
  }
19
11
  export {
20
- s as checkNumberLengthForType,
21
- _ as default
12
+ f as checkNumberLengthForType,
13
+ l as default
22
14
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./applyInternationalSeparatorStyle.cjs");var n=/(\$\d)/;function u(i,e,t){var a=t.useInternationalFormat,o=t.withNationalPrefix;t.carrierCode,t.metadata;var r=i.replace(new RegExp(e.pattern()),a?e.internationalFormat():o&&e.nationalPrefixFormattingRule()?e.format().replace(n,e.nationalPrefixFormattingRule()):e.format());return a?l.default(r):r}exports.FIRST_GROUP_PATTERN=n;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./applyInternationalSeparatorStyle.cjs");var n=/(\$\d)/;function u(i,e,t){var a=t.useInternationalFormat,l=t.withNationalPrefix,r=i.replace(new RegExp(e.pattern()),a?e.internationalFormat():l&&e.nationalPrefixFormattingRule()?e.format().replace(n,e.nationalPrefixFormattingRule()):e.format());return a?o.default(r):r}exports.FIRST_GROUP_PATTERN=n;exports.default=u;
@@ -1,9 +1,7 @@
1
1
  import o from "./applyInternationalSeparatorStyle.js";
2
2
  var l = /(\$\d)/;
3
- function u(n, a, t) {
4
- var r = t.useInternationalFormat, i = t.withNationalPrefix;
5
- t.carrierCode, t.metadata;
6
- var e = n.replace(new RegExp(a.pattern()), r ? a.internationalFormat() : (
3
+ function m(e, a, t) {
4
+ var r = t.useInternationalFormat, i = t.withNationalPrefix, n = e.replace(new RegExp(a.pattern()), r ? a.internationalFormat() : (
7
5
  // This library doesn't use `domestic_carrier_code_formatting_rule`,
8
6
  // because that one is only used when formatting phone numbers
9
7
  // for dialing from a mobile phone, and this is not a dialing library.
@@ -19,9 +17,9 @@ function u(n, a, t) {
19
17
  // )
20
18
  i && a.nationalPrefixFormattingRule() ? a.format().replace(l, a.nationalPrefixFormattingRule()) : a.format()
21
19
  ));
22
- return r ? o(e) : e;
20
+ return r ? o(n) : n;
23
21
  }
24
22
  export {
25
23
  l as FIRST_GROUP_PATTERN,
26
- u as default
24
+ m as default
27
25
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./getCountryByNationalNumber.cjs");var i=!1;function l(r,t){var u=t.nationalNumber,n=t.defaultCountry,a=t.metadata;if(i&&a.isNonGeographicCallingCode(r))return"001";var e=a.getCountryCodesForCallingCode(r);if(e)return e.length===1?e[0]:o.default(u,{countries:e,defaultCountry:n,metadata:a.metadata})}exports.default=l;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./getCountryByNationalNumber.cjs");function l(u,e){var n=e.nationalNumber,r=e.defaultCountry,a=e.metadata,t=a.getCountryCodesForCallingCode(u);if(t)return t.length===1?t[0]:o.default(n,{countries:t,defaultCountry:r,metadata:a.metadata})}exports.default=l;
@@ -1,17 +1,13 @@
1
1
  import u from "./getCountryByNationalNumber.js";
2
- var i = !1;
3
- function l(r, a) {
4
- var n = a.nationalNumber, o = a.defaultCountry, e = a.metadata;
5
- if (i && e.isNonGeographicCallingCode(r))
6
- return "001";
7
- var t = e.getCountryCodesForCallingCode(r);
2
+ function i(n, a) {
3
+ var o = a.nationalNumber, r = a.defaultCountry, e = a.metadata, t = e.getCountryCodesForCallingCode(n);
8
4
  if (t)
9
- return t.length === 1 ? t[0] : u(n, {
5
+ return t.length === 1 ? t[0] : u(o, {
10
6
  countries: t,
11
- defaultCountry: o,
7
+ defaultCountry: r,
12
8
  metadata: e.metadata
13
9
  });
14
10
  }
15
11
  export {
16
- l as default
12
+ i as default
17
13
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../metadata.cjs"),s=require("./getNumberType.cjs");function c(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=y(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}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 y(e,r){if(e){if(typeof e=="string")return o(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,r)}}function o(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function g(e,r){var t=r.countries,a=r.defaultCountry,i=r.metadata;i=new d.default(i);for(var u=[],l=c(t),f;!(f=l()).done;){var n=f.value;if(i.country(n),i.leadingDigits()){if(e&&e.search(i.leadingDigits())===0)return n}else if(s.default({phone:e,country:n},void 0,i.metadata))if(a){if(n===a)return n;u.push(n)}else return n}if(u.length>0)return u[0]}exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../metadata.cjs"),s=require("./getNumberType.cjs");function c(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=y(e))||r){t&&(e=t);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}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 y(e,r){if(e){if(typeof e=="string")return f(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,r)}}function f(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function g(e,r){var t=r.countries,a=r.defaultCountry,i=r.metadata;i=new d.default(i);for(var u=[],l=c(t),o;!(o=l()).done;){var n=o.value;if(i.country(n),i.leadingDigits()){if(e&&e.search(i.leadingDigits())===0)return n}else if(s.default({phone:e,country:n},void 0,i.metadata))if(a){if(n===a)return n;u.push(n)}else return n}if(u.length>0)return u[0]}exports.default=g;