@rpcbase/ui 0.182.0 → 0.184.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 (652) 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 +24 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +4 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +5 -4
  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 +4 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +6 -39
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +24 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +6 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +4 -13
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +6 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +5 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +38 -552
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +4 -31
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +5 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +4 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +8 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +5 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +4 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +5 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +6 -53
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +145 -72
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +39 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +571 -115
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +4 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +7 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +13 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +13 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +7 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +31 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +11 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +11 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +8 -6
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +13 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +137 -76
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +101 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +20 -5
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +53 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +72 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +9 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +21 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +16 -7
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +23 -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 +74 -730
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +23 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +35 -5
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +16 -4
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +6 -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 +4 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +4 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +4 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +3 -46
  116. package/dist/index148.js.map +1 -1
  117. package/dist/index149.js +6 -205
  118. package/dist/index149.js.map +1 -1
  119. package/dist/index15.js +870 -22
  120. package/dist/index15.js.map +1 -1
  121. package/dist/index150.js +24 -22
  122. package/dist/index150.js.map +1 -1
  123. package/dist/index151.js +7 -24
  124. package/dist/index151.js.map +1 -1
  125. package/dist/index152.js +6 -399
  126. package/dist/index152.js.map +1 -1
  127. package/dist/index153.js +5 -5
  128. package/dist/index153.js.map +1 -1
  129. package/dist/index154.js +3 -68
  130. package/dist/index154.js.map +1 -1
  131. package/dist/index155.js +4 -2
  132. package/dist/index155.js.map +1 -1
  133. package/dist/index156.js +4 -363
  134. package/dist/index156.js.map +1 -1
  135. package/dist/index157.js +3 -261
  136. package/dist/index157.js.map +1 -1
  137. package/dist/index158.js +4 -60
  138. package/dist/index158.js.map +1 -1
  139. package/dist/index159.js +3 -46
  140. package/dist/index159.js.map +1 -1
  141. package/dist/index16.js +20 -17
  142. package/dist/index16.js.map +1 -1
  143. package/dist/index160.js +3 -169
  144. package/dist/index160.js.map +1 -1
  145. package/dist/index161.js +3 -109
  146. package/dist/index161.js.map +1 -1
  147. package/dist/index162.js +5 -24
  148. package/dist/index162.js.map +1 -1
  149. package/dist/index163.js +69 -8
  150. package/dist/index163.js.map +1 -1
  151. package/dist/index164.js +2 -5
  152. package/dist/index164.js.map +1 -1
  153. package/dist/index165.js +363 -5
  154. package/dist/index165.js.map +1 -1
  155. package/dist/index166.js +261 -4
  156. package/dist/index166.js.map +1 -1
  157. package/dist/index167.js +52 -458
  158. package/dist/index167.js.map +1 -1
  159. package/dist/index168.js +42 -181
  160. package/dist/index168.js.map +1 -1
  161. package/dist/index169.js +156 -94
  162. package/dist/index169.js.map +1 -1
  163. package/dist/index17.js +18 -387
  164. package/dist/index17.js.map +1 -1
  165. package/dist/index170.js +102 -255
  166. package/dist/index170.js.map +1 -1
  167. package/dist/index171.js +24 -9
  168. package/dist/index171.js.map +1 -1
  169. package/dist/index172.js +8 -43
  170. package/dist/index172.js.map +1 -1
  171. package/dist/index173.js +4 -4
  172. package/dist/index173.js.map +1 -1
  173. package/dist/index174.js +5 -605
  174. package/dist/index174.js.map +1 -1
  175. package/dist/index175.js +4 -58
  176. package/dist/index175.js.map +1 -1
  177. package/dist/index176.js +466 -8
  178. package/dist/index176.js.map +1 -1
  179. package/dist/index177.js +178 -59
  180. package/dist/index177.js.map +1 -1
  181. package/dist/index178.js +105 -17
  182. package/dist/index178.js.map +1 -1
  183. package/dist/index179.js +260 -14
  184. package/dist/index179.js.map +1 -1
  185. package/dist/index18.js +431 -693
  186. package/dist/index18.js.map +1 -1
  187. package/dist/index180.js +9 -5
  188. package/dist/index180.js.map +1 -1
  189. package/dist/index181.js +41 -4
  190. package/dist/index181.js.map +1 -1
  191. package/dist/index182.js +4 -6
  192. package/dist/index182.js.map +1 -1
  193. package/dist/index183.js +24 -4
  194. package/dist/index183.js.map +1 -1
  195. package/dist/index184.js +29 -8
  196. package/dist/index184.js.map +1 -1
  197. package/dist/index185.js +5 -18
  198. package/dist/index185.js.map +1 -1
  199. package/dist/index186.js +67 -5
  200. package/dist/index186.js.map +1 -1
  201. package/dist/index187.js +180 -5
  202. package/dist/index187.js.map +1 -1
  203. package/dist/index188.js +46 -13
  204. package/dist/index188.js.map +1 -1
  205. package/dist/index189.js +58 -10
  206. package/dist/index189.js.map +1 -1
  207. package/dist/index19.js +661 -634
  208. package/dist/index19.js.map +1 -1
  209. package/dist/index190.js +8 -14
  210. package/dist/index190.js.map +1 -1
  211. package/dist/index191.js +66 -14
  212. package/dist/index191.js.map +1 -1
  213. package/dist/index192.js +19 -5
  214. package/dist/index192.js.map +1 -1
  215. package/dist/index193.js +16 -6
  216. package/dist/index193.js.map +1 -1
  217. package/dist/index194.js +5 -7
  218. package/dist/index194.js.map +1 -1
  219. package/dist/index195.js +5 -6
  220. package/dist/index195.js.map +1 -1
  221. package/dist/index196.js +6 -9
  222. package/dist/index196.js.map +1 -1
  223. package/dist/index197.js +4 -5
  224. package/dist/index197.js.map +1 -1
  225. package/dist/index198.js +7 -5
  226. package/dist/index198.js.map +1 -1
  227. package/dist/index199.js +17 -9
  228. package/dist/index199.js.map +1 -1
  229. package/dist/index2.js +2 -2
  230. package/dist/index20.js +455 -198
  231. package/dist/index20.js.map +1 -1
  232. package/dist/index200.js +5 -5
  233. package/dist/index200.js.map +1 -1
  234. package/dist/index201.js +5 -5
  235. package/dist/index201.js.map +1 -1
  236. package/dist/index202.js +13 -4
  237. package/dist/index202.js.map +1 -1
  238. package/dist/index203.js +9 -10
  239. package/dist/index203.js.map +1 -1
  240. package/dist/index204.js +14 -10
  241. package/dist/index204.js.map +1 -1
  242. package/dist/index205.js +14 -10
  243. package/dist/index205.js.map +1 -1
  244. package/dist/index206.js +5 -11
  245. package/dist/index206.js.map +1 -1
  246. package/dist/index207.js +6 -11
  247. package/dist/index207.js.map +1 -1
  248. package/dist/index208.js +6 -9
  249. package/dist/index208.js.map +1 -1
  250. package/dist/index209.js +6 -7
  251. package/dist/index209.js.map +1 -1
  252. package/dist/index21.js +263 -5
  253. package/dist/index21.js.map +1 -1
  254. package/dist/index210.js +9 -6
  255. package/dist/index210.js.map +1 -1
  256. package/dist/index211.js +5 -5
  257. package/dist/index211.js.map +1 -1
  258. package/dist/index212.js +5 -6
  259. package/dist/index212.js.map +1 -1
  260. package/dist/index213.js +9 -7
  261. package/dist/index213.js.map +1 -1
  262. package/dist/index214.js +5 -6
  263. package/dist/index214.js.map +1 -1
  264. package/dist/index215.js +5 -55
  265. package/dist/index215.js.map +1 -1
  266. package/dist/index216.js +4 -16
  267. package/dist/index216.js.map +1 -1
  268. package/dist/index217.js +11 -7
  269. package/dist/index217.js.map +1 -1
  270. package/dist/index218.js +10 -10
  271. package/dist/index218.js.map +1 -1
  272. package/dist/index219.js +10 -10
  273. package/dist/index219.js.map +1 -1
  274. package/dist/index22.js +5 -35
  275. package/dist/index22.js.map +1 -1
  276. package/dist/index220.js +11 -21
  277. package/dist/index220.js.map +1 -1
  278. package/dist/index221.js +11 -10
  279. package/dist/index221.js.map +1 -1
  280. package/dist/index222.js +10 -9
  281. package/dist/index222.js.map +1 -1
  282. package/dist/index223.js +7 -9
  283. package/dist/index223.js.map +1 -1
  284. package/dist/index224.js +6 -4
  285. package/dist/index224.js.map +1 -1
  286. package/dist/index225.js +5 -5
  287. package/dist/index225.js.map +1 -1
  288. package/dist/index226.js +6 -16
  289. package/dist/index226.js.map +1 -1
  290. package/dist/index227.js +7 -9
  291. package/dist/index227.js.map +1 -1
  292. package/dist/index228.js +6 -18
  293. package/dist/index228.js.map +1 -1
  294. package/dist/index229.js +54 -14
  295. package/dist/index229.js.map +1 -1
  296. package/dist/index23.js +27 -268
  297. package/dist/index23.js.map +1 -1
  298. package/dist/index230.js +16 -12
  299. package/dist/index230.js.map +1 -1
  300. package/dist/index231.js +7 -29
  301. package/dist/index231.js.map +1 -1
  302. package/dist/index232.js +9 -11
  303. package/dist/index232.js.map +1 -1
  304. package/dist/index233.js +9 -24
  305. package/dist/index233.js.map +1 -1
  306. package/dist/index234.js +21 -5
  307. package/dist/index234.js.map +1 -1
  308. package/dist/index235.js +10 -24
  309. package/dist/index235.js.map +1 -1
  310. package/dist/index236.js +10 -29
  311. package/dist/index236.js.map +1 -1
  312. package/dist/index237.js +10 -5
  313. package/dist/index237.js.map +1 -1
  314. package/dist/index238.js +4 -13
  315. package/dist/index238.js.map +1 -1
  316. package/dist/index239.js +5 -154
  317. package/dist/index239.js.map +1 -1
  318. package/dist/index24.js +251 -166
  319. package/dist/index24.js.map +1 -1
  320. package/dist/index240.js +15 -29
  321. package/dist/index240.js.map +1 -1
  322. package/dist/index241.js +9 -9
  323. package/dist/index241.js.map +1 -1
  324. package/dist/index242.js +18 -47
  325. package/dist/index242.js.map +1 -1
  326. package/dist/index243.js +15 -11
  327. package/dist/index243.js.map +1 -1
  328. package/dist/index244.js +12 -44
  329. package/dist/index244.js.map +1 -1
  330. package/dist/index245.js +28 -94
  331. package/dist/index245.js.map +1 -1
  332. package/dist/index246.js +11 -85
  333. package/dist/index246.js.map +1 -1
  334. package/dist/index247.js +23 -103
  335. package/dist/index247.js.map +1 -1
  336. package/dist/index248.js +5 -52
  337. package/dist/index248.js.map +1 -1
  338. package/dist/index249.js +13 -11
  339. package/dist/index249.js.map +1 -1
  340. package/dist/index25.js +176 -14
  341. package/dist/index25.js.map +1 -1
  342. package/dist/index250.js +149 -32
  343. package/dist/index250.js.map +1 -1
  344. package/dist/index251.js +30 -8
  345. package/dist/index251.js.map +1 -1
  346. package/dist/index252.js +9 -116
  347. package/dist/index252.js.map +1 -1
  348. package/dist/index253.js +46 -16
  349. package/dist/index253.js.map +1 -1
  350. package/dist/index254.js +11 -15
  351. package/dist/index254.js.map +1 -1
  352. package/dist/index255.js +44 -3
  353. package/dist/index255.js.map +1 -1
  354. package/dist/index256.js +91 -32
  355. package/dist/index256.js.map +1 -1
  356. package/dist/index257.js +85 -19
  357. package/dist/index257.js.map +1 -1
  358. package/dist/index258.js +105 -9
  359. package/dist/index258.js.map +1 -1
  360. package/dist/index259.js +52 -8
  361. package/dist/index259.js.map +1 -1
  362. package/dist/index26.js +15 -2763
  363. package/dist/index26.js.map +1 -1
  364. package/dist/index260.js +10 -18
  365. package/dist/index260.js.map +1 -1
  366. package/dist/index261.js +36 -27
  367. package/dist/index261.js.map +1 -1
  368. package/dist/index262.js +8 -16
  369. package/dist/index262.js.map +1 -1
  370. package/dist/index263.js +3 -67
  371. package/dist/index263.js.map +1 -1
  372. package/dist/index264.js +9 -180
  373. package/dist/index264.js.map +1 -1
  374. package/dist/index265.js +110 -40
  375. package/dist/index265.js.map +1 -1
  376. package/dist/index266.js +17 -4
  377. package/dist/index266.js.map +1 -1
  378. package/dist/index267.js +15 -18
  379. package/dist/index267.js.map +1 -1
  380. package/dist/index268.js +36 -12
  381. package/dist/index268.js.map +1 -1
  382. package/dist/index269.js +21 -5
  383. package/dist/index269.js.map +1 -1
  384. package/dist/index27.js +2761 -35
  385. package/dist/index27.js.map +1 -1
  386. package/dist/index270.js +9 -3
  387. package/dist/index270.js.map +1 -1
  388. package/dist/index271.js +19 -23
  389. package/dist/index271.js.map +1 -1
  390. package/dist/index272.js +26 -110
  391. package/dist/index272.js.map +1 -1
  392. package/dist/index273.js +16 -15
  393. package/dist/index273.js.map +1 -1
  394. package/dist/index274.js +5 -525
  395. package/dist/index274.js.map +1 -1
  396. package/dist/index275.js +3 -128
  397. package/dist/index275.js.map +1 -1
  398. package/dist/index276.js +22 -132
  399. package/dist/index276.js.map +1 -1
  400. package/dist/index277.js +111 -19
  401. package/dist/index277.js.map +1 -1
  402. package/dist/index278.js +15 -5
  403. package/dist/index278.js.map +1 -1
  404. package/dist/index279.js +524 -5
  405. package/dist/index279.js.map +1 -1
  406. package/dist/index28.js +2 -2
  407. package/dist/index280.js +128 -4
  408. package/dist/index280.js.map +1 -1
  409. package/dist/index281.js +132 -14
  410. package/dist/index281.js.map +1 -1
  411. package/dist/index282.js +4 -8
  412. package/dist/index282.js.map +1 -1
  413. package/dist/index283.js +19 -6
  414. package/dist/index283.js.map +1 -1
  415. package/dist/index284.js +12 -4
  416. package/dist/index284.js.map +1 -1
  417. package/dist/index285.js +19 -544
  418. package/dist/index285.js.map +1 -1
  419. package/dist/index286.js +65 -43
  420. package/dist/index286.js.map +1 -1
  421. package/dist/index287.js +9 -18
  422. package/dist/index287.js.map +1 -1
  423. package/dist/index288.js +14 -7
  424. package/dist/index288.js.map +1 -1
  425. package/dist/index289.js +66 -9
  426. package/dist/index289.js.map +1 -1
  427. package/dist/index29.js +33 -121
  428. package/dist/index29.js.map +1 -1
  429. package/dist/index290.js +64 -7
  430. package/dist/index290.js.map +1 -1
  431. package/dist/index291.js +5 -8
  432. package/dist/index291.js.map +1 -1
  433. package/dist/index292.js +5 -12
  434. package/dist/index292.js.map +1 -1
  435. package/dist/index293.js +4 -10
  436. package/dist/index293.js.map +1 -1
  437. package/dist/index294.js +15 -13
  438. package/dist/index294.js.map +1 -1
  439. package/dist/index295.js +8 -64
  440. package/dist/index295.js.map +1 -1
  441. package/dist/index296.js +6 -69
  442. package/dist/index296.js.map +1 -1
  443. package/dist/index297.js +5 -9
  444. package/dist/index297.js.map +1 -1
  445. package/dist/index298.js +545 -13
  446. package/dist/index298.js.map +1 -1
  447. package/dist/index299.js +45 -64
  448. package/dist/index299.js.map +1 -1
  449. package/dist/index3.js.map +1 -1
  450. package/dist/index30.js +3 -232
  451. package/dist/index30.js.map +1 -1
  452. package/dist/index300.js +17 -4
  453. package/dist/index300.js.map +1 -1
  454. package/dist/index301.js +7 -56
  455. package/dist/index301.js.map +1 -1
  456. package/dist/index302.js +9 -68
  457. package/dist/index302.js.map +1 -1
  458. package/dist/index303.js +8 -31
  459. package/dist/index303.js.map +1 -1
  460. package/dist/index304.js +9 -9
  461. package/dist/index304.js.map +1 -1
  462. package/dist/index305.js +13 -153
  463. package/dist/index305.js.map +1 -1
  464. package/dist/index306.js +10 -108
  465. package/dist/index306.js.map +1 -1
  466. package/dist/index307.js +13 -3
  467. package/dist/index307.js.map +1 -1
  468. package/dist/index308.js +3 -22
  469. package/dist/index308.js.map +1 -1
  470. package/dist/index309.js +22 -15
  471. package/dist/index309.js.map +1 -1
  472. package/dist/index31.js +123 -22
  473. package/dist/index31.js.map +1 -1
  474. package/dist/index310.js +4 -28
  475. package/dist/index310.js.map +1 -1
  476. package/dist/index311.js +56 -13
  477. package/dist/index311.js.map +1 -1
  478. package/dist/index312.js +68 -7
  479. package/dist/index312.js.map +1 -1
  480. package/dist/index313.js +30 -22
  481. package/dist/index313.js.map +1 -1
  482. package/dist/index314.js +9 -13
  483. package/dist/index314.js.map +1 -1
  484. package/dist/index315.js +151 -26
  485. package/dist/index315.js.map +1 -1
  486. package/dist/index316.js +107 -4
  487. package/dist/index316.js.map +1 -1
  488. package/dist/index317.js +26 -0
  489. package/dist/index317.js.map +1 -0
  490. package/dist/index318.js +16 -0
  491. package/dist/index318.js.map +1 -0
  492. package/dist/index319.js +31 -0
  493. package/dist/index319.js.map +1 -0
  494. package/dist/index32.js +230 -49
  495. package/dist/index32.js.map +1 -1
  496. package/dist/index320.js +8 -0
  497. package/dist/index320.js.map +1 -0
  498. package/dist/index321.js +19 -0
  499. package/dist/index321.js.map +1 -0
  500. package/dist/index322.js +32 -0
  501. package/dist/index322.js.map +1 -0
  502. package/dist/index323.js +16 -0
  503. package/dist/index323.js.map +1 -0
  504. package/dist/index324.js +10 -0
  505. package/dist/index324.js.map +1 -0
  506. package/dist/index33.js +20 -2637
  507. package/dist/index33.js.map +1 -1
  508. package/dist/index34.js +47 -390
  509. package/dist/index34.js.map +1 -1
  510. package/dist/index35.js +2604 -196
  511. package/dist/index35.js.map +1 -1
  512. package/dist/index36.js +390 -18
  513. package/dist/index36.js.map +1 -1
  514. package/dist/index37.js +222 -131
  515. package/dist/index37.js.map +1 -1
  516. package/dist/index38.js +18 -183
  517. package/dist/index38.js.map +1 -1
  518. package/dist/index39.js +118 -65
  519. package/dist/index39.js.map +1 -1
  520. package/dist/index4.js +17 -15
  521. package/dist/index4.js.map +1 -1
  522. package/dist/index40.js +216 -93
  523. package/dist/index40.js.map +1 -1
  524. package/dist/index41.js +90 -5
  525. package/dist/index41.js.map +1 -1
  526. package/dist/index42.js +115 -840
  527. package/dist/index42.js.map +1 -1
  528. package/dist/index43.js +6 -66
  529. package/dist/index43.js.map +1 -1
  530. package/dist/index44.js +843 -7
  531. package/dist/index44.js.map +1 -1
  532. package/dist/index45.js +57 -2
  533. package/dist/index45.js.map +1 -1
  534. package/dist/index46.js +7 -23
  535. package/dist/index46.js.map +1 -1
  536. package/dist/index47.js +2 -234
  537. package/dist/index47.js.map +1 -1
  538. package/dist/index48.js +11 -6
  539. package/dist/index48.js.map +1 -1
  540. package/dist/index49.js +18 -33
  541. package/dist/index49.js.map +1 -1
  542. package/dist/index5.js +34 -34
  543. package/dist/index5.js.map +1 -1
  544. package/dist/index50.js +7 -26
  545. package/dist/index50.js.map +1 -1
  546. package/dist/index51.js +2 -8
  547. package/dist/index51.js.map +1 -1
  548. package/dist/index52.js +22 -10
  549. package/dist/index52.js.map +1 -1
  550. package/dist/index53.js +233 -3
  551. package/dist/index53.js.map +1 -1
  552. package/dist/index54.js +201 -44
  553. package/dist/index54.js.map +1 -1
  554. package/dist/index55.js +3 -50
  555. package/dist/index55.js.map +1 -1
  556. package/dist/index56.js +6 -7
  557. package/dist/index56.js.map +1 -1
  558. package/dist/index57.js +47 -14
  559. package/dist/index57.js.map +1 -1
  560. package/dist/index58.js +22 -129
  561. package/dist/index58.js.map +1 -1
  562. package/dist/index59.js +50 -10
  563. package/dist/index59.js.map +1 -1
  564. package/dist/index6.js +172 -25
  565. package/dist/index6.js.map +1 -1
  566. package/dist/index60.js +7 -216
  567. package/dist/index60.js.map +1 -1
  568. package/dist/index61.js +15 -13
  569. package/dist/index61.js.map +1 -1
  570. package/dist/index62.js +128 -41
  571. package/dist/index62.js.map +1 -1
  572. package/dist/index63.js +9 -48
  573. package/dist/index63.js.map +1 -1
  574. package/dist/index64.js +216 -3
  575. package/dist/index64.js.map +1 -1
  576. package/dist/index65.js +13 -6
  577. package/dist/index65.js.map +1 -1
  578. package/dist/index66.js +34 -28
  579. package/dist/index66.js.map +1 -1
  580. package/dist/index67.js +46 -49
  581. package/dist/index67.js.map +1 -1
  582. package/dist/index68.js +8 -9
  583. package/dist/index68.js.map +1 -1
  584. package/dist/index69.js +50 -2
  585. package/dist/index69.js.map +1 -1
  586. package/dist/index7.js +31 -29
  587. package/dist/index7.js.map +1 -1
  588. package/dist/index70.js +4 -2
  589. package/dist/index70.js.map +1 -1
  590. package/dist/index71.js +6 -205
  591. package/dist/index71.js.map +1 -1
  592. package/dist/index72.js +28 -54
  593. package/dist/index72.js.map +1 -1
  594. package/dist/index73.js +50 -6
  595. package/dist/index73.js.map +1 -1
  596. package/dist/index74.js +9 -8
  597. package/dist/index74.js.map +1 -1
  598. package/dist/index75.js +2 -6
  599. package/dist/index75.js.map +1 -1
  600. package/dist/index76.js +2 -52
  601. package/dist/index76.js.map +1 -1
  602. package/dist/index77.js +11 -4
  603. package/dist/index77.js.map +1 -1
  604. package/dist/index78.js +5 -4
  605. package/dist/index78.js.map +1 -1
  606. package/dist/index79.js +7 -15
  607. package/dist/index79.js.map +1 -1
  608. package/dist/index8.js +25 -222
  609. package/dist/index8.js.map +1 -1
  610. package/dist/index80.js +5 -5
  611. package/dist/index80.js.map +1 -1
  612. package/dist/index81.js +2 -8
  613. package/dist/index81.js.map +1 -1
  614. package/dist/index82.js +2 -17
  615. package/dist/index82.js.map +1 -1
  616. package/dist/index83.js +53 -4
  617. package/dist/index83.js.map +1 -1
  618. package/dist/index84.js +46 -4
  619. package/dist/index84.js.map +1 -1
  620. package/dist/index85.js +205 -5
  621. package/dist/index85.js.map +1 -1
  622. package/dist/index86.js +22 -6
  623. package/dist/index86.js.map +1 -1
  624. package/dist/index87.js +24 -4
  625. package/dist/index87.js.map +1 -1
  626. package/dist/index88.js +399 -4
  627. package/dist/index88.js.map +1 -1
  628. package/dist/index89.js +46 -6
  629. package/dist/index89.js.map +1 -1
  630. package/dist/index9.js +177 -23
  631. package/dist/index9.js.map +1 -1
  632. package/dist/index90.js +604 -23
  633. package/dist/index90.js.map +1 -1
  634. package/dist/index91.js +52 -7
  635. package/dist/index91.js.map +1 -1
  636. package/dist/index92.js +3 -3
  637. package/dist/index92.js.map +1 -1
  638. package/dist/index93.js +4 -6
  639. package/dist/index93.js.map +1 -1
  640. package/dist/index94.js +15 -5
  641. package/dist/index94.js.map +1 -1
  642. package/dist/index95.js +5 -4
  643. package/dist/index95.js.map +1 -1
  644. package/dist/index96.js +7 -5
  645. package/dist/index96.js.map +1 -1
  646. package/dist/index97.js +16 -4
  647. package/dist/index97.js.map +1 -1
  648. package/dist/index98.js +4 -8
  649. package/dist/index98.js.map +1 -1
  650. package/dist/index99.js +4 -5
  651. package/dist/index99.js.map +1 -1
  652. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index18.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","next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xB,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;"}
1
+ {"version":3,"file":"index18.js","sources":["../src/components/I18nField/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport Select, {\n type OptionProps,\n type Props as SelectProps,\n type SelectInstance,\n type SingleValue,\n type StylesConfig,\n components as selectComponents,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nexport type LanguageCode = string\n\nexport type LocalizedString = Record<LanguageCode, string>\n\nexport type I18nValue = LocalizedString\n\ntype LocaleContextValue = {\n locale: LanguageCode | null\n setLocale: (next: LanguageCode) => void\n}\n\nconst I18nFieldLocaleContext = React.createContext<LocaleContextValue | null>(null)\n\ntype I18nFieldLocaleProviderProps = {\n children: React.ReactNode\n value?: LanguageCode\n defaultValue?: LanguageCode\n onChange?: (locale: LanguageCode) => void\n}\n\nexport function I18nFieldLocaleProvider({ children, value, defaultValue, onChange }: I18nFieldLocaleProviderProps) {\n const isControlled = value !== undefined\n const [internalLocale, setInternalLocale] = React.useState<LanguageCode>(defaultValue ?? DEFAULT_LOCALE)\n const activeLocale = (value ?? internalLocale) as LanguageCode\n\n const setLocale = React.useCallback(\n (next: LanguageCode) => {\n if (!isControlled) {\n setInternalLocale(next)\n }\n onChange?.(next)\n },\n [isControlled, onChange]\n )\n\n const contextValue = React.useMemo<LocaleContextValue>(\n () => ({\n locale: activeLocale,\n setLocale,\n }),\n [activeLocale, setLocale]\n )\n\n return <I18nFieldLocaleContext.Provider value={contextValue}>{children}</I18nFieldLocaleContext.Provider>\n}\n\ntype I18nFieldProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"value\" | \"defaultValue\" | \"onChange\"\n> &\n Omit<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n \"value\" | \"defaultValue\" | \"onChange\"\n > & {\n value?: I18nValue\n defaultValue?: I18nValue\n locale?: LanguageCode\n defaultLocale?: LanguageCode\n onChange?: (value: I18nValue) => void\n onLocaleChange?: (locale: LanguageCode, option: LanguageOption) => void\n locales?: LanguageCode[]\n multiline?: boolean\n inputClassName?: string\n selectProps?: Partial<SelectProps<LanguageOption, false>>\n selectFooter?: React.ReactNode\n languageSelectTabIndex?: number\n }\n\ntype LanguageOption = {\n value: LanguageCode\n name: string\n code: string\n searchable: string[]\n}\n\nconst DEFAULT_LOCALE: LanguageCode = \"en\"\n\nfunction languageCodeToBadge(code: string) {\n const primary = code.split(\"-\")[0] ?? \"\"\n const normalized = primary.replace(/[^A-Za-z]/g, \"\")\n if (!normalized) return \"?\"\n return normalized.slice(0, 3).toUpperCase()\n}\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")\n}\n\nfunction normalize(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nfunction resolveLocalizedValue(value: I18nValue, locale: LanguageCode) {\n if (Object.prototype.hasOwnProperty.call(value, locale)) {\n return value[locale] ?? \"\"\n }\n\n const parts = locale.split(\"-\").filter(Boolean)\n while (parts.length > 1) {\n parts.pop()\n const candidate = parts.join(\"-\")\n if (Object.prototype.hasOwnProperty.call(value, candidate)) {\n return value[candidate] ?? \"\"\n }\n }\n\n return \"\"\n}\n\nfunction createDisplayNames(locale: string | string[] | undefined, type: \"language\") {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") return null\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type })\n } catch {\n return null\n }\n}\n\nfunction safeDisplayName(displayNames: Intl.DisplayNames | null, value: string) {\n if (!displayNames) return undefined\n try {\n return displayNames.of(value) ?? undefined\n } catch {\n return undefined\n }\n}\n\nfunction buildLanguageOptions(locale?: string | string[], allowed?: LanguageCode[]) {\n const displayNames = createDisplayNames(locale, \"language\")\n const englishDisplayNames = createDisplayNames(\"en\", \"language\")\n const pool = (allowed ?? []).filter((code): code is LanguageCode => typeof code === \"string\" && code.length > 0)\n\n return pool\n .map((code) => {\n const name = safeDisplayName(displayNames, code) ?? safeDisplayName(englishDisplayNames, code) ?? code\n return {\n value: code,\n name,\n code,\n searchable: Array.from(\n new Set([\n name,\n safeDisplayName(englishDisplayNames, code) ?? code,\n code.toLowerCase(),\n code.toUpperCase(),\n ])\n ).map((entry) => normalize(entry)),\n }\n })\n .sort((a, b) => a.name.localeCompare(b.name))\n}\n\nconst selectStyles: StylesConfig<LanguageOption, false> = {\n control: () => ({\n display: \"none\",\n }),\n menu: (provided) => ({\n ...provided,\n marginTop: 4,\n borderRadius: \"var(--radius)\",\n boxShadow: \"0 18px 36px rgba(15, 23, 42, 0.18)\",\n backgroundColor: \"hsl(var(--popover))\",\n overflow: \"hidden\",\n zIndex: 30,\n }),\n menuList: (provided) => ({\n ...provided,\n maxHeight: 280,\n padding: 0,\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n }),\n option: (provided, state) => ({\n ...provided,\n fontSize: \"0.875rem\",\n backgroundColor: state.isFocused\n ? \"hsl(var(--muted))\"\n : state.isSelected\n ? \"hsl(var(--accent))\"\n : \"transparent\",\n color: state.isSelected\n ? \"hsl(var(--accent-foreground))\"\n : \"hsl(var(--foreground))\",\n cursor: \"pointer\",\n }),\n noOptionsMessage: (provided) => ({\n ...provided,\n fontSize: \"0.875rem\",\n color: \"hsl(var(--muted-foreground))\",\n }),\n}\n\nconst HiddenControl = () => <div style={{ display: \"none\" }} />\nconst NullComponent = () => null\n\nfunction Option(props: OptionProps<LanguageOption, false>) {\n const { data, innerRef, innerProps, isFocused, isSelected } = props\n return (\n <div\n ref={innerRef}\n {...innerProps}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm\",\n isSelected\n ? \"bg-accent text-accent-foreground\"\n : isFocused\n ? \"bg-muted text-foreground\"\n : \"text-foreground\"\n )}\n >\n <span className=\"flex min-w-0 items-center gap-2\">\n <span className=\"truncate\">{data.name}</span>\n </span>\n <span className=\"text-xs text-muted-foreground uppercase\">{data.code}</span>\n </div>\n )\n}\n\nexport const I18nField = React.forwardRef<HTMLInputElement | HTMLTextAreaElement, I18nFieldProps>(\n function I18nField(props, forwardedRef) {\n const {\n value: valueProp,\n defaultValue,\n locale: localeProp,\n defaultLocale,\n onChange,\n onLocaleChange,\n locales,\n multiline,\n className,\n inputClassName,\n selectProps,\n selectFooter,\n languageSelectTabIndex = -1,\n disabled,\n ...rest\n } = props\n\n type SharedProps = React.InputHTMLAttributes<HTMLInputElement> &\n React.TextareaHTMLAttributes<HTMLTextAreaElement> & { rows?: number }\n\n const { rows, ...restProps } = rest as SharedProps\n\n const initialValue = React.useMemo<I18nValue>(() => valueProp ?? defaultValue ?? {}, [defaultValue, valueProp])\n const [internalValue, setInternalValue] = React.useState<I18nValue>(initialValue)\n const isControlled = valueProp !== undefined\n const currentValue = isControlled ? valueProp ?? {} : internalValue\n const [searchTerm, setSearchTerm] = React.useState(\"\")\n const localeContext = React.useContext(I18nFieldLocaleContext)\n\n const localePool = React.useMemo(() => {\n const pool = Array.from(new Set([...(locales ?? []), ...Object.keys(currentValue)]))\n return buildLanguageOptions(undefined, pool)\n }, [currentValue, locales])\n\n const initialLocale = React.useMemo(() => {\n const candidate =\n localeProp ??\n localeContext?.locale ??\n defaultLocale ??\n (Object.keys(currentValue)[0] as LanguageCode | undefined) ??\n localePool[0]?.value ??\n DEFAULT_LOCALE\n return candidate\n }, [currentValue, defaultLocale, localeContext?.locale, localePool, localeProp])\n\n const [internalLocale, setInternalLocale] = React.useState<LanguageCode>(initialLocale)\n const activeLocale = localeProp ?? localeContext?.locale ?? internalLocale\n\n React.useEffect(() => {\n if (!isControlled) {\n setInternalValue(initialValue)\n }\n }, [initialValue, isControlled])\n\n React.useEffect(() => {\n if (localeProp && localeProp !== internalLocale) {\n setInternalLocale(localeProp)\n }\n }, [internalLocale, localeProp])\n\n React.useEffect(() => {\n if (!localeProp && localeContext?.locale && localeContext.locale !== internalLocale) {\n setInternalLocale(localeContext.locale)\n }\n }, [internalLocale, localeContext?.locale, localeProp])\n\n const selectedOption =\n localePool.find((option) => option.value === activeLocale) ??\n localePool.find((option) => option.value === DEFAULT_LOCALE) ??\n localePool[0] ??\n null\n\n const [menuOpen, setMenuOpen] = React.useState(false)\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const inputRef = React.useRef<HTMLInputElement | HTMLTextAreaElement | null>(null)\n const triggerRef = React.useRef<HTMLButtonElement | null>(null)\n const containerRef = React.useRef<HTMLDivElement | null>(null)\n const selectRef = React.useRef<SelectInstance<LanguageOption, false> | null>(null)\n const searchInputRef = React.useRef<HTMLInputElement | null>(null)\n const selectionSnapshotRef = React.useRef<{ start: number | null; end: number | null } | null>(null)\n const [menuPosition, setMenuPosition] = React.useState<{ left: number; top: number }>({ left: 0, top: 0 })\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement & HTMLTextAreaElement, [])\n\n const handleLocaleSelect = (option: SingleValue<LanguageOption>) => {\n if (!option) return\n const nextLocale = option.value\n if (!isControlled) {\n setInternalLocale(nextLocale)\n }\n onLocaleChange?.(nextLocale, option)\n localeContext?.setLocale(nextLocale)\n closeMenu(true)\n }\n\n const handleTextChange = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n const nextValue = {\n ...currentValue,\n [activeLocale]: event.target.value,\n }\n if (!isControlled) {\n setInternalValue(nextValue)\n }\n onChange?.(nextValue)\n }\n\n const currentText = resolveLocalizedValue(currentValue, activeLocale)\n\n const filterOption = React.useCallback(\n (option: { data: LanguageOption }) => {\n if (!searchTerm) return true\n const query = normalize(searchTerm)\n return option.data.searchable.some((token) => token.includes(query))\n },\n [searchTerm]\n )\n\n const buttonPosition = multiline ? \"left-2 top-2 -translate-y-0\" : \"left-3 top-1/2 -translate-y-1/2\"\n const inputPaddingLeft = \"pl-10 pr-3\"\n\n const updateMenuPosition = React.useCallback(() => {\n const trigger = triggerRef.current\n const container = containerRef.current\n if (!trigger || !container) return\n const triggerRect = trigger.getBoundingClientRect()\n const containerRect = container.getBoundingClientRect()\n setMenuPosition({\n left: triggerRect.left - containerRect.left,\n top: triggerRect.bottom - containerRect.top + 4,\n })\n }, [])\n\n const isInsideComponent = React.useCallback((target: EventTarget | null) => {\n if (!target || !(target instanceof Node)) return false\n return Boolean(rootRef.current?.contains(target))\n }, [])\n\n const restoreMainFocus = React.useCallback(() => {\n const target = inputRef.current\n if (!target) return\n target.focus()\n const selection = selectionSnapshotRef.current\n if (selection && selection.start != null && selection.end != null) {\n target.setSelectionRange(selection.start, selection.end)\n }\n }, [])\n\n React.useEffect(() => {\n if (!menuOpen) return\n const target = searchInputRef.current\n if (!target) return\n requestAnimationFrame(() => {\n if (document.activeElement === target) return\n target.focus()\n const end = target.value.length\n try {\n target.setSelectionRange(end, end)\n } catch {\n /* ignore */\n }\n })\n }, [menuOpen, searchTerm])\n\n const closeMenu = React.useCallback(\n (restoreFocus = true) => {\n setMenuOpen(false)\n setSearchTerm(\"\")\n if (restoreFocus) {\n requestAnimationFrame(() => {\n restoreMainFocus()\n })\n }\n },\n [restoreMainFocus]\n )\n\n const {\n components: userSelectComponents,\n styles: userSelectStyles,\n classNamePrefix: userClassNamePrefix,\n placeholder: selectPlaceholder,\n noOptionsMessage,\n ...forwardedSelectProps\n } = selectProps ?? {}\n\n const filteredOptions = React.useMemo(() => {\n const query = normalize(searchTerm)\n const rank = (option: LanguageOption) => {\n const code = option.code.toLowerCase()\n if (query && code === query) return 0\n if (query && code.startsWith(query)) return 1\n if (query && option.searchable.some((token) => token.startsWith(query))) return 2\n if (query && option.searchable.some((token) => token.includes(query))) return 3\n return 4\n }\n return localePool\n .filter((option) => filterOption({ data: option }))\n .sort((a, b) => {\n const diff = rank(a) - rank(b)\n if (diff !== 0) return diff\n return a.name.localeCompare(b.name)\n })\n }, [filterOption, localePool, searchTerm])\n\n const mergedSelectComponents = React.useMemo(\n () => ({\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n MenuList: (props: any) => {\n const { children } = props\n return (\n <selectComponents.MenuList {...props} className=\"!p-0 flex flex-col overflow-hidden\">\n <div className=\"border-b border-muted px-2 pb-2 pt-2\">\n <input\n ref={searchInputRef}\n value={searchTerm}\n onChange={(event) => setSearchTerm(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") {\n event.preventDefault()\n closeMenu(true)\n return\n }\n if (event.key === \"Enter\") {\n event.preventDefault()\n const first = filteredOptions[0]\n if (first) {\n handleLocaleSelect(first)\n }\n return\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault()\n selectRef.current?.focus()\n }\n }}\n className=\"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring\"\n placeholder=\"Search language…\"\n />\n </div>\n <div className=\"max-h-60 overflow-y-auto\">{children}</div>\n {selectFooter ? (\n <div className=\"border-t border-muted bg-muted/60 px-3 py-2 text-xs text-muted-foreground\">\n {selectFooter}\n </div>\n ) : null}\n </selectComponents.MenuList>\n )\n },\n ...(userSelectComponents ?? {}),\n Option,\n }),\n [closeMenu, filterOption, filteredOptions, handleLocaleSelect, localePool, searchTerm, selectFooter, userSelectComponents]\n )\n\n const mergedSelectStyles = React.useMemo<StylesConfig<LanguageOption, false>>(\n () => ({\n ...selectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (!menuOpen) return\n updateMenuPosition()\n const handleResize = () => updateMenuPosition()\n window.addEventListener(\"resize\", handleResize)\n return () => window.removeEventListener(\"resize\", handleResize)\n }, [menuOpen, updateMenuPosition])\n\n const sharedFieldProps = {\n ...restProps,\n ref: inputRef as React.Ref<any>,\n disabled,\n value: currentText,\n onChange: handleTextChange,\n onFocus: (event: React.FocusEvent<any>) => {\n if (menuOpen) {\n closeMenu(false)\n }\n restProps.onFocus?.(event)\n },\n onBlur: (event: React.FocusEvent<any>) => {\n if (!isInsideComponent(event.relatedTarget)) {\n closeMenu(false)\n }\n restProps.onBlur?.(event)\n },\n className: cn(\n \"w-full rounded-md border border-input bg-background 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 multiline ? \"min-h-24 py-2\" : \"h-10 py-2\",\n inputPaddingLeft,\n inputClassName\n ),\n placeholder: restProps.placeholder,\n }\n\n return (\n <div\n ref={rootRef}\n className={cn(\"relative flex flex-col\", className)}\n onBlur={(event) => {\n if (!isInsideComponent(event.relatedTarget)) {\n closeMenu(false)\n }\n }}\n >\n <div ref={containerRef} className=\"relative\">\n {multiline ? (\n <textarea rows={rows} {...sharedFieldProps} />\n ) : (\n <input type=\"text\" {...sharedFieldProps} />\n )}\n\n <button\n type=\"button\"\n className={cn(\n \"absolute flex h-6 w-6 items-center justify-center rounded border text-xs font-semibold leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n buttonPosition,\n disabled ? \"cursor-not-allowed opacity-50 pointer-events-none\" : \"cursor-pointer hover:bg-muted\",\n selectedOption ? \"border-transparent\" : \"border-dashed border-border text-muted-foreground\"\n )}\n aria-label={selectedOption ? `Select language (${selectedOption.code})` : \"Select language\"}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => {\n if (disabled) return\n const target = inputRef.current\n if (target) {\n selectionSnapshotRef.current = {\n start: target.selectionStart,\n end: target.selectionEnd,\n }\n }\n setSearchTerm(\"\")\n setMenuOpen(true)\n requestAnimationFrame(() => {\n if (searchInputRef.current) {\n searchInputRef.current.focus()\n searchInputRef.current.select()\n } else {\n selectRef.current?.focus()\n }\n })\n }}\n tabIndex={languageSelectTabIndex}\n disabled={disabled}\n ref={triggerRef}\n >\n <span aria-hidden=\"true\">{selectedOption ? languageCodeToBadge(selectedOption.code) : \"?\"}</span>\n </button>\n </div>\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: menuOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n left: menuPosition.left,\n top: menuPosition.top,\n }}\n >\n <Select<LanguageOption, false>\n {...forwardedSelectProps}\n menuIsOpen={menuOpen}\n options={filteredOptions}\n value={null}\n onChange={handleLocaleSelect}\n classNamePrefix={userClassNamePrefix ?? \"i18n-language-select\"}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue\n menuShouldScrollIntoView={false}\n placeholder={selectPlaceholder ?? \"\"}\n filterOption={filterOption}\n noOptionsMessage={noOptionsMessage}\n onMenuClose={() => closeMenu(true)}\n ref={selectRef}\n />\n </div>\n </div>\n )\n }\n)\n\nI18nField.displayName = \"I18nField\"\n"],"names":["I18nFieldLocaleContext","React","createContext","I18nFieldLocaleProvider","t0","$","_c","children","value","defaultValue","onChange","isControlled","undefined","internalLocale","setInternalLocale","useState","DEFAULT_LOCALE","activeLocale","t1","next","setLocale","t2","locale","contextValue","t3","languageCodeToBadge","code","normalized","split","replace","slice","toUpperCase","stripDiacritics","normalize","toLowerCase","resolveLocalizedValue","Object","prototype","hasOwnProperty","call","parts","filter","Boolean","length","pop","candidate","join","createDisplayNames","type","Intl","DisplayNames","locales","Array","isArray","safeDisplayName","displayNames","of","buildLanguageOptions","allowed","englishDisplayNames","map","name","searchable","from","Set","entry","sort","a","b","localeCompare","selectStyles","control","display","menu","provided","marginTop","borderRadius","boxShadow","backgroundColor","overflow","zIndex","menuList","maxHeight","padding","flexDirection","option","state","fontSize","isFocused","isSelected","color","cursor","noOptionsMessage","HiddenControl","Symbol","for","jsx","NullComponent","Option","props","data","innerRef","innerProps","cn","t4","I18nField","forwardRef","forwardedRef","className","defaultLocale","disabled","inputClassName","localeProp","multiline","onLocaleChange","rest","selectFooter","selectProps","valueProp","languageSelectTabIndex","restProps","rows","initialValue","internalValue","setInternalValue","currentValue","searchTerm","setSearchTerm","localeContext","useContext","pool","keys","localePool","t5","t6","initialLocale","t7","t8","useEffect","t10","t9","t11","t12","t13","t14","find","option_0","_temp","selectedOption","menuOpen","setMenuOpen","rootRef","useRef","inputRef","triggerRef","containerRef","selectRef","searchInputRef","selectionSnapshotRef","t15","left","top","menuPosition","setMenuPosition","t16","t17","current","useImperativeHandle","handleLocaleSelect","option_1","nextLocale","closeMenu","t18","event","nextValue","target","handleTextChange","t19","currentText","t20","option_2","query","some","token","includes","filterOption","buttonPosition","t21","trigger","container","triggerRect","getBoundingClientRect","containerRect","bottom","updateMenuPosition","t22","Node","contains","isInsideComponent","t23","target_0","focus","selection","start","end","setSelectionRange","restoreMainFocus","t24","target_1","requestAnimationFrame","document","activeElement","t25","t26","t27","restoreFocus","forwardedSelectProps","selectPlaceholder","userClassNamePrefix","userSelectComponents","userSelectStyles","components","styles","classNamePrefix","placeholder","t28","query_0","rank","option_3","startsWith","token_0","token_1","t29","option_4","diff","filteredOptions","props_0","event_0","event_1","key","preventDefault","first","t30","t31","Control","IndicatorsContainer","DropdownIndicator","IndicatorSeparator","ValueContainer","MenuList","mergedSelectComponents","t32","t33","mergedSelectStyles","t34","t35","handleResize","window","addEventListener","removeEventListener","useLayoutEffect","t36","event_2","onFocus","t37","event_3","relatedTarget","onBlur","t38","t39","t40","ref","sharedFieldProps","t41","t42","event_4","t43","t44","t45","t46","t47","t48","target_2","selectionStart","selectionEnd","select","t49","t50","t51","_temp2","t52","t53","t54","pointerEvents","width","t55","t56","t57","t58","Select","t59","t60","displayName","event_5"],"mappings":";;;;;AAwBA,MAAMA,KAAyBC,EAAMC,cAAyC,IAAI;AAS3E,SAAAC,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,CAAA,GAAiC;AAAA,IAAAC,UAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,cAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAAAN,GACtCO,IAAqBH,MAAUI,QAC/B,CAAAC,GAAAC,CAAA,IAA4Cb,EAAKc,SAAwBN,KAAAO,EAA8B,GACvGC,IAAsBT,KAAAK;AAAwC,MAAAK;AAAA,EAAAb,EAAA,CAAA,MAAAM,KAAAN,SAAAK,KAG5DQ,IAAAC,CAAAA,MAAA;AACE,IAAKR,KACHG,EAAkBK,CAAI,GAExBT,IAAWS,CAAI;AAAA,EAAC,GACjBd,OAAAM,GAAAN,OAAAK,GAAAL,OAAAa,KAAAA,IAAAb,EAAA,CAAA;AANH,QAAAe,IAAkBF;AAQjB,MAAAG;AAAA,EAAAhB,EAAA,CAAA,MAAAY,KAAAZ,SAAAe,KAGQC,IAAA;AAAA,IAAAC,QACGL;AAAAA,IAAYG,WAAAA;AAAAA,EAAAA,GAErBf,OAAAY,GAAAZ,OAAAe,GAAAf,OAAAgB,KAAAA,IAAAhB,EAAA,CAAA;AAJH,QAAAkB,IACSF;AAKR,MAAAG;AAAA,SAAAnB,EAAA,CAAA,MAAAE,KAAAF,SAAAkB,KAEMC,0BAAAxB,GAAA,UAAA,EAAwCuB,OAAAA,GAAehB,UAAAA,GAAS,GAAkCF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R,IAOPM,UAAAA,IAoBF,GAAMrS,SAAA+R,IAAA/R,SAAAqS,IAAArS,SAAAuS,MAAAA,KAAAvS,EAAA,GAAA;AAAA,MAAAwS;AAAA,SAAAxS,EAAA,GAAA,MAAA4Q,KAAA5Q,EAAA,GAAA,MAAA6Q,MAAA7Q,EAAA,GAAA,MAAA6R,MAAA7R,WAAAuS,MAnFRC,4BAAA,OAAA,EACOtJ,KAAAA,IACM,WAAA0H,GACH,QAAAC,IAMRgB,UAAAA;AAAAA,IAAAA;AAAAA,IA6CAU;AAAAA,EAAAA,GA8BF,GAAMvS,SAAA4Q,GAAA5Q,SAAA6Q,IAAA7Q,SAAA6R,IAAA7R,SAAAuS,IAAAvS,SAAAwS,MAAAA,KAAAxS,EAAA,GAAA,GApFNwS;AAoFM,CAGZ;AAEApM,GAAUqM,cAAc;AAzYtB,SAAA3J,GAAA9D,GAAA;AAAA,SAsEgCA,EAAM7E,UAAWQ;AAAc;AAtE/D,SAAAiR,GAAAc,GAAA;AAAA,SAyUkClI,EAAKmE,eAAAA;AAAiB;"}
package/dist/index180.js CHANGED
@@ -1,9 +1,13 @@
1
- class a {
2
- constructor(t, s) {
3
- this.date = t, this.weeks = s;
4
- }
1
+ import o from "./index181.js";
2
+ function i(n, a) {
3
+ var r = a.nationalNumber, e = a.metadata, t = e.getCountryCodesForCallingCode(n);
4
+ if (t)
5
+ return t.length === 1 ? t[0] : o(r, {
6
+ countries: t,
7
+ metadata: e.metadata
8
+ });
5
9
  }
6
10
  export {
7
- a as CalendarMonth
11
+ i as default
8
12
  };
9
13
  //# sourceMappingURL=index180.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index180.js","sources":["../../../node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js"],"sourcesContent":["/**\n * Represents a month in a calendar year.\n *\n * A `CalendarMonth` contains the weeks within the month and the date of the\n * month.\n */\nexport class CalendarMonth {\n constructor(month, weeks) {\n this.date = month;\n this.weeks = weeks;\n }\n}\n"],"names":["CalendarMonth","month","weeks"],"mappings":"AAMO,MAAMA,EAAc;AAAA,EACvB,YAAYC,GAAOC,GAAO;AACtB,SAAK,OAAOD,GACZ,KAAK,QAAQC;AAAA,EACjB;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index180.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js"],"sourcesContent":["import getCountryByNationalNumber from './getCountryByNationalNumber.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\n// Returns the exact country for the `nationalNumber`\n// that belongs to the specified \"country calling code\".\nexport default function getCountryByCallingCode(callingCode, _ref) {\n var nationalPhoneNumber = _ref.nationalNumber,\n metadata = _ref.metadata;\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(callingCode)) {\n return '001';\n }\n }\n var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);\n if (!possibleCountries) {\n return;\n }\n // If there's just one country corresponding to the country code,\n // then just return it, without further phone number digits validation.\n if (possibleCountries.length === 1) {\n return possibleCountries[0];\n }\n return getCountryByNationalNumber(nationalPhoneNumber, {\n countries: possibleCountries,\n metadata: metadata.metadata\n });\n}\n//# sourceMappingURL=getCountryByCallingCode.js.map"],"names":["getCountryByCallingCode","callingCode","_ref","nationalPhoneNumber","metadata","possibleCountries","getCountryByNationalNumber"],"mappings":";AAKe,SAASA,EAAwBC,GAAaC,GAAM;AACjE,MAAIC,IAAsBD,EAAK,gBAC7BE,IAAWF,EAAK,UAOdG,IAAoBD,EAAS,8BAA8BH,CAAW;AAC1E,MAAKI;AAKL,WAAIA,EAAkB,WAAW,IACxBA,EAAkB,CAAC,IAErBC,EAA2BH,GAAqB;AAAA,MACrD,WAAWE;AAAA,MACX,UAAUD,EAAS;AAAA,IACvB,CAAG;AACH;","x_google_ignoreList":[0]}
package/dist/index181.js CHANGED
@@ -1,9 +1,46 @@
1
- class t {
2
- constructor(e, s) {
3
- this.days = s, this.weekNumber = e;
1
+ import l from "./index176.js";
2
+ import f from "./index253.js";
3
+ function d(e, r) {
4
+ var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
5
+ if (t) return (t = t.call(e)).next.bind(t);
6
+ if (Array.isArray(e) || (t = s(e)) || r) {
7
+ t && (e = t);
8
+ var a = 0;
9
+ return function() {
10
+ return a >= e.length ? { done: !0 } : { done: !1, value: e[a++] };
11
+ };
12
+ }
13
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
14
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
15
+ }
16
+ function s(e, r) {
17
+ if (e) {
18
+ if (typeof e == "string") return i(e, r);
19
+ var t = {}.toString.call(e).slice(8, -1);
20
+ return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? i(e, r) : void 0;
21
+ }
22
+ }
23
+ function i(e, r) {
24
+ (r == null || r > e.length) && (r = e.length);
25
+ for (var t = 0, a = Array(r); t < r; t++) a[t] = e[t];
26
+ return a;
27
+ }
28
+ function y(e, r) {
29
+ var t = r.countries, a = r.metadata;
30
+ a = new l(a);
31
+ for (var u = d(t), o; !(o = u()).done; ) {
32
+ var n = o.value;
33
+ if (a.selectNumberingPlan(n), a.leadingDigits()) {
34
+ if (e && e.search(a.leadingDigits()) === 0)
35
+ return n;
36
+ } else if (f({
37
+ phone: e,
38
+ country: n
39
+ }, void 0, a.metadata))
40
+ return n;
4
41
  }
5
42
  }
6
43
  export {
7
- t as CalendarWeek
44
+ y as default
8
45
  };
9
46
  //# sourceMappingURL=index181.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index181.js","sources":["../../../node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js"],"sourcesContent":["/**\n * Represents a week in a calendar month.\n *\n * A `CalendarWeek` contains the days within the week and the week number.\n */\nexport class CalendarWeek {\n constructor(weekNumber, days) {\n this.days = days;\n this.weekNumber = weekNumber;\n }\n}\n"],"names":["CalendarWeek","weekNumber","days"],"mappings":"AAKO,MAAMA,EAAa;AAAA,EACtB,YAAYC,GAAYC,GAAM;AAC1B,SAAK,OAAOA,GACZ,KAAK,aAAaD;AAAA,EACtB;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index181.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nimport Metadata from '../metadata.js';\nimport getNumberType from './getNumberType.js';\n\n// Returns the exact country that the `nationalPhoneNumber` belongs to\n// in cases of ambiguity, i.e. when multiple countries share the same \"country calling code\".\nexport default function getCountryByNationalNumber(nationalPhoneNumber, _ref) {\n var countries = _ref.countries,\n metadata = _ref.metadata;\n // Re-create `metadata` because it will be selecting a `country`.\n metadata = new Metadata(metadata);\n\n // const matchingCountries = []\n\n for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {\n var country = _step.value;\n metadata.selectNumberingPlan(country);\n // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // condition for a phone number to belong to a country.\n // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n // because of the intended use of that feature.\n if (metadata.leadingDigits()) {\n if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {\n return country;\n }\n }\n // Else perform full validation with all of those\n // fixed-line/mobile/etc regular expressions.\n else if (getNumberType({\n phone: nationalPhoneNumber,\n country: country\n }, undefined, metadata.metadata)) {\n // When multiple countries share the same \"country calling code\",\n // type patterns aren't guaranteed to be unique among them.\n // For example, both `US` and `CA` have the same pattern for `toll_free` numbers.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572\n //\n // That means that this `if` condition could be `true` for multiple countries from the list.\n // Currently, it just returns the first one, which is also the \"main\" country for the \"country calling code\".\n // In an example with `toll_free` numbers above, `\"US\"` would be returned even though\n // it could as well be `\"CA\"`.\n //\n // There was also a time when this attempted to be overly smart\n // and kept track of all such multiple matching countries\n // and then picked the one that matched the `defaultCountry`, if provided.\n // For example, with `toll_free` numbers above, and with `defaultCountry: \"CA\"`,\n // it would've returned `\"CA\"` instead of `\"US\"`.\n // Later it turned out that such \"overly smart\" behavior turned out to be just confusing,\n // so this \"overly smart\" country detection was reverted to returning the \"main\" country\n // for the \"country calling code\".\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n //\n return country;\n //\n // The \"overly smart\" behavior code:\n //\n // if (defaultCountry) {\n // \tif (country === defaultCountry) {\n // \t\treturn country\n // \t} else {\n // \t\tmatchingCountries.push(country)\n // \t}\n // } else {\n // \treturn country\n // }\n }\n }\n\n // // Return the first (\"main\") one of the `matchingCountries`.\n // if (matchingCountries.length > 0) {\n // \treturn matchingCountries[0]\n // }\n}\n//# sourceMappingURL=getCountryByNationalNumber.js.map"],"names":["_createForOfIteratorHelperLoose","r","e","_unsupportedIterableToArray","o","a","_arrayLikeToArray","n","getCountryByNationalNumber","nationalPhoneNumber","_ref","countries","metadata","Metadata","_iterator","_step","country","getNumberType"],"mappings":";;AAAA,SAASA,EAAgCC,GAAGC,GAAG;AAAE,MAAI,IAAmB,OAAO,SAAtB,OAAgCD,EAAE,OAAO,QAAQ,KAAKA,EAAE,YAAY;AAAG,MAAI,EAAG,SAAQ,IAAI,EAAE,KAAKA,CAAC,GAAG,KAAK,KAAK,CAAC;AAAG,MAAI,MAAM,QAAQA,CAAC,MAAM,IAAIE,EAA4BF,CAAC,MAAMC,GAAuC;AAAE,UAAMD,IAAI;AAAI,QAAIG,IAAI;AAAG,WAAO,WAAY;AAAE,aAAOA,KAAKH,EAAE,SAAS,EAAE,MAAM,GAAE,IAAK,EAAE,MAAM,IAAI,OAAOA,EAAEG,GAAG,EAAC;AAAA,IAAI;AAAA,EAAG;AAAE,QAAM,IAAI,UAAU;AAAA,mFAAuI;AAAG;AACziB,SAASD,EAA4BF,GAAGI,GAAG;AAAE,MAAIJ,GAAG;AAAE,QAAgB,OAAOA,KAAnB,SAAsB,QAAOK,EAAkBL,GAAGI,CAAC;AAAG,QAAI,IAAI,CAAA,EAAG,SAAS,KAAKJ,CAAC,EAAE,MAAM,GAAG,EAAE;AAAG,WAAoB,MAAb,YAAkBA,EAAE,gBAAgB,IAAIA,EAAE,YAAY,OAAiB,MAAV,SAAyB,MAAV,QAAc,MAAM,KAAKA,CAAC,IAAoB,MAAhB,eAAqB,2CAA2C,KAAK,CAAC,IAAIK,EAAkBL,GAAGI,CAAC,IAAI;AAAA,EAAQ;AAAE;AACzX,SAASC,EAAkBL,GAAGI,GAAG;AAAE,GAASA,KAAR,QAAaA,IAAIJ,EAAE,YAAYI,IAAIJ,EAAE;AAAS,WAASC,IAAI,GAAGK,IAAI,MAAMF,CAAC,GAAGH,IAAIG,GAAGH,IAAK,CAAAK,EAAEL,CAAC,IAAID,EAAEC,CAAC;AAAG,SAAOK;AAAG;AAMpI,SAASC,EAA2BC,GAAqBC,GAAM;AAC5E,MAAIC,IAAYD,EAAK,WACnBE,IAAWF,EAAK;AAElB,EAAAE,IAAW,IAAIC,EAASD,CAAQ;AAIhC,WAASE,IAAYd,EAAgCW,CAAS,GAAGI,GAAO,EAAEA,IAAQD,EAAS,GAAI,QAAO;AACpG,QAAIE,IAAUD,EAAM;AASpB,QARAH,EAAS,oBAAoBI,CAAO,GAQhCJ,EAAS;AACX,UAAIH,KAAuBA,EAAoB,OAAOG,EAAS,cAAa,CAAE,MAAM;AAClF,eAAOI;AAAA,eAKFC,EAAc;AAAA,MACrB,OAAOR;AAAA,MACP,SAASO;AAAA,IACf,GAAO,QAAWJ,EAAS,QAAQ;AAqB7B,aAAOI;AAAA,EAcX;AAMF;","x_google_ignoreList":[0]}
package/dist/index182.js CHANGED
@@ -1,10 +1,8 @@
1
- import { getBroadcastWeeksInMonth as n } from "./index266.js";
2
- import { startOfBroadcastWeek as s } from "./index183.js";
3
- function d(e, t) {
4
- const o = s(e, t), r = n(e, t);
5
- return t.addDays(o, r * 7 - 1);
1
+ var t = {}.constructor;
2
+ function n(r) {
3
+ return r != null && r.constructor === t;
6
4
  }
7
5
  export {
8
- d as endOfBroadcastWeek
6
+ n as default
9
7
  };
10
8
  //# sourceMappingURL=index182.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index182.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js"],"sourcesContent":["import { getBroadcastWeeksInMonth } from \"./getBroadcastWeeksInMonth.js\";\nimport { startOfBroadcastWeek } from \"./startOfBroadcastWeek.js\";\n/**\n * Returns the end date of the week in the broadcast calendar.\n *\n * The broadcast week ends on the last day of the last broadcast week for the\n * given date.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the end of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The end date of the broadcast week.\n */\nexport function endOfBroadcastWeek(date, dateLib) {\n const startDate = startOfBroadcastWeek(date, dateLib);\n const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);\n const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);\n return endDate;\n}\n"],"names":["endOfBroadcastWeek","date","dateLib","startDate","startOfBroadcastWeek","numberOfWeeks","getBroadcastWeeksInMonth"],"mappings":";;AAaO,SAASA,EAAmBC,GAAMC,GAAS;AAC9C,QAAMC,IAAYC,EAAqBH,GAAMC,CAAO,GAC9CG,IAAgBC,EAAyBL,GAAMC,CAAO;AAE5D,SADgBA,EAAQ,QAAQC,GAAWE,IAAgB,IAAI,CAAC;AAEpE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index182.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/isObject.js"],"sourcesContent":["var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=isObject.js.map"],"names":["objectConstructor","isObject","object"],"mappings":"AAAA,IAAIA,IAAoB,CAAA,EAAG;AACZ,SAASC,EAASC,GAAQ;AACvC,SAA+BA,KAAW,QAAQA,EAAO,gBAAgBF;AAC3E;","x_google_ignoreList":[0]}
package/dist/index183.js CHANGED
@@ -1,8 +1,28 @@
1
- function n(s, e) {
2
- const t = e.startOfMonth(s), r = t.getDay();
3
- return r === 1 ? t : r === 0 ? e.addDays(t, -6) : e.addDays(t, -1 * (r - 1));
1
+ var p = function() {
2
+ return p = Object.assign || function(e) {
3
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
4
+ n = arguments[r];
5
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
6
+ }
7
+ return e;
8
+ }, p.apply(this, arguments);
9
+ };
10
+ function c(t, e) {
11
+ var n = {};
12
+ for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
13
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
14
+ for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
15
+ e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
16
+ return n;
17
+ }
18
+ function l(t, e, n) {
19
+ if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
20
+ (a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
21
+ return t.concat(a || Array.prototype.slice.call(e));
4
22
  }
5
23
  export {
6
- n as startOfBroadcastWeek
24
+ p as __assign,
25
+ c as __rest,
26
+ l as __spreadArray
7
27
  };
8
28
  //# sourceMappingURL=index183.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index183.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js"],"sourcesContent":["/**\n * Returns the start date of the week in the broadcast calendar.\n *\n * The broadcast week starts on Monday. If the first day of the month is not a\n * Monday, this function calculates the previous Monday as the start of the\n * broadcast week.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the start of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The start date of the broadcast week.\n */\nexport function startOfBroadcastWeek(date, dateLib) {\n const firstOfMonth = dateLib.startOfMonth(date);\n const dayOfWeek = firstOfMonth.getDay();\n if (dayOfWeek === 1) {\n return firstOfMonth;\n }\n else if (dayOfWeek === 0) {\n return dateLib.addDays(firstOfMonth, -1 * 6);\n }\n else {\n return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));\n }\n}\n"],"names":["startOfBroadcastWeek","date","dateLib","firstOfMonth","dayOfWeek"],"mappings":"AAYO,SAASA,EAAqBC,GAAMC,GAAS;AAChD,QAAMC,IAAeD,EAAQ,aAAaD,CAAI,GACxCG,IAAYD,EAAa,OAAM;AACrC,SAAIC,MAAc,IACPD,IAEFC,MAAc,IACZF,EAAQ,QAAQC,GAAc,EAAM,IAGpCD,EAAQ,QAAQC,GAAc,MAAMC,IAAY,EAAE;AAEjE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index183.js","sources":["../../../node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportEx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,CAAC;AAGtB,SAAOK,EAAG,OAAOI,KAAM,MAAM,UAAU,MAAM,KAAKH,CAAI,CAAC;AACzD;","x_google_ignoreList":[0]}
package/dist/index184.js CHANGED
@@ -1,11 +1,32 @@
1
- import { constructFrom as a } from "./index278.js";
2
- import { toDate as i } from "./index279.js";
3
- function s(e, r, o) {
4
- const t = i(e, o?.in);
5
- return isNaN(r) ? a(e, NaN) : (r && t.setDate(t.getDate() + r), t);
6
- }
1
+ import { __rest as E, __assign as r } from "./index183.js";
2
+ import * as a from "react";
3
+ import { zeroRightClassName as I, fullWidthClassName as Z } from "./index274.js";
4
+ import { effectCar as W } from "./index275.js";
5
+ import { useMergeRefs as z } from "./index276.js";
6
+ var l = function() {
7
+ }, m = a.forwardRef(function(e, d) {
8
+ var o = a.useRef(null), n = a.useState({
9
+ onScrollCapture: l,
10
+ onWheelCapture: l,
11
+ onTouchMoveCapture: l
12
+ }), f = n[0], v = n[1], h = e.forwardProps, t = e.children, u = e.className, C = e.removeScrollBar, R = e.enabled, g = e.shards, P = e.sideCar, S = e.noRelative, b = e.noIsolation, w = e.inert, N = e.allowPinchZoom, i = e.as, M = i === void 0 ? "div" : i, _ = e.gapMode, B = E(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = P, s = z([o, d]), c = r(r({}, B), f);
13
+ return a.createElement(
14
+ a.Fragment,
15
+ null,
16
+ R && a.createElement(k, { sideCar: W, removeScrollBar: C, shards: g, noRelative: S, noIsolation: b, inert: w, setCallbacks: v, allowPinchZoom: !!N, lockRef: o, gapMode: _ }),
17
+ h ? a.cloneElement(a.Children.only(t), r(r({}, c), { ref: s })) : a.createElement(M, r({}, c, { className: u, ref: s }), t)
18
+ );
19
+ });
20
+ m.defaultProps = {
21
+ enabled: !0,
22
+ removeScrollBar: !0,
23
+ inert: !1
24
+ };
25
+ m.classNames = {
26
+ fullWidth: Z,
27
+ zeroRight: I
28
+ };
7
29
  export {
8
- s as addDays,
9
- s as default
30
+ m as RemoveScroll
10
31
  };
11
32
  //# sourceMappingURL=index184.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index184.js","sources":["../../../node_modules/date-fns/addDays.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given 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 date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n"],"names":["addDays","date","amount","options","_date","toDate","constructFrom"],"mappings":";;AA6BO,SAASA,EAAQC,GAAMC,GAAQC,GAAS;AAC7C,QAAMC,IAAQC,EAAOJ,GAAME,GAAS,EAAE;AACtC,SAAI,MAAMD,CAAM,IAAUI,EAA6BL,GAAM,GAAG,KAG3DC,KAELE,EAAM,QAAQA,EAAM,QAAO,IAAKF,CAAM,GAC/BE;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index184.js","sources":["../../../node_modules/react-remove-scroll/dist/es2015/UI.js"],"sourcesContent":["import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n"],"names":["nothing","RemoveScroll","React","props","parentRef","ref","_a","callbacks","setCallbacks","forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","_b","Container","gapMode","rest","__rest","SideCar","containerRef","useMergeRefs","containerProps","__assign","effectCar","fullWidthClassName","zeroRightClassName"],"mappings":";;;;;AAKA,IAAIA,IAAU,WAAY;AAE1B,GAIIC,IAAeC,EAAM,WAAW,SAAUC,GAAOC,GAAW;AAC5D,MAAIC,IAAMH,EAAM,OAAO,IAAI,GACvBI,IAAKJ,EAAM,SAAS;AAAA,IACpB,iBAAiBF;AAAA,IACjB,gBAAgBA;AAAA,IAChB,oBAAoBA;AAAA,EAC5B,CAAK,GAAGO,IAAYD,EAAG,CAAC,GAAGE,IAAeF,EAAG,CAAC,GACtCG,IAAeN,EAAM,cAAcO,IAAWP,EAAM,UAAUQ,IAAYR,EAAM,WAAWS,IAAkBT,EAAM,iBAAiBU,IAAUV,EAAM,SAASW,IAASX,EAAM,QAAQY,IAAUZ,EAAM,SAASa,IAAab,EAAM,YAAYc,IAAcd,EAAM,aAAae,IAAQf,EAAM,OAAOgB,IAAiBhB,EAAM,gBAAgBiB,IAAKjB,EAAM,IAAIkB,IAAYD,MAAO,SAAS,QAAQA,GAAIE,IAAUnB,EAAM,SAASoB,IAAOC,EAAOrB,GAAO,CAAC,gBAAgB,YAAY,aAAa,mBAAmB,WAAW,UAAU,WAAW,cAAc,eAAe,SAAS,kBAAkB,MAAM,SAAS,CAAC,GACnlBsB,IAAUV,GACVW,IAAeC,EAAa,CAACtB,GAAKD,CAAS,CAAC,GAC5CwB,IAAiBC,EAASA,EAAS,CAAA,GAAIN,CAAI,GAAGhB,CAAS;AAC3D,SAAQL,EAAM;AAAA,IAAcA,EAAM;AAAA,IAAU;AAAA,IACxCW,KAAYX,EAAM,cAAcuB,GAAS,EAAE,SAASK,GAAW,iBAAiBlB,GAAiB,QAAQE,GAAQ,YAAYE,GAAY,aAAaC,GAAa,OAAOC,GAAO,cAAcV,GAAc,gBAAgB,CAAC,CAACW,GAAgB,SAASd,GAAK,SAASiB,EAAO,CAAE;AAAA,IAC/Qb,IAAgBP,EAAM,aAAaA,EAAM,SAAS,KAAKQ,CAAQ,GAAGmB,EAASA,EAAS,CAAA,GAAID,CAAc,GAAG,EAAE,KAAKF,EAAY,CAAE,CAAC,IAAMxB,EAAM,cAAcmB,GAAWQ,EAAS,CAAA,GAAID,GAAgB,EAAE,WAAWjB,GAAW,KAAKe,EAAY,CAAE,GAAGhB,CAAQ;AAAA,EAAE;AACjQ,CAAC;AACDT,EAAa,eAAe;AAAA,EACxB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,OAAO;AACX;AACAA,EAAa,aAAa;AAAA,EACtB,WAAW8B;AAAA,EACX,WAAWC;AACf;","x_google_ignoreList":[0]}
package/dist/index185.js CHANGED
@@ -1,21 +1,8 @@
1
- import { constructFrom as s } from "./index278.js";
2
- import { toDate as f } from "./index279.js";
3
- function u(n, o, i) {
4
- const t = f(n, i?.in);
5
- if (isNaN(o)) return s(n, NaN);
6
- if (!o)
7
- return t;
8
- const r = t.getDate(), e = s(n, t.getTime());
9
- e.setMonth(t.getMonth() + o + 1, 0);
10
- const a = e.getDate();
11
- return r >= a ? e : (t.setFullYear(
12
- e.getFullYear(),
13
- e.getMonth(),
14
- r
15
- ), t);
16
- }
1
+ import { RemoveScrollSideCar as r } from "./index277.js";
2
+ import { effectCar as o } from "./index275.js";
3
+ import { exportSidecar as e } from "./index278.js";
4
+ const f = e(o, r);
17
5
  export {
18
- u as addMonths,
19
- u as default
6
+ f as default
20
7
  };
21
8
  //# sourceMappingURL=index185.js.map