@rpcbase/ui 0.206.0 → 0.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/dist/index19.js +1 -1
- package/dist/index19.js.map +1 -1
- package/dist/index200.js +56 -55
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +60 -8
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +7 -15
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +15 -143
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +145 -4
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +4 -11
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +10 -104
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +94 -347
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +349 -87
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +73 -304
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +309 -193
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +211 -19
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +18 -27
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +27 -187
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +186 -16
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +18 -44
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +60 -8
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +42 -23
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +9 -44
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +25 -18
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +45 -3
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +17 -4
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -21
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +4 -24
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +17 -64
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +23 -13
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +68 -4
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +14 -50
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +4 -6
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +50 -26
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -13
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +25 -8
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +17 -3
- package/dist/index232.js.map +1 -0
- package/dist/index233.js +8 -24
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +2 -71
- package/dist/index235.js +29 -3
- package/dist/index235.js.map +1 -0
- package/dist/index236.js +69 -12
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +3 -54
- package/dist/index238.js +11 -114
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +51 -6
- package/dist/index239.js.map +1 -1
- package/dist/index240.js +115 -13
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +6 -687
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +13 -253
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +662 -676
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +252 -7430
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +700 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +7429 -11
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +5 -4
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +11 -458
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +5 -37
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +458 -18
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +34 -24
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +19 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +23 -54
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +4 -7
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +57 -11
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -3
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +12 -16
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +3 -26
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +15 -42
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +25 -13
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +40 -22
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +13 -17
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +24 -34
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +17 -5
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +35 -9
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +5 -8
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +9 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +8 -10
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +9 -7
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +9 -72
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +7 -171
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +63 -104
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +169 -12
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +109 -75
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +12 -44
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +79 -12
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +45 -15
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +12 -98
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +15 -55
- package/dist/index279.js.map +1 -1
- package/dist/index280.js +89 -98
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +27 -42
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +92 -97
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +62 -46
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +108 -38
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +48 -135
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +43 -139
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +105 -217
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +109 -210
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +168 -212
- package/dist/index289.js.map +1 -1
- package/dist/index290.js +240 -5
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +298 -6
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +5 -7
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +4 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -6
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -21
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +6 -10
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +18 -123
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +10 -164
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +116 -58
- package/dist/index299.js.map +1 -1
- package/dist/index300.js +161 -106
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +66 -489
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +106 -59
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +492 -4
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +62 -27
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +4 -66
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +27 -152
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +59 -555
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +143 -201
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +56 -326
- package/dist/index309.js.map +1 -1
- package/dist/index310.js +553 -260
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +214 -0
- package/dist/index311.js.map +1 -0
- package/dist/index312.js +335 -0
- package/dist/index312.js.map +1 -0
- package/dist/index313.js +272 -0
- package/dist/index313.js.map +1 -0
- package/package.json +2 -2
- package/dist/index234.js.map +0 -1
- package/dist/index237.js.map +0 -1
package/dist/index251.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index251.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index251.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/mergeArrays.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport default function mergeArrays(a, b) {\n var merged = a.slice();\n for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done;) {\n var element = _step.value;\n if (a.indexOf(element) < 0) {\n merged.push(element);\n }\n }\n return merged.sort(function (a, b) {\n return a - b;\n });\n\n // ES6 version, requires Set polyfill.\n // let merged = new Set(a)\n // for (const element of b) {\n // \tmerged.add(i)\n // }\n // return Array.from(merged).sort((a, b) => a - b)\n}\n//# sourceMappingURL=mergeArrays.js.map"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAgC,GAAG,GAAG;CAAE,IAAI,IAAmB,OAAO,SAAtB,OAAgC,EAAE,OAAO,aAAa,EAAE;AAAe,KAAI,EAAG,SAAQ,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,EAAE;AAAE,KAAI,MAAM,QAAQ,EAAE,KAAK,IAAI,EAA4B,EAAE,KAAK,KAAK,KAAiB,OAAO,EAAE,UAArB,UAA6B;AAAE,QAAM,IAAI;EAAI,IAAI,IAAI;AAAG,SAAO,WAAY;AAAE,UAAO,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,GAAG;IAAE,MAAM,CAAC;IAAG,OAAO,EAAE;IAAM;;;AAAO,OAAU,UAAU,wIAAwI;;AACviB,SAAS,EAA4B,GAAG,GAAG;AAAE,KAAI,GAAG;AAAE,MAAgB,OAAO,KAAnB,SAAsB,QAAO,EAAkB,GAAG,EAAE;EAAE,IAAI,IAAI,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG;AAAE,SAAoB,MAAb,YAAkB,EAAE,gBAAgB,IAAI,EAAE,YAAY,OAAiB,MAAV,SAAyB,MAAV,QAAc,MAAM,KAAK,EAAE,GAAmB,MAAhB,eAAqB,2CAA2C,KAAK,EAAE,GAAG,EAAkB,GAAG,EAAE,GAAG,KAAK;;;AACpX,SAAS,EAAkB,GAAG,GAAG;AAAE,EAAS,KAAR,QAAa,IAAI,EAAE,YAAY,IAAI,EAAE;AAAS,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,EAAE,EAAE,IAAI,GAAG,IAAK,GAAE,KAAK,EAAE;AAAI,QAAO;;AAOhJ,SAAwB,EAAY,GAAG,GAAG;AAExC,MAAK,IADD,IAAS,EAAE,OAAO,EACb,IAAY,EAAgC,EAAE,EAAE,GAAO,EAAE,IAAQ,GAAW,EAAE,OAAO;EAC5F,IAAI,IAAU,EAAM;AACpB,EAAI,EAAE,QAAQ,EAAQ,GAAG,KACvB,EAAO,KAAK,EAAQ;;AAGxB,QAAO,EAAO,KAAK,SAAU,GAAG,GAAG;AACjC,SAAO,IAAI;GACX"}
|
package/dist/index252.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
import t from "./index251.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
4
|
+
function n(e, t, n) {
|
|
5
|
+
return r(e, t, void 0, n);
|
|
6
|
+
}
|
|
7
|
+
function r(n, i, a, o) {
|
|
8
|
+
i && (o = new e(o.metadata), o.selectNumberingPlan(i));
|
|
9
|
+
var s = o.type(a), c = s && s.possibleLengths() || o.possibleLengths();
|
|
10
|
+
if (!c) return "IS_POSSIBLE";
|
|
11
|
+
if (a === "FIXED_LINE_OR_MOBILE") {
|
|
12
|
+
/* istanbul ignore next */
|
|
13
|
+
if (!o.type("FIXED_LINE")) return r(n, i, "MOBILE", o);
|
|
14
|
+
var l = o.type("MOBILE");
|
|
15
|
+
l && (c = t(c, l.possibleLengths()));
|
|
16
|
+
} else if (a && !s) return "INVALID_LENGTH";
|
|
17
|
+
var u = n.length, d = c[0];
|
|
18
|
+
return d === u ? "IS_POSSIBLE" : d > u ? "TOO_SHORT" : c[c.length - 1] < u ? "TOO_LONG" : c.indexOf(u, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
4
19
|
}
|
|
5
20
|
//#endregion
|
|
6
|
-
export {
|
|
21
|
+
export { n as default };
|
|
7
22
|
|
|
8
23
|
//# sourceMappingURL=index252.js.map
|
package/dist/index252.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index252.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/
|
|
1
|
+
{"version":3,"file":"index252.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport mergeArrays from './mergeArrays.js';\nexport default function checkNumberLength(nationalNumber, country, metadata) {\n return checkNumberLengthForType(nationalNumber, country, undefined, metadata);\n}\n\n// Checks whether a number is possible for a certain `country` based on the number length.\n//\n// This function is not supported by metadata generated with ancient versions of\n// `libphonenumber-js` (before version `1.0.18`) which didn't include \"possible lengths\".\n//\n// There was also a known issue with `checkNumberLength()` function:\n// if a number is possible only in a certain `country` among several `countries`\n// that share the same \"country calling code\", that function would check\n// the possibility of the phone number only in the \"main\" `country` for the \"country calling code\"\n// and would not check if it's actually be possible in the speciifc `country`.\n//\n// For example, \"+1310xxxx\" numbers are valid in Canada.\n// However, they are not possible in the US due to being too short.\n// Since Canada and the US share the same country calling code — \"+1\" —\n// `checkNumberLength()` function used to return not \"IS_POSSIBLE\" for \"+1310xxxx\" numbers.\n//\n// In such cases, when using \"/max\" metadata, `isValid()` could output `true`\n// but at the same time `isPossible()` could output `false`, which was contradictory.\n//\n// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.\n//\n// The solution suggested by Google was implemented: an optional `country` argument\n// was added to `checkNumberLength()` function. If present, that `country` will be used\n// to check phone number length for that specific `country` rather than the \"main\" country\n// for the shared \"country calling code\".\n//\nexport function checkNumberLengthForType(nationalNumber, country, type, metadata) {\n // If the exact `country` is specified, it's no necessarily already selected in `metadata`.\n // Most likely, in cases when there're multiple countries corresponding to the same\n // \"country calling code\", the \"main\" country for that \"country calling code\" will be selected.\n if (country) {\n metadata = new Metadata(metadata.metadata);\n metadata.selectNumberingPlan(country);\n }\n var type_info = metadata.type(type);\n\n // There should always be \"<possiblePengths/>\" set for every type element.\n // This is declared in the XML schema.\n // For size efficiency, where a sub-description (e.g. fixed-line)\n // has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n // so we fall back to the \"general description\". Where no numbers of the type\n // exist at all, there is one possible length (-1) which is guaranteed\n // not to match the length of any real phone number.\n var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();\n // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n // Metadata before version `1.0.18` didn't contain `possible_lengths`.\n if (!possible_lengths) {\n return 'IS_POSSIBLE';\n }\n if (type === 'FIXED_LINE_OR_MOBILE') {\n // No such country in metadata.\n /* istanbul ignore next */\n if (!metadata.type('FIXED_LINE')) {\n // The rare case has been encountered where no fixedLine data is available\n // (true for some non-geographic entities), so we just check mobile.\n return checkNumberLengthForType(nationalNumber, country, 'MOBILE', metadata);\n }\n var mobile_type = metadata.type('MOBILE');\n if (mobile_type) {\n // Merge the mobile data in if there was any. \"Concat\" creates a new\n // array, it doesn't edit possible_lengths in place, so we don't need a copy.\n // Note that when adding the possible lengths from mobile, we have\n // to again check they aren't empty since if they are this indicates\n // they are the same as the general desc and should be obtained from there.\n possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());\n // The current list is sorted; we need to merge in the new list and\n // re-sort (duplicates are okay). Sorting isn't so expensive because\n // the lists are very small.\n\n // if (local_lengths) {\n // \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n // } else {\n // \tlocal_lengths = mobile_type.possibleLengthsLocal()\n // }\n }\n }\n // If the type doesn't exist then return 'INVALID_LENGTH'.\n else if (type && !type_info) {\n return 'INVALID_LENGTH';\n }\n var actual_length = nationalNumber.length;\n\n // In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n // // This is safe because there is never an overlap beween the possible lengths\n // // and the local-only lengths; this is checked at build time.\n // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n // {\n // \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n // }\n\n var minimum_length = possible_lengths[0];\n if (minimum_length === actual_length) {\n return 'IS_POSSIBLE';\n }\n if (minimum_length > actual_length) {\n return 'TOO_SHORT';\n }\n if (possible_lengths[possible_lengths.length - 1] < actual_length) {\n return 'TOO_LONG';\n }\n\n // We skip the first element since we've already checked it.\n return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n//# sourceMappingURL=checkNumberLength.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAwB,EAAkB,GAAgB,GAAS,GAAU;AAC3E,QAAO,EAAyB,GAAgB,GAAS,KAAA,GAAW,EAAS;;AA6B/E,SAAgB,EAAyB,GAAgB,GAAS,GAAM,GAAU;AAIhF,CAAI,MACF,IAAW,IAAI,EAAS,EAAS,SAAS,EAC1C,EAAS,oBAAoB,EAAQ;CAEvC,IAAI,IAAY,EAAS,KAAK,EAAK,EAS/B,IAAmB,KAAa,EAAU,iBAAiB,IAAI,EAAS,iBAAiB;AAI7F,KAAI,CAAC,EACH,QAAO;AAET,KAAI,MAAS,wBAAwB;;AAGnC,MAAI,CAAC,EAAS,KAAK,aAAa,CAG9B,QAAO,EAAyB,GAAgB,GAAS,UAAU,EAAS;EAE9E,IAAI,IAAc,EAAS,KAAK,SAAS;AACzC,EAAI,MAMF,IAAmB,EAAY,GAAkB,EAAY,iBAAiB,CAAC;YAa1E,KAAQ,CAAC,EAChB,QAAO;CAET,IAAI,IAAgB,EAAe,QAU/B,IAAiB,EAAiB;AAYtC,QAXI,MAAmB,IACd,gBAEL,IAAiB,IACZ,cAEL,EAAiB,EAAiB,SAAS,KAAK,IAC3C,aAIF,EAAiB,QAAQ,GAAe,EAAE,IAAI,IAAI,gBAAgB"}
|
package/dist/index253.js
CHANGED
|
@@ -1,62 +1,31 @@
|
|
|
1
|
-
import { Metadata as e } from "./
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
2
|
import t from "./index252.js";
|
|
3
|
-
//#region ../../node_modules/libphonenumber-js/es6/
|
|
4
|
-
function n(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
-
}
|
|
19
|
-
function r(e, t) {
|
|
20
|
-
if (e) {
|
|
21
|
-
if (typeof e == "string") return i(e, t);
|
|
22
|
-
var n = {}.toString.call(e).slice(8, -1);
|
|
23
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? i(e, t) : void 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function i(e, t) {
|
|
27
|
-
(t == null || t > e.length) && (t = e.length);
|
|
28
|
-
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
29
|
-
return r;
|
|
30
|
-
}
|
|
31
|
-
var a = [
|
|
32
|
-
"MOBILE",
|
|
33
|
-
"PREMIUM_RATE",
|
|
34
|
-
"TOLL_FREE",
|
|
35
|
-
"SHARED_COST",
|
|
36
|
-
"VOIP",
|
|
37
|
-
"PERSONAL_NUMBER",
|
|
38
|
-
"PAGER",
|
|
39
|
-
"UAN",
|
|
40
|
-
"VOICEMAIL"
|
|
41
|
-
];
|
|
42
|
-
function o(r, i, o) {
|
|
43
|
-
if (i ||= {}, !(!r.country && !r.countryCallingCode)) {
|
|
44
|
-
o = new e(o), o.selectNumberingPlan(r.country, r.countryCallingCode);
|
|
45
|
-
var c = i.v2 ? r.nationalNumber : r.phone;
|
|
46
|
-
if (t(c, o.nationalNumberPattern())) {
|
|
47
|
-
if (s(c, "FIXED_LINE", o)) return o.type("MOBILE") && o.type("MOBILE").pattern() === "" || !o.type("MOBILE") || s(c, "MOBILE", o) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
48
|
-
for (var l = n(a), u; !(u = l()).done;) {
|
|
49
|
-
var d = u.value;
|
|
50
|
-
if (s(c, d, o)) return d;
|
|
51
|
-
}
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/isPossible.js
|
|
4
|
+
function n(t, n, i) {
|
|
5
|
+
if (n === void 0 && (n = {}), i = new e(i), n.v2) {
|
|
6
|
+
if (!t.countryCallingCode) throw Error("Invalid phone number object passed");
|
|
7
|
+
i.selectNumberingPlan(t.countryCallingCode);
|
|
8
|
+
} else {
|
|
9
|
+
if (!t.phone) return !1;
|
|
10
|
+
if (t.country) {
|
|
11
|
+
if (!i.hasCountry(t.country)) throw Error(`Unknown country: ${t.country}`);
|
|
12
|
+
i.selectNumberingPlan(t.country);
|
|
13
|
+
} else {
|
|
14
|
+
if (!t.countryCallingCode) throw Error("Invalid phone number object passed");
|
|
15
|
+
i.selectNumberingPlan(t.countryCallingCode);
|
|
52
16
|
}
|
|
53
17
|
}
|
|
18
|
+
if (i.possibleLengths()) return r(t.phone || t.nationalNumber, t.country, i);
|
|
19
|
+
if (t.countryCallingCode && i.isNonGeographicCallingCode(t.countryCallingCode)) return !0;
|
|
20
|
+
throw Error("Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.");
|
|
54
21
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
|
|
22
|
+
function r(e, n, r) {
|
|
23
|
+
switch (t(e, n, r)) {
|
|
24
|
+
case "IS_POSSIBLE": return !0;
|
|
25
|
+
default: return !1;
|
|
26
|
+
}
|
|
58
27
|
}
|
|
59
28
|
//#endregion
|
|
60
|
-
export {
|
|
29
|
+
export { n as default, r as isPossibleNumber };
|
|
61
30
|
|
|
62
31
|
//# sourceMappingURL=index253.js.map
|
package/dist/index253.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index253.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index253.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/isPossible.js"],"sourcesContent":["import Metadata from './metadata.js';\nimport checkNumberLength from './helpers/checkNumberLength.js';\n\n/**\r\n * Checks if a phone number is \"possible\" (basically just checks its length).\r\n *\r\n * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\nexport default function isPossiblePhoneNumber(input, options, metadata) {\n /* istanbul ignore if */\n if (options === undefined) {\n options = {};\n }\n metadata = new Metadata(metadata);\n if (options.v2) {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n metadata.selectNumberingPlan(input.countryCallingCode);\n } else {\n if (!input.phone) {\n return false;\n }\n if (input.country) {\n if (!metadata.hasCountry(input.country)) {\n throw new Error(\"Unknown country: \".concat(input.country));\n }\n metadata.selectNumberingPlan(input.country);\n } else {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n metadata.selectNumberingPlan(input.countryCallingCode);\n }\n }\n\n // Old metadata (< 1.0.18) had no \"possible length\" data.\n if (metadata.possibleLengths()) {\n return isPossibleNumber(input.phone || input.nationalNumber, input.country, metadata);\n } else {\n // There was a bug between `1.7.35` and `1.7.37` where \"possible_lengths\"\n // were missing for \"non-geographical\" numbering plans.\n // Just assume the number is possible in such cases:\n // it's unlikely that anyone generated their custom metadata\n // in that short period of time (one day).\n // This code can be removed in some future major version update.\n if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {\n // \"Non-geographic entities\" did't have `possibleLengths`\n // due to a bug in metadata generation process.\n return true;\n } else {\n throw new Error('Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.');\n }\n }\n}\nexport function isPossibleNumber(nationalNumber, country, metadata) {\n //, isInternational) {\n switch (checkNumberLength(nationalNumber, country, metadata)) {\n case 'IS_POSSIBLE':\n return true;\n // This library ignores \"local-only\" phone numbers (for simplicity).\n // See the readme for more info on what are \"local-only\" phone numbers.\n // case 'IS_POSSIBLE_LOCAL_ONLY':\n // \treturn !isInternational\n default:\n return false;\n }\n}\n//# sourceMappingURL=isPossible.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAgBA,SAAwB,EAAsB,GAAO,GAAS,GAAU;AAMtE,KAJI,MAAY,KAAA,MACd,IAAU,EAAE,GAEd,IAAW,IAAI,EAAS,EAAS,EAC7B,EAAQ,IAAI;AACd,MAAI,CAAC,EAAM,mBACT,OAAU,MAAM,qCAAqC;AAEvD,IAAS,oBAAoB,EAAM,mBAAmB;QACjD;AACL,MAAI,CAAC,EAAM,MACT,QAAO;AAET,MAAI,EAAM,SAAS;AACjB,OAAI,CAAC,EAAS,WAAW,EAAM,QAAQ,CACrC,OAAU,MAAM,oBAA2B,EAAM,UAAS;AAE5D,KAAS,oBAAoB,EAAM,QAAQ;SACtC;AACL,OAAI,CAAC,EAAM,mBACT,OAAU,MAAM,qCAAqC;AAEvD,KAAS,oBAAoB,EAAM,mBAAmB;;;AAK1D,KAAI,EAAS,iBAAiB,CAC5B,QAAO,EAAiB,EAAM,SAAS,EAAM,gBAAgB,EAAM,SAAS,EAAS;KAQjF,EAAM,sBAAsB,EAAS,2BAA2B,EAAM,mBAAmB,CAG3F,QAAO;AAEP,OAAU,MAAM,mGAAiG;;AAIvH,SAAgB,EAAiB,GAAgB,GAAS,GAAU;AAElE,SAAQ,EAAkB,GAAgB,GAAS,EAAS,EAA5D;EACE,KAAK,cACH,QAAO;EAKT,QACE,QAAO"}
|
package/dist/index254.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/libphonenumber-js/es6/isValid.js
|
|
5
|
-
function r(r, i, a) {
|
|
6
|
-
return i ||= {}, a = new e(a), a.selectNumberingPlan(r.country, r.countryCallingCode), a.hasTypes() ? n(r, i, a.metadata) !== void 0 : t(i.v2 ? r.nationalNumber : r.phone, a.nationalNumberPattern());
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return e ||= "", RegExp("^(?:" + t + ")$").test(e);
|
|
7
4
|
}
|
|
8
5
|
//#endregion
|
|
9
|
-
export {
|
|
6
|
+
export { e as default };
|
|
10
7
|
|
|
11
8
|
//# sourceMappingURL=index254.js.map
|
package/dist/index254.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index254.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index254.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js"],"sourcesContent":["/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regularExpressionText) {\n // If the assigning of the `''` default value is moved to the arguments above,\n // the code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regularExpressionText + ')$').test(text);\n}\n//# sourceMappingURL=matchesEntirely.js.map"],"x_google_ignoreList":[0],"mappings":";AAKA,SAAwB,EAAgB,GAAM,GAAuB;AAInE,QADA,MAAe,IACJ,OAAO,SAAS,IAAwB,KAAK,CAAC,KAAK,EAAK"}
|
package/dist/index255.js
CHANGED
|
@@ -1,16 +1,62 @@
|
|
|
1
|
-
import { Metadata as e } from "./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
import t from "./index254.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/getNumberType.js
|
|
4
|
+
function n(e, t) {
|
|
5
|
+
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
6
|
+
if (n) return (n = n.call(e)).next.bind(n);
|
|
7
|
+
if (Array.isArray(e) || (n = r(e)) || t && e && typeof e.length == "number") {
|
|
8
|
+
n && (e = n);
|
|
9
|
+
var i = 0;
|
|
10
|
+
return function() {
|
|
11
|
+
return i >= e.length ? { done: !0 } : {
|
|
12
|
+
done: !1,
|
|
13
|
+
value: e[i++]
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8
18
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
function r(e, t) {
|
|
20
|
+
if (e) {
|
|
21
|
+
if (typeof e == "string") return i(e, t);
|
|
22
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
23
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? i(e, t) : void 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function i(e, t) {
|
|
27
|
+
(t == null || t > e.length) && (t = e.length);
|
|
28
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
29
|
+
return r;
|
|
30
|
+
}
|
|
31
|
+
var a = [
|
|
32
|
+
"MOBILE",
|
|
33
|
+
"PREMIUM_RATE",
|
|
34
|
+
"TOLL_FREE",
|
|
35
|
+
"SHARED_COST",
|
|
36
|
+
"VOIP",
|
|
37
|
+
"PERSONAL_NUMBER",
|
|
38
|
+
"PAGER",
|
|
39
|
+
"UAN",
|
|
40
|
+
"VOICEMAIL"
|
|
41
|
+
];
|
|
42
|
+
function o(r, i, o) {
|
|
43
|
+
if (i ||= {}, !(!r.country && !r.countryCallingCode)) {
|
|
44
|
+
o = new e(o), o.selectNumberingPlan(r.country, r.countryCallingCode);
|
|
45
|
+
var c = i.v2 ? r.nationalNumber : r.phone;
|
|
46
|
+
if (t(c, o.nationalNumberPattern())) {
|
|
47
|
+
if (s(c, "FIXED_LINE", o)) return o.type("MOBILE") && o.type("MOBILE").pattern() === "" || !o.type("MOBILE") || s(c, "MOBILE", o) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
|
48
|
+
for (var l = n(a), u; !(u = l()).done;) {
|
|
49
|
+
var d = u.value;
|
|
50
|
+
if (s(c, d, o)) return d;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function s(e, n, r) {
|
|
56
|
+
var i = r.type(n);
|
|
57
|
+
return !i || !i.pattern() || i.possibleLengths() && i.possibleLengths().indexOf(e.length) < 0 ? !1 : t(e, i.pattern());
|
|
12
58
|
}
|
|
13
59
|
//#endregion
|
|
14
|
-
export {
|
|
60
|
+
export { o as default };
|
|
15
61
|
|
|
16
62
|
//# sourceMappingURL=index255.js.map
|
package/dist/index255.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index255.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/
|
|
1
|
+
{"version":3,"file":"index255.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/getNumberType.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nimport Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n\n // When `parse()` returns an empty object — `{}` —\n // that means that the phone number is malformed,\n // so it can't possibly be valid.\n if (!input.country && !input.countryCallingCode) {\n return;\n }\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n\n // The following is copy-pasted from the original function:\n // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n\n // Is this national number even valid for this country\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n return;\n }\n\n // Is it fixed line number\n if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n // Because duplicate regular expressions are removed\n // to reduce metadata size, if \"mobile\" pattern is \"\"\n // then it means it was removed due to being a duplicate of the fixed-line pattern.\n //\n if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n // For example, for \"US\" country.\n // Old metadata (< `1.0.18`) had a specific \"types\" data structure\n // that happened to be `undefined` for `MOBILE` in that case.\n // Newer metadata (>= `1.0.18`) has another data structure that is\n // not `undefined` for `MOBILE` in that case (it's just an empty array).\n // So this `if` is just for backwards compatibility with old metadata.\n if (!metadata.type('MOBILE')) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n // Check if the number happens to qualify as both fixed line and mobile.\n // (no such country in the minimal metadata set)\n /* istanbul ignore if */\n if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n return 'FIXED_LINE';\n }\n for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {\n var type = _step.value;\n if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n return type;\n }\n }\n}\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n var typeDefinition = metadata.type(type);\n if (!typeDefinition || !typeDefinition.pattern()) {\n return false;\n }\n\n // Check if any possible number lengths are present;\n // if so, we use them to avoid checking\n // the validation pattern if they don't match.\n // If they are absent, this means they match\n // the general description, which we have\n // already checked before a specific number type.\n if (typeDefinition.possibleLengths() && typeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0) {\n return false;\n }\n return matchesEntirely(nationalNumber, typeDefinition.pattern());\n}\n//# sourceMappingURL=getNumberType.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAAA,SAAS,EAAgC,GAAG,GAAG;CAAE,IAAI,IAAmB,OAAO,SAAtB,OAAgC,EAAE,OAAO,aAAa,EAAE;AAAe,KAAI,EAAG,SAAQ,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,KAAK,EAAE;AAAE,KAAI,MAAM,QAAQ,EAAE,KAAK,IAAI,EAA4B,EAAE,KAAK,KAAK,KAAiB,OAAO,EAAE,UAArB,UAA6B;AAAE,QAAM,IAAI;EAAI,IAAI,IAAI;AAAG,SAAO,WAAY;AAAE,UAAO,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,GAAG;IAAE,MAAM,CAAC;IAAG,OAAO,EAAE;IAAM;;;AAAO,OAAU,UAAU,wIAAwI;;AACviB,SAAS,EAA4B,GAAG,GAAG;AAAE,KAAI,GAAG;AAAE,MAAgB,OAAO,KAAnB,SAAsB,QAAO,EAAkB,GAAG,EAAE;EAAE,IAAI,IAAI,EAAE,CAAC,SAAS,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG;AAAE,SAAoB,MAAb,YAAkB,EAAE,gBAAgB,IAAI,EAAE,YAAY,OAAiB,MAAV,SAAyB,MAAV,QAAc,MAAM,KAAK,EAAE,GAAmB,MAAhB,eAAqB,2CAA2C,KAAK,EAAE,GAAG,EAAkB,GAAG,EAAE,GAAG,KAAK;;;AACpX,SAAS,EAAkB,GAAG,GAAG;AAAE,EAAS,KAAR,QAAa,IAAI,EAAE,YAAY,IAAI,EAAE;AAAS,MAAK,IAAI,IAAI,GAAG,IAAI,MAAM,EAAE,EAAE,IAAI,GAAG,IAAK,GAAE,KAAK,EAAE;AAAI,QAAO;;AAGhJ,IAAI,IAA6B;CAAC;CAAU;CAAgB;CAAa;CAAe;CAAQ;CAAmB;CAAS;CAAO;CAAY;AAG/I,SAAwB,EAAc,GAAO,GAAS,GAAU;AAG9D,WAAqB,EAAE,EAKnB,GAAC,EAAM,WAAW,CAAC,EAAM,qBAI7B;EADA,IAAW,IAAI,EAAS,EAAS,EACjC,EAAS,oBAAoB,EAAM,SAAS,EAAM,mBAAmB;EACrE,IAAI,IAAiB,EAAQ,KAAK,EAAM,iBAAiB,EAAM;AAM1D,QAAgB,GAAgB,EAAS,uBAAuB,CAAC,EAKtE;OAAI,EAAoB,GAAgB,cAAc,EAAS,CA0B7D,QArBI,EAAS,KAAK,SAAS,IAAI,EAAS,KAAK,SAAS,CAAC,SAAS,KAAK,MAWjE,CAAC,EAAS,KAAK,SAAS,IAOxB,EAAoB,GAAgB,UAAU,EAAS,GAClD,yBAEF;AAET,QAAK,IAAI,IAAY,EAAgC,EAA2B,EAAE,GAAO,EAAE,IAAQ,GAAW,EAAE,OAAO;IACrH,IAAI,IAAO,EAAM;AACjB,QAAI,EAAoB,GAAgB,GAAM,EAAS,CACrD,QAAO;;;;;AAIb,SAAgB,EAAoB,GAAgB,GAAM,GAAU;CAClE,IAAI,IAAiB,EAAS,KAAK,EAAK;AAcxC,QAbI,CAAC,KAAkB,CAAC,EAAe,SAAS,IAU5C,EAAe,iBAAiB,IAAI,EAAe,iBAAiB,CAAC,QAAQ,EAAe,OAAO,GAAG,IACjG,KAEF,EAAgB,GAAgB,EAAe,SAAS,CAAC"}
|
package/dist/index256.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
import t from "./index254.js";
|
|
3
|
+
import n from "./index255.js";
|
|
4
|
+
//#region ../../node_modules/libphonenumber-js/es6/isValid.js
|
|
5
|
+
function r(r, i, a) {
|
|
6
|
+
return i ||= {}, a = new e(a), a.selectNumberingPlan(r.country, r.countryCallingCode), a.hasTypes() ? n(r, i, a.metadata) !== void 0 : t(i.v2 ? r.nationalNumber : r.phone, a.nationalNumberPattern());
|
|
7
|
+
}
|
|
3
8
|
//#endregion
|
|
4
|
-
export {
|
|
9
|
+
export { r as default };
|
|
5
10
|
|
|
6
11
|
//# sourceMappingURL=index256.js.map
|
package/dist/index256.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index256.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index256.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/isValid.js"],"sourcesContent":["import Metadata from './metadata.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport getNumberType from './helpers/getNumberType.js';\n\n/**\r\n * Checks if a given phone number is valid.\r\n *\r\n * isValid(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * If the `number` is a string, it will be parsed to an object,\r\n * but only if it contains only valid phone number characters (including punctuation).\r\n * If the `number` is an object, it is used as is.\r\n *\r\n * The optional `defaultCountry` argument is the default country.\r\n * I.e. it does not restrict to just that country,\r\n * e.g. in those cases where several countries share\r\n * the same phone numbering rules (NANPA, Britain, etc).\r\n * For example, even though the number `07624 369230`\r\n * belongs to the Isle of Man (\"IM\" country code)\r\n * calling `isValidNumber('07624369230', 'GB', metadata)`\r\n * still returns `true` because the country is not restricted to `GB`,\r\n * it's just that `GB` is the default one for the phone numbering rules.\r\n * For restricting the country see `isValidNumberForRegion()`\r\n * though restricting a country might not be a good idea.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n *\r\n * Examples:\r\n *\r\n * ```js\r\n * isValidNumber('+78005553535', metadata)\r\n * isValidNumber('8005553535', 'RU', metadata)\r\n * isValidNumber('88005553535', 'RU', metadata)\r\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\r\n * ```\r\n */\nexport default function isValidNumber(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n\n // By default, countries only have type regexps when it's required for\n // distinguishing different countries having the same `countryCallingCode`.\n if (metadata.hasTypes()) {\n return getNumberType(input, options, metadata.metadata) !== undefined;\n }\n\n // If there are no type regexps for this country in metadata then use\n // `nationalNumberPattern` as a \"better than nothing\" replacement.\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());\n}\n//# sourceMappingURL=isValid.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AAsCA,SAAwB,EAAc,GAAO,GAAS,GAAU;AAgB9D,QAbA,MAAqB,EAAE,EACvB,IAAW,IAAI,EAAS,EAAS,EACjC,EAAS,oBAAoB,EAAM,SAAS,EAAM,mBAAmB,EAIjE,EAAS,UAAU,GACd,EAAc,GAAO,GAAS,EAAS,SAAS,KAAK,KAAA,IAMvD,EADc,EAAQ,KAAK,EAAM,iBAAiB,EAAM,OACxB,EAAS,uBAAuB,CAAC"}
|
package/dist/index257.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { Metadata as e } from "./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var c = t.match(n);
|
|
13
|
-
if (!(c && c[1] != null && c[1].length > 0 && c[1] === "0")) return t;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js
|
|
3
|
+
function t(t, r, i) {
|
|
4
|
+
var a = new e(i).getCountryCodesForCallingCode(t);
|
|
5
|
+
return a ? a.filter(function(e) {
|
|
6
|
+
return n(r, e, i);
|
|
7
|
+
}) : [];
|
|
8
|
+
}
|
|
9
|
+
function n(t, n, r) {
|
|
10
|
+
var i = new e(r);
|
|
11
|
+
return i.selectNumberingPlan(n), i.numberingPlan.possibleLengths().indexOf(t.length) >= 0;
|
|
16
12
|
}
|
|
17
13
|
//#endregion
|
|
18
|
-
export {
|
|
14
|
+
export { t as default };
|
|
19
15
|
|
|
20
16
|
//# sourceMappingURL=index257.js.map
|
package/dist/index257.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index257.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/
|
|
1
|
+
{"version":3,"file":"index257.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n var _metadata = new Metadata(metadata);\n var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);\n if (!possibleCountries) {\n return [];\n }\n return possibleCountries.filter(function (country) {\n return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);\n });\n}\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {\n var _metadata = new Metadata(metadata);\n _metadata.selectNumberingPlan(country);\n if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {\n return true;\n }\n return false;\n}\n//# sourceMappingURL=getPossibleCountriesForNumber.js.map"],"x_google_ignoreList":[0],"mappings":";;AASA,SAAwB,EAA8B,GAAa,GAAgB,GAAU;CAE3F,IAAI,IADY,IAAI,EAAS,EAAS,CACJ,8BAA8B,EAAY;AAI5E,QAHK,IAGE,EAAkB,OAAO,SAAU,GAAS;AACjD,SAAO,EAAmC,GAAgB,GAAS,EAAS;GAC5E,GAJO,EAAE;;AAMb,SAAS,EAAmC,GAAgB,GAAS,GAAU;CAC7E,IAAI,IAAY,IAAI,EAAS,EAAS;AAKtC,QAJA,EAAU,oBAAoB,EAAQ,EAClC,EAAU,cAAc,iBAAiB,CAAC,QAAQ,EAAe,OAAO,IAAI"}
|
package/dist/index258.js
CHANGED
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
//#region ../../node_modules/libphonenumber-js/es6/
|
|
2
|
-
|
|
3
|
-
if (e && t.numberingPlan.nationalPrefixForParsing()) {
|
|
4
|
-
var n = RegExp("^(?:" + t.numberingPlan.nationalPrefixForParsing() + ")"), r = n.exec(e);
|
|
5
|
-
if (r) {
|
|
6
|
-
var i, a, o = r.length - 1, s = o > 0 && r[o];
|
|
7
|
-
if (t.nationalPrefixTransformRule() && s) i = e.replace(n, t.nationalPrefixTransformRule()), o > 1 && (a = r[1]);
|
|
8
|
-
else {
|
|
9
|
-
var c = r[0];
|
|
10
|
-
i = e.slice(c.length), s && (a = r[1]);
|
|
11
|
-
}
|
|
12
|
-
var l;
|
|
13
|
-
if (s) {
|
|
14
|
-
var u = e.indexOf(r[1]);
|
|
15
|
-
e.slice(0, u) === t.numberingPlan.nationalPrefix() && (l = t.numberingPlan.nationalPrefix());
|
|
16
|
-
} else l = r[0];
|
|
17
|
-
return {
|
|
18
|
-
nationalNumber: i,
|
|
19
|
-
nationalPrefix: l,
|
|
20
|
-
carrierCode: a
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return { nationalNumber: e };
|
|
25
|
-
}
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6/constants.js
|
|
2
|
+
var e = "0-90-9٠-٩۰-۹", t = "-‐-―−ー-//.. \xA0 ()()[]\\[\\]~⁓∼~", n = "++";
|
|
26
3
|
//#endregion
|
|
27
|
-
export { e as
|
|
4
|
+
export { n as PLUS_CHARS, e as VALID_DIGITS, t as VALID_PUNCTUATION };
|
|
28
5
|
|
|
29
6
|
//# sourceMappingURL=index258.js.map
|
package/dist/index258.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index258.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/
|
|
1
|
+
{"version":3,"file":"index258.js","names":[],"sources":["../../../node_modules/libphonenumber-js/es6/constants.js"],"sourcesContent":["// The minimum length of the national significant number.\nexport var MIN_LENGTH_FOR_NSN = 2;\n\n// The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\nexport var MAX_LENGTH_FOR_NSN = 17;\n\n// The maximum length of the country calling code.\nexport var MAX_LENGTH_COUNTRY_CODE = 3;\n\n// Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\nexport var VALID_DIGITS = \"0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9\";\n\n// `DASHES` will be right after the opening square bracket of the \"character class\"\nvar DASHES = \"-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D\";\nvar SLASHES = \"\\uFF0F/\";\nvar DOTS = \"\\uFF0E.\";\nexport var WHITESPACE = \" \\xA0\\xAD\\u200B\\u2060\\u3000\";\nvar BRACKETS = \"()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]\";\n// export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\nvar TILDES = \"~\\u2053\\u223C\\uFF5E\";\n\n// Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\nexport var VALID_PUNCTUATION = \"\".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);\nexport var PLUS_CHARS = \"+\\uFF0B\";\n// const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')\n//# sourceMappingURL=constants.js.map"],"x_google_ignoreList":[0],"mappings":";AAYA,IAAW,IAAe,gBAef,IAAoB,wCACpB,IAAa"}
|
package/dist/index259.js
CHANGED
|
@@ -1,47 +1,20 @@
|
|
|
1
|
-
import { Metadata as e } from "./
|
|
2
|
-
import t from "./
|
|
3
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
-
}
|
|
19
|
-
function r(e, t) {
|
|
20
|
-
if (e) {
|
|
21
|
-
if (typeof e == "string") return i(e, t);
|
|
22
|
-
var n = {}.toString.call(e).slice(8, -1);
|
|
23
|
-
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? i(e, t) : void 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function i(e, t) {
|
|
27
|
-
(t == null || t > e.length) && (t = e.length);
|
|
28
|
-
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
29
|
-
return r;
|
|
30
|
-
}
|
|
31
|
-
function a(r, i) {
|
|
32
|
-
var a = i.countries, o = i.metadata;
|
|
33
|
-
o = new e(o);
|
|
34
|
-
for (var s = n(a), c; !(c = s()).done;) {
|
|
35
|
-
var l = c.value;
|
|
36
|
-
if (o.selectNumberingPlan(l), o.leadingDigits()) {
|
|
37
|
-
if (r && r.search(o.leadingDigits()) === 0) return l;
|
|
38
|
-
} else if (t({
|
|
39
|
-
phone: r,
|
|
40
|
-
country: l
|
|
41
|
-
}, void 0, o.metadata)) return l;
|
|
1
|
+
import { Metadata as e } from "./index250.js";
|
|
2
|
+
import { VALID_DIGITS as t } from "./index258.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js
|
|
4
|
+
var n = RegExp("([" + t + "])");
|
|
5
|
+
function r(t, r, i, a) {
|
|
6
|
+
if (r) {
|
|
7
|
+
var o = new e(a);
|
|
8
|
+
o.selectNumberingPlan(r, i);
|
|
9
|
+
var s = new RegExp(o.IDDPrefix());
|
|
10
|
+
if (t.search(s) === 0) {
|
|
11
|
+
t = t.slice(t.match(s)[0].length);
|
|
12
|
+
var c = t.match(n);
|
|
13
|
+
if (!(c && c[1] != null && c[1].length > 0 && c[1] === "0")) return t;
|
|
14
|
+
}
|
|
42
15
|
}
|
|
43
16
|
}
|
|
44
17
|
//#endregion
|
|
45
|
-
export {
|
|
18
|
+
export { r as default };
|
|
46
19
|
|
|
47
20
|
//# sourceMappingURL=index259.js.map
|