@rpcbase/ui 0.181.0 → 0.183.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 (618) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.d.ts.map +1 -1
  3. package/dist/helpers/useScrollPagination.d.ts +23 -0
  4. package/dist/helpers/useScrollPagination.d.ts.map +1 -0
  5. package/dist/helpers/useScrollPagination.test.d.ts +2 -0
  6. package/dist/helpers/useScrollPagination.test.d.ts.map +1 -0
  7. package/dist/index.js +62 -60
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +23 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +5 -4
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +3 -3
  14. package/dist/index101.js.map +1 -1
  15. package/dist/index102.js +4 -6
  16. package/dist/index102.js.map +1 -1
  17. package/dist/index103.js +6 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +144 -38
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +39 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +4 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +6 -12
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +13 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +13 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +62 -544
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +6 -30
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +31 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +10 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +10 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +8 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +13 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +102 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +20 -54
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +51 -70
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +72 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +535 -110
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +9 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +20 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +16 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +23 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +6 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +5 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +24 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +35 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +16 -7
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +6 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +122 -71
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +4 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +4 -4
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +4 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +4 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +3 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +7 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +24 -8
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +7 -6
  92. package/dist/index137.js.map +1 -1
  93. package/dist/index138.js +6 -5
  94. package/dist/index138.js.map +1 -1
  95. package/dist/index139.js +5 -3
  96. package/dist/index139.js.map +1 -1
  97. package/dist/index14.js +61 -717
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +3 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +3 -4
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +4 -3
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +3 -4
  106. package/dist/index143.js.map +1 -1
  107. package/dist/index144.js +4 -3
  108. package/dist/index144.js.map +1 -1
  109. package/dist/index145.js +3 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +3 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +3 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +2 -2
  116. package/dist/index15.js +727 -18
  117. package/dist/index15.js.map +1 -1
  118. package/dist/index150.js +2 -2
  119. package/dist/index152.js +3 -3
  120. package/dist/index153.js +40 -599
  121. package/dist/index153.js.map +1 -1
  122. package/dist/index154.js +605 -5
  123. package/dist/index154.js.map +1 -1
  124. package/dist/index155.js +5 -68
  125. package/dist/index155.js.map +1 -1
  126. package/dist/index156.js +69 -2
  127. package/dist/index156.js.map +1 -1
  128. package/dist/index157.js +2 -364
  129. package/dist/index157.js.map +1 -1
  130. package/dist/index158.js +303 -201
  131. package/dist/index158.js.map +1 -1
  132. package/dist/index159.js +247 -46
  133. package/dist/index159.js.map +1 -1
  134. package/dist/index16.js +19 -14
  135. package/dist/index16.js.map +1 -1
  136. package/dist/index160.js +56 -42
  137. package/dist/index160.js.map +1 -1
  138. package/dist/index161.js +46 -169
  139. package/dist/index161.js.map +1 -1
  140. package/dist/index162.js +156 -96
  141. package/dist/index162.js.map +1 -1
  142. package/dist/index163.js +109 -24
  143. package/dist/index163.js.map +1 -1
  144. package/dist/index164.js +25 -8
  145. package/dist/index164.js.map +1 -1
  146. package/dist/index165.js +8 -5
  147. package/dist/index165.js.map +1 -1
  148. package/dist/index166.js +4 -5
  149. package/dist/index166.js.map +1 -1
  150. package/dist/index167.js +5 -4
  151. package/dist/index167.js.map +1 -1
  152. package/dist/index168.js +4 -466
  153. package/dist/index168.js.map +1 -1
  154. package/dist/index169.js +420 -139
  155. package/dist/index169.js.map +1 -1
  156. package/dist/index17.js +13 -382
  157. package/dist/index17.js.map +1 -1
  158. package/dist/index170.js +149 -71
  159. package/dist/index170.js.map +1 -1
  160. package/dist/index171.js +74 -229
  161. package/dist/index171.js.map +1 -1
  162. package/dist/index172.js +262 -9
  163. package/dist/index172.js.map +1 -1
  164. package/dist/index173.js +9 -42
  165. package/dist/index173.js.map +1 -1
  166. package/dist/index174.js +42 -4
  167. package/dist/index174.js.map +1 -1
  168. package/dist/index175.js +4 -16
  169. package/dist/index175.js.map +1 -1
  170. package/dist/index176.js +57 -4
  171. package/dist/index176.js.map +1 -1
  172. package/dist/index177.js +8 -5
  173. package/dist/index177.js.map +1 -1
  174. package/dist/index178.js +55 -47
  175. package/dist/index178.js.map +1 -1
  176. package/dist/index179.js +17 -64
  177. package/dist/index179.js.map +1 -1
  178. package/dist/index18.js +363 -695
  179. package/dist/index18.js.map +1 -1
  180. package/dist/index180.js +16 -6
  181. package/dist/index180.js.map +1 -1
  182. package/dist/index181.js +5 -4
  183. package/dist/index181.js.map +1 -1
  184. package/dist/index182.js +5 -7
  185. package/dist/index182.js.map +1 -1
  186. package/dist/index183.js +6 -17
  187. package/dist/index183.js.map +1 -1
  188. package/dist/index184.js +4 -5
  189. package/dist/index184.js.map +1 -1
  190. package/dist/index185.js +7 -5
  191. package/dist/index185.js.map +1 -1
  192. package/dist/index186.js +17 -13
  193. package/dist/index186.js.map +1 -1
  194. package/dist/index187.js +5 -10
  195. package/dist/index187.js.map +1 -1
  196. package/dist/index188.js +5 -14
  197. package/dist/index188.js.map +1 -1
  198. package/dist/index189.js +13 -14
  199. package/dist/index189.js.map +1 -1
  200. package/dist/index19.js +685 -624
  201. package/dist/index19.js.map +1 -1
  202. package/dist/index190.js +10 -5
  203. package/dist/index190.js.map +1 -1
  204. package/dist/index191.js +14 -6
  205. package/dist/index191.js.map +1 -1
  206. package/dist/index192.js +14 -7
  207. package/dist/index192.js.map +1 -1
  208. package/dist/index193.js +5 -6
  209. package/dist/index193.js.map +1 -1
  210. package/dist/index194.js +6 -9
  211. package/dist/index194.js.map +1 -1
  212. package/dist/index195.js +7 -5
  213. package/dist/index195.js.map +1 -1
  214. package/dist/index196.js +6 -5
  215. package/dist/index196.js.map +1 -1
  216. package/dist/index197.js +9 -9
  217. package/dist/index197.js.map +1 -1
  218. package/dist/index198.js +5 -5
  219. package/dist/index198.js.map +1 -1
  220. package/dist/index199.js +5 -5
  221. package/dist/index199.js.map +1 -1
  222. package/dist/index2.js +2 -2
  223. package/dist/index20.js +640 -191
  224. package/dist/index20.js.map +1 -1
  225. package/dist/index200.js +9 -4
  226. package/dist/index200.js.map +1 -1
  227. package/dist/index201.js +5 -11
  228. package/dist/index201.js.map +1 -1
  229. package/dist/index202.js +5 -10
  230. package/dist/index202.js.map +1 -1
  231. package/dist/index203.js +4 -10
  232. package/dist/index203.js.map +1 -1
  233. package/dist/index204.js +11 -11
  234. package/dist/index204.js.map +1 -1
  235. package/dist/index205.js +10 -11
  236. package/dist/index205.js.map +1 -1
  237. package/dist/index206.js +10 -10
  238. package/dist/index206.js.map +1 -1
  239. package/dist/index207.js +11 -7
  240. package/dist/index207.js.map +1 -1
  241. package/dist/index208.js +11 -6
  242. package/dist/index208.js.map +1 -1
  243. package/dist/index209.js +10 -5
  244. package/dist/index209.js.map +1 -1
  245. package/dist/index21.js +209 -5
  246. package/dist/index21.js.map +1 -1
  247. package/dist/index210.js +7 -6
  248. package/dist/index210.js.map +1 -1
  249. package/dist/index211.js +6 -7
  250. package/dist/index211.js.map +1 -1
  251. package/dist/index212.js +5 -6
  252. package/dist/index212.js.map +1 -1
  253. package/dist/index213.js +6 -55
  254. package/dist/index213.js.map +1 -1
  255. package/dist/index214.js +7 -8
  256. package/dist/index214.js.map +1 -1
  257. package/dist/index215.js +6 -19
  258. package/dist/index215.js.map +1 -1
  259. package/dist/index216.js +54 -15
  260. package/dist/index216.js.map +1 -1
  261. package/dist/index217.js +16 -7
  262. package/dist/index217.js.map +1 -1
  263. package/dist/index218.js +7 -10
  264. package/dist/index218.js.map +1 -1
  265. package/dist/index219.js +9 -9
  266. package/dist/index219.js.map +1 -1
  267. package/dist/index22.js +5 -35
  268. package/dist/index22.js.map +1 -1
  269. package/dist/index220.js +10 -21
  270. package/dist/index220.js.map +1 -1
  271. package/dist/index221.js +21 -10
  272. package/dist/index221.js.map +1 -1
  273. package/dist/index222.js +10 -9
  274. package/dist/index222.js.map +1 -1
  275. package/dist/index223.js +6 -6
  276. package/dist/index223.js.map +1 -1
  277. package/dist/index224.js +9 -4
  278. package/dist/index224.js.map +1 -1
  279. package/dist/index225.js +4 -5
  280. package/dist/index225.js.map +1 -1
  281. package/dist/index226.js +5 -16
  282. package/dist/index226.js.map +1 -1
  283. package/dist/index227.js +16 -9
  284. package/dist/index227.js.map +1 -1
  285. package/dist/index228.js +9 -18
  286. package/dist/index228.js.map +1 -1
  287. package/dist/index229.js +15 -12
  288. package/dist/index229.js.map +1 -1
  289. package/dist/index23.js +24 -258
  290. package/dist/index23.js.map +1 -1
  291. package/dist/index230.js +12 -9
  292. package/dist/index230.js.map +1 -1
  293. package/dist/index231.js +12 -29
  294. package/dist/index231.js.map +1 -1
  295. package/dist/index232.js +28 -11
  296. package/dist/index232.js.map +1 -1
  297. package/dist/index233.js +10 -23
  298. package/dist/index233.js.map +1 -1
  299. package/dist/index234.js +25 -5
  300. package/dist/index234.js.map +1 -1
  301. package/dist/index235.js +5 -24
  302. package/dist/index235.js.map +1 -1
  303. package/dist/index236.js +24 -28
  304. package/dist/index236.js.map +1 -1
  305. package/dist/index237.js +29 -5
  306. package/dist/index237.js.map +1 -1
  307. package/dist/index238.js +5 -68
  308. package/dist/index238.js.map +1 -1
  309. package/dist/index239.js +64 -177
  310. package/dist/index239.js.map +1 -1
  311. package/dist/index24.js +254 -166
  312. package/dist/index24.js.map +1 -1
  313. package/dist/index240.js +176 -42
  314. package/dist/index240.js.map +1 -1
  315. package/dist/index241.js +45 -12
  316. package/dist/index241.js.map +1 -1
  317. package/dist/index242.js +13 -154
  318. package/dist/index242.js.map +1 -1
  319. package/dist/index243.js +151 -27
  320. package/dist/index243.js.map +1 -1
  321. package/dist/index244.js +30 -9
  322. package/dist/index244.js.map +1 -1
  323. package/dist/index245.js +9 -47
  324. package/dist/index245.js.map +1 -1
  325. package/dist/index246.js +46 -10
  326. package/dist/index246.js.map +1 -1
  327. package/dist/index247.js +11 -44
  328. package/dist/index247.js.map +1 -1
  329. package/dist/index248.js +40 -91
  330. package/dist/index248.js.map +1 -1
  331. package/dist/index249.js +85 -76
  332. package/dist/index249.js.map +1 -1
  333. package/dist/index25.js +180 -14
  334. package/dist/index25.js.map +1 -1
  335. package/dist/index250.js +69 -88
  336. package/dist/index250.js.map +1 -1
  337. package/dist/index251.js +92 -39
  338. package/dist/index251.js.map +1 -1
  339. package/dist/index252.js +51 -10
  340. package/dist/index252.js.map +1 -1
  341. package/dist/index253.js +10 -36
  342. package/dist/index253.js.map +1 -1
  343. package/dist/index254.js +37 -8
  344. package/dist/index254.js.map +1 -1
  345. package/dist/index255.js +8 -116
  346. package/dist/index255.js.map +1 -1
  347. package/dist/index256.js +115 -16
  348. package/dist/index256.js.map +1 -1
  349. package/dist/index257.js +17 -15
  350. package/dist/index257.js.map +1 -1
  351. package/dist/index258.js +15 -3
  352. package/dist/index258.js.map +1 -1
  353. package/dist/index259.js +3 -36
  354. package/dist/index259.js.map +1 -1
  355. package/dist/index26.js +15 -2763
  356. package/dist/index26.js.map +1 -1
  357. package/dist/index260.js +35 -19
  358. package/dist/index260.js.map +1 -1
  359. package/dist/index261.js +20 -9
  360. package/dist/index261.js.map +1 -1
  361. package/dist/index262.js +8 -7
  362. package/dist/index262.js.map +1 -1
  363. package/dist/index263.js +8 -19
  364. package/dist/index263.js.map +1 -1
  365. package/dist/index264.js +14 -23
  366. package/dist/index264.js.map +1 -1
  367. package/dist/index265.js +26 -14
  368. package/dist/index265.js.map +1 -1
  369. package/dist/index266.js +16 -4
  370. package/dist/index266.js.map +1 -1
  371. package/dist/index267.js +5 -19
  372. package/dist/index267.js.map +1 -1
  373. package/dist/index268.js +19 -13
  374. package/dist/index268.js.map +1 -1
  375. package/dist/index269.js +13 -5
  376. package/dist/index269.js.map +1 -1
  377. package/dist/index27.js +2761 -35
  378. package/dist/index27.js.map +1 -1
  379. package/dist/index270.js +5 -3
  380. package/dist/index270.js.map +1 -1
  381. package/dist/index271.js +3 -24
  382. package/dist/index271.js.map +1 -1
  383. package/dist/index272.js +22 -111
  384. package/dist/index272.js.map +1 -1
  385. package/dist/index273.js +111 -14
  386. package/dist/index273.js.map +1 -1
  387. package/dist/index274.js +14 -523
  388. package/dist/index274.js.map +1 -1
  389. package/dist/index275.js +511 -114
  390. package/dist/index275.js.map +1 -1
  391. package/dist/index276.js +111 -117
  392. package/dist/index276.js.map +1 -1
  393. package/dist/index277.js +133 -20
  394. package/dist/index277.js.map +1 -1
  395. package/dist/index278.js +20 -5
  396. package/dist/index278.js.map +1 -1
  397. package/dist/index279.js +5 -5
  398. package/dist/index279.js.map +1 -1
  399. package/dist/index28.js +37 -3
  400. package/dist/index28.js.map +1 -1
  401. package/dist/index280.js +6 -4
  402. package/dist/index280.js.map +1 -1
  403. package/dist/index281.js +4 -16
  404. package/dist/index281.js.map +1 -1
  405. package/dist/index282.js +14 -7
  406. package/dist/index282.js.map +1 -1
  407. package/dist/index283.js +8 -5
  408. package/dist/index283.js.map +1 -1
  409. package/dist/index284.js +5 -4
  410. package/dist/index284.js.map +1 -1
  411. package/dist/index285.js +4 -545
  412. package/dist/index285.js.map +1 -1
  413. package/dist/index286.js +544 -45
  414. package/dist/index286.js.map +1 -1
  415. package/dist/index287.js +47 -18
  416. package/dist/index287.js.map +1 -1
  417. package/dist/index288.js +17 -6
  418. package/dist/index288.js.map +1 -1
  419. package/dist/index289.js +6 -8
  420. package/dist/index289.js.map +1 -1
  421. package/dist/index29.js +3 -125
  422. package/dist/index29.js.map +1 -1
  423. package/dist/index290.js +8 -7
  424. package/dist/index290.js.map +1 -1
  425. package/dist/index291.js +7 -8
  426. package/dist/index291.js.map +1 -1
  427. package/dist/index292.js +8 -12
  428. package/dist/index292.js.map +1 -1
  429. package/dist/index293.js +12 -9
  430. package/dist/index293.js.map +1 -1
  431. package/dist/index294.js +9 -13
  432. package/dist/index294.js.map +1 -1
  433. package/dist/index295.js +14 -69
  434. package/dist/index295.js.map +1 -1
  435. package/dist/index296.js +68 -8
  436. package/dist/index296.js.map +1 -1
  437. package/dist/index297.js +9 -14
  438. package/dist/index297.js.map +1 -1
  439. package/dist/index298.js +14 -66
  440. package/dist/index298.js.map +1 -1
  441. package/dist/index299.js +65 -64
  442. package/dist/index299.js.map +1 -1
  443. package/dist/index30.js +120 -227
  444. package/dist/index30.js.map +1 -1
  445. package/dist/index300.js +64 -4
  446. package/dist/index300.js.map +1 -1
  447. package/dist/index301.js +5 -56
  448. package/dist/index301.js.map +1 -1
  449. package/dist/index302.js +54 -66
  450. package/dist/index302.js.map +1 -1
  451. package/dist/index303.js +67 -30
  452. package/dist/index303.js.map +1 -1
  453. package/dist/index304.js +31 -9
  454. package/dist/index304.js.map +1 -1
  455. package/dist/index305.js +9 -153
  456. package/dist/index305.js.map +1 -1
  457. package/dist/index306.js +142 -97
  458. package/dist/index306.js.map +1 -1
  459. package/dist/index307.js +108 -4
  460. package/dist/index307.js.map +1 -1
  461. package/dist/index308.js +3 -22
  462. package/dist/index308.js.map +1 -1
  463. package/dist/index309.js +22 -15
  464. package/dist/index309.js.map +1 -1
  465. package/dist/index31.js +229 -21
  466. package/dist/index31.js.map +1 -1
  467. package/dist/index310.js +14 -27
  468. package/dist/index310.js.map +1 -1
  469. package/dist/index311.js +27 -11
  470. package/dist/index311.js.map +1 -1
  471. package/dist/index312.js +11 -5
  472. package/dist/index312.js.map +1 -1
  473. package/dist/index313.js +6 -12
  474. package/dist/index313.js.map +1 -1
  475. package/dist/index314.js +20 -25
  476. package/dist/index314.js.map +1 -1
  477. package/dist/index315.js +12 -4
  478. package/dist/index315.js.map +1 -1
  479. package/dist/index316.js +25 -20
  480. package/dist/index316.js.map +1 -1
  481. package/dist/index317.js +8 -0
  482. package/dist/index317.js.map +1 -0
  483. package/dist/index32.js +23 -50
  484. package/dist/index32.js.map +1 -1
  485. package/dist/index33.js +50 -2640
  486. package/dist/index33.js.map +1 -1
  487. package/dist/index34.js +2598 -351
  488. package/dist/index34.js.map +1 -1
  489. package/dist/index35.js +375 -214
  490. package/dist/index35.js.map +1 -1
  491. package/dist/index36.js +230 -19
  492. package/dist/index36.js.map +1 -1
  493. package/dist/index37.js +18 -138
  494. package/dist/index37.js.map +1 -1
  495. package/dist/index38.js +125 -170
  496. package/dist/index38.js.map +1 -1
  497. package/dist/index39.js +174 -64
  498. package/dist/index39.js.map +1 -1
  499. package/dist/index40.js +72 -94
  500. package/dist/index40.js.map +1 -1
  501. package/dist/index41.js +98 -5
  502. package/dist/index41.js.map +1 -1
  503. package/dist/index42.js +5 -843
  504. package/dist/index42.js.map +1 -1
  505. package/dist/index43.js +832 -54
  506. package/dist/index43.js.map +1 -1
  507. package/dist/index44.js +66 -8
  508. package/dist/index44.js.map +1 -1
  509. package/dist/index45.js +8 -2
  510. package/dist/index45.js.map +1 -1
  511. package/dist/index46.js +2 -24
  512. package/dist/index46.js.map +1 -1
  513. package/dist/index47.js +22 -232
  514. package/dist/index47.js.map +1 -1
  515. package/dist/index48.js +233 -6
  516. package/dist/index48.js.map +1 -1
  517. package/dist/index49.js +203 -32
  518. package/dist/index49.js.map +1 -1
  519. package/dist/index5.js +1 -1
  520. package/dist/index50.js +3 -26
  521. package/dist/index50.js.map +1 -1
  522. package/dist/index51.js +6 -7
  523. package/dist/index51.js.map +1 -1
  524. package/dist/index52.js +47 -11
  525. package/dist/index52.js.map +1 -1
  526. package/dist/index53.js +26 -204
  527. package/dist/index53.js.map +1 -1
  528. package/dist/index54.js +50 -3
  529. package/dist/index54.js.map +1 -1
  530. package/dist/index55.js +7 -47
  531. package/dist/index55.js.map +1 -1
  532. package/dist/index56.js +12 -48
  533. package/dist/index56.js.map +1 -1
  534. package/dist/index57.js +133 -7
  535. package/dist/index57.js.map +1 -1
  536. package/dist/index58.js +10 -14
  537. package/dist/index58.js.map +1 -1
  538. package/dist/index59.js +210 -127
  539. package/dist/index59.js.map +1 -1
  540. package/dist/index6.js +138 -25
  541. package/dist/index6.js.map +1 -1
  542. package/dist/index60.js +12 -10
  543. package/dist/index60.js.map +1 -1
  544. package/dist/index61.js +32 -215
  545. package/dist/index61.js.map +1 -1
  546. package/dist/index62.js +47 -13
  547. package/dist/index62.js.map +1 -1
  548. package/dist/index63.js +7 -46
  549. package/dist/index63.js.map +1 -1
  550. package/dist/index67.js +2 -2
  551. package/dist/index69.js +3 -3
  552. package/dist/index7.js +26 -29
  553. package/dist/index7.js.map +1 -1
  554. package/dist/index70.js +11 -53
  555. package/dist/index70.js.map +1 -1
  556. package/dist/index71.js +54 -2
  557. package/dist/index71.js.map +1 -1
  558. package/dist/index72.js +6 -2
  559. package/dist/index72.js.map +1 -1
  560. package/dist/index73.js +7 -5
  561. package/dist/index73.js.map +1 -1
  562. package/dist/index74.js +4 -6
  563. package/dist/index74.js.map +1 -1
  564. package/dist/index75.js +2 -6
  565. package/dist/index75.js.map +1 -1
  566. package/dist/index76.js +2 -52
  567. package/dist/index76.js.map +1 -1
  568. package/dist/index77.js +52 -5
  569. package/dist/index77.js.map +1 -1
  570. package/dist/index78.js +4 -4
  571. package/dist/index78.js.map +1 -1
  572. package/dist/index79.js +4 -15
  573. package/dist/index79.js.map +1 -1
  574. package/dist/index8.js +28 -222
  575. package/dist/index8.js.map +1 -1
  576. package/dist/index80.js +15 -5
  577. package/dist/index80.js.map +1 -1
  578. package/dist/index81.js +5 -7
  579. package/dist/index81.js.map +1 -1
  580. package/dist/index82.js +6 -15
  581. package/dist/index82.js.map +1 -1
  582. package/dist/index83.js +16 -4
  583. package/dist/index83.js.map +1 -1
  584. package/dist/index84.js +1 -1
  585. package/dist/index84.js.map +1 -1
  586. package/dist/index85.js +4 -5
  587. package/dist/index85.js.map +1 -1
  588. package/dist/index86.js +4 -4
  589. package/dist/index86.js.map +1 -1
  590. package/dist/index87.js +5 -4
  591. package/dist/index87.js.map +1 -1
  592. package/dist/index88.js +2 -2
  593. package/dist/index88.js.map +1 -1
  594. package/dist/index89.js +3 -5
  595. package/dist/index89.js.map +1 -1
  596. package/dist/index9.js +226 -23
  597. package/dist/index9.js.map +1 -1
  598. package/dist/index90.js +6 -24
  599. package/dist/index90.js.map +1 -1
  600. package/dist/index91.js +24 -6
  601. package/dist/index91.js.map +1 -1
  602. package/dist/index92.js +6 -4
  603. package/dist/index92.js.map +1 -1
  604. package/dist/index93.js +3 -5
  605. package/dist/index93.js.map +1 -1
  606. package/dist/index94.js +6 -5
  607. package/dist/index94.js.map +1 -1
  608. package/dist/index95.js +5 -4
  609. package/dist/index95.js.map +1 -1
  610. package/dist/index96.js +3 -4
  611. package/dist/index96.js.map +1 -1
  612. package/dist/index97.js +5 -4
  613. package/dist/index97.js.map +1 -1
  614. package/dist/index98.js +4 -8
  615. package/dist/index98.js.map +1 -1
  616. package/dist/index99.js +8 -5
  617. package/dist/index99.js.map +1 -1
  618. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index19.js","sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n DEFAULT_COUNTRY,\n COMMON_IDD_PREFIXES,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n detectNationalPrefixForDisplay,\n formatWithAsYouType,\n getLengthIssue,\n getSuggestionState,\n injectNationalPrefixDisplay,\n normalizeInputValue,\n sanitizeDigits,\n shouldDisplayExplicitCountrySelection,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const hasConfiguredCountry =\n typeof defaultCountry === \"string\" || typeof countryProp === \"string\"\n\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const fallbackCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const hasResolvedCountryRef = React.useRef<boolean>(hasConfiguredCountry)\n\n const initialStateRef = React.useRef<{\n country: CountryCode\n inputValue: string\n normalizedValue: string\n hasExplicitCountrySelection: boolean\n } | null>(null)\n const lastNormalizedRef = React.useRef<string>(\"\")\n\n if (!initialStateRef.current) {\n if (!value) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const baseCountryForInit = hasConfiguredCountry ? fallbackCountry : undefined\n const normalized = normalizeInputValue(value, baseCountryForInit, { allowJustPlus: true })\n if (!normalized) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInit)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let resolvedCountry = canonicalDetectedCountry ?? fallbackCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(resolvedCountry)\n const initialHasPrefix = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInit,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasPrefix,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n\n\n if (inferredCountryToApply) {\n resolvedCountry = inferredCountryToApply\n }\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n const nextDialCode = getCountryCallingCode(resolvedCountry)\n const finalHasPrefix = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasPrefix\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: finalHasPrefix,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const allowInlineFlag = hasResolvedCountryRef.current\n initialStateRef.current = {\n country: resolvedCountry,\n inputValue: displayValue,\n normalizedValue: normalized,\n hasExplicitCountrySelection:\n allowInlineFlag &&\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n }),\n }\n lastNormalizedRef.current = normalized\n }\n }\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState(initialState.country)\n const [inputValueState, setInputValueState] = React.useState(initialState.inputValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(null)\n const [hasExplicitCountrySelection, setHasExplicitCountrySelection] = React.useState(\n initialState.hasExplicitCountrySelection\n )\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const isCountryControlled = typeof countryProp === \"string\"\n const selectedCountry = isCountryControlled ? countryProp : uncontrolledCountry\n const activeCountry = selectedCountry ?? fallbackCountry\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => ({\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n const hasAnnouncedCountryRef = React.useRef(false)\n\n const notifyCountryChange = React.useCallback(\n (country: CountryCode) => {\n hasAnnouncedCountryRef.current = true\n const selection = resolveSelectedCountry(country)\n onCountryChange?.(country, selection)\n return selection\n },\n [onCountryChange, resolveSelectedCountry]\n )\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const baseCountryForSync = hasResolvedCountryRef.current ? activeCountry : undefined\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(value, baseCountryForSync, {\n allowJustPlus: true,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n keyboardBufferRef.current = \"\"\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForSync)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForSync ?? activeCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForSync,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n }, [\n value,\n activeCountry,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ])\n\n React.useEffect(() => {\n if (hasAnnouncedCountryRef.current) {\n return\n }\n if (!hasResolvedCountryRef.current) {\n return\n }\n const current = selectedCountry ?? fallbackCountry\n if (!current) {\n return\n }\n notifyCountryChange(current)\n }, [fallbackCountry, notifyCountryChange, selectedCountry])\n\n React.useEffect(() => {\n if (isCountryControlled && countryProp && countryProp !== uncontrolledCountry) {\n setUncontrolledCountry(countryProp)\n }\n }, [countryProp, isCountryControlled, uncontrolledCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n const selection = resolveSelectedCountry(details.country)\n onChange?.({\n ...details,\n selectedCountry: selection,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const baseCountryForInput = hasResolvedCountryRef.current ? activeCountry : undefined\n const dialCode = baseCountryForInput ? getCountryCallingCode(baseCountryForInput) : \"\"\n const typedDigits = sanitizeDigits(raw)\n const hasExplicitPlus = raw.trim().startsWith(\"+\")\n const startsWithDialCode = dialCode ? typedDigits.startsWith(dialCode) : false\n const hasLeadingZero = typedDigits.startsWith(\"0\")\n const isIddPrefix = COMMON_IDD_PREFIXES.some((prefix) => typedDigits.startsWith(prefix))\n\n const shouldRemoveNationalPrefix =\n Boolean(baseCountryForInput) &&\n !isIddPrefix &&\n ((startsWithDialCode && typedDigits.slice(dialCode.length).startsWith(\"0\")) ||\n (!hasExplicitPlus && hasLeadingZero && typedDigits.length > 1) ||\n (hasExplicitPlus && hasLeadingZero && typedDigits.length > 1 && !startsWithDialCode))\n\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(raw, baseCountryForInput, {\n allowJustPlus: true,\n removeNationalPrefix: shouldRemoveNationalPrefix,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"0\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"0\",\n formattedNational: \"0\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"0\",\n rawInput: \"0\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setHighlightedIndex(0)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"+\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"+\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"+\",\n isValid: false,\n })\n return\n }\n\n const {\n international,\n national,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInput)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForInput ?? activeCountry\n\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInput,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromInput =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromInput) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalDigits = stripPrefix(normalizedDigits, nextDialCode)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n\n pendingSelectionRef.current = resolveSelection(snapshot, displayValue)\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setHighlightedIndex(suggestion.shouldSuggest ? 0 : -1)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n },\n [\n activeCountry,\n emitChange,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n const previousDigits = sanitizeDigits(lastNormalizedRef.current || inputValueState)\n const currentDial = getCountryCallingCode(activeCountry)\n const digitsWithoutCurrentDial = previousDigits.startsWith(currentDial)\n ? previousDigits.slice(currentDial.length)\n : previousDigits\n let rebasedDigits = digitsWithoutCurrentDial\n if (!rebasedDigits) {\n rebasedDigits = option.dialCode\n } else if (!rebasedDigits.startsWith(option.dialCode)) {\n rebasedDigits = `${option.dialCode}${rebasedDigits}`\n }\n const normalized = `+${rebasedDigits}`\n lastNormalizedRef.current = normalized\n const { international, national, phoneNumber } = formatWithAsYouType(\n normalized,\n option.value\n )\n const nextCountry = option.value\n manualSelectionCountryRef.current = nextCountry\n hasResolvedCountryRef.current = true\n\n setInputValueState(international)\n pendingSelectionRef.current = {\n start: international.length,\n end: international.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(getLengthIssue(normalized, nextCountry))\n\n if (!isCountryControlled && nextCountry !== uncontrolledCountry) {\n setUncontrolledCountry(nextCountry)\n }\n\n notifyCountryChange(nextCountry)\n\n const normalizedDigits = sanitizeDigits(normalized)\n const dialCode = phoneNumber?.countryCallingCode ?? option.dialCode\n const nationalDigits = stripPrefix(normalizedDigits, dialCode)\n setHasExplicitCountrySelection(true)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: dialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [activeCountry, emitChange, inputValueState, isCountryControlled, notifyCountryChange, uncontrolledCountry]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption) => {\n if (!results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const fallbackOption = countryOptions.find((option) => option.value === fallbackCountry)\n const currentOption = countryOptions.find((option) => option.value === activeCountry)\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (currentOption) {\n pushUnique(currentOption)\n }\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n if (currentOption) {\n pushUnique(currentOption)\n }\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, fallbackCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = countryOptions.find((option) => option.value === activeCountry)\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = hasExplicitCountrySelection\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry ?? null)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = hasExplicitCountrySelection && Boolean(activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const target = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(target)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"names":["PhoneNumberInput","React","props","forwardedRef","value","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messagesProp","renderValidationMessage","restProps","onInputFocus","onInputBlur","onInputKeyDown","inputName","inputAutoComplete","restInputProps","hasConfiguredCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","country","match","candidate","toSelectedCountry","buildFallbackSelectedCountry","fallbackCountry","getValidCountry","DEFAULT_COUNTRY","option","hasResolvedCountryRef","initialStateRef","lastNormalizedRef","baseCountryForInit","normalized","normalizeInputValue","international","phoneNumber","detectedCountry","inferredCountry","hasExplicitInternationalPrefix","formatWithAsYouType","canonicalDetectedCountry","resolvedCountry","rawDigits","sanitizeDigits","hasExplicitPlus","internationalDigits","initialDialCode","getCountryCallingCode","initialHasPrefix","detectNationalPrefixForDisplay","suggestion","getSuggestionState","inferredCountryToApply","nextDialCode","finalHasPrefix","displayValue","injectNationalPrefixDisplay","displayDetectedCountry","allowInlineFlag","shouldDisplayExplicitCountrySelection","initialState","uncontrolledCountry","setUncontrolledCountry","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","lengthIssue","setLengthIssue","hasExplicitCountrySelection","setHasExplicitCountrySelection","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","consumeScrollBehavior","behavior","isCountryControlled","selectedCountry","activeCountry","inputRef","selection","input","start","end","selectOverrides","userSelectStyles","userSelectComponents","userClassNamePrefix","userFormatOptionLabel","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","mergedSelectStyles","suggestionSelectStyles","mergedSelectComponents","baseComponents","HiddenControl","NullComponent","overrides","SuggestionOption","hasAnnouncedCountryRef","notifyCountryChange","baseCountryForSync","previousNormalized","nextCountry","initialHasTypedTrunk","finalCountry","hasTypedTrunk","shouldShowInlineFlag","getLengthIssue","current","emitChange","details","scheduleBufferReset","handleInputChange","event","target","snapshot","captureSelectionSnapshot","raw","baseCountryForInput","dialCode","typedDigits","startsWithDialCode","hasLeadingZero","isIddPrefix","COMMON_IDD_PREFIXES","prefix","shouldRemoveNationalPrefix","resolveSelection","national","normalizedDigits","nationalDigits","stripPrefix","handleCountrySelect","previousDigits","currentDial","rebasedDigits","filteredOptions","results","pushUnique","existing","fallbackOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","a","b","aExact","bExact","token","aIndex","optionMatchIndex","bIndex","suggestionMenuIsOpen","highlightedOption","updateHighlightedOption","index","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","highlightContextValue","activeOption","activeFlag","inlineFlagLabel","hasInlineFlag","lengthHint","countryName","validationNode","rendered","jsx","appendToBuffer","char","popBuffer","handleKeyDown","key","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","skipFormattingCharactersRight","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","SuggestionContext","Select"],"mappings":";;;;;;;;;;AAoEO,MAAMA,KAAmBC,EAAM;AAAA,EACpC,SAA0BC,IAAOC,IAAc;AAC7C,UAAM;AAAA,MACJ,OAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,UAAUC;AAAA,MACV,yBAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACDhB,IAEE;AAAA,MACJ,SAASiB;AAAA,MACT,QAAQC;AAAA,MACR,WAAWC;AAAA,MACX,MAAMC;AAAA,MACN,cAAcC;AAAA,MACd,GAAGC;AAAA,IAAA,IACDN,IAEEO,IACJ,OAAOpB,MAAmB,YAAY,OAAOC,KAAgB,UAEzDoB,KAAiBC,GAAkBpB,EAAM,GACzCqB,KAAiB3B,EAAM;AAAA,MAC3B,MAAM4B,GAAoBH,EAAc;AAAA,MACxC,CAACA,EAAc;AAAA,IAAA,GAEXI,KAAmB7B,EAAM;AAAA,MAC7B,MAAM8B,GAAgBH,IAAgBZ,EAAY;AAAA,MAClD,CAACY,IAAgBZ,EAAY;AAAA,IAAA,GAEzBgB,IAAiB/B,EAAM;AAAA,MAC3B,MAAMgC,GAAwBL,IAAgBF,EAAc;AAAA,MAC5D,CAACA,IAAgBE,EAAc;AAAA,IAAA,GAE3BM,KAAyBjC,EAAM;AAAA,MACnC,CAACkC,MAAqD;AACpD,cAAMC,IAAQJ,EAAe,KAAK,CAACK,MAAcA,EAAU,UAAUF,CAAO;AAC5E,eAAIC,IACKE,GAAkBF,CAAK,IAEzBG,GAA6BJ,CAAO;AAAA,MAC7C;AAAA,MACA,CAACH,CAAc;AAAA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C,OAAO;AAAA,UAAA;AAAA,UAET,aAAa,CAACzC,MAAUA,EAAM,eAAA;AAAA,UAE9B,UAAA0D,gBAAAA,EAAAA,IAACkB,GAAkB,UAAlB,EAA2B,OAAO3B,IACjC,UAAAS,gBAAAA,EAAAA;AAAAA,YAACmB;AAAA,YAAA;AAAA,cACE,GAAGrG;AAAA,cACJ,YAAYiE;AAAA,cACZ,SAASlB;AAAA,cACT,OAAO;AAAA,cACP,YAAY5C;AAAA,cACZ,QAAQF;AAAA,cACR,aAAa;AAAA,cACb,cAAc;AAAA,cACd,uBAAuB;AAAA,cACvB,iBAAiB;AAAA,cACjB,0BAA0B;AAAA,cAC1B,UAAU0C;AAAA,cACV,iBAAiB/C,MAAuB;AAAA,cACxC,aAAY;AAAA,cACZ,mBAAmByE;AAAA,cACnB,kBACAtE,OAAqB,MAAMpF,GAAiB;AAAA,YAAA;AAAA,UAAA,EAEhD,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAGCqK;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AAEAnM,GAAiB,cAAc;"}
1
+ {"version":3,"file":"index19.js","sources":["../src/components/HourPickerField/index.tsx"],"sourcesContent":["import { Check, ChevronDown, ChevronUp } from \"lucide-react\"\nimport * as React from \"react\"\nimport { DismissableLayerBranch } from \"@radix-ui/react-dismissable-layer\"\nimport { createPortal } from \"react-dom\"\nimport { IMaskInput } from \"react-imask\"\nimport IMask, { InputMask } from \"imask\"\n\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/components/Select\"\nimport { useIsTouchDevice } from \"@/helpers/useIsTouchDevice\"\nimport { cn } from \"@/lib/utils\"\n\n\n// WARNING: used to preserve input mask even with tree shaking\n// DO NOT REMOVE THIS CODE OR THIS COMMENT\nconst imaskAny = IMask as any\nif (typeof imaskAny.InputMask !== \"function\") {\n imaskAny.InputMask = InputMask\n}\n\n\nexport type HourPickerOption = {\n value: string\n label: string\n disabled?: boolean\n description?: React.ReactNode\n}\n\nfunction pad2(value: number) {\n return String(value).padStart(2, \"0\")\n}\n\nfunction parseTimeInput(raw: string) {\n const trimmed = raw.trim()\n if (!trimmed) return null\n\n const match = /^(\\d{1,2}):(\\d{2})$/.exec(trimmed)\n if (!match) {\n return null\n }\n\n const hours = Number(match[1])\n const minutes = Number(match[2])\n if (!Number.isFinite(hours) || !Number.isFinite(minutes)) {\n return null\n }\n\n if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) {\n return null\n }\n\n return `${pad2(hours)}:${pad2(minutes)}`\n}\n\ntype ParsedTimeInputResult = {\n parsed: string\n selectableValue: string | null\n}\n\nfunction parseTimeInputWithSelectableOption(raw: string, options: HourPickerOption[]): ParsedTimeInputResult | null {\n const parsed = parseTimeInput(raw)\n if (!parsed) return null\n\n const parsedOption = options.find((option) => option.value === parsed)\n if (isOptionSelectable(parsedOption)) {\n return { parsed, selectableValue: parsed }\n }\n\n return { parsed, selectableValue: null }\n}\n\nfunction timeStringToMinutes(value: string) {\n const match = /^(\\d{2}):(\\d{2})$/.exec(value)\n if (!match) {\n return null\n }\n\n const hours = Number(match[1])\n const minutes = Number(match[2])\n\n if (!Number.isFinite(hours) || !Number.isFinite(minutes)) {\n return null\n }\n\n return hours * 60 + minutes\n}\n\nfunction isOptionSelectable(option: HourPickerOption | undefined) {\n if (!option) return false\n return !option.disabled\n}\n\nfunction findClosestSelectableOption(targetMinutes: number, options: HourPickerOption[]) {\n let bestOption: HourPickerOption | null = null\n let bestDiff = Number.POSITIVE_INFINITY\n let bestMinutes = Number.NEGATIVE_INFINITY\n\n for (const option of options) {\n if (!isOptionSelectable(option)) continue\n const optionMinutes = timeStringToMinutes(option.value)\n if (optionMinutes == null) continue\n\n const diff = Math.abs(optionMinutes - targetMinutes)\n if (diff < bestDiff || (diff === bestDiff && optionMinutes > bestMinutes)) {\n bestOption = option\n bestDiff = diff\n bestMinutes = optionMinutes\n }\n }\n\n return bestOption\n}\n\ntype HourPickerScrollButtonDirection = \"up\" | \"down\"\n\ntype HourPickerScrollButtonProps = {\n direction: HourPickerScrollButtonDirection\n viewportRef: React.RefObject<HTMLElement | null>\n speed?: number\n className?: string\n}\n\nfunction HourPickerScrollButton({\n direction,\n viewportRef,\n speed = 400,\n className,\n}: HourPickerScrollButtonProps) {\n const [disabled, setDisabled] = React.useState(true)\n const animationRef = React.useRef<number | undefined>(undefined)\n const lastTimeRef = React.useRef<number | undefined>(undefined)\n const isScrollingRef = React.useRef(false)\n\n const checkScrollability = React.useCallback(() => {\n const viewport = viewportRef.current\n if (!viewport) {\n setDisabled(true)\n return\n }\n\n const { scrollTop, scrollHeight, clientHeight } = viewport\n const tolerance = 2\n\n const canScrollUp = scrollTop > tolerance\n const canScrollDown = scrollTop < (scrollHeight - clientHeight - tolerance)\n const hasScrollableContent = scrollHeight > clientHeight + tolerance\n\n if (!hasScrollableContent) {\n setDisabled(true)\n return\n }\n\n const shouldDisable = direction === \"up\" ? !canScrollUp : !canScrollDown\n setDisabled(shouldDisable)\n }, [direction, viewportRef])\n\n React.useEffect(() => {\n const viewport = viewportRef.current\n if (!viewport) return\n\n checkScrollability()\n\n const handleScroll = () => checkScrollability()\n const handleResize = () => checkScrollability()\n\n viewport.addEventListener(\"scroll\", handleScroll, { passive: true })\n\n const resizeObserver = new ResizeObserver(handleResize)\n resizeObserver.observe(viewport)\n\n const mutationObserver = new MutationObserver(handleResize)\n mutationObserver.observe(viewport, { childList: true, subtree: true })\n\n return () => {\n viewport.removeEventListener(\"scroll\", handleScroll)\n resizeObserver.disconnect()\n mutationObserver.disconnect()\n }\n }, [viewportRef, checkScrollability])\n\n const stopScrolling = React.useCallback(() => {\n if (animationRef.current) {\n cancelAnimationFrame(animationRef.current)\n animationRef.current = undefined\n }\n isScrollingRef.current = false\n lastTimeRef.current = undefined\n }, [])\n\n const smoothScroll = React.useCallback(\n (currentTime: number) => {\n const viewport = viewportRef.current\n if (!viewport || disabled || !isScrollingRef.current) {\n stopScrolling()\n return\n }\n\n if (!lastTimeRef.current) {\n lastTimeRef.current = currentTime\n }\n\n const deltaTime = currentTime - lastTimeRef.current\n const distance = (speed * deltaTime) / 1000\n\n if (distance < 0.1) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n return\n }\n\n const oldScrollTop = viewport.scrollTop\n const maxScroll = viewport.scrollHeight - viewport.clientHeight\n\n let newScrollTop: number\n if (direction === \"up\") {\n newScrollTop = Math.max(0, oldScrollTop - distance)\n } else {\n newScrollTop = Math.min(maxScroll, oldScrollTop + distance)\n }\n\n viewport.scrollTo({ top: newScrollTop })\n\n lastTimeRef.current = currentTime\n\n const tolerance = 1\n const canContinue =\n direction === \"up\"\n ? newScrollTop > tolerance\n : newScrollTop < (maxScroll - tolerance)\n\n if (canContinue && Math.abs(newScrollTop - oldScrollTop) > 0.01) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n } else {\n stopScrolling()\n setTimeout(checkScrollability, 16)\n }\n },\n [checkScrollability, direction, disabled, speed, stopScrolling, viewportRef],\n )\n\n const startScrolling = React.useCallback(() => {\n if (disabled || !viewportRef.current || isScrollingRef.current) return\n\n isScrollingRef.current = true\n lastTimeRef.current = undefined\n animationRef.current = requestAnimationFrame(smoothScroll)\n }, [disabled, smoothScroll, viewportRef])\n\n React.useEffect(() => stopScrolling, [stopScrolling])\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center py-1 select-none\",\n disabled ? \"cursor-default opacity-40\" : \"cursor-pointer opacity-100 hover:bg-accent/20\",\n className\n )}\n onPointerEnter={() => {\n if (!disabled) startScrolling()\n }}\n onPointerMove={() => {\n if (!disabled && !isScrollingRef.current) startScrolling()\n }}\n onPointerLeave={() => {\n stopScrolling()\n }}\n >\n {direction === \"up\"\n ? <ChevronUp aria-hidden className=\"h-4 w-4 opacity-50\" />\n : <ChevronDown aria-hidden className=\"h-4 w-4 opacity-50\" />}\n </div>\n )\n}\n\nexport type HourPickerInputProps = {\n id?: string\n value: string | null\n onChange: (value: string | null) => void\n onValueUpdate?: (value: string | null) => void\n options: HourPickerOption[]\n placeholder?: string\n className?: string\n inputClassName?: string\n disabled?: boolean\n readOnly?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n triggerTestId?: string\n contentTestId?: string\n isHydrated?: boolean\n}\n\nexport function HourPickerInput({\n id,\n value,\n onChange,\n onValueUpdate,\n options,\n placeholder = \"Select time\",\n className,\n inputClassName,\n disabled,\n readOnly,\n open: openProp,\n onOpenChange,\n triggerTestId,\n contentTestId,\n isHydrated,\n}: HourPickerInputProps) {\n const reactId = React.useId()\n const triggerId = id ?? `hours-picker-${reactId}`\n const triggerInputRef = React.useRef<HTMLInputElement | null>(null)\n const setTriggerDraftValueRef = React.useRef<((value: string) => void) | null>(null)\n const setTriggerDraftValueHandler = React.useCallback((handler: ((value: string) => void) | null) => {\n setTriggerDraftValueRef.current = handler\n }, [])\n const highlightedValueRef = React.useRef<string | null>(null)\n const keyboardNavigationActiveRef = React.useRef(false)\n const [highlightedValue, setHighlightedValue] = React.useState<string | null>(null)\n const containerRef = React.useRef<HTMLDivElement | null>(null)\n const desktopPopoverRef = React.useRef<HTMLDivElement | null>(null)\n const desktopContentRef = React.useRef<HTMLDivElement | null>(null)\n const [desktopPopoverPosition, setDesktopPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n width: 0,\n }))\n\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (disabled || readOnly) {\n return\n }\n\n const input = triggerInputRef.current\n if (!(input instanceof HTMLInputElement)) {\n return\n }\n if (typeof document !== \"undefined\" && document.activeElement === input) {\n return\n }\n\n input.focus({ preventScroll: true })\n }, [disabled, open, readOnly])\n\n const updateHighlightedValue = React.useCallback((next: string | null) => {\n highlightedValueRef.current = next\n setHighlightedValue(next)\n }, [])\n\n const markKeyboardNavigation = React.useCallback(() => {\n keyboardNavigationActiveRef.current = true\n }, [])\n\n React.useEffect(() => {\n if (!open) return\n\n const currentOption = options.find((option) => option.value === value)\n if (currentOption && isOptionSelectable(currentOption)) {\n updateHighlightedValue(currentOption.value)\n return\n }\n\n const firstEnabled = options.find((option) => isOptionSelectable(option))\n updateHighlightedValue(firstEnabled?.value ?? null)\n }, [open, options, updateHighlightedValue, value])\n\n const updateValue = React.useCallback(\n (next: string | null) => {\n if (next === null) {\n if (onValueUpdate) {\n onValueUpdate(null)\n }\n return\n }\n\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n },\n [onValueUpdate, options],\n )\n\n const commitValue = React.useCallback(\n (next: string | null) => {\n if (next === null) {\n if (onValueUpdate) {\n onValueUpdate(null)\n }\n onChange(null)\n return\n }\n\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n\n onChange(next)\n },\n [onChange, onValueUpdate, options],\n )\n\n React.useEffect(() => {\n if (!open) return\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) {\n return\n }\n\n const container = containerRef.current\n if (!container) {\n return\n }\n\n if (container.contains(target)) {\n return\n }\n\n const popover = desktopPopoverRef.current\n if (popover?.contains(target)) {\n return\n }\n\n setOpen(false)\n }\n\n document.addEventListener(\"pointerdown\", handlePointerDown, true)\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown, true)\n }\n }, [open, setOpen])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n\n const popover = desktopPopoverRef.current\n if (!popover) {\n return\n }\n\n const handleWheel = (event: WheelEvent) => {\n const viewport = desktopContentRef.current\n if (!viewport) {\n return\n }\n\n const deltaY = event.deltaY\n if (deltaY === 0) {\n return\n }\n\n const maxScrollTop = Math.max(0, viewport.scrollHeight - viewport.clientHeight)\n const atTop = viewport.scrollTop <= 0\n const atBottom = viewport.scrollTop >= maxScrollTop\n\n const target = event.target\n const isWheelOverViewport = target instanceof Node && viewport.contains(target)\n\n if (isWheelOverViewport) {\n if ((deltaY < 0 && atTop) || (deltaY > 0 && atBottom)) {\n event.preventDefault()\n }\n return\n }\n\n event.preventDefault()\n const nextScrollTop = Math.min(maxScrollTop, Math.max(0, viewport.scrollTop + deltaY))\n viewport.scrollTop = nextScrollTop\n }\n\n popover.addEventListener(\"wheel\", handleWheel, { passive: false })\n return () => {\n popover.removeEventListener(\"wheel\", handleWheel)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (openProp !== undefined && !onOpenChange) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const trigger = triggerInputRef.current\n if (!(trigger instanceof HTMLElement)) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(trigger)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [onOpenChange, open, openProp, setOpen])\n\n const updateDesktopPopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n\n const trigger = triggerInputRef.current\n const popover = desktopPopoverRef.current\n if (!(trigger instanceof HTMLElement) || !popover) return\n\n const rect = trigger.getBoundingClientRect()\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n const width = rect.width\n\n let left = rect.left\n if (left + width > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - width - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setDesktopPopoverPosition({ left, top, width })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updateDesktopPopoverPosition()\n const rafId = window.requestAnimationFrame(updateDesktopPopoverPosition)\n\n window.addEventListener(\"scroll\", updateDesktopPopoverPosition, true)\n window.addEventListener(\"resize\", updateDesktopPopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updateDesktopPopoverPosition, true)\n window.removeEventListener(\"resize\", updateDesktopPopoverPosition)\n }\n }, [disabled, open, updateDesktopPopoverPosition])\n\n React.useEffect(() => {\n if (!open) return\n\n const viewport = desktopContentRef.current\n if (!viewport) return\n\n const run = () => {\n const selected = viewport.querySelector(\"[role=\\\"option\\\"][data-state=\\\"checked\\\"]\")\n if (selected instanceof HTMLElement) {\n const padding = 8\n const targetTop = selected.offsetTop - padding\n const targetBottom = selected.offsetTop + selected.offsetHeight + padding\n\n if (targetTop < viewport.scrollTop) {\n viewport.scrollTop = Math.max(0, targetTop)\n return\n }\n\n const viewportBottom = viewport.scrollTop + viewport.clientHeight\n if (targetBottom > viewportBottom) {\n viewport.scrollTop = Math.max(0, targetBottom - viewport.clientHeight)\n }\n return\n }\n\n const all = Array.from(viewport.querySelectorAll(\"[role=\\\"option\\\"]\")) as HTMLElement[]\n if (!all.length) return\n\n let firstEnabled: HTMLElement | undefined\n let lastDisabledBefore: HTMLElement | undefined\n\n for (const el of all) {\n const isDisabled = el.hasAttribute(\"data-disabled\")\n if (!isDisabled) {\n firstEnabled = el\n break\n }\n lastDisabledBefore = el\n }\n\n if (!firstEnabled) return\n\n const target = lastDisabledBefore ? lastDisabledBefore : firstEnabled\n\n const offset = Math.max(0, target.offsetTop - 8)\n viewport.scrollTop = offset\n }\n\n const raf = requestAnimationFrame(run)\n return () => cancelAnimationFrame(raf)\n }, [open, options])\n\n React.useEffect(() => {\n if (!open) return\n if (!highlightedValue) return\n if (!keyboardNavigationActiveRef.current) return\n\n const viewport = desktopContentRef.current\n if (!viewport) return\n\n const target = viewport.querySelector(`[role=\"option\"][data-value=\"${highlightedValue}\"]`)\n if (!(target instanceof HTMLElement)) return\n\n const padding = 8\n const targetTop = target.offsetTop - padding\n const targetBottom = target.offsetTop + target.offsetHeight + padding\n\n if (targetTop < viewport.scrollTop) {\n viewport.scrollTop = Math.max(0, targetTop)\n return\n }\n\n const viewportBottom = viewport.scrollTop + viewport.clientHeight\n if (targetBottom > viewportBottom) {\n viewport.scrollTop = Math.max(0, targetBottom - viewport.clientHeight)\n }\n }, [highlightedValue, open])\n\n return (\n <div\n data-slot=\"hours-picker-input\"\n className={cn(\"w-[150px]\", className)}\n ref={containerRef}\n >\n <div className=\"relative\">\n <HourPickerMaskedSelectTrigger\n id={triggerId}\n placeholder={placeholder}\n value={value}\n onValueUpdate={updateValue}\n onCommit={commitValue}\n options={options}\n disabled={disabled}\n readOnly={readOnly}\n open={open}\n setOpen={setOpen}\n inputClassName={inputClassName}\n triggerTestId={triggerTestId}\n isHydrated={isHydrated}\n highlightedValueRef={highlightedValueRef}\n setHighlightedValue={updateHighlightedValue}\n markKeyboardNavigation={markKeyboardNavigation}\n inputRef={(node) => {\n triggerInputRef.current = node\n }}\n onDraftValueHandlerChange={setTriggerDraftValueHandler}\n />\n\n {open ? (() => {\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={desktopPopoverRef}\n data-testid={contentTestId}\n data-state=\"open\"\n className={cn(\n \"pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n )}\n style={{\n left: desktopPopoverPosition.left,\n top: desktopPopoverPosition.top,\n width: desktopPopoverPosition.width,\n }}\n >\n <HourPickerScrollButton\n direction=\"up\"\n viewportRef={desktopContentRef}\n />\n\n <div\n ref={desktopContentRef}\n role=\"listbox\"\n className=\"max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\"\n >\n {options.map((option) => {\n const isChecked = option.value === value\n\n return (\n <div\n key={option.value}\n role=\"option\"\n aria-selected={isChecked}\n data-value={option.value}\n data-state={isChecked ? \"checked\" : \"unchecked\"}\n data-disabled={option.disabled ? \"\" : undefined}\n className={cn(\n \"relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer\",\n option.disabled && \"pointer-events-none opacity-50\",\n highlightedValue === option.value && \"bg-accent text-accent-foreground\",\n )}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n onClick={() => {\n if (option.disabled) return\n\n setTriggerDraftValueRef.current?.(option.value)\n updateHighlightedValue(option.value)\n triggerInputRef.current?.focus({ preventScroll: true })\n commitValue(option.value)\n setOpen(false)\n }}\n onPointerEnter={() => {\n if (keyboardNavigationActiveRef.current) return\n keyboardNavigationActiveRef.current = false\n updateHighlightedValue(option.value)\n }}\n onPointerMove={(event) => {\n if (keyboardNavigationActiveRef.current && event.movementX === 0 && event.movementY === 0) {\n return\n }\n keyboardNavigationActiveRef.current = false\n updateHighlightedValue(option.value)\n }}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n {isChecked ? <Check aria-hidden className=\"h-4 w-4\" /> : null}\n </span>\n\n <div className=\"flex flex-col\">\n <span>{option.label}</span>\n {option.description != null ? (\n <span data-slot=\"description\" className=\"text-xs text-muted-foreground\">\n {option.description}\n </span>\n ) : null}\n </div>\n </div>\n )\n })}\n </div>\n\n <HourPickerScrollButton\n direction=\"down\"\n viewportRef={desktopContentRef}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })() : null}\n </div>\n </div>\n )\n}\n\nHourPickerInput.displayName = \"HourPickerInput\"\n\nexport type HourPickerFieldProps = HourPickerInputProps\n\nfunction HourPickerSelectField({\n id,\n value,\n onChange,\n onValueUpdate,\n options,\n placeholder = \"Select time\",\n className,\n inputClassName,\n disabled,\n open,\n onOpenChange,\n triggerTestId,\n contentTestId,\n isHydrated,\n}: HourPickerFieldProps) {\n const commitValue = React.useCallback(\n (next: string) => {\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate, options],\n )\n\n return (\n <div data-slot=\"hours-picker-field\" className={cn(\"w-[150px]\", className)}>\n <Select\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n value={value ?? \"\"}\n onValueChange={(next) => commitValue(next)}\n >\n <SelectTrigger\n id={id}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n className={cn(\n \"transition-colors hover:bg-accent hover:text-accent-foreground\",\n !value && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n \"[&_[data-slot='description']]:hidden\",\n inputClassName,\n )}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n\n <SelectContent\n data-testid={contentTestId}\n autoScroll={\"firstEnabledWithContext\"}\n className=\"max-h-64 overflow-y-auto\"\n >\n {options.map((option) => (\n <SelectItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n <span>{option.label}</span>\n {option.description != null ? (\n <span data-slot=\"description\" className=\"block text-xs text-muted-foreground\">\n {option.description}\n </span>\n ) : null}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n )\n}\n\nexport function HourPickerField(props: HourPickerFieldProps) {\n const isTouchDevice = useIsTouchDevice()\n\n if (isTouchDevice) {\n return <HourPickerSelectField {...props} />\n }\n\n return <HourPickerInput {...props} />\n}\n\nHourPickerField.displayName = \"HourPickerField\"\n\ntype HourPickerMaskedSelectTriggerProps = {\n id: string\n placeholder: string\n value: string | null\n onValueUpdate: (value: string | null) => void\n onCommit: (value: string | null) => void\n options: HourPickerOption[]\n disabled?: boolean\n readOnly?: boolean\n open: boolean\n setOpen: (open: boolean) => void\n inputClassName?: string\n triggerTestId?: string\n isHydrated?: boolean\n highlightedValueRef: React.MutableRefObject<string | null>\n setHighlightedValue: (value: string | null) => void\n markKeyboardNavigation: () => void\n inputRef: (node: HTMLInputElement | null) => void\n onDraftValueHandlerChange: (handler: ((value: string) => void) | null) => void\n}\n\nfunction HourPickerMaskedSelectTrigger({\n id,\n placeholder,\n value,\n onValueUpdate,\n onCommit,\n options,\n disabled,\n readOnly,\n open,\n setOpen,\n inputClassName,\n triggerTestId,\n isHydrated,\n highlightedValueRef,\n setHighlightedValue,\n markKeyboardNavigation,\n inputRef,\n onDraftValueHandlerChange,\n}: HourPickerMaskedSelectTriggerProps) {\n const isEditingRef = React.useRef(false)\n const pointerDownOnInputRef = React.useRef(false)\n const inputWasFocusedOnPointerDownRef = React.useRef(false)\n const ignoreNextMaskCommitValueRef = React.useRef<string | null>(null)\n\n const [draft, setDraft] = React.useState(() => (value ? value : \"\"))\n\n React.useEffect(() => {\n onDraftValueHandlerChange((nextValue) => {\n setDraft(nextValue)\n })\n return () => {\n onDraftValueHandlerChange(null)\n }\n }, [onDraftValueHandlerChange])\n\n const moveSelection = React.useCallback(\n (direction: -1 | 1) => {\n const base = highlightedValueRef.current ?? value ?? \"\"\n\n let baseIndex = options.findIndex((option) => option.value === base)\n if (baseIndex === -1) {\n baseIndex = direction === 1 ? -1 : options.length\n }\n\n for (let nextIndex = baseIndex + direction; nextIndex >= 0 && nextIndex < options.length; nextIndex += direction) {\n const nextOption = options[nextIndex]\n if (!isOptionSelectable(nextOption)) continue\n\n setHighlightedValue(nextOption.value)\n ignoreNextMaskCommitValueRef.current = nextOption.value\n setDraft(nextOption.value)\n onValueUpdate(nextOption.value)\n return\n }\n },\n [highlightedValueRef, onValueUpdate, options, setHighlightedValue, value],\n )\n\n React.useEffect(() => {\n if (isEditingRef.current) return\n setDraft(value ? value : \"\")\n }, [value])\n\n const triggerClassName = cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n !draft && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n \"[&_[data-slot='description']]:hidden\",\n inputClassName,\n )\n\n return (\n <div className=\"relative group\">\n <IMaskInput\n id={id}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n type=\"text\"\n disabled={disabled}\n readOnly={readOnly}\n inputRef={inputRef}\n autoComplete={\"off\"}\n mask={[\n { mask: \"00:00\", lazy: true },\n { mask: \"0:00\", lazy: true },\n ]}\n dispatch={(appended, dynamicMasked) => {\n const digits = (dynamicMasked.value + appended).replace(/\\D/g, \"\")\n if (digits.length <= 2) return dynamicMasked.compiledMasks[0]\n if (digits.length >= 4) return dynamicMasked.compiledMasks[0]\n\n const hourPrefix = pad2(Number(digits.slice(0, 2)))\n const hasTwoDigitHour = options.some((option) => option.value.startsWith(`${hourPrefix}:`))\n if (hasTwoDigitHour) return dynamicMasked.compiledMasks[0]\n\n return dynamicMasked.compiledMasks[1]\n }}\n placeholder={placeholder}\n value={draft}\n className={triggerClassName}\n onAccept={(accepted) => {\n const nextText = typeof accepted === \"string\" ? accepted : String(accepted ?? \"\")\n setDraft(nextText)\n\n if (nextText.replace(/\\D/g, \"\").length !== 0) {\n return\n }\n\n if (value) {\n onCommit(null)\n }\n }}\n onComplete={(completed) => {\n const nextText = typeof completed === \"string\" ? completed : String(completed ?? \"\")\n if (ignoreNextMaskCommitValueRef.current === nextText) {\n ignoreNextMaskCommitValueRef.current = null\n return\n }\n\n const resolved = parseTimeInputWithSelectableOption(nextText, options)\n if (!resolved) {\n return\n }\n\n if (resolved.selectableValue) {\n setHighlightedValue(resolved.selectableValue)\n setDraft(resolved.selectableValue)\n\n if (value === resolved.selectableValue) {\n return\n }\n\n onCommit(resolved.selectableValue)\n return\n }\n\n const targetMinutes = timeStringToMinutes(resolved.parsed)\n if (targetMinutes == null) {\n return\n }\n\n const closestOption = findClosestSelectableOption(targetMinutes, options)\n if (!closestOption) {\n return\n }\n\n setHighlightedValue(closestOption.value)\n }}\n onPointerDown={() => {\n pointerDownOnInputRef.current = true\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onMouseDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current = typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onClick={() => {\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onKeyDown={(event) => {\n if (disabled) {\n return\n }\n\n if (event.key === \"Tab\" && open && !event.defaultPrevented) {\n setOpen(false)\n return\n }\n\n if (event.key === \"Escape\") {\n if (!open) {\n return\n }\n event.preventDefault()\n setOpen(false)\n return\n }\n\n if (!open && !event.defaultPrevented) {\n const shouldReopen =\n (event.key.length === 1 || event.key === \"Backspace\" || event.key === \"Delete\") &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n\n if (shouldReopen) {\n setOpen(true)\n }\n }\n\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n markKeyboardNavigation()\n event.preventDefault()\n\n if (!open) {\n setOpen(true)\n return\n }\n\n moveSelection(event.key === \"ArrowDown\" ? 1 : -1)\n return\n }\n\n if (event.key === \"Enter\") {\n markKeyboardNavigation()\n const resolved = parseTimeInputWithSelectableOption(draft, options)\n if (!resolved) {\n if (!open) {\n return\n }\n\n if (draft.trim() !== \"\") {\n return\n }\n\n const highlightedOption = options.find((option) => option.value === highlightedValueRef.current)\n const fallbackValue =\n (isOptionSelectable(highlightedOption) ? highlightedOption?.value : undefined) ??\n options.find((option) => isOptionSelectable(option))?.value\n\n if (!fallbackValue) {\n return\n }\n\n event.preventDefault()\n setHighlightedValue(fallbackValue)\n setDraft(fallbackValue)\n onCommit(fallbackValue)\n setOpen(false)\n return\n }\n\n if (resolved.selectableValue) {\n event.preventDefault()\n setHighlightedValue(resolved.selectableValue)\n setDraft(resolved.selectableValue)\n onCommit(resolved.selectableValue)\n setOpen(false)\n return\n }\n\n const targetMinutes = timeStringToMinutes(resolved.parsed)\n if (targetMinutes == null) {\n return\n }\n\n const closestOption = findClosestSelectableOption(targetMinutes, options)\n if (!closestOption) {\n return\n }\n\n event.preventDefault()\n setHighlightedValue(closestOption.value)\n setDraft(closestOption.value)\n onCommit(closestOption.value)\n setOpen(false)\n return\n }\n }}\n onFocus={(event) => {\n const shouldSelectAll = !pointerDownOnInputRef.current || !inputWasFocusedOnPointerDownRef.current\n pointerDownOnInputRef.current = false\n inputWasFocusedOnPointerDownRef.current = false\n isEditingRef.current = true\n if (shouldSelectAll) {\n const element = event.currentTarget\n requestAnimationFrame(() => element.select())\n }\n\n if (disabled) {\n return\n }\n\n if (open) {\n return\n }\n\n setOpen(true)\n }}\n onBlur={() => {\n isEditingRef.current = false\n\n const trimmed = draft.trim()\n if (!trimmed) {\n setDraft(value ? value : \"\")\n return\n }\n\n const resolved = parseTimeInputWithSelectableOption(trimmed, options)\n if (!resolved) {\n setDraft(value ? value : \"\")\n return\n }\n\n if (!resolved.selectableValue) {\n setDraft(value ? value : \"\")\n return\n }\n\n setDraft(resolved.selectableValue)\n if (value !== resolved.selectableValue) {\n onCommit(resolved.selectableValue)\n }\n }}\n />\n\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n data-slot=\"hours-picker-input-toggle\"\n className={cn(\n \"absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n )}\n aria-label={open ? \"Close time picker\" : \"Open time picker\"}\n onPointerDown={(event) => {\n event.preventDefault()\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n onClick={() => {\n if (disabled) return\n setOpen(!open)\n }}\n >\n <ChevronDown aria-hidden className=\"size-4\" />\n </button>\n </div>\n )\n}\n"],"names":["imaskAny","IMask","InputMask","pad2","value","parseTimeInput","raw","trimmed","match","hours","minutes","parseTimeInputWithSelectableOption","options","parsed","parsedOption","option","isOptionSelectable","timeStringToMinutes","findClosestSelectableOption","targetMinutes","bestOption","bestDiff","bestMinutes","optionMinutes","diff","HourPickerScrollButton","direction","viewportRef","speed","className","disabled","setDisabled","React","animationRef","lastTimeRef","isScrollingRef","checkScrollability","viewport","scrollTop","scrollHeight","clientHeight","tolerance","canScrollUp","canScrollDown","handleScroll","handleResize","resizeObserver","mutationObserver","stopScrolling","smoothScroll","currentTime","deltaTime","distance","oldScrollTop","maxScroll","newScrollTop","startScrolling","jsx","cn","ChevronUp","ChevronDown","HourPickerInput","id","onChange","onValueUpdate","placeholder","inputClassName","readOnly","openProp","onOpenChange","triggerTestId","contentTestId","isHydrated","reactId","triggerId","triggerInputRef","setTriggerDraftValueRef","setTriggerDraftValueHandler","handler","highlightedValueRef","keyboardNavigationActiveRef","highlightedValue","setHighlightedValue","containerRef","desktopPopoverRef","desktopContentRef","desktopPopoverPosition","setDesktopPopoverPosition","uncontrolledOpen","setUncontrolledOpen","open","setOpen","input","updateHighlightedValue","next","markKeyboardNavigation","currentOption","firstEnabled","updateValue","matchingOption","commitValue","handlePointerDown","event","target","container","popover","handleWheel","deltaY","maxScrollTop","atTop","atBottom","nextScrollTop","trigger","isActive","observer","entries","entry","updateDesktopPopoverPosition","rect","popoverHeight","viewportWidth","viewportHeight","padding","width","left","top","overflowBottom","aboveTop","rafId","raf","selected","targetTop","targetBottom","viewportBottom","all","lastDisabledBefore","el","offset","jsxs","HourPickerMaskedSelectTrigger","node","DismissableLayerBranch","isChecked","Check","createPortal","HourPickerSelectField","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","HourPickerField","props","useIsTouchDevice","onCommit","inputRef","onDraftValueHandlerChange","isEditingRef","pointerDownOnInputRef","inputWasFocusedOnPointerDownRef","ignoreNextMaskCommitValueRef","draft","setDraft","nextValue","moveSelection","base","baseIndex","nextIndex","nextOption","triggerClassName","IMaskInput","appended","dynamicMasked","digits","hourPrefix","accepted","nextText","completed","resolved","closestOption","highlightedOption","fallbackValue","shouldSelectAll","element"],"mappings":";;;;;;;;;;AAcA,MAAMA,KAAWC;AACb,OAAOD,GAAS,aAAc,eAChCA,GAAS,YAAYE;AAWvB,SAASC,EAAKC,GAAe;AAC3B,SAAO,OAAOA,CAAK,EAAE,SAAS,GAAG,GAAG;AACtC;AAEA,SAASC,GAAeC,GAAa;AACnC,QAAMC,IAAUD,EAAI,KAAA;AACpB,MAAI,CAACC,EAAS,QAAO;AAErB,QAAMC,IAAQ,sBAAsB,KAAKD,CAAO;AAChD,MAAI,CAACC;AACH,WAAO;AAGT,QAAMC,IAAQ,OAAOD,EAAM,CAAC,CAAC,GACvBE,IAAU,OAAOF,EAAM,CAAC,CAAC;AAK/B,SAJI,CAAC,OAAO,SAASC,CAAK,KAAK,CAAC,OAAO,SAASC,CAAO,KAInDD,IAAQ,KAAKA,IAAQ,MAAMC,IAAU,KAAKA,IAAU,KAC/C,OAGF,GAAGP,EAAKM,CAAK,CAAC,IAAIN,EAAKO,CAAO,CAAC;AACxC;AAOA,SAASC,EAAmCL,GAAaM,GAA2D;AAClH,QAAMC,IAASR,GAAeC,CAAG;AACjC,MAAI,CAACO,EAAQ,QAAO;AAEpB,QAAMC,IAAeF,EAAQ,KAAK,CAACG,MAAWA,EAAO,UAAUF,CAAM;AACrE,SAAIG,EAAmBF,CAAY,IAC1B,EAAE,QAAAD,GAAQ,iBAAiBA,EAAA,IAG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,GAAS;AACZ,YAAA2J,EAAS9J,KAAgB,EAAE;AAC3B;AAAA,UACF;AAEA,gBAAM8K,IAAWvK,EAAmCJ,GAASK,CAAO;AACpE,cAAI,CAACsK,GAAU;AACb,YAAAhB,EAAS9J,KAAgB,EAAE;AAC3B;AAAA,UACF;AAEA,cAAI,CAAC8K,EAAS,iBAAiB;AAC7B,YAAAhB,EAAS9J,KAAgB,EAAE;AAC3B;AAAA,UACF;AAEA,UAAA8J,EAASgB,EAAS,eAAe,GAC7B9K,MAAU8K,EAAS,mBACrBxB,EAASwB,EAAS,eAAe;AAAA,QAErC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGFzH,gBAAAA,EAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAU;AAAA,QACV,UAAA3B;AAAA,QACA,aAAU;AAAA,QACV,WAAW4B;AAAA,UACT;AAAA,QAAA;AAAA,QAEF,cAAYgC,IAAO,sBAAsB;AAAA,QACzC,eAAe,CAACY,MAAU;AACxB,UAAAA,EAAM,eAAA;AAAA,QACR;AAAA,QACA,aAAa,CAACA,MAAU;AACtB,UAAAA,EAAM,eAAA;AAAA,QACR;AAAA,QACA,SAAS,MAAM;AACb,UAAIxE,KACJ6D,EAAQ,CAACD,CAAI;AAAA,QACf;AAAA,QAEA,UAAAjC,gBAAAA,EAAAA,IAACG,IAAA,EAAY,eAAW,IAAC,WAAU,SAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAC9C,GACF;AAEJ;"}
package/dist/index190.js CHANGED
@@ -1,9 +1,14 @@
1
- import { endOfWeek as n } from "./index192.js";
2
- function f(e, t) {
3
- return n(e, { ...t, weekStartsOn: 1 });
1
+ import { normalizeDates as l } from "./index283.js";
2
+ function s(n, r, a) {
3
+ const [e, t] = l(
4
+ a?.in,
5
+ n,
6
+ r
7
+ ), o = e.getFullYear() - t.getFullYear(), f = e.getMonth() - t.getMonth();
8
+ return o * 12 + f;
4
9
  }
5
10
  export {
6
- f as default,
7
- f as endOfISOWeek
11
+ s as default,
12
+ s as differenceInCalendarMonths
8
13
  };
9
14
  //# sourceMappingURL=index190.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index190.js","sources":["../../../node_modules/date-fns/endOfISOWeek.js"],"sourcesContent":["import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\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 end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n"],"names":["endOfISOWeek","date","options","endOfWeek"],"mappings":";AA8BO,SAASA,EAAaC,GAAMC,GAAS;AAC1C,SAAOC,EAAUF,GAAM,EAAE,GAAGC,GAAS,cAAc,GAAG;AACxD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index190.js","sources":["../../../node_modules/date-fns/differenceInCalendarMonths.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n"],"names":["differenceInCalendarMonths","laterDate","earlierDate","options","laterDate_","earlierDate_","normalizeDates","yearsDiff","monthsDiff"],"mappings":";AA4BO,SAASA,EAA2BC,GAAWC,GAAaC,GAAS;AAC1E,QAAM,CAACC,GAAYC,CAAY,IAAIC;AAAA,IACjCH,GAAS;AAAA,IACTF;AAAA,IACAC;AAAA,EACJ,GAEQK,IAAYH,EAAW,YAAW,IAAKC,EAAa,YAAW,GAC/DG,IAAaJ,EAAW,SAAQ,IAAKC,EAAa,SAAQ;AAEhE,SAAOE,IAAY,KAAKC;AAC1B;","x_google_ignoreList":[0]}
package/dist/index191.js CHANGED
@@ -1,10 +1,18 @@
1
- import { toDate as r } from "./index279.js";
2
- function s(e, o) {
3
- const t = r(e, o?.in), n = t.getMonth();
4
- return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
1
+ import { normalizeInterval as l } from "./index284.js";
2
+ import { constructFrom as m } from "./index279.js";
3
+ function u(s, a) {
4
+ const { start: e, end: r } = l(a?.in, s);
5
+ let n = +e > +r;
6
+ const c = n ? +e : +r, t = n ? r : e;
7
+ t.setHours(0, 0, 0, 0), t.setDate(1);
8
+ let i = 1;
9
+ const o = [];
10
+ for (; +t <= c; )
11
+ o.push(m(e, t)), t.setMonth(t.getMonth() + i);
12
+ return n ? o.reverse() : o;
5
13
  }
6
14
  export {
7
- s as default,
8
- s as endOfMonth
15
+ u as default,
16
+ u as eachMonthOfInterval
9
17
  };
10
18
  //# sourceMappingURL=index191.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index191.js","sources":["../../../node_modules/date-fns/endOfMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\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 end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n"],"names":["endOfMonth","date","options","_date","toDate","month"],"mappings":";AA4BO,SAASA,EAAWC,GAAMC,GAAS;AACxC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAQF,EAAM,SAAQ;AAC5B,SAAAA,EAAM,YAAYA,EAAM,YAAW,GAAIE,IAAQ,GAAG,CAAC,GACnDF,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index191.js","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"],"names":["eachMonthOfInterval","interval","options","start","end","normalizeInterval","reversed","endTime","date","step","dates","constructFrom"],"mappings":";;AA2CO,SAASA,EAAoBC,GAAUC,GAAS;AACrD,QAAM,EAAE,OAAAC,GAAO,KAAAC,EAAG,IAAKC,EAAkBH,GAAS,IAAID,CAAQ;AAE9D,MAAIK,IAAW,CAACH,IAAQ,CAACC;AACzB,QAAMG,IAAUD,IAAW,CAACH,IAAQ,CAACC,GAC/BI,IAAOF,IAAWF,IAAMD;AAC9B,EAAAK,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,QAAQ,CAAC;AAEd,MAAIC,IAAwB;AAO5B,QAAMC,IAAQ,CAAA;AAEd,SAAO,CAACF,KAAQD;AACd,IAAAG,EAAM,KAAKC,EAAcR,GAAOK,CAAI,CAAC,GACrCA,EAAK,SAASA,EAAK,SAAQ,IAAKC,CAAI;AAGtC,SAAOH,IAAWI,EAAM,QAAO,IAAKA;AACtC;","x_google_ignoreList":[0]}
package/dist/index192.js CHANGED
@@ -1,11 +1,18 @@
1
- import { getDefaultOptions as f } from "./index284.js";
2
- import { toDate as c } from "./index279.js";
3
- function l(s, e) {
4
- const a = f(), n = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(s, e?.in), o = t.getDay(), r = (o < n ? -7 : 0) + 6 - (o - n);
5
- return t.setDate(t.getDate() + r), t.setHours(23, 59, 59, 999), t;
1
+ import { normalizeInterval as u } from "./index284.js";
2
+ import { constructFrom as i } from "./index279.js";
3
+ function f(o, a) {
4
+ const { start: t, end: r } = u(a?.in, o);
5
+ let s = +t > +r;
6
+ const l = s ? +t : +r, e = s ? r : t;
7
+ e.setHours(0, 0, 0, 0), e.setMonth(0, 1);
8
+ let c = 1;
9
+ const n = [];
10
+ for (; +e <= l; )
11
+ n.push(i(t, e)), e.setFullYear(e.getFullYear() + c);
12
+ return s ? n.reverse() : n;
6
13
  }
7
14
  export {
8
- l as default,
9
- l as endOfWeek
15
+ f as default,
16
+ f as eachYearOfInterval
10
17
  };
11
18
  //# sourceMappingURL=index192.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index192.js","sources":["../../../node_modules/date-fns/endOfWeek.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\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 end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n"],"names":["endOfWeek","date","options","defaultOptions","getDefaultOptions","weekStartsOn","_date","toDate","day","diff"],"mappings":";;AAkCO,SAASA,EAAUC,GAAMC,GAAS;AACvC,QAAMC,IAAiBC,EAAiB,GAClCC,IACJH,GAAS,gBACTA,GAAS,QAAQ,SAAS,gBAC1BC,EAAe,gBACfA,EAAe,QAAQ,SAAS,gBAChC,GAEIG,IAAQC,EAAON,GAAMC,GAAS,EAAE,GAChCM,IAAMF,EAAM,OAAM,GAClBG,KAAQD,IAAMH,IAAe,KAAK,KAAK,KAAKG,IAAMH;AAExD,SAAAC,EAAM,QAAQA,EAAM,QAAO,IAAKG,CAAI,GACpCH,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index192.js","sources":["../../../node_modules/date-fns/eachYearOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps 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 yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2017, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Thu Jan 01 2015 00:00:00,\n * // Fri Jan 01 2016 00:00:00,\n * // Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(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.setMonth(0, 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.setFullYear(date.getFullYear() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n"],"names":["eachYearOfInterval","interval","options","start","end","normalizeInterval","reversed","endTime","date","step","dates","constructFrom"],"mappings":";;AA2CO,SAASA,EAAmBC,GAAUC,GAAS;AACpD,QAAM,EAAE,OAAAC,GAAO,KAAAC,EAAG,IAAKC,EAAkBH,GAAS,IAAID,CAAQ;AAE9D,MAAIK,IAAW,CAACH,IAAQ,CAACC;AACzB,QAAMG,IAAUD,IAAW,CAACH,IAAQ,CAACC,GAC/BI,IAAOF,IAAWF,IAAMD;AAC9B,EAAAK,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,SAAS,GAAG,CAAC;AAElB,MAAIC,IAAwB;AAO5B,QAAMC,IAAQ,CAAA;AAEd,SAAO,CAACF,KAAQD;AACd,IAAAG,EAAM,KAAKC,EAAcR,GAAOK,CAAI,CAAC,GACrCA,EAAK,YAAYA,EAAK,YAAW,IAAKC,CAAI;AAG5C,SAAOH,IAAWI,EAAM,QAAO,IAAKA;AACtC;","x_google_ignoreList":[0]}
package/dist/index193.js CHANGED
@@ -1,10 +1,9 @@
1
- import { toDate as o } from "./index279.js";
2
- function s(t, r) {
3
- const e = o(t, r?.in), a = e.getFullYear();
4
- return e.setFullYear(a + 1, 0, 0), e.setHours(23, 59, 59, 999), e;
1
+ import { endOfWeek as n } from "./index195.js";
2
+ function f(e, t) {
3
+ return n(e, { ...t, weekStartsOn: 1 });
5
4
  }
6
5
  export {
7
- s as default,
8
- s as endOfYear
6
+ f as default,
7
+ f as endOfISOWeek
9
8
  };
10
9
  //# sourceMappingURL=index193.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index193.js","sources":["../../../node_modules/date-fns/endOfYear.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\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 - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n"],"names":["endOfYear","date","options","_date","toDate","year"],"mappings":";AA4BO,SAASA,EAAUC,GAAMC,GAAS;AACvC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAOF,EAAM,YAAW;AAC9B,SAAAA,EAAM,YAAYE,IAAO,GAAG,GAAG,CAAC,GAChCF,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index193.js","sources":["../../../node_modules/date-fns/endOfISOWeek.js"],"sourcesContent":["import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\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 end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n"],"names":["endOfISOWeek","date","options","endOfWeek"],"mappings":";AA8BO,SAASA,EAAaC,GAAMC,GAAS;AAC1C,SAAOC,EAAUF,GAAM,EAAE,GAAGC,GAAS,cAAc,GAAG;AACxD;","x_google_ignoreList":[0]}
package/dist/index194.js CHANGED
@@ -1,13 +1,10 @@
1
- import { millisecondsInWeek as f } from "./index280.js";
2
- import { startOfISOWeek as i } from "./index209.js";
3
- import { startOfISOWeekYear as m } from "./index291.js";
4
- import { toDate as n } from "./index279.js";
5
- function O(e, o) {
6
- const t = n(e, o?.in), r = +i(t) - +m(t);
7
- return Math.round(r / f) + 1;
1
+ import { toDate as r } from "./index280.js";
2
+ function s(e, o) {
3
+ const t = r(e, o?.in), n = t.getMonth();
4
+ return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
8
5
  }
9
6
  export {
10
- O as default,
11
- O as getISOWeek
7
+ s as default,
8
+ s as endOfMonth
12
9
  };
13
10
  //# sourceMappingURL=index194.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index194.js","sources":["../../../node_modules/date-fns/getISOWeek.js"],"sourcesContent":["import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n"],"names":["getISOWeek","date","options","_date","toDate","diff","startOfISOWeek","startOfISOWeekYear","millisecondsInWeek"],"mappings":";;;;AA6BO,SAASA,EAAWC,GAAMC,GAAS;AACxC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAO,CAACC,EAAeH,CAAK,IAAI,CAACI,EAAmBJ,CAAK;AAK/D,SAAO,KAAK,MAAME,IAAOG,CAAkB,IAAI;AACjD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index194.js","sources":["../../../node_modules/date-fns/endOfMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\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 end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n"],"names":["endOfMonth","date","options","_date","toDate","month"],"mappings":";AA4BO,SAASA,EAAWC,GAAMC,GAAS;AACxC,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAQF,EAAM,SAAQ;AAC5B,SAAAA,EAAM,YAAYA,EAAM,YAAW,GAAIE,IAAQ,GAAG,CAAC,GACnDF,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;","x_google_ignoreList":[0]}
package/dist/index195.js CHANGED
@@ -1,9 +1,11 @@
1
- import { toDate as e } from "./index279.js";
2
- function r(t, o) {
3
- return e(t, o?.in).getMonth();
1
+ import { getDefaultOptions as f } from "./index285.js";
2
+ import { toDate as c } from "./index280.js";
3
+ function l(s, e) {
4
+ const a = f(), n = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? a.weekStartsOn ?? a.locale?.options?.weekStartsOn ?? 0, t = c(s, e?.in), o = t.getDay(), r = (o < n ? -7 : 0) + 6 - (o - n);
5
+ return t.setDate(t.getDate() + r), t.setHours(23, 59, 59, 999), t;
4
6
  }
5
7
  export {
6
- r as default,
7
- r as getMonth
8
+ l as default,
9
+ l as endOfWeek
8
10
  };
9
11
  //# sourceMappingURL=index195.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index195.js","sources":["../../../node_modules/date-fns/getMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n"],"names":["getMonth","date","options","toDate"],"mappings":";AAwBO,SAASA,EAASC,GAAMC,GAAS;AACtC,SAAOC,EAAOF,GAAMC,GAAS,EAAE,EAAE,SAAQ;AAC3C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index195.js","sources":["../../../node_modules/date-fns/endOfWeek.js"],"sourcesContent":["import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\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 end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n"],"names":["endOfWeek","date","options","defaultOptions","getDefaultOptions","weekStartsOn","_date","toDate","day","diff"],"mappings":";;AAkCO,SAASA,EAAUC,GAAMC,GAAS;AACvC,QAAMC,IAAiBC,EAAiB,GAClCC,IACJH,GAAS,gBACTA,GAAS,QAAQ,SAAS,gBAC1BC,EAAe,gBACfA,EAAe,QAAQ,SAAS,gBAChC,GAEIG,IAAQC,EAAON,GAAMC,GAAS,EAAE,GAChCM,IAAMF,EAAM,OAAM,GAClBG,KAAQD,IAAMH,IAAe,KAAK,KAAK,KAAKG,IAAMH;AAExD,SAAAC,EAAM,QAAQA,EAAM,QAAO,IAAKG,CAAI,GACpCH,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvBA;AACT;","x_google_ignoreList":[0]}
package/dist/index196.js CHANGED
@@ -1,9 +1,10 @@
1
- import { toDate as r } from "./index279.js";
2
- function o(t, e) {
3
- return r(t, e?.in).getFullYear();
1
+ import { toDate as o } from "./index280.js";
2
+ function s(t, r) {
3
+ const e = o(t, r?.in), a = e.getFullYear();
4
+ return e.setFullYear(a + 1, 0, 0), e.setHours(23, 59, 59, 999), e;
4
5
  }
5
6
  export {
6
- o as default,
7
- o as getYear
7
+ s as default,
8
+ s as endOfYear
8
9
  };
9
10
  //# sourceMappingURL=index196.js.map