@anoki/fse-ui 1.0.0-beta1.38.2 → 1.0.0-beta1.38.3
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.
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs100.js +1 -1
- package/dist/index.cjs101.js +1 -1
- package/dist/index.cjs101.js.map +1 -1
- package/dist/index.cjs102.js +1 -1
- package/dist/index.cjs103.js +1 -1
- package/dist/index.cjs104.js +1 -1
- package/dist/index.cjs105.js +1 -1
- package/dist/index.cjs106.js +1 -1
- package/dist/index.cjs107.js +1 -1
- package/dist/index.cjs108.js +1 -1
- package/dist/index.cjs109.js +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs110.js +1 -1
- package/dist/index.cjs111.js +1 -1
- package/dist/index.cjs112.js +1 -1
- package/dist/index.cjs113.js +1 -1
- package/dist/index.cjs114.js +1 -1
- package/dist/index.cjs115.js +1 -1
- package/dist/index.cjs116.js +1 -1
- package/dist/index.cjs117.js +1 -1
- package/dist/index.cjs118.js +1 -1
- package/dist/index.cjs119.js +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs120.js +1 -1
- package/dist/index.cjs121.js +1 -1
- package/dist/index.cjs122.js +1 -1
- package/dist/index.cjs123.js +1 -1
- package/dist/index.cjs124.js +1 -1
- package/dist/index.cjs125.js +1 -1
- package/dist/index.cjs126.js +1 -1
- package/dist/index.cjs127.js +1 -1
- package/dist/index.cjs128.js +1 -1
- package/dist/index.cjs129.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs130.js +1 -1
- package/dist/index.cjs131.js +1 -1
- package/dist/index.cjs132.js +1 -1
- package/dist/index.cjs133.js +1 -1
- package/dist/index.cjs134.js +1 -1
- package/dist/index.cjs135.js +1 -1
- package/dist/index.cjs136.js +1 -1
- package/dist/index.cjs137.js +1 -1
- package/dist/index.cjs138.js +1 -1
- package/dist/index.cjs139.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs140.js +1 -1
- package/dist/index.cjs141.js +1 -1
- package/dist/index.cjs142.js +1 -1
- package/dist/index.cjs143.js +1 -1
- package/dist/index.cjs144.js +1 -1
- package/dist/index.cjs145.js +1 -1
- package/dist/index.cjs146.js +1 -1
- package/dist/index.cjs147.js +1 -1
- package/dist/index.cjs148.js +1 -1
- package/dist/index.cjs149.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs150.js +1 -1
- package/dist/index.cjs151.js +1 -1
- package/dist/index.cjs152.js +1 -1
- package/dist/index.cjs153.js +1 -1
- package/dist/index.cjs154.js +1 -1
- package/dist/index.cjs155.js +1 -1
- package/dist/index.cjs156.js +1 -1
- package/dist/index.cjs157.js +1 -1
- package/dist/index.cjs158.js +1 -1
- package/dist/index.cjs159.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs160.js +1 -1
- package/dist/index.cjs161.js +1 -1
- package/dist/index.cjs162.js +1 -1
- package/dist/index.cjs163.js +1 -1
- package/dist/index.cjs164.js +1 -1
- package/dist/index.cjs165.js +1 -1
- package/dist/index.cjs166.js +1 -1
- package/dist/index.cjs167.js +1 -1
- package/dist/index.cjs168.js +1 -1
- package/dist/index.cjs169.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs170.js +1 -1
- package/dist/index.cjs171.js +1 -1
- package/dist/index.cjs172.js +1 -1
- package/dist/index.cjs173.js +1 -1
- package/dist/index.cjs174.js +1 -1
- package/dist/index.cjs175.js +1 -1
- package/dist/index.cjs176.js +1 -1
- package/dist/index.cjs177.js +1 -1
- package/dist/index.cjs178.js +1 -1
- package/dist/index.cjs179.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs180.js +1 -1
- package/dist/index.cjs181.js +1 -1
- package/dist/index.cjs182.js +1 -1
- package/dist/index.cjs183.js +1 -1
- package/dist/index.cjs184.js +1 -1
- package/dist/index.cjs185.js +1 -1
- package/dist/index.cjs186.js +1 -1
- package/dist/index.cjs187.js +1 -1
- package/dist/index.cjs188.js +1 -1
- package/dist/index.cjs189.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs190.js +1 -1
- package/dist/index.cjs191.js +1 -1
- package/dist/index.cjs192.js +1 -1
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs194.js +1 -1
- package/dist/index.cjs195.js +1 -1
- package/dist/index.cjs196.js +1 -1
- package/dist/index.cjs197.js +1 -1
- package/dist/index.cjs198.js +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs200.js +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs202.js +1 -1
- package/dist/index.cjs203.js +1 -1
- package/dist/index.cjs204.js +1 -1
- package/dist/index.cjs205.js +1 -1
- package/dist/index.cjs206.js +1 -1
- package/dist/index.cjs207.js +1 -1
- package/dist/index.cjs208.js +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs211.js +1 -1
- package/dist/index.cjs212.js +1 -1
- package/dist/index.cjs213.js +1 -1
- package/dist/index.cjs214.js +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs216.js +1 -1
- package/dist/index.cjs217.js +1 -1
- package/dist/index.cjs217.js.map +1 -1
- package/dist/index.cjs218.js +1 -1
- package/dist/index.cjs218.js.map +1 -1
- package/dist/index.cjs219.js +1 -1
- package/dist/index.cjs219.js.map +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs221.js +1 -1
- package/dist/index.cjs221.js.map +1 -1
- package/dist/index.cjs222.js +1 -1
- package/dist/index.cjs222.js.map +1 -1
- package/dist/index.cjs225.js +1 -1
- package/dist/index.cjs225.js.map +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs229.js.map +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs233.js +1 -1
- package/dist/index.cjs233.js.map +1 -1
- package/dist/index.cjs238.js +1 -1
- package/dist/index.cjs238.js.map +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/{index.cjs286.js → index.cjs241.js} +2 -2
- package/dist/{index.cjs286.js.map → index.cjs241.js.map} +1 -1
- package/dist/index.cjs243.js +2 -0
- package/dist/index.cjs243.js.map +1 -0
- package/dist/{index.cjs289.js → index.cjs244.js} +2 -2
- package/dist/{index.cjs289.js.map → index.cjs244.js.map} +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs251.js +2 -0
- package/dist/index.cjs251.js.map +1 -0
- package/dist/index.cjs252.js +1 -1
- package/dist/index.cjs252.js.map +1 -1
- package/dist/index.cjs257.js +2 -0
- package/dist/index.cjs257.js.map +1 -0
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs261.js +1 -1
- package/dist/index.cjs261.js.map +1 -1
- package/dist/{index.cjs306.js → index.cjs262.js} +2 -2
- package/dist/{index.cjs306.js.map → index.cjs262.js.map} +1 -1
- package/dist/index.cjs263.js +1 -1
- package/dist/index.cjs263.js.map +1 -1
- package/dist/index.cjs264.js +1 -1
- package/dist/index.cjs264.js.map +1 -1
- package/dist/index.cjs267.js +1 -1
- package/dist/index.cjs267.js.map +1 -1
- package/dist/{index.cjs313.js → index.cjs269.js} +2 -2
- package/dist/{index.cjs313.js.map → index.cjs269.js.map} +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs270.js +1 -1
- package/dist/index.cjs270.js.map +1 -1
- package/dist/{index.cjs315.js → index.cjs271.js} +2 -2
- package/dist/{index.cjs315.js.map → index.cjs271.js.map} +1 -1
- package/dist/{index.cjs316.js → index.cjs272.js} +2 -2
- package/dist/{index.cjs316.js.map → index.cjs272.js.map} +1 -1
- package/dist/{index.cjs317.js → index.cjs273.js} +2 -2
- package/dist/{index.cjs317.js.map → index.cjs273.js.map} +1 -1
- package/dist/index.cjs275.js +2 -0
- package/dist/index.cjs275.js.map +1 -0
- package/dist/index.cjs276.js +2 -0
- package/dist/index.cjs276.js.map +1 -0
- package/dist/{index.cjs321.js → index.cjs277.js} +2 -2
- package/dist/{index.cjs321.js.map → index.cjs277.js.map} +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/{index.cjs324.js → index.cjs280.js} +2 -2
- package/dist/{index.cjs324.js.map → index.cjs280.js.map} +1 -1
- package/dist/index.cjs281.js +2 -0
- package/dist/{index.cjs325.js.map → index.cjs281.js.map} +1 -1
- package/dist/{index.cjs329.js → index.cjs285.js} +2 -2
- package/dist/{index.cjs329.js.map → index.cjs285.js.map} +1 -1
- package/dist/{index.cjs331.js → index.cjs287.js} +2 -2
- package/dist/{index.cjs331.js.map → index.cjs287.js.map} +1 -1
- package/dist/index.cjs288.js +1 -1
- package/dist/index.cjs288.js.map +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/{index.cjs334.js → index.cjs290.js} +2 -2
- package/dist/{index.cjs334.js.map → index.cjs290.js.map} +1 -1
- package/dist/{index.cjs335.js → index.cjs291.js} +2 -2
- package/dist/{index.cjs335.js.map → index.cjs291.js.map} +1 -1
- package/dist/index.cjs292.js +2 -0
- package/dist/{index.cjs336.js.map → index.cjs292.js.map} +1 -1
- package/dist/{index.cjs338.js → index.cjs294.js} +2 -2
- package/dist/{index.cjs338.js.map → index.cjs294.js.map} +1 -1
- package/dist/{index.cjs339.js → index.cjs295.js} +2 -2
- package/dist/{index.cjs339.js.map → index.cjs295.js.map} +1 -1
- package/dist/index.cjs296.js +1 -1
- package/dist/index.cjs296.js.map +1 -1
- package/dist/index.cjs298.js +2 -0
- package/dist/index.cjs298.js.map +1 -0
- package/dist/{index.cjs343.js → index.cjs299.js} +2 -2
- package/dist/{index.cjs343.js.map → index.cjs299.js.map} +1 -1
- package/dist/index.cjs3.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/{index.cjs344.js → index.cjs300.js} +2 -2
- package/dist/{index.cjs344.js.map → index.cjs300.js.map} +1 -1
- package/dist/{index.cjs248.js → index.cjs302.js} +1 -1
- package/dist/{index.cjs248.js.map → index.cjs302.js.map} +1 -1
- package/dist/index.cjs31.js +1 -1
- package/dist/index.cjs311.js +1 -1
- package/dist/index.cjs311.js.map +1 -1
- package/dist/index.cjs319.js +1 -1
- package/dist/index.cjs319.js.map +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs320.js +1 -1
- package/dist/index.cjs320.js.map +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs342.js +7 -1
- package/dist/index.cjs342.js.map +1 -1
- package/dist/{index.cjs391.js → index.cjs348.js} +2 -2
- package/dist/index.cjs348.js.map +1 -0
- package/dist/index.cjs35.js +1 -1
- package/dist/{index.cjs394.js → index.cjs351.js} +2 -2
- package/dist/{index.cjs394.js.map → index.cjs351.js.map} +1 -1
- package/dist/index.cjs353.js +2 -0
- package/dist/index.cjs353.js.map +1 -0
- package/dist/index.cjs354.js +1 -1
- package/dist/index.cjs354.js.map +1 -1
- package/dist/{index.cjs398.js → index.cjs355.js} +2 -2
- package/dist/{index.cjs398.js.map → index.cjs355.js.map} +1 -1
- package/dist/index.cjs36.js +1 -1
- package/dist/{index.cjs403.js → index.cjs360.js} +1 -1
- package/dist/{index.cjs403.js.map → index.cjs360.js.map} +1 -1
- package/dist/index.cjs366.js +2 -0
- package/dist/index.cjs366.js.map +1 -0
- package/dist/index.cjs368.js +2 -0
- package/dist/index.cjs368.js.map +1 -0
- package/dist/index.cjs369.js +2 -0
- package/dist/index.cjs369.js.map +1 -0
- package/dist/index.cjs37.js +1 -1
- package/dist/index.cjs374.js +2 -0
- package/dist/index.cjs374.js.map +1 -0
- package/dist/{index.cjs253.js → index.cjs376.js} +2 -2
- package/dist/{index.cjs253.js.map → index.cjs376.js.map} +1 -1
- package/dist/{index.cjs254.js → index.cjs377.js} +2 -2
- package/dist/{index.cjs254.js.map → index.cjs377.js.map} +1 -1
- package/dist/{index.cjs255.js → index.cjs378.js} +2 -2
- package/dist/{index.cjs255.js.map → index.cjs378.js.map} +1 -1
- package/dist/index.cjs38.js +1 -1
- package/dist/index.cjs388.js +2 -0
- package/dist/{index.cjs425.js.map → index.cjs388.js.map} +1 -1
- package/dist/{index.cjs426.js → index.cjs389.js} +2 -2
- package/dist/{index.cjs426.js.map → index.cjs389.js.map} +1 -1
- package/dist/index.cjs39.js +1 -1
- package/dist/{index.cjs429.js → index.cjs392.js} +2 -2
- package/dist/{index.cjs429.js.map → index.cjs392.js.map} +1 -1
- package/dist/{index.cjs432.js → index.cjs395.js} +2 -2
- package/dist/{index.cjs432.js.map → index.cjs395.js.map} +1 -1
- package/dist/index.cjs396.js +1 -1
- package/dist/index.cjs396.js.map +1 -1
- package/dist/index.cjs397.js +1 -1
- package/dist/index.cjs397.js.map +1 -1
- package/dist/index.cjs399.js +2 -0
- package/dist/index.cjs399.js.map +1 -0
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs40.js +1 -1
- package/dist/{index.cjs439.js → index.cjs402.js} +2 -2
- package/dist/{index.cjs439.js.map → index.cjs402.js.map} +1 -1
- package/dist/index.cjs404.js +2 -0
- package/dist/index.cjs404.js.map +1 -0
- package/dist/index.cjs405.js +2 -0
- package/dist/index.cjs405.js.map +1 -0
- package/dist/{index.cjs220.js → index.cjs406.js} +2 -2
- package/dist/{index.cjs220.js.map → index.cjs406.js.map} +1 -1
- package/dist/index.cjs407.js +2 -0
- package/dist/index.cjs407.js.map +1 -0
- package/dist/index.cjs408.js +2 -0
- package/dist/index.cjs408.js.map +1 -0
- package/dist/index.cjs409.js +1 -1
- package/dist/index.cjs409.js.map +1 -1
- package/dist/index.cjs41.js +1 -1
- package/dist/{index.cjs224.js → index.cjs410.js} +2 -2
- package/dist/{index.cjs224.js.map → index.cjs410.js.map} +1 -1
- package/dist/index.cjs411.js +1 -1
- package/dist/index.cjs411.js.map +1 -1
- package/dist/index.cjs412.js +1 -1
- package/dist/index.cjs412.js.map +1 -1
- package/dist/{index.cjs227.js → index.cjs413.js} +2 -2
- package/dist/{index.cjs227.js.map → index.cjs413.js.map} +1 -1
- package/dist/{index.cjs228.js → index.cjs414.js} +1 -1
- package/dist/{index.cjs228.js.map → index.cjs414.js.map} +1 -1
- package/dist/index.cjs415.js +2 -0
- package/dist/index.cjs415.js.map +1 -0
- package/dist/{index.cjs230.js → index.cjs416.js} +1 -1
- package/dist/{index.cjs230.js.map → index.cjs416.js.map} +1 -1
- package/dist/index.cjs417.js +1 -1
- package/dist/index.cjs417.js.map +1 -1
- package/dist/{index.cjs232.js → index.cjs418.js} +2 -2
- package/dist/{index.cjs232.js.map → index.cjs418.js.map} +1 -1
- package/dist/index.cjs419.js +2 -0
- package/dist/index.cjs419.js.map +1 -0
- package/dist/index.cjs42.js +1 -1
- package/dist/{index.cjs234.js → index.cjs420.js} +2 -2
- package/dist/{index.cjs234.js.map → index.cjs420.js.map} +1 -1
- package/dist/{index.cjs235.js → index.cjs421.js} +1 -1
- package/dist/{index.cjs235.js.map → index.cjs421.js.map} +1 -1
- package/dist/index.cjs424.js +2 -0
- package/dist/index.cjs424.js.map +1 -0
- package/dist/index.cjs43.js +1 -1
- package/dist/index.cjs431.js +2 -0
- package/dist/index.cjs431.js.map +1 -0
- package/dist/index.cjs435.js +2 -0
- package/dist/index.cjs435.js.map +1 -0
- package/dist/index.cjs436.js +1 -1
- package/dist/index.cjs436.js.map +1 -1
- package/dist/index.cjs438.js +2 -0
- package/dist/index.cjs438.js.map +1 -0
- package/dist/index.cjs44.js +1 -1
- package/dist/index.cjs440.js +2 -0
- package/dist/index.cjs440.js.map +1 -0
- package/dist/index.cjs441.js +1 -1
- package/dist/index.cjs441.js.map +1 -1
- package/dist/index.cjs442.js +1 -1
- package/dist/index.cjs442.js.map +1 -1
- package/dist/index.cjs443.js +9 -1
- package/dist/index.cjs443.js.map +1 -1
- package/dist/index.cjs444.js +8 -3
- package/dist/index.cjs444.js.map +1 -1
- package/dist/index.cjs446.js +1 -1
- package/dist/index.cjs446.js.map +1 -1
- package/dist/index.cjs447.js +1 -2
- package/dist/index.cjs447.js.map +1 -1
- package/dist/index.cjs448.js +1 -27
- package/dist/index.cjs448.js.map +1 -1
- package/dist/index.cjs449.js +1 -1
- package/dist/index.cjs449.js.map +1 -1
- package/dist/index.cjs45.js +1 -1
- package/dist/index.cjs450.js +1 -1
- package/dist/index.cjs450.js.map +1 -1
- package/dist/index.cjs451.js +1 -1
- package/dist/index.cjs451.js.map +1 -1
- package/dist/index.cjs452.js +1 -1
- package/dist/index.cjs452.js.map +1 -1
- package/dist/index.cjs453.js +1 -1
- package/dist/index.cjs453.js.map +1 -1
- package/dist/index.cjs456.js +1 -1
- package/dist/index.cjs456.js.map +1 -1
- package/dist/index.cjs457.js +1 -1
- package/dist/index.cjs457.js.map +1 -1
- package/dist/index.cjs458.js +1 -1
- package/dist/index.cjs458.js.map +1 -1
- package/dist/index.cjs46.js +1 -1
- package/dist/index.cjs462.js +1 -1
- package/dist/index.cjs462.js.map +1 -1
- package/dist/{index.cjs475.js → index.cjs463.js} +2 -2
- package/dist/{index.cjs475.js.map → index.cjs463.js.map} +1 -1
- package/dist/{index.cjs476.js → index.cjs464.js} +2 -2
- package/dist/{index.cjs476.js.map → index.cjs464.js.map} +1 -1
- package/dist/index.cjs465.js +1 -1
- package/dist/index.cjs465.js.map +1 -1
- package/dist/index.cjs466.js +1 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs467.js +1 -1
- package/dist/index.cjs467.js.map +1 -1
- package/dist/{index.cjs480.js → index.cjs468.js} +2 -2
- package/dist/{index.cjs480.js.map → index.cjs468.js.map} +1 -1
- package/dist/index.cjs47.js +1 -1
- package/dist/index.cjs48.js +1 -1
- package/dist/{index.cjs498.js → index.cjs484.js} +2 -2
- package/dist/{index.cjs498.js.map → index.cjs484.js.map} +1 -1
- package/dist/index.cjs485.js +2 -0
- package/dist/index.cjs485.js.map +1 -0
- package/dist/{index.cjs499.js → index.cjs486.js} +1 -1
- package/dist/index.cjs486.js.map +1 -0
- package/dist/index.cjs49.js +1 -1
- package/dist/index.cjs492.js +2 -0
- package/dist/index.cjs492.js.map +1 -0
- package/dist/index.cjs493.js +2 -0
- package/dist/index.cjs493.js.map +1 -0
- package/dist/index.cjs494.js +2 -0
- package/dist/index.cjs494.js.map +1 -0
- package/dist/index.cjs495.js +2 -0
- package/dist/index.cjs495.js.map +1 -0
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs50.js +1 -1
- package/dist/index.cjs500.js +1 -1
- package/dist/index.cjs500.js.map +1 -1
- package/dist/index.cjs501.js +1 -1
- package/dist/index.cjs502.js +28 -0
- package/dist/index.cjs502.js.map +1 -0
- package/dist/index.cjs503.js +2 -0
- package/dist/index.cjs503.js.map +1 -0
- package/dist/index.cjs504.js +2 -0
- package/dist/index.cjs504.js.map +1 -0
- package/dist/index.cjs505.js +3 -0
- package/dist/index.cjs505.js.map +1 -0
- package/dist/index.cjs506.js +1 -1
- package/dist/index.cjs506.js.map +1 -1
- package/dist/index.cjs507.js +1 -1
- package/dist/index.cjs508.js +1 -1
- package/dist/index.cjs508.js.map +1 -1
- package/dist/index.cjs509.js +1 -1
- package/dist/index.cjs509.js.map +1 -1
- package/dist/index.cjs51.js +1 -1
- package/dist/index.cjs510.js +1 -1
- package/dist/index.cjs510.js.map +1 -1
- package/dist/index.cjs511.js +1 -1
- package/dist/index.cjs511.js.map +1 -1
- package/dist/index.cjs512.js +1 -1
- package/dist/index.cjs512.js.map +1 -1
- package/dist/index.cjs513.js +1 -1
- package/dist/index.cjs513.js.map +1 -1
- package/dist/index.cjs514.js +1 -1
- package/dist/index.cjs514.js.map +1 -1
- package/dist/index.cjs515.js +1 -1
- package/dist/index.cjs515.js.map +1 -1
- package/dist/index.cjs516.js +1 -1
- package/dist/index.cjs516.js.map +1 -1
- package/dist/index.cjs517.js +1 -1
- package/dist/index.cjs517.js.map +1 -1
- package/dist/index.cjs518.js +1 -1
- package/dist/index.cjs518.js.map +1 -1
- package/dist/index.cjs519.js +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs521.js +1 -1
- package/dist/index.cjs522.js +1 -1
- package/dist/index.cjs526.js +1 -1
- package/dist/index.cjs527.js +1 -1
- package/dist/index.cjs53.js +1 -1
- package/dist/index.cjs532.js +1 -1
- package/dist/index.cjs536.js +1 -1
- package/dist/index.cjs537.js +1 -1
- package/dist/index.cjs54.js +1 -1
- package/dist/index.cjs544.js +1 -1
- package/dist/index.cjs549.js +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs551.js +1 -1
- package/dist/index.cjs553.js +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs57.js +1 -1
- package/dist/index.cjs570.js +1 -1
- package/dist/index.cjs570.js.map +1 -1
- package/dist/index.cjs571.js +1 -1
- package/dist/index.cjs571.js.map +1 -1
- package/dist/index.cjs572.js +1 -1
- package/dist/index.cjs572.js.map +1 -1
- package/dist/index.cjs573.js +1 -1
- package/dist/index.cjs573.js.map +1 -1
- package/dist/index.cjs574.js +1 -1
- package/dist/index.cjs575.js +1 -1
- package/dist/index.cjs58.js +1 -1
- package/dist/index.cjs583.js +1 -1
- package/dist/index.cjs583.js.map +1 -1
- package/dist/index.cjs584.js +1 -1
- package/dist/index.cjs584.js.map +1 -1
- package/dist/index.cjs585.js +1 -1
- package/dist/index.cjs585.js.map +1 -1
- package/dist/index.cjs586.js +1 -1
- package/dist/index.cjs586.js.map +1 -1
- package/dist/index.cjs59.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs60.js +1 -1
- package/dist/index.cjs61.js +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs66.js +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs73.js +1 -1
- package/dist/index.cjs74.js +1 -1
- package/dist/index.cjs75.js +1 -1
- package/dist/index.cjs76.js +1 -1
- package/dist/index.cjs77.js +1 -1
- package/dist/index.cjs78.js +1 -1
- package/dist/index.cjs79.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs81.js +1 -1
- package/dist/index.cjs82.js +1 -1
- package/dist/index.cjs83.js +1 -1
- package/dist/index.cjs84.js +1 -1
- package/dist/index.cjs85.js +1 -1
- package/dist/index.cjs86.js +1 -1
- package/dist/index.cjs87.js +1 -1
- package/dist/index.cjs88.js +1 -1
- package/dist/index.cjs89.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.cjs90.js +1 -1
- package/dist/index.cjs91.js +1 -1
- package/dist/index.cjs92.js +1 -1
- package/dist/index.cjs93.js +1 -1
- package/dist/index.cjs94.js +1 -1
- package/dist/index.cjs95.js +1 -1
- package/dist/index.cjs96.js +1 -1
- package/dist/index.cjs97.js +1 -1
- package/dist/index.cjs98.js +1 -1
- package/dist/index.cjs99.js +1 -1
- package/dist/index.es10.js +5 -5
- package/dist/index.es100.js +1 -1
- package/dist/index.es101.js +43 -34
- package/dist/index.es101.js.map +1 -1
- package/dist/index.es102.js +1 -1
- package/dist/index.es103.js +3 -3
- package/dist/index.es104.js +5 -5
- package/dist/index.es105.js +2 -2
- package/dist/index.es106.js +1 -1
- package/dist/index.es107.js +1 -1
- package/dist/index.es108.js +2 -2
- package/dist/index.es109.js +2 -2
- package/dist/index.es11.js +2 -2
- package/dist/index.es110.js +4 -4
- package/dist/index.es111.js +2 -2
- package/dist/index.es112.js +2 -2
- package/dist/index.es113.js +2 -2
- package/dist/index.es114.js +2 -2
- package/dist/index.es115.js +1 -1
- package/dist/index.es116.js +3 -3
- package/dist/index.es117.js +2 -2
- package/dist/index.es118.js +2 -2
- package/dist/index.es119.js +1 -1
- package/dist/index.es12.js +3 -3
- package/dist/index.es120.js +2 -2
- package/dist/index.es121.js +1 -1
- package/dist/index.es122.js +4 -4
- package/dist/index.es123.js +2 -2
- package/dist/index.es124.js +2 -2
- package/dist/index.es125.js +4 -4
- package/dist/index.es126.js +2 -2
- package/dist/index.es127.js +4 -4
- package/dist/index.es128.js +2 -2
- package/dist/index.es129.js +3 -3
- package/dist/index.es13.js +2 -2
- package/dist/index.es130.js +2 -2
- package/dist/index.es131.js +4 -4
- package/dist/index.es132.js +2 -2
- package/dist/index.es133.js +1 -1
- package/dist/index.es134.js +2 -2
- package/dist/index.es135.js +3 -3
- package/dist/index.es136.js +1 -1
- package/dist/index.es137.js +3 -3
- package/dist/index.es138.js +2 -2
- package/dist/index.es139.js +2 -2
- package/dist/index.es14.js +2 -2
- package/dist/index.es140.js +3 -3
- package/dist/index.es141.js +2 -2
- package/dist/index.es142.js +1 -1
- package/dist/index.es143.js +1 -1
- package/dist/index.es144.js +3 -3
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +2 -2
- package/dist/index.es147.js +1 -1
- package/dist/index.es148.js +2 -2
- package/dist/index.es149.js +7 -7
- package/dist/index.es15.js +3 -3
- package/dist/index.es150.js +2 -2
- package/dist/index.es151.js +1 -1
- package/dist/index.es152.js +1 -1
- package/dist/index.es153.js +3 -3
- package/dist/index.es154.js +3 -3
- package/dist/index.es155.js +3 -3
- package/dist/index.es156.js +3 -3
- package/dist/index.es157.js +3 -3
- package/dist/index.es158.js +3 -3
- package/dist/index.es159.js +3 -3
- package/dist/index.es16.js +3 -3
- package/dist/index.es160.js +3 -3
- package/dist/index.es161.js +3 -3
- package/dist/index.es162.js +3 -3
- package/dist/index.es163.js +3 -3
- package/dist/index.es164.js +3 -3
- package/dist/index.es165.js +3 -3
- package/dist/index.es166.js +3 -3
- package/dist/index.es167.js +3 -3
- package/dist/index.es168.js +3 -3
- package/dist/index.es169.js +3 -3
- package/dist/index.es17.js +2 -2
- package/dist/index.es170.js +3 -3
- package/dist/index.es171.js +3 -3
- package/dist/index.es172.js +3 -3
- package/dist/index.es173.js +3 -3
- package/dist/index.es174.js +3 -3
- package/dist/index.es175.js +3 -3
- package/dist/index.es176.js +2 -2
- package/dist/index.es177.js +2 -2
- package/dist/index.es178.js +2 -2
- package/dist/index.es179.js +3 -3
- package/dist/index.es18.js +3 -3
- package/dist/index.es180.js +3 -3
- package/dist/index.es181.js +3 -3
- package/dist/index.es182.js +1 -1
- package/dist/index.es183.js +3 -3
- package/dist/index.es184.js +3 -3
- package/dist/index.es185.js +3 -3
- package/dist/index.es186.js +3 -3
- package/dist/index.es187.js +3 -3
- package/dist/index.es188.js +3 -3
- package/dist/index.es189.js +3 -3
- package/dist/index.es19.js +3 -3
- package/dist/index.es190.js +3 -3
- package/dist/index.es191.js +3 -3
- package/dist/index.es192.js +2 -2
- package/dist/index.es193.js +3 -3
- package/dist/index.es194.js +3 -3
- package/dist/index.es195.js +3 -3
- package/dist/index.es196.js +3 -3
- package/dist/index.es197.js +3 -3
- package/dist/index.es198.js +3 -3
- package/dist/index.es199.js +3 -3
- package/dist/index.es20.js +2 -2
- package/dist/index.es200.js +2 -2
- package/dist/index.es201.js +2 -2
- package/dist/index.es202.js +3 -3
- package/dist/index.es203.js +3 -3
- package/dist/index.es204.js +3 -3
- package/dist/index.es205.js +3 -3
- package/dist/index.es206.js +3 -3
- package/dist/index.es207.js +3 -3
- package/dist/index.es208.js +3 -3
- package/dist/index.es209.js +3 -3
- package/dist/index.es21.js +3 -3
- package/dist/index.es210.js +1 -1
- package/dist/index.es211.js +1 -1
- package/dist/index.es212.js +1 -1
- package/dist/index.es213.js +1 -1
- package/dist/index.es214.js +1 -1
- package/dist/index.es215.js +3 -3
- package/dist/index.es216.js +1 -1
- package/dist/index.es217.js +3 -1801
- package/dist/index.es217.js.map +1 -1
- package/dist/index.es218.js +13 -472
- package/dist/index.es218.js.map +1 -1
- package/dist/index.es219.js +27 -178
- package/dist/index.es219.js.map +1 -1
- package/dist/index.es22.js +1 -1
- package/dist/index.es221.js +2 -123
- package/dist/index.es221.js.map +1 -1
- package/dist/index.es222.js +2 -285
- package/dist/index.es222.js.map +1 -1
- package/dist/index.es225.js +15 -34
- package/dist/index.es225.js.map +1 -1
- package/dist/index.es229.js +22 -38
- package/dist/index.es229.js.map +1 -1
- package/dist/index.es23.js +1 -1
- package/dist/index.es233.js +22 -39
- package/dist/index.es233.js.map +1 -1
- package/dist/index.es238.js +207 -15
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es24.js +4 -4
- package/dist/{index.es286.js → index.es241.js} +4 -4
- package/dist/{index.es286.js.map → index.es241.js.map} +1 -1
- package/dist/index.es243.js +147 -0
- package/dist/index.es243.js.map +1 -0
- package/dist/{index.es289.js → index.es244.js} +5 -5
- package/dist/{index.es289.js.map → index.es244.js.map} +1 -1
- package/dist/index.es25.js +3 -3
- package/dist/index.es251.js +136 -0
- package/dist/index.es251.js.map +1 -0
- package/dist/index.es252.js +19 -8
- package/dist/index.es252.js.map +1 -1
- package/dist/index.es257.js +1804 -0
- package/dist/index.es257.js.map +1 -0
- package/dist/index.es26.js +3 -3
- package/dist/index.es261.js +4 -47
- package/dist/index.es261.js.map +1 -1
- package/dist/{index.es306.js → index.es262.js} +2 -2
- package/dist/{index.es306.js.map → index.es262.js.map} +1 -1
- package/dist/index.es263.js +5 -44
- package/dist/index.es263.js.map +1 -1
- package/dist/index.es264.js +5 -2
- package/dist/index.es264.js.map +1 -1
- package/dist/index.es267.js +51 -2
- package/dist/index.es267.js.map +1 -1
- package/dist/{index.es313.js → index.es269.js} +16 -16
- package/dist/{index.es313.js.map → index.es269.js.map} +1 -1
- package/dist/index.es27.js +3 -3
- package/dist/index.es270.js +80 -15
- package/dist/index.es270.js.map +1 -1
- package/dist/{index.es315.js → index.es271.js} +2 -2
- package/dist/{index.es315.js.map → index.es271.js.map} +1 -1
- package/dist/{index.es316.js → index.es272.js} +3 -3
- package/dist/{index.es316.js.map → index.es272.js.map} +1 -1
- package/dist/{index.es317.js → index.es273.js} +3 -3
- package/dist/{index.es317.js.map → index.es273.js.map} +1 -1
- package/dist/index.es275.js +30 -0
- package/dist/index.es275.js.map +1 -0
- package/dist/index.es276.js +7 -0
- package/dist/index.es276.js.map +1 -0
- package/dist/{index.es321.js → index.es277.js} +3 -3
- package/dist/{index.es321.js.map → index.es277.js.map} +1 -1
- package/dist/index.es28.js +3 -3
- package/dist/{index.es324.js → index.es280.js} +3 -3
- package/dist/{index.es324.js.map → index.es280.js.map} +1 -1
- package/dist/index.es281.js +7 -0
- package/dist/{index.es325.js.map → index.es281.js.map} +1 -1
- package/dist/{index.es329.js → index.es285.js} +3 -3
- package/dist/{index.es329.js.map → index.es285.js.map} +1 -1
- package/dist/{index.es331.js → index.es287.js} +3 -3
- package/dist/{index.es331.js.map → index.es287.js.map} +1 -1
- package/dist/index.es288.js +28 -144
- package/dist/index.es288.js.map +1 -1
- package/dist/index.es29.js +2 -2
- package/dist/{index.es334.js → index.es290.js} +3 -3
- package/dist/{index.es334.js.map → index.es290.js.map} +1 -1
- package/dist/{index.es335.js → index.es291.js} +3 -3
- package/dist/{index.es335.js.map → index.es291.js.map} +1 -1
- package/dist/index.es292.js +9 -0
- package/dist/{index.es336.js.map → index.es292.js.map} +1 -1
- package/dist/{index.es338.js → index.es294.js} +3 -3
- package/dist/{index.es338.js.map → index.es294.js.map} +1 -1
- package/dist/{index.es339.js → index.es295.js} +3 -3
- package/dist/{index.es339.js.map → index.es295.js.map} +1 -1
- package/dist/index.es296.js +6 -133
- package/dist/index.es296.js.map +1 -1
- package/dist/index.es298.js +30 -0
- package/dist/index.es298.js.map +1 -0
- package/dist/{index.es343.js → index.es299.js} +4 -4
- package/dist/{index.es343.js.map → index.es299.js.map} +1 -1
- package/dist/index.es3.js +6 -6
- package/dist/index.es30.js +2 -2
- package/dist/{index.es344.js → index.es300.js} +9 -9
- package/dist/{index.es344.js.map → index.es300.js.map} +1 -1
- package/dist/{index.es248.js → index.es302.js} +1 -1
- package/dist/{index.es248.js.map → index.es302.js.map} +1 -1
- package/dist/index.es31.js +1 -1
- package/dist/index.es311.js +1 -53
- package/dist/index.es311.js.map +1 -1
- package/dist/index.es319.js +25 -27
- package/dist/index.es319.js.map +1 -1
- package/dist/index.es32.js +3 -3
- package/dist/index.es320.js +6 -4
- package/dist/index.es320.js.map +1 -1
- package/dist/index.es33.js +3 -3
- package/dist/index.es34.js +2 -2
- package/dist/index.es342.js +123 -26
- package/dist/index.es342.js.map +1 -1
- package/dist/index.es348.js +6 -0
- package/dist/index.es348.js.map +1 -0
- package/dist/index.es35.js +3 -3
- package/dist/{index.es394.js → index.es351.js} +3 -3
- package/dist/{index.es394.js.map → index.es351.js.map} +1 -1
- package/dist/index.es353.js +29 -0
- package/dist/index.es353.js.map +1 -0
- package/dist/index.es354.js +19 -1
- package/dist/index.es354.js.map +1 -1
- package/dist/{index.es398.js → index.es355.js} +2 -2
- package/dist/{index.es398.js.map → index.es355.js.map} +1 -1
- package/dist/index.es36.js +3 -3
- package/dist/{index.es403.js → index.es360.js} +1 -1
- package/dist/{index.es403.js.map → index.es360.js.map} +1 -1
- package/dist/index.es366.js +38 -0
- package/dist/index.es366.js.map +1 -0
- package/dist/index.es368.js +12 -0
- package/dist/index.es368.js.map +1 -0
- package/dist/index.es369.js +20 -0
- package/dist/index.es369.js.map +1 -0
- package/dist/index.es37.js +2 -2
- package/dist/index.es374.js +53 -0
- package/dist/index.es374.js.map +1 -0
- package/dist/{index.es253.js → index.es376.js} +4 -4
- package/dist/{index.es253.js.map → index.es376.js.map} +1 -1
- package/dist/{index.es254.js → index.es377.js} +3 -3
- package/dist/{index.es254.js.map → index.es377.js.map} +1 -1
- package/dist/{index.es255.js → index.es378.js} +4 -4
- package/dist/{index.es255.js.map → index.es378.js.map} +1 -1
- package/dist/index.es38.js +2 -2
- package/dist/index.es388.js +9 -0
- package/dist/{index.es425.js.map → index.es388.js.map} +1 -1
- package/dist/{index.es426.js → index.es389.js} +3 -3
- package/dist/{index.es426.js.map → index.es389.js.map} +1 -1
- package/dist/index.es39.js +6 -6
- package/dist/{index.es429.js → index.es392.js} +4 -4
- package/dist/{index.es429.js.map → index.es392.js.map} +1 -1
- package/dist/{index.es432.js → index.es395.js} +4 -4
- package/dist/{index.es432.js.map → index.es395.js.map} +1 -1
- package/dist/index.es396.js +104 -26
- package/dist/index.es396.js.map +1 -1
- package/dist/index.es397.js +5 -17
- package/dist/index.es397.js.map +1 -1
- package/dist/index.es399.js +36 -0
- package/dist/index.es399.js.map +1 -0
- package/dist/index.es4.js +7 -7
- package/dist/index.es40.js +6 -6
- package/dist/{index.es439.js → index.es402.js} +2 -2
- package/dist/{index.es439.js.map → index.es402.js.map} +1 -1
- package/dist/index.es404.js +477 -0
- package/dist/index.es404.js.map +1 -0
- package/dist/index.es405.js +181 -0
- package/dist/index.es405.js.map +1 -0
- package/dist/{index.es220.js → index.es406.js} +4 -4
- package/dist/{index.es220.js.map → index.es406.js.map} +1 -1
- package/dist/index.es407.js +126 -0
- package/dist/index.es407.js.map +1 -0
- package/dist/index.es408.js +288 -0
- package/dist/index.es408.js.map +1 -0
- package/dist/index.es409.js +204 -35
- package/dist/index.es409.js.map +1 -1
- package/dist/index.es41.js +2 -2
- package/dist/{index.es224.js → index.es410.js} +7 -7
- package/dist/{index.es224.js.map → index.es410.js.map} +1 -1
- package/dist/index.es411.js +34 -9
- package/dist/index.es411.js.map +1 -1
- package/dist/index.es412.js +342 -17
- package/dist/index.es412.js.map +1 -1
- package/dist/{index.es227.js → index.es413.js} +4 -4
- package/dist/{index.es227.js.map → index.es413.js.map} +1 -1
- package/dist/{index.es228.js → index.es414.js} +1 -1
- package/dist/{index.es228.js.map → index.es414.js.map} +1 -1
- package/dist/index.es415.js +41 -0
- package/dist/index.es415.js.map +1 -0
- package/dist/{index.es230.js → index.es416.js} +1 -1
- package/dist/{index.es230.js.map → index.es416.js.map} +1 -1
- package/dist/index.es417.js +179 -50
- package/dist/index.es417.js.map +1 -1
- package/dist/{index.es232.js → index.es418.js} +2 -2
- package/dist/{index.es232.js.map → index.es418.js.map} +1 -1
- package/dist/index.es419.js +42 -0
- package/dist/index.es419.js.map +1 -0
- package/dist/index.es42.js +1 -1
- package/dist/{index.es234.js → index.es420.js} +3 -3
- package/dist/{index.es234.js.map → index.es420.js.map} +1 -1
- package/dist/{index.es235.js → index.es421.js} +1 -1
- package/dist/{index.es235.js.map → index.es421.js.map} +1 -1
- package/dist/index.es424.js +6 -0
- package/dist/index.es424.js.map +1 -0
- package/dist/index.es43.js +2 -2
- package/dist/index.es431.js +8 -0
- package/dist/index.es431.js.map +1 -0
- package/dist/index.es435.js +12 -0
- package/dist/index.es435.js.map +1 -0
- package/dist/index.es436.js +189 -33
- package/dist/index.es436.js.map +1 -1
- package/dist/index.es438.js +50 -0
- package/dist/index.es438.js.map +1 -0
- package/dist/index.es44.js +6 -6
- package/dist/index.es440.js +48 -0
- package/dist/index.es440.js.map +1 -0
- package/dist/index.es441.js +7 -135
- package/dist/index.es441.js.map +1 -1
- package/dist/index.es442.js +2 -8
- package/dist/index.es442.js.map +1 -1
- package/dist/index.es443.js +33 -2
- package/dist/index.es443.js.map +1 -1
- package/dist/index.es444.js +235 -23
- package/dist/index.es444.js.map +1 -1
- package/dist/index.es446.js +6 -5
- package/dist/index.es446.js.map +1 -1
- package/dist/index.es447.js +24 -518
- package/dist/index.es447.js.map +1 -1
- package/dist/index.es448.js +66 -3673
- package/dist/index.es448.js.map +1 -1
- package/dist/index.es449.js +29 -5
- package/dist/index.es449.js.map +1 -1
- package/dist/index.es45.js +5 -5
- package/dist/index.es450.js +33 -2
- package/dist/index.es450.js.map +1 -1
- package/dist/index.es451.js +610 -2020
- package/dist/index.es451.js.map +1 -1
- package/dist/index.es452.js +10 -59
- package/dist/index.es452.js.map +1 -1
- package/dist/index.es453.js +15 -189
- package/dist/index.es453.js.map +1 -1
- package/dist/index.es456.js +4 -66
- package/dist/index.es456.js.map +1 -1
- package/dist/index.es457.js +24 -29
- package/dist/index.es457.js.map +1 -1
- package/dist/index.es458.js +67 -31
- package/dist/index.es458.js.map +1 -1
- package/dist/index.es46.js +4 -4
- package/dist/index.es462.js +124 -14
- package/dist/index.es462.js.map +1 -1
- package/dist/{index.es475.js → index.es463.js} +5 -5
- package/dist/{index.es475.js.map → index.es463.js.map} +1 -1
- package/dist/{index.es476.js → index.es464.js} +4 -4
- package/dist/{index.es476.js.map → index.es464.js.map} +1 -1
- package/dist/index.es465.js +14 -5
- package/dist/index.es465.js.map +1 -1
- package/dist/index.es466.js +9 -25
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es467.js +47 -66
- package/dist/index.es467.js.map +1 -1
- package/dist/{index.es480.js → index.es468.js} +3 -3
- package/dist/{index.es480.js.map → index.es468.js.map} +1 -1
- package/dist/index.es47.js +3 -3
- package/dist/index.es48.js +3 -3
- package/dist/{index.es498.js → index.es484.js} +3 -3
- package/dist/{index.es498.js.map → index.es484.js.map} +1 -1
- package/dist/index.es485.js +9 -0
- package/dist/index.es485.js.map +1 -0
- package/dist/{index.es499.js → index.es486.js} +1 -1
- package/dist/index.es486.js.map +1 -0
- package/dist/index.es49.js +4 -4
- package/dist/index.es492.js +139 -0
- package/dist/index.es492.js.map +1 -0
- package/dist/index.es493.js +2035 -0
- package/dist/index.es493.js.map +1 -0
- package/dist/index.es494.js +63 -0
- package/dist/index.es494.js.map +1 -0
- package/dist/index.es495.js +192 -0
- package/dist/index.es495.js.map +1 -0
- package/dist/index.es5.js +4 -4
- package/dist/index.es50.js +4 -4
- package/dist/index.es500.js +5 -2
- package/dist/index.es500.js.map +1 -1
- package/dist/index.es501.js +2 -4
- package/dist/index.es501.js.map +1 -1
- package/dist/index.es502.js +3678 -0
- package/dist/index.es502.js.map +1 -0
- package/dist/index.es503.js +5 -0
- package/dist/index.es503.js.map +1 -0
- package/dist/index.es504.js +9 -0
- package/dist/index.es504.js.map +1 -0
- package/dist/index.es505.js +524 -0
- package/dist/index.es505.js.map +1 -0
- package/dist/index.es506.js +2 -5
- package/dist/index.es506.js.map +1 -1
- package/dist/index.es507.js +4 -2
- package/dist/index.es507.js.map +1 -1
- package/dist/index.es508.js +10 -9
- package/dist/index.es508.js.map +1 -1
- package/dist/index.es509.js +42 -174
- package/dist/index.es509.js.map +1 -1
- package/dist/index.es51.js +5 -5
- package/dist/index.es510.js +13 -3
- package/dist/index.es510.js.map +1 -1
- package/dist/index.es511.js +212 -127
- package/dist/index.es511.js.map +1 -1
- package/dist/index.es512.js +177 -10
- package/dist/index.es512.js.map +1 -1
- package/dist/index.es513.js +4 -46
- package/dist/index.es513.js.map +1 -1
- package/dist/index.es514.js +11 -13
- package/dist/index.es514.js.map +1 -1
- package/dist/index.es515.js +9 -217
- package/dist/index.es515.js.map +1 -1
- package/dist/index.es516.js +171 -171
- package/dist/index.es516.js.map +1 -1
- package/dist/index.es517.js +4 -4
- package/dist/index.es517.js.map +1 -1
- package/dist/index.es518.js +131 -10
- package/dist/index.es518.js.map +1 -1
- package/dist/index.es519.js +1 -1
- package/dist/index.es52.js +5 -5
- package/dist/index.es521.js +2 -2
- package/dist/index.es522.js +3 -3
- package/dist/index.es526.js +1 -1
- package/dist/index.es527.js +1 -1
- package/dist/index.es53.js +2 -2
- package/dist/index.es532.js +1 -1
- package/dist/index.es536.js +2 -2
- package/dist/index.es537.js +16 -16
- package/dist/index.es54.js +3 -3
- package/dist/index.es544.js +9 -9
- package/dist/index.es549.js +9 -9
- package/dist/index.es55.js +2 -2
- package/dist/index.es551.js +2 -2
- package/dist/index.es553.js +1 -1
- package/dist/index.es56.js +4 -4
- package/dist/index.es57.js +2 -2
- package/dist/index.es570.js +54 -512
- package/dist/index.es570.js.map +1 -1
- package/dist/index.es571.js +509 -113
- package/dist/index.es571.js.map +1 -1
- package/dist/index.es572.js +121 -123
- package/dist/index.es572.js.map +1 -1
- package/dist/index.es573.js +125 -61
- package/dist/index.es573.js.map +1 -1
- package/dist/index.es574.js +1 -1
- package/dist/index.es575.js +1 -1
- package/dist/index.es58.js +2 -2
- package/dist/index.es583.js +21 -11
- package/dist/index.es583.js.map +1 -1
- package/dist/index.es584.js +11 -26
- package/dist/index.es584.js.map +1 -1
- package/dist/index.es585.js +27 -4
- package/dist/index.es585.js.map +1 -1
- package/dist/index.es586.js +4 -22
- package/dist/index.es586.js.map +1 -1
- package/dist/index.es59.js +2 -2
- package/dist/index.es6.js +3 -3
- package/dist/index.es60.js +3 -3
- package/dist/index.es61.js +2 -2
- package/dist/index.es62.js +2 -2
- package/dist/index.es63.js +2 -2
- package/dist/index.es64.js +3 -3
- package/dist/index.es65.js +1 -1
- package/dist/index.es66.js +2 -2
- package/dist/index.es67.js +3 -3
- package/dist/index.es68.js +2 -2
- package/dist/index.es69.js +4 -4
- package/dist/index.es7.js +3 -3
- package/dist/index.es70.js +1 -1
- package/dist/index.es71.js +2 -2
- package/dist/index.es72.js +1 -1
- package/dist/index.es73.js +2 -2
- package/dist/index.es74.js +2 -2
- package/dist/index.es75.js +4 -4
- package/dist/index.es76.js +1 -1
- package/dist/index.es77.js +3 -3
- package/dist/index.es78.js +2 -2
- package/dist/index.es79.js +2 -2
- package/dist/index.es8.js +3 -3
- package/dist/index.es80.js +2 -2
- package/dist/index.es81.js +1 -1
- package/dist/index.es82.js +1 -1
- package/dist/index.es83.js +1 -1
- package/dist/index.es84.js +1 -1
- package/dist/index.es85.js +1 -1
- package/dist/index.es86.js +1 -1
- package/dist/index.es87.js +1 -1
- package/dist/index.es88.js +1 -1
- package/dist/index.es89.js +1 -1
- package/dist/index.es9.js +5 -5
- package/dist/index.es90.js +1 -1
- package/dist/index.es91.js +1 -1
- package/dist/index.es92.js +1 -1
- package/dist/index.es93.js +1 -1
- package/dist/index.es94.js +1 -1
- package/dist/index.es95.js +1 -1
- package/dist/index.es96.js +1 -1
- package/dist/index.es97.js +2 -2
- package/dist/index.es98.js +2 -2
- package/dist/index.es99.js +2 -2
- package/package.json +1 -1
- package/dist/index.cjs223.js +0 -2
- package/dist/index.cjs223.js.map +0 -1
- package/dist/index.cjs226.js +0 -2
- package/dist/index.cjs226.js.map +0 -1
- package/dist/index.cjs231.js +0 -2
- package/dist/index.cjs231.js.map +0 -1
- package/dist/index.cjs236.js +0 -2
- package/dist/index.cjs236.js.map +0 -1
- package/dist/index.cjs240.js +0 -2
- package/dist/index.cjs240.js.map +0 -1
- package/dist/index.cjs247.js +0 -2
- package/dist/index.cjs247.js.map +0 -1
- package/dist/index.cjs256.js +0 -2
- package/dist/index.cjs256.js.map +0 -1
- package/dist/index.cjs265.js +0 -2
- package/dist/index.cjs265.js.map +0 -1
- package/dist/index.cjs274.js +0 -2
- package/dist/index.cjs274.js.map +0 -1
- package/dist/index.cjs278.js +0 -2
- package/dist/index.cjs278.js.map +0 -1
- package/dist/index.cjs283.js +0 -2
- package/dist/index.cjs283.js.map +0 -1
- package/dist/index.cjs297.js +0 -2
- package/dist/index.cjs297.js.map +0 -1
- package/dist/index.cjs305.js +0 -2
- package/dist/index.cjs305.js.map +0 -1
- package/dist/index.cjs307.js +0 -2
- package/dist/index.cjs307.js.map +0 -1
- package/dist/index.cjs308.js +0 -2
- package/dist/index.cjs308.js.map +0 -1
- package/dist/index.cjs314.js +0 -2
- package/dist/index.cjs314.js.map +0 -1
- package/dist/index.cjs325.js +0 -2
- package/dist/index.cjs332.js +0 -2
- package/dist/index.cjs332.js.map +0 -1
- package/dist/index.cjs336.js +0 -2
- package/dist/index.cjs340.js +0 -2
- package/dist/index.cjs340.js.map +0 -1
- package/dist/index.cjs362.js +0 -2
- package/dist/index.cjs362.js.map +0 -1
- package/dist/index.cjs363.js +0 -2
- package/dist/index.cjs363.js.map +0 -1
- package/dist/index.cjs385.js +0 -8
- package/dist/index.cjs385.js.map +0 -1
- package/dist/index.cjs391.js.map +0 -1
- package/dist/index.cjs425.js +0 -2
- package/dist/index.cjs433.js +0 -2
- package/dist/index.cjs433.js.map +0 -1
- package/dist/index.cjs434.js +0 -2
- package/dist/index.cjs434.js.map +0 -1
- package/dist/index.cjs445.js +0 -15
- package/dist/index.cjs445.js.map +0 -1
- package/dist/index.cjs454.js +0 -2
- package/dist/index.cjs454.js.map +0 -1
- package/dist/index.cjs455.js +0 -2
- package/dist/index.cjs455.js.map +0 -1
- package/dist/index.cjs459.js +0 -2
- package/dist/index.cjs459.js.map +0 -1
- package/dist/index.cjs460.js +0 -2
- package/dist/index.cjs460.js.map +0 -1
- package/dist/index.cjs474.js +0 -2
- package/dist/index.cjs474.js.map +0 -1
- package/dist/index.cjs477.js +0 -2
- package/dist/index.cjs477.js.map +0 -1
- package/dist/index.cjs478.js +0 -2
- package/dist/index.cjs478.js.map +0 -1
- package/dist/index.cjs479.js +0 -2
- package/dist/index.cjs479.js.map +0 -1
- package/dist/index.cjs499.js.map +0 -1
- package/dist/index.es223.js +0 -207
- package/dist/index.es223.js.map +0 -1
- package/dist/index.es226.js +0 -345
- package/dist/index.es226.js.map +0 -1
- package/dist/index.es231.js +0 -182
- package/dist/index.es231.js.map +0 -1
- package/dist/index.es236.js +0 -6
- package/dist/index.es236.js.map +0 -1
- package/dist/index.es240.js +0 -6
- package/dist/index.es240.js.map +0 -1
- package/dist/index.es247.js +0 -8
- package/dist/index.es247.js.map +0 -1
- package/dist/index.es256.js +0 -192
- package/dist/index.es256.js.map +0 -1
- package/dist/index.es265.js +0 -30
- package/dist/index.es265.js.map +0 -1
- package/dist/index.es274.js +0 -25
- package/dist/index.es274.js.map +0 -1
- package/dist/index.es278.js +0 -25
- package/dist/index.es278.js.map +0 -1
- package/dist/index.es283.js +0 -210
- package/dist/index.es283.js.map +0 -1
- package/dist/index.es297.js +0 -23
- package/dist/index.es297.js.map +0 -1
- package/dist/index.es305.js +0 -7
- package/dist/index.es305.js.map +0 -1
- package/dist/index.es307.js +0 -9
- package/dist/index.es307.js.map +0 -1
- package/dist/index.es308.js +0 -8
- package/dist/index.es308.js.map +0 -1
- package/dist/index.es314.js +0 -83
- package/dist/index.es314.js.map +0 -1
- package/dist/index.es325.js +0 -7
- package/dist/index.es332.js +0 -31
- package/dist/index.es332.js.map +0 -1
- package/dist/index.es336.js +0 -9
- package/dist/index.es340.js +0 -9
- package/dist/index.es340.js.map +0 -1
- package/dist/index.es362.js +0 -28
- package/dist/index.es362.js.map +0 -1
- package/dist/index.es363.js +0 -9
- package/dist/index.es363.js.map +0 -1
- package/dist/index.es385.js +0 -127
- package/dist/index.es385.js.map +0 -1
- package/dist/index.es391.js +0 -6
- package/dist/index.es391.js.map +0 -1
- package/dist/index.es425.js +0 -9
- package/dist/index.es433.js +0 -107
- package/dist/index.es433.js.map +0 -1
- package/dist/index.es434.js +0 -8
- package/dist/index.es434.js.map +0 -1
- package/dist/index.es445.js +0 -248
- package/dist/index.es445.js.map +0 -1
- package/dist/index.es454.js +0 -10
- package/dist/index.es454.js.map +0 -1
- package/dist/index.es455.js +0 -30
- package/dist/index.es455.js.map +0 -1
- package/dist/index.es459.js +0 -625
- package/dist/index.es459.js.map +0 -1
- package/dist/index.es460.js +0 -14
- package/dist/index.es460.js.map +0 -1
- package/dist/index.es474.js +0 -128
- package/dist/index.es474.js.map +0 -1
- package/dist/index.es477.js +0 -18
- package/dist/index.es477.js.map +0 -1
- package/dist/index.es478.js +0 -12
- package/dist/index.es478.js.map +0 -1
- package/dist/index.es479.js +0 -53
- package/dist/index.es479.js.map +0 -1
- package/dist/index.es499.js.map +0 -1
- /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as n, useCallback as l } from "react";
|
|
2
|
-
import "./index.
|
|
2
|
+
import "./index.es501.js";
|
|
3
3
|
function s() {
|
|
4
4
|
const [a, e] = n(null), o = l(async (t) => {
|
|
5
5
|
if (!(navigator != null && navigator.clipboard))
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
s as useCopyToClipboard,
|
|
23
23
|
c as useToggle
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=index.
|
|
25
|
+
//# sourceMappingURL=index.es402.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es439.js","sources":["../node_modules/usehooks-ts/dist/index.js"],"sourcesContent":["import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue = false) {\n if (typeof defaultValue !== \"boolean\") {\n throw new Error(\"defaultValue must be `true` or `false`\");\n }\n const [value, setValue] = useState(defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = useCallback(() => {\n setCount((x) => x + 1);\n }, []);\n const decrement = useCallback(() => {\n setCount((x) => x - 1);\n }, []);\n const reset = useCallback(() => {\n setCount(initialValue ?? 0);\n }, [initialValue]);\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown({\n countStart,\n countStop = 0,\n intervalMs = 1e3,\n isIncrement = false\n}) {\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = useCallback(() => {\n stopCountdown();\n resetCounter();\n }, [stopCountdown, resetCounter]);\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return [count, { startCountdown, stopCountdown, resetCountdown }];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER) {\n console.warn(\n `Tried removing localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, {\n defaultValue = false,\n initializeWithValue = true\n} = {}) {\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options = {}) {\n const {\n defaultValue,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true\n } = options;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useIntersectionObserver({\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = useState(null);\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n const result = [\n setRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\", eventListenerOptions = {}) {\n useEventListener(\n eventType,\n (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.filter((r) => Boolean(r.current)).every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n },\n void 0,\n eventListenerOptions\n );\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options.onResize;\n useEffect(() => {\n if (!ref.current)\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = options.debounceDelay ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER6) {\n console.warn(\n `Tried removing sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.sessionStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode({\n defaultValue = \"system\",\n localStorageKey = LOCAL_STORAGE_KEY2,\n initializeWithValue = true\n} = {}) {\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options.debounceDelay\n );\n function handleSize() {\n const setSize = options.debounceDelay ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounceCallback, useDebounceValue, useDocumentTitle, useEventCallback, useEventListener, useHover, useIntersectionObserver, useInterval, useIsClient, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useWindowSize };\n"],"names":["useCopyToClipboard","copiedText","setCopiedText","useState","copy","useCallback","text","error","useToggle","defaultValue","value","setValue","toggle","x"],"mappings":";;AAgDA,SAASA,IAAqB;AAC5B,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,IAAI,GAC3CC,IAAOC,EAAY,OAAOC,MAAS;AACvC,QAAI,EAAE,aAAa,QAAgB,UAAU;AAC3C,qBAAQ,KAAK,yBAAyB,GAC/B;AAET,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCJ,EAAcI,CAAI,GACX;AAAA,IACR,SAAQC,GAAO;AACd,qBAAQ,KAAK,eAAeA,CAAK,GACjCL,EAAc,IAAI,GACX;AAAA,IACb;AAAA,EACG,GAAE,EAAE;AACL,SAAO,CAACD,GAAYG,CAAI;AAC1B;AAw6BA,SAASI,EAAUC,GAAc;AAC/B,QAAM,CAACC,GAAOC,CAAQ,IAAIR,EAAS,EAAc,GAC3CS,IAASP,EAAY,MAAM;AAC/B,IAAAM,EAAS,CAACE,MAAM,CAACA,CAAC;AAAA,EACnB,GAAE,EAAE;AACL,SAAO,CAACH,GAAOE,GAAQD,CAAQ;AACjC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.es402.js","sources":["../node_modules/usehooks-ts/dist/index.js"],"sourcesContent":["import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue = false) {\n if (typeof defaultValue !== \"boolean\") {\n throw new Error(\"defaultValue must be `true` or `false`\");\n }\n const [value, setValue] = useState(defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = useCallback(() => {\n setCount((x) => x + 1);\n }, []);\n const decrement = useCallback(() => {\n setCount((x) => x - 1);\n }, []);\n const reset = useCallback(() => {\n setCount(initialValue ?? 0);\n }, [initialValue]);\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown({\n countStart,\n countStop = 0,\n intervalMs = 1e3,\n isIncrement = false\n}) {\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = useCallback(() => {\n stopCountdown();\n resetCounter();\n }, [stopCountdown, resetCounter]);\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return [count, { startCountdown, stopCountdown, resetCountdown }];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER) {\n console.warn(\n `Tried removing localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, {\n defaultValue = false,\n initializeWithValue = true\n} = {}) {\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options = {}) {\n const {\n defaultValue,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true\n } = options;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useIntersectionObserver({\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = useState(null);\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n const result = [\n setRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\", eventListenerOptions = {}) {\n useEventListener(\n eventType,\n (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.filter((r) => Boolean(r.current)).every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n },\n void 0,\n eventListenerOptions\n );\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options.onResize;\n useEffect(() => {\n if (!ref.current)\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = options.debounceDelay ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER6) {\n console.warn(\n `Tried removing sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.sessionStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode({\n defaultValue = \"system\",\n localStorageKey = LOCAL_STORAGE_KEY2,\n initializeWithValue = true\n} = {}) {\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options.debounceDelay\n );\n function handleSize() {\n const setSize = options.debounceDelay ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounceCallback, useDebounceValue, useDocumentTitle, useEventCallback, useEventListener, useHover, useIntersectionObserver, useInterval, useIsClient, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useWindowSize };\n"],"names":["useCopyToClipboard","copiedText","setCopiedText","useState","copy","useCallback","text","error","useToggle","defaultValue","value","setValue","toggle","x"],"mappings":";;AAgDA,SAASA,IAAqB;AAC5B,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,IAAI,GAC3CC,IAAOC,EAAY,OAAOC,MAAS;AACvC,QAAI,EAAE,aAAa,QAAgB,UAAU;AAC3C,qBAAQ,KAAK,yBAAyB,GAC/B;AAET,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCJ,EAAcI,CAAI,GACX;AAAA,IACR,SAAQC,GAAO;AACd,qBAAQ,KAAK,eAAeA,CAAK,GACjCL,EAAc,IAAI,GACX;AAAA,IACb;AAAA,EACG,GAAE,EAAE;AACL,SAAO,CAACD,GAAYG,CAAI;AAC1B;AAw6BA,SAASI,EAAUC,GAAc;AAC/B,QAAM,CAACC,GAAOC,CAAQ,IAAIR,EAAS,EAAc,GAC3CS,IAASP,EAAY,MAAM;AAC/B,IAAAM,EAAS,CAACE,MAAM,CAACA,CAAC;AAAA,EACnB,GAAE,EAAE;AACL,SAAO,CAACH,GAAOE,GAAQD,CAAQ;AACjC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import c, { friendlyDateTime as f } from "./index.es257.js";
|
|
2
|
+
import h from "./index.es3.js";
|
|
3
|
+
import S from "./index.es4.js";
|
|
4
|
+
import { InvalidArgumentError as v, InvalidIntervalError as p } from "./index.es415.js";
|
|
5
|
+
import V from "./index.es416.js";
|
|
6
|
+
import O from "./index.es406.js";
|
|
7
|
+
import { DATE_SHORT as D } from "./index.es414.js";
|
|
8
|
+
const d = "Invalid Interval";
|
|
9
|
+
function I(m, t) {
|
|
10
|
+
return !m || !m.isValid ? a.invalid("missing or invalid start") : !t || !t.isValid ? a.invalid("missing or invalid end") : t < m ? a.invalid(
|
|
11
|
+
"end before start",
|
|
12
|
+
`The end of an interval must be after its start, but you had start=${m.toISO()} and end=${t.toISO()}`
|
|
13
|
+
) : null;
|
|
14
|
+
}
|
|
15
|
+
class a {
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
constructor(t) {
|
|
20
|
+
this.s = t.start, this.e = t.end, this.invalid = t.invalid || null, this.isLuxonInterval = !0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Create an invalid Interval.
|
|
24
|
+
* @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
|
|
25
|
+
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
|
|
26
|
+
* @return {Interval}
|
|
27
|
+
*/
|
|
28
|
+
static invalid(t, i = null) {
|
|
29
|
+
if (!t)
|
|
30
|
+
throw new v("need to specify a reason the Interval is invalid");
|
|
31
|
+
const e = t instanceof V ? t : new V(t, i);
|
|
32
|
+
if (S.throwOnInvalid)
|
|
33
|
+
throw new p(e);
|
|
34
|
+
return new a({ invalid: e });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
|
|
38
|
+
* @param {DateTime|Date|Object} start
|
|
39
|
+
* @param {DateTime|Date|Object} end
|
|
40
|
+
* @return {Interval}
|
|
41
|
+
*/
|
|
42
|
+
static fromDateTimes(t, i) {
|
|
43
|
+
const e = f(t), s = f(i), r = I(e, s);
|
|
44
|
+
return r ?? new a({
|
|
45
|
+
start: e,
|
|
46
|
+
end: s
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create an Interval from a start DateTime and a Duration to extend to.
|
|
51
|
+
* @param {DateTime|Date|Object} start
|
|
52
|
+
* @param {Duration|Object|number} duration - the length of the Interval.
|
|
53
|
+
* @return {Interval}
|
|
54
|
+
*/
|
|
55
|
+
static after(t, i) {
|
|
56
|
+
const e = h.fromDurationLike(i), s = f(t);
|
|
57
|
+
return a.fromDateTimes(s, s.plus(e));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create an Interval from an end DateTime and a Duration to extend backwards to.
|
|
61
|
+
* @param {DateTime|Date|Object} end
|
|
62
|
+
* @param {Duration|Object|number} duration - the length of the Interval.
|
|
63
|
+
* @return {Interval}
|
|
64
|
+
*/
|
|
65
|
+
static before(t, i) {
|
|
66
|
+
const e = h.fromDurationLike(i), s = f(t);
|
|
67
|
+
return a.fromDateTimes(s.minus(e), s);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create an Interval from an ISO 8601 string.
|
|
71
|
+
* Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
|
|
72
|
+
* @param {string} text - the ISO string to parse
|
|
73
|
+
* @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
|
|
74
|
+
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
75
|
+
* @return {Interval}
|
|
76
|
+
*/
|
|
77
|
+
static fromISO(t, i) {
|
|
78
|
+
const [e, s] = (t || "").split("/", 2);
|
|
79
|
+
if (e && s) {
|
|
80
|
+
let r, n;
|
|
81
|
+
try {
|
|
82
|
+
r = c.fromISO(e, i), n = r.isValid;
|
|
83
|
+
} catch {
|
|
84
|
+
n = !1;
|
|
85
|
+
}
|
|
86
|
+
let u, l;
|
|
87
|
+
try {
|
|
88
|
+
u = c.fromISO(s, i), l = u.isValid;
|
|
89
|
+
} catch {
|
|
90
|
+
l = !1;
|
|
91
|
+
}
|
|
92
|
+
if (n && l)
|
|
93
|
+
return a.fromDateTimes(r, u);
|
|
94
|
+
if (n) {
|
|
95
|
+
const o = h.fromISO(s, i);
|
|
96
|
+
if (o.isValid)
|
|
97
|
+
return a.after(r, o);
|
|
98
|
+
} else if (l) {
|
|
99
|
+
const o = h.fromISO(e, i);
|
|
100
|
+
if (o.isValid)
|
|
101
|
+
return a.before(u, o);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return a.invalid("unparsable", `the input "${t}" can't be parsed as ISO 8601`);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Check if an object is an Interval. Works across context boundaries
|
|
108
|
+
* @param {object} o
|
|
109
|
+
* @return {boolean}
|
|
110
|
+
*/
|
|
111
|
+
static isInterval(t) {
|
|
112
|
+
return t && t.isLuxonInterval || !1;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the start of the Interval
|
|
116
|
+
* @type {DateTime}
|
|
117
|
+
*/
|
|
118
|
+
get start() {
|
|
119
|
+
return this.isValid ? this.s : null;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Returns the end of the Interval
|
|
123
|
+
* @type {DateTime}
|
|
124
|
+
*/
|
|
125
|
+
get end() {
|
|
126
|
+
return this.isValid ? this.e : null;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Returns the last DateTime included in the interval (since end is not part of the interval)
|
|
130
|
+
* @type {DateTime}
|
|
131
|
+
*/
|
|
132
|
+
get lastDateTime() {
|
|
133
|
+
return this.isValid && this.e ? this.e.minus(1) : null;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
|
|
137
|
+
* @type {boolean}
|
|
138
|
+
*/
|
|
139
|
+
get isValid() {
|
|
140
|
+
return this.invalidReason === null;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns an error code if this Interval is invalid, or null if the Interval is valid
|
|
144
|
+
* @type {string}
|
|
145
|
+
*/
|
|
146
|
+
get invalidReason() {
|
|
147
|
+
return this.invalid ? this.invalid.reason : null;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns an explanation of why this Interval became invalid, or null if the Interval is valid
|
|
151
|
+
* @type {string}
|
|
152
|
+
*/
|
|
153
|
+
get invalidExplanation() {
|
|
154
|
+
return this.invalid ? this.invalid.explanation : null;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns the length of the Interval in the specified unit.
|
|
158
|
+
* @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
|
|
159
|
+
* @return {number}
|
|
160
|
+
*/
|
|
161
|
+
length(t = "milliseconds") {
|
|
162
|
+
return this.isValid ? this.toDuration(t).get(t) : NaN;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
|
|
166
|
+
* Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
|
|
167
|
+
* asks 'what dates are included in this interval?', not 'how many days long is this interval?'
|
|
168
|
+
* @param {string} [unit='milliseconds'] - the unit of time to count.
|
|
169
|
+
* @param {Object} opts - options
|
|
170
|
+
* @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime
|
|
171
|
+
* @return {number}
|
|
172
|
+
*/
|
|
173
|
+
count(t = "milliseconds", i) {
|
|
174
|
+
if (!this.isValid) return NaN;
|
|
175
|
+
const e = this.start.startOf(t, i);
|
|
176
|
+
let s;
|
|
177
|
+
return i != null && i.useLocaleWeeks ? s = this.end.reconfigure({ locale: e.locale }) : s = this.end, s = s.startOf(t, i), Math.floor(s.diff(e, t).get(t)) + (s.valueOf() !== this.end.valueOf());
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns whether this Interval's start and end are both in the same unit of time
|
|
181
|
+
* @param {string} unit - the unit of time to check sameness on
|
|
182
|
+
* @return {boolean}
|
|
183
|
+
*/
|
|
184
|
+
hasSame(t) {
|
|
185
|
+
return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, t) : !1;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Return whether this Interval has the same start and end DateTimes.
|
|
189
|
+
* @return {boolean}
|
|
190
|
+
*/
|
|
191
|
+
isEmpty() {
|
|
192
|
+
return this.s.valueOf() === this.e.valueOf();
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Return whether this Interval's start is after the specified DateTime.
|
|
196
|
+
* @param {DateTime} dateTime
|
|
197
|
+
* @return {boolean}
|
|
198
|
+
*/
|
|
199
|
+
isAfter(t) {
|
|
200
|
+
return this.isValid ? this.s > t : !1;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Return whether this Interval's end is before the specified DateTime.
|
|
204
|
+
* @param {DateTime} dateTime
|
|
205
|
+
* @return {boolean}
|
|
206
|
+
*/
|
|
207
|
+
isBefore(t) {
|
|
208
|
+
return this.isValid ? this.e <= t : !1;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Return whether this Interval contains the specified DateTime.
|
|
212
|
+
* @param {DateTime} dateTime
|
|
213
|
+
* @return {boolean}
|
|
214
|
+
*/
|
|
215
|
+
contains(t) {
|
|
216
|
+
return this.isValid ? this.s <= t && this.e > t : !1;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* "Sets" the start and/or end dates. Returns a newly-constructed Interval.
|
|
220
|
+
* @param {Object} values - the values to set
|
|
221
|
+
* @param {DateTime} values.start - the starting DateTime
|
|
222
|
+
* @param {DateTime} values.end - the ending DateTime
|
|
223
|
+
* @return {Interval}
|
|
224
|
+
*/
|
|
225
|
+
set({ start: t, end: i } = {}) {
|
|
226
|
+
return this.isValid ? a.fromDateTimes(t || this.s, i || this.e) : this;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Split this Interval at each of the specified DateTimes
|
|
230
|
+
* @param {...DateTime} dateTimes - the unit of time to count.
|
|
231
|
+
* @return {Array}
|
|
232
|
+
*/
|
|
233
|
+
splitAt(...t) {
|
|
234
|
+
if (!this.isValid) return [];
|
|
235
|
+
const i = t.map(f).filter((n) => this.contains(n)).sort((n, u) => n.toMillis() - u.toMillis()), e = [];
|
|
236
|
+
let { s } = this, r = 0;
|
|
237
|
+
for (; s < this.e; ) {
|
|
238
|
+
const n = i[r] || this.e, u = +n > +this.e ? this.e : n;
|
|
239
|
+
e.push(a.fromDateTimes(s, u)), s = u, r += 1;
|
|
240
|
+
}
|
|
241
|
+
return e;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Split this Interval into smaller Intervals, each of the specified length.
|
|
245
|
+
* Left over time is grouped into a smaller interval
|
|
246
|
+
* @param {Duration|Object|number} duration - The length of each resulting interval.
|
|
247
|
+
* @return {Array}
|
|
248
|
+
*/
|
|
249
|
+
splitBy(t) {
|
|
250
|
+
const i = h.fromDurationLike(t);
|
|
251
|
+
if (!this.isValid || !i.isValid || i.as("milliseconds") === 0)
|
|
252
|
+
return [];
|
|
253
|
+
let { s: e } = this, s = 1, r;
|
|
254
|
+
const n = [];
|
|
255
|
+
for (; e < this.e; ) {
|
|
256
|
+
const u = this.start.plus(i.mapUnits((l) => l * s));
|
|
257
|
+
r = +u > +this.e ? this.e : u, n.push(a.fromDateTimes(e, r)), e = r, s += 1;
|
|
258
|
+
}
|
|
259
|
+
return n;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Split this Interval into the specified number of smaller intervals.
|
|
263
|
+
* @param {number} numberOfParts - The number of Intervals to divide the Interval into.
|
|
264
|
+
* @return {Array}
|
|
265
|
+
*/
|
|
266
|
+
divideEqually(t) {
|
|
267
|
+
return this.isValid ? this.splitBy(this.length() / t).slice(0, t) : [];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Return whether this Interval overlaps with the specified Interval
|
|
271
|
+
* @param {Interval} other
|
|
272
|
+
* @return {boolean}
|
|
273
|
+
*/
|
|
274
|
+
overlaps(t) {
|
|
275
|
+
return this.e > t.s && this.s < t.e;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Return whether this Interval's end is adjacent to the specified Interval's start.
|
|
279
|
+
* @param {Interval} other
|
|
280
|
+
* @return {boolean}
|
|
281
|
+
*/
|
|
282
|
+
abutsStart(t) {
|
|
283
|
+
return this.isValid ? +this.e == +t.s : !1;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Return whether this Interval's start is adjacent to the specified Interval's end.
|
|
287
|
+
* @param {Interval} other
|
|
288
|
+
* @return {boolean}
|
|
289
|
+
*/
|
|
290
|
+
abutsEnd(t) {
|
|
291
|
+
return this.isValid ? +t.e == +this.s : !1;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
|
|
295
|
+
* @param {Interval} other
|
|
296
|
+
* @return {boolean}
|
|
297
|
+
*/
|
|
298
|
+
engulfs(t) {
|
|
299
|
+
return this.isValid ? this.s <= t.s && this.e >= t.e : !1;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Return whether this Interval has the same start and end as the specified Interval.
|
|
303
|
+
* @param {Interval} other
|
|
304
|
+
* @return {boolean}
|
|
305
|
+
*/
|
|
306
|
+
equals(t) {
|
|
307
|
+
return !this.isValid || !t.isValid ? !1 : this.s.equals(t.s) && this.e.equals(t.e);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Return an Interval representing the intersection of this Interval and the specified Interval.
|
|
311
|
+
* Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
|
|
312
|
+
* Returns null if the intersection is empty, meaning, the intervals don't intersect.
|
|
313
|
+
* @param {Interval} other
|
|
314
|
+
* @return {Interval}
|
|
315
|
+
*/
|
|
316
|
+
intersection(t) {
|
|
317
|
+
if (!this.isValid) return this;
|
|
318
|
+
const i = this.s > t.s ? this.s : t.s, e = this.e < t.e ? this.e : t.e;
|
|
319
|
+
return i >= e ? null : a.fromDateTimes(i, e);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Return an Interval representing the union of this Interval and the specified Interval.
|
|
323
|
+
* Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
|
|
324
|
+
* @param {Interval} other
|
|
325
|
+
* @return {Interval}
|
|
326
|
+
*/
|
|
327
|
+
union(t) {
|
|
328
|
+
if (!this.isValid) return this;
|
|
329
|
+
const i = this.s < t.s ? this.s : t.s, e = this.e > t.e ? this.e : t.e;
|
|
330
|
+
return a.fromDateTimes(i, e);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Merge an array of Intervals into an equivalent minimal set of Intervals.
|
|
334
|
+
* Combines overlapping and adjacent Intervals.
|
|
335
|
+
* The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval
|
|
336
|
+
* and ending with the latest.
|
|
337
|
+
*
|
|
338
|
+
* @param {Array} intervals
|
|
339
|
+
* @return {Array}
|
|
340
|
+
*/
|
|
341
|
+
static merge(t) {
|
|
342
|
+
const [i, e] = t.sort((s, r) => s.s - r.s).reduce(
|
|
343
|
+
([s, r], n) => r ? r.overlaps(n) || r.abutsStart(n) ? [s, r.union(n)] : [s.concat([r]), n] : [s, n],
|
|
344
|
+
[[], null]
|
|
345
|
+
);
|
|
346
|
+
return e && i.push(e), i;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
|
|
350
|
+
* @param {Array} intervals
|
|
351
|
+
* @return {Array}
|
|
352
|
+
*/
|
|
353
|
+
static xor(t) {
|
|
354
|
+
let i = null, e = 0;
|
|
355
|
+
const s = [], r = t.map((l) => [
|
|
356
|
+
{ time: l.s, type: "s" },
|
|
357
|
+
{ time: l.e, type: "e" }
|
|
358
|
+
]), n = Array.prototype.concat(...r), u = n.sort((l, o) => l.time - o.time);
|
|
359
|
+
for (const l of u)
|
|
360
|
+
e += l.type === "s" ? 1 : -1, e === 1 ? i = l.time : (i && +i != +l.time && s.push(a.fromDateTimes(i, l.time)), i = null);
|
|
361
|
+
return a.merge(s);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
|
|
365
|
+
* @param {...Interval} intervals
|
|
366
|
+
* @return {Array}
|
|
367
|
+
*/
|
|
368
|
+
difference(...t) {
|
|
369
|
+
return a.xor([this].concat(t)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty());
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Returns a string representation of this Interval appropriate for debugging.
|
|
373
|
+
* @return {string}
|
|
374
|
+
*/
|
|
375
|
+
toString() {
|
|
376
|
+
return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : d;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Returns a string representation of this Interval appropriate for the REPL.
|
|
380
|
+
* @return {string}
|
|
381
|
+
*/
|
|
382
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
383
|
+
return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Returns a localized string representing this Interval. Accepts the same options as the
|
|
387
|
+
* Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
|
|
388
|
+
* {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
|
|
389
|
+
* is browser-specific, but in general it will return an appropriate representation of the
|
|
390
|
+
* Interval in the assigned locale. Defaults to the system's locale if no locale has been
|
|
391
|
+
* specified.
|
|
392
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
|
|
393
|
+
* @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
|
|
394
|
+
* Intl.DateTimeFormat constructor options.
|
|
395
|
+
* @param {Object} opts - Options to override the configuration of the start DateTime.
|
|
396
|
+
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022
|
|
397
|
+
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022
|
|
398
|
+
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022
|
|
399
|
+
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM
|
|
400
|
+
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p
|
|
401
|
+
* @return {string}
|
|
402
|
+
*/
|
|
403
|
+
toLocaleString(t = D, i = {}) {
|
|
404
|
+
return this.isValid ? O.create(this.s.loc.clone(i), t).formatInterval(this) : d;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Returns an ISO 8601-compliant string representation of this Interval.
|
|
408
|
+
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
409
|
+
* @param {Object} opts - The same options as {@link DateTime#toISO}
|
|
410
|
+
* @return {string}
|
|
411
|
+
*/
|
|
412
|
+
toISO(t) {
|
|
413
|
+
return this.isValid ? `${this.s.toISO(t)}/${this.e.toISO(t)}` : d;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Returns an ISO 8601-compliant string representation of date of this Interval.
|
|
417
|
+
* The time components are ignored.
|
|
418
|
+
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
419
|
+
* @return {string}
|
|
420
|
+
*/
|
|
421
|
+
toISODate() {
|
|
422
|
+
return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : d;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Returns an ISO 8601-compliant string representation of time of this Interval.
|
|
426
|
+
* The date components are ignored.
|
|
427
|
+
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
|
|
428
|
+
* @param {Object} opts - The same options as {@link DateTime#toISO}
|
|
429
|
+
* @return {string}
|
|
430
|
+
*/
|
|
431
|
+
toISOTime(t) {
|
|
432
|
+
return this.isValid ? `${this.s.toISOTime(t)}/${this.e.toISOTime(t)}` : d;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Returns a string representation of this Interval formatted according to the specified format
|
|
436
|
+
* string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
|
|
437
|
+
* formatting tool.
|
|
438
|
+
* @param {string} dateFormat - The format string. This string formats the start and end time.
|
|
439
|
+
* See {@link DateTime#toFormat} for details.
|
|
440
|
+
* @param {Object} opts - Options.
|
|
441
|
+
* @param {string} [opts.separator = ' – '] - A separator to place between the start and end
|
|
442
|
+
* representations.
|
|
443
|
+
* @return {string}
|
|
444
|
+
*/
|
|
445
|
+
toFormat(t, { separator: i = " – " } = {}) {
|
|
446
|
+
return this.isValid ? `${this.s.toFormat(t)}${i}${this.e.toFormat(t)}` : d;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Return a Duration representing the time spanned by this interval.
|
|
450
|
+
* @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
|
|
451
|
+
* @param {Object} opts - options that affect the creation of the Duration
|
|
452
|
+
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
|
|
453
|
+
* @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
|
|
454
|
+
* @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
|
|
455
|
+
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
|
|
456
|
+
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
|
|
457
|
+
* @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
|
|
458
|
+
* @return {Duration}
|
|
459
|
+
*/
|
|
460
|
+
toDuration(t, i) {
|
|
461
|
+
return this.isValid ? this.e.diff(this.s, t, i) : h.invalid(this.invalidReason);
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
|
|
465
|
+
* @param {function} mapFn
|
|
466
|
+
* @return {Interval}
|
|
467
|
+
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
|
|
468
|
+
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
|
|
469
|
+
*/
|
|
470
|
+
mapEndpoints(t) {
|
|
471
|
+
return a.fromDateTimes(t(this.s), t(this.e));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
export {
|
|
475
|
+
a as default
|
|
476
|
+
};
|
|
477
|
+
//# sourceMappingURL=index.es404.js.map
|