@rpcbase/ui 0.287.0 → 0.289.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 (738) hide show
  1. package/dist/assets/sha256.worker-DNtOSCbM.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -12
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js.map +1 -1
  10. package/dist/index105.js.map +1 -1
  11. package/dist/index106.js.map +1 -1
  12. package/dist/index107.js.map +1 -1
  13. package/dist/index108.js.map +1 -1
  14. package/dist/index109.js.map +1 -1
  15. package/dist/index11.js +96 -17
  16. package/dist/index11.js.map +1 -1
  17. package/dist/index110.js.map +1 -1
  18. package/dist/index111.js.map +1 -1
  19. package/dist/index112.js.map +1 -1
  20. package/dist/index113.js.map +1 -1
  21. package/dist/index114.js.map +1 -1
  22. package/dist/index115.js.map +1 -1
  23. package/dist/index116.js.map +1 -1
  24. package/dist/index117.js.map +1 -1
  25. package/dist/index118.js.map +1 -1
  26. package/dist/index119.js.map +1 -1
  27. package/dist/index12.js.map +1 -1
  28. package/dist/index120.js.map +1 -1
  29. package/dist/index121.js.map +1 -1
  30. package/dist/index122.js.map +1 -1
  31. package/dist/index123.js +1 -1
  32. package/dist/index123.js.map +1 -1
  33. package/dist/index124.js.map +1 -1
  34. package/dist/index125.js.map +1 -1
  35. package/dist/index126.js.map +1 -1
  36. package/dist/index127.js.map +1 -1
  37. package/dist/index128.js.map +1 -1
  38. package/dist/index129.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index130.js.map +1 -1
  41. package/dist/index131.js.map +1 -1
  42. package/dist/index132.js.map +1 -1
  43. package/dist/index133.js.map +1 -1
  44. package/dist/index134.js.map +1 -1
  45. package/dist/index135.js.map +1 -1
  46. package/dist/index136.js.map +1 -1
  47. package/dist/index137.js.map +1 -1
  48. package/dist/index138.js.map +1 -1
  49. package/dist/index139.js.map +1 -1
  50. package/dist/index14.js.map +1 -1
  51. package/dist/index140.js.map +1 -1
  52. package/dist/index141.js.map +1 -1
  53. package/dist/index142.js.map +1 -1
  54. package/dist/index143.js.map +1 -1
  55. package/dist/index144.js.map +1 -1
  56. package/dist/index145.js.map +1 -1
  57. package/dist/index146.js.map +1 -1
  58. package/dist/index147.js.map +1 -1
  59. package/dist/index148.js.map +1 -1
  60. package/dist/index149.js.map +1 -1
  61. package/dist/index15.js.map +1 -1
  62. package/dist/index150.js.map +1 -1
  63. package/dist/index151.js.map +1 -1
  64. package/dist/index152.js.map +1 -1
  65. package/dist/index153.js.map +1 -1
  66. package/dist/index154.js +4 -4
  67. package/dist/index154.js.map +1 -1
  68. package/dist/index155.js.map +1 -1
  69. package/dist/index156.js.map +1 -1
  70. package/dist/index157.js.map +1 -1
  71. package/dist/index158.js.map +1 -1
  72. package/dist/index159.js.map +1 -1
  73. package/dist/index16.js.map +1 -1
  74. package/dist/index160.js.map +1 -1
  75. package/dist/index161.js.map +1 -1
  76. package/dist/index162.js.map +1 -1
  77. package/dist/index163.js.map +1 -1
  78. package/dist/index164.js.map +1 -1
  79. package/dist/index165.js.map +1 -1
  80. package/dist/index166.js.map +1 -1
  81. package/dist/index167.js.map +1 -1
  82. package/dist/index168.js.map +1 -1
  83. package/dist/index169.js.map +1 -1
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index170.js +18 -12
  86. package/dist/index170.js.map +1 -1
  87. package/dist/index171.js.map +1 -1
  88. package/dist/index172.js.map +1 -1
  89. package/dist/index173.js.map +1 -1
  90. package/dist/index174.js.map +1 -1
  91. package/dist/index175.js.map +1 -1
  92. package/dist/index176.js.map +1 -1
  93. package/dist/index177.js.map +1 -1
  94. package/dist/index178.js.map +1 -1
  95. package/dist/index179.js.map +1 -1
  96. package/dist/index18.js.map +1 -1
  97. package/dist/index180.js.map +1 -1
  98. package/dist/index181.js +1 -1
  99. package/dist/index181.js.map +1 -1
  100. package/dist/index182.js +3 -3
  101. package/dist/index182.js.map +1 -1
  102. package/dist/index183.js.map +1 -1
  103. package/dist/index184.js.map +1 -1
  104. package/dist/index185.js.map +1 -1
  105. package/dist/index186.js.map +1 -1
  106. package/dist/index187.js.map +1 -1
  107. package/dist/index188.js.map +1 -1
  108. package/dist/index189.js.map +1 -1
  109. package/dist/index19.js.map +1 -1
  110. package/dist/index190.js +9 -7
  111. package/dist/index190.js.map +1 -1
  112. package/dist/index191.js +4 -4
  113. package/dist/index191.js.map +1 -1
  114. package/dist/index192.js +4 -15
  115. package/dist/index192.js.map +1 -1
  116. package/dist/index193.js +13 -3
  117. package/dist/index193.js.map +1 -1
  118. package/dist/index194.js +2 -2
  119. package/dist/index194.js.map +1 -1
  120. package/dist/index195.js +4 -85
  121. package/dist/index195.js.map +1 -1
  122. package/dist/index196.js +79 -54
  123. package/dist/index196.js.map +1 -1
  124. package/dist/index197.js +68 -7
  125. package/dist/index197.js.map +1 -1
  126. package/dist/index198.js +3 -23
  127. package/dist/index198.js.map +1 -1
  128. package/dist/index199.js +6 -28
  129. package/dist/index199.js.map +1 -1
  130. package/dist/index20.js.map +1 -1
  131. package/dist/index200.js +4 -97
  132. package/dist/index200.js.map +1 -1
  133. package/dist/index201.js +3 -4
  134. package/dist/index201.js.map +1 -1
  135. package/dist/index202.js +23 -24
  136. package/dist/index202.js.map +1 -1
  137. package/dist/index203.js +28 -10
  138. package/dist/index203.js.map +1 -1
  139. package/dist/index204.js +97 -4
  140. package/dist/index204.js.map +1 -1
  141. package/dist/index205.js +4 -12
  142. package/dist/index205.js.map +1 -1
  143. package/dist/index206.js +22 -19
  144. package/dist/index206.js.map +1 -1
  145. package/dist/index207.js +4 -6
  146. package/dist/index207.js.map +1 -1
  147. package/dist/index208.js +4 -15
  148. package/dist/index208.js.map +1 -1
  149. package/dist/index209.js +10 -102
  150. package/dist/index209.js.map +1 -1
  151. package/dist/index210.js +21 -3
  152. package/dist/index210.js.map +1 -1
  153. package/dist/index211.js +5 -23
  154. package/dist/index211.js.map +1 -1
  155. package/dist/index212.js +15 -28
  156. package/dist/index212.js.map +1 -1
  157. package/dist/index213.js +101 -17
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +3 -7
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +24 -15
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +27 -7
  164. package/dist/index216.js.map +1 -1
  165. package/dist/index217.js +17 -24
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index218.js +6 -22
  168. package/dist/index218.js.map +1 -1
  169. package/dist/index219.js +15 -6
  170. package/dist/index219.js.map +1 -1
  171. package/dist/index220.js +8 -5
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +27 -4
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +23 -4
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +6 -24
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +5 -3
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +4 -24
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +4 -23
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +23 -6
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +22 -8
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -19
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index23.js.map +1 -1
  192. package/dist/index230.js +22 -50
  193. package/dist/index230.js.map +1 -1
  194. package/dist/index231.js +7 -20
  195. package/dist/index231.js.map +1 -1
  196. package/dist/index232.js +9 -27
  197. package/dist/index232.js.map +1 -1
  198. package/dist/index233.js +17 -97
  199. package/dist/index233.js.map +1 -1
  200. package/dist/index234.js +50 -33
  201. package/dist/index234.js.map +1 -1
  202. package/dist/index235.js +20 -119
  203. package/dist/index235.js.map +1 -1
  204. package/dist/index236.js +28 -13
  205. package/dist/index236.js.map +1 -1
  206. package/dist/index237.js +98 -4
  207. package/dist/index237.js.map +1 -1
  208. package/dist/index238.js +33 -15
  209. package/dist/index238.js.map +1 -1
  210. package/dist/index239.js +116 -62
  211. package/dist/index239.js.map +1 -1
  212. package/dist/index24.js.map +1 -1
  213. package/dist/index240.js +13 -10
  214. package/dist/index240.js.map +1 -1
  215. package/dist/index241.js +4 -109
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +14 -14
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +64 -12
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +10 -5
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +104 -318
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +14 -66
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +12 -232
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +4 -270
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +313 -309
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index25.js.map +1 -1
  234. package/dist/index250.js +60 -171
  235. package/dist/index250.js.map +1 -1
  236. package/dist/index251.js +252 -8
  237. package/dist/index251.js.map +1 -1
  238. package/dist/index252.js +268 -41
  239. package/dist/index252.js.map +1 -1
  240. package/dist/index253.js +316 -47
  241. package/dist/index253.js.map +1 -1
  242. package/dist/index254.js +179 -9
  243. package/dist/index254.js.map +1 -1
  244. package/dist/index255.js +6 -50
  245. package/dist/index255.js.map +1 -1
  246. package/dist/index256.js +41 -51
  247. package/dist/index256.js.map +1 -1
  248. package/dist/index257.js +50 -7
  249. package/dist/index257.js.map +1 -1
  250. package/dist/index258.js +9 -10
  251. package/dist/index258.js.map +1 -1
  252. package/dist/index259.js +51 -61
  253. package/dist/index259.js.map +1 -1
  254. package/dist/index26.js.map +1 -1
  255. package/dist/index260.js +53 -42
  256. package/dist/index260.js.map +1 -1
  257. package/dist/index261.js +9 -97
  258. package/dist/index261.js.map +1 -1
  259. package/dist/index262.js +31 -47
  260. package/dist/index262.js.map +1 -1
  261. package/dist/index263.js +61 -36
  262. package/dist/index263.js.map +1 -1
  263. package/dist/index264.js +43 -47
  264. package/dist/index264.js.map +1 -1
  265. package/dist/index265.js +92 -46
  266. package/dist/index265.js.map +1 -1
  267. package/dist/index266.js +48 -20
  268. package/dist/index266.js.map +1 -1
  269. package/dist/index267.js +33 -176
  270. package/dist/index267.js.map +1 -1
  271. package/dist/index268.js +49 -48
  272. package/dist/index268.js.map +1 -1
  273. package/dist/index269.js +68 -15
  274. package/dist/index269.js.map +1 -1
  275. package/dist/index27.js.map +1 -1
  276. package/dist/index270.js +20 -65
  277. package/dist/index270.js.map +1 -1
  278. package/dist/index271.js +202 -9
  279. package/dist/index271.js.map +1 -1
  280. package/dist/index272.js +48 -40
  281. package/dist/index272.js.map +1 -1
  282. package/dist/index273.js +60 -91
  283. package/dist/index273.js.map +1 -1
  284. package/dist/index274.js +9 -278
  285. package/dist/index274.js.map +1 -1
  286. package/dist/index275.js +38 -55
  287. package/dist/index275.js.map +1 -1
  288. package/dist/index276.js +91 -10
  289. package/dist/index276.js.map +1 -1
  290. package/dist/index277.js +278 -12
  291. package/dist/index277.js.map +1 -1
  292. package/dist/index278.js +58 -11
  293. package/dist/index278.js.map +1 -1
  294. package/dist/index279.js +11 -64
  295. package/dist/index279.js.map +1 -1
  296. package/dist/index28.js +5 -5
  297. package/dist/index28.js.map +1 -1
  298. package/dist/index280.js +12 -6
  299. package/dist/index280.js.map +1 -1
  300. package/dist/index281.js +3 -25
  301. package/dist/index281.js.map +1 -1
  302. package/dist/index282.js +3 -25
  303. package/dist/index282.js.map +1 -1
  304. package/dist/index283.js +12 -126
  305. package/dist/index283.js.map +1 -1
  306. package/dist/index284.js +63 -51
  307. package/dist/index284.js.map +1 -1
  308. package/dist/index285.js +5 -60
  309. package/dist/index285.js.map +1 -1
  310. package/dist/index286.js +24 -48
  311. package/dist/index286.js.map +1 -1
  312. package/dist/index287.js +24 -6
  313. package/dist/index287.js.map +1 -1
  314. package/dist/index288.js +125 -14
  315. package/dist/index288.js.map +1 -1
  316. package/dist/index289.js +51 -16
  317. package/dist/index289.js.map +1 -1
  318. package/dist/index29.js +5 -7
  319. package/dist/index29.js.map +1 -1
  320. package/dist/index290.js +56 -11
  321. package/dist/index290.js.map +1 -1
  322. package/dist/index291.js +47 -24
  323. package/dist/index291.js.map +1 -1
  324. package/dist/index292.js +7 -51
  325. package/dist/index292.js.map +1 -1
  326. package/dist/index293.js +15 -6
  327. package/dist/index293.js.map +1 -1
  328. package/dist/index294.js +18 -148
  329. package/dist/index294.js.map +1 -1
  330. package/dist/index295.js +12 -59
  331. package/dist/index295.js.map +1 -1
  332. package/dist/index296.js +25 -120
  333. package/dist/index296.js.map +1 -1
  334. package/dist/index297.js +54 -15
  335. package/dist/index297.js.map +1 -1
  336. package/dist/index298.js +5 -866
  337. package/dist/index298.js.map +1 -1
  338. package/dist/index299.js +148 -28
  339. package/dist/index299.js.map +1 -1
  340. package/dist/index3.js.map +1 -1
  341. package/dist/index30.js +6 -8
  342. package/dist/index30.js.map +1 -1
  343. package/dist/index300.js +55 -512
  344. package/dist/index300.js.map +1 -1
  345. package/dist/index301.js +111 -794
  346. package/dist/index301.js.map +1 -1
  347. package/dist/index302.js +14 -7436
  348. package/dist/index302.js.map +1 -1
  349. package/dist/index303.js +862 -6
  350. package/dist/index303.js.map +1 -1
  351. package/dist/index304.js +28 -12
  352. package/dist/index304.js.map +1 -1
  353. package/dist/index305.js +515 -5
  354. package/dist/index305.js.map +1 -1
  355. package/dist/index306.js +803 -5
  356. package/dist/index306.js.map +1 -1
  357. package/dist/index307.js +7426 -468
  358. package/dist/index307.js.map +1 -1
  359. package/dist/index308.js +6 -37
  360. package/dist/index308.js.map +1 -1
  361. package/dist/index309.js +12 -19
  362. package/dist/index309.js.map +1 -1
  363. package/dist/index31.js +5 -11
  364. package/dist/index31.js.map +1 -1
  365. package/dist/index310.js +5 -30
  366. package/dist/index310.js.map +1 -1
  367. package/dist/index311.js +5 -4
  368. package/dist/index311.js.map +1 -1
  369. package/dist/index312.js +461 -51
  370. package/dist/index312.js.map +1 -1
  371. package/dist/index313.js +36 -10
  372. package/dist/index313.js.map +1 -1
  373. package/dist/index314.js +19 -5
  374. package/dist/index314.js.map +1 -1
  375. package/dist/index315.js +29 -8
  376. package/dist/index315.js.map +1 -1
  377. package/dist/index316.js +4 -12
  378. package/dist/index316.js.map +1 -1
  379. package/dist/index317.js +60 -3
  380. package/dist/index317.js.map +1 -1
  381. package/dist/index318.js +10 -15
  382. package/dist/index318.js.map +1 -1
  383. package/dist/index319.js +5 -25
  384. package/dist/index319.js.map +1 -1
  385. package/dist/index32.js +5 -5
  386. package/dist/index32.js.map +1 -1
  387. package/dist/index320.js +9 -41
  388. package/dist/index320.js.map +1 -1
  389. package/dist/index321.js +11 -4
  390. package/dist/index321.js.map +1 -1
  391. package/dist/index322.js +3 -26
  392. package/dist/index322.js.map +1 -1
  393. package/dist/index323.js +15 -18
  394. package/dist/index323.js.map +1 -1
  395. package/dist/index324.js +22 -31
  396. package/dist/index324.js.map +1 -1
  397. package/dist/index325.js +41 -5
  398. package/dist/index325.js.map +1 -1
  399. package/dist/index326.js +4 -8
  400. package/dist/index326.js.map +1 -1
  401. package/dist/index327.js +25 -8
  402. package/dist/index327.js.map +1 -1
  403. package/dist/index328.js +19 -9
  404. package/dist/index328.js.map +1 -1
  405. package/dist/index329.js +34 -10
  406. package/dist/index329.js.map +1 -1
  407. package/dist/index33.js +9 -6
  408. package/dist/index33.js.map +1 -1
  409. package/dist/index330.js +5 -7
  410. package/dist/index330.js.map +1 -1
  411. package/dist/index331.js +9 -75
  412. package/dist/index331.js.map +1 -1
  413. package/dist/index332.js +8 -162
  414. package/dist/index332.js.map +1 -1
  415. package/dist/index333.js +9 -114
  416. package/dist/index333.js.map +1 -1
  417. package/dist/index334.js +10 -14
  418. package/dist/index334.js.map +1 -1
  419. package/dist/index335.js +7 -80
  420. package/dist/index335.js.map +1 -1
  421. package/dist/index336.js +68 -39
  422. package/dist/index336.js.map +1 -1
  423. package/dist/index337.js +160 -11
  424. package/dist/index337.js.map +1 -1
  425. package/dist/index338.js +113 -15
  426. package/dist/index338.js.map +1 -1
  427. package/dist/index339.js +13 -100
  428. package/dist/index339.js.map +1 -1
  429. package/dist/index34.js +6 -6
  430. package/dist/index34.js.map +1 -1
  431. package/dist/index340.js +73 -49
  432. package/dist/index340.js.map +1 -1
  433. package/dist/index341.js +34 -96
  434. package/dist/index341.js.map +1 -1
  435. package/dist/index342.js +12 -70
  436. package/dist/index342.js.map +1 -1
  437. package/dist/index343.js +14 -111
  438. package/dist/index343.js.map +1 -1
  439. package/dist/index344.js +94 -48
  440. package/dist/index344.js.map +1 -1
  441. package/dist/index345.js +50 -37
  442. package/dist/index345.js.map +1 -1
  443. package/dist/index346.js +89 -125
  444. package/dist/index346.js.map +1 -1
  445. package/dist/index347.js +52 -123
  446. package/dist/index347.js.map +1 -1
  447. package/dist/index348.js +54 -197
  448. package/dist/index348.js.map +1 -1
  449. package/dist/index349.js +44 -229
  450. package/dist/index349.js.map +1 -1
  451. package/dist/index35.js +9 -9
  452. package/dist/index35.js.map +1 -1
  453. package/dist/index350.js +42 -308
  454. package/dist/index350.js.map +1 -1
  455. package/dist/index351.js +144 -5
  456. package/dist/index351.js.map +1 -1
  457. package/dist/index352.js +142 -6
  458. package/dist/index352.js.map +1 -1
  459. package/dist/index353.js +257 -7
  460. package/dist/index353.js.map +1 -1
  461. package/dist/index354.js +241 -6
  462. package/dist/index354.js.map +1 -1
  463. package/dist/index355.js +309 -6
  464. package/dist/index355.js.map +1 -1
  465. package/dist/index356.js +5 -21
  466. package/dist/index356.js.map +1 -1
  467. package/dist/index357.js +6 -10
  468. package/dist/index357.js.map +1 -1
  469. package/dist/index358.js +7 -128
  470. package/dist/index358.js.map +1 -1
  471. package/dist/index359.js +6 -42
  472. package/dist/index359.js.map +1 -1
  473. package/dist/index36.js +12 -7
  474. package/dist/index36.js.map +1 -1
  475. package/dist/index360.js +6 -68
  476. package/dist/index360.js.map +1 -1
  477. package/dist/index361.js +20 -116
  478. package/dist/index361.js.map +1 -1
  479. package/dist/index362.js +10 -490
  480. package/dist/index362.js.map +1 -1
  481. package/dist/index363.js +128 -7
  482. package/dist/index363.js.map +1 -1
  483. package/dist/index364.js +42 -13
  484. package/dist/index364.js.map +1 -1
  485. package/dist/index365.js +67 -3
  486. package/dist/index365.js.map +1 -1
  487. package/dist/index366.js +115 -45
  488. package/dist/index366.js.map +1 -1
  489. package/dist/index367.js +490 -11
  490. package/dist/index367.js.map +1 -1
  491. package/dist/index368.js +8 -26
  492. package/dist/index368.js.map +1 -1
  493. package/dist/index369.js +12 -41
  494. package/dist/index369.js.map +1 -1
  495. package/dist/index37.js +13 -5
  496. package/dist/index37.js.map +1 -1
  497. package/dist/index370.js +4 -36
  498. package/dist/index370.js.map +1 -1
  499. package/dist/index371.js +45 -15
  500. package/dist/index371.js.map +1 -1
  501. package/dist/index372.js +24 -41
  502. package/dist/index372.js.map +1 -1
  503. package/dist/index373.js +3 -12
  504. package/dist/index373.js.map +1 -1
  505. package/dist/index374.js +27 -11
  506. package/dist/index374.js.map +1 -1
  507. package/dist/index375.js +40 -50
  508. package/dist/index375.js.map +1 -1
  509. package/dist/index376.js +37 -40
  510. package/dist/index376.js.map +1 -1
  511. package/dist/index377.js +12 -10
  512. package/dist/index377.js.map +1 -1
  513. package/dist/index378.js +40 -4
  514. package/dist/index378.js.map +1 -1
  515. package/dist/index379.js +7 -4
  516. package/dist/index379.js.map +1 -1
  517. package/dist/index38.js +5 -5
  518. package/dist/index38.js.map +1 -1
  519. package/dist/index380.js +29 -8
  520. package/dist/index380.js.map +1 -1
  521. package/dist/index381.js +9 -303
  522. package/dist/index381.js.map +1 -1
  523. package/dist/index382.js +57 -4
  524. package/dist/index382.js.map +1 -1
  525. package/dist/index383.js +40 -22
  526. package/dist/index383.js.map +1 -1
  527. package/dist/index384.js +15 -105
  528. package/dist/index384.js.map +1 -1
  529. package/dist/index385.js +5 -22
  530. package/dist/index385.js.map +1 -1
  531. package/dist/index386.js +10 -22
  532. package/dist/index386.js.map +1 -1
  533. package/dist/index387.js +289 -16
  534. package/dist/index387.js.map +1 -1
  535. package/dist/index388.js +4 -12
  536. package/dist/index388.js.map +1 -1
  537. package/dist/index389.js +20 -112
  538. package/dist/index389.js.map +1 -1
  539. package/dist/index39.js +6 -10
  540. package/dist/index39.js.map +1 -1
  541. package/dist/index390.js +3 -9
  542. package/dist/index390.js.map +1 -1
  543. package/dist/index391.js +104 -27
  544. package/dist/index391.js.map +1 -1
  545. package/dist/index392.js +20 -9
  546. package/dist/index392.js.map +1 -1
  547. package/dist/index393.js +20 -6
  548. package/dist/index393.js.map +1 -1
  549. package/dist/index394.js +14 -253
  550. package/dist/index394.js.map +1 -1
  551. package/dist/index395.js +12 -10
  552. package/dist/index395.js.map +1 -1
  553. package/dist/index396.js +117 -11
  554. package/dist/index396.js.map +1 -1
  555. package/dist/index397.js +8 -6
  556. package/dist/index397.js.map +1 -1
  557. package/dist/index398.js +32 -22
  558. package/dist/index398.js.map +1 -1
  559. package/dist/index399.js +9 -23
  560. package/dist/index399.js.map +1 -1
  561. package/dist/index4.js.map +1 -1
  562. package/dist/index40.js +8 -11
  563. package/dist/index40.js.map +1 -1
  564. package/dist/index400.js +6 -105
  565. package/dist/index400.js.map +1 -1
  566. package/dist/index401.js +3 -15
  567. package/dist/index401.js.map +1 -1
  568. package/dist/index402.js +251 -10
  569. package/dist/index402.js.map +1 -1
  570. package/dist/index403.js +9 -7
  571. package/dist/index403.js.map +1 -1
  572. package/dist/index404.js +11 -239
  573. package/dist/index404.js.map +1 -1
  574. package/dist/index405.js +7 -28
  575. package/dist/index405.js.map +1 -1
  576. package/dist/index406.js +21 -37
  577. package/dist/index406.js.map +1 -1
  578. package/dist/index407.js +21 -10
  579. package/dist/index407.js.map +1 -1
  580. package/dist/index408.js +97 -117
  581. package/dist/index408.js.map +1 -1
  582. package/dist/index409.js +15 -40
  583. package/dist/index409.js.map +1 -1
  584. package/dist/index41.js +6 -7
  585. package/dist/index41.js.map +1 -1
  586. package/dist/index410.js +11 -25
  587. package/dist/index410.js.map +1 -1
  588. package/dist/index411.js +7 -9
  589. package/dist/index411.js.map +1 -1
  590. package/dist/index412.js +3 -24
  591. package/dist/index412.js.map +1 -1
  592. package/dist/index413.js +226 -15
  593. package/dist/index413.js.map +1 -1
  594. package/dist/index414.js +24 -11
  595. package/dist/index414.js.map +1 -1
  596. package/dist/index415.js +38 -4
  597. package/dist/index415.js.map +1 -1
  598. package/dist/index416.js +11 -324
  599. package/dist/index416.js.map +1 -1
  600. package/dist/index417.js +119 -62
  601. package/dist/index417.js.map +1 -1
  602. package/dist/index418.js +42 -4
  603. package/dist/index418.js.map +1 -1
  604. package/dist/index419.js +25 -28
  605. package/dist/index419.js.map +1 -1
  606. package/dist/index42.js +6 -4
  607. package/dist/index42.js.map +1 -1
  608. package/dist/index420.js +11 -470
  609. package/dist/index420.js.map +1 -1
  610. package/dist/index421.js +23 -268
  611. package/dist/index421.js.map +1 -1
  612. package/dist/index422.js +24 -0
  613. package/dist/index422.js.map +1 -0
  614. package/dist/index423.js +17 -0
  615. package/dist/index423.js.map +1 -0
  616. package/dist/index424.js +8 -0
  617. package/dist/index424.js.map +1 -0
  618. package/dist/index425.js +328 -0
  619. package/dist/index425.js.map +1 -0
  620. package/dist/index426.js +66 -0
  621. package/dist/index426.js.map +1 -0
  622. package/dist/index427.js +7 -0
  623. package/dist/index427.js.map +1 -0
  624. package/dist/index428.js +31 -0
  625. package/dist/index428.js.map +1 -0
  626. package/dist/index429.js +474 -0
  627. package/dist/index429.js.map +1 -0
  628. package/dist/index43.js +68 -7
  629. package/dist/index43.js.map +1 -1
  630. package/dist/index430.js +272 -0
  631. package/dist/index430.js.map +1 -0
  632. package/dist/index44.js +7 -6
  633. package/dist/index44.js.map +1 -1
  634. package/dist/index45.js +31 -7
  635. package/dist/index45.js.map +1 -1
  636. package/dist/index46.js +10 -10
  637. package/dist/index46.js.map +1 -1
  638. package/dist/index47.js +15 -13
  639. package/dist/index47.js.map +1 -1
  640. package/dist/index48.js +201 -7
  641. package/dist/index48.js.map +1 -1
  642. package/dist/index49.js +20 -6
  643. package/dist/index49.js.map +1 -1
  644. package/dist/index5.js.map +1 -1
  645. package/dist/index50.js +16 -6
  646. package/dist/index50.js.map +1 -1
  647. package/dist/index51.js +123 -14
  648. package/dist/index51.js.map +1 -1
  649. package/dist/index52.js +19 -8
  650. package/dist/index52.js.map +1 -1
  651. package/dist/index53.js +5 -7
  652. package/dist/index53.js.map +1 -1
  653. package/dist/index54.js +9 -68
  654. package/dist/index54.js.map +1 -1
  655. package/dist/index55.js +7 -7
  656. package/dist/index55.js.map +1 -1
  657. package/dist/index56.js +9 -31
  658. package/dist/index56.js.map +1 -1
  659. package/dist/index57.js +13 -10
  660. package/dist/index57.js.map +1 -1
  661. package/dist/index58.js +8 -15
  662. package/dist/index58.js.map +1 -1
  663. package/dist/index59.js +10 -201
  664. package/dist/index59.js.map +1 -1
  665. package/dist/index6.js.map +1 -1
  666. package/dist/index60.js +13 -20
  667. package/dist/index60.js.map +1 -1
  668. package/dist/index61.js +9 -16
  669. package/dist/index61.js.map +1 -1
  670. package/dist/index62.js +10 -123
  671. package/dist/index62.js.map +1 -1
  672. package/dist/index63.js +5 -19
  673. package/dist/index63.js.map +1 -1
  674. package/dist/index64.js +42 -9
  675. package/dist/index64.js.map +1 -1
  676. package/dist/index65.js +387 -9
  677. package/dist/index65.js.map +1 -1
  678. package/dist/index66.js +37 -14
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +21 -9
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +4 -9
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index69.js +6 -4
  685. package/dist/index69.js.map +1 -1
  686. package/dist/index7.js +3 -3
  687. package/dist/index7.js.map +1 -1
  688. package/dist/index70.js +57 -41
  689. package/dist/index70.js.map +1 -1
  690. package/dist/index71.js +5 -387
  691. package/dist/index71.js.map +1 -1
  692. package/dist/index72.js +6 -37
  693. package/dist/index72.js.map +1 -1
  694. package/dist/index73.js +5 -21
  695. package/dist/index73.js.map +1 -1
  696. package/dist/index74.js +4 -56
  697. package/dist/index74.js.map +1 -1
  698. package/dist/index75.js +7 -7
  699. package/dist/index75.js.map +1 -1
  700. package/dist/index76.js +6 -5
  701. package/dist/index76.js.map +1 -1
  702. package/dist/index77.js +6 -5
  703. package/dist/index77.js.map +1 -1
  704. package/dist/index78.js +11 -5
  705. package/dist/index78.js.map +1 -1
  706. package/dist/index79.js +11 -5
  707. package/dist/index79.js.map +1 -1
  708. package/dist/index8.js.map +1 -1
  709. package/dist/index80.js +7 -6
  710. package/dist/index80.js.map +1 -1
  711. package/dist/index81.js +10 -6
  712. package/dist/index81.js.map +1 -1
  713. package/dist/index82.js +5 -8
  714. package/dist/index82.js.map +1 -1
  715. package/dist/index83.js +6 -7
  716. package/dist/index83.js.map +1 -1
  717. package/dist/index84.js.map +1 -1
  718. package/dist/index85.js.map +1 -1
  719. package/dist/index86.js.map +1 -1
  720. package/dist/index87.js +2 -2
  721. package/dist/index87.js.map +1 -1
  722. package/dist/index88.js +31 -31
  723. package/dist/index88.js.map +1 -1
  724. package/dist/index89.js +1 -1
  725. package/dist/index89.js.map +1 -1
  726. package/dist/index9.js.map +1 -1
  727. package/dist/index90.js.map +1 -1
  728. package/dist/index91.js.map +1 -1
  729. package/dist/index92.js.map +1 -1
  730. package/dist/index93.js.map +1 -1
  731. package/dist/index94.js.map +1 -1
  732. package/dist/index95.js.map +1 -1
  733. package/dist/index96.js.map +1 -1
  734. package/dist/index97.js.map +1 -1
  735. package/dist/index98.js.map +1 -1
  736. package/dist/index99.js.map +1 -1
  737. package/package.json +13 -13
  738. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index355.js","names":["_getCountryCallingCode"],"sources":["../../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\nimport { getCountryCallingCode as _getCountryCallingCode } from '../../core/index.js'\n\nexport function getCountryCallingCode() {\n\treturn withMetadataArgument(_getCountryCallingCode, arguments)\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAgB,IAAwB;CACvC,OAAO,EAAqBA,GAAwB,SAAS;AAC9D"}
1
+ {"version":3,"file":"index355.js","names":["isObject","Metadata","checkNumberLength","getCountryByNationalNumber","getCountryByCallingCode","PhoneNumber","AsYouTypeState","AsYouTypeFormatter","AsYouTypeParser","_typeof","o","_slicedToArray","_arrayWithHoles","r","_iterableToArrayLimit","e","_unsupportedIterableToArray","_nonIterableRest","_arrayLikeToArray","a","t","n","i","u","f","l","\"return\"","_classCallCheck","_defineProperties","_toPropertyKey","_createClass","_toPrimitive","AsYouType","metadata","_this$getCountryAndCa2","optionsOrDefaultCountry","defaultCountry","defaultCallingCode","_this$parser$input","text","digits","formattedNationalNumber","nationalDigits","_this","country","callingCode","_this2","prefix","_this$state","nationalSignificantNumber","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalPrefix","number","nationalSignificantNumberIsModified","countryCodes","_this$state2","_this$state3","carrierCode","exactCountry","getExactCountryForMultiCountryCallingCode","phoneNumber","_this$state4","result","ambiguousCountries"],"sources":["../../../node_modules/libphonenumber-js/es6/AsYouType.js"],"sourcesContent":["function _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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure 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 _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\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 Metadata from './metadata.js';\nimport PhoneNumber from './PhoneNumber.js';\nimport checkNumberLength from './helpers/checkNumberLength.js';\nimport AsYouTypeState from './AsYouTypeState.js';\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js';\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js';\nimport isObject from './helpers/isObject.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\nvar AsYouType = /*#__PURE__*/function () {\n /**\n * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\n * @param {Object} metadata\n */\n function AsYouType(optionsOrDefaultCountry, metadata) {\n _classCallCheck(this, AsYouType);\n // Metadata instance is created once and stays constant.\n // This is required because other utility classes such as `AsYouTypeFormatter`\n // will use this metadata instance \"reference\" and will assume that it stays constant.\n this.metadata = new Metadata(metadata);\n var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),\n _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2),\n defaultCountry = _this$getCountryAndCa2[0],\n defaultCallingCode = _this$getCountryAndCa2[1];\n // `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n // For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n // So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.reset();\n }\n return _createClass(AsYouType, [{\n key: \"getCountryAndCallingCode\",\n value: function getCountryAndCallingCode(optionsOrDefaultCountry) {\n // Set `defaultCountry` and `defaultCallingCode` options.\n var defaultCountry;\n var defaultCallingCode;\n // Turns out `null` also has type \"object\". Weird.\n if (optionsOrDefaultCountry) {\n if (isObject(optionsOrDefaultCountry)) {\n defaultCountry = optionsOrDefaultCountry.defaultCountry;\n defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;\n } else {\n defaultCountry = optionsOrDefaultCountry;\n }\n }\n if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n defaultCountry = undefined;\n }\n if (defaultCallingCode) {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n defaultCountry = '001';\n }\n }\n }\n return [defaultCountry, defaultCallingCode];\n }\n\n /**\n * Inputs \"next\" phone number characters.\n * @param {string} text\n * @return {string} Formatted phone number characters that have been input so far.\n */\n }, {\n key: \"input\",\n value: function input(text) {\n var _this$parser$input = this.parser.input(text, this.state),\n digits = _this$parser$input.digits,\n justLeadingPlus = _this$parser$input.justLeadingPlus;\n if (justLeadingPlus) {\n this.formattedOutput = '+';\n } else if (digits) {\n this.determineTheCountryIfNeeded();\n // Match the available formats by the currently available leading digits.\n if (this.state.nationalSignificantNumber) {\n this.formatter.narrowDownMatchingFormats(this.state);\n }\n var formattedNationalNumber;\n if (this.metadata.hasSelectedNumberingPlan()) {\n formattedNationalNumber = this.formatter.format(digits, this.state);\n }\n if (formattedNationalNumber === undefined) {\n // See if another national (significant) number could be re-extracted.\n if (this.parser.reExtractNationalSignificantNumber(this.state)) {\n this.determineTheCountryIfNeeded();\n // If it could, then re-try formatting the new national (significant) number.\n var nationalDigits = this.state.getNationalDigits();\n if (nationalDigits) {\n formattedNationalNumber = this.formatter.format(nationalDigits, this.state);\n }\n }\n }\n this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();\n }\n return this.formattedOutput;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this = this;\n this.state = new AsYouTypeState({\n onCountryChange: function onCountryChange(country) {\n // Before version `1.6.0`, the official `AsYouType` formatter API\n // included a `.country` property on an `AsYouType` instance.\n // Since that property (along with the others) have been moved to\n // `this.state`, `this.country` property is emulated for compatibility\n // with the old versions.\n _this.country = country;\n },\n onCallingCodeChange: function onCallingCodeChange(callingCode, country) {\n _this.metadata.selectNumberingPlan(country || callingCode);\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n _this.parser.reset(_this.metadata.numberingPlan);\n }\n });\n this.formatter = new AsYouTypeFormatter({\n state: this.state,\n metadata: this.metadata\n });\n this.parser = new AsYouTypeParser({\n defaultCountry: this.defaultCountry,\n defaultCallingCode: this.defaultCallingCode,\n metadata: this.metadata,\n state: this.state,\n onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {\n _this.determineTheCountryIfNeeded();\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n }\n });\n this.state.reset({\n country: this.defaultCountry,\n callingCode: this.defaultCallingCode\n });\n this.formattedOutput = '';\n return this;\n }\n\n /**\n * Returns `true` if the phone number is being input in international format.\n * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\n * @return {boolean}\n */\n }, {\n key: \"isInternational\",\n value: function isInternational() {\n return this.state.international;\n }\n\n /**\n * Returns the \"calling code\" part of the phone number when it's being input\n * in an international format.\n * If no valid calling code has been entered so far, returns `undefined`.\n * @return {string} [callingCode]\n */\n }, {\n key: \"getCallingCode\",\n value: function getCallingCode() {\n // If the number is being input in national format and some \"default calling code\"\n // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n // is equal to that \"default calling code\".\n //\n // If the number is being input in national format and no \"default calling code\"\n // has been passed to `AsYouType` constructor, then returns `undefined`,\n // even if a \"default country\" has been passed to `AsYouType` constructor.\n //\n if (this.isInternational()) {\n return this.state.callingCode;\n }\n }\n\n // A legacy alias.\n }, {\n key: \"getCountryCallingCode\",\n value: function getCountryCallingCode() {\n return this.getCallingCode();\n }\n\n /**\n * Returns a two-letter country code of the phone number.\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\n * Returns `undefined` if no phone number has been input yet.\n * @return {string} [country]\n */\n }, {\n key: \"getCountry\",\n value: function getCountry() {\n var digits = this.state.digits;\n // Return `undefined` if no digits have been input yet.\n if (digits) {\n return this._getCountry();\n }\n }\n\n /**\n * Returns a two-letter country code of the phone number.\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\n * @return {string} [country]\n */\n }, {\n key: \"_getCountry\",\n value: function _getCountry() {\n var country = this.state.country;\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n // `AsYouType.getCountry()` returns `undefined`\n // for \"non-geographic\" phone numbering plans.\n if (country === '001') {\n return;\n }\n }\n return country;\n }\n }, {\n key: \"determineTheCountryIfNeeded\",\n value: function determineTheCountryIfNeeded() {\n // Suppose a user enters a phone number in international format,\n // and there're several countries corresponding to that country calling code,\n // and a country has been derived from the number, and then\n // a user enters one more digit and the number is no longer\n // valid for the derived country, so the country should be re-derived\n // on every new digit in those cases.\n //\n // If the phone number is being input in national format,\n // then it could be a case when `defaultCountry` wasn't specified\n // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n // and that \"calling code\" could correspond to a \"non-geographic entity\",\n // or there could be several countries corresponding to that country calling code.\n // In those cases, `this.country` is `undefined` and should be derived\n // from the number. Again, if country calling code is ambiguous, then\n // `this.country` should be re-derived with each new digit.\n //\n if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n this.determineTheCountry();\n }\n }\n\n // Prepends `+CountryCode ` in case of an international phone number\n }, {\n key: \"getFullNumber\",\n value: function getFullNumber(formattedNationalNumber) {\n var _this2 = this;\n if (this.isInternational()) {\n var prefix = function prefix(text) {\n return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {\n spacing: text ? true : false\n }) + text;\n };\n var callingCode = this.state.callingCode;\n if (!callingCode) {\n return prefix(\"\".concat(this.state.getDigitsWithoutInternationalPrefix()));\n }\n if (!formattedNationalNumber) {\n return prefix(callingCode);\n }\n return prefix(\"\".concat(callingCode, \" \").concat(formattedNationalNumber));\n }\n return formattedNationalNumber;\n }\n }, {\n key: \"getNonFormattedNationalNumberWithPrefix\",\n value: function getNonFormattedNationalNumberWithPrefix() {\n var _this$state = this.state,\n nationalSignificantNumber = _this$state.nationalSignificantNumber,\n prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _this$state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,\n nationalPrefix = _this$state.nationalPrefix;\n var number = nationalSignificantNumber;\n var prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix;\n if (prefix) {\n number = prefix + number;\n }\n return number;\n }\n }, {\n key: \"getNonFormattedNumber\",\n value: function getNonFormattedNumber() {\n var nationalSignificantNumberIsModified = this.state.nationalSignificantNumberIsModified;\n return this.getFullNumber(nationalSignificantNumberIsModified ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());\n }\n }, {\n key: \"getNonFormattedTemplate\",\n value: function getNonFormattedTemplate() {\n var number = this.getNonFormattedNumber();\n if (number) {\n return number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER);\n }\n }\n }, {\n key: \"isCountryCallingCodeAmbiguous\",\n value: function isCountryCallingCodeAmbiguous() {\n var callingCode = this.state.callingCode;\n var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);\n return countryCodes && countryCodes.length > 1;\n }\n\n // Determines the exact country of the phone number\n // entered so far based on the country phone code\n // and the national phone number.\n }, {\n key: \"determineTheCountry\",\n value: function determineTheCountry() {\n // Get a more precise country code for this national number.\n // It is possible that the precise country couldn't be determined\n // in cases when there're multiple countries sharing the same calling code.\n // In that case, `country` will be `undefined`.\n var country = getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {\n nationalNumber: this.state.nationalSignificantNumber,\n metadata: this.metadata\n });\n // If the derived country is indeed more precise,\n // or if no country could be derived for the updated phone number.\n if (country !== this.state.country) {\n // Set (or reset) the more precise country.\n this.state.setCountry(country);\n // If a more precise country could be derived.\n if (country) {\n // Select a more precise telephone numbering plan.\n // For example, consider that `AsYouType` instance was created with `defaultCountry: \"US\"` argument.\n // In that case, the metadata instance will be using \"US\" metadata.\n // But then the user could input a Canadian phone number, in which case\n // the metadata instance should be switched to Canadian telephone numbering plan.\n // It is required to do that because later `canFormatCompleteNumber()` function will be called,\n // and that function relies on the precise country being pre-selected in the metadata instance.\n // Or, for example, `checkNumberLength()` function also relies on same thing.\n this.metadata.selectNumberingPlan(country);\n }\n }\n }\n\n /**\n * Returns a E.164 phone number value for the user's input.\n *\n * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\n * it will return `\"+12223334444\"`.\n *\n * For international phone number input, it will also auto-correct\n * some minor errors such as using a national prefix when writing\n * an international phone number. For example, if the user inputs\n * `\"+44 0 7400 000000\"` then it will return an auto-corrected\n * `\"+447400000000\"` phone number value.\n *\n * Will return `undefined` if no digits have been input,\n * or when inputting a phone number in national format and no\n * default country or default \"country calling code\" have been set.\n *\n * @return {string} [value]\n */\n }, {\n key: \"getNumberValue\",\n value: function getNumberValue() {\n var _this$state2 = this.state,\n digits = _this$state2.digits,\n callingCode = _this$state2.callingCode,\n country = _this$state2.country,\n nationalSignificantNumber = _this$state2.nationalSignificantNumber;\n\n // Will return `undefined` if no digits have been input.\n if (!digits) {\n return;\n }\n if (this.isInternational()) {\n if (callingCode) {\n return '+' + callingCode + nationalSignificantNumber;\n } else {\n return '+' + digits;\n }\n } else {\n if (country || callingCode) {\n var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode;\n return '+' + callingCode_ + nationalSignificantNumber;\n }\n }\n }\n\n /**\n * Returns an instance of `PhoneNumber` class.\n * Will return `undefined` if no national (significant) number\n * digits have been entered so far, or if no `defaultCountry` has been\n * set and the user enters a phone number not in international format.\n */\n }, {\n key: \"getNumber\",\n value: function getNumber() {\n var _this$state3 = this.state,\n nationalSignificantNumber = _this$state3.nationalSignificantNumber,\n carrierCode = _this$state3.carrierCode,\n callingCode = _this$state3.callingCode;\n if (!nationalSignificantNumber) {\n return;\n }\n\n // `this._getCountry()` is basically same as `this.state.country`\n // with the only change that it returns `undefined` in case of a\n // \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n var country = this._getCountry();\n\n // Sidenote:\n // `state.callingCode` and `state.country` are somewhat independent from one another\n // and there could be situations when one is defined but the other is not.\n // See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\n if (!country && !callingCode) {\n return;\n }\n\n // By default, if `defaultCountry` parameter was passed when\n // creating `AsYouType` instance, `state.country` is gonna be\n // that `defaultCountry`, which doesn't entirely conform with\n // `parsePhoneNumber()`'s behavior where it attempts to determine\n // the country more precisely in cases when multiple countries\n // could correspond to the same `countryCallingCode`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n //\n // Because `AsYouType.getNumber()` method is supposed to be a 1:1\n // equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n // it means that it should also behave accordingly in such cases of `country` ambiguity.\n // That's how users of this library would expect it to behave anyway.\n //\n // So here it checks if `state.country` is same as the `defaultCountry`,\n // and if it is, it attempts to get rid of any potential ambiguity.\n //\n if (country) {\n if (country === this.defaultCountry) {\n // // Create a `Metadata` instance just to get the calling code of the `country`.\n // const metadata = new Metadata(this.metadata.metadata)\n // // `state.callingCode` and `state.country` are somewhat independent from one another\n // // and there could be situations when one is defined but the other is not.\n // // See the comment in `AsYouTypeState.js` for more info on when that is possible.\n // // Here, it only passes `state.country` because there's no need to pass `state.callingCode`\n // // because `state.country` is known to be defined.\n // metadata.selectNumberingPlan(country)\n // const countryCallingCode = metadata.numberingPlan.callingCode()\n\n // Instead of getting `countryCallingCode` value above,\n // it could simply read it from the existing metadata instance.\n var countryCallingCode = this.metadata.numberingPlan.callingCode();\n\n // Attempt to rule out any potential country code ambiguity, if present.\n var exactCountry = getExactCountryForMultiCountryCallingCode(countryCallingCode, nationalSignificantNumber, this.metadata);\n if (exactCountry) {\n country = exactCountry;\n }\n }\n }\n var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n // Phone number extensions are not supported by \"As You Type\" formatter.\n return phoneNumber;\n }\n\n /**\n * Returns `true` if the phone number is \"possible\".\n * Is just a shortcut for `PhoneNumber.isPossible()`.\n * @return {boolean}\n */\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n var phoneNumber = this.getNumber();\n if (!phoneNumber) {\n return false;\n }\n return phoneNumber.isPossible();\n }\n\n /**\n * Returns `true` if the phone number is \"valid\".\n * Is just a shortcut for `PhoneNumber.isValid()`.\n * @return {boolean}\n */\n }, {\n key: \"isValid\",\n value: function isValid() {\n var phoneNumber = this.getNumber();\n if (!phoneNumber) {\n return false;\n }\n return phoneNumber.isValid();\n }\n\n /**\n * Checks if the phone number length is valid.\n * If it is, nothing is returned.\n * Otherwise, a rejection reason is returned.\n * @return {string?}\n */\n }, {\n key: \"validateLength\",\n value: function validateLength() {\n var _this$state4 = this.state,\n digits = _this$state4.digits,\n nationalSignificantNumber = _this$state4.nationalSignificantNumber;\n if (!digits) {\n return 'NOT_A_NUMBER';\n }\n if (!this.metadata.numberingPlan) {\n return 'INVALID_COUNTRY';\n }\n if (!nationalSignificantNumber) {\n return 'TOO_SHORT';\n }\n\n // `state.callingCode` and `state.country` are somewhat independent from one another\n // and there could be situations when one is defined but the other is not.\n // See the comment in `AsYouTypeState.js` for more info on when that is possible.\n // Here, it uses both: if `country` is defined then it will use that,\n // otherwise it will use `callingCode`.\n var result = checkNumberLength(nationalSignificantNumber, undefined, this.metadata);\n if (result !== 'IS_POSSIBLE') {\n return result;\n }\n }\n\n /**\n * @deprecated\n * This method is used in `react-phone-number-input/source/input-control.js`\n * in versions before `3.0.16`.\n */\n }, {\n key: \"getNationalNumber\",\n value: function getNationalNumber() {\n return this.state.nationalSignificantNumber;\n }\n\n /**\n * Returns the phone number characters entered by the user.\n * @return {string}\n */\n }, {\n key: \"getChars\",\n value: function getChars() {\n return (this.state.international ? '+' : '') + this.state.digits;\n }\n\n /**\n * Returns the template for the formatted phone number.\n * @return {string}\n */\n }, {\n key: \"getTemplate\",\n value: function getTemplate() {\n return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';\n }\n }]);\n}(); // In situations when multiple countries use the same calling code,\n// this function tells what exact country does a given national (significant) number belong to.\nexport { AsYouType as default };\nfunction getExactCountryForMultiCountryCallingCode(callingCode, nationalSignificantNumber, metadata) {\n var ambiguousCountries = metadata.getCountryCodesForCallingCode(callingCode);\n if (ambiguousCountries.length > 1) {\n return getCountryByNationalNumber(nationalSignificantNumber, ambiguousCountries, metadata.metadata);\n }\n}\n//# sourceMappingURL=AsYouType.js.map"],"ignoreList":[0],"mappings":";;;;;;;;;;AAAA,SAASS,EAAQ,GAAG;CAAE;CAA2B,OAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAU,GAAG;EAAE,OAAO,OAAOC;CAAG,IAAI,SAAU,GAAG;EAAE,OAAOA,KAAmB,OAAO,UAArB,cAA+BA,EAAE,gBAAgB,UAAUA,MAAM,OAAO,YAAY,WAAW,OAAOA;CAAG,GAAGD,EAAQC,CAAC;AAAG;AAC7T,SAASC,EAAe,GAAG,GAAG;CAAE,OAAOC,EAAgBC,CAAC,KAAKC,EAAsBD,GAAGE,CAAC,KAAKC,EAA4BH,GAAGE,CAAC,KAAKE,EAAiB;AAAG;AACrJ,SAASA,IAAmB;CAAE,MAAU,UAAU,2IAA2I;AAAG;AAChM,SAASD,EAA4B,GAAG,GAAG;CAAE,IAAIH,GAAG;EAAE,IAAgB,OAAOA,KAAnB,UAAsB,OAAOK,EAAkBL,GAAGM,CAAC;EAAG,IAAIC,IAAI,CAAC,EAAE,SAAS,KAAKP,CAAC,CAAC,CAAC,MAAM,GAAG,EAAE;EAAG,OAAoBO,MAAb,YAAkBP,EAAE,gBAAgB,IAAIA,EAAE,YAAY,OAAiBO,MAAV,SAAyBA,MAAV,QAAc,MAA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,CAACS,GACH,OAAO;IAQT,IAAIa,IAAS5D,EAAkB+C,GAA2B,KAAA,GAAW,KAAK,QAAQ;IAClF,IAAIa,MAAW,eACb,OAAOA;GAEX;EAOF;EAAG;GACD,KAAK;GACL,OAAO,WAA6B;IAClC,OAAO,KAAK,MAAM;GACpB;EAMF;EAAG;GACD,KAAK;GACL,OAAO,WAAoB;IACzB,QAAQ,KAAK,MAAM,gBAAgB,MAAM,MAAM,KAAK,MAAM;GAC5D;EAMF;EAAG;GACD,KAAK;GACL,OAAO,WAAuB;IAC5B,OAAO,KAAK,UAAU,YAAY,KAAK,KAAK,KAAK,KAAK,wBAAwB,KAAK;GACrF;EACF;CAAC,CAAC;AACJ,EAAE;AAGF,SAASH,EAA0C,GAAa,GAA2B,GAAU;CACnG,IAAII,IAAqB9B,EAAS,8BAA8BY,CAAW;CAC3E,IAAIkB,EAAmB,SAAS,GAC9B,OAAO5D,EAA2B8C,GAA2Bc,GAAoB9B,EAAS,QAAQ;AAEtG"}
package/dist/index356.js CHANGED
@@ -1,25 +1,9 @@
1
- //#region src/components/PhoneNumberInput/messages.ts
2
- var e = {
3
- en: {
4
- lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
5
- noMatches: "No matching countries",
6
- selectCountryLabel: "Select a country",
7
- selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
8
- },
9
- fr: {
10
- lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
11
- noMatches: "Aucun pays correspondant",
12
- selectCountryLabel: "Select a country",
13
- selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
14
- }
15
- };
16
- function t(t, n) {
17
- return {
18
- ...e[(Array.isArray(t) ? t : t ? [t] : []).map((e) => e.split("-")[0]?.toLowerCase()).find((t) => t && e[t]) ?? "en"] ?? e.en,
19
- ...n ?? {}
20
- };
1
+ import e from "./index312.js";
2
+ //#region ../../node_modules/libphonenumber-js/es6/getCountries.js
3
+ function t(t) {
4
+ return new e(t).getCountries();
21
5
  }
22
6
  //#endregion
23
- export { t as resolveMessages };
7
+ export { t as default };
24
8
 
25
9
  //# sourceMappingURL=index356.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index356.js","names":[],"sources":["../src/components/PhoneNumberInput/messages.ts"],"sourcesContent":["import type { PhoneNumberInputMessages } from \"./types\"\n\n\nconst MESSAGE_DICTIONARY: Record<string, PhoneNumberInputMessages> = {\n en: {\n lengthTooLong: (country) =>\n country ? `This number looks too long for ${country}.` : \"This number looks too long.\",\n noMatches: \"No matching countries\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n fr: {\n lengthTooLong: (country) =>\n country\n ? `This number looks too long for ${country}.`\n : \"This number looks too long.\",\n noMatches: \"Aucun pays correspondant\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n}\n\nexport function resolveMessages(\n locale: string | string[] | undefined,\n overrides?: Partial<PhoneNumberInputMessages>\n): PhoneNumberInputMessages {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : []\n const preferred = locales\n .map((entry) => entry.split(\"-\")[0]?.toLowerCase())\n .find((code) => code && MESSAGE_DICTIONARY[code])\n const base = MESSAGE_DICTIONARY[preferred ?? \"en\"] ?? MESSAGE_DICTIONARY.en\n return {\n ...base,\n ...(overrides ?? {}),\n }\n}\n\n"],"mappings":";AAGA,IAAM,IAA+D;CACnE,IAAI;EACF,gBAAgB,MACd,IAAU,kCAAkC,EAAQ,KAAK;EAC3D,WAAW;EACX,oBAAoB;EACpB,uBAAuB,MAAa,IAAU,GAAG,EAAQ,SAAS;CACpE;CACA,IAAI;EACF,gBAAgB,MACd,IACI,kCAAkC,EAAQ,KAC1C;EACN,WAAW;EACX,oBAAoB;EACpB,uBAAuB,MAAa,IAAU,GAAG,EAAQ,SAAS;CACpE;AACF;AAEA,SAAgB,EACd,GACA,GAC0B;CAM1B,OAAO;EACL,GAFW,GAJG,MAAM,QAAQ,CAAM,IAAI,IAAS,IAAS,CAAC,CAAM,IAAI,CAAC,EAAA,CAEnE,KAAK,MAAU,EAAM,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAClD,MAAM,MAAS,KAAQ,EAAmB,EACb,KAAa,SAAS,EAAmB;EAGvE,GAAI,KAAa,CAAC;CACpB;AACF"}
1
+ {"version":3,"file":"index356.js","names":["Metadata","getCountries","metadata"],"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"],"ignoreList":[0],"mappings":";;AACA,SAAwBC,EAAa,GAAU;CAC7C,OAAO,IAAID,EAASE,CAAQ,CAAC,CAAC,aAAa;AAC7C"}
package/dist/index357.js CHANGED
@@ -1,14 +1,10 @@
1
- import { getCountries as e } from "./index354.js";
2
- //#region src/components/PhoneNumberInput/countries.ts
3
- var t = /* @__PURE__ */ new Set([
4
- "IM",
5
- "GG",
6
- "JE"
7
- ]), n = e().filter((e) => !t.has(e));
8
- function r() {
9
- return n;
1
+ import e from "./index308.js";
2
+ import t from "./index347.js";
3
+ //#region ../../node_modules/libphonenumber-js/min/exports/validatePhoneNumberLength.js
4
+ function n() {
5
+ return e(t, arguments);
10
6
  }
11
7
  //#endregion
12
- export { r as getCountryList };
8
+ export { n as validatePhoneNumberLength };
13
9
 
14
10
  //# sourceMappingURL=index357.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index357.js","names":[],"sources":["../src/components/PhoneNumberInput/countries.ts"],"sourcesContent":["import { getCountries } from \"libphonenumber-js\"\nimport type { CountryCode } from \"libphonenumber-js\"\n\n\nconst EXCLUDED_COUNTRIES: CountryCode[] = [\"IM\", \"GG\", \"JE\"]\nconst EXCLUDED_SET = new Set(EXCLUDED_COUNTRIES)\n\nconst FILTERED_COUNTRIES = getCountries().filter((code) => !EXCLUDED_SET.has(code))\n\nexport function getCountryList(): CountryCode[] {\n return FILTERED_COUNTRIES\n}\n"],"mappings":";;AAKA,IAAM,oBAAe,IAAI,IAAI;CADc;CAAM;CAAM;AAC1B,CAAkB,GAEzC,IAAqB,EAAa,CAAC,CAAC,QAAQ,MAAS,CAAC,EAAa,IAAI,CAAI,CAAC;AAElF,SAAgB,IAAgC;CAC9C,OAAO;AACT"}
1
+ {"version":3,"file":"index357.js","names":["_validatePhoneNumberLength","withMetadataArgument","validatePhoneNumberLength$1","validatePhoneNumberLength"],"sources":["../../../node_modules/libphonenumber-js/min/exports/validatePhoneNumberLength.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\nimport { validatePhoneNumberLength as _validatePhoneNumberLength } from '../../core/index.js'\n\nexport function validatePhoneNumberLength() {\n\treturn withMetadataArgument(_validatePhoneNumberLength, arguments)\n}"],"ignoreList":[0],"mappings":";;;AAGA,SAAgBG,IAA4B;CAC3C,OAAOF,EAAqBD,GAA4B,SAAS;AAClE"}
package/dist/index358.js CHANGED
@@ -1,132 +1,11 @@
1
- import { getCountryCallingCode as e } from "./index355.js";
2
- import { getCountryList as t } from "./index357.js";
3
- var n = t(), r = /* @__PURE__ */ new Map(), i = "__default_locale__", a = Array.from(new Set(n.map((t) => e(t)))).sort((e, t) => t.length - e.length);
4
- a.reduce((e, t) => Math.max(e, t.length), 0);
5
- var o = [
6
- "0011",
7
- "001",
8
- "011",
9
- "00",
10
- "810"
11
- ];
12
- function s(e) {
13
- return e && n.includes(e) ? e : "US";
14
- }
15
- function c(e) {
16
- if (typeof Intl > "u" || Intl.DisplayNames === void 0) return null;
17
- try {
18
- let t = Array.isArray(e) ? e : e ? [e] : void 0;
19
- return new Intl.DisplayNames(t, { type: "region" });
20
- } catch {
21
- return null;
22
- }
23
- }
24
- function l(t) {
25
- let r = c(t), i = c("en");
26
- return n.map((t) => {
27
- let n = e(t), a = r?.of(t) ?? i?.of(t) ?? t, o = i?.of(t) ?? a, s = x(t), c = Array.from(new Set([
28
- a,
29
- o,
30
- t.toUpperCase(),
31
- t.toLowerCase(),
32
- ...s
33
- ].filter(Boolean)));
34
- return {
35
- value: t,
36
- name: a,
37
- dialCode: n,
38
- label: `${a} (+${n})`,
39
- flag: g(t),
40
- searchableTokens: c,
41
- normalizedSearchableTokens: c.map((e) => y(e))
42
- };
43
- }).sort((e, t) => {
44
- let n = u(e.value), r = u(t.value);
45
- return n === r ? e.name.localeCompare(t.name) : n - r;
46
- });
47
- }
48
- function u(t) {
49
- return t === "US" ? 0 : t === "CA" ? 1 : e(t) === "1" ? 2 : 3;
50
- }
51
- function d(e) {
52
- return e ? Array.isArray(e) ? e.join("\0") : e : i;
53
- }
54
- function f(e) {
55
- if (e !== i) {
56
- if (e.includes("\0")) {
57
- let t = e.split("\0").filter(Boolean);
58
- return t.length === 0 ? void 0 : t.length === 1 ? t[0] ?? void 0 : t;
59
- }
60
- return e;
61
- }
62
- }
63
- function p(e, t) {
64
- let n = r.get(t);
65
- if (n) return n;
66
- let i = l(e);
67
- return r.set(t, i), i;
68
- }
69
- function m(e) {
70
- return {
71
- code: e.value,
72
- name: e.name,
73
- dialCode: e.dialCode,
74
- flag: e.flag
75
- };
76
- }
77
- function h(t) {
78
- return {
79
- code: t,
80
- name: t,
81
- dialCode: e(t),
82
- flag: g(t)
83
- };
84
- }
85
- function g(e) {
86
- let t = e?.toUpperCase();
87
- if (!t || t.length !== 2 || /[^A-Z]/.test(t)) return "";
88
- let n = 127397;
89
- return String.fromCodePoint(t.charCodeAt(0) + n, t.charCodeAt(1) + n);
90
- }
91
- var _ = /[\u0300-\u036f]/g;
92
- function v(e) {
93
- return e.normalize("NFD").replace(_, "");
94
- }
95
- function y(e) {
96
- return v(e).toLowerCase();
97
- }
98
- function b(e, t) {
99
- let n = 2 ** 53 - 1;
100
- for (let r of e) {
101
- let e = r.indexOf(t);
102
- e >= 0 && e < n && (n = e);
103
- }
104
- return n === 2 ** 53 - 1 ? 2 ** 53 - 1 : n;
105
- }
106
- function x(e) {
107
- switch (e) {
108
- case "US": return [
109
- "USA",
110
- "United States",
111
- "America",
112
- "United States of America"
113
- ];
114
- case "GB": return [
115
- "UK",
116
- "United Kingdom",
117
- "Great Britain",
118
- "England"
119
- ];
120
- case "AE": return ["UAE", "United Arab Emirates"];
121
- case "KR": return ["South Korea", "Korea"];
122
- case "CN": return ["China", "PRC"];
123
- case "CD": return ["DRC", "Congo-Kinshasa"];
124
- case "CG": return ["Congo-Brazzaville"];
125
- case "BR": return ["Brazil"];
126
- default: return [];
127
- }
1
+ import e from "./index307.js";
2
+ import t from "./index355.js";
3
+ //#region ../../node_modules/libphonenumber-js/min/exports/AsYouType.js
4
+ function n(n) {
5
+ return t.call(this, n, e);
128
6
  }
7
+ n.prototype = Object.create(t.prototype, {}), n.prototype.constructor = n;
129
8
  //#endregion
130
- export { o as COMMON_IDD_PREFIXES, a as COUNTRY_DIAL_CODES, h as buildFallbackSelectedCountry, p as getCachedCountryOptions, d as getLocaleCacheKey, s as getValidCountry, y as normalizeSearchValue, b as optionMatchIndex, f as parseLocaleCacheKey, m as toSelectedCountry };
9
+ export { n as AsYouType };
131
10
 
132
11
  //# sourceMappingURL=index358.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index358.js","names":[],"sources":["../src/components/PhoneNumberInput/country-options.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\n\nimport type { CountryOption, PhoneNumberSelectedCountry } from \"./types\"\nimport { getCountryList } from \"./countries\"\n\n\nexport const DEFAULT_COUNTRY: CountryCode = \"US\"\nconst COUNTRY_OPTIONS = getCountryList()\n\nconst COUNTRY_OPTIONS_CACHE = new Map<string, CountryOption[]>()\nconst DEFAULT_LOCALE_CACHE_KEY = \"__default_locale__\"\nexport const COUNTRY_DIAL_CODES = Array.from(\n new Set(COUNTRY_OPTIONS.map((code) => getCountryCallingCode(code)))\n).sort((a, b) => b.length - a.length)\nexport const MAX_DIAL_CODE_LENGTH = COUNTRY_DIAL_CODES.reduce(\n (max, dial) => Math.max(max, dial.length),\n 0\n)\nexport const COMMON_IDD_PREFIXES = [\"0011\", \"001\", \"011\", \"00\", \"810\"]\n\nexport function getValidCountry(input: CountryCode | undefined) {\n if (!input) {\n return DEFAULT_COUNTRY\n }\n\n return COUNTRY_OPTIONS.includes(input) ? input : DEFAULT_COUNTRY\n}\n\nfunction createDisplayNames(locale?: string | string[]) {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") {\n return null\n }\n\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type: \"region\" })\n } catch {\n return null\n }\n}\n\nfunction buildCountryOptions(locale?: string | string[]) {\n const displayNames = createDisplayNames(locale)\n const englishDisplayNames = createDisplayNames(\"en\")\n\n return COUNTRY_OPTIONS\n .map((country) => {\n const dialCode = getCountryCallingCode(country)\n const localizedName = displayNames?.of(country) ?? englishDisplayNames?.of(country) ?? country\n const englishName = englishDisplayNames?.of(country) ?? localizedName\n const aliasTokens = getCountryAliases(country)\n const searchableTokens = Array.from(\n new Set(\n [localizedName, englishName, country.toUpperCase(), country.toLowerCase(), ...aliasTokens].filter(\n Boolean\n )\n )\n ) as string[]\n return {\n value: country,\n name: localizedName,\n dialCode,\n label: `${localizedName} (+${dialCode})`,\n flag: countryCodeToFlagEmoji(country),\n searchableTokens,\n normalizedSearchableTokens: searchableTokens.map((token) => normalizeSearchValue(token)),\n }\n })\n .sort((a, b) => {\n const priorityA = getCountryPriority(a.value)\n const priorityB = getCountryPriority(b.value)\n if (priorityA !== priorityB) {\n return priorityA - priorityB\n }\n return a.name.localeCompare(b.name)\n })\n}\n\nfunction getCountryPriority(code: CountryCode) {\n if (code === \"US\") return 0\n if (code === \"CA\") return 1\n if (getCountryCallingCode(code) === \"1\") return 2\n return 3\n}\n\nexport function getLocaleCacheKey(locale?: string | string[]) {\n if (!locale) {\n return DEFAULT_LOCALE_CACHE_KEY\n }\n if (Array.isArray(locale)) {\n return locale.join(\"\\u0000\")\n }\n return locale\n}\n\nexport function parseLocaleCacheKey(cacheKey: string): string | string[] | undefined {\n if (cacheKey === DEFAULT_LOCALE_CACHE_KEY) {\n return undefined\n }\n\n if (cacheKey.includes(\"\\u0000\")) {\n const parts = cacheKey.split(\"\\u0000\").filter(Boolean)\n if (parts.length === 0) {\n return undefined\n }\n if (parts.length === 1) {\n return parts[0] ?? undefined\n }\n return parts\n }\n\n return cacheKey\n}\n\nexport function getCachedCountryOptions(locale: string | string[] | undefined, cacheKey: string) {\n const cached = COUNTRY_OPTIONS_CACHE.get(cacheKey)\n if (cached) {\n return cached\n }\n const built = buildCountryOptions(locale)\n COUNTRY_OPTIONS_CACHE.set(cacheKey, built)\n return built\n}\n\nexport function toSelectedCountry(option: CountryOption): PhoneNumberSelectedCountry {\n return {\n code: option.value,\n name: option.name,\n dialCode: option.dialCode,\n flag: option.flag,\n }\n}\n\nexport function buildFallbackSelectedCountry(country: CountryCode): PhoneNumberSelectedCountry {\n return {\n code: country,\n name: country,\n dialCode: getCountryCallingCode(country),\n flag: countryCodeToFlagEmoji(country),\n }\n}\n\nfunction countryCodeToFlagEmoji(country: CountryCode) {\n const upper = country?.toUpperCase()\n\n if (!upper || upper.length !== 2 || /[^A-Z]/.test(upper)) {\n return \"\"\n }\n\n const base = 127397\n return String.fromCodePoint(\n upper.charCodeAt(0) + base,\n upper.charCodeAt(1) + base\n )\n}\n\nconst DIACRITICS_REGEX = /[\\u0300-\\u036f]/g\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(DIACRITICS_REGEX, \"\")\n}\n\nexport function normalizeSearchValue(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nexport function optionMatchIndex(tokens: string[], query: string) {\n let best = Number.MAX_SAFE_INTEGER\n for (const token of tokens) {\n const index = token.indexOf(query)\n if (index >= 0 && index < best) {\n best = index\n }\n }\n return best === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : best\n}\n\nfunction getCountryAliases(code: CountryCode): string[] {\n switch (code) {\n case \"US\":\n return [\"USA\", \"United States\", \"America\", \"United States of America\"]\n case \"GB\":\n return [\"UK\", \"United Kingdom\", \"Great Britain\", \"England\"]\n case \"AE\":\n return [\"UAE\", \"United Arab Emirates\"]\n case \"KR\":\n return [\"South Korea\", \"Korea\"]\n case \"CN\":\n return [\"China\", \"PRC\"]\n case \"CD\":\n return [\"DRC\", \"Congo-Kinshasa\"]\n case \"CG\":\n return [\"Congo-Brazzaville\"]\n case \"BR\":\n return [\"Brazil\"]\n default:\n return []\n }\n}\n\n"],"mappings":";;AAQA,IAAM,IAAkB,EAAe,GAEjC,oBAAwB,IAAI,IAA6B,GACzD,IAA2B,sBACpB,IAAqB,MAAM,KACtC,IAAI,IAAI,EAAgB,KAAK,MAAS,EAAsB,CAAI,CAAC,CAAC,CACpE,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM;AACA,EAAmB,QACpD,GAAK,MAAS,KAAK,IAAI,GAAK,EAAK,MAAM,GACxC,CACF;AACA,IAAa,IAAsB;CAAC;CAAQ;CAAO;CAAO;CAAM;AAAK;AAErE,SAAgB,EAAgB,GAAgC;CAK9D,OAJK,KAIE,EAAgB,SAAS,CAAK,IAAI,IAAA;AAC3C;AAEA,SAAS,EAAmB,GAA4B;CACtD,IAAI,OAAO,OAAS,OAAsB,KAAK,iBAAiB,QAC9D,OAAO;CAGT,IAAI;EACF,IAAM,IAAU,MAAM,QAAQ,CAAM,IAAI,IAAS,IAAS,CAAC,CAAM,IAAI,KAAA;EACrE,OAAO,IAAI,KAAK,aAAa,GAAS,EAAE,MAAM,SAAS,CAAC;CAC1D,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,EAAoB,GAA4B;CACvD,IAAM,IAAe,EAAmB,CAAM,GACxC,IAAsB,EAAmB,IAAI;CAEnD,OAAO,EACJ,KAAK,MAAY;EAChB,IAA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BAAgB;EACjC,KAAK,MACH,OAAO,CAAC,mBAAmB;EAC7B,KAAK,MACH,OAAO,CAAC,QAAQ;EAClB,SACE,OAAO,CAAC;CACV;AACF"}
1
+ {"version":3,"file":"index358.js","names":["_AsYouType","metadata","metadata_min_json_default","AsYouType$1","AsYouType","country"],"sources":["../../../node_modules/libphonenumber-js/min/exports/AsYouType.js"],"sourcesContent":["// Importing from a \".js\" file is a workaround for Node.js \"ES Modules\"\n// importing system which is even uncapable of importing \"*.json\" files.\nimport metadata from '../../metadata.min.json.js'\n\nimport { AsYouType as _AsYouType } from '../../core/index.js'\n\nexport function AsYouType(country) {\n\treturn _AsYouType.call(this, country, metadata)\n}\n\nAsYouType.prototype = Object.create(_AsYouType.prototype, {})\nAsYouType.prototype.constructor = AsYouType"],"ignoreList":[0],"mappings":";;;AAMA,SAAgBI,EAAU,GAAS;CAClC,OAAOJ,EAAW,KAAK,MAAMK,GAASJ,CAAQ;AAC/C;AAEA,EAAU,YAAY,OAAO,OAAOD,EAAW,WAAW,CAAC,CAAC,GAC5D,EAAU,UAAU,cAAcI"}
package/dist/index359.js CHANGED
@@ -1,46 +1,10 @@
1
- import { validatePhoneNumberLength as e } from "./index352.js";
2
- import { AsYouType as t } from "./index353.js";
3
- //#region src/components/PhoneNumberInput/normalization.ts
4
- function n(e) {
5
- return e.replace(/\D/g, "");
6
- }
7
- var r = {
8
- GG: "GB",
9
- JE: "GB",
10
- IM: "GB"
11
- };
12
- function i(e) {
13
- if (e) return r[e] ?? e;
14
- }
15
- function a(e, r) {
16
- if (e === "+") return {
17
- international: "+",
18
- national: "",
19
- formatted: "+",
20
- phoneNumber: null,
21
- detectedCountry: void 0
22
- };
23
- let a = r ? new t(r) : new t(), o = a.input(e), s = a.getNumber(), c = i(s?.country ?? a.country ?? void 0), l = s?.formatInternational() ?? o;
24
- return {
25
- international: l,
26
- national: s?.formatNational() ?? n(l),
27
- formatted: o,
28
- phoneNumber: s,
29
- detectedCountry: c
30
- };
31
- }
32
- function o(e, t) {
33
- return e.startsWith(t) ? e.slice(t.length) : e;
34
- }
35
- function s(t, n) {
36
- if (!n || !t) return null;
37
- try {
38
- return e(t, n) === "TOO_LONG" ? "TOO_LONG" : null;
39
- } catch {
40
- return null;
41
- }
1
+ import e from "./index308.js";
2
+ import t from "./index356.js";
3
+ //#region ../../node_modules/libphonenumber-js/min/exports/getCountries.js
4
+ function n() {
5
+ return e(t, arguments);
42
6
  }
43
7
  //#endregion
44
- export { a as formatWithAsYouType, s as getLengthIssue, n as sanitizeDigits, o as stripPrefix };
8
+ export { n as getCountries };
45
9
 
46
10
  //# sourceMappingURL=index359.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index359.js","names":[],"sources":["../src/components/PhoneNumberInput/normalization.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { AsYouType, validatePhoneNumberLength } from \"libphonenumber-js\"\n\n\nexport type LengthIssue = \"TOO_LONG\"\n\nexport function sanitizeDigits(value: string) {\n return value.replace(/\\D/g, \"\")\n}\n\nconst DETECTED_COUNTRY_OVERRIDES: Partial<Record<CountryCode, CountryCode>> = {\n GG: \"GB\",\n JE: \"GB\",\n IM: \"GB\",\n}\n\nfunction canonicalizeDetectedCountry(candidate: CountryCode | undefined): CountryCode | undefined {\n if (!candidate) {\n return undefined\n }\n return DETECTED_COUNTRY_OVERRIDES[candidate] ?? candidate\n}\n\nexport function formatWithAsYouType(value: string, baseCountry?: CountryCode) {\n if (value === \"+\") {\n return {\n international: \"+\",\n national: \"\",\n formatted: \"+\",\n phoneNumber: null,\n detectedCountry: undefined,\n }\n }\n\n const formatter = baseCountry ? new AsYouType(baseCountry) : new AsYouType()\n const formatted = formatter.input(value)\n const phoneNumber = formatter.getNumber()\n const detectedCountry = canonicalizeDetectedCountry(\n (phoneNumber?.country ?? formatter.country ?? undefined) as CountryCode | undefined\n )\n const international = phoneNumber?.formatInternational() ?? formatted\n const national = phoneNumber?.formatNational() ?? sanitizeDigits(international)\n\n return {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n }\n}\n\nexport function stripPrefix(value: string, prefix: string) {\n return value.startsWith(prefix) ? value.slice(prefix.length) : value\n}\n\nexport function getLengthIssue(value: string, country: CountryCode | undefined): LengthIssue | null {\n if (!country || !value) {\n return null\n }\n\n try {\n const result = validatePhoneNumberLength(value, country)\n return result === \"TOO_LONG\" ? \"TOO_LONG\" : null\n } catch {\n return null\n }\n}\n"],"mappings":";;;AAMA,SAAgB,EAAe,GAAe;CAC5C,OAAO,EAAM,QAAQ,OAAO,EAAE;AAChC;AAEA,IAAM,IAAwE;CAC5E,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,SAAS,EAA4B,GAA6D;CAC3F,OAGL,OAAO,EAA2B,MAAc;AAClD;AAEA,SAAgB,EAAoB,GAAe,GAA2B;CAC5E,IAAI,MAAU,KACZ,OAAO;EACL,eAAe;EACf,UAAU;EACV,WAAW;EACX,aAAa;EACb,iBAAiB,KAAA;CACnB;CAGF,IAAM,IAAY,IAAc,IAAI,EAAU,CAAW,IAAI,IAAI,EAAU,GACrE,IAAY,EAAU,MAAM,CAAK,GACjC,IAAc,EAAU,UAAU,GAClC,IAAkB,EACrB,GAAa,WAAW,EAAU,WAAW,KAAA,CAChD,GACM,IAAgB,GAAa,oBAAoB,KAAK;CAG5D,OAAO;EACL;EACA,UAJe,GAAa,eAAe,KAAK,EAAe,CAAa;EAK5E;EACA;EACA;CACF;AACF;AAEA,SAAgB,EAAY,GAAe,GAAgB;CACzD,OAAO,EAAM,WAAW,CAAM,IAAI,EAAM,MAAM,EAAO,MAAM,IAAI;AACjE;AAEA,SAAgB,EAAe,GAAe,GAAsD;CAClG,IAAI,CAAC,KAAW,CAAC,GACf,OAAO;CAGT,IAAI;EAEF,OADe,EAA0B,GAAO,CACzC,MAAW,aAAa,aAAa;CAC9C,QAAQ;EACN,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"index359.js","names":["_getCountries","withMetadataArgument","getCountries$1","getCountries"],"sources":["../../../node_modules/libphonenumber-js/min/exports/getCountries.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\nimport { getCountries as _getCountries } from '../../core/index.js'\n\nexport function getCountries() {\n\treturn withMetadataArgument(_getCountries, arguments)\n}"],"ignoreList":[0],"mappings":";;;AAGA,SAAgBG,IAAe;CAC9B,OAAOF,EAAqBD,GAAe,SAAS;AACrD"}
package/dist/index36.js CHANGED
@@ -1,12 +1,17 @@
1
1
  import { constructFrom as e } from "./index24.js";
2
- import t from "./index30.js";
3
- import n from "./index31.js";
4
- //#region ../../node_modules/date-fns/startOfISOWeekYear.js
5
- function r(r, i) {
6
- let a = n(r, i), o = e(i?.in || r, 0);
7
- return o.setFullYear(a, 0, 4), o.setHours(0, 0, 0, 0), t(o);
2
+ import { normalizeInterval as t } from "./index35.js";
3
+ //#region ../../node_modules/date-fns/eachMonthOfInterval.js
4
+ function n(n, r) {
5
+ let { start: i, end: a } = t(r?.in, n), o = +i > +a, s = o ? +i : +a, c = o ? a : i;
6
+ c.setHours(0, 0, 0, 0), c.setDate(1);
7
+ let l = r?.step ?? 1;
8
+ if (!l) return [];
9
+ l < 0 && (l = -l, o = !o);
10
+ let u = [];
11
+ for (; +c <= s;) u.push(e(i, c)), c.setMonth(c.getMonth() + l);
12
+ return o ? u.reverse() : u;
8
13
  }
9
14
  //#endregion
10
- export { r as default, r as startOfISOWeekYear };
15
+ export { n as default, n as eachMonthOfInterval };
11
16
 
12
17
  //# sourceMappingURL=index36.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index36.js","names":[],"sources":["../../../node_modules/date-fns/startOfISOWeekYear.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n"],"x_google_ignoreList":[0],"mappings":";;;;AAiCA,SAAgB,EAAmB,GAAM,GAAS;CAChD,IAAM,IAAO,EAAe,GAAM,CAAO,GACnC,IAAkB,EAAc,GAAS,MAAM,GAAM,CAAC;CAG5D,OAFA,EAAgB,YAAY,GAAM,GAAG,CAAC,GACtC,EAAgB,SAAS,GAAG,GAAG,GAAG,CAAC,GAC5B,EAAe,CAAe;AACvC"}
1
+ {"version":3,"file":"index36.js","names":["eachMonthOfInterval","normalizeInterval","options","interval","reversed","start","end","endTime","date","step","dates","constructFrom"],"sources":["../../../node_modules/date-fns/eachMonthOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setMonth(date.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n"],"ignoreList":[0],"mappings":";;;AA2CA,SAAgBA,EAAoB,GAAU,GAAS;CACrD,IAAM,EAAE,UAAO,WAAQC,EAAkBC,GAAS,IAAIC,CAAQ,GAE1DC,IAAW,CAACC,IAAQ,CAACC,GACnBC,IAAUH,IAAW,CAACC,IAAQ,CAACC,GAC/BE,IAAOJ,IAAWE,IAAMD;CAE9B,AADAG,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,QAAQ,CAAC;CAEd,IAAIC,IAAOP,GAAS,QAAQ;CAC5B,IAAI,CAACO,GAAM,OAAO,CAAC;CACnB,AAAIA,IAAO,MACT,IAAO,CAACA,GACR,IAAW,CAACL;CAGd,IAAMM,IAAQ,CAAC;CAEf,OAAO,CAACF,KAAQD,IAEd,AADAG,EAAM,KAAKC,EAAcN,GAAOG,CAAI,CAAC,GACrCA,EAAK,SAASA,EAAK,SAAS,IAAIC,CAAI;CAGtC,OAAOL,IAAWM,EAAM,QAAQ,IAAIA;AACtC"}
package/dist/index360.js CHANGED
@@ -1,72 +1,10 @@
1
- //#region src/components/PhoneNumberInput/selection.ts
2
- function e(e) {
3
- if (!e) return !1;
4
- let t = e.charCodeAt(0);
5
- return t >= 48 && t <= 57;
6
- }
7
- function t(t, n) {
8
- let r = 0, i = Math.min(n, t.length);
9
- for (let n = 0; n < i; n += 1) e(t[n] ?? "") && (r += 1);
10
- return r;
11
- }
12
- function n(t, n) {
13
- if (n <= 0) return t.startsWith("+") ? Math.min(1, t.length) : 0;
14
- let r = 0;
15
- for (let i = 0; i < t.length; i += 1) if (e(t[i] ?? "") && (r += 1, r === n)) return i + 1;
16
- return t.length;
17
- }
18
- function r(t) {
19
- return !t || e(t) ? !1 : t !== "+";
20
- }
21
- function i(e, t) {
22
- let n = t;
23
- for (; n > 0 && r(e[n - 1] ?? "");) --n;
24
- return n;
25
- }
26
- function a(e, t) {
27
- let n = t;
28
- for (; n < e.length && r(e[n] ?? "");) n += 1;
29
- return n;
30
- }
31
- function o(e) {
32
- let { value: n } = e, r = e.selectionStart ?? n.length, i = e.selectionEnd ?? r, a = r <= 1 && n.startsWith("+"), o = i <= 1 && n.startsWith("+");
33
- return {
34
- selectionStart: r,
35
- selectionEnd: i,
36
- startDigits: t(n, r),
37
- endDigits: t(n, i),
38
- preserveStartIndex: a,
39
- preserveEndIndex: o,
40
- wasAtStart: r === 0,
41
- wasAtEnd: i === n.length
42
- };
43
- }
44
- function s(e, t) {
45
- if (e.selectionStart === e.selectionEnd) {
46
- if (e.wasAtEnd) {
47
- let e = t.length;
48
- return {
49
- start: e,
50
- end: e
51
- };
52
- }
53
- if (e.wasAtStart) return {
54
- start: 0,
55
- end: 0
56
- };
57
- }
58
- let r = e.preserveStartIndex ? Math.min(e.selectionStart, t.length) : n(t, e.startDigits), i = e.preserveEndIndex ? Math.min(e.selectionEnd, t.length) : n(t, e.endDigits), a = r, o = i;
59
- e.wasAtStart && (a = 0), e.wasAtEnd && (o = t.length), e.selectionStart === e.selectionEnd && (a = o);
60
- let s = Math.min(Math.max(a, 0), t.length), c = Math.min(Math.max(o, 0), t.length);
61
- return s > c ? {
62
- start: c,
63
- end: c
64
- } : {
65
- start: s,
66
- end: c
67
- };
1
+ import e from "./index308.js";
2
+ import { getCountryCallingCode as t } from "./index312.js";
3
+ //#region ../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js
4
+ function n() {
5
+ return e(t, arguments);
68
6
  }
69
7
  //#endregion
70
- export { o as captureSelectionSnapshot, s as resolveSelection, i as skipFormattingCharactersLeft, a as skipFormattingCharactersRight };
8
+ export { n as getCountryCallingCode };
71
9
 
72
10
  //# sourceMappingURL=index360.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index360.js","names":[],"sources":["../src/components/PhoneNumberInput/selection.ts"],"sourcesContent":["function isDigitCharacter(char: string) {\n if (!char) {\n return false\n }\n const code = char.charCodeAt(0)\n return code >= 48 && code <= 57\n}\n\nfunction countDigitsBefore(value: string, index: number) {\n let count = 0\n const limit = Math.min(index, value.length)\n for (let position = 0; position < limit; position += 1) {\n if (isDigitCharacter(value[position] ?? \"\")) {\n count += 1\n }\n }\n return count\n}\n\nfunction findIndexForDigitCount(value: string, digitCount: number) {\n if (digitCount <= 0) {\n return value.startsWith(\"+\") ? Math.min(1, value.length) : 0\n }\n\n let seen = 0\n for (let index = 0; index < value.length; index += 1) {\n if (isDigitCharacter(value[index] ?? \"\")) {\n seen += 1\n if (seen === digitCount) {\n return index + 1\n }\n }\n }\n\n return value.length\n}\n\nfunction isFormattingCharacter(char: string) {\n if (!char) {\n return false\n }\n if (isDigitCharacter(char)) {\n return false\n }\n return char !== \"+\"\n}\n\nexport function skipFormattingCharactersLeft(value: string, index: number) {\n let position = index\n while (position > 0) {\n const next = value[position - 1] ?? \"\"\n if (!isFormattingCharacter(next)) {\n break\n }\n position -= 1\n }\n return position\n}\n\nexport function skipFormattingCharactersRight(value: string, index: number) {\n let position = index\n while (position < value.length) {\n const next = value[position] ?? \"\"\n if (!isFormattingCharacter(next)) {\n break\n }\n position += 1\n }\n return position\n}\n\ntype SelectionSnapshot = {\n selectionStart: number\n selectionEnd: number\n startDigits: number\n endDigits: number\n preserveStartIndex: boolean\n preserveEndIndex: boolean\n wasAtStart: boolean\n wasAtEnd: boolean\n}\n\nexport function captureSelectionSnapshot(input: HTMLInputElement): SelectionSnapshot {\n const { value } = input\n const selectionStart = input.selectionStart ?? value.length\n const selectionEnd = input.selectionEnd ?? selectionStart\n const preserveStartIndex = selectionStart <= 1 && value.startsWith(\"+\")\n const preserveEndIndex = selectionEnd <= 1 && value.startsWith(\"+\")\n\n return {\n selectionStart,\n selectionEnd,\n startDigits: countDigitsBefore(value, selectionStart),\n endDigits: countDigitsBefore(value, selectionEnd),\n preserveStartIndex,\n preserveEndIndex,\n wasAtStart: selectionStart === 0,\n wasAtEnd: selectionEnd === value.length,\n }\n}\n\nexport function resolveSelection(snapshot: SelectionSnapshot, value: string) {\n if (snapshot.selectionStart === snapshot.selectionEnd) {\n if (snapshot.wasAtEnd) {\n const end = value.length\n return { start: end, end }\n }\n if (snapshot.wasAtStart) {\n return { start: 0, end: 0 }\n }\n }\n\n const start = snapshot.preserveStartIndex\n ? Math.min(snapshot.selectionStart, value.length)\n : findIndexForDigitCount(value, snapshot.startDigits)\n const end = snapshot.preserveEndIndex\n ? Math.min(snapshot.selectionEnd, value.length)\n : findIndexForDigitCount(value, snapshot.endDigits)\n\n let resolvedStart = start\n let resolvedEnd = end\n\n if (snapshot.wasAtStart) {\n resolvedStart = 0\n }\n\n if (snapshot.wasAtEnd) {\n resolvedEnd = value.length\n }\n\n if (snapshot.selectionStart === snapshot.selectionEnd) {\n resolvedStart = resolvedEnd\n }\n\n const clampedStart = Math.min(Math.max(resolvedStart, 0), value.length)\n const clampedEnd = Math.min(Math.max(resolvedEnd, 0), value.length)\n\n if (clampedStart > clampedEnd) {\n return { start: clampedEnd, end: clampedEnd }\n }\n\n return { start: clampedStart, end: clampedEnd }\n}\n\n"],"mappings":";AAAA,SAAS,EAAiB,GAAc;CACtC,IAAI,CAAC,GACH,OAAO;CAET,IAAM,IAAO,EAAK,WAAW,CAAC;CAC9B,OAAO,KAAQ,MAAM,KAAQ;AAC/B;AAEA,SAAS,EAAkB,GAAe,GAAe;CACvD,IAAI,IAAQ,GACN,IAAQ,KAAK,IAAI,GAAO,EAAM,MAAM;CAC1C,KAAK,IAAI,IAAW,GAAG,IAAW,GAAO,KAAY,GACnD,AAAI,EAAiB,EAAM,MAAa,EAAE,MACxC,KAAS;CAGb,OAAO;AACT;AAEA,SAAS,EAAuB,GAAe,GAAoB;CACjE,IAAI,KAAc,GAChB,OAAO,EAAM,WAAW,GAAG,IAAI,KAAK,IAAI,GAAG,EAAM,MAAM,IAAI;CAG7D,IAAI,IAAO;CACX,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAM,QAAQ,KAAS,GACjD,IAAI,EAAiB,EAAM,MAAU,EAAE,MACrC,KAAQ,GACJ,MAAS,IACX,OAAO,IAAQ;CAKrB,OAAO,EAAM;AACf;AAEA,SAAS,EAAsB,GAAc;CAO3C,OANI,CAAC,KAGD,EAAiB,CAAI,IAChB,KAEF,MAAS;AAClB;AAEA,SAAgB,EAA6B,GAAe,GAAe;CACzE,IAAI,IAAW;CACf,OAAO,IAAW,KAEX,EADQ,EAAM,IAAW,MAAM,EACL,IAG/B;CAEF,OAAO;AACT;AAEA,SAAgB,EAA8B,GAAe,GAAe;CAC1E,IAAI,IAAW;CACf,OAAO,IAAW,EAAM,UAEjB,EADQ,EAAM,MAAa,EACD,IAG/B,KAAY;CAEd,OAAO;AACT;AAaA,SAAgB,EAAyB,GAA4C;CACnF,IAAM,EAAE,aAAU,GACZ,IAAiB,EAAM,kBAAkB,EAAM,QAC/C,IAAe,EAAM,gBAAgB,GACrC,IAAqB,KAAkB,KAAK,EAAM,WAAW,GAAG,GAChE,IAAmB,KAAgB,KAAK,EAAM,WAAW,GAAG;CAElE,OAAO;EACL;EACA;EACA,aAAa,EAAkB,GAAO,CAAc;EACpD,WAAW,EAAkB,GAAO,CAAY;EAChD;EACA;EACA,YAAY,MAAmB;EAC/B,UAAU,MAAiB,EAAM;CACnC;AACF;AAEA,SAAgB,EAAiB,GAA6B,GAAe;CAC3E,IAAI,EAAS,mBAAmB,EAAS,cAAc;EACrD,IAAI,EAAS,UAAU;GACrB,IAAM,IAAM,EAAM;GAClB,OAAO;IAAE,OAAO;IAAK;GAAI;EAC3B;EACA,IAAI,EAAS,YACX,OAAO;GAAE,OAAO;GAAG,KAAK;EAAE;CAE9B;CAEA,IAAM,IAAQ,EAAS,qBACnB,KAAK,IAAI,EAAS,gBAAgB,EAAM,MAAM,IAC9C,EAAuB,GAAO,EAAS,WAAW,GAChD,IAAM,EAAS,mBACjB,KAAK,IAAI,EAAS,cAAc,EAAM,MAAM,IAC5C,EAAuB,GAAO,EAAS,SAAS,GAEhD,IAAgB,GAChB,IAAc;CAUlB,AARI,EAAS,eACX,IAAgB,IAGd,EAAS,aACX,IAAc,EAAM,SAGlB,EAAS,mBAAmB,EAAS,iBACvC,IAAgB;CAGlB,IAAM,IAAe,KAAK,IAAI,KAAK,IAAI,GAAe,CAAC,GAAG,EAAM,MAAM,GAChE,IAAa,KAAK,IAAI,KAAK,IAAI,GAAa,CAAC,GAAG,EAAM,MAAM;CAMlE,OAJI,IAAe,IACV;EAAE,OAAO;EAAY,KAAK;CAAW,IAGvC;EAAE,OAAO;EAAc,KAAK;CAAW;AAChD"}
1
+ {"version":3,"file":"index360.js","names":["_getCountryCallingCode","withMetadataArgument","getCountryCallingCode$1","getCountryCallingCode"],"sources":["../../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\nimport { getCountryCallingCode as _getCountryCallingCode } from '../../core/index.js'\n\nexport function getCountryCallingCode() {\n\treturn withMetadataArgument(_getCountryCallingCode, arguments)\n}"],"ignoreList":[0],"mappings":";;;AAGA,SAAgBG,IAAwB;CACvC,OAAOF,EAAqBD,GAAwB,SAAS;AAC9D"}