@ozdao/prometheus-framework 0.1.82 → 0.1.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
  2. package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
  3. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
  4. package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
  5. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
  6. package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
  7. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
  8. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
  9. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
  10. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
  11. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
  12. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
  13. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
  14. package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
  15. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
  16. package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
  17. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
  19. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
  21. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
  23. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
  25. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
  27. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
  29. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  31. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  33. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
  35. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Field/Field.vue.js +2 -76
  37. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +76 -2
  39. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
  41. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  42. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
  44. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +33 -33
  46. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
  48. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
  50. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
  52. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
  54. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  56. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  58. package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
  60. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
  62. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
  64. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
  66. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +44 -43
  78. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/store/auth.js +55 -65
  82. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
  84. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
  90. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
  91. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
  92. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
  100. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  101. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  102. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  103. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  104. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
  106. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
  108. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
  110. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  112. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +14 -14
  114. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +4 -4
  116. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
  118. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
  120. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  122. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +25 -25
  128. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
  130. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
  132. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  136. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -4
  138. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  140. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  146. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +19 -19
  148. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  150. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  154. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
  156. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  158. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +21 -21
  160. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  166. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  170. package/dist/prometheus-framework.cjs.js +27 -27
  171. package/dist/prometheus-framework.es.js +1949 -1937
  172. package/dist/style.css +1 -1
  173. package/package.json +2 -4
  174. package/src/modules/auth/components/pages/SignIn.vue +1 -0
  175. package/src/modules/auth/store/auth.js +2 -11
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../toDate/index.cjs"),a=require("../_lib/requiredArgs/index.cjs");function n(e){a.default(1,arguments);var t=u.default(e),r=Math.floor(t.getMonth()/3)+1;return r}exports.default=n;
@@ -0,0 +1,10 @@
1
+ import a from "../toDate/index.js";
2
+ import o from "../_lib/requiredArgs/index.js";
3
+ function m(r) {
4
+ o(1, arguments);
5
+ var t = a(r), e = Math.floor(t.getMonth() / 3) + 1;
6
+ return e;
7
+ }
8
+ export {
9
+ m as default
10
+ };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../metadata.cjs"),o=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=s(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 s(r,t){if(r){if(typeof r=="string")return l(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 l(r,t)}}function l(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 c=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function O(r,t,e){if(t=t||{},!!r.country){e=new E.default(e),e.selectNumberingPlan(r.country,r.countryCallingCode);var n=t.v2?r.nationalNumber:r.phone;if(o.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(c),i;!(i=a()).done;){var f=i.value;if(u(n,f,e))return f}}}}function u(r,t,e){return t=e.type(t),!t||!t.pattern()||t.possibleLengths()&&t.possibleLengths().indexOf(r.length)<0?!1:o.default(r,t.pattern())}exports.default=O;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(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,56 +1,56 @@
1
1
  import a from "../metadata.js";
2
- import E from "./matchesEntirely.js";
3
- function I(r, t) {
2
+ import l from "./matchesEntirely.js";
3
+ function I(r, n) {
4
4
  var e = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
5
5
  if (e)
6
6
  return (e = e.call(r)).next.bind(e);
7
- if (Array.isArray(r) || (e = c(r)) || t && r && typeof r.length == "number") {
7
+ if (Array.isArray(r) || (e = c(r)) || n && r && typeof r.length == "number") {
8
8
  e && (r = e);
9
- var n = 0;
9
+ var t = 0;
10
10
  return function() {
11
- return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] };
11
+ return t >= r.length ? { done: !0 } : { done: !1, value: r[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, t) {
17
+ function c(r, n) {
18
18
  if (r) {
19
19
  if (typeof r == "string")
20
- return o(r, t);
20
+ return f(r, n);
21
21
  var e = Object.prototype.toString.call(r).slice(8, -1);
22
22
  if (e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set")
23
23
  return Array.from(r);
24
24
  if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
25
- return o(r, t);
25
+ return f(r, n);
26
26
  }
27
27
  }
28
- function o(r, t) {
29
- (t == null || t > r.length) && (t = r.length);
30
- for (var e = 0, n = new Array(t); e < t; e++)
31
- n[e] = r[e];
32
- return n;
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];
32
+ return t;
33
33
  }
34
34
  var s = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
35
- function _(r, t, e) {
36
- if (t = t || {}, !!r.country) {
35
+ function L(r, n, e) {
36
+ if (n = n || {}, !(!r.country && !r.countryCallingCode)) {
37
37
  e = new a(e), e.selectNumberingPlan(r.country, r.countryCallingCode);
38
- var n = t.v2 ? r.nationalNumber : r.phone;
39
- if (E(n, e.nationalNumberPattern())) {
40
- if (u(n, "FIXED_LINE", e))
41
- return e.type("MOBILE") && e.type("MOBILE").pattern() === "" || !e.type("MOBILE") || u(n, "MOBILE", e) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
42
- for (var l = I(s), i; !(i = l()).done; ) {
43
- var f = i.value;
44
- if (u(n, f, e))
45
- return f;
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;
46
46
  }
47
47
  }
48
48
  }
49
49
  }
50
- function u(r, t, e) {
51
- return t = e.type(t), !t || !t.pattern() || t.possibleLengths() && t.possibleLengths().indexOf(r.length) < 0 ? !1 : E(r, t.pattern());
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());
52
52
  }
53
53
  export {
54
- _ as default,
54
+ L as default,
55
55
  u as isNumberTypeEqualTo
56
56
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={}.constructor;function r(e){return e!=null&&e.constructor===t}exports.default=r;
@@ -0,0 +1,7 @@
1
+ var t = {}.constructor;
2
+ function n(r) {
3
+ return r != null && r.constructor === t;
4
+ }
5
+ export {
6
+ n as default
7
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./tools/semver-compare.cjs");function r(n){"@babel/helpers - typeof";return r=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},r(n)}function o(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 u(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){o(this,n),v(t),this.metadata=t,P.call(this,t)}return u(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 s=this.countryCallingCodes()[e];if(s&&s.length===1&&s[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){o(this,n),this.globalMetadataObject=e,this.metadata=t,P.call(this,e.metadata)}return u(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){o(this,n),this._format=t,this.metadata=e}return u(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){o(this,n),this.type=t,this.metadata=e}return u(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(!l(n)||!l(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(l(n)?"an object of shape: { "+Object.keys(n).join(", ")+" }":"a "+x(n)+": "+n,"."))}var l=function(t){return r(t)==="object"},x=function(t){return r(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 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,13 +1,14 @@
1
1
  import f from "./tools/semver-compare.js";
2
- function r(n) {
2
+ import s from "./helpers/isObject.js";
3
+ function l(n) {
3
4
  "@babel/helpers - typeof";
4
- return r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5
+ return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5
6
  return typeof t;
6
7
  } : function(t) {
7
8
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
8
- }, r(n);
9
+ }, l(n);
9
10
  }
10
- function o(n, t) {
11
+ function r(n, t) {
11
12
  if (!(n instanceof t))
12
13
  throw new TypeError("Cannot call a class as a function");
13
14
  }
@@ -17,14 +18,14 @@ function h(n, t) {
17
18
  a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(n, a.key, a);
18
19
  }
19
20
  }
20
- function u(n, t, e) {
21
+ function o(n, t, e) {
21
22
  return t && h(n.prototype, t), e && h(n, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
22
23
  }
23
24
  var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ function() {
24
25
  function n(t) {
25
- o(this, n), k(t), this.metadata = t, m.call(this, t);
26
+ r(this, n), k(t), this.metadata = t, y.call(this, t);
26
27
  }
27
- return u(n, [{
28
+ return o(n, [{
28
29
  key: "getCountries",
29
30
  value: function() {
30
31
  return Object.keys(this.metadata.countries).filter(function(e) {
@@ -112,8 +113,8 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
112
113
  if (i)
113
114
  return i;
114
115
  } else {
115
- var s = this.countryCallingCodes()[e];
116
- if (s && s.length === 1 && s[0] === "001")
116
+ var u = this.countryCallingCodes()[e];
117
+ if (u && u.length === 1 && u[0] === "001")
117
118
  return this.metadata.countries["001"];
118
119
  }
119
120
  }
@@ -208,9 +209,9 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
208
209
  }]), n;
209
210
  }(), c = /* @__PURE__ */ function() {
210
211
  function n(t, e) {
211
- o(this, n), this.globalMetadataObject = e, this.metadata = t, m.call(this, e.metadata);
212
+ r(this, n), this.globalMetadataObject = e, this.metadata = t, y.call(this, e.metadata);
212
213
  }
213
- return u(n, [{
214
+ return o(n, [{
214
215
  key: "callingCode",
215
216
  value: function() {
216
217
  return this.metadata[0];
@@ -333,8 +334,8 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
333
334
  }, {
334
335
  key: "type",
335
336
  value: function(e) {
336
- if (this.hasTypes() && y(this.types(), e))
337
- return new F(y(this.types(), e), this);
337
+ if (this.hasTypes() && m(this.types(), e))
338
+ return new F(m(this.types(), e), this);
338
339
  }
339
340
  }, {
340
341
  key: "ext",
@@ -344,9 +345,9 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
344
345
  }]), n;
345
346
  }(), p = /* @__PURE__ */ function() {
346
347
  function n(t, e) {
347
- o(this, n), this._format = t, this.metadata = e;
348
+ r(this, n), this._format = t, this.metadata = e;
348
349
  }
349
- return u(n, [{
350
+ return o(n, [{
350
351
  key: "pattern",
351
352
  value: function() {
352
353
  return this._format[0];
@@ -391,9 +392,9 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
391
392
  }]), n;
392
393
  }(), b = /^\(?\$1\)?$/, F = /* @__PURE__ */ function() {
393
394
  function n(t, e) {
394
- o(this, n), this.type = t, this.metadata = e;
395
+ r(this, n), this.type = t, this.metadata = e;
395
396
  }
396
- return u(n, [{
397
+ return o(n, [{
397
398
  key: "pattern",
398
399
  value: function() {
399
400
  return this.metadata.v1 ? this.type : this.type[0];
@@ -406,7 +407,7 @@ var v = "1.2.0", P = "1.7.35", g = " ext. ", d = /^\d+$/, C = /* @__PURE__ */ fu
406
407
  }
407
408
  }]), n;
408
409
  }();
409
- function y(n, t) {
410
+ function m(n, t) {
410
411
  switch (t) {
411
412
  case "FIXED_LINE":
412
413
  return n[0];
@@ -433,29 +434,27 @@ function y(n, t) {
433
434
  function k(n) {
434
435
  if (!n)
435
436
  throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
436
- if (!l(n) || !l(n.countries))
437
- 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(l(n) ? "an object of shape: { " + Object.keys(n).join(", ") + " }" : "a " + x(n) + ": " + n, "."));
437
+ if (!s(n) || !s(n.countries))
438
+ 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(n) ? "an object of shape: { " + Object.keys(n).join(", ") + " }" : "a " + x(n) + ": " + n, "."));
438
439
  }
439
- var l = function(t) {
440
- return r(t) === "object";
441
- }, x = function(t) {
442
- return r(t);
440
+ var x = function(t) {
441
+ return l(t);
443
442
  };
444
- function N(n, t) {
443
+ function I(n, t) {
445
444
  if (t = new C(t), t.hasCountry(n))
446
445
  return t.country(n).countryCallingCode();
447
446
  throw new Error("Unknown country: ".concat(n));
448
447
  }
449
- function I(n, t) {
448
+ function D(n, t) {
450
449
  return t.countries.hasOwnProperty(n);
451
450
  }
452
- function m(n) {
451
+ function y(n) {
453
452
  var t = n.version;
454
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;
455
454
  }
456
455
  export {
457
456
  C as default,
458
- N as getCountryCallingCode,
459
- I as isSupportedCountry,
457
+ I as getCountryCallingCode,
458
+ D as isSupportedCountry,
460
459
  k as validateMetadata
461
460
  };
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(t){"@babel/helpers - typeof";return c=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},c(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(n){b(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t,e){return _(t)||O(t,e)||g(t,e)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(t,e){if(t){if(typeof t=="string")return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}}function s(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function O(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,u,f;try{for(r=r.call(t);!(o=(u=r.next()).done)&&(n.push(u.value),!(e&&n.length===e));o=!0);}catch(a){i=!0,f=a}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw f}}return n}}function _(t){if(Array.isArray(t))return t}function v(t){var e=Array.prototype.slice.call(t),r=m(e,4),n=r[0],o=r[1],i=r[2],u=r[3],f,a,l;if(typeof n=="string")f=n;else throw new TypeError("A text for parsing must be a string.");if(!o||typeof o=="string")u?(a=i,l=u):(a=void 0,l=i),o&&(a=p({defaultCountry:o},a));else if(h(o))i?(a=o,l=i):l=o;else throw new Error("Invalid second argument: ".concat(o));return{text:f,options:a,metadata:l}}var h=function(e){return c(e)==="object"};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./helpers/isObject.cjs");function c(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),e.push.apply(e,n)}return e}function p(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?c(Object(e),!0).forEach(function(n){b(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function b(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function d(r,t){return _(r)||O(r,t)||m(r,t)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(r,t){if(r){if(typeof r=="string")return s(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 s(r,t)}}function s(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 O(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n=[],a=!0,i=!1,u,l;try{for(e=e.call(r);!(a=(u=e.next()).done)&&(n.push(u.value),!(t&&n.length===t));a=!0);}catch(o){i=!0,l=o}finally{try{!a&&e.return!=null&&e.return()}finally{if(i)throw l}}return n}}function _(r){if(Array.isArray(r))return r}function v(r){var t=Array.prototype.slice.call(r),e=d(t,4),n=e[0],a=e[1],i=e[2],u=e[3],l,o,f;if(typeof n=="string")l=n;else throw new TypeError("A text for parsing must be a string.");if(!a||typeof a=="string")u?(o=i,f=u):(o=void 0,f=i),a&&(o=p({defaultCountry:a},o));else if(y.default(a))i?(o=a,f=i):f=a;else throw new Error("Invalid second argument: ".concat(a));return{text:l,options:o,metadata:f}}exports.default=v;
@@ -1,71 +1,64 @@
1
- function c(t) {
2
- "@babel/helpers - typeof";
3
- return c = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
4
- return typeof r;
5
- } : function(r) {
6
- return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
7
- }, c(t);
8
- }
9
- function y(t, r) {
10
- var e = Object.keys(t);
1
+ import p from "./helpers/isObject.js";
2
+ function c(r, e) {
3
+ var t = Object.keys(r);
11
4
  if (Object.getOwnPropertySymbols) {
12
- var n = Object.getOwnPropertySymbols(t);
13
- r && (n = n.filter(function(o) {
14
- return Object.getOwnPropertyDescriptor(t, o).enumerable;
15
- })), e.push.apply(e, n);
5
+ var n = Object.getOwnPropertySymbols(r);
6
+ e && (n = n.filter(function(a) {
7
+ return Object.getOwnPropertyDescriptor(r, a).enumerable;
8
+ })), t.push.apply(t, n);
16
9
  }
17
- return e;
10
+ return t;
18
11
  }
19
- function s(t) {
20
- for (var r = 1; r < arguments.length; r++) {
21
- var e = arguments[r] != null ? arguments[r] : {};
22
- r % 2 ? y(Object(e), !0).forEach(function(n) {
23
- b(t, n, e[n]);
24
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : y(Object(e)).forEach(function(n) {
25
- Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
12
+ function y(r) {
13
+ for (var e = 1; e < arguments.length; e++) {
14
+ var t = arguments[e] != null ? arguments[e] : {};
15
+ e % 2 ? c(Object(t), !0).forEach(function(n) {
16
+ b(r, n, t[n]);
17
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : c(Object(t)).forEach(function(n) {
18
+ Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
26
19
  });
27
20
  }
28
- return t;
21
+ return r;
29
22
  }
30
- function b(t, r, e) {
31
- return r in t ? Object.defineProperty(t, r, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = e, t;
23
+ function b(r, e, t) {
24
+ return e in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
32
25
  }
33
- function m(t, r) {
34
- return _(t) || O(t, r) || g(t, r) || d();
26
+ function d(r, e) {
27
+ return _(r) || O(r, e) || m(r, e) || g();
35
28
  }
36
- function d() {
29
+ function g() {
37
30
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
38
31
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
39
32
  }
40
- function g(t, r) {
41
- if (t) {
42
- if (typeof t == "string")
43
- return p(t, r);
44
- var e = Object.prototype.toString.call(t).slice(8, -1);
45
- if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set")
46
- return Array.from(t);
47
- if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
48
- return p(t, r);
33
+ function m(r, e) {
34
+ if (r) {
35
+ if (typeof r == "string")
36
+ return s(r, e);
37
+ var t = Object.prototype.toString.call(r).slice(8, -1);
38
+ if (t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set")
39
+ return Array.from(r);
40
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
41
+ return s(r, e);
49
42
  }
50
43
  }
51
- function p(t, r) {
52
- (r == null || r > t.length) && (r = t.length);
53
- for (var e = 0, n = new Array(r); e < r; e++)
54
- n[e] = t[e];
44
+ function s(r, e) {
45
+ (e == null || e > r.length) && (e = r.length);
46
+ for (var t = 0, n = new Array(e); t < e; t++)
47
+ n[t] = r[t];
55
48
  return n;
56
49
  }
57
- function O(t, r) {
58
- var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
59
- if (e != null) {
60
- var n = [], o = !0, i = !1, u, f;
50
+ function O(r, e) {
51
+ var t = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
52
+ if (t != null) {
53
+ var n = [], a = !0, i = !1, u, f;
61
54
  try {
62
- for (e = e.call(t); !(o = (u = e.next()).done) && (n.push(u.value), !(r && n.length === r)); o = !0)
55
+ for (t = t.call(r); !(a = (u = t.next()).done) && (n.push(u.value), !(e && n.length === e)); a = !0)
63
56
  ;
64
- } catch (a) {
65
- i = !0, f = a;
57
+ } catch (o) {
58
+ i = !0, f = o;
66
59
  } finally {
67
60
  try {
68
- !o && e.return != null && e.return();
61
+ !a && t.return != null && t.return();
69
62
  } finally {
70
63
  if (i)
71
64
  throw f;
@@ -74,33 +67,30 @@ function O(t, r) {
74
67
  return n;
75
68
  }
76
69
  }
77
- function _(t) {
78
- if (Array.isArray(t))
79
- return t;
70
+ function _(r) {
71
+ if (Array.isArray(r))
72
+ return r;
80
73
  }
81
- function h(t) {
82
- var r = Array.prototype.slice.call(t), e = m(r, 4), n = e[0], o = e[1], i = e[2], u = e[3], f, a, l;
74
+ function h(r) {
75
+ var e = Array.prototype.slice.call(r), t = d(e, 4), n = t[0], a = t[1], i = t[2], u = t[3], f, o, l;
83
76
  if (typeof n == "string")
84
77
  f = n;
85
78
  else
86
79
  throw new TypeError("A text for parsing must be a string.");
87
- if (!o || typeof o == "string")
88
- u ? (a = i, l = u) : (a = void 0, l = i), o && (a = s({
89
- defaultCountry: o
90
- }, a));
91
- else if (v(o))
92
- i ? (a = o, l = i) : l = o;
80
+ if (!a || typeof a == "string")
81
+ u ? (o = i, l = u) : (o = void 0, l = i), a && (o = y({
82
+ defaultCountry: a
83
+ }, o));
84
+ else if (p(a))
85
+ i ? (o = a, l = i) : l = a;
93
86
  else
94
- throw new Error("Invalid second argument: ".concat(o));
87
+ throw new Error("Invalid second argument: ".concat(a));
95
88
  return {
96
89
  text: f,
97
- options: a,
90
+ options: o,
98
91
  metadata: l
99
92
  };
100
93
  }
101
- var v = function(r) {
102
- return c(r) === "object";
103
- };
104
94
  export {
105
95
  h as default
106
96
  };