@rpcbase/ui 0.287.0 → 0.289.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (738) hide show
  1. package/dist/assets/sha256.worker-DNtOSCbM.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -12
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js.map +1 -1
  6. package/dist/index101.js.map +1 -1
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js.map +1 -1
  10. package/dist/index105.js.map +1 -1
  11. package/dist/index106.js.map +1 -1
  12. package/dist/index107.js.map +1 -1
  13. package/dist/index108.js.map +1 -1
  14. package/dist/index109.js.map +1 -1
  15. package/dist/index11.js +96 -17
  16. package/dist/index11.js.map +1 -1
  17. package/dist/index110.js.map +1 -1
  18. package/dist/index111.js.map +1 -1
  19. package/dist/index112.js.map +1 -1
  20. package/dist/index113.js.map +1 -1
  21. package/dist/index114.js.map +1 -1
  22. package/dist/index115.js.map +1 -1
  23. package/dist/index116.js.map +1 -1
  24. package/dist/index117.js.map +1 -1
  25. package/dist/index118.js.map +1 -1
  26. package/dist/index119.js.map +1 -1
  27. package/dist/index12.js.map +1 -1
  28. package/dist/index120.js.map +1 -1
  29. package/dist/index121.js.map +1 -1
  30. package/dist/index122.js.map +1 -1
  31. package/dist/index123.js +1 -1
  32. package/dist/index123.js.map +1 -1
  33. package/dist/index124.js.map +1 -1
  34. package/dist/index125.js.map +1 -1
  35. package/dist/index126.js.map +1 -1
  36. package/dist/index127.js.map +1 -1
  37. package/dist/index128.js.map +1 -1
  38. package/dist/index129.js.map +1 -1
  39. package/dist/index13.js.map +1 -1
  40. package/dist/index130.js.map +1 -1
  41. package/dist/index131.js.map +1 -1
  42. package/dist/index132.js.map +1 -1
  43. package/dist/index133.js.map +1 -1
  44. package/dist/index134.js.map +1 -1
  45. package/dist/index135.js.map +1 -1
  46. package/dist/index136.js.map +1 -1
  47. package/dist/index137.js.map +1 -1
  48. package/dist/index138.js.map +1 -1
  49. package/dist/index139.js.map +1 -1
  50. package/dist/index14.js.map +1 -1
  51. package/dist/index140.js.map +1 -1
  52. package/dist/index141.js.map +1 -1
  53. package/dist/index142.js.map +1 -1
  54. package/dist/index143.js.map +1 -1
  55. package/dist/index144.js.map +1 -1
  56. package/dist/index145.js.map +1 -1
  57. package/dist/index146.js.map +1 -1
  58. package/dist/index147.js.map +1 -1
  59. package/dist/index148.js.map +1 -1
  60. package/dist/index149.js.map +1 -1
  61. package/dist/index15.js.map +1 -1
  62. package/dist/index150.js.map +1 -1
  63. package/dist/index151.js.map +1 -1
  64. package/dist/index152.js.map +1 -1
  65. package/dist/index153.js.map +1 -1
  66. package/dist/index154.js +4 -4
  67. package/dist/index154.js.map +1 -1
  68. package/dist/index155.js.map +1 -1
  69. package/dist/index156.js.map +1 -1
  70. package/dist/index157.js.map +1 -1
  71. package/dist/index158.js.map +1 -1
  72. package/dist/index159.js.map +1 -1
  73. package/dist/index16.js.map +1 -1
  74. package/dist/index160.js.map +1 -1
  75. package/dist/index161.js.map +1 -1
  76. package/dist/index162.js.map +1 -1
  77. package/dist/index163.js.map +1 -1
  78. package/dist/index164.js.map +1 -1
  79. package/dist/index165.js.map +1 -1
  80. package/dist/index166.js.map +1 -1
  81. package/dist/index167.js.map +1 -1
  82. package/dist/index168.js.map +1 -1
  83. package/dist/index169.js.map +1 -1
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index170.js +18 -12
  86. package/dist/index170.js.map +1 -1
  87. package/dist/index171.js.map +1 -1
  88. package/dist/index172.js.map +1 -1
  89. package/dist/index173.js.map +1 -1
  90. package/dist/index174.js.map +1 -1
  91. package/dist/index175.js.map +1 -1
  92. package/dist/index176.js.map +1 -1
  93. package/dist/index177.js.map +1 -1
  94. package/dist/index178.js.map +1 -1
  95. package/dist/index179.js.map +1 -1
  96. package/dist/index18.js.map +1 -1
  97. package/dist/index180.js.map +1 -1
  98. package/dist/index181.js +1 -1
  99. package/dist/index181.js.map +1 -1
  100. package/dist/index182.js +3 -3
  101. package/dist/index182.js.map +1 -1
  102. package/dist/index183.js.map +1 -1
  103. package/dist/index184.js.map +1 -1
  104. package/dist/index185.js.map +1 -1
  105. package/dist/index186.js.map +1 -1
  106. package/dist/index187.js.map +1 -1
  107. package/dist/index188.js.map +1 -1
  108. package/dist/index189.js.map +1 -1
  109. package/dist/index19.js.map +1 -1
  110. package/dist/index190.js +9 -7
  111. package/dist/index190.js.map +1 -1
  112. package/dist/index191.js +4 -4
  113. package/dist/index191.js.map +1 -1
  114. package/dist/index192.js +4 -15
  115. package/dist/index192.js.map +1 -1
  116. package/dist/index193.js +13 -3
  117. package/dist/index193.js.map +1 -1
  118. package/dist/index194.js +2 -2
  119. package/dist/index194.js.map +1 -1
  120. package/dist/index195.js +4 -85
  121. package/dist/index195.js.map +1 -1
  122. package/dist/index196.js +79 -54
  123. package/dist/index196.js.map +1 -1
  124. package/dist/index197.js +68 -7
  125. package/dist/index197.js.map +1 -1
  126. package/dist/index198.js +3 -23
  127. package/dist/index198.js.map +1 -1
  128. package/dist/index199.js +6 -28
  129. package/dist/index199.js.map +1 -1
  130. package/dist/index20.js.map +1 -1
  131. package/dist/index200.js +4 -97
  132. package/dist/index200.js.map +1 -1
  133. package/dist/index201.js +3 -4
  134. package/dist/index201.js.map +1 -1
  135. package/dist/index202.js +23 -24
  136. package/dist/index202.js.map +1 -1
  137. package/dist/index203.js +28 -10
  138. package/dist/index203.js.map +1 -1
  139. package/dist/index204.js +97 -4
  140. package/dist/index204.js.map +1 -1
  141. package/dist/index205.js +4 -12
  142. package/dist/index205.js.map +1 -1
  143. package/dist/index206.js +22 -19
  144. package/dist/index206.js.map +1 -1
  145. package/dist/index207.js +4 -6
  146. package/dist/index207.js.map +1 -1
  147. package/dist/index208.js +4 -15
  148. package/dist/index208.js.map +1 -1
  149. package/dist/index209.js +10 -102
  150. package/dist/index209.js.map +1 -1
  151. package/dist/index210.js +21 -3
  152. package/dist/index210.js.map +1 -1
  153. package/dist/index211.js +5 -23
  154. package/dist/index211.js.map +1 -1
  155. package/dist/index212.js +15 -28
  156. package/dist/index212.js.map +1 -1
  157. package/dist/index213.js +101 -17
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +3 -7
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +24 -15
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +27 -7
  164. package/dist/index216.js.map +1 -1
  165. package/dist/index217.js +17 -24
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index218.js +6 -22
  168. package/dist/index218.js.map +1 -1
  169. package/dist/index219.js +15 -6
  170. package/dist/index219.js.map +1 -1
  171. package/dist/index220.js +8 -5
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +27 -4
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +23 -4
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +6 -24
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +5 -3
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +4 -24
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +4 -23
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +23 -6
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +22 -8
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -19
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index23.js.map +1 -1
  192. package/dist/index230.js +22 -50
  193. package/dist/index230.js.map +1 -1
  194. package/dist/index231.js +7 -20
  195. package/dist/index231.js.map +1 -1
  196. package/dist/index232.js +9 -27
  197. package/dist/index232.js.map +1 -1
  198. package/dist/index233.js +17 -97
  199. package/dist/index233.js.map +1 -1
  200. package/dist/index234.js +50 -33
  201. package/dist/index234.js.map +1 -1
  202. package/dist/index235.js +20 -119
  203. package/dist/index235.js.map +1 -1
  204. package/dist/index236.js +28 -13
  205. package/dist/index236.js.map +1 -1
  206. package/dist/index237.js +98 -4
  207. package/dist/index237.js.map +1 -1
  208. package/dist/index238.js +33 -15
  209. package/dist/index238.js.map +1 -1
  210. package/dist/index239.js +116 -62
  211. package/dist/index239.js.map +1 -1
  212. package/dist/index24.js.map +1 -1
  213. package/dist/index240.js +13 -10
  214. package/dist/index240.js.map +1 -1
  215. package/dist/index241.js +4 -109
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +14 -14
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +64 -12
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +10 -5
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +104 -318
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +14 -66
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +12 -232
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +4 -270
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +313 -309
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index25.js.map +1 -1
  234. package/dist/index250.js +60 -171
  235. package/dist/index250.js.map +1 -1
  236. package/dist/index251.js +252 -8
  237. package/dist/index251.js.map +1 -1
  238. package/dist/index252.js +268 -41
  239. package/dist/index252.js.map +1 -1
  240. package/dist/index253.js +316 -47
  241. package/dist/index253.js.map +1 -1
  242. package/dist/index254.js +179 -9
  243. package/dist/index254.js.map +1 -1
  244. package/dist/index255.js +6 -50
  245. package/dist/index255.js.map +1 -1
  246. package/dist/index256.js +41 -51
  247. package/dist/index256.js.map +1 -1
  248. package/dist/index257.js +50 -7
  249. package/dist/index257.js.map +1 -1
  250. package/dist/index258.js +9 -10
  251. package/dist/index258.js.map +1 -1
  252. package/dist/index259.js +51 -61
  253. package/dist/index259.js.map +1 -1
  254. package/dist/index26.js.map +1 -1
  255. package/dist/index260.js +53 -42
  256. package/dist/index260.js.map +1 -1
  257. package/dist/index261.js +9 -97
  258. package/dist/index261.js.map +1 -1
  259. package/dist/index262.js +31 -47
  260. package/dist/index262.js.map +1 -1
  261. package/dist/index263.js +61 -36
  262. package/dist/index263.js.map +1 -1
  263. package/dist/index264.js +43 -47
  264. package/dist/index264.js.map +1 -1
  265. package/dist/index265.js +92 -46
  266. package/dist/index265.js.map +1 -1
  267. package/dist/index266.js +48 -20
  268. package/dist/index266.js.map +1 -1
  269. package/dist/index267.js +33 -176
  270. package/dist/index267.js.map +1 -1
  271. package/dist/index268.js +49 -48
  272. package/dist/index268.js.map +1 -1
  273. package/dist/index269.js +68 -15
  274. package/dist/index269.js.map +1 -1
  275. package/dist/index27.js.map +1 -1
  276. package/dist/index270.js +20 -65
  277. package/dist/index270.js.map +1 -1
  278. package/dist/index271.js +202 -9
  279. package/dist/index271.js.map +1 -1
  280. package/dist/index272.js +48 -40
  281. package/dist/index272.js.map +1 -1
  282. package/dist/index273.js +60 -91
  283. package/dist/index273.js.map +1 -1
  284. package/dist/index274.js +9 -278
  285. package/dist/index274.js.map +1 -1
  286. package/dist/index275.js +38 -55
  287. package/dist/index275.js.map +1 -1
  288. package/dist/index276.js +91 -10
  289. package/dist/index276.js.map +1 -1
  290. package/dist/index277.js +278 -12
  291. package/dist/index277.js.map +1 -1
  292. package/dist/index278.js +58 -11
  293. package/dist/index278.js.map +1 -1
  294. package/dist/index279.js +11 -64
  295. package/dist/index279.js.map +1 -1
  296. package/dist/index28.js +5 -5
  297. package/dist/index28.js.map +1 -1
  298. package/dist/index280.js +12 -6
  299. package/dist/index280.js.map +1 -1
  300. package/dist/index281.js +3 -25
  301. package/dist/index281.js.map +1 -1
  302. package/dist/index282.js +3 -25
  303. package/dist/index282.js.map +1 -1
  304. package/dist/index283.js +12 -126
  305. package/dist/index283.js.map +1 -1
  306. package/dist/index284.js +63 -51
  307. package/dist/index284.js.map +1 -1
  308. package/dist/index285.js +5 -60
  309. package/dist/index285.js.map +1 -1
  310. package/dist/index286.js +24 -48
  311. package/dist/index286.js.map +1 -1
  312. package/dist/index287.js +24 -6
  313. package/dist/index287.js.map +1 -1
  314. package/dist/index288.js +125 -14
  315. package/dist/index288.js.map +1 -1
  316. package/dist/index289.js +51 -16
  317. package/dist/index289.js.map +1 -1
  318. package/dist/index29.js +5 -7
  319. package/dist/index29.js.map +1 -1
  320. package/dist/index290.js +56 -11
  321. package/dist/index290.js.map +1 -1
  322. package/dist/index291.js +47 -24
  323. package/dist/index291.js.map +1 -1
  324. package/dist/index292.js +7 -51
  325. package/dist/index292.js.map +1 -1
  326. package/dist/index293.js +15 -6
  327. package/dist/index293.js.map +1 -1
  328. package/dist/index294.js +18 -148
  329. package/dist/index294.js.map +1 -1
  330. package/dist/index295.js +12 -59
  331. package/dist/index295.js.map +1 -1
  332. package/dist/index296.js +25 -120
  333. package/dist/index296.js.map +1 -1
  334. package/dist/index297.js +54 -15
  335. package/dist/index297.js.map +1 -1
  336. package/dist/index298.js +5 -866
  337. package/dist/index298.js.map +1 -1
  338. package/dist/index299.js +148 -28
  339. package/dist/index299.js.map +1 -1
  340. package/dist/index3.js.map +1 -1
  341. package/dist/index30.js +6 -8
  342. package/dist/index30.js.map +1 -1
  343. package/dist/index300.js +55 -512
  344. package/dist/index300.js.map +1 -1
  345. package/dist/index301.js +111 -794
  346. package/dist/index301.js.map +1 -1
  347. package/dist/index302.js +14 -7436
  348. package/dist/index302.js.map +1 -1
  349. package/dist/index303.js +862 -6
  350. package/dist/index303.js.map +1 -1
  351. package/dist/index304.js +28 -12
  352. package/dist/index304.js.map +1 -1
  353. package/dist/index305.js +515 -5
  354. package/dist/index305.js.map +1 -1
  355. package/dist/index306.js +803 -5
  356. package/dist/index306.js.map +1 -1
  357. package/dist/index307.js +7426 -468
  358. package/dist/index307.js.map +1 -1
  359. package/dist/index308.js +6 -37
  360. package/dist/index308.js.map +1 -1
  361. package/dist/index309.js +12 -19
  362. package/dist/index309.js.map +1 -1
  363. package/dist/index31.js +5 -11
  364. package/dist/index31.js.map +1 -1
  365. package/dist/index310.js +5 -30
  366. package/dist/index310.js.map +1 -1
  367. package/dist/index311.js +5 -4
  368. package/dist/index311.js.map +1 -1
  369. package/dist/index312.js +461 -51
  370. package/dist/index312.js.map +1 -1
  371. package/dist/index313.js +36 -10
  372. package/dist/index313.js.map +1 -1
  373. package/dist/index314.js +19 -5
  374. package/dist/index314.js.map +1 -1
  375. package/dist/index315.js +29 -8
  376. package/dist/index315.js.map +1 -1
  377. package/dist/index316.js +4 -12
  378. package/dist/index316.js.map +1 -1
  379. package/dist/index317.js +60 -3
  380. package/dist/index317.js.map +1 -1
  381. package/dist/index318.js +10 -15
  382. package/dist/index318.js.map +1 -1
  383. package/dist/index319.js +5 -25
  384. package/dist/index319.js.map +1 -1
  385. package/dist/index32.js +5 -5
  386. package/dist/index32.js.map +1 -1
  387. package/dist/index320.js +9 -41
  388. package/dist/index320.js.map +1 -1
  389. package/dist/index321.js +11 -4
  390. package/dist/index321.js.map +1 -1
  391. package/dist/index322.js +3 -26
  392. package/dist/index322.js.map +1 -1
  393. package/dist/index323.js +15 -18
  394. package/dist/index323.js.map +1 -1
  395. package/dist/index324.js +22 -31
  396. package/dist/index324.js.map +1 -1
  397. package/dist/index325.js +41 -5
  398. package/dist/index325.js.map +1 -1
  399. package/dist/index326.js +4 -8
  400. package/dist/index326.js.map +1 -1
  401. package/dist/index327.js +25 -8
  402. package/dist/index327.js.map +1 -1
  403. package/dist/index328.js +19 -9
  404. package/dist/index328.js.map +1 -1
  405. package/dist/index329.js +34 -10
  406. package/dist/index329.js.map +1 -1
  407. package/dist/index33.js +9 -6
  408. package/dist/index33.js.map +1 -1
  409. package/dist/index330.js +5 -7
  410. package/dist/index330.js.map +1 -1
  411. package/dist/index331.js +9 -75
  412. package/dist/index331.js.map +1 -1
  413. package/dist/index332.js +8 -162
  414. package/dist/index332.js.map +1 -1
  415. package/dist/index333.js +9 -114
  416. package/dist/index333.js.map +1 -1
  417. package/dist/index334.js +10 -14
  418. package/dist/index334.js.map +1 -1
  419. package/dist/index335.js +7 -80
  420. package/dist/index335.js.map +1 -1
  421. package/dist/index336.js +68 -39
  422. package/dist/index336.js.map +1 -1
  423. package/dist/index337.js +160 -11
  424. package/dist/index337.js.map +1 -1
  425. package/dist/index338.js +113 -15
  426. package/dist/index338.js.map +1 -1
  427. package/dist/index339.js +13 -100
  428. package/dist/index339.js.map +1 -1
  429. package/dist/index34.js +6 -6
  430. package/dist/index34.js.map +1 -1
  431. package/dist/index340.js +73 -49
  432. package/dist/index340.js.map +1 -1
  433. package/dist/index341.js +34 -96
  434. package/dist/index341.js.map +1 -1
  435. package/dist/index342.js +12 -70
  436. package/dist/index342.js.map +1 -1
  437. package/dist/index343.js +14 -111
  438. package/dist/index343.js.map +1 -1
  439. package/dist/index344.js +94 -48
  440. package/dist/index344.js.map +1 -1
  441. package/dist/index345.js +50 -37
  442. package/dist/index345.js.map +1 -1
  443. package/dist/index346.js +89 -125
  444. package/dist/index346.js.map +1 -1
  445. package/dist/index347.js +52 -123
  446. package/dist/index347.js.map +1 -1
  447. package/dist/index348.js +54 -197
  448. package/dist/index348.js.map +1 -1
  449. package/dist/index349.js +44 -229
  450. package/dist/index349.js.map +1 -1
  451. package/dist/index35.js +9 -9
  452. package/dist/index35.js.map +1 -1
  453. package/dist/index350.js +42 -308
  454. package/dist/index350.js.map +1 -1
  455. package/dist/index351.js +144 -5
  456. package/dist/index351.js.map +1 -1
  457. package/dist/index352.js +142 -6
  458. package/dist/index352.js.map +1 -1
  459. package/dist/index353.js +257 -7
  460. package/dist/index353.js.map +1 -1
  461. package/dist/index354.js +241 -6
  462. package/dist/index354.js.map +1 -1
  463. package/dist/index355.js +309 -6
  464. package/dist/index355.js.map +1 -1
  465. package/dist/index356.js +5 -21
  466. package/dist/index356.js.map +1 -1
  467. package/dist/index357.js +6 -10
  468. package/dist/index357.js.map +1 -1
  469. package/dist/index358.js +7 -128
  470. package/dist/index358.js.map +1 -1
  471. package/dist/index359.js +6 -42
  472. package/dist/index359.js.map +1 -1
  473. package/dist/index36.js +12 -7
  474. package/dist/index36.js.map +1 -1
  475. package/dist/index360.js +6 -68
  476. package/dist/index360.js.map +1 -1
  477. package/dist/index361.js +20 -116
  478. package/dist/index361.js.map +1 -1
  479. package/dist/index362.js +10 -490
  480. package/dist/index362.js.map +1 -1
  481. package/dist/index363.js +128 -7
  482. package/dist/index363.js.map +1 -1
  483. package/dist/index364.js +42 -13
  484. package/dist/index364.js.map +1 -1
  485. package/dist/index365.js +67 -3
  486. package/dist/index365.js.map +1 -1
  487. package/dist/index366.js +115 -45
  488. package/dist/index366.js.map +1 -1
  489. package/dist/index367.js +490 -11
  490. package/dist/index367.js.map +1 -1
  491. package/dist/index368.js +8 -26
  492. package/dist/index368.js.map +1 -1
  493. package/dist/index369.js +12 -41
  494. package/dist/index369.js.map +1 -1
  495. package/dist/index37.js +13 -5
  496. package/dist/index37.js.map +1 -1
  497. package/dist/index370.js +4 -36
  498. package/dist/index370.js.map +1 -1
  499. package/dist/index371.js +45 -15
  500. package/dist/index371.js.map +1 -1
  501. package/dist/index372.js +24 -41
  502. package/dist/index372.js.map +1 -1
  503. package/dist/index373.js +3 -12
  504. package/dist/index373.js.map +1 -1
  505. package/dist/index374.js +27 -11
  506. package/dist/index374.js.map +1 -1
  507. package/dist/index375.js +40 -50
  508. package/dist/index375.js.map +1 -1
  509. package/dist/index376.js +37 -40
  510. package/dist/index376.js.map +1 -1
  511. package/dist/index377.js +12 -10
  512. package/dist/index377.js.map +1 -1
  513. package/dist/index378.js +40 -4
  514. package/dist/index378.js.map +1 -1
  515. package/dist/index379.js +7 -4
  516. package/dist/index379.js.map +1 -1
  517. package/dist/index38.js +5 -5
  518. package/dist/index38.js.map +1 -1
  519. package/dist/index380.js +29 -8
  520. package/dist/index380.js.map +1 -1
  521. package/dist/index381.js +9 -303
  522. package/dist/index381.js.map +1 -1
  523. package/dist/index382.js +57 -4
  524. package/dist/index382.js.map +1 -1
  525. package/dist/index383.js +40 -22
  526. package/dist/index383.js.map +1 -1
  527. package/dist/index384.js +15 -105
  528. package/dist/index384.js.map +1 -1
  529. package/dist/index385.js +5 -22
  530. package/dist/index385.js.map +1 -1
  531. package/dist/index386.js +10 -22
  532. package/dist/index386.js.map +1 -1
  533. package/dist/index387.js +289 -16
  534. package/dist/index387.js.map +1 -1
  535. package/dist/index388.js +4 -12
  536. package/dist/index388.js.map +1 -1
  537. package/dist/index389.js +20 -112
  538. package/dist/index389.js.map +1 -1
  539. package/dist/index39.js +6 -10
  540. package/dist/index39.js.map +1 -1
  541. package/dist/index390.js +3 -9
  542. package/dist/index390.js.map +1 -1
  543. package/dist/index391.js +104 -27
  544. package/dist/index391.js.map +1 -1
  545. package/dist/index392.js +20 -9
  546. package/dist/index392.js.map +1 -1
  547. package/dist/index393.js +20 -6
  548. package/dist/index393.js.map +1 -1
  549. package/dist/index394.js +14 -253
  550. package/dist/index394.js.map +1 -1
  551. package/dist/index395.js +12 -10
  552. package/dist/index395.js.map +1 -1
  553. package/dist/index396.js +117 -11
  554. package/dist/index396.js.map +1 -1
  555. package/dist/index397.js +8 -6
  556. package/dist/index397.js.map +1 -1
  557. package/dist/index398.js +32 -22
  558. package/dist/index398.js.map +1 -1
  559. package/dist/index399.js +9 -23
  560. package/dist/index399.js.map +1 -1
  561. package/dist/index4.js.map +1 -1
  562. package/dist/index40.js +8 -11
  563. package/dist/index40.js.map +1 -1
  564. package/dist/index400.js +6 -105
  565. package/dist/index400.js.map +1 -1
  566. package/dist/index401.js +3 -15
  567. package/dist/index401.js.map +1 -1
  568. package/dist/index402.js +251 -10
  569. package/dist/index402.js.map +1 -1
  570. package/dist/index403.js +9 -7
  571. package/dist/index403.js.map +1 -1
  572. package/dist/index404.js +11 -239
  573. package/dist/index404.js.map +1 -1
  574. package/dist/index405.js +7 -28
  575. package/dist/index405.js.map +1 -1
  576. package/dist/index406.js +21 -37
  577. package/dist/index406.js.map +1 -1
  578. package/dist/index407.js +21 -10
  579. package/dist/index407.js.map +1 -1
  580. package/dist/index408.js +97 -117
  581. package/dist/index408.js.map +1 -1
  582. package/dist/index409.js +15 -40
  583. package/dist/index409.js.map +1 -1
  584. package/dist/index41.js +6 -7
  585. package/dist/index41.js.map +1 -1
  586. package/dist/index410.js +11 -25
  587. package/dist/index410.js.map +1 -1
  588. package/dist/index411.js +7 -9
  589. package/dist/index411.js.map +1 -1
  590. package/dist/index412.js +3 -24
  591. package/dist/index412.js.map +1 -1
  592. package/dist/index413.js +226 -15
  593. package/dist/index413.js.map +1 -1
  594. package/dist/index414.js +24 -11
  595. package/dist/index414.js.map +1 -1
  596. package/dist/index415.js +38 -4
  597. package/dist/index415.js.map +1 -1
  598. package/dist/index416.js +11 -324
  599. package/dist/index416.js.map +1 -1
  600. package/dist/index417.js +119 -62
  601. package/dist/index417.js.map +1 -1
  602. package/dist/index418.js +42 -4
  603. package/dist/index418.js.map +1 -1
  604. package/dist/index419.js +25 -28
  605. package/dist/index419.js.map +1 -1
  606. package/dist/index42.js +6 -4
  607. package/dist/index42.js.map +1 -1
  608. package/dist/index420.js +11 -470
  609. package/dist/index420.js.map +1 -1
  610. package/dist/index421.js +23 -268
  611. package/dist/index421.js.map +1 -1
  612. package/dist/index422.js +24 -0
  613. package/dist/index422.js.map +1 -0
  614. package/dist/index423.js +17 -0
  615. package/dist/index423.js.map +1 -0
  616. package/dist/index424.js +8 -0
  617. package/dist/index424.js.map +1 -0
  618. package/dist/index425.js +328 -0
  619. package/dist/index425.js.map +1 -0
  620. package/dist/index426.js +66 -0
  621. package/dist/index426.js.map +1 -0
  622. package/dist/index427.js +7 -0
  623. package/dist/index427.js.map +1 -0
  624. package/dist/index428.js +31 -0
  625. package/dist/index428.js.map +1 -0
  626. package/dist/index429.js +474 -0
  627. package/dist/index429.js.map +1 -0
  628. package/dist/index43.js +68 -7
  629. package/dist/index43.js.map +1 -1
  630. package/dist/index430.js +272 -0
  631. package/dist/index430.js.map +1 -0
  632. package/dist/index44.js +7 -6
  633. package/dist/index44.js.map +1 -1
  634. package/dist/index45.js +31 -7
  635. package/dist/index45.js.map +1 -1
  636. package/dist/index46.js +10 -10
  637. package/dist/index46.js.map +1 -1
  638. package/dist/index47.js +15 -13
  639. package/dist/index47.js.map +1 -1
  640. package/dist/index48.js +201 -7
  641. package/dist/index48.js.map +1 -1
  642. package/dist/index49.js +20 -6
  643. package/dist/index49.js.map +1 -1
  644. package/dist/index5.js.map +1 -1
  645. package/dist/index50.js +16 -6
  646. package/dist/index50.js.map +1 -1
  647. package/dist/index51.js +123 -14
  648. package/dist/index51.js.map +1 -1
  649. package/dist/index52.js +19 -8
  650. package/dist/index52.js.map +1 -1
  651. package/dist/index53.js +5 -7
  652. package/dist/index53.js.map +1 -1
  653. package/dist/index54.js +9 -68
  654. package/dist/index54.js.map +1 -1
  655. package/dist/index55.js +7 -7
  656. package/dist/index55.js.map +1 -1
  657. package/dist/index56.js +9 -31
  658. package/dist/index56.js.map +1 -1
  659. package/dist/index57.js +13 -10
  660. package/dist/index57.js.map +1 -1
  661. package/dist/index58.js +8 -15
  662. package/dist/index58.js.map +1 -1
  663. package/dist/index59.js +10 -201
  664. package/dist/index59.js.map +1 -1
  665. package/dist/index6.js.map +1 -1
  666. package/dist/index60.js +13 -20
  667. package/dist/index60.js.map +1 -1
  668. package/dist/index61.js +9 -16
  669. package/dist/index61.js.map +1 -1
  670. package/dist/index62.js +10 -123
  671. package/dist/index62.js.map +1 -1
  672. package/dist/index63.js +5 -19
  673. package/dist/index63.js.map +1 -1
  674. package/dist/index64.js +42 -9
  675. package/dist/index64.js.map +1 -1
  676. package/dist/index65.js +387 -9
  677. package/dist/index65.js.map +1 -1
  678. package/dist/index66.js +37 -14
  679. package/dist/index66.js.map +1 -1
  680. package/dist/index67.js +21 -9
  681. package/dist/index67.js.map +1 -1
  682. package/dist/index68.js +4 -9
  683. package/dist/index68.js.map +1 -1
  684. package/dist/index69.js +6 -4
  685. package/dist/index69.js.map +1 -1
  686. package/dist/index7.js +3 -3
  687. package/dist/index7.js.map +1 -1
  688. package/dist/index70.js +57 -41
  689. package/dist/index70.js.map +1 -1
  690. package/dist/index71.js +5 -387
  691. package/dist/index71.js.map +1 -1
  692. package/dist/index72.js +6 -37
  693. package/dist/index72.js.map +1 -1
  694. package/dist/index73.js +5 -21
  695. package/dist/index73.js.map +1 -1
  696. package/dist/index74.js +4 -56
  697. package/dist/index74.js.map +1 -1
  698. package/dist/index75.js +7 -7
  699. package/dist/index75.js.map +1 -1
  700. package/dist/index76.js +6 -5
  701. package/dist/index76.js.map +1 -1
  702. package/dist/index77.js +6 -5
  703. package/dist/index77.js.map +1 -1
  704. package/dist/index78.js +11 -5
  705. package/dist/index78.js.map +1 -1
  706. package/dist/index79.js +11 -5
  707. package/dist/index79.js.map +1 -1
  708. package/dist/index8.js.map +1 -1
  709. package/dist/index80.js +7 -6
  710. package/dist/index80.js.map +1 -1
  711. package/dist/index81.js +10 -6
  712. package/dist/index81.js.map +1 -1
  713. package/dist/index82.js +5 -8
  714. package/dist/index82.js.map +1 -1
  715. package/dist/index83.js +6 -7
  716. package/dist/index83.js.map +1 -1
  717. package/dist/index84.js.map +1 -1
  718. package/dist/index85.js.map +1 -1
  719. package/dist/index86.js.map +1 -1
  720. package/dist/index87.js +2 -2
  721. package/dist/index87.js.map +1 -1
  722. package/dist/index88.js +31 -31
  723. package/dist/index88.js.map +1 -1
  724. package/dist/index89.js +1 -1
  725. package/dist/index89.js.map +1 -1
  726. package/dist/index9.js.map +1 -1
  727. package/dist/index90.js.map +1 -1
  728. package/dist/index91.js.map +1 -1
  729. package/dist/index92.js.map +1 -1
  730. package/dist/index93.js.map +1 -1
  731. package/dist/index94.js.map +1 -1
  732. package/dist/index95.js.map +1 -1
  733. package/dist/index96.js.map +1 -1
  734. package/dist/index97.js.map +1 -1
  735. package/dist/index98.js.map +1 -1
  736. package/dist/index99.js.map +1 -1
  737. package/package.json +13 -13
  738. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +0 -1
package/dist/index43.js CHANGED
@@ -1,10 +1,71 @@
1
- import e from "./index25.js";
2
- import t from "./index42.js";
3
- //#region ../../node_modules/date-fns/isValid.js
4
- function n(n) {
5
- return !(!t(n) && typeof n != "number" || isNaN(+e(n)));
6
- }
1
+ //#region ../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js
2
+ var e = {
3
+ lessThanXSeconds: {
4
+ one: "less than a second",
5
+ other: "less than {{count}} seconds"
6
+ },
7
+ xSeconds: {
8
+ one: "1 second",
9
+ other: "{{count}} seconds"
10
+ },
11
+ halfAMinute: "half a minute",
12
+ lessThanXMinutes: {
13
+ one: "less than a minute",
14
+ other: "less than {{count}} minutes"
15
+ },
16
+ xMinutes: {
17
+ one: "1 minute",
18
+ other: "{{count}} minutes"
19
+ },
20
+ aboutXHours: {
21
+ one: "about 1 hour",
22
+ other: "about {{count}} hours"
23
+ },
24
+ xHours: {
25
+ one: "1 hour",
26
+ other: "{{count}} hours"
27
+ },
28
+ xDays: {
29
+ one: "1 day",
30
+ other: "{{count}} days"
31
+ },
32
+ aboutXWeeks: {
33
+ one: "about 1 week",
34
+ other: "about {{count}} weeks"
35
+ },
36
+ xWeeks: {
37
+ one: "1 week",
38
+ other: "{{count}} weeks"
39
+ },
40
+ aboutXMonths: {
41
+ one: "about 1 month",
42
+ other: "about {{count}} months"
43
+ },
44
+ xMonths: {
45
+ one: "1 month",
46
+ other: "{{count}} months"
47
+ },
48
+ aboutXYears: {
49
+ one: "about 1 year",
50
+ other: "about {{count}} years"
51
+ },
52
+ xYears: {
53
+ one: "1 year",
54
+ other: "{{count}} years"
55
+ },
56
+ overXYears: {
57
+ one: "over 1 year",
58
+ other: "over {{count}} years"
59
+ },
60
+ almostXYears: {
61
+ one: "almost 1 year",
62
+ other: "almost {{count}} years"
63
+ }
64
+ }, t = (t, n, r) => {
65
+ let i, a = e[t];
66
+ return i = typeof a == "string" ? a : n === 1 ? a.one : a.other.replace("{{count}}", n.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + i : i + " ago" : i;
67
+ };
7
68
  //#endregion
8
- export { n as default, n as isValid };
69
+ export { t as formatDistance };
9
70
 
10
71
  //# sourceMappingURL=index43.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index43.js","names":[],"sources":["../../../node_modules/date-fns/isValid.js"],"sourcesContent":["import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n"],"x_google_ignoreList":[0],"mappings":";;;AAkCA,SAAgB,EAAQ,GAAM;CAC5B,OAAO,EAAG,CAAC,EAAO,CAAI,KAAK,OAAO,KAAS,YAAa,MAAM,CAAC,EAAO,CAAI,CAAC;AAC7E"}
1
+ {"version":3,"file":"index43.js","names":["formatDistanceLocale","formatDistance","result","tokenValue","token","count","options"],"sources":["../../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js"],"sourcesContent":["const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n"],"ignoreList":[0],"mappings":";AAAA,IAAMA,IAAuB;CAC3B,kBAAkB;EAChB,KAAK;EACL,OAAO;CACT;CAEA,UAAU;EACR,KAAK;EACL,OAAO;CACT;CAEA,aAAa;CAEb,kBAAkB;EAChB,KAAK;EACL,OAAO;CACT;CAEA,UAAU;EACR,KAAK;EACL,OAAO;CACT;CAEA,aAAa;EACX,KAAK;EACL,OAAO;CACT;CAEA,QAAQ;EACN,KAAK;EACL,OAAO;CACT;CAEA,OAAO;EACL,KAAK;EACL,OAAO;CACT;CAEA,aAAa;EACX,KAAK;EACL,OAAO;CACT;CAEA,QAAQ;EACN,KAAK;EACL,OAAO;CACT;CAEA,cAAc;EACZ,KAAK;EACL,OAAO;CACT;CAEA,SAAS;EACP,KAAK;EACL,OAAO;CACT;CAEA,aAAa;EACX,KAAK;EACL,OAAO;CACT;CAEA,QAAQ;EACN,KAAK;EACL,OAAO;CACT;CAEA,YAAY;EACV,KAAK;EACL,OAAO;CACT;CAEA,cAAc;EACZ,KAAK;EACL,OAAO;CACT;AACF,GAEaC,KAAkB,GAAO,GAAO,MAAY;CACvD,IAAIC,GAEEC,IAAaH,EAAqBI;CAiBxC,OAhBA,AAKEF,IALE,OAAOC,KAAe,WACfA,IACAE,MAAU,IACVF,EAAW,MAEXA,EAAW,MAAM,QAAQ,aAAaE,EAAM,SAAS,CAAC,GAG7DC,GAAS,YACPA,EAAQ,cAAcA,EAAQ,aAAa,IACtC,QAAQJ,IAERA,IAAS,SAIbA;AACT"}
@@ -0,0 +1,272 @@
1
+ import { cn as e } from "./index12.js";
2
+ import { useEffect as t, useMemo as n, useState as r } from "react";
3
+ import { Loader2 as i } from "lucide-react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ //#region src/components/Notifications/NotificationsSettings.tsx
6
+ var s = [
7
+ {
8
+ value: "off",
9
+ label: "Off"
10
+ },
11
+ {
12
+ value: "daily",
13
+ label: "Daily"
14
+ },
15
+ {
16
+ value: "weekly",
17
+ label: "Weekly"
18
+ }
19
+ ], c = (e) => {
20
+ let t = e?.digestFrequency;
21
+ return {
22
+ digestFrequency: t === "off" || t === "daily" || t === "weekly" ? t : "weekly",
23
+ topicPreferences: Array.isArray(e?.topicPreferences) ? e.topicPreferences.map((e) => ({
24
+ topic: typeof e.topic == "string" ? e.topic.trim() : "",
25
+ inApp: e.inApp === !0,
26
+ emailDigest: e.emailDigest === !0,
27
+ push: e.push === !0
28
+ })).filter((e) => e.topic.length > 0) : [],
29
+ ...typeof e?.lastDigestSentAt == "string" ? { lastDigestSentAt: e.lastDigestSentAt } : {}
30
+ };
31
+ }, l = (e) => {
32
+ if (!Array.isArray(e)) return [];
33
+ let t = /* @__PURE__ */ new Set();
34
+ return e.map((e) => ({
35
+ topic: typeof e.topic == "string" ? e.topic.trim() : "",
36
+ title: typeof e.title == "string" ? e.title.trim() : "",
37
+ description: typeof e.description == "string" ? e.description.trim() : void 0
38
+ })).filter((e) => e.topic.length > 0).filter((e) => !t.has(e.topic) && (t.add(e.topic), !0));
39
+ }, u = (e, t) => {
40
+ let n = {
41
+ topic: "",
42
+ inApp: !0,
43
+ emailDigest: !0,
44
+ push: !1
45
+ }, r = new Map(e.topicPreferences.map((e) => [e.topic, e]));
46
+ return {
47
+ ...e,
48
+ topicPreferences: t.map((e) => {
49
+ let t = r.get(e.topic);
50
+ return t ? {
51
+ topic: e.topic,
52
+ inApp: t.inApp === !0,
53
+ emailDigest: t.emailDigest === !0,
54
+ push: t.push === !0
55
+ } : {
56
+ ...n,
57
+ topic: e.topic
58
+ };
59
+ })
60
+ };
61
+ };
62
+ function d({ className: d, topics: f }) {
63
+ let [p, m] = r(!0), [h, g] = r(!1), [_, v] = r(null), [y, b] = r(() => c({
64
+ digestFrequency: "weekly",
65
+ topicPreferences: []
66
+ })), x = n(() => l(f), [f]), S = async () => {
67
+ m(!0), v(null);
68
+ try {
69
+ let e = await fetch("/api/rb/notifications/settings", {
70
+ method: "GET",
71
+ credentials: "include"
72
+ }), t = await e.json().catch(() => null);
73
+ if (!e.ok || !t?.ok) {
74
+ v(t?.error || "Unable to load notification settings.");
75
+ return;
76
+ }
77
+ let n = c(t.settings);
78
+ b(x.length > 0 ? u(n, x) : n);
79
+ } catch {
80
+ v("Unable to load notification settings.");
81
+ } finally {
82
+ m(!1);
83
+ }
84
+ }, C = async (e) => {
85
+ g(!0), v(null);
86
+ try {
87
+ let t = await fetch("/api/rb/notifications/settings", {
88
+ method: "PUT",
89
+ headers: { "Content-Type": "application/json" },
90
+ credentials: "include",
91
+ body: JSON.stringify({
92
+ digestFrequency: e.digestFrequency,
93
+ topicPreferences: e.topicPreferences
94
+ })
95
+ }), n = await t.json().catch(() => null);
96
+ if (!t.ok || !n?.ok) {
97
+ v(n?.error || "Unable to save notification settings.");
98
+ return;
99
+ }
100
+ let r = c(n.settings);
101
+ b(x.length > 0 ? u(r, x) : r);
102
+ } catch {
103
+ v("Unable to save notification settings.");
104
+ } finally {
105
+ g(!1);
106
+ }
107
+ };
108
+ t(() => {
109
+ S();
110
+ }, []), t(() => {
111
+ x.length !== 0 && b((e) => u(e, x));
112
+ }, [x]);
113
+ let w = (e, t) => {
114
+ let n = y.topicPreferences.some((t) => t.topic === e) ? y.topicPreferences.map((n) => n.topic === e ? t(n) : n) : [...y.topicPreferences, t({
115
+ topic: e,
116
+ inApp: !0,
117
+ emailDigest: !0,
118
+ push: !1
119
+ })], r = c({
120
+ ...y,
121
+ topicPreferences: n
122
+ });
123
+ b(r), C(r);
124
+ };
125
+ return p ? /* @__PURE__ */ a("div", {
126
+ className: e("flex items-center justify-center py-10 text-muted-foreground", d),
127
+ children: /* @__PURE__ */ a(i, { className: "h-4 w-4 animate-spin" })
128
+ }) : /* @__PURE__ */ o("div", {
129
+ className: e("space-y-4", d),
130
+ children: [/* @__PURE__ */ a("div", {
131
+ className: "rounded-md border bg-background p-4",
132
+ children: /* @__PURE__ */ o("div", {
133
+ className: "flex items-start justify-between gap-3",
134
+ children: [/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
135
+ className: "text-sm font-semibold",
136
+ children: "Email digest"
137
+ }), /* @__PURE__ */ a("div", {
138
+ className: "mt-1 text-xs text-muted-foreground",
139
+ children: "Choose how often we email you a summary."
140
+ })] }), /* @__PURE__ */ a("select", {
141
+ value: y.digestFrequency,
142
+ onChange: (e) => {
143
+ let t = e.target.value, n = c({
144
+ ...y,
145
+ digestFrequency: t
146
+ });
147
+ b(n), C(n);
148
+ },
149
+ className: "h-9 rounded-md border bg-background px-2 text-sm",
150
+ children: s.map((e) => /* @__PURE__ */ a("option", {
151
+ value: e.value,
152
+ children: e.label
153
+ }, e.value))
154
+ })]
155
+ })
156
+ }), /* @__PURE__ */ o("div", {
157
+ className: "rounded-md border bg-background p-4",
158
+ children: [
159
+ /* @__PURE__ */ a("div", {
160
+ className: "flex items-start justify-between gap-3",
161
+ children: /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
162
+ className: "text-sm font-semibold",
163
+ children: "Topics"
164
+ }), /* @__PURE__ */ a("div", {
165
+ className: "mt-1 text-xs text-muted-foreground",
166
+ children: "Choose where you receive each topic."
167
+ })] })
168
+ }),
169
+ x.length === 0 ? /* @__PURE__ */ a("div", {
170
+ className: "mt-4 text-sm text-muted-foreground",
171
+ children: "No topics configured."
172
+ }) : /* @__PURE__ */ a("div", {
173
+ className: "mt-4 overflow-x-auto",
174
+ children: /* @__PURE__ */ o("table", {
175
+ className: "w-full text-sm",
176
+ children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", {
177
+ className: "text-left text-xs text-muted-foreground",
178
+ children: [
179
+ /* @__PURE__ */ a("th", {
180
+ className: "py-2 pr-4 font-medium",
181
+ children: "Topic"
182
+ }),
183
+ /* @__PURE__ */ a("th", {
184
+ className: "py-2 pr-4 font-medium",
185
+ children: "In-app"
186
+ }),
187
+ /* @__PURE__ */ a("th", {
188
+ className: "py-2 pr-4 font-medium",
189
+ children: "Email digest"
190
+ }),
191
+ /* @__PURE__ */ a("th", {
192
+ className: "py-2 pr-4 font-medium",
193
+ children: "Push"
194
+ })
195
+ ]
196
+ }) }), /* @__PURE__ */ a("tbody", { children: y.topicPreferences.map((e) => {
197
+ let t = x.find((t) => t.topic === e.topic);
198
+ return /* @__PURE__ */ o("tr", {
199
+ className: "border-t align-top",
200
+ children: [
201
+ /* @__PURE__ */ a("td", {
202
+ className: "py-3 pr-4",
203
+ children: /* @__PURE__ */ o("div", {
204
+ className: "flex flex-col gap-1",
205
+ children: [
206
+ /* @__PURE__ */ a("span", {
207
+ className: "font-medium",
208
+ children: t?.title || e.topic
209
+ }),
210
+ t?.description ? /* @__PURE__ */ a("span", {
211
+ className: "text-xs text-muted-foreground",
212
+ children: t.description
213
+ }) : null,
214
+ /* @__PURE__ */ a("span", {
215
+ className: "text-[11px] text-muted-foreground",
216
+ children: e.topic
217
+ })
218
+ ]
219
+ })
220
+ }),
221
+ /* @__PURE__ */ a("td", {
222
+ className: "py-3 pr-4",
223
+ children: /* @__PURE__ */ a("input", {
224
+ type: "checkbox",
225
+ checked: e.inApp,
226
+ onChange: (t) => w(e.topic, (e) => ({
227
+ ...e,
228
+ inApp: t.target.checked
229
+ }))
230
+ })
231
+ }),
232
+ /* @__PURE__ */ a("td", {
233
+ className: "py-3 pr-4",
234
+ children: /* @__PURE__ */ a("input", {
235
+ type: "checkbox",
236
+ checked: e.emailDigest,
237
+ onChange: (t) => w(e.topic, (e) => ({
238
+ ...e,
239
+ emailDigest: t.target.checked
240
+ }))
241
+ })
242
+ }),
243
+ /* @__PURE__ */ a("td", {
244
+ className: "py-3 pr-4",
245
+ children: /* @__PURE__ */ a("input", {
246
+ type: "checkbox",
247
+ checked: e.push,
248
+ disabled: !0,
249
+ className: "opacity-50",
250
+ "aria-label": "Push notifications (coming soon)"
251
+ })
252
+ })
253
+ ]
254
+ }, e.topic);
255
+ }) })]
256
+ })
257
+ }),
258
+ _ ? /* @__PURE__ */ a("div", {
259
+ className: "mt-3 text-sm text-destructive",
260
+ children: _
261
+ }) : h ? /* @__PURE__ */ a("div", {
262
+ className: "mt-3 text-xs text-muted-foreground",
263
+ children: "Saving…"
264
+ }) : null
265
+ ]
266
+ })]
267
+ });
268
+ }
269
+ //#endregion
270
+ export { d as NotificationsSettings };
271
+
272
+ //# sourceMappingURL=index430.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index430.js","names":["digestValues","normalizeSettings","digestFrequency","settings","pref","normalizeTopics","topics","seen","topic","applyTopicsToSettings","defaults","byTopic","existing","NotificationsSettings","loading","setLoading","useState","saving","setSaving","error","setError","setSettings","normalizedTopics","useMemo","loadSettings","res","json","normalized","saveSettings","next","useEffect","current","updatePreference","nextPrefs","p","update","cn","className","Loader2","value","opt","meta","e"],"sources":["../src/components/Notifications/NotificationsSettings.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from \"react\"\nimport { Loader2 } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type { NotificationDigestFrequency, NotificationSettings, NotificationTopicCatalogItem, NotificationTopicPreference } from \"./types\"\n\n\ntype SettingsResponse = {\n ok?: boolean\n error?: string\n settings?: NotificationSettings\n}\n\nconst digestValues: Array<{ value: NotificationDigestFrequency; label: string }> = [\n { value: \"off\", label: \"Off\" },\n { value: \"daily\", label: \"Daily\" },\n { value: \"weekly\", label: \"Weekly\" },\n]\n\nconst normalizeSettings = (settings: NotificationSettings | undefined): NotificationSettings => {\n const digestFrequency = settings?.digestFrequency\n const frequency: NotificationDigestFrequency =\n digestFrequency === \"off\" || digestFrequency === \"daily\" || digestFrequency === \"weekly\"\n ? digestFrequency\n : \"weekly\"\n\n const topicPreferences = Array.isArray(settings?.topicPreferences)\n ? settings!.topicPreferences\n .map((pref) => ({\n topic: typeof pref.topic === \"string\" ? pref.topic.trim() : \"\",\n inApp: pref.inApp === true,\n emailDigest: pref.emailDigest === true,\n push: pref.push === true,\n }))\n .filter((pref) => pref.topic.length > 0)\n : []\n\n return {\n digestFrequency: frequency,\n topicPreferences,\n ...(typeof settings?.lastDigestSentAt === \"string\" ? { lastDigestSentAt: settings.lastDigestSentAt } : {}),\n }\n}\n\nconst normalizeTopics = (topics: NotificationTopicCatalogItem[] | undefined): NotificationTopicCatalogItem[] => {\n if (!Array.isArray(topics)) return []\n\n const seen = new Set<string>()\n return topics\n .map((topic) => ({\n topic: typeof topic.topic === \"string\" ? topic.topic.trim() : \"\",\n title: typeof topic.title === \"string\" ? topic.title.trim() : \"\",\n description: typeof topic.description === \"string\" ? topic.description.trim() : undefined,\n }))\n .filter((topic) => topic.topic.length > 0)\n .filter((topic) => {\n if (seen.has(topic.topic)) return false\n seen.add(topic.topic)\n return true\n })\n}\n\nconst applyTopicsToSettings = (\n settings: NotificationSettings,\n topics: NotificationTopicCatalogItem[],\n): NotificationSettings => {\n const defaults: NotificationTopicPreference = {\n topic: \"\",\n inApp: true,\n emailDigest: true,\n push: false,\n }\n\n const byTopic = new Map(settings.topicPreferences.map((pref) => [pref.topic, pref]))\n return {\n ...settings,\n topicPreferences: topics.map((topic) => {\n const existing = byTopic.get(topic.topic)\n return existing\n ? {\n topic: topic.topic,\n inApp: existing.inApp === true,\n emailDigest: existing.emailDigest === true,\n push: existing.push === true,\n }\n : {\n ...defaults,\n topic: topic.topic,\n }\n }),\n }\n}\n\nexport function NotificationsSettings({\n className,\n topics,\n}: {\n className?: string\n topics?: NotificationTopicCatalogItem[]\n}) {\n const [loading, setLoading] = useState(true)\n const [saving, setSaving] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [settings, setSettings] = useState<NotificationSettings>(() =>\n normalizeSettings({ digestFrequency: \"weekly\", topicPreferences: [] }),\n )\n\n const normalizedTopics = useMemo(() => normalizeTopics(topics), [topics])\n\n const loadSettings = async () => {\n setLoading(true)\n setError(null)\n try {\n const res = await fetch(\"/api/rb/notifications/settings\", {\n method: \"GET\",\n credentials: \"include\",\n })\n const json = (await res.json().catch(() => null)) as SettingsResponse | null\n if (!res.ok || !json?.ok) {\n setError(json?.error || \"Unable to load notification settings.\")\n return\n }\n const normalized = normalizeSettings(json.settings)\n setSettings(normalizedTopics.length > 0 ? applyTopicsToSettings(normalized, normalizedTopics) : normalized)\n } catch {\n setError(\"Unable to load notification settings.\")\n } finally {\n setLoading(false)\n }\n }\n\n const saveSettings = async (next: NotificationSettings) => {\n setSaving(true)\n setError(null)\n try {\n const res = await fetch(\"/api/rb/notifications/settings\", {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n body: JSON.stringify({\n digestFrequency: next.digestFrequency,\n topicPreferences: next.topicPreferences,\n }),\n })\n const json = (await res.json().catch(() => null)) as SettingsResponse | null\n if (!res.ok || !json?.ok) {\n setError(json?.error || \"Unable to save notification settings.\")\n return\n }\n const normalized = normalizeSettings(json.settings)\n setSettings(normalizedTopics.length > 0 ? applyTopicsToSettings(normalized, normalizedTopics) : normalized)\n } catch {\n setError(\"Unable to save notification settings.\")\n } finally {\n setSaving(false)\n }\n }\n\n useEffect(() => {\n void loadSettings()\n }, [])\n\n useEffect(() => {\n if (normalizedTopics.length === 0) return\n setSettings((current) => applyTopicsToSettings(current, normalizedTopics))\n }, [normalizedTopics])\n\n const updatePreference = (topic: string, update: (p: NotificationTopicPreference) => NotificationTopicPreference) => {\n const hasExisting = settings.topicPreferences.some((p) => p.topic === topic)\n const nextPrefs = hasExisting\n ? settings.topicPreferences.map((p) => (p.topic === topic ? update(p) : p))\n : [...settings.topicPreferences, update({ topic, inApp: true, emailDigest: true, push: false })]\n const next = normalizeSettings({ ...settings, topicPreferences: nextPrefs })\n setSettings(next)\n void saveSettings(next)\n }\n\n if (loading) {\n return (\n <div className={cn(\"flex items-center justify-center py-10 text-muted-foreground\", className)}>\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n )\n }\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <div className=\"rounded-md border bg-background p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-semibold\">Email digest</div>\n <div className=\"mt-1 text-xs text-muted-foreground\">Choose how often we email you a summary.</div>\n </div>\n <select\n value={settings.digestFrequency}\n onChange={(e) => {\n const value = e.target.value as NotificationDigestFrequency\n const next = normalizeSettings({ ...settings, digestFrequency: value })\n setSettings(next)\n void saveSettings(next)\n }}\n className=\"h-9 rounded-md border bg-background px-2 text-sm\"\n >\n {digestValues.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n\n <div className=\"rounded-md border bg-background p-4\">\n <div className=\"flex items-start justify-between gap-3\">\n <div>\n <div className=\"text-sm font-semibold\">Topics</div>\n <div className=\"mt-1 text-xs text-muted-foreground\">Choose where you receive each topic.</div>\n </div>\n </div>\n\n {normalizedTopics.length === 0 ? (\n <div className=\"mt-4 text-sm text-muted-foreground\">No topics configured.</div>\n ) : (\n <div className=\"mt-4 overflow-x-auto\">\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"text-left text-xs text-muted-foreground\">\n <th className=\"py-2 pr-4 font-medium\">Topic</th>\n <th className=\"py-2 pr-4 font-medium\">In-app</th>\n <th className=\"py-2 pr-4 font-medium\">Email digest</th>\n <th className=\"py-2 pr-4 font-medium\">Push</th>\n </tr>\n </thead>\n <tbody>\n {settings.topicPreferences.map((pref) => {\n const meta = normalizedTopics.find((topic) => topic.topic === pref.topic)\n return (\n <tr key={pref.topic} className=\"border-t align-top\">\n <td className=\"py-3 pr-4\">\n <div className=\"flex flex-col gap-1\">\n <span className=\"font-medium\">{meta?.title || pref.topic}</span>\n {meta?.description ? (\n <span className=\"text-xs text-muted-foreground\">{meta.description}</span>\n ) : null}\n <span className=\"text-[11px] text-muted-foreground\">{pref.topic}</span>\n </div>\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.inApp}\n onChange={(e) =>\n updatePreference(pref.topic, (p) => ({ ...p, inApp: e.target.checked }))\n }\n />\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.emailDigest}\n onChange={(e) =>\n updatePreference(pref.topic, (p) => ({ ...p, emailDigest: e.target.checked }))\n }\n />\n </td>\n <td className=\"py-3 pr-4\">\n <input\n type=\"checkbox\"\n checked={pref.push}\n disabled\n className=\"opacity-50\"\n aria-label=\"Push notifications (coming soon)\"\n />\n </td>\n </tr>\n )\n })}\n </tbody>\n </table>\n </div>\n )}\n\n {error ? (\n <div className=\"mt-3 text-sm text-destructive\">{error}</div>\n ) : saving ? (\n <div className=\"mt-3 text-xs text-muted-foreground\">Saving…</div>\n ) : null}\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;AAcA,IAAMA,IAA6E;CACjF;EAAE,OAAO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WACV,cAAW;UACZ,CAAA;SACC,CAAA;QACF;OArCK,GAAAA,EAAK,KAqCV;MAER,CAAC,EACI,CAAA,CACF;;IACJ,CAAA;IAGNe,IACC,kBAAC,OAAD;KAAK,WAAU;KAAiC,UAAAA;IAAW,CAAA,IACzDF,IACF,kBAAC,OAAD;KAAK,WAAU;KAAqC,UAAA;IAAY,CAAA,IAC9D;GACD;EACF,CAAA,CAAA;;AAET"}
package/dist/index44.js CHANGED
@@ -1,10 +1,11 @@
1
- import { normalizeDates as e } from "./index33.js";
2
- //#region ../../node_modules/date-fns/differenceInCalendarMonths.js
3
- function t(t, n, r) {
4
- let [i, a] = e(r?.in, t, n), o = i.getFullYear() - a.getFullYear(), s = i.getMonth() - a.getMonth();
5
- return o * 12 + s;
1
+ //#region ../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
2
+ function e(e) {
3
+ return (t = {}) => {
4
+ let n = t.width ? String(t.width) : e.defaultWidth;
5
+ return e.formats[n] || e.formats[e.defaultWidth];
6
+ };
6
7
  }
7
8
  //#endregion
8
- export { t as default, t as differenceInCalendarMonths };
9
+ export { e as buildFormatLongFn };
9
10
 
10
11
  //# sourceMappingURL=index44.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index44.js","names":[],"sources":["../../../node_modules/date-fns/differenceInCalendarMonths.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n"],"x_google_ignoreList":[0],"mappings":";;AA4BA,SAAgB,EAA2B,GAAW,GAAa,GAAS;CAC1E,IAAM,CAAC,GAAY,KAAgB,EACjC,GAAS,IACT,GACA,CACF,GAEM,IAAY,EAAW,YAAY,IAAI,EAAa,YAAY,GAChE,IAAa,EAAW,SAAS,IAAI,EAAa,SAAS;CAEjE,OAAO,IAAY,KAAK;AAC1B"}
1
+ {"version":3,"file":"index44.js","names":["buildFormatLongFn","width","options","args"],"sources":["../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js"],"sourcesContent":["export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n"],"ignoreList":[0],"mappings":";AAAA,SAAgBA,EAAkB,GAAM;CACtC,QAAQ,IAAU,CAAC,MAAM;EAEvB,IAAMC,IAAQC,EAAQ,QAAQ,OAAOA,EAAQ,KAAK,IAAIC,EAAK;EAE3D,OADeA,EAAK,QAAQF,MAAUE,EAAK,QAAQA,EAAK;CAE1D;AACF"}
package/dist/index45.js CHANGED
@@ -1,10 +1,34 @@
1
- import e from "./index25.js";
2
- //#region ../../node_modules/date-fns/endOfMonth.js
3
- function t(t, n) {
4
- let r = e(t, n?.in), i = r.getMonth();
5
- return r.setFullYear(r.getFullYear(), i + 1, 0), r.setHours(23, 59, 59, 999), r;
6
- }
1
+ import { buildFormatLongFn as e } from "./index44.js";
2
+ var t = {
3
+ date: e({
4
+ formats: {
5
+ full: "EEEE, MMMM do, y",
6
+ long: "MMMM do, y",
7
+ medium: "MMM d, y",
8
+ short: "MM/dd/yyyy"
9
+ },
10
+ defaultWidth: "full"
11
+ }),
12
+ time: e({
13
+ formats: {
14
+ full: "h:mm:ss a zzzz",
15
+ long: "h:mm:ss a z",
16
+ medium: "h:mm:ss a",
17
+ short: "h:mm a"
18
+ },
19
+ defaultWidth: "full"
20
+ }),
21
+ dateTime: e({
22
+ formats: {
23
+ full: "{{date}} 'at' {{time}}",
24
+ long: "{{date}} 'at' {{time}}",
25
+ medium: "{{date}}, {{time}}",
26
+ short: "{{date}}, {{time}}"
27
+ },
28
+ defaultWidth: "full"
29
+ })
30
+ };
7
31
  //#endregion
8
- export { t as default, t as endOfMonth };
32
+ export { t as formatLong };
9
33
 
10
34
  //# sourceMappingURL=index45.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index45.js","names":[],"sources":["../../../node_modules/date-fns/endOfMonth.js"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n"],"x_google_ignoreList":[0],"mappings":";;AA4BA,SAAgB,EAAW,GAAM,GAAS;CACxC,IAAM,IAAQ,EAAO,GAAM,GAAS,EAAE,GAChC,IAAQ,EAAM,SAAS;CAG7B,OAFA,EAAM,YAAY,EAAM,YAAY,GAAG,IAAQ,GAAG,CAAC,GACnD,EAAM,SAAS,IAAI,IAAI,IAAI,GAAG,GACvB;AACT"}
1
+ {"version":3,"file":"index45.js","names":["formatLong","buildFormatLongFn"],"sources":["../../../node_modules/date-fns/locale/en-US/_lib/formatLong.js"],"sourcesContent":["import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n"],"ignoreList":[0],"mappings":";AAuBA,IAAaA,IAAa;CACxB,MAAMC,EAAkB;EACtB,SAAS;GAtBX,MAAM;GACN,MAAM;GACN,QAAQ;GACR,OAAO;EAmBI;EACT,cAAc;CAChB,CAAC;CAED,MAAMA,EAAkB;EACtB,SAAS;GApBX,MAAM;GACN,MAAM;GACN,QAAQ;GACR,OAAO;EAiBI;EACT,cAAc;CAChB,CAAC;CAED,UAAUA,EAAkB;EAC1B,SAAS;GAlBX,MAAM;GACN,MAAM;GACN,QAAQ;GACR,OAAO;EAeI;EACT,cAAc;CAChB,CAAC;AACH"}
package/dist/index46.js CHANGED
@@ -1,13 +1,13 @@
1
- import { normalizeDates as e } from "./index33.js";
2
- //#region ../../node_modules/date-fns/_lib/normalizeInterval.js
3
- function t(t, n) {
4
- let [r, i] = e(t, n.start, n.end);
5
- return {
6
- start: r,
7
- end: i
8
- };
9
- }
1
+ //#region ../../node_modules/date-fns/locale/en-US/_lib/formatRelative.js
2
+ var e = {
3
+ lastWeek: "'last' eeee 'at' p",
4
+ yesterday: "'yesterday at' p",
5
+ today: "'today at' p",
6
+ tomorrow: "'tomorrow at' p",
7
+ nextWeek: "eeee 'at' p",
8
+ other: "P"
9
+ }, t = (t, n, r, i) => e[t];
10
10
  //#endregion
11
- export { t as normalizeInterval };
11
+ export { t as formatRelative };
12
12
 
13
13
  //# sourceMappingURL=index46.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index46.js","names":[],"sources":["../../../node_modules/date-fns/_lib/normalizeInterval.js"],"sourcesContent":["import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n const [start, end] = normalizeDates(context, interval.start, interval.end);\n return { start, end };\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,SAAgB,EAAkB,GAAS,GAAU;CACnD,IAAM,CAAC,GAAO,KAAO,EAAe,GAAS,EAAS,OAAO,EAAS,GAAG;CACzE,OAAO;EAAE;EAAO;CAAI;AACtB"}
1
+ {"version":3,"file":"index46.js","names":["formatRelativeLocale","formatRelative","token"],"sources":["../../../node_modules/date-fns/locale/en-US/_lib/formatRelative.js"],"sourcesContent":["const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n"],"ignoreList":[0],"mappings":";AAAA,IAAMA,IAAuB;CAC3B,UAAU;CACV,WAAW;CACX,OAAO;CACP,UAAU;CACV,UAAU;CACV,OAAO;AACT,GAEaC,KAAkB,GAAO,GAAO,GAAW,MACtDD,EAAqBE"}
package/dist/index47.js CHANGED
@@ -1,17 +1,19 @@
1
- import { constructFrom as e } from "./index24.js";
2
- import { normalizeInterval as t } from "./index46.js";
3
- //#region ../../node_modules/date-fns/eachMonthOfInterval.js
4
- function n(n, r) {
5
- let { start: i, end: a } = t(r?.in, n), o = +i > +a, s = o ? +i : +a, c = o ? a : i;
6
- c.setHours(0, 0, 0, 0), c.setDate(1);
7
- let l = r?.step ?? 1;
8
- if (!l) return [];
9
- l < 0 && (l = -l, o = !o);
10
- let u = [];
11
- for (; +c <= s;) u.push(e(i, c)), c.setMonth(c.getMonth() + l);
12
- return o ? u.reverse() : u;
1
+ //#region ../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
2
+ function e(e) {
3
+ return (t, n) => {
4
+ let r = n?.context ? String(n.context) : "standalone", i;
5
+ if (r === "formatting" && e.formattingValues) {
6
+ let t = e.defaultFormattingWidth || e.defaultWidth, r = n?.width ? String(n.width) : t;
7
+ i = e.formattingValues[r] || e.formattingValues[t];
8
+ } else {
9
+ let t = e.defaultWidth, r = n?.width ? String(n.width) : e.defaultWidth;
10
+ i = e.values[r] || e.values[t];
11
+ }
12
+ let a = e.argumentCallback ? e.argumentCallback(t) : t;
13
+ return i[a];
14
+ };
13
15
  }
14
16
  //#endregion
15
- export { n as default, n as eachMonthOfInterval };
17
+ export { e as buildLocalizeFn };
16
18
 
17
19
  //# sourceMappingURL=index47.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index47.js","names":[],"sources":["../../../node_modules/date-fns/eachMonthOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setMonth(date.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n"],"x_google_ignoreList":[0],"mappings":";;;AA2CA,SAAgB,EAAoB,GAAU,GAAS;CACrD,IAAM,EAAE,UAAO,WAAQ,EAAkB,GAAS,IAAI,CAAQ,GAE1D,IAAW,CAAC,IAAQ,CAAC,GACnB,IAAU,IAAW,CAAC,IAAQ,CAAC,GAC/B,IAAO,IAAW,IAAM;CAE9B,AADA,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxB,EAAK,QAAQ,CAAC;CAEd,IAAI,IAAO,GAAS,QAAQ;CAC5B,IAAI,CAAC,GAAM,OAAO,CAAC;CACnB,AAAI,IAAO,MACT,IAAO,CAAC,GACR,IAAW,CAAC;CAGd,IAAM,IAAQ,CAAC;CAEf,OAAO,CAAC,KAAQ,IAEd,AADA,EAAM,KAAK,EAAc,GAAO,CAAI,CAAC,GACrC,EAAK,SAAS,EAAK,SAAS,IAAI,CAAI;CAGtC,OAAO,IAAW,EAAM,QAAQ,IAAI;AACtC"}
1
+ {"version":3,"file":"index47.js","names":["buildLocalizeFn","context","options","valuesArray","args","defaultWidth","width","index","value"],"sources":["../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js"],"sourcesContent":["/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n"],"ignoreList":[0],"mappings":";AAuCA,SAAgBA,EAAgB,GAAM;CACpC,QAAQ,GAAO,MAAY;EACzB,IAAMC,IAAUC,GAAS,UAAU,OAAOA,EAAQ,OAAO,IAAI,cAEzDC;EACJ,IAAIF,MAAY,gBAAgBG,EAAK,kBAAkB;GACrD,IAAMC,IAAeD,EAAK,0BAA0BA,EAAK,cACnDE,IAAQJ,GAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAIG;GAEvD,IACED,EAAK,iBAAiBE,MAAUF,EAAK,iBAAiBC;EAC1D,OAAO;GACL,IAAMA,IAAeD,EAAK,cACpBE,IAAQJ,GAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAIE,EAAK;GAE5D,IAAcA,EAAK,OAAOE,MAAUF,EAAK,OAAOC;EAClD;EACA,IAAME,IAAQH,EAAK,mBAAmBA,EAAK,iBAAiBI,CAAK,IAAIA;EAGrE,OAAOL,EAAYI;CACrB;AACF"}