@rpcbase/ui 0.180.0 → 0.181.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.
Files changed (315) hide show
  1. package/dist/index103.js +36 -36
  2. package/dist/index115.js +6 -6
  3. package/dist/index122.js +1 -1
  4. package/dist/index124.js +2 -2
  5. package/dist/index126.js +1 -1
  6. package/dist/index147.js +1 -1
  7. package/dist/index148.js +40 -599
  8. package/dist/index148.js.map +1 -1
  9. package/dist/index149.js +205 -5
  10. package/dist/index149.js.map +1 -1
  11. package/dist/index150.js +22 -69
  12. package/dist/index150.js.map +1 -1
  13. package/dist/index151.js +25 -2
  14. package/dist/index151.js.map +1 -1
  15. package/dist/index152.js +378 -342
  16. package/dist/index152.js.map +1 -1
  17. package/dist/index153.js +595 -251
  18. package/dist/index153.js.map +1 -1
  19. package/dist/index154.js +5 -60
  20. package/dist/index154.js.map +1 -1
  21. package/dist/index155.js +62 -40
  22. package/dist/index155.js.map +1 -1
  23. package/dist/index156.js +2 -170
  24. package/dist/index156.js.map +1 -1
  25. package/dist/index157.js +356 -102
  26. package/dist/index157.js.map +1 -1
  27. package/dist/index158.js +261 -24
  28. package/dist/index158.js.map +1 -1
  29. package/dist/index159.js +61 -8
  30. package/dist/index159.js.map +1 -1
  31. package/dist/index160.js +46 -4
  32. package/dist/index160.js.map +1 -1
  33. package/dist/index161.js +169 -5
  34. package/dist/index161.js.map +1 -1
  35. package/dist/index162.js +109 -4
  36. package/dist/index162.js.map +1 -1
  37. package/dist/index163.js +24 -466
  38. package/dist/index163.js.map +1 -1
  39. package/dist/index164.js +8 -186
  40. package/dist/index164.js.map +1 -1
  41. package/dist/index165.js +4 -107
  42. package/dist/index165.js.map +1 -1
  43. package/dist/index166.js +5 -262
  44. package/dist/index166.js.map +1 -1
  45. package/dist/index167.js +4 -9
  46. package/dist/index167.js.map +1 -1
  47. package/dist/index168.js +462 -38
  48. package/dist/index168.js.map +1 -1
  49. package/dist/index169.js +185 -4
  50. package/dist/index169.js.map +1 -1
  51. package/dist/index170.js +103 -42
  52. package/dist/index170.js.map +1 -1
  53. package/dist/index171.js +253 -196
  54. package/dist/index171.js.map +1 -1
  55. package/dist/index172.js +10 -22
  56. package/dist/index172.js.map +1 -1
  57. package/dist/index173.js +42 -24
  58. package/dist/index173.js.map +1 -1
  59. package/dist/index174.js +4 -399
  60. package/dist/index174.js.map +1 -1
  61. package/dist/index175.js +15 -57
  62. package/dist/index175.js.map +1 -1
  63. package/dist/index176.js +5 -8
  64. package/dist/index176.js.map +1 -1
  65. package/dist/index177.js +4 -65
  66. package/dist/index177.js.map +1 -1
  67. package/dist/index178.js +57 -18
  68. package/dist/index178.js.map +1 -1
  69. package/dist/index179.js +64 -14
  70. package/dist/index179.js.map +1 -1
  71. package/dist/index180.js +6 -5
  72. package/dist/index180.js.map +1 -1
  73. package/dist/index181.js +4 -5
  74. package/dist/index181.js.map +1 -1
  75. package/dist/index182.js +7 -6
  76. package/dist/index182.js.map +1 -1
  77. package/dist/index183.js +17 -4
  78. package/dist/index183.js.map +1 -1
  79. package/dist/index184.js +5 -7
  80. package/dist/index184.js.map +1 -1
  81. package/dist/index185.js +5 -17
  82. package/dist/index185.js.map +1 -1
  83. package/dist/index186.js +13 -5
  84. package/dist/index186.js.map +1 -1
  85. package/dist/index187.js +10 -5
  86. package/dist/index187.js.map +1 -1
  87. package/dist/index188.js +14 -13
  88. package/dist/index188.js.map +1 -1
  89. package/dist/index189.js +14 -10
  90. package/dist/index189.js.map +1 -1
  91. package/dist/index190.js +5 -14
  92. package/dist/index190.js.map +1 -1
  93. package/dist/index191.js +6 -14
  94. package/dist/index191.js.map +1 -1
  95. package/dist/index192.js +7 -5
  96. package/dist/index192.js.map +1 -1
  97. package/dist/index193.js +5 -5
  98. package/dist/index193.js.map +1 -1
  99. package/dist/index194.js +9 -7
  100. package/dist/index194.js.map +1 -1
  101. package/dist/index195.js +5 -6
  102. package/dist/index195.js.map +1 -1
  103. package/dist/index196.js +5 -9
  104. package/dist/index196.js.map +1 -1
  105. package/dist/index197.js +9 -5
  106. package/dist/index197.js.map +1 -1
  107. package/dist/index198.js +5 -5
  108. package/dist/index198.js.map +1 -1
  109. package/dist/index199.js +5 -9
  110. package/dist/index199.js.map +1 -1
  111. package/dist/index200.js +4 -5
  112. package/dist/index200.js.map +1 -1
  113. package/dist/index201.js +11 -5
  114. package/dist/index201.js.map +1 -1
  115. package/dist/index202.js +10 -4
  116. package/dist/index202.js.map +1 -1
  117. package/dist/index203.js +8 -9
  118. package/dist/index203.js.map +1 -1
  119. package/dist/index204.js +11 -10
  120. package/dist/index204.js.map +1 -1
  121. package/dist/index205.js +11 -10
  122. package/dist/index205.js.map +1 -1
  123. package/dist/index206.js +10 -11
  124. package/dist/index206.js.map +1 -1
  125. package/dist/index207.js +6 -10
  126. package/dist/index207.js.map +1 -1
  127. package/dist/index208.js +6 -10
  128. package/dist/index208.js.map +1 -1
  129. package/dist/index209.js +5 -7
  130. package/dist/index209.js.map +1 -1
  131. package/dist/index210.js +5 -5
  132. package/dist/index210.js.map +1 -1
  133. package/dist/index211.js +7 -5
  134. package/dist/index211.js.map +1 -1
  135. package/dist/index212.js +6 -6
  136. package/dist/index212.js.map +1 -1
  137. package/dist/index213.js +55 -7
  138. package/dist/index213.js.map +1 -1
  139. package/dist/index214.js +8 -6
  140. package/dist/index214.js.map +1 -1
  141. package/dist/index215.js +18 -54
  142. package/dist/index215.js.map +1 -1
  143. package/dist/index220.js +3 -3
  144. package/dist/index227.js +1 -1
  145. package/dist/index23.js +1 -1
  146. package/dist/index235.js +22 -65
  147. package/dist/index235.js.map +1 -1
  148. package/dist/index236.js +27 -179
  149. package/dist/index236.js.map +1 -1
  150. package/dist/index237.js +5 -47
  151. package/dist/index237.js.map +1 -1
  152. package/dist/index238.js +66 -12
  153. package/dist/index238.js.map +1 -1
  154. package/dist/index239.js +176 -150
  155. package/dist/index239.js.map +1 -1
  156. package/dist/index240.js +43 -27
  157. package/dist/index240.js.map +1 -1
  158. package/dist/index241.js +13 -9
  159. package/dist/index241.js.map +1 -1
  160. package/dist/index242.js +147 -40
  161. package/dist/index242.js.map +1 -1
  162. package/dist/index243.js +29 -10
  163. package/dist/index243.js.map +1 -1
  164. package/dist/index244.js +9 -44
  165. package/dist/index244.js.map +1 -1
  166. package/dist/index245.js +40 -88
  167. package/dist/index245.js.map +1 -1
  168. package/dist/index246.js +10 -85
  169. package/dist/index246.js.map +1 -1
  170. package/dist/index247.js +41 -102
  171. package/dist/index247.js.map +1 -1
  172. package/dist/index248.js +88 -45
  173. package/dist/index248.js.map +1 -1
  174. package/dist/index249.js +85 -10
  175. package/dist/index249.js.map +1 -1
  176. package/dist/index250.js +96 -28
  177. package/dist/index250.js.map +1 -1
  178. package/dist/index251.js +52 -8
  179. package/dist/index251.js.map +1 -1
  180. package/dist/index252.js +10 -115
  181. package/dist/index252.js.map +1 -1
  182. package/dist/index253.js +36 -16
  183. package/dist/index253.js.map +1 -1
  184. package/dist/index254.js +8 -15
  185. package/dist/index254.js.map +1 -1
  186. package/dist/index255.js +116 -3
  187. package/dist/index255.js.map +1 -1
  188. package/dist/index256.js +16 -35
  189. package/dist/index256.js.map +1 -1
  190. package/dist/index257.js +14 -19
  191. package/dist/index257.js.map +1 -1
  192. package/dist/index258.js +3 -9
  193. package/dist/index258.js.map +1 -1
  194. package/dist/index259.js +36 -8
  195. package/dist/index259.js.map +1 -1
  196. package/dist/index260.js +19 -18
  197. package/dist/index260.js.map +1 -1
  198. package/dist/index261.js +9 -28
  199. package/dist/index261.js.map +1 -1
  200. package/dist/index262.js +7 -15
  201. package/dist/index262.js.map +1 -1
  202. package/dist/index263.js +19 -24
  203. package/dist/index263.js.map +1 -1
  204. package/dist/index264.js +29 -29
  205. package/dist/index264.js.map +1 -1
  206. package/dist/index265.js +17 -5
  207. package/dist/index265.js.map +1 -1
  208. package/dist/index269.js +5 -21
  209. package/dist/index269.js.map +1 -1
  210. package/dist/index270.js +3 -5
  211. package/dist/index270.js.map +1 -1
  212. package/dist/index271.js +24 -3
  213. package/dist/index271.js.map +1 -1
  214. package/dist/index272.js +111 -22
  215. package/dist/index272.js.map +1 -1
  216. package/dist/index273.js +14 -111
  217. package/dist/index273.js.map +1 -1
  218. package/dist/index274.js +523 -14
  219. package/dist/index274.js.map +1 -1
  220. package/dist/index275.js +114 -511
  221. package/dist/index275.js.map +1 -1
  222. package/dist/index276.js +117 -111
  223. package/dist/index276.js.map +1 -1
  224. package/dist/index277.js +20 -133
  225. package/dist/index277.js.map +1 -1
  226. package/dist/index285.js +2 -2
  227. package/dist/index288.js +1 -1
  228. package/dist/index289.js +2 -2
  229. package/dist/index29.js +5 -5
  230. package/dist/index291.js +1 -1
  231. package/dist/index292.js +1 -1
  232. package/dist/index293.js +1 -1
  233. package/dist/index294.js +1 -1
  234. package/dist/index295.js +69 -65
  235. package/dist/index295.js.map +1 -1
  236. package/dist/index296.js +8 -68
  237. package/dist/index296.js.map +1 -1
  238. package/dist/index297.js +14 -9
  239. package/dist/index297.js.map +1 -1
  240. package/dist/index298.js +66 -14
  241. package/dist/index298.js.map +1 -1
  242. package/dist/index299.js +64 -65
  243. package/dist/index299.js.map +1 -1
  244. package/dist/index313.js +11 -21
  245. package/dist/index313.js.map +1 -1
  246. package/dist/index314.js +26 -11
  247. package/dist/index314.js.map +1 -1
  248. package/dist/index315.js +4 -27
  249. package/dist/index315.js.map +1 -1
  250. package/dist/index316.js +22 -4
  251. package/dist/index316.js.map +1 -1
  252. package/dist/index33.js +1 -1
  253. package/dist/index37.js +1 -1
  254. package/dist/index38.js +2 -2
  255. package/dist/index41.js +2 -2
  256. package/dist/index42.js +20 -20
  257. package/dist/index46.js +1 -1
  258. package/dist/index47.js +1 -1
  259. package/dist/index48.js +7 -205
  260. package/dist/index48.js.map +1 -1
  261. package/dist/index49.js +33 -6
  262. package/dist/index49.js.map +1 -1
  263. package/dist/index50.js +26 -33
  264. package/dist/index50.js.map +1 -1
  265. package/dist/index51.js +7 -26
  266. package/dist/index51.js.map +1 -1
  267. package/dist/index52.js +11 -7
  268. package/dist/index52.js.map +1 -1
  269. package/dist/index53.js +205 -12
  270. package/dist/index53.js.map +1 -1
  271. package/dist/index54.js +3 -5
  272. package/dist/index54.js.map +1 -1
  273. package/dist/index55.js +47 -7
  274. package/dist/index55.js.map +1 -1
  275. package/dist/index56.js +50 -5
  276. package/dist/index56.js.map +1 -1
  277. package/dist/index57.js +7 -3
  278. package/dist/index57.js.map +1 -1
  279. package/dist/index58.js +14 -47
  280. package/dist/index58.js.map +1 -1
  281. package/dist/index59.js +129 -46
  282. package/dist/index59.js.map +1 -1
  283. package/dist/index60.js +10 -7
  284. package/dist/index60.js.map +1 -1
  285. package/dist/index61.js +215 -13
  286. package/dist/index61.js.map +1 -1
  287. package/dist/index62.js +12 -133
  288. package/dist/index62.js.map +1 -1
  289. package/dist/index63.js +46 -10
  290. package/dist/index63.js.map +1 -1
  291. package/dist/index64.js +46 -213
  292. package/dist/index64.js.map +1 -1
  293. package/dist/index65.js +4 -13
  294. package/dist/index65.js.map +1 -1
  295. package/dist/index66.js +5 -46
  296. package/dist/index66.js.map +1 -1
  297. package/dist/index67.js +28 -50
  298. package/dist/index67.js.map +1 -1
  299. package/dist/index68.js +49 -3
  300. package/dist/index68.js.map +1 -1
  301. package/dist/index69.js +9 -6
  302. package/dist/index69.js.map +1 -1
  303. package/dist/index70.js +54 -28
  304. package/dist/index70.js.map +1 -1
  305. package/dist/index71.js +2 -50
  306. package/dist/index71.js.map +1 -1
  307. package/dist/index72.js +2 -9
  308. package/dist/index72.js.map +1 -1
  309. package/dist/index73.js +6 -2
  310. package/dist/index73.js.map +1 -1
  311. package/dist/index74.js +8 -2
  312. package/dist/index74.js.map +1 -1
  313. package/dist/index75.js +5 -53
  314. package/dist/index75.js.map +1 -1
  315. package/package.json +1 -1
package/dist/index161.js CHANGED
@@ -1,9 +1,173 @@
1
- import t from "./index149.js";
2
- import r from "./index162.js";
3
- function n() {
4
- return t(r, arguments);
1
+ import w from "./index242.js";
2
+ function p(r, e) {
3
+ var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
4
+ if (t) return (t = t.call(r)).next.bind(t);
5
+ if (Array.isArray(r) || (t = S(r)) || e) {
6
+ t && (r = t);
7
+ var n = 0;
8
+ return function() {
9
+ return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] };
10
+ };
11
+ }
12
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
14
+ }
15
+ function S(r, e) {
16
+ if (r) {
17
+ if (typeof r == "string") return v(r, e);
18
+ var t = {}.toString.call(r).slice(8, -1);
19
+ return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? v(r, e) : void 0;
20
+ }
21
+ }
22
+ function v(r, e) {
23
+ (e == null || e > r.length) && (e = r.length);
24
+ for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
25
+ return n;
26
+ }
27
+ function f(r) {
28
+ "@babel/helpers - typeof";
29
+ return f = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
30
+ return typeof e;
31
+ } : function(e) {
32
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
33
+ }, f(r);
34
+ }
35
+ function C(r, e) {
36
+ if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
37
+ }
38
+ function P(r, e) {
39
+ for (var t = 0; t < e.length; t++) {
40
+ var n = e[t];
41
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, O(n.key), n);
42
+ }
43
+ }
44
+ function A(r, e, t) {
45
+ return e && P(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
46
+ }
47
+ function O(r) {
48
+ var e = M(r, "string");
49
+ return f(e) == "symbol" ? e : e + "";
50
+ }
51
+ function M(r, e) {
52
+ if (f(r) != "object" || !r) return r;
53
+ var t = r[Symbol.toPrimitive];
54
+ if (t !== void 0) {
55
+ var n = t.call(r, e);
56
+ if (f(n) != "object") return n;
57
+ throw new TypeError("@@toPrimitive must return a primitive value.");
58
+ }
59
+ return String(r);
60
+ }
61
+ var E = /* @__PURE__ */ (function() {
62
+ function r(e) {
63
+ C(this, r), this.matchTree = new w().parse(e);
64
+ }
65
+ return A(r, [{
66
+ key: "match",
67
+ value: function(t) {
68
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = n.allowOverflow;
69
+ if (!t)
70
+ throw new Error("String is required");
71
+ var o = l(t.split(""), this.matchTree, !0);
72
+ if (o && o.match && delete o.matchedChars, !(o && o.overflow && !i))
73
+ return o;
74
+ }
75
+ }]);
76
+ })();
77
+ function l(r, e, t) {
78
+ if (typeof e == "string") {
79
+ var n = r.join("");
80
+ return e.indexOf(n) === 0 ? r.length === e.length ? {
81
+ match: !0,
82
+ matchedChars: r
83
+ } : {
84
+ partialMatch: !0
85
+ // matchedChars: characters
86
+ } : n.indexOf(e) === 0 ? t && r.length > e.length ? {
87
+ overflow: !0
88
+ } : {
89
+ match: !0,
90
+ matchedChars: r.slice(0, e.length)
91
+ } : void 0;
92
+ }
93
+ if (Array.isArray(e)) {
94
+ for (var i = r.slice(), o = 0; o < e.length; ) {
95
+ var s = e[o], a = l(i, s, t && o === e.length - 1);
96
+ if (a) {
97
+ if (a.overflow)
98
+ return a;
99
+ if (a.match) {
100
+ if (i = i.slice(a.matchedChars.length), i.length === 0)
101
+ return o === e.length - 1 ? {
102
+ match: !0,
103
+ matchedChars: r
104
+ } : {
105
+ partialMatch: !0
106
+ // matchedChars: characters
107
+ };
108
+ } else {
109
+ if (a.partialMatch)
110
+ return {
111
+ partialMatch: !0
112
+ // matchedChars: characters
113
+ };
114
+ throw new Error(`Unsupported match result:
115
+ `.concat(JSON.stringify(a, null, 2)));
116
+ }
117
+ } else return;
118
+ o++;
119
+ }
120
+ return t ? {
121
+ overflow: !0
122
+ } : {
123
+ match: !0,
124
+ matchedChars: r.slice(0, r.length - i.length)
125
+ };
126
+ }
127
+ switch (e.op) {
128
+ case "|":
129
+ for (var c, d = p(e.args), h; !(h = d()).done; ) {
130
+ var g = h.value, u = l(r, g, t);
131
+ if (u) {
132
+ if (u.overflow)
133
+ return u;
134
+ if (u.match)
135
+ return {
136
+ match: !0,
137
+ matchedChars: u.matchedChars
138
+ };
139
+ if (u.partialMatch)
140
+ c = !0;
141
+ else
142
+ throw new Error(`Unsupported match result:
143
+ `.concat(JSON.stringify(u, null, 2)));
144
+ }
145
+ }
146
+ return c ? {
147
+ partialMatch: !0
148
+ // matchedChars: ...
149
+ } : void 0;
150
+ case "[]":
151
+ for (var b = p(e.args), m; !(m = b()).done; ) {
152
+ var y = m.value;
153
+ if (r[0] === y)
154
+ return r.length === 1 ? {
155
+ match: !0,
156
+ matchedChars: r
157
+ } : t ? {
158
+ overflow: !0
159
+ } : {
160
+ match: !0,
161
+ matchedChars: [y]
162
+ };
163
+ }
164
+ return;
165
+ /* istanbul ignore next */
166
+ default:
167
+ throw new Error("Unsupported instruction tree: ".concat(e));
168
+ }
5
169
  }
6
170
  export {
7
- n as getCountries
171
+ E as default
8
172
  };
9
173
  //# sourceMappingURL=index161.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index161.js","sources":["../../../node_modules/libphonenumber-js/min/exports/getCountries.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\r\nimport { getCountries as _getCountries } from '../../core/index.js'\r\n\r\nexport function getCountries() {\r\n\treturn withMetadataArgument(_getCountries, arguments)\r\n}"],"names":["getCountries","withMetadataArgument","_getCountries"],"mappings":";;AAGO,SAASA,IAAe;AAC9B,SAAOC,EAAqBC,GAAe,SAAS;AACrD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index161.js","sources":["../../../node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.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; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport PatternParser from './AsYouTypeFormatter.PatternParser.js';\nvar PatternMatcher = /*#__PURE__*/function () {\n function PatternMatcher(pattern) {\n _classCallCheck(this, PatternMatcher);\n this.matchTree = new PatternParser().parse(pattern);\n }\n return _createClass(PatternMatcher, [{\n key: \"match\",\n value: function match(string) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n allowOverflow = _ref.allowOverflow;\n if (!string) {\n throw new Error('String is required');\n }\n var result = _match(string.split(''), this.matchTree, true);\n if (result && result.match) {\n delete result.matchedChars;\n }\n if (result && result.overflow) {\n if (!allowOverflow) {\n return;\n }\n }\n return result;\n }\n }]);\n}();\n/**\r\n * Matches `characters` against a pattern compiled into a `tree`.\r\n * @param {string[]} characters\r\n * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.\r\n * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.\r\n * @return {object} See the `*.d.ts` file for the description of the result object.\r\n */\nexport { PatternMatcher as default };\nfunction _match(characters, tree, last) {\n // If `tree` is a string, then `tree` is a single character.\n // That's because when a pattern is parsed, multi-character-string parts\n // of a pattern are compiled into arrays of single characters.\n // I still wrote this piece of code for a \"general\" hypothetical case\n // when `tree` could be a string of several characters, even though\n // such case is not possible with the current implementation.\n if (typeof tree === 'string') {\n var characterString = characters.join('');\n if (tree.indexOf(characterString) === 0) {\n // `tree` is always a single character.\n // If `tree.indexOf(characterString) === 0`\n // then `characters.length === tree.length`.\n /* istanbul ignore else */\n if (characters.length === tree.length) {\n return {\n match: true,\n matchedChars: characters\n };\n }\n // `tree` is always a single character.\n // If `tree.indexOf(characterString) === 0`\n // then `characters.length === tree.length`.\n /* istanbul ignore next */\n return {\n partialMatch: true\n // matchedChars: characters\n };\n }\n if (characterString.indexOf(tree) === 0) {\n if (last) {\n // The `else` path is not possible because `tree` is always a single character.\n // The `else` case for `characters.length > tree.length` would be\n // `characters.length <= tree.length` which means `characters.length <= 1`.\n // `characters` array can't be empty, so that means `characters === [tree]`,\n // which would also mean `tree.indexOf(characterString) === 0` and that'd mean\n // that the `if (tree.indexOf(characterString) === 0)` condition before this\n // `if` condition would be entered, and returned from there, not reaching this code.\n /* istanbul ignore else */\n if (characters.length > tree.length) {\n return {\n overflow: true\n };\n }\n }\n return {\n match: true,\n matchedChars: characters.slice(0, tree.length)\n };\n }\n return;\n }\n if (Array.isArray(tree)) {\n var restCharacters = characters.slice();\n var i = 0;\n while (i < tree.length) {\n var subtree = tree[i];\n var result = _match(restCharacters, subtree, last && i === tree.length - 1);\n if (!result) {\n return;\n } else if (result.overflow) {\n return result;\n } else if (result.match) {\n // Continue with the next subtree with the rest of the characters.\n restCharacters = restCharacters.slice(result.matchedChars.length);\n if (restCharacters.length === 0) {\n if (i === tree.length - 1) {\n return {\n match: true,\n matchedChars: characters\n };\n } else {\n return {\n partialMatch: true\n // matchedChars: characters\n };\n }\n }\n } else {\n /* istanbul ignore else */\n if (result.partialMatch) {\n return {\n partialMatch: true\n // matchedChars: characters\n };\n } else {\n throw new Error(\"Unsupported match result:\\n\".concat(JSON.stringify(result, null, 2)));\n }\n }\n i++;\n }\n // If `last` then overflow has already been checked\n // by the last element of the `tree` array.\n /* istanbul ignore if */\n if (last) {\n return {\n overflow: true\n };\n }\n return {\n match: true,\n matchedChars: characters.slice(0, characters.length - restCharacters.length)\n };\n }\n switch (tree.op) {\n case '|':\n var partialMatch;\n for (var _iterator = _createForOfIteratorHelperLoose(tree.args), _step; !(_step = _iterator()).done;) {\n var branch = _step.value;\n var _result = _match(characters, branch, last);\n if (_result) {\n if (_result.overflow) {\n return _result;\n } else if (_result.match) {\n return {\n match: true,\n matchedChars: _result.matchedChars\n };\n } else {\n /* istanbul ignore else */\n if (_result.partialMatch) {\n partialMatch = true;\n } else {\n throw new Error(\"Unsupported match result:\\n\".concat(JSON.stringify(_result, null, 2)));\n }\n }\n }\n }\n if (partialMatch) {\n return {\n partialMatch: true\n // matchedChars: ...\n };\n }\n // Not even a partial match.\n return;\n case '[]':\n for (var _iterator2 = _createForOfIteratorHelperLoose(tree.args), _step2; !(_step2 = _iterator2()).done;) {\n var _char = _step2.value;\n if (characters[0] === _char) {\n if (characters.length === 1) {\n return {\n match: true,\n matchedChars: characters\n };\n }\n if (last) {\n return {\n overflow: true\n };\n }\n return {\n match: true,\n matchedChars: [_char]\n };\n }\n }\n // No character matches.\n return;\n\n /* istanbul ignore next */\n default:\n throw new Error(\"Unsupported instruction tree: \".concat(tree));\n }\n}\n//# sourceMappingURL=AsYouTypeFormatter.PatternMatcher.js.map"],"names":["_createForOfIteratorHelperLoose","_unsupportedIterableToArray","o","a","_arrayLikeToArray","e","_typeof","_classCallCheck","n","_defineProperties","r","_toPropertyKey","_createClass","t","i","_toPrimitive","PatternMatcher","pattern","PatternParser","string","_ref","allowOverflow","result","_match","characters","tree","last","characterString","restCharacters","subtree","partialMatch","_iterator","_step","branch","_result","_iterator2","_step2","_char"],"mappings":";AAAA,SAASA,EAAgC,GAAG,GAAG;AAAE,MAAI,IAAmB,OAAO,SAAtB,OAAgC,EAAE,OAAO,QAAQ,KAAK,EAAE,YAAY;AAAG,MAAI,EAAG,SAAQ,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC;AAAG,MAAI,MAAM,QAAQ,CAAC,MAAM,IAAIC,EAA4B,CAAC,MAAM,GAAuC;AAAE,UAAM,IAAI;AAAI,QAAIC,IAAI;AAAG,WAAO,WAAY;AAAE,aAAOA,KAAK,EAAE,SAAS,EAAE,MAAM,GAAE,IAAK,EAAE,MAAM,IAAI,OAAO,EAAEA,GAAG,EAAC;AAAA,IAAI;AAAA,EAAG;AAAE,QAAM,IAAI,UAAU;AAAA,mFAAuI;AA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
1
- import e from "./index163.js";
2
- function n(t) {
3
- return new e(t).getCountries();
1
+ function i(r, t) {
2
+ var e = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
3
+ if (e) return (e = e.call(r)).next.bind(e);
4
+ if (Array.isArray(r) || (e = F(r)) || t) {
5
+ e && (r = e);
6
+ var u = 0;
7
+ return function() {
8
+ return u >= r.length ? { done: !0 } : { done: !1, value: r[u++] };
9
+ };
10
+ }
11
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
13
+ }
14
+ function F(r, t) {
15
+ if (r) {
16
+ if (typeof r == "string") return o(r, t);
17
+ var e = {}.toString.call(r).slice(8, -1);
18
+ return e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set" ? Array.from(r) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? o(r, t) : void 0;
19
+ }
20
+ }
21
+ function o(r, t) {
22
+ (t == null || t > r.length) && (t = r.length);
23
+ for (var e = 0, u = Array(t); e < t; e++) u[e] = r[e];
24
+ return u;
25
+ }
26
+ var l = {
27
+ 0: "0",
28
+ 1: "1",
29
+ 2: "2",
30
+ 3: "3",
31
+ 4: "4",
32
+ 5: "5",
33
+ 6: "6",
34
+ 7: "7",
35
+ 8: "8",
36
+ 9: "9",
37
+ "0": "0",
38
+ // Fullwidth digit 0
39
+ "1": "1",
40
+ // Fullwidth digit 1
41
+ "2": "2",
42
+ // Fullwidth digit 2
43
+ "3": "3",
44
+ // Fullwidth digit 3
45
+ "4": "4",
46
+ // Fullwidth digit 4
47
+ "5": "5",
48
+ // Fullwidth digit 5
49
+ "6": "6",
50
+ // Fullwidth digit 6
51
+ "7": "7",
52
+ // Fullwidth digit 7
53
+ "8": "8",
54
+ // Fullwidth digit 8
55
+ "9": "9",
56
+ // Fullwidth digit 9
57
+ "٠": "0",
58
+ // Arabic-indic digit 0
59
+ "١": "1",
60
+ // Arabic-indic digit 1
61
+ "٢": "2",
62
+ // Arabic-indic digit 2
63
+ "٣": "3",
64
+ // Arabic-indic digit 3
65
+ "٤": "4",
66
+ // Arabic-indic digit 4
67
+ "٥": "5",
68
+ // Arabic-indic digit 5
69
+ "٦": "6",
70
+ // Arabic-indic digit 6
71
+ "٧": "7",
72
+ // Arabic-indic digit 7
73
+ "٨": "8",
74
+ // Arabic-indic digit 8
75
+ "٩": "9",
76
+ // Arabic-indic digit 9
77
+ "۰": "0",
78
+ // Eastern-Arabic digit 0
79
+ "۱": "1",
80
+ // Eastern-Arabic digit 1
81
+ "۲": "2",
82
+ // Eastern-Arabic digit 2
83
+ "۳": "3",
84
+ // Eastern-Arabic digit 3
85
+ "۴": "4",
86
+ // Eastern-Arabic digit 4
87
+ "۵": "5",
88
+ // Eastern-Arabic digit 5
89
+ "۶": "6",
90
+ // Eastern-Arabic digit 6
91
+ "۷": "7",
92
+ // Eastern-Arabic digit 7
93
+ "۸": "8",
94
+ // Eastern-Arabic digit 8
95
+ "۹": "9"
96
+ // Eastern-Arabic digit 9
97
+ };
98
+ function f(r) {
99
+ return l[r];
100
+ }
101
+ function s(r) {
102
+ for (var t = "", e = i(r.split("")), u; !(u = e()).done; ) {
103
+ var a = u.value, n = f(a);
104
+ n && (t += n);
105
+ }
106
+ return t;
4
107
  }
5
108
  export {
6
- n as default
109
+ l as DIGITS,
110
+ s as default,
111
+ f as parseDigit
7
112
  };
8
113
  //# sourceMappingURL=index162.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index162.js","sources":["../../../node_modules/libphonenumber-js/es6/getCountries.js"],"sourcesContent":["import Metadata from './metadata.js';\nexport default function getCountries(metadata) {\n return new Metadata(metadata).getCountries();\n}\n//# sourceMappingURL=getCountries.js.map"],"names":["getCountries","metadata","Metadata"],"mappings":";AACe,SAASA,EAAaC,GAAU;AAC7C,SAAO,IAAIC,EAASD,CAAQ,EAAE,aAAY;AAC5C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index162.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/parseDigits.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// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport var DIGITS = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n \"\\uFF10\": '0',\n // Fullwidth digit 0\n \"\\uFF11\": '1',\n // Fullwidth digit 1\n \"\\uFF12\": '2',\n // Fullwidth digit 2\n \"\\uFF13\": '3',\n // Fullwidth digit 3\n \"\\uFF14\": '4',\n // Fullwidth digit 4\n \"\\uFF15\": '5',\n // Fullwidth digit 5\n \"\\uFF16\": '6',\n // Fullwidth digit 6\n \"\\uFF17\": '7',\n // Fullwidth digit 7\n \"\\uFF18\": '8',\n // Fullwidth digit 8\n \"\\uFF19\": '9',\n // Fullwidth digit 9\n \"\\u0660\": '0',\n // Arabic-indic digit 0\n \"\\u0661\": '1',\n // Arabic-indic digit 1\n \"\\u0662\": '2',\n // Arabic-indic digit 2\n \"\\u0663\": '3',\n // Arabic-indic digit 3\n \"\\u0664\": '4',\n // Arabic-indic digit 4\n \"\\u0665\": '5',\n // Arabic-indic digit 5\n \"\\u0666\": '6',\n // Arabic-indic digit 6\n \"\\u0667\": '7',\n // Arabic-indic digit 7\n \"\\u0668\": '8',\n // Arabic-indic digit 8\n \"\\u0669\": '9',\n // Arabic-indic digit 9\n \"\\u06F0\": '0',\n // Eastern-Arabic digit 0\n \"\\u06F1\": '1',\n // Eastern-Arabic digit 1\n \"\\u06F2\": '2',\n // Eastern-Arabic digit 2\n \"\\u06F3\": '3',\n // Eastern-Arabic digit 3\n \"\\u06F4\": '4',\n // Eastern-Arabic digit 4\n \"\\u06F5\": '5',\n // Eastern-Arabic digit 5\n \"\\u06F6\": '6',\n // Eastern-Arabic digit 6\n \"\\u06F7\": '7',\n // Eastern-Arabic digit 7\n \"\\u06F8\": '8',\n // Eastern-Arabic digit 8\n \"\\u06F9\": '9' // Eastern-Arabic digit 9\n};\nexport function parseDigit(character) {\n return DIGITS[character];\n}\n\n/**\r\n * Parses phone number digits from a string.\r\n * Drops all punctuation leaving only digits.\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseDigits('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * ```\r\n */\nexport default function parseDigits(string) {\n var result = '';\n // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n var digit = parseDigit(character);\n if (digit) {\n result += digit;\n }\n }\n return result;\n}\n//# sourceMappingURL=parseDigits.js.map"],"names":["_createForOfIteratorHelperLoose","e","t","_unsupportedIterableToArray","o","a","_arrayLikeToArray","n","DIGITS","parseDigit","character","parseDigits","string","result","_iterator","_step","digit"],"mappings":"AAAA,SAASA,EAAgC,GAAGC,GAAG;AAAE,MAAIC,IAAmB,OAAO,SAAtB,OAAgC,EAAE,OAAO,QAAQ,KAAK,EAAE,YAAY;AAAG,MAAIA,EAAG,SAAQA,IAAIA,EAAE,KAAK,CAAC,GAAG,KAAK,KAAKA,CAAC;AAAG,MAAI,MAAM,QAAQ,CAAC,MAAMA,IAAIC,EAA4B,CAAC,MAAMF,GAAuC;AAAE,IAAAC,MAAM,IAAIA;AAAI,QAAIE,IAAI;AAAG,WAAO,WAAY;AAAE,aAAOA,KAAK,EAAE,SAAS,EAAE,MAAM,GAAE,IAAK,EAAE,MAAM,IAAI,OAAO,EAAEA,GAAG,EAAC;AAAA,IAAI;AAAA,EAAG;AAAE,QAAM,IAAI,UAAU;AAAA,mFAAuI;AAAG;AACziB,SAASD,EAA4B,GAAGE,GAAG;AAAE,MAAI,GAAG;AAAE,QAAgB,OAAO,KAAnB,SAAsB,QAAOC,EAAkB,GAAGD,CAAC;AAAG,QAAIH,IAAI,CAAA,EAAG,SAAS,KAAK,CAAC,EAAE,MAAM,GAAG,EAAE;AAAG,WAAoBA,MAAb,YAAkB,EAAE,gBAAgBA,IAAI,EAAE,YAAY,OAAiBA,MAAV,SAAyBA,MAAV,QAAc,MAAM,KAAK,CAAC,IAAoBA,MAAhB,eAAqB,2CAA2C,KAAKA,CAAC,IAAII,EAAkB,GAAGD,CAAC,IAAI;AAAA,EAAQ;AAAE;AACzX,SAASC,EAAkB,GAAGD,GAAG;AAAE,GAASA,K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