mada-design-system 0.2.1 → 0.2.2
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/index.cjs10.js +1 -1
- package/index.cjs100.js +1 -5
- package/index.cjs101.js +1 -1
- package/index.cjs102.js +1 -1
- package/index.cjs103.js +1 -1
- package/index.cjs104.js +1 -1
- package/index.cjs105.js +1 -1
- package/index.cjs106.js +1 -1
- package/index.cjs107.js +1 -1
- package/index.cjs108.js +5 -1
- package/index.cjs109.js +1 -1
- package/index.cjs110.js +1 -1
- package/index.cjs111.js +1 -1
- package/index.cjs112.js +1 -1
- package/index.cjs113.js +1 -4
- package/index.cjs114.js +1 -1
- package/index.cjs115.js +1 -2
- package/index.cjs116.js +1 -1
- package/index.cjs117.js +1 -2
- package/index.cjs118.js +1 -1
- package/index.cjs119.js +1 -1
- package/index.cjs12.js +1 -1
- package/index.cjs120.js +1 -1
- package/index.cjs121.js +1 -1
- package/index.cjs122.js +2 -1
- package/index.cjs123.js +1 -1
- package/index.cjs124.js +2 -1
- package/index.cjs125.js +1 -20
- package/index.cjs126.js +1 -1
- package/index.cjs127.js +1 -1
- package/index.cjs128.js +1 -1
- package/index.cjs129.js +1 -1
- package/index.cjs13.js +1 -1
- package/index.cjs130.js +1 -1
- package/index.cjs131.js +1 -1
- package/index.cjs132.js +20 -1
- package/index.cjs133.js +1 -1
- package/index.cjs134.js +1 -1
- package/index.cjs135.js +1 -1
- package/index.cjs136.js +1 -1
- package/index.cjs137.js +1 -1
- package/index.cjs138.js +1 -1
- package/index.cjs139.js +1 -1
- package/index.cjs140.js +1 -1
- package/index.cjs141.js +1 -1
- package/index.cjs142.js +1 -1
- package/index.cjs143.js +1 -1
- package/index.cjs144.js +1 -1
- package/index.cjs145.js +1 -1
- package/index.cjs146.js +1 -1
- package/index.cjs147.js +1 -1
- package/index.cjs148.js +1 -1
- package/index.cjs149.js +1 -1
- package/index.cjs15.js +1 -1
- package/index.cjs150.js +1 -1
- package/index.cjs151.js +1 -1
- package/index.cjs152.js +1 -1
- package/index.cjs153.js +1 -1
- package/index.cjs154.js +1 -1
- package/index.cjs155.js +1 -1
- package/index.cjs156.js +1 -1
- package/index.cjs157.js +1 -1
- package/index.cjs158.js +1 -1
- package/index.cjs159.js +1 -1
- package/index.cjs160.js +1 -1
- package/index.cjs161.js +1 -1
- package/index.cjs162.js +1 -1
- package/index.cjs163.js +1 -1
- package/index.cjs164.js +1 -1
- package/index.cjs165.js +1 -1
- package/index.cjs166.js +1 -1
- package/index.cjs167.js +1 -1
- package/index.cjs168.js +1 -1
- package/index.cjs169.js +1 -1
- package/index.cjs17.js +1 -1
- package/index.cjs170.js +1 -1
- package/index.cjs171.js +1 -1
- package/index.cjs172.js +1 -1
- package/index.cjs173.js +4 -1
- package/index.cjs174.js +1 -1
- package/index.cjs175.js +1 -1
- package/index.cjs176.js +1 -1
- package/index.cjs177.js +1 -1
- package/index.cjs178.js +1 -1
- package/index.cjs179.js +1 -1
- package/index.cjs180.js +1 -1
- package/index.cjs181.js +1 -1
- package/index.cjs182.js +1 -1
- package/index.cjs183.js +1 -1
- package/index.cjs184.js +1 -4
- package/index.cjs185.js +1 -1
- package/index.cjs186.js +1 -1
- package/index.cjs187.js +1 -1
- package/index.cjs188.js +1 -1
- package/index.cjs189.js +1 -1
- package/index.cjs190.js +1 -3
- package/index.cjs191.js +1 -1
- package/index.cjs192.js +1 -1
- package/index.cjs193.js +1 -1
- package/index.cjs194.js +1 -1
- package/index.cjs195.js +1 -1
- package/index.cjs196.js +1 -1
- package/index.cjs197.js +1 -1
- package/index.cjs198.js +1 -1
- package/index.cjs199.js +1 -1
- package/index.cjs20.js +1 -1
- package/index.cjs200.js +1 -1
- package/index.cjs201.js +1 -1
- package/index.cjs202.js +1 -1
- package/index.cjs203.js +1 -1
- package/index.cjs204.js +1 -1
- package/index.cjs205.js +1 -1
- package/index.cjs206.js +1 -1
- package/index.cjs207.js +1 -1
- package/index.cjs208.js +1 -1
- package/index.cjs209.js +1 -1
- package/index.cjs21.js +1 -1
- package/index.cjs210.js +1 -1
- package/index.cjs211.js +1 -1
- package/index.cjs212.js +1 -1
- package/index.cjs213.js +1 -1
- package/index.cjs214.js +3 -1
- package/index.cjs215.js +1 -1
- package/index.cjs216.js +1 -1
- package/index.cjs217.js +1 -1
- package/index.cjs218.js +1 -1
- package/index.cjs219.js +1 -1
- package/index.cjs22.js +1 -1
- package/index.cjs220.js +1 -1
- package/index.cjs221.js +1 -1
- package/index.cjs222.js +1 -1
- package/index.cjs223.js +1 -1
- package/index.cjs224.js +1 -1
- package/index.cjs225.js +1 -1
- package/index.cjs226.js +1 -1
- package/index.cjs227.js +1 -1
- package/index.cjs228.js +1 -1
- package/index.cjs229.js +1 -1
- package/index.cjs23.js +1 -1
- package/index.cjs230.js +1 -2
- package/index.cjs231.js +1 -1
- package/index.cjs232.js +1 -1
- package/index.cjs233.js +1 -1
- package/index.cjs234.js +1 -1
- package/index.cjs235.js +1 -1
- package/index.cjs236.js +1 -1
- package/index.cjs237.js +1 -1
- package/index.cjs238.js +1 -1
- package/index.cjs239.js +1 -1
- package/index.cjs240.js +1 -1
- package/index.cjs241.js +2 -1
- package/index.cjs242.js +1 -1
- package/index.cjs243.js +1 -1
- package/index.cjs244.js +1 -1
- package/index.cjs245.js +1 -1
- package/index.cjs246.js +1 -2
- package/index.cjs247.js +1 -1
- package/index.cjs248.js +1 -1
- package/index.cjs249.js +1 -1
- package/index.cjs25.js +1 -1
- package/index.cjs250.js +1 -1
- package/index.cjs251.js +1 -1
- package/index.cjs252.js +1 -1
- package/index.cjs253.js +1 -1
- package/index.cjs254.js +1 -1
- package/index.cjs255.js +1 -1
- package/index.cjs256.js +1 -1
- package/index.cjs257.js +2 -1
- package/index.cjs258.js +1 -1
- package/index.cjs259.js +1 -1
- package/index.cjs260.js +1 -1
- package/index.cjs261.js +1 -1
- package/index.cjs262.js +1 -1
- package/index.cjs263.js +1 -1
- package/index.cjs264.js +1 -15
- package/index.cjs265.js +1 -1
- package/index.cjs266.js +1 -1
- package/index.cjs267.js +1 -1
- package/index.cjs268.js +1 -1
- package/index.cjs269.js +15 -1
- package/index.cjs27.js +1 -1
- package/index.cjs270.js +1 -1
- package/index.cjs271.js +1 -1
- package/index.cjs272.js +1 -1
- package/index.cjs273.js +1 -1
- package/index.cjs274.js +1 -1
- package/index.cjs275.js +1 -1
- package/index.cjs276.js +1 -1
- package/index.cjs277.js +1 -1
- package/index.cjs278.js +1 -1
- package/index.cjs279.js +1 -1
- package/index.cjs28.js +1 -1
- package/index.cjs280.js +1 -1
- package/index.cjs281.js +1 -1
- package/index.cjs282.js +1 -1
- package/index.cjs283.js +1 -3
- package/index.cjs284.js +1 -1
- package/index.cjs285.js +1 -1
- package/index.cjs286.js +1 -1
- package/index.cjs287.js +1 -1
- package/index.cjs288.js +1 -1
- package/index.cjs289.js +1 -1
- package/index.cjs29.js +1 -1
- package/index.cjs290.js +1 -1
- package/index.cjs291.js +1 -1
- package/index.cjs292.js +1 -1
- package/index.cjs293.js +1 -1
- package/index.cjs294.js +1 -1
- package/index.cjs295.js +3 -1
- package/index.cjs296.js +1 -1
- package/index.cjs297.js +1 -1
- package/index.cjs298.js +1 -1
- package/index.cjs299.js +1 -1
- package/index.cjs30.js +1 -1
- package/index.cjs300.js +1 -1
- package/index.cjs301.js +1 -1
- package/index.cjs302.js +1 -1
- package/index.cjs303.js +1 -1
- package/index.cjs304.js +1 -1
- package/index.cjs305.js +1 -1
- package/index.cjs306.js +1 -1
- package/index.cjs307.js +1 -1
- package/index.cjs308.js +1 -1
- package/index.cjs309.js +1 -1
- package/index.cjs31.js +1 -1
- package/index.cjs310.js +1 -1
- package/index.cjs311.js +1 -1
- package/index.cjs312.js +1 -1
- package/index.cjs313.js +1 -1
- package/index.cjs314.js +1 -1
- package/index.cjs315.js +1 -1
- package/index.cjs316.js +1 -1
- package/index.cjs317.js +1 -1
- package/index.cjs318.js +1 -1
- package/index.cjs319.js +1 -1
- package/index.cjs32.js +1 -1
- package/index.cjs320.js +1 -1
- package/index.cjs321.js +1 -1
- package/index.cjs322.js +1 -1
- package/index.cjs323.js +1 -1
- package/index.cjs324.js +1 -1
- package/index.cjs325.js +1 -1
- package/index.cjs326.js +1 -1
- package/index.cjs327.js +1 -1
- package/index.cjs328.js +1 -1
- package/index.cjs329.js +1 -1
- package/index.cjs330.js +1 -1
- package/index.cjs331.js +1 -1
- package/index.cjs332.js +1 -1
- package/index.cjs333.js +1 -1
- package/index.cjs334.js +1 -1
- package/index.cjs335.js +1 -1
- package/index.cjs336.js +1 -1
- package/index.cjs337.js +1 -1
- package/index.cjs338.js +1 -1
- package/index.cjs339.js +1 -1
- package/index.cjs340.js +1 -1
- package/index.cjs341.js +1 -1
- package/index.cjs342.js +1 -1
- package/index.cjs343.js +1 -1
- package/index.cjs344.js +1 -1
- package/index.cjs345.js +1 -1
- package/index.cjs346.js +1 -1
- package/index.cjs347.js +1 -1
- package/index.cjs348.js +1 -1
- package/index.cjs349.js +1 -1
- package/index.cjs35.js +1 -1
- package/index.cjs350.js +1 -1
- package/index.cjs351.js +1 -1
- package/index.cjs352.js +1 -1
- package/index.cjs353.js +1 -1
- package/index.cjs354.js +1 -1
- package/index.cjs355.js +1 -1
- package/index.cjs356.js +1 -1
- package/index.cjs357.js +1 -1
- package/index.cjs358.js +1 -1
- package/index.cjs359.js +1 -1
- package/index.cjs36.js +1 -1
- package/index.cjs360.js +1 -1
- package/index.cjs361.js +1 -1
- package/index.cjs362.js +1 -1
- package/index.cjs363.js +1 -1
- package/index.cjs364.js +1 -1
- package/index.cjs365.js +1 -1
- package/index.cjs366.js +1 -1
- package/index.cjs37.js +1 -1
- package/index.cjs370.js +1 -1
- package/index.cjs372.js +1 -1
- package/index.cjs373.js +1 -1
- package/index.cjs374.js +1 -1
- package/index.cjs375.js +1 -1
- package/index.cjs376.js +1 -74
- package/index.cjs377.js +74 -1
- package/index.cjs378.js +1 -1
- package/index.cjs379.js +1 -1
- package/index.cjs38.js +1 -1
- package/index.cjs380.js +1 -1
- package/index.cjs381.js +1 -1
- package/index.cjs382.js +1 -1
- package/index.cjs39.js +1 -1
- package/index.cjs397.js +1 -1
- package/index.cjs398.js +1 -1
- package/index.cjs399.js +1 -1
- package/index.cjs4.js +1 -1
- package/index.cjs40.js +1 -1
- package/index.cjs400.js +1 -1
- package/index.cjs41.js +1 -1
- package/index.cjs43.js +1 -1
- package/index.cjs44.js +1 -1
- package/index.cjs45.js +1 -1
- package/index.cjs46.js +1 -1
- package/index.cjs47.js +1 -1
- package/index.cjs49.js +1 -1
- package/index.cjs50.js +1 -1
- package/index.cjs51.js +1 -1
- package/index.cjs54.js +1 -1
- package/index.cjs56.js +1 -1
- package/index.cjs57.js +1 -1
- package/index.cjs59.js +1 -1
- package/index.cjs60.js +1 -1
- package/index.cjs65.js +1 -1
- package/index.cjs66.js +1 -1
- package/index.cjs67.js +2 -2
- package/index.cjs68.js +1 -1
- package/index.cjs69.js +1 -1
- package/index.cjs7.js +1 -1
- package/index.cjs73.js +1 -1
- package/index.cjs75.js +1 -1
- package/index.cjs76.js +1 -1
- package/index.cjs79.js +1 -1
- package/index.cjs8.js +1 -1
- package/index.cjs80.js +1 -1
- package/index.cjs81.js +1 -1
- package/index.cjs82.js +1 -1
- package/index.cjs83.js +1 -1
- package/index.cjs86.js +1 -1
- package/index.cjs89.js +1 -1
- package/index.cjs9.js +1 -1
- package/index.cjs90.js +1 -1
- package/index.cjs94.js +1 -1
- package/index.cjs95.js +1 -1
- package/index.cjs96.js +4 -1
- package/index.cjs97.js +1 -1
- package/index.cjs98.js +1 -1
- package/index.cjs99.js +1 -1
- package/index.es.d.ts +3 -0
- package/index.es10.js +3 -3
- package/index.es100.js +20 -2594
- package/index.es101.js +133 -316
- package/index.es102.js +6 -11
- package/index.es103.js +5 -5
- package/index.es104.js +87 -10
- package/index.es105.js +24 -8
- package/index.es106.js +1703 -27
- package/index.es107.js +35 -38
- package/index.es108.js +2596 -11
- package/index.es109.js +321 -10
- package/index.es110.js +5 -5
- package/index.es111.js +5 -5
- package/index.es112.js +4 -4
- package/index.es113.js +8 -2569
- package/index.es114.js +35 -143
- package/index.es115.js +37 -116
- package/index.es116.js +11 -137
- package/index.es117.js +11 -223
- package/index.es118.js +11 -516
- package/index.es119.js +11 -310
- package/index.es12.js +3 -3
- package/index.es120.js +4 -4
- package/index.es121.js +142 -12
- package/index.es122.js +117 -11
- package/index.es123.js +137 -11
- package/index.es124.js +223 -11
- package/index.es125.js +513 -202
- package/index.es126.js +310 -11
- package/index.es127.js +10 -4
- package/index.es128.js +5 -5
- package/index.es129.js +4 -4
- package/index.es13.js +2 -2
- package/index.es130.js +4 -4
- package/index.es131.js +5 -5
- package/index.es132.js +205 -11
- package/index.es133.js +5 -5
- package/index.es134.js +4 -10
- package/index.es135.js +10 -1
- package/index.es136.js +11 -2
- package/index.es137.js +11 -2
- package/index.es138.js +11 -2
- package/index.es139.js +11 -2
- package/index.es140.js +11 -2
- package/index.es141.js +5 -5
- package/index.es142.js +2 -11
- package/index.es143.js +2 -11
- package/index.es144.js +2 -11
- package/index.es145.js +2 -3
- package/index.es146.js +2 -11
- package/index.es147.js +2 -11
- package/index.es148.js +5 -5
- package/index.es149.js +5 -5
- package/index.es15.js +5 -5
- package/index.es150.js +5 -5
- package/index.es151.js +11 -22
- package/index.es152.js +5 -5
- package/index.es153.js +11 -22
- package/index.es154.js +5 -5
- package/index.es155.js +5 -5
- package/index.es156.js +11 -12
- package/index.es157.js +22 -11
- package/index.es158.js +5 -5
- package/index.es159.js +5 -5
- package/index.es160.js +5 -5
- package/index.es161.js +12 -11
- package/index.es162.js +4 -4
- package/index.es163.js +5 -5
- package/index.es164.js +10 -470
- package/index.es165.js +10 -138
- package/index.es166.js +11 -6
- package/index.es167.js +11 -2323
- package/index.es168.js +11 -2152
- package/index.es169.js +470 -10
- package/index.es17.js +1 -1
- package/index.es170.js +52 -3
- package/index.es171.js +5 -232
- package/index.es172.js +2 -54
- package/index.es173.js +2241 -430
- package/index.es174.js +14 -6
- package/index.es175.js +8 -31
- package/index.es176.js +3 -14
- package/index.es177.js +3 -35
- package/index.es178.js +2 -18
- package/index.es179.js +2 -35
- package/index.es180.js +56 -1222
- package/index.es181.js +56 -13
- package/index.es182.js +13 -8
- package/index.es183.js +25 -2
- package/index.es184.js +10 -2260
- package/index.es185.js +38 -49
- package/index.es186.js +1998 -9
- package/index.es187.js +6 -12
- package/index.es188.js +72 -13
- package/index.es189.js +23 -104
- package/index.es190.js +233 -25
- package/index.es191.js +53 -50
- package/index.es192.js +2 -371
- package/index.es193.js +7 -61
- package/index.es194.js +2 -48
- package/index.es195.js +31 -6
- package/index.es196.js +12 -5
- package/index.es197.js +95 -44
- package/index.es198.js +26 -22
- package/index.es199.js +39 -6
- package/index.es20.js +1 -1
- package/index.es200.js +450 -10
- package/index.es201.js +2 -11
- package/index.es202.js +43 -15
- package/index.es203.js +51 -229
- package/index.es204.js +17 -24
- package/index.es205.js +34 -11
- package/index.es206.js +1219 -274
- package/index.es207.js +35 -261
- package/index.es208.js +2 -17
- package/index.es209.js +2 -15
- package/index.es21.js +3 -3
- package/index.es210.js +10 -20
- package/index.es211.js +12 -7
- package/index.es212.js +13 -5
- package/index.es213.js +106 -5
- package/index.es214.js +25 -5
- package/index.es215.js +51 -2
- package/index.es216.js +370 -57
- package/index.es217.js +61 -56
- package/index.es218.js +48 -4
- package/index.es219.js +6 -2
- package/index.es22.js +1 -1
- package/index.es220.js +5 -13
- package/index.es221.js +46 -24
- package/index.es222.js +22 -11
- package/index.es223.js +6 -39
- package/index.es224.js +10 -2000
- package/index.es225.js +11 -7
- package/index.es226.js +16 -71
- package/index.es227.js +229 -24
- package/index.es228.js +25 -2
- package/index.es229.js +11 -7
- package/index.es23.js +6 -6
- package/index.es230.js +277 -325
- package/index.es231.js +261 -50
- package/index.es232.js +16 -29
- package/index.es233.js +14 -33
- package/index.es234.js +21 -53
- package/index.es235.js +8 -119
- package/index.es236.js +5 -9
- package/index.es237.js +5 -163
- package/index.es238.js +5 -310
- package/index.es239.js +2 -127
- package/index.es240.js +8 -180
- package/index.es241.js +325 -24
- package/index.es242.js +49 -60
- package/index.es243.js +30 -5
- package/index.es244.js +34 -36
- package/index.es245.js +53 -26
- package/index.es246.js +103 -170
- package/index.es247.js +9 -138
- package/index.es248.js +163 -2
- package/index.es249.js +310 -8
- package/index.es25.js +1 -1
- package/index.es250.js +127 -2
- package/index.es251.js +178 -96
- package/index.es252.js +24 -24
- package/index.es253.js +59 -36
- package/index.es254.js +5 -2
- package/index.es255.js +36 -69
- package/index.es256.js +25 -84
- package/index.es257.js +181 -43
- package/index.es258.js +138 -9
- package/index.es259.js +2 -5
- package/index.es260.js +63 -46
- package/index.es261.js +85 -2
- package/index.es262.js +46 -58
- package/index.es263.js +8 -16
- package/index.es264.js +4 -243
- package/index.es265.js +50 -72
- package/index.es266.js +2 -5
- package/index.es267.js +58 -56
- package/index.es268.js +17 -11
- package/index.es269.js +243 -6
- package/index.es27.js +2 -2
- package/index.es270.js +73 -35
- package/index.es271.js +4 -26
- package/index.es272.js +57 -290
- package/index.es273.js +11 -91
- package/index.es274.js +7 -3
- package/index.es275.js +35 -7
- package/index.es276.js +25 -14
- package/index.es277.js +290 -146
- package/index.es278.js +89 -36
- package/index.es279.js +3 -3
- package/index.es28.js +2 -2
- package/index.es280.js +8 -11
- package/index.es281.js +15 -7
- package/index.es282.js +145 -349
- package/index.es283.js +37 -94
- package/index.es284.js +3 -10
- package/index.es285.js +11 -3
- package/index.es286.js +115 -205
- package/index.es287.js +7 -120
- package/index.es288.js +9 -6
- package/index.es289.js +7 -7
- package/index.es29.js +2 -2
- package/index.es290.js +63 -59
- package/index.es291.js +6 -6
- package/index.es292.js +7 -7
- package/index.es293.js +7 -15
- package/index.es294.js +351 -2
- package/index.es295.js +94 -44
- package/index.es296.js +3 -52
- package/index.es297.js +206 -2
- package/index.es298.js +16 -2
- package/index.es299.js +2 -6
- package/index.es30.js +3 -3
- package/index.es300.js +2 -24
- package/index.es301.js +5 -20
- package/index.es302.js +19 -30
- package/index.es303.js +24 -6
- package/index.es304.js +32 -3
- package/index.es305.js +6 -7
- package/index.es306.js +6 -3
- package/index.es307.js +3 -19
- package/index.es308.js +3 -66
- package/index.es309.js +18 -15
- package/index.es31.js +1 -1
- package/index.es310.js +65 -13
- package/index.es311.js +15 -3
- package/index.es312.js +15 -13
- package/index.es313.js +4 -143
- package/index.es314.js +11 -41
- package/index.es315.js +143 -3
- package/index.es316.js +40 -38
- package/index.es317.js +3 -8
- package/index.es318.js +39 -74
- package/index.es319.js +7 -54
- package/index.es32.js +1 -1
- package/index.es320.js +75 -7
- package/index.es321.js +52 -73
- package/index.es322.js +7 -23
- package/index.es323.js +71 -57
- package/index.es324.js +23 -4
- package/index.es325.js +61 -58
- package/index.es326.js +3 -11
- package/index.es327.js +59 -4
- package/index.es328.js +12 -9
- package/index.es329.js +4 -55
- package/index.es330.js +10 -5
- package/index.es331.js +55 -17
- package/index.es332.js +5 -17
- package/index.es333.js +17 -17
- package/index.es334.js +16 -16
- package/index.es335.js +14 -14
- package/index.es336.js +14 -14
- package/index.es337.js +17 -17
- package/index.es338.js +17 -7
- package/index.es339.js +17 -30
- package/index.es340.js +4 -15
- package/index.es341.js +4 -335
- package/index.es342.js +6 -4
- package/index.es343.js +335 -4
- package/index.es344.js +19 -7
- package/index.es345.js +4 -19
- package/index.es346.js +6 -4
- package/index.es347.js +3 -6
- package/index.es348.js +72 -3
- package/index.es349.js +4 -72
- package/index.es35.js +1 -1
- package/index.es350.js +16 -4
- package/index.es351.js +6 -9
- package/index.es352.js +29 -6
- package/index.es353.js +9 -7
- package/index.es354.js +8 -2
- package/index.es355.js +7 -2
- package/index.es356.js +11 -2
- package/index.es357.js +3 -65
- package/index.es358.js +8 -64
- package/index.es359.js +3 -10
- package/index.es36.js +1 -1
- package/index.es360.js +45 -3
- package/index.es361.js +9 -8
- package/index.es362.js +2 -4
- package/index.es363.js +64 -44
- package/index.es364.js +64 -9
- package/index.es365.js +2 -2
- package/index.es366.js +1 -1
- package/index.es37.js +1 -1
- package/index.es370.js +1 -1
- package/index.es372.js +6 -2
- package/index.es373.js +4 -2
- package/index.es374.js +2 -6
- package/index.es375.js +2 -4
- package/index.es376.js +2 -251
- package/index.es377.js +251 -8
- package/index.es378.js +8 -3
- package/index.es379.js +3 -2
- package/index.es38.js +2 -2
- package/index.es380.js +8 -8
- package/index.es381.js +1 -1
- package/index.es382.js +1 -1
- package/index.es39.js +1 -1
- package/index.es397.js +2 -2
- package/index.es398.js +8 -3
- package/index.es399.js +3 -8
- package/index.es4.js +4 -4
- package/index.es40.js +2 -2
- package/index.es400.js +2 -2
- package/index.es41.js +7 -7
- package/index.es43.js +4 -4
- package/index.es44.js +4 -4
- package/index.es45.js +10 -10
- package/index.es46.js +2 -2
- package/index.es47.js +10 -10
- package/index.es49.js +1 -1
- package/index.es50.js +2 -2
- package/index.es51.js +3 -3
- package/index.es54.js +2 -2
- package/index.es56.js +2 -2
- package/index.es57.js +5 -5
- package/index.es59.js +7 -7
- package/index.es60.js +3 -3
- package/index.es65.js +1 -1
- package/index.es66.js +1 -1
- package/index.es67.js +8 -8
- package/index.es68.js +4 -4
- package/index.es69.js +1 -1
- package/index.es7.js +1 -1
- package/index.es73.js +2 -2
- package/index.es75.js +1 -1
- package/index.es76.js +25 -20
- package/index.es79.js +5 -5
- package/index.es8.js +1 -1
- package/index.es80.js +1 -1
- package/index.es81.js +1 -1
- package/index.es82.js +2 -2
- package/index.es83.js +1 -1
- package/index.es86.js +1 -1
- package/index.es89.js +10 -9
- package/index.es9.js +6 -6
- package/index.es90.js +2 -2
- package/index.es94.js +2323 -11
- package/index.es95.js +19 -86
- package/index.es96.js +2566 -18
- package/index.es97.js +2151 -23
- package/index.es98.js +3 -1709
- package/index.es99.js +11 -35
- package/package.json +144 -144
package/index.cjs60.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("@radix-ui/react-slot"),Z=require("./index.cjs99.js"),$=require("react"),ee=require("./index.cjs156.js"),s=require("./index.cjs79.js"),ae=require("./index.cjs22.js"),te=require("./index.cjs35.js"),re=require("./index.cjs58.js"),j=require("./index.cjs59.js"),M=require("./index.cjs61.js"),y=require("./index.cjs71.js"),ie=require("./index.cjs157.js");function ne(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const i=ne($),se="sidebar:state",oe=60*60*24*7,de="88px",le="320px",ce="3rem",ue="b",_=i.createContext(null);function h(){const a=i.useContext(_);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}const R=i.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:n,style:o,children:d,...u},g)=>{const c=ee.useIsMobile(),[f,b]=i.useState(!1),[v,J]=i.useState(a),m=e??v,S=i.useCallback(l=>{const p=typeof l=="function"?l(m):l;t?t(p):J(p),document.cookie=`${se}=${p}; path=/; max-age=${oe}`},[t,m]),w=i.useCallback(()=>c?b(l=>!l):S(l=>!l),[c,S,b]);i.useEffect(()=>{const l=p=>{p.key===ue&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),w())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[w]);const N=m?"expanded":"collapsed",Q=i.useMemo(()=>({state:N,open:m,setOpen:S,isMobile:c,openMobile:f,setOpenMobile:b,toggleSidebar:w}),[N,m,S,c,f,b,w]);return r.jsx(_.Provider,{value:Q,children:r.jsx(y.TooltipProvider,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":de,"--sidebar-width-icon":ce,...o},className:s.cn("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full",n),ref:g,...u,children:d})})})});R.displayName="SidebarProvider";const I=i.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:n,children:o,...d},u)=>{const{isMobile:g,state:c,openMobile:f,setOpenMobile:b}=h();return t==="none"?r.jsx("div",{className:s.cn("bg-sidebar flex h-full w-[--sidebar-width] flex-col text-foreground-secondary",n),ref:u,...d,children:o}):g?r.jsx(j.Sheet,{open:f,onOpenChange:b,...d,children:r.jsx(j.SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-foreground-secondary [&>button]:hidden",style:{"--sidebar-width":le},side:a,children:r.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):r.jsxs("div",{ref:u,className:"group peer hidden text-foreground-secondary md:block","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r.jsx("div",{className:s.cn("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:s.cn("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] pt-[72px] transition-[left,right,width] duration-200 ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]",n),...d,children:r.jsx("div",{"data-sidebar":"sidebar",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow",children:o})})]})});I.displayName="Sidebar";const k=i.forwardRef(({className:a,onClick:e,...t},n)=>{const{toggleSidebar:o}=h();return r.jsxs(ae.Button,{ref:n,"data-sidebar":"trigger",variant:"text",colors:"neutral",size:"icon",className:s.cn("h-7 w-7",a),onClick:d=>{e==null||e(d),o()},...t,children:[r.jsx(ie.default,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});k.displayName="SidebarTrigger";const C=i.forwardRef(({className:a,...e},t)=>{const{toggleSidebar:n}=h();return r.jsx("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:s.cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});C.displayName="SidebarRail";const z=i.forwardRef(({className:a,...e},t)=>r.jsx("main",{ref:t,className:s.cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));z.displayName="SidebarInset";const B=i.forwardRef(({className:a,...e},t)=>r.jsx(te.Input,{ref:t,"data-sidebar":"input",className:s.cn("focus-visible:ring-sidebar-ring h-8 w-full bg-background shadow-none focus-visible:ring-2",a),...e}));B.displayName="SidebarInput";const O=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"header",className:s.cn("flex flex-col gap-2",a),...e}));O.displayName="SidebarHeader";const T=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"footer",className:s.cn("flex flex-col gap-space-02 pb-space-03",a),...e}));T.displayName="SidebarFooter";const A=i.forwardRef(({className:a,...e},t)=>r.jsx(re.Separator,{ref:t,"data-sidebar":"separator",className:s.cn("bg-sidebar-border mx-2 w-auto",a),...e}));A.displayName="SidebarSeparator";const E=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"content",className:s.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto py-space-03 group-data-[collapsible=icon]:overflow-hidden",a),...e}));E.displayName="SidebarContent";const q=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"group",className:s.cn("relative flex w-full min-w-0 flex-col px-space-03 xl:px-space-01",a),...e}));q.displayName="SidebarGroup";const D=i.forwardRef(({className:a,asChild:e=!1,...t},n)=>{const o=e?x.Slot:"div";return r.jsx(o,{ref:n,"data-sidebar":"group-label",className:s.cn("text-foreground-secondary/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t})});D.displayName="SidebarGroupLabel";const G=i.forwardRef(({className:a,asChild:e=!1,...t},n)=>{const o=e?x.Slot:"button";return r.jsx(o,{ref:n,"data-sidebar":"group-action",className:s.cn("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground-secondary outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t})});G.displayName="SidebarGroupAction";const H=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"group-content",className:s.cn("w-full text-sm",a),...e}));H.displayName="SidebarGroupContent";const P=i.forwardRef(({className:a,...e},t)=>r.jsx("ul",{ref:t,"data-sidebar":"menu",className:s.cn("flex w-full min-w-0 flex-col gap-space-02",a),...e}));P.displayName="SidebarMenu";const K=i.forwardRef(({className:a,...e},t)=>r.jsx("li",{ref:t,"data-sidebar":"menu-item",className:s.cn("group/menu-item relative flex items-center gap-space-02 text-body-01 xl:flex-col xl:gap-space-01 xl:text-caption-02",a),...e}));K.displayName="SidebarMenuItem";const be=Z.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),L=i.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:n="default",tooltip:o,className:d,...u},g)=>{const c=a?x.Slot:"button",{isMobile:f,state:b}=h(),v=r.jsx(c,{ref:g,"data-sidebar":"menu-button","data-size":n,"data-active":e,className:s.cn(be({variant:t,size:n}),d),...u});return o?(typeof o=="string"&&(o={children:o}),r.jsxs(y.Tooltip,{children:[r.jsx(y.TooltipTrigger,{asChild:!0,children:v}),r.jsx(y.TooltipContent,{side:"right",align:"center",hidden:b!=="collapsed"||f,...o})]})):v});L.displayName="SidebarMenuButton";const F=i.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...n},o)=>{const d=e?x.Slot:"button";return r.jsx(d,{ref:o,"data-sidebar":"menu-action",className:s.cn("ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground-secondary outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",a),...n})});F.displayName="SidebarMenuAction";const V=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"menu-badge",className:s.cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-foreground-secondary","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));V.displayName="SidebarMenuBadge";const W=i.forwardRef(({className:a,showIcon:e=!1,...t},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:s.cn("flex h-8 items-center gap-2 rounded-md px-2",a),...t,children:[e&&r.jsx(M.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(M.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});W.displayName="SidebarMenuSkeleton";const U=i.forwardRef(({className:a,...e},t)=>r.jsx("ul",{ref:t,"data-sidebar":"menu-sub",className:s.cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));U.displayName="SidebarMenuSub";const X=i.forwardRef(({...a},e)=>r.jsx("li",{ref:e,...a}));X.displayName="SidebarMenuSubItem";const Y=i.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:n,...o},d)=>{const u=a?x.Slot:"a";return r.jsx(u,{ref:d,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:s.cn("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-foreground-secondary outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});Y.displayName="SidebarMenuSubButton";exports.Sidebar=I;exports.SidebarContent=E;exports.SidebarFooter=T;exports.SidebarGroup=q;exports.SidebarGroupAction=G;exports.SidebarGroupContent=H;exports.SidebarGroupLabel=D;exports.SidebarHeader=O;exports.SidebarInput=B;exports.SidebarInset=z;exports.SidebarMenu=P;exports.SidebarMenuAction=F;exports.SidebarMenuBadge=V;exports.SidebarMenuButton=L;exports.SidebarMenuItem=K;exports.SidebarMenuSkeleton=W;exports.SidebarMenuSub=U;exports.SidebarMenuSubButton=Y;exports.SidebarMenuSubItem=X;exports.SidebarProvider=R;exports.SidebarRail=C;exports.SidebarSeparator=A;exports.SidebarTrigger=k;exports.useSidebar=h;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("@radix-ui/react-slot"),Z=require("./index.cjs107.js"),$=require("react"),ee=require("./index.cjs161.js"),s=require("./index.cjs79.js"),ae=require("./index.cjs22.js"),te=require("./index.cjs35.js"),re=require("./index.cjs58.js"),j=require("./index.cjs59.js"),M=require("./index.cjs61.js"),y=require("./index.cjs71.js"),ie=require("./index.cjs162.js");function ne(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const i=ne($),se="sidebar:state",oe=60*60*24*7,de="88px",le="320px",ce="3rem",ue="b",_=i.createContext(null);function h(){const a=i.useContext(_);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}const R=i.forwardRef(({defaultOpen:a=!0,open:e,onOpenChange:t,className:n,style:o,children:d,...u},g)=>{const c=ee.useIsMobile(),[f,b]=i.useState(!1),[v,J]=i.useState(a),m=e??v,S=i.useCallback(l=>{const p=typeof l=="function"?l(m):l;t?t(p):J(p),document.cookie=`${se}=${p}; path=/; max-age=${oe}`},[t,m]),w=i.useCallback(()=>c?b(l=>!l):S(l=>!l),[c,S,b]);i.useEffect(()=>{const l=p=>{p.key===ue&&(p.metaKey||p.ctrlKey)&&(p.preventDefault(),w())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[w]);const N=m?"expanded":"collapsed",Q=i.useMemo(()=>({state:N,open:m,setOpen:S,isMobile:c,openMobile:f,setOpenMobile:b,toggleSidebar:w}),[N,m,S,c,f,b,w]);return r.jsx(_.Provider,{value:Q,children:r.jsx(y.TooltipProvider,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":de,"--sidebar-width-icon":ce,...o},className:s.cn("group/sidebar-wrapper has-[[data-variant=inset]]:bg-sidebar flex min-h-svh w-full",n),ref:g,...u,children:d})})})});R.displayName="SidebarProvider";const I=i.forwardRef(({side:a="left",variant:e="sidebar",collapsible:t="offcanvas",className:n,children:o,...d},u)=>{const{isMobile:g,state:c,openMobile:f,setOpenMobile:b}=h();return t==="none"?r.jsx("div",{className:s.cn("bg-sidebar flex h-full w-[--sidebar-width] flex-col text-foreground-secondary",n),ref:u,...d,children:o}):g?r.jsx(j.Sheet,{open:f,onOpenChange:b,...d,children:r.jsx(j.SheetContent,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-foreground-secondary [&>button]:hidden",style:{"--sidebar-width":le},side:a,children:r.jsx("div",{className:"flex h-full w-full flex-col",children:o})})}):r.jsxs("div",{ref:u,className:"group peer hidden text-foreground-secondary md:block","data-state":c,"data-collapsible":c==="collapsed"?t:"","data-variant":e,"data-side":a,children:[r.jsx("div",{className:s.cn("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:s.cn("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] pt-[72px] transition-[left,right,width] duration-200 ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]",n),...d,children:r.jsx("div",{"data-sidebar":"sidebar",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow",children:o})})]})});I.displayName="Sidebar";const k=i.forwardRef(({className:a,onClick:e,...t},n)=>{const{toggleSidebar:o}=h();return r.jsxs(ae.Button,{ref:n,"data-sidebar":"trigger",variant:"text",colors:"neutral",size:"icon",className:s.cn("h-7 w-7",a),onClick:d=>{e==null||e(d),o()},...t,children:[r.jsx(ie.default,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});k.displayName="SidebarTrigger";const C=i.forwardRef(({className:a,...e},t)=>{const{toggleSidebar:n}=h();return r.jsx("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:s.cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:hover:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})});C.displayName="SidebarRail";const z=i.forwardRef(({className:a,...e},t)=>r.jsx("main",{ref:t,className:s.cn("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...e}));z.displayName="SidebarInset";const B=i.forwardRef(({className:a,...e},t)=>r.jsx(te.Input,{ref:t,"data-sidebar":"input",className:s.cn("focus-visible:ring-sidebar-ring h-8 w-full bg-background shadow-none focus-visible:ring-2",a),...e}));B.displayName="SidebarInput";const O=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"header",className:s.cn("flex flex-col gap-2",a),...e}));O.displayName="SidebarHeader";const T=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"footer",className:s.cn("flex flex-col gap-space-02 pb-space-03",a),...e}));T.displayName="SidebarFooter";const A=i.forwardRef(({className:a,...e},t)=>r.jsx(re.Separator,{ref:t,"data-sidebar":"separator",className:s.cn("bg-sidebar-border mx-2 w-auto",a),...e}));A.displayName="SidebarSeparator";const E=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"content",className:s.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto py-space-03 group-data-[collapsible=icon]:overflow-hidden",a),...e}));E.displayName="SidebarContent";const q=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"group",className:s.cn("relative flex w-full min-w-0 flex-col px-space-03 xl:px-space-01",a),...e}));q.displayName="SidebarGroup";const D=i.forwardRef(({className:a,asChild:e=!1,...t},n)=>{const o=e?x.Slot:"div";return r.jsx(o,{ref:n,"data-sidebar":"group-label",className:s.cn("text-foreground-secondary/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...t})});D.displayName="SidebarGroupLabel";const G=i.forwardRef(({className:a,asChild:e=!1,...t},n)=>{const o=e?x.Slot:"button";return r.jsx(o,{ref:n,"data-sidebar":"group-action",className:s.cn("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground-secondary outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...t})});G.displayName="SidebarGroupAction";const H=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"group-content",className:s.cn("w-full text-sm",a),...e}));H.displayName="SidebarGroupContent";const P=i.forwardRef(({className:a,...e},t)=>r.jsx("ul",{ref:t,"data-sidebar":"menu",className:s.cn("flex w-full min-w-0 flex-col gap-space-02",a),...e}));P.displayName="SidebarMenu";const K=i.forwardRef(({className:a,...e},t)=>r.jsx("li",{ref:t,"data-sidebar":"menu-item",className:s.cn("group/menu-item relative flex items-center gap-space-02 text-body-01 xl:flex-col xl:gap-space-01 xl:text-caption-02",a),...e}));K.displayName="SidebarMenuItem";const be=Z.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),L=i.forwardRef(({asChild:a=!1,isActive:e=!1,variant:t="default",size:n="default",tooltip:o,className:d,...u},g)=>{const c=a?x.Slot:"button",{isMobile:f,state:b}=h(),v=r.jsx(c,{ref:g,"data-sidebar":"menu-button","data-size":n,"data-active":e,className:s.cn(be({variant:t,size:n}),d),...u});return o?(typeof o=="string"&&(o={children:o}),r.jsxs(y.Tooltip,{children:[r.jsx(y.TooltipTrigger,{asChild:!0,children:v}),r.jsx(y.TooltipContent,{side:"right",align:"center",hidden:b!=="collapsed"||f,...o})]})):v});L.displayName="SidebarMenuButton";const F=i.forwardRef(({className:a,asChild:e=!1,showOnHover:t=!1,...n},o)=>{const d=e?x.Slot:"button";return r.jsx(d,{ref:o,"data-sidebar":"menu-action",className:s.cn("ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground-secondary outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",a),...n})});F.displayName="SidebarMenuAction";const V=i.forwardRef(({className:a,...e},t)=>r.jsx("div",{ref:t,"data-sidebar":"menu-badge",className:s.cn("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-foreground-secondary","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e}));V.displayName="SidebarMenuBadge";const W=i.forwardRef(({className:a,showIcon:e=!1,...t},n)=>{const o=i.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:s.cn("flex h-8 items-center gap-2 rounded-md px-2",a),...t,children:[e&&r.jsx(M.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(M.Skeleton,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});W.displayName="SidebarMenuSkeleton";const U=i.forwardRef(({className:a,...e},t)=>r.jsx("ul",{ref:t,"data-sidebar":"menu-sub",className:s.cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e}));U.displayName="SidebarMenuSub";const X=i.forwardRef(({...a},e)=>r.jsx("li",{ref:e,...a}));X.displayName="SidebarMenuSubItem";const Y=i.forwardRef(({asChild:a=!1,size:e="md",isActive:t,className:n,...o},d)=>{const u=a?x.Slot:"a";return r.jsx(u,{ref:d,"data-sidebar":"menu-sub-button","data-size":e,"data-active":t,className:s.cn("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-foreground-secondary outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...o})});Y.displayName="SidebarMenuSubButton";exports.Sidebar=I;exports.SidebarContent=E;exports.SidebarFooter=T;exports.SidebarGroup=q;exports.SidebarGroupAction=G;exports.SidebarGroupContent=H;exports.SidebarGroupLabel=D;exports.SidebarHeader=O;exports.SidebarInput=B;exports.SidebarInset=z;exports.SidebarMenu=P;exports.SidebarMenuAction=F;exports.SidebarMenuBadge=V;exports.SidebarMenuButton=L;exports.SidebarMenuItem=K;exports.SidebarMenuSkeleton=W;exports.SidebarMenuSub=U;exports.SidebarMenuSubButton=Y;exports.SidebarMenuSubItem=X;exports.SidebarProvider=R;exports.SidebarRail=C;exports.SidebarSeparator=A;exports.SidebarTrigger=k;exports.useSidebar=h;
|
package/index.cjs65.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),x=require("@radix-ui/react-tabs"),y=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),x=require("@radix-ui/react-tabs"),y=require("./index.cjs107.js"),h=require("react"),l=require("./index.cjs79.js"),N=require("./index.cjs46.js");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const s=c(x),n=c(h),o=y.cva("relative inline-flex shrink-0 items-center justify-start transition-all disabled:pointer-events-none data-[state=active]:font-semibold",{variants:{container:{filled:" gap-space-01 rounded-full bg-background-muted p-space-01",underline:"",transparent:" gap-space-01 rounded-full"},variant:{filled:"after:hidden hover:bg-button-background-neutral-hovered data-[state=inactive]:text-text-paragraph-primary rounded-full data-[state=active]:bg-button-background-primary text-text-oncolor-primary data-[state=active]:shadow-sm hover:data-[state=active]:bg-button-background-primary-hovered disabled:data-[state=active]:bg-disabled-background-disabled disabled:text-disabled-text-default-disabled",underline:"relative data-[state=inactive]:text-text-paragraph-primary after:z-[1] hover:data-[state=inactive]:bg-button-background-neutral-hovered hover:text-text-default after:absolute after:block after:bottom-[1px] after:rounded-full after:start-1/2 after:-translate-x-1/2 rtl:after:translate-x-1/2 after:h-[3px] hover:after:bg-border-black hover:data-[state=active]:after:bg-border-primary-default data-[state=active]:after:bg-border-primary-default disabled:data-[state=active]:after:bg-border-disabled disabled:text-disabled-text-default-disabled",transparent:"hover:bg-card-hover hover:data-[state=inactive]:text-card-foreground rounded-full py-space-02 px-space-04 focus-visible:outline-none data-[state=active]:bg-background data-[state=active]:text-card-foreground data-[state=active]:shadow-sm hover:data-[state=active]:bg-background data-[state=active]:disabled:bg-disabled"},size:{default:"text-body-02 after:w-[calc(100%_-_32px)] [&>svg]:size-space-04 gap-space-01",sm:"text-body-01 after:w-[calc(100%_-_24px)] [&>svg]:size-space-04 gap-space-01"},disabled:{false:null,true:null},underline:{false:null,true:null},orientation:{vertical:"flex-col items-start",horizontal:"flex-row"}},compoundVariants:[{variant:"filled",size:"sm",className:"px-space-03 py-space-01"},{variant:"underline",size:"default",className:"px-space-04 py-space-03"},{variant:"underline",size:"sm",className:"px-space-03 py-space-02"},{variant:"filled",size:"default",className:"px-space-04 py-space-02"},{container:"underline",underline:!0,className:"justify-start w-full after:absolute after:bottom-0 after:start-0 after:z-0 after:h-[3px] after:w-full after:rounded-full after:bg-border-neutral-primary"},{container:"underline",underline:!0,orientation:"vertical",className:"after:absolute after:start-0 after:top-0 after:z-0 after:w-[3px] after:h-full after:rounded-full after:bg-border-neutral-primary"},{container:"filled",orientation:"vertical",className:"bg-transparent"},{variant:"underline",orientation:"vertical",className:"after:start-[2px] after:top-1/2 after:-translate-y-1/2 after:w-[3px] after:bottom-0"},{variant:"underline",orientation:"vertical",size:"default",className:"after:h-[calc(100%_-_24px)] py-space-03"},{variant:"underline",orientation:"vertical",size:"sm",className:"after:h-[calc(100%_-_16px)] py-space-02"}]}),z=s.Root,u=n.createContext({variant:"filled",size:"default",orientation:"horizontal"}),f=n.forwardRef(({className:e,underline:t,orientation:a,variant:r="filled",size:d="default",children:v,...g},m)=>i.jsx(N.ResponsiveScroll,{className:"py-2",buttonClassName:"bg-background",margin:16,children:i.jsx(s.List,{ref:m,className:l.cn(o({container:r,underline:t,size:d,orientation:a}),e),...g,children:i.jsx(u.Provider,{value:{variant:r,size:d,orientation:a},children:v})})}));f.displayName=s.List.displayName;const b=n.forwardRef(({className:e,...t},a)=>{const r=n.useContext(u);return i.jsx(s.Trigger,{ref:a,className:l.cn(o({variant:r.variant,orientation:r.orientation,size:r.size}),e),...t})});b.displayName=s.Trigger.displayName;const p=n.forwardRef(({className:e,...t},a)=>i.jsx(s.Content,{ref:a,className:l.cn("mt-2 ring-offset-background data-[state=inactive]:hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));p.displayName=s.Content.displayName;exports.Tabs=z;exports.TabsContent=p;exports.TabsList=f;exports.TabsTrigger=b;exports.tabVariants=o;
|
package/index.cjs66.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),b=require("./index.cjs107.js"),m=require("react"),x=require("./index.cjs79.js"),h=require("./index.cjs14.js");require("./index.cjs33.js");const v=require("./index.cjs34.js");function g(a){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(d,t,l.get?l:{enumerable:!0,get:()=>a[t]})}}return d.default=a,Object.freeze(d)}const w=g(m),j=b.cva(`flex relative overflow-hidden min-h-[10rem] w-full ps-space-04 text-body-02 overflow-hidden text-form-field-text-filled
|
|
2
2
|
aria-[disabled=true]:cursor-not-allowed aria-[disabled=true]:text-disabled-text-default-disabled
|
|
3
3
|
aria-[invalid=true]:border-form-field-border-error focus-within:aria-[invalid=true]:after:bg-form-field-border-error focus-within:shadow-md
|
|
4
4
|
after:absolute after:bottom-0 after:w-0 after:h-[2px] ltr:after:-translate-x-1/2 rtl:after:translate-x-1/2 after:start-1/2 after:bg-form-field-border-pressed after:ease-in-out after:transition-all focus-within:after:w-full
|
package/index.cjs67.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("@radix-ui/react-toast"),x=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("@radix-ui/react-toast"),x=require("./index.cjs107.js"),v=require("react"),n=require("./index.cjs79.js"),w=require("./index.cjs22.js"),y=require("./index.cjs110.js"),T=require("./index.cjs163.js");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=c(m),r=c(v),N=a.Provider,l=r.forwardRef(({className:e,...t},o)=>s.jsx(a.Viewport,{ref:o,className:n.cn("fixed bottom-space-05 z-[10000000000000] flex max-h-screen w-full flex-col p-4 sm:bottom-10 sm:top-auto lg:max-w-[500px] ltr:sm:right-1/2 ltr:sm:translate-x-1/2 rtl:sm:left-1/2 rtl:sm:-translate-x-1/2",e),...t}));l.displayName=a.Viewport.displayName;const h=x.cva(`group pointer-events-auto gap-space-03 relative bg-background-notification-white flex sm:flex-row w-full items-center space-x-4 overflow-hidden
|
|
2
2
|
rounded-1 border border-border-primary px-space-05 py-space-04 shadow-3xl transition-all data-[swipe=cancel]:translate-y-0 data-[swipe=end]:translate-y-[var(--radix-toast-swipe-end-x)]
|
|
3
3
|
data-[swipe=move]:translate-y-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
4
4
|
data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-bottom-full data-[state=open]:slide-in-from-bottom-full
|
|
5
|
-
before:w-space-02 before:top-0 before:bottom-0 before:absolute before:start-0 before:opacity-70`,{variants:{variant:{default:"before:bg-background-neutral-100",destructive:"destructive group before:bg-background-error",success:"success group before:bg-background-success",info:"info group before:bg-background-info",warning:"warning group before:bg-background-warning"}},defaultVariants:{variant:"default"}}),d=r.forwardRef(({className:e,variant:t,...o},i)=>s.jsx(a.Root,{ref:i,className:n.cn(
|
|
5
|
+
before:w-space-02 before:top-0 before:bottom-0 before:absolute before:start-0 before:opacity-70`,{variants:{variant:{default:"before:bg-background-neutral-100",destructive:"destructive group before:bg-background-error",success:"success group before:bg-background-success",info:"info group before:bg-background-info",warning:"warning group before:bg-background-warning"}},defaultVariants:{variant:"default"}}),d=r.forwardRef(({className:e,variant:t,...o},i)=>s.jsx(a.Root,{ref:i,className:n.cn(h({variant:t}),e),...o}));d.displayName=a.Root.displayName;const u=r.forwardRef(({className:e,...t},o)=>s.jsx(a.Action,{ref:o,className:n.cn("inline-flex h-[32px] items-center justify-center gap-space-01 rounded border-none bg-transparent px-space-03 py-[6px] text-body-01 font-medium text-text-default transition-colors hover:bg-button-background-neutral-hovered focus:bg-transparent focus:outline focus:outline-2 focus:outline-offset-1 focus:outline-border-black active:bg-button-background-neutral-pressed disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-disabled-text-default-disabled [&>svg]:size-[20px]",e),...t}));u.displayName=a.Action.displayName;const p=r.forwardRef(({...e},t)=>s.jsx(a.Close,{ref:t,asChild:!0,"toast-close":"",...e,children:s.jsx(w.Button,{variant:"text",colors:"neutral",size:"icon-sm",rounded:"default",children:s.jsx(y.default,{})})}));p.displayName=a.Close.displayName;const f=r.forwardRef(({className:e,...t},o)=>s.jsx(a.Title,{ref:o,className:n.cn("text-body-02 font-semibold text-text-display",e),...t}));f.displayName=a.Title.displayName;const b=r.forwardRef(({className:e,...t},o)=>s.jsx(a.Description,{ref:o,className:n.cn("content-center text-body-01 text-text-paragraph-primary",e),...t}));b.displayName=a.Description.displayName;const g=({icon:e})=>s.jsx("div",{className:`flex size-space-07 items-center justify-center rounded-full bg-background-neutral-50 p-[10px]
|
|
6
6
|
group-[.destructive]:bg-icon-background-error-light group-[.info]:bg-icon-background-info-light
|
|
7
7
|
group-[.success]:bg-icon-background-success-light group-[.warning]:bg-icon-background-warning-light
|
|
8
8
|
[&>svg]:size-[20px] [&>svg]:shrink-0
|
package/index.cjs68.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index.cjs67.js"),u=require("./index.cjs72.js"),d=require("./index.cjs80.js"),x=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index.cjs67.js"),u=require("./index.cjs72.js"),d=require("./index.cjs80.js"),x=require("./index.cjs164.js"),j=require("./index.cjs165.js"),o=require("./index.cjs163.js"),f=require("./index.cjs166.js"),T={destructive:e.jsx(x.default,{}),success:e.jsx(j.default,{}),default:e.jsx(o.default,{}),info:e.jsx(o.default,{}),warning:e.jsx(f.default,{})};function g(){const{toasts:n}=u.useToast(),l=d.default(t=>t.isActive);return e.jsxs(s.ToastProvider,{children:[n.map(function({id:t,title:r,description:c,action:i,...a}){return e.jsx(s.Toast,{...a,className:`${l?"grayscale":"grayscale-0"}`,children:e.jsxs("div",{className:"flex grow flex-col justify-between gap-space-04",children:[e.jsxs("div",{className:"flex w-full gap-space-03",children:[e.jsx(s.ToastIcon,{icon:a.variant&&T[a.variant]}),e.jsxs("div",{className:"grid flex-1 gap-space-01",children:[r&&e.jsx(s.ToastTitle,{children:r}),c&&e.jsx(s.ToastDescription,{children:c})]}),e.jsx(s.ToastClose,{})]}),i&&e.jsx("div",{className:"mx-space-07",children:i})]})},t)}),e.jsx(s.ToastViewport,{})]})}exports.Toaster=g;
|
package/index.cjs69.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),b=require("@radix-ui/react-toggle"),u=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),b=require("@radix-ui/react-toggle"),u=require("./index.cjs107.js"),l=require("react"),p=require("./index.cjs79.js");function r(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const n=r(b),g=r(l),d=u.cva(`group inline-flex items-center justify-center gap-space-01 transition-colors text-text-default data-[state=on]:font-semibold
|
|
2
2
|
disabled:text-disabled-text-default-disabled disabled:pointer-events-none disabled:cursor-not-allowed focus:outline focus:outline-2 focus:outline-offset-1 focus:outline-black
|
|
3
3
|
`,{variants:{variant:{default:"",outline:"border border-border-neutral-primary disabled:border-disabled disabled:data-[state=on]:bg-disabled-background-disabled disabled:data-[state=on]:border-none"},size:{default:"px-space-04 py-space-02 h-[40px] text-body-02 font-medium [&>svg]:size-space-05",sm:"px-space-03 py-space-01 h-[32px] text-body-01 [&>svg]:size-[20px]",xs:"px-space-03 py-space-01 h-[24px] text-caption-01 [&>svg]:size-space-04",icon:"p-space-02 size-[40px] [&>svg]:size-space-05","icon-sm":"p-space-02 size-[32px] [&>svg]:size-[20px]","icon-xs":"p-space-01 size-[24px] [&>svg]:size-space-04",fit:""},rounded:{default:"rounded",full:"rounded-full"},colors:{default:`hover:bg-button-background-primary-light-hovered
|
|
4
4
|
hover:border-button-background-primary-light-hovered
|
package/index.cjs7.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("./index.cjs79.js"),P=require("./index.cjs83.js"),C=require("./index.cjs27.js"),T=require("./index.cjs33.js"),j=require("./index.cjs52.js"),G=require("./index.cjs55.js"),h=require("react"),w=require("./index.cjs91.js"),O=require("./index.cjs3.js"),A=require("./index.cjs14.js"),E=require("./index.cjs57.js"),k=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("./index.cjs79.js"),P=require("./index.cjs83.js"),C=require("./index.cjs27.js"),T=require("./index.cjs33.js"),j=require("./index.cjs52.js"),G=require("./index.cjs55.js"),h=require("react"),w=require("./index.cjs91.js"),O=require("./index.cjs3.js"),A=require("./index.cjs14.js"),E=require("./index.cjs57.js"),k=require("./index.cjs103.js"),q=j.Popover,R=C.CommandInput,I=C.CommandEmpty,y=C.CommandItem,v=h.forwardRef(({className:e,children:a,...n},d)=>r.jsx(j.PopoverContent,{className:"min-w-[var(--radix-popover-trigger-width)] p-space-02",ref:d,...n,children:r.jsx(C.Command,{children:a})}));v.displayName="ComboboxContent";const S=h.forwardRef(({className:e,children:a,variant:n,colors:d,size:l,rounded:m,placeholder:s,isLoading:b,isForm:o=!0,...i},u)=>{const g={ref:u,role:"combobox","aria-expanded":!1,"aria-label":s||"Select an option",title:s||"Select an option",disabled:b,className:f.cn(E.selectVariants({variant:n,colors:d,size:l,rounded:m}),e),...i},x=r.jsxs(r.Fragment,{children:[s&&!a&&r.jsx("span",{className:"pointer-events-none text-body-01 text-form-field-text-placeholder",children:s}),a&&r.jsx("span",{className:"flex-1 truncate text-ellipsis text-right",children:a}),b?r.jsx(O.default,{}):r.jsx(k.default,{className:"size-[20px] shrink-0 transition-transform duration-300 ease-in-out group-data-[state=open]:rotate-180","aria-hidden":!0})]});return o?r.jsx(j.PopoverTrigger,{asChild:!0,children:r.jsx(T.FormControl,{children:r.jsx("button",{...g,children:x})})}):r.jsx(j.PopoverTrigger,{asChild:!0,children:r.jsx("button",{...g,children:x})})});S.displayName="ComboboxTrigger";const N=h.forwardRef(({className:e,children:a,...n},d)=>{const{dir:l}=P.default(),m=h.Children.count(a);return r.jsxs(v,{children:[m>9&&r.jsxs(r.Fragment,{children:[r.jsx(R,{placeholder:n==null?void 0:n.placeholder}),r.jsx(I,{children:w.strings.Shared.NoDataFound})]}),r.jsx(G.ScrollArea,{className:f.cn({"h-auto":m<=7,"h-48 sm:h-64":m>7}),dir:l,children:r.jsx(C.CommandGroup,{ref:d,...n,dir:document.dir,children:a})})]})});N.displayName="ComboboxGroup";const z=({options:e,optionLabel:a,placeholder:n,isLoading:d,optionValue:l,onChange:m,value:s,triggerProps:b,...o})=>{var x;const[i,u]=h.useState(!1),g=(e==null?void 0:e.length)&&((x=e==null?void 0:e.find(c=>String(c[l])===s))==null?void 0:x[a])||"";return r.jsxs(q,{open:i,onOpenChange:c=>u(c),children:[r.jsx(S,{...b,placeholder:n,isLoading:d,disabled:o==null?void 0:o.disabled,...o,children:g.toString()}),r.jsx(N,{placeholder:n,className:"w-space-10",children:!!(e!=null&&e.length)&&(e==null?void 0:e.map(c=>r.jsx(y,{className:f.cn({relative:!0,"after:absolute after:bottom-auto after:right-space-01 after:top-auto after:h-[75%] after:w-[2px] after:rounded-full after:bg-primary":String(c[l])===s}),value:String(c[a]),onSelect:()=>{m(String(c[l])),u(!1)},children:String(c==null?void 0:c[a])},String(c[l]))))})]})},D=({options:e,optionLabel:a,placeholder:n,isLoading:d,optionValue:l,onChange:m,value:s,triggerProps:b,isDate:o,disabledOption:i,...u})=>{var F;const[g,x]=h.useState(!1),c=(e==null?void 0:e.length)&&((F=e==null?void 0:e.find(t=>String(t[l])===s))==null?void 0:F[a])||"";return r.jsxs(q,{open:g,onOpenChange:t=>x(t),children:[r.jsx(S,{isForm:!1,...b,placeholder:n,isLoading:d,disabled:u==null?void 0:u.disabled,...u,children:o?f.dateFormatter({date:String(c)??"",format:"long"}):c.toString()}),r.jsxs(N,{placeholder:n,children:[r.jsx(A.ShouldRender,{shouldRender:!e||(e==null?void 0:e.length)<1,children:r.jsx("span",{className:"flex items-center justify-center",children:w.strings.Shared.NoDataFound})}),!!(e!=null&&e.length)&&(e==null?void 0:e.map(t=>r.jsx(y,{className:f.cn({relative:!0,"after:absolute after:bottom-auto after:start-space-01 after:top-auto after:h-[50%] after:w-[2px] after:rounded-full after:bg-primary":String(t[l])===s}),value:String(t[a]),disabled:i&&i(t),onSelect:()=>{m(String(t[l])),x(!1)},children:o?f.dateFormatter({date:String(t==null?void 0:t[a])??"",format:"long"}):String(t==null?void 0:t[a])},String(t[l]))))]})]})};exports.Combobox=q;exports.ComboboxContent=v;exports.ComboboxControl=z;exports.ComboboxControlNoForm=D;exports.ComboboxEmpty=I;exports.ComboboxGroup=N;exports.ComboboxInput=R;exports.ComboboxItem=y;exports.ComboboxTrigger=S;
|
package/index.cjs73.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react");require("./index.cjs2.js");const o=require("./index.cjs40.js"),x=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react");require("./index.cjs2.js");const o=require("./index.cjs40.js"),x=require("./index.cjs167.js"),y=require("./index.cjs168.js"),f=require("./index.cjs79.js");function m({max:r=5,onChange:s,value:c=0,...t}){const[a,u]=d.useState(0);return i.jsx(o.Stack,{gap:"none",children:Array.from({length:r},(l,e)=>i.jsx(p,{star:e+1,rating:c,hoverRating:a,onHover:n=>!t.readOnly&&u(n),onClick:n=>!t.readOnly&&(s==null?void 0:s(n)),...t},e))})}function p({star:r,rating:s,hoverRating:c,onHover:t,onClick:a,readOnly:u,variant:l="default",size:e="default"}){return i.jsxs("button",{onMouseEnter:()=>t==null?void 0:t(r),onMouseLeave:()=>t==null?void 0:t(0),onClick:()=>a==null?void 0:a(r),className:f.cn("group relative flex items-center justify-center",{"size-space-08":e==="default","size-space-06":e==="sm","size-space-05":e==="xs","cursor-default":u}),children:[i.jsx(x.default,{className:f.cn("absolute size-full shrink-0 ",{"group-hover:opacity-0":!u})}),i.jsx(y.default,{className:f.cn("absolute size-full shrink-0 opacity-0 transition-all",{"opacity-100":r<=(c||s),"group-hover:opacity-100":!u,"text-secondary":l==="default","text-primary":l==="brand"})})]})}exports.Rating=m;
|
package/index.cjs75.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./index.cjs169.js"),t=a=>(u,e)=>{a.setQueryData(u,r=>typeof e!="function"?e:d.produce(r,c=>{e(c)}))};exports.default=t;exports.useUpdateCachedData=t;
|
package/index.cjs76.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var g=(
|
|
1
|
+
"use strict";var d=Object.defineProperty;var g=(n,e,t)=>e in n?d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>(g(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs94.js"),h=require("./index.cjs89.js"),s=class s{constructor(e){i(this,"userManager");i(this,"config");i(this,"user");i(this,"isLoading");i(this,"isAuthenticated");i(this,"error");i(this,"signout",async(e="")=>{var t;this.isLoading=!1,window.location.href=`${(t=this.config)==null?void 0:t.oauth20LogoutUrl}${e}`});this.config=e,this.userManager=new r.UserManager({...h.createIdentityConfig(e),metadata:h.createMetadataConfig(e.authUrl,(e==null?void 0:e.jwks)??"UP_Definition")}),this.isAuthenticated=!1,this.isLoading=!1,this.user=null,this.error=void 0,r.Log.setLogger(console),r.Log.setLevel(r.Log.DEBUG),this.setupEventListeners()}static getInstance(e){return s.instance||(s.instance=new s(e)),s.instance}setupEventListeners(){this.userManager.events.addUserLoaded(e=>{this.user=e,this.isAuthenticated=!(e!=null&&e.expired),this.error=void 0,this.isLoading=!1}),this.userManager.events.addUserUnloaded(()=>{this.isAuthenticated=!1,this.isLoading=!1,this.user=null,this.error=void 0}),this.userManager.events.addSilentRenewError(e=>{this.error=e,this.user=null,this.isAuthenticated=!1,this.isLoading=!1}),this.userManager.events.addAccessTokenExpired(()=>{this.refreshToken().then(e=>{e||this.signin()})}),this.userManager.events.addUserSignedIn(()=>{this.isLoading=!1,this.error=void 0})}hasAuthParams(e=window.location){let t=new URLSearchParams(e.search);return!!((t.get("code")||t.get("error"))&&t.get("state")||(t=new URLSearchParams(e.hash.replace("#","?")),(t.get("code")||t.get("error"))&&t.get("state")))}signin(){return this.isLoading=!0,this.error=void 0,this.user=null,this.userManager.signinRedirect()}completeSignIn(){return this.userManager.signinRedirectCallback().then(async e=>(this.isLoading=!1,e?(this.user=e,this.isAuthenticated=!(e!=null&&e.expired)):this.user=await this.userManager.getUser(),e)).catch(e=>{throw this.isLoading=!1,this.error=e,Error(e)})}getUser(){return this.isLoading=!0,this.userManager.getUser().then(e=>(e&&(this.user=e,this.isAuthenticated=!(e!=null&&e.expired),this.isLoading=!1),e)).catch(e=>{throw this.error=e,this.isLoading=!1,e})}async refreshToken(){return this.userManager.signinSilent().then(e=>(e&&(this.user=e,this.isAuthenticated=!(e!=null&&e.expired),localStorage.setItem("accessToken",(e==null?void 0:e.id_token)??"")),e)).catch(e=>(this.error=e,null))}async clearSession(){return new Promise((e,t)=>{const o=window.open("https://iam-dev.moe.gov.sa/pkmslogout","_blank","width=800,height=600,noopener");o?setTimeout(()=>{o.close(),e()},1e3):t(new Error("Unable to open new popup window"))})}};i(s,"instance",null);let a=s;exports.AuthService=a;
|
package/index.cjs79.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs95.js"),o=require("./index.cjs96.js"),c=require("./index.cjs97.js"),l=require("./index.cjs91.js"),i=require("./index.cjs98.js"),d=require("./index.cjs83.js"),m=require("./index.cjs99.js"),g=require("./index.cjs72.js"),u=m.extendTailwindMerge({classGroups:{"font-size":["text-caption-01","text-caption-02","text-subtitle-01","text-subtitle-02","text-body-01","text-body-02"]}});function f(...e){return u(s.clsx(e))}const Y={enRegex:/^[a-zA-Z- ]+$/,arRegex:/^[\u0621-\u064A- ]+$/,bothArAndEnRegexonlyLetters:/^[a-zA-Z-\u0621-\u064A ]+$/,bothArAndEnRegexonlyLettersAndNumbers:/^[a-zA-Z0-9-\u0621-\u064A ]+$/,enletterAndNumbersRegex:/^[a-zA-Z0-9]*$/,mobileNumber:/^(5)(\d){8}$/,TelPhone:/^(0096611)(\d){7}$/,nationalId:/^1(\d){9}$/,nationalOrResidentId:/^[12](\d){9}$/,nonSaudianNationalId:/^2(\d){9}$/,tags:/<[^>]*>?/gm,specialCharcter:/[!@#$%^&*()_+\-'~<>/\\?|÷×]/,arSpaceRegex:/^[\u0621-\u064A\s]+$/},h=(e,t)=>(!/^[0-9\u0660-\u0669]+$/.test(e.target.value)&&e.target.value!==""&&(e.target.value=t),e.target.value=e.target.value.replace(/[٠١٢٣٤٥٦٧٨٩]/g,n=>String(n.charCodeAt(0)-1632)).replace(/[۰۱۲۳۴۵۶۷۸۹]/g,n=>String(n.charCodeAt(0)-1776)),e),b=(...e)=>e.map(t=>t.split(" ").map(r=>process.env.NODE_ENV==="production"?`er-${r}`:r).join(" ")).join(" "),x=()=>{const{lang:e}=d.default(t=>t);return(t="",r="")=>String(e).toLocaleLowerCase()==="ar"?t:r||t};function A(e,t){let r=null;return function(...n){const a=()=>{r=null,e.apply(this,n)};r!==null&&clearTimeout(r),r=setTimeout(a,t)}}const p=e=>new Intl.DateTimeFormat(e==="rtl"?"ar":"en",{day:"2-digit",month:"short",year:"numeric"}),D=e=>new Intl.DateTimeFormat(e==="rtl"?"ar":"en",{timeStyle:"short"}),S=({date:e,format:t,isHijri:r=!1,hasHijriFormat:n})=>{const a=document.dir==="rtl";switch(o.default.updateLocale(a?"ar-sa":"en",{}),t){case"short":return o.default(e).format(a?i.DateFormat.ArShort:i.DateFormat.EnShort);case"mid":return o.default(e).format("dddd");case"long":return r?c.default(e,n?"iDD/iMM/iYYYY":void 0).format(a?"iYYYY/iM/iD":"iD/iM/iYYYY"):o.default(new Date(e??""),"DD-MM-YYYY").format(a?"YYYY/M/D":"D/M/YYYY")}},w=e=>{const{toast:t}=g.useToast();navigator.clipboard.writeText(e).then(()=>{t({description:l.strings.Shared.CopiedSuccessfully})})};exports.cn=f;exports.dateFormatter=S;exports.debounce=A;exports.formatter=p;exports.formatterTime=D;exports.handleArabicNumbers=h;exports.langRegex=Y;exports.tw=b;exports.twMerge=u;exports.useShareLink=w;exports.useSwitchData=x;
|
package/index.cjs8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("./index.cjs107.js"),i=require("react"),n=require("./index.cjs79.js"),h=b.cva("grid border-b border-border-secondary",{variants:{variant:{default:"[&>dt]:text-foreground-secondary",list:"[&>dd]:text-card-foreground"},size:{default:"text-body-01",sm:"text-caption-01"},orientation:{vertical:"grid-cols-1 gap-space-01",horizental:"grid-cols-1 gap-space-02 sm:grid-cols-[min(50%,theme(spacing.80))_auto]"},lastItem:{true:"border-none"},stretch:{true:""},padding:{default:"p-space-04",none:"p-space-00"}},compoundVariants:[{orientation:"horizental",stretch:!0,className:"sm:grid-cols-2 sm:[&>dd]:text-end"}],defaultVariants:{orientation:"horizental",variant:"default",padding:"default",size:"default"}}),o=i.forwardRef(({children:t,className:r,...a},s)=>e.jsx("div",{ref:s,className:n.cn("rounded-2 bg-background",r),...a,children:t}));o.displayName="Description";const d=i.forwardRef(({icon:t,variant:r,title:a,children:s,orientation:c,stretch:l,lastItem:u,size:p,padding:m,className:g,...f},x)=>e.jsxs("dl",{ref:x,className:n.cn(h({variant:r,orientation:c,size:p,stretch:l,lastItem:u,padding:m}),g),...f,children:[e.jsxs("dt",{className:"col-start-1 inline-flex items-center gap-space-01",children:[t&&e.jsx(t,{className:"h-8 w-8 shrink-0"}),a,":"]}),e.jsx("dd",{className:"line-clamp-1",children:s})]}));d.displayName="DescriptionItem";exports.Description=o;exports.DescriptionItem=d;
|
package/index.cjs80.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./index.cjs100.js"),u=require("./index.cjs82.js"),c=({state:e})=>{var o,i,n,t,l,r;e.isDesktop&&Number((o=e.fontSize)==null?void 0:o.substring(0,e.fontSize.length-2))<12&&(document.documentElement.style.setProperty("font-size",`calc(${e.fontSize} + 1px)`),e.fontSize=(i=getComputedStyle(document.documentElement))==null?void 0:i.getPropertyValue("font-size"),e.isMax=Number((n=e.fontSize)==null?void 0:n.substring(0,e.fontSize.length-2))>=12,e.isMin=!1),!e.isDesktop&&Number((t=e.fontSize)==null?void 0:t.substring(0,e.fontSize.length-2))<10.2&&(document.documentElement.style.setProperty("font-size",`calc(${e.fontSize} + 0.7px)`),e.fontSize=(l=getComputedStyle(document.documentElement))==null?void 0:l.getPropertyValue("font-size"),e.isMax=Number((r=e.fontSize)==null?void 0:r.substring(0,e.fontSize.length-2))>=10.2,e.isMin=!1)},f=({state:e})=>{var o,i,n,t,l,r;e.isDesktop&&Number((o=e.fontSize)==null?void 0:o.substring(0,e.fontSize.length-2))>8&&(document.documentElement.style.setProperty("font-size",`calc(${e.fontSize} - 1px)`),e.fontSize=(i=getComputedStyle(document.documentElement))==null?void 0:i.getPropertyValue("font-size"),e.isMin=Number((n=e.fontSize)==null?void 0:n.substring(0,e.fontSize.length-2))<=8,e.isMax=!1),!e.isDesktop&&Number((t=e.fontSize)==null?void 0:t.substring(0,e.fontSize.length-2))>7.4&&(document.documentElement.style.setProperty("font-size",`calc(${e.fontSize} - 0.7px)`),e.fontSize=(l=getComputedStyle(document.documentElement))==null?void 0:l.getPropertyValue("font-size"),e.isMin=Number((r=e.fontSize)==null?void 0:r.substring(0,e.fontSize.length-2))<=7.4,e.isMax=!1)},m=s.create()(u.default(e=>({isActive:!!localStorage.getItem("Colors"),toggleColors:()=>e(o=>(o.isActive?localStorage.removeItem("Colors"):localStorage.setItem("Colors","true"),{isActive:!o.isActive})),isDesktop:window.innerWidth>=640||!1,fontSize:window.innerWidth>=640?"10px":"8.8px",isMax:!1,isMin:!1,increaseSize:()=>e(o=>{c({state:o})}),decreaseSize:()=>e(o=>{f({state:o})}),defaultSize:()=>e(o=>{var i;o.isDesktop?document.documentElement.style.setProperty("font-size","10px"):document.documentElement.style.setProperty("font-size","8.8px"),o.fontSize=(i=getComputedStyle(document.documentElement))==null?void 0:i.getPropertyValue("font-size"),o.isMax=!1,o.isMin=!1})}),{name:"accessibilityTools"})),d=m;exports.default=d;
|
package/index.cjs81.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./index.cjs100.js"),i=require("./index.cjs82.js"),m=r.create()(i.default(a=>({isAuthenticated:!!localStorage.getItem("nationalId")&&!!localStorage.getItem("accessToken"),accessToken:localStorage.getItem("accessToken")||void 0,refreshToken:localStorage.getItem("refreshToken")||void 0,nationalId:localStorage.getItem("nationalId"),sessionExpired:!1,user:{firstName:"",secondName:"",thridName:"",lastName:"",Id:"",roles:[],email:"",ssoEmail:"",defaultRole:localStorage.getItem("defaultRole")},login:e=>a(()=>(localStorage.setItem("nationalId",e),{isAuthenticated:!0,nationalId:e,sessionExpired:!1})),setUser:e=>a(()=>(e.defaultRole&&localStorage.setItem("defaultRole",e.defaultRole),localStorage.setItem("displayName",`${e.firstName} ${e.lastName}`),{user:e})),updateUser:e=>a(o=>(e.defaultRole&&localStorage.setItem("defaultRole",e.defaultRole),e.firstName&&e.lastName&&localStorage.setItem("displayName",`${e.firstName} ${e.lastName}`),{user:{...o==null?void 0:o.user,...e}})),logout:()=>a(e=>{var o,t;return localStorage.removeItem("nationalId"),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),localStorage.removeItem("displayName"),localStorage.removeItem("defaultRole"),localStorage.removeItem("jwt"),localStorage.removeItem("ERAlertHidden"),localStorage.removeItem("registrationStartDate"),localStorage.removeItem("registrationEndDate"),(t=(o=e==null?void 0:e.user)==null?void 0:o.roles)==null||t.map(l=>{localStorage.removeItem(`${l}-evaluationCounter`),localStorage.removeItem(`${l}-evaluationSkipCounter`)}),localStorage.removeItem("email"),{isAuthenticated:!1,nationalId:void 0,user:{roles:[]},accessToken:void 0,refreshToken:void 0,sessionExpired:!1}}),setExpireSession:()=>a(()=>({sessionExpired:!0})),setDefaultRole:e=>a(o=>{e&&(o!=null&&o.user)&&(localStorage.setItem("defaultRole",e),o.user.defaultRole=e)})}),{name:"auth"})),s=m;exports.default=s;
|
package/index.cjs82.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./index.cjs101.js"),s=require("./index.cjs102.js"),l={name:"Store",enabled:!0,serialize:{options:!1}},r=(e,t=l)=>o.devtools(s.immer(e),t),i=r;exports.default=i;
|
package/index.cjs83.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index.cjs100.js"),o=require("./index.cjs82.js"),a=l.create()(o.default(n=>({lang:localStorage.getItem("lang")??"ar",dir:localStorage.getItem("lang")==="en"?"ltr":"rtl",changeLang:e=>n(t=>{e!==t.lang&&(localStorage.setItem("lang",e),window.location.pathname==="/login/verification"?window.location.replace("/login"):window.location.reload())})}),{name:"lanugage"})),g=a;exports.default=g;exports.useLanguage=a;
|
package/index.cjs86.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),s=require("react"),A=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),s=require("react"),A=require("./index.cjs94.js"),C=require("./index.cjs85.js"),b=require("./index.cjs87.js"),I=require("./index.cjs84.js"),d=require("./index.cjs88.js"),M=["clearStaleState","querySessionStatus","revokeTokens","startSilentRenew","stopSilentRenew"],q=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],g=i=>()=>{throw new Error(`UserManager#${i} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`)},h=typeof window>"u"?null:A.UserManager,P=i=>{const{children:m,onSigninCallback:o,skipSigninCallback:p,matchSignoutCallback:u,onSignoutCallback:c,onRemoveUser:R,userManager:E=null,...S}=i,[e]=s.useState(()=>E??(h?new h(S):{settings:S})),[f,n]=s.useReducer(I.reducer,b.initialAuthState),w=s.useMemo(()=>Object.assign({settings:e.settings,events:e.events},Object.fromEntries(M.map(t=>{var r;return[t,((r=e[t])==null?void 0:r.bind(e))??g(t)]})),Object.fromEntries(q.map(t=>[t,e[t]?async r=>{n({type:"NAVIGATOR_INIT",method:t});try{return await e[t](r)}catch(a){return n({type:"ERROR",error:a}),null}finally{n({type:"NAVIGATOR_CLOSE"})}}:g(t)]))),[e]),v=s.useRef(!1);s.useEffect(()=>{!e||v.current||(v.current=!0,(async()=>{let t=null;try{d.hasAuthParams()&&!p&&(t=await e.signinCallback(),o&&await o(t)),t=t||await e.getUser(),n({type:"INITIALISED",user:t})}catch(r){n({type:"ERROR",error:d.signinError(r)})}try{u&&u(e.settings)&&(await e.signoutCallback(),c&&await c())}catch(r){n({type:"ERROR",error:d.signoutError(r)})}})())},[e,p,o,c,u]),s.useEffect(()=>{if(!e)return;const t=l=>{n({type:"USER_LOADED",user:l})};e.events.addUserLoaded(t);const r=()=>{n({type:"USER_UNLOADED"})};e.events.addUserUnloaded(r);const a=()=>{n({type:"USER_SIGNED_OUT"})};e.events.addUserSignedOut(a);const U=l=>{n({type:"ERROR",error:l})};return e.events.addSilentRenewError(U),()=>{e.events.removeUserLoaded(t),e.events.removeUserUnloaded(r),e.events.removeUserSignedOut(a),e.events.removeSilentRenewError(U)}},[e]);const O=s.useCallback(e?()=>e.removeUser().then(R):g("removeUser"),[e,R]);return y.jsx(C.AuthContext.Provider,{value:{...f,...w,removeUser:O},children:m})};exports.AuthProvider=P;
|
package/index.cjs89.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>({authority:e.authUrl,client_id:e.clientId,client_secret:e.clientSecret,redirect_uri:`${e.baseUrl}/login/sso/callback`,login:e.authUrl,automaticSilentRenew:!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>({authority:e.authUrl,client_id:e.clientId,client_secret:e.clientSecret,redirect_uri:`${e.baseUrl}/login/sso/callback`,login:e.authUrl,automaticSilentRenew:!1,loadUserInfo:!1,silent_redirect_uri:`${e.baseUrl}/login/sso/callback`,post_logout_redirect_uri:`${e.baseUrl}/logout/sso`,audience:e.baseUrl,responseType:"code",grantType:"authorization_code",scope:"openid NationalID offline_access",webAuthResponseType:"code",disablePKCE:e.disablePKCE??!1}),i=(e,t)=>({issuer:"https://iam-dev.moe.gov.sa",jwks_uri:`${e}/jwks/${t}`,authorization_endpoint:`${e}/authorize`,token_endpoint:`${e}/token`,userinfo_endpoint:`${e}/userinfo`,end_session_endpoint:`${e}/revoke`,check_session_iframe:`${e}/checksession`,revocation_endpoint:`${e}/revoke`,introspection_endpoint:`${e}/introspect`});exports.createIdentityConfig=o;exports.createMetadataConfig=i;
|
package/index.cjs9.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("./index.cjs108.js"),C=require("./index.cjs109.js"),O=require("react"),w=require("react-dom"),W=require("./index.cjs79.js"),F=require("./index.cjs91.js"),H=require("./index.cjs3.js"),j=require("./index.cjs22.js"),L=require("./index.cjs58.js"),V=require("./index.cjs40.js"),J=require("./index.cjs110.js"),K=require("./index.cjs111.js"),Q=require("./index.cjs112.js"),U=require("./index.cjs113.js");function X({configs:r,isEditMode:o,componentMap:p,onConfigChange:f,onOrderChange:g,onSave:d,onCancel:y,onReset:S,onAdd:D,isSidePanelShown:q,isSaving:u}){const[x,N]=O.useState(null),[z,k]=O.useState(null),A=l.useSensor(l.MouseSensor,{activationConstraint:{distance:5}}),_=l.useSensor(l.TouchSensor,{activationConstraint:{delay:100,tolerance:5}}),$=l.useSensors(A,_),B=e=>{N(e.active.id)},P=e=>{const{over:t}=e;k(t?t.id:null)},R=e=>{const{active:t,over:n}=e;if(N(null),k(null),!n||t.id===n.id)return;if(n.id.toString().startsWith("placeholder-")){const c=parseInt(n.id.toString().split("-")[1]),m=r.find(h=>h.alias===t.id);if(m&&m.size==="half"){const h=r.findIndex(T=>T.alias===t.id),I=[...r];I.splice(c+1,0,...I.splice(h,1)),g(I)}return}const a=r.findIndex(c=>c.alias===t.id),i=r.findIndex(c=>c.alias===n.id),b=C.arrayMove(r,a,i);g(b)},v=r.filter(e=>(e==null?void 0:e.isVisible)&&p[e.alias]),G=Array(v.length).fill(0).map((e,t)=>`placeholder-${t}`);return s.jsxs(s.Fragment,{children:[u&&w.createPortal(s.jsx("div",{className:W.cn("fixed inset-0 z-[60000] bg-black transition-all duration-200",u?"opacity-50":"pointer-events-none opacity-0")}),document.body),s.jsxs(l.DndContext,{sensors:$,collisionDetection:l.closestCenter,onDragStart:B,onDragEnd:R,onDragOver:P,children:[s.jsx(C.SortableContext,{items:[...r.map(e=>e.alias),...G],children:s.jsx("div",{className:"grid grid-cols-1 items-center justify-center gap-space-05 px-space-04 pt-space-04 sm:grid-cols-2 sm:items-stretch sm:justify-stretch sm:px-space-06 xl:px-space-05",children:(()=>{let e=0;const t=[],n=r.find(a=>a.alias===x);for(let a=0;a<v.length;a++){const i=v[a],b=p[i.alias];if(!b)continue;t.push(s.jsx(b,{config:i,isEditMode:o,onConfigChange:f,isOver:i.alias===z,isDragging:i.alias===x},i.alias));const c=i.size==="full"?2:1;if(e+=c,o&&i.size==="half"&&e%2===1){const m=v[a+1];if(!m||m.size==="full"){const h=`placeholder-${a}`;t.push(s.jsx(Y,{id:h,isEditMode:o,activeId:x,overId:z,draggedWidgetSize:n==null?void 0:n.size},h)),e+=1}}}return t})()})}),s.jsx(l.DragOverlay,{children:x&&(()=>{const e=r.find(n=>n.alias===x);if(!e)return null;const t=p[e.alias];return t?s.jsx(t,{config:e,isEditMode:o,onConfigChange:f,isDragOverlay:!0,isOver:e.alias===z,isDragging:e.alias===x},e.alias):null})()})]}),w.createPortal(s.jsx("div",{className:`fixed bottom-4 left-0 right-0 flex justify-center transition-all duration-300 ${o?"z-[50000] opacity-100":"pointer-events-none opacity-0"}
|
|
2
2
|
${q?"hidden xl:flex":""}
|
|
3
3
|
`,children:s.jsxs("div",{className:`flex transform items-center gap-space-04 rounded-full border-t bg-background-brand p-space-02 shadow-card-shadow transition-all duration-300 ${o?"translate-y-[-10px]":"translate-y-full"}`,children:[s.jsxs(V.Stack,{gap:4,alignItems:"center",children:[s.jsx(j.Button,{variant:"outline",colors:"gray",size:"icon-sm",onClick:y,children:s.jsx(J.default,{})}),s.jsx(j.Button,{variant:"outline",colors:"gray",size:"icon-sm",onClick:S,children:s.jsx(K.default,{})}),s.jsx(L.Separator,{orientation:"vertical",className:"h-space-06"})]}),s.jsx(j.Button,{variant:"outline",colors:"primary",size:"icon-sm",className:"xl:hidden",onClick:D,children:s.jsx(Q.default,{})}),s.jsxs(j.Button,{variant:"default",onClick:d,size:"sm",colors:"primary",className:"gap-space-02",disabled:u,children:[s.jsx(U.default,{className:"size-space-05"}),F.strings.DragAndDrop.SaveCustomization,u&&s.jsx(H.default,{})]})]})}),document.body)]})}const Y=({id:r,isEditMode:o,activeId:p,overId:f,draggedWidgetSize:g})=>{const d=g==="half",{attributes:y,listeners:S,isOver:D,setNodeRef:q}=C.useSortable({id:r,disabled:!o||!d}),u=D||f===r;return s.jsx("div",{ref:q,...d?y:{},...d?S:{},className:W.cn("hidden sm:block","h-[440px] rounded-3 border-2 border-dashed transition-all duration-200",u?"border-primary":"border-border",!d&&p?"cursor-not-allowed":"cursor-default")})};exports.DraggableGrid=X;
|
package/index.cjs90.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs100.js"),e=require("./index.cjs98.js"),d=require("./index.cjs82.js"),r=()=>{window.matchMedia("(prefers-color-scheme: dark)").matches?document.body.classList.add("dark"):document.body.classList.remove("dark")},o=a.create()(d.default(s=>({theme:e.THEME.SYSTEM,setTheme:t=>{switch(localStorage.setItem("defaultTheme",String(t)),+t){case e.THEME.LIGHT:document.body.classList.remove("dark");break;case e.THEME.DARK:document.body.classList.add("dark");break;case e.THEME.SYSTEM:r(),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),window.matchMedia("(prefers-color-scheme: light)").addEventListener("change",r);break}return s({theme:t})}}),{name:"theme"}));exports.useThemeStore=o;
|
package/index.cjs94.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.cjs175.js");const t=e.default("ExpandMore",[["path",{d:"M16.59 8.29492L12 12.8749L7.41 8.29492L6 9.70492L12 15.7049L18 9.70492L16.59 8.29492Z",key:"1h4imv"}]]);exports.default=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ue=require("./index.cjs170.js");var Ce={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},b,k;exports.Log=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(exports.Log||{});(e=>{function t(){b=3,k=Ce}e.reset=t;function s(r){if(!(0<=r&&r<=4))throw new Error("Invalid log level");b=r}e.setLevel=s;function i(r){k=r}e.setLogger=i})(exports.Log||(exports.Log={}));var g=class v{constructor(t){this._name=t}debug(...t){b>=4&&k.debug(v._format(this._name,this._method),...t)}info(...t){b>=3&&k.info(v._format(this._name,this._method),...t)}warn(...t){b>=2&&k.warn(v._format(this._name,this._method),...t)}error(...t){b>=1&&k.error(v._format(this._name,this._method),...t)}throw(t){throw this.error(t),t}create(t){const s=Object.create(this);return s._method=t,s.debug("begin"),s}static createStatic(t,s){const i=new v(`${t}.${s}`);return i.debug("begin"),i}static _format(t,s){const i=`[${t}]`;return s?`${i} ${s}:`:i}static debug(t,...s){b>=4&&k.debug(v._format(t),...s)}static info(t,...s){b>=3&&k.info(v._format(t),...s)}static warn(t,...s){b>=2&&k.warn(v._format(t),...s)}static error(t,...s){b>=1&&k.error(v._format(t),...s)}};exports.Log.reset();var W=class{static decode(e){try{return Ue.jwtDecode(e)}catch(t){throw g.error("JwtUtils.decode",t),t}}static async generateSignedJwt(e,t,s){const i=f.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),r=f.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),o=`${i}.${r}`,n=await window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},s,new TextEncoder().encode(o)),a=f.encodeBase64Url(new Uint8Array(n));return`${o}.${a}`}},Ae="10000000-1000-4000-8000-100000000000",K=e=>btoa([...new Uint8Array(e)].map(t=>String.fromCharCode(t)).join("")),oe=class y{static _randomWord(){const t=new Uint32Array(1);return crypto.getRandomValues(t),t[0]}static generateUUIDv4(){return Ae.replace(/[018]/g,s=>(+s^y._randomWord()&15>>+s/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return y.generateUUIDv4()+y.generateUUIDv4()+y.generateUUIDv4()}static async generateCodeChallenge(t){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{const i=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",i);return K(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(s){throw g.error("CryptoUtils.generateCodeChallenge",s),s}}static generateBasicAuth(t,s){const r=new TextEncoder().encode([t,s].join(":"));return K(r)}static async hash(t,s){const i=new TextEncoder().encode(s),r=await crypto.subtle.digest(t,i);return new Uint8Array(r)}static async customCalculateJwkThumbprint(t){let s;switch(t.kty){case"RSA":s={e:t.e,kty:t.kty,n:t.n};break;case"EC":s={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":s={crv:t.crv,kty:t.kty,x:t.x};break;case"oct":s={crv:t.k,kty:t.kty};break;default:throw new Error("Unknown jwk type")}const i=await y.hash("SHA-256",JSON.stringify(s));return y.encodeBase64Url(i)}static async generateDPoPProof({url:t,accessToken:s,httpMethod:i,keyPair:r,nonce:o}){let n,a;const c={jti:window.crypto.randomUUID(),htm:i??"GET",htu:t,iat:Math.floor(Date.now()/1e3)};s&&(n=await y.hash("SHA-256",s),a=y.encodeBase64Url(n),c.ath=a),o&&(c.nonce=o);try{const l=await crypto.subtle.exportKey("jwk",r.publicKey),d={alg:"ES256",typ:"dpop+jwt",jwk:{crv:l.crv,kty:l.kty,x:l.x,y:l.y}};return await W.generateSignedJwt(d,c,r.privateKey)}catch(l){throw l instanceof TypeError?new Error(`Error exporting dpop public key: ${l.message}`):l}}static async generateDPoPJkt(t){try{const s=await crypto.subtle.exportKey("jwk",t.publicKey);return await y.customCalculateJwkThumbprint(s)}catch(s){throw s instanceof TypeError?new Error(`Could not retrieve dpop keys from storage: ${s.message}`):s}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])}};oe.encodeBase64Url=e=>K(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var f=oe,I=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new g(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)await t(...e)}},se=class{static center({...e}){var t,s,i;return e.width==null&&(e.width=(t=[800,720,600,480].find(r=>r<=window.outerWidth/1.618))!=null?t:360),(s=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((i=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,s])=>`${t}=${typeof s!="boolean"?s:s?"yes":"no"}`).join(",")}},T=class j extends I{constructor(){super(...arguments),this._logger=new g(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const t=this._expiration-j.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=j.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){const s=this._logger.create("init");t=Math.max(Math.floor(t),1);const i=j.getEpochTime()+t;if(this.expiration===i&&this._timerHandle){s.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),s.debug("using duration",t),this._expiration=i;const r=Math.min(t,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},L=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const i=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];return new URLSearchParams(i.slice(1))}},F=";",x=class extends Error{constructor(e,t){var s,i,r;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw g.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(s=e.error_description)!=null?s:null,this.error_uri=(i=e.error_uri)!=null?i:null,this.state=e.userState,this.session_state=(r=e.session_state)!=null?r:null,this.url_state=e.url_state}},$=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},ae=class{constructor(e){this._logger=new g("AccessTokenEvents"),this._expiringTimer=new T("Access token expiring"),this._expiredTimer=new T("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const s=e.expires_in;if(t.debug("access token present, remaining duration:",s),s>0){let r=s-this._expiringNotificationTimeInSeconds;r<=0&&(r=1),t.debug("registering expiring timer, raising in",r,"seconds"),this._expiringTimer.init(r)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const i=s+1;t.debug("registering expired timer, raising in",i,"seconds"),this._expiredTimer.init(i)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},ce=class{constructor(e,t,s,i,r){this._callback=e,this._client_id=t,this._intervalInSeconds=i,this._stopOnError=r,this._logger=new g("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=n=>{n.origin===this._frame_origin&&n.source===this._frame.contentWindow&&(n.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):n.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(n.data+" message from check session op iframe"))};const o=new URL(s);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},G=class{constructor(){this._logger=new g("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},z=class extends Error{constructor(e,t){super(t),this.name="ErrorDPoPNonce",this.nonce=e}},Q=class{constructor(e=[],t=null,s={}){this._jwtHandler=t,this._extraHeaders=s,this._logger=new g("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:s,...i}=t;if(!s)return await fetch(e,i);const r=new AbortController,o=setTimeout(()=>r.abort(),s*1e3);try{return await fetch(e,{...t,signal:r.signal})}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?new $("Network timed out"):n}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:s,timeoutInSeconds:i}={}){const r=this._logger.create("getJson"),o={Accept:this._contentTypes.join(", ")};t&&(r.debug("token passed, setting Authorization header"),o.Authorization="Bearer "+t),this.appendExtraHeaders(o);let n;try{r.debug("url:",e),n=await this.fetchWithTimeout(e,{method:"GET",headers:o,timeoutInSeconds:i,credentials:s})}catch(l){throw r.error("Network Error"),l}r.debug("HTTP response received, status",n.status);const a=n.headers.get("Content-Type");if(a&&!this._contentTypes.find(l=>a.startsWith(l))&&r.throw(new Error(`Invalid response Content-Type: ${a??"undefined"}, from URL: ${e}`)),n.ok&&this._jwtHandler&&(a!=null&&a.startsWith("application/jwt")))return await this._jwtHandler(await n.text());let c;try{c=await n.json()}catch(l){throw r.error("Error parsing JSON response",l),n.ok?l:new Error(`${n.statusText} (${n.status})`)}if(!n.ok)throw r.error("Error from server:",c),c.error?new x(c):new Error(`${n.statusText} (${n.status}): ${JSON.stringify(c)}`);return c}async postForm(e,{body:t,basicAuth:s,timeoutInSeconds:i,initCredentials:r,extraHeaders:o}){const n=this._logger.create("postForm"),a={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded",...o};s!==void 0&&(a.Authorization="Basic "+s),this.appendExtraHeaders(a);let c;try{n.debug("url:",e),c=await this.fetchWithTimeout(e,{method:"POST",headers:a,body:t,timeoutInSeconds:i,credentials:r})}catch(u){throw n.error("Network error"),u}n.debug("HTTP response received, status",c.status);const l=c.headers.get("Content-Type");if(l&&!this._contentTypes.find(u=>l.startsWith(u)))throw new Error(`Invalid response Content-Type: ${l??"undefined"}, from URL: ${e}`);const d=await c.text();let h={};if(d)try{h=JSON.parse(d)}catch(u){throw n.error("Error parsing JSON response",u),c.ok?u:new Error(`${c.statusText} (${c.status})`)}if(!c.ok){if(n.error("Error from server:",h),c.headers.has("dpop-nonce")){const u=c.headers.get("dpop-nonce");throw new z(u,`${JSON.stringify(h)}`)}throw h.error?new x(h,t):new Error(`${c.statusText} (${c.status}): ${JSON.stringify(h)}`)}return h}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),s=Object.keys(this._extraHeaders),i=["authorization","accept","content-type"];s.length!==0&&s.forEach(r=>{if(i.includes(r.toLocaleLowerCase())){t.warn("Protected header could not be overridden",r,i);return}const o=typeof this._extraHeaders[r]=="function"?this._extraHeaders[r]():this._extraHeaders[r];o&&o!==""&&(e[r]=o)})}},le=class{constructor(e){this._settings=e,this._logger=new g("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Q(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const s=this._logger.create(`_getMetadataProperty('${e}')`),i=await this.getMetadata();if(s.debug("resolved"),i[e]===void 0){if(t===!0){s.warn("Metadata does not contain optional property");return}s.throw(new Error("Metadata does not contain property "+e))}return i[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const s=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",s),!Array.isArray(s.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=s.keys,this._signingKeys}},X=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new g("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let s=0;s<e;s++){const i=await this._store.key(s);i&&i.indexOf(this._prefix)===0&&t.push(i.substr(this._prefix.length))}return t}},Oe="code",qe="openid",Ne="client_secret_post",Me=60*15,J=class{constructor({authority:e,metadataUrl:t,metadata:s,signingKeys:i,metadataSeed:r,client_id:o,client_secret:n,response_type:a=Oe,scope:c=qe,redirect_uri:l,post_logout_redirect_uri:d,client_authentication:h=Ne,prompt:u,display:p,max_age:U,ui_locales:C,acr_values:A,resource:O,response_mode:R,filterProtocolClaims:P=!0,loadUserInfo:q=!1,requestTimeoutInSeconds:m,staleStateAgeInSeconds:_=Me,mergeClaimsStrategy:E={array:"replace"},disablePKCE:S=!1,stateStore:w,revokeTokenAdditionalContentTypes:M,fetchRequestCredentials:ee,refreshTokenAllowedScope:ke,extraQueryParams:Ee={},extraTokenParams:Te={},extraHeaders:Re={},dpop:Pe,omitScopeWhenRequesting:Ie=!1}){var te;if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=s,this.metadataSeed=r,this.signingKeys=i,this.client_id=o,this.client_secret=n,this.response_type=a,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=d,this.client_authentication=h,this.prompt=u,this.display=p,this.max_age=U,this.ui_locales=C,this.acr_values=A,this.resource=O,this.response_mode=R,this.filterProtocolClaims=P??!0,this.loadUserInfo=!!q,this.staleStateAgeInSeconds=_,this.mergeClaimsStrategy=E,this.omitScopeWhenRequesting=Ie,this.disablePKCE=!!S,this.revokeTokenAdditionalContentTypes=M,this.fetchRequestCredentials=ee||"same-origin",this.requestTimeoutInSeconds=m,w)this.stateStore=w;else{const xe=typeof window<"u"?window.localStorage:new G;this.stateStore=new X({store:xe})}if(this.refreshTokenAllowedScope=ke,this.extraQueryParams=Ee,this.extraTokenParams=Te,this.extraHeaders=Re,this.dpop=Pe,this.dpop&&!((te=this.dpop)!=null&&te.store))throw new Error("A DPoPStore is required when dpop is enabled")}},je=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("UserInfoService"),this._getClaimsFromJwt=async s=>{const i=this._logger.create("_getClaimsFromJwt");try{const r=W.decode(s);return i.debug("JWT decoding successful"),r}catch(r){throw i.error("Error parsing JWT response"),r}},this._jsonService=new Q(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const s=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",s);const i=await this._jsonService.getJson(s,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug("got claims",i),i}},de=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("TokenClient"),this._jsonService=new Q(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:s=this._settings.client_id,client_secret:i=this._settings.client_secret,extraHeaders:r,...o}){const n=this._logger.create("exchangeCode");s||n.throw(new Error("A client_id is required")),t||n.throw(new Error("A redirect_uri is required")),o.code||n.throw(new Error("A code is required"));const a=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[h,u]of Object.entries(o))u!=null&&a.set(h,u);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(!i)throw n.throw(new Error("A client_secret is required")),null;c=f.generateBasicAuth(s,i);break;case"client_secret_post":a.append("client_id",s),i&&a.append("client_secret",i);break}const l=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const d=await this._jsonService.postForm(l,{body:a,basicAuth:c,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:r});return n.debug("got response"),d}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,scope:i=this._settings.scope,...r}){const o=this._logger.create("exchangeCredentials");t||o.throw(new Error("A client_id is required"));const n=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||n.set("scope",i);for(const[d,h]of Object.entries(r))h!=null&&n.set(d,h);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw o.throw(new Error("A client_secret is required")),null;a=f.generateBasicAuth(t,s);break;case"client_secret_post":n.append("client_id",t),s&&n.append("client_secret",s);break}const c=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:n,basicAuth:a,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),l}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,timeoutInSeconds:i,extraHeaders:r,...o}){const n=this._logger.create("exchangeRefreshToken");t||n.throw(new Error("A client_id is required")),o.refresh_token||n.throw(new Error("A refresh_token is required"));const a=new URLSearchParams({grant_type:e});for(const[h,u]of Object.entries(o))Array.isArray(u)?u.forEach(p=>a.append(h,p)):u!=null&&a.set(h,u);let c;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw n.throw(new Error("A client_secret is required")),null;c=f.generateBasicAuth(t,s);break;case"client_secret_post":a.append("client_id",t),s&&a.append("client_secret",s);break}const l=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const d=await this._jsonService.postForm(l,{body:a,basicAuth:c,timeoutInSeconds:i,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:r});return n.debug("got response"),d}async revoke(e){var t;const s=this._logger.create("revoke");e.token||s.throw(new Error("A token is required"));const i=await this._metadataService.getRevocationEndpoint(!1);s.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const r=new URLSearchParams;for(const[o,n]of Object.entries(e))n!=null&&r.set(o,n);r.set("client_id",this._settings.client_id),this._settings.client_secret&&r.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(i,{body:r,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),s.debug("got response")}},He=class{constructor(e,t,s){this._settings=e,this._metadataService=t,this._claimsService=s,this._logger=new g("ResponseValidator"),this._userInfoService=new je(this._settings,this._metadataService),this._tokenClient=new de(this._settings,this._metadataService)}async validateSigninResponse(e,t,s){const i=this._logger.create("validateSigninResponse");this._processSigninState(e,t),i.debug("state processed"),await this._processCode(e,t,s),i.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),i.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),i.debug("claims processed")}async validateCredentialsResponse(e,t){const s=this._logger.create("validateCredentialsResponse");e.isOpenId&&e.id_token&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),s.debug("claims processed")}async validateRefreshResponse(e,t){var s,i;const r=this._logger.create("validateRefreshResponse");e.userState=t.data,(s=e.session_state)!=null||(e.session_state=t.session_state),(i=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),r.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const o=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,o),r.debug("claims processed")}validateSignoutResponse(e,t){const s=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&s.throw(new Error("State does not match")),s.debug("state validated"),e.userState=t.data,e.error)throw s.warn("Response was error",e.error),new x(e)}_processSigninState(e,t){var s;const i=this._logger.create("_processSigninState");if(t.id!==e.state&&i.throw(new Error("State does not match")),t.client_id||i.throw(new Error("No client_id on state")),t.authority||i.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&i.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&i.throw(new Error("client_id mismatch on settings vs. signin state")),i.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(s=e.scope)!=null||(e.scope=t.scope),e.error)throw i.warn("Response was error",e.error),new x(e);t.code_verifier&&!e.code&&i.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,s=!0){const i=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){i.debug("not loading user info");return}i.debug("loading user info");const r=await this._userInfoService.getClaims(e.access_token);i.debug("user info claims received from user info endpoint"),s&&r.sub!==e.profile.sub&&i.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(r)),i.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t,s){const i=this._logger.create("_processCode");if(e.code){i.debug("Validating code");const r=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:s,...t.extraTokenParams});Object.assign(e,r)}else i.debug("No code to process")}_validateIdTokenAttributes(e,t){var s;const i=this._logger.create("_validateIdTokenAttributes");i.debug("decoding ID Token JWT");const r=W.decode((s=e.id_token)!=null?s:"");if(r.sub||i.throw(new Error("ID Token is missing a subject claim")),t){const o=W.decode(t);r.sub!==o.sub&&i.throw(new Error("sub in id_token does not match current sub")),r.auth_time&&r.auth_time!==o.auth_time&&i.throw(new Error("auth_time in id_token does not match original auth_time")),r.azp&&r.azp!==o.azp&&i.throw(new Error("azp in id_token does not match original azp")),!r.azp&&o.azp&&i.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=r}},N=class B{constructor(t){this.id=t.id||f.generateUUIDv4(),this.data=t.data,t.created&&t.created>0?this.created=t.created:this.created=T.getEpochTime(),this.request_type=t.request_type,this.url_state=t.url_state}toStorageString(){return new g("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return g.createStatic("State","fromStorageString"),Promise.resolve(new B(JSON.parse(t)))}static async clearStaleState(t,s){const i=g.createStatic("State","clearStaleState"),r=T.getEpochTime()-s,o=await t.getAllKeys();i.debug("got keys",o);for(let n=0;n<o.length;n++){const a=o[n],c=await t.get(a);let l=!1;if(c)try{const d=await B.fromStorageString(c);i.debug("got item from key:",a,d.created),d.created<=r&&(l=!0)}catch(d){i.error("Error parsing state for key:",a,d),l=!0}else i.debug("no item in storage for key:",a),l=!0;l&&(i.debug("removed item for key:",a),t.remove(a))}}},Y=class V extends N{constructor(t){super(t),this.code_verifier=t.code_verifier,this.code_challenge=t.code_challenge,this.authority=t.authority,this.client_id=t.client_id,this.redirect_uri=t.redirect_uri,this.scope=t.scope,this.client_secret=t.client_secret,this.extraTokenParams=t.extraTokenParams,this.response_mode=t.response_mode,this.skipUserInfo=t.skipUserInfo}static async create(t){const s=t.code_verifier===!0?f.generateCodeVerifier():t.code_verifier||void 0,i=s?await f.generateCodeChallenge(s):void 0;return new V({...t,code_verifier:s,code_challenge:i})}toStorageString(){return new g("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(t){g.createStatic("SigninState","fromStorageString");const s=JSON.parse(t);return V.create(s)}},he=class ge{constructor(t){this.url=t.url,this.state=t.state}static async create({url:t,authority:s,client_id:i,redirect_uri:r,response_type:o,scope:n,state_data:a,response_mode:c,request_type:l,client_secret:d,nonce:h,url_state:u,resource:p,skipUserInfo:U,extraQueryParams:C,extraTokenParams:A,disablePKCE:O,dpopJkt:R,omitScopeWhenRequesting:P,...q}){if(!t)throw this._logger.error("create: No url passed"),new Error("url");if(!i)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!r)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!o)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!n)throw this._logger.error("create: No scope passed"),new Error("scope");if(!s)throw this._logger.error("create: No authority passed"),new Error("authority");const m=await Y.create({data:a,request_type:l,url_state:u,code_verifier:!O,client_id:i,authority:s,redirect_uri:r,response_mode:c,client_secret:d,scope:n,extraTokenParams:A,skipUserInfo:U}),_=new URL(t);_.searchParams.append("client_id",i),_.searchParams.append("redirect_uri",r),_.searchParams.append("response_type",o),P||_.searchParams.append("scope",n),h&&_.searchParams.append("nonce",h),R&&_.searchParams.append("dpop_jkt",R);let E=m.id;u&&(E=`${E}${F}${u}`),_.searchParams.append("state",E),m.code_challenge&&(_.searchParams.append("code_challenge",m.code_challenge),_.searchParams.append("code_challenge_method","S256")),p&&(Array.isArray(p)?p:[p]).forEach(w=>_.searchParams.append("resource",w));for(const[S,w]of Object.entries({response_mode:c,...q,...C}))w!=null&&_.searchParams.append(S,w.toString());return new ge({url:_.href,state:m})}};he._logger=new g("SigninRequest");var De=he,We="openid",H=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(F);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(F))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-T.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+T.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(We))||!!this.id_token}},Je=class{constructor({url:e,state_data:t,id_token_hint:s,post_logout_redirect_uri:i,extraQueryParams:r,request_type:o,client_id:n}){if(this._logger=new g("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const a=new URL(e);s&&a.searchParams.append("id_token_hint",s),n&&a.searchParams.append("client_id",n),i&&(a.searchParams.append("post_logout_redirect_uri",i),t&&(this.state=new N({data:t,request_type:o}),a.searchParams.append("state",this.state.id)));for(const[c,l]of Object.entries({...r}))l!=null&&a.searchParams.append(c,l.toString());this.url=a.href}},ue=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},$e=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],Ke=["sub","iss","aud","exp","iat"],Le=class{constructor(e){this._settings=e,this._logger=new g("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let s;Array.isArray(this._settings.filterProtocolClaims)?s=this._settings.filterProtocolClaims:s=$e;for(const i of s)Ke.includes(i)||delete t[i]}return t}mergeClaims(e,t){const s={...e};for(const[i,r]of Object.entries(t))if(s[i]!==r)if(Array.isArray(s[i])||Array.isArray(r))if(this._settings.mergeClaimsStrategy.array=="replace")s[i]=r;else{const o=Array.isArray(s[i])?s[i]:[s[i]];for(const n of Array.isArray(r)?r:[r])o.includes(n)||o.push(n);s[i]=o}else typeof s[i]=="object"&&typeof r=="object"?s[i]=this.mergeClaims(s[i],r):s[i]=r;return s}},Z=class{constructor(e,t){this.keys=e,this.nonce=t}},_e=class{constructor(e,t){this._logger=new g("OidcClient"),this.settings=e instanceof J?e:new J(e),this.metadataService=t??new le(this.settings),this._claimsService=new Le(this.settings),this._validator=new He(this.settings,this.metadataService,this._claimsService),this._tokenClient=new de(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:s,request_type:i,id_token_hint:r,login_hint:o,skipUserInfo:n,nonce:a,url_state:c,response_type:l=this.settings.response_type,scope:d=this.settings.scope,redirect_uri:h=this.settings.redirect_uri,prompt:u=this.settings.prompt,display:p=this.settings.display,max_age:U=this.settings.max_age,ui_locales:C=this.settings.ui_locales,acr_values:A=this.settings.acr_values,resource:O=this.settings.resource,response_mode:R=this.settings.response_mode,extraQueryParams:P=this.settings.extraQueryParams,extraTokenParams:q=this.settings.extraTokenParams,dpopJkt:m,omitScopeWhenRequesting:_=this.settings.omitScopeWhenRequesting}){const E=this._logger.create("createSigninRequest");if(l!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const S=await this.metadataService.getAuthorizationEndpoint();E.debug("Received authorization endpoint",S);const w=await De.create({url:S,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:h,response_type:l,scope:d,state_data:e,url_state:c,prompt:u,display:p,max_age:U,ui_locales:C,id_token_hint:r,login_hint:o,acr_values:A,dpopJkt:m,resource:O,request:t,request_uri:s,extraQueryParams:P,extraTokenParams:q,request_type:i,response_mode:R,client_secret:this.settings.client_secret,skipUserInfo:n,nonce:a,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:_});await this.clearStaleState();const M=w.state;return await this.settings.stateStore.set(M.id,M.toStorageString()),w}async readSigninResponseState(e,t=!1){const s=this._logger.create("readSigninResponseState"),i=new H(L.readParams(e,this.settings.response_mode));if(!i.state)throw s.throw(new Error("No state in response")),null;const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await Y.fromStorageString(r),response:i}}async processSigninResponse(e,t){const s=this._logger.create("processSigninResponse"),{state:i,response:r}=await this.readSigninResponseState(e,!0);if(s.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){const o=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:o}}try{await this._validator.validateSigninResponse(r,i,t)}catch(o){if(o instanceof z&&this.settings.dpop){const n=await this.getDpopProof(this.settings.dpop.store,o.nonce);t.DPoP=n,await this._validator.validateSigninResponse(r,i,t)}else throw o}return r}async getDpopProof(e,t){let s,i;return(await e.getAllKeys()).includes(this.settings.client_id)?(i=await e.get(this.settings.client_id),i.nonce!==t&&t&&(i.nonce=t,await e.set(this.settings.client_id,i))):(s=await f.generateDPoPKeys(),i=new Z(s,t),await e.set(this.settings.client_id,i)),await f.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:i.keys,nonce:i.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s=!1,extraTokenParams:i={}}){const r=await this._tokenClient.exchangeCredentials({username:e,password:t,...i}),o=new H(new URLSearchParams);return Object.assign(o,r),await this._validator.validateCredentialsResponse(o,s),o}async useRefreshToken({state:e,redirect_uri:t,resource:s,timeoutInSeconds:i,extraHeaders:r,extraTokenParams:o}){var n;const a=this._logger.create("useRefreshToken");let c;if(this.settings.refreshTokenAllowedScope===void 0)c=e.scope;else{const h=this.settings.refreshTokenAllowedScope.split(" ");c=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(p=>h.includes(p)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){const h=await this.getDpopProof(this.settings.dpop.store);r={...r,DPoP:h}}let l;try{l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:t,resource:s,timeoutInSeconds:i,extraHeaders:r,...o})}catch(h){if(h instanceof z&&this.settings.dpop)r.DPoP=await this.getDpopProof(this.settings.dpop.store,h.nonce),l=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:c,redirect_uri:t,resource:s,timeoutInSeconds:i,extraHeaders:r,...o});else throw h}const d=new H(new URLSearchParams);return Object.assign(d,l),a.debug("validating response",d),await this._validator.validateRefreshResponse(d,{...e,scope:c}),d}async createSignoutRequest({state:e,id_token_hint:t,client_id:s,request_type:i,post_logout_redirect_uri:r=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){const n=this._logger.create("createSignoutRequest"),a=await this.metadataService.getEndSessionEndpoint();if(!a)throw n.throw(new Error("No end session endpoint")),null;n.debug("Received end session endpoint",a),!s&&r&&!t&&(s=this.settings.client_id);const c=new Je({url:a,id_token_hint:t,client_id:s,post_logout_redirect_uri:r,state_data:e,extraQueryParams:o,request_type:i});await this.clearStaleState();const l=c.state;return l&&(n.debug("Signout request has state to persist"),await this.settings.stateStore.set(l.id,l.toStorageString())),c}async readSignoutResponseState(e,t=!1){const s=this._logger.create("readSignoutResponseState"),i=new ue(L.readParams(e,this.settings.response_mode));if(!i.state){if(s.debug("No state in response"),i.error)throw s.warn("Response was error:",i.error),new x(i);return{state:void 0,response:i}}const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await N.fromStorageString(r),response:i}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:s,response:i}=await this.readSignoutResponseState(e,!0);return s?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(i,s)):t.debug("No state from storage; skipping response validation"),i}clearStaleState(){return this._logger.create("clearStaleState"),N.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},pe=class{constructor(e){this._userManager=e,this._logger=new g("SessionMonitor"),this._start=async t=>{const s=t.session_state;if(!s)return;const i=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,i.debug("session_state",s,", sub",this._sub)):(this._sub=void 0,i.debug("session_state",s,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(s);return}try{const r=await this._userManager.metadataService.getCheckSessionIframe();if(r){i.debug("initializing check session iframe");const o=this._userManager.settings.client_id,n=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,c=new ce(this._callback,o,r,n,a);await c.load(),this._checkSessionIFrame=c,c.start(s)}else i.warn("no check session iframe found in the metadata")}catch(r){i.error("Error from getCheckSessionIframe:",r instanceof Error?r.message:r)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const s=setInterval(async()=>{clearInterval(s);try{const i=await this._userManager.querySessionStatus();if(i){const r={session_state:i.session_state,profile:i.sub?{sub:i.sub}:null};this._start(r)}}catch(i){t.error("error from querySessionStatus",i instanceof Error?i.message:i)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const s=await this._userManager.querySessionStatus();let i=!0;s&&this._checkSessionIFrame?s.sub===this._sub?(i=!1,this._checkSessionIFrame.start(s.session_state),t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",s.session_state),await this._userManager.events._raiseUserSessionChanged()):t.debug("different subject signed into OP",s.sub):t.debug("subject no longer signed into OP"),i?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(s){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",s),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const s={session_state:t.session_state,profile:t.sub?{sub:t.sub}:null};this._start(s)}}}},D=class fe{constructor(t){var s;this.id_token=t.id_token,this.session_state=(s=t.session_state)!=null?s:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState,this.url_state=t.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-T.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+T.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,s;return(s=(t=this.scope)==null?void 0:t.split(" "))!=null?s:[]}toStorageString(){return new g("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return g.createStatic("User","fromStorageString"),new fe(JSON.parse(t))}},ie="oidc-client",we=class{constructor(){this._abort=new I("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:s,keepOpen:i}=await new Promise((r,o)=>{const n=a=>{var c;const l=a.data,d=(c=e.scriptOrigin)!=null?c:window.location.origin;if(!(a.origin!==d||(l==null?void 0:l.source)!==ie)){try{const h=L.readParams(l.url,e.response_mode).get("state");if(h||t.warn("no state found in response url"),a.source!==this._window&&h!==e.state)return}catch{this._dispose(),o(new Error("Invalid response from window"))}r(l)}};window.addEventListener("message",n,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",n,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),o(a)}))});return t.debug("got response from window"),this._dispose(),i||this.close(),{url:s}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,s=!1,i=window.location.origin){e.postMessage({source:ie,url:t,keepOpen:s},i)}},me={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},Se="_blank",Fe=60,ze=2,ve=10,ye=class extends J{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:s=e.post_logout_redirect_uri,popupWindowFeatures:i=me,popupWindowTarget:r=Se,redirectMethod:o="assign",redirectTarget:n="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:l,silent_redirect_uri:d=e.redirect_uri,silentRequestTimeoutInSeconds:h,automaticSilentRenew:u=!0,validateSubOnSilentRenew:p=!0,includeIdTokenInSilentRenew:U=!1,monitorSession:C=!1,monitorAnonymousSession:A=!1,checkSessionIntervalInSeconds:O=ze,query_status_response_type:R="code",stopCheckSessionOnError:P=!0,revokeTokenTypes:q=["access_token","refresh_token"],revokeTokensOnSignout:m=!1,includeIdTokenInSilentSignout:_=!1,accessTokenExpiringNotificationTimeInSeconds:E=Fe,userStore:S}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=s,this.popupWindowFeatures=i,this.popupWindowTarget=r,this.redirectMethod=o,this.redirectTarget=n,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=c,this.silent_redirect_uri=d,this.silentRequestTimeoutInSeconds=h||l||ve,this.automaticSilentRenew=u,this.validateSubOnSilentRenew=p,this.includeIdTokenInSilentRenew=U,this.monitorSession=C,this.monitorAnonymousSession=A,this.checkSessionIntervalInSeconds=O,this.stopCheckSessionOnError=P,this.query_status_response_type=R,this.revokeTokenTypes=q,this.revokeTokensOnSignout=m,this.includeIdTokenInSilentSignout=_,this.accessTokenExpiringNotificationTimeInSeconds=E,S)this.userStore=S;else{const w=typeof window<"u"?window.sessionStorage:new G;this.userStore=new X({store:w})}}},re=class be extends we{constructor({silentRequestTimeoutInSeconds:t=ve}){super(),this._logger=new g("IFrameWindow"),this._timeoutInSeconds=t,this._frame=be.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const t=window.document.createElement("iframe");return t.style.visibility="hidden",t.style.position="fixed",t.style.left="-1000px",t.style.top="0",t.width="0",t.height="0",window.document.body.appendChild(t),t}async navigate(t){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const s=setTimeout(()=>void this._abort.raise(new $("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(s)),await super.navigate(t)}close(){var t;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",s=>{var i;const r=s.target;(i=r.parentNode)==null||i.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(t=this._frame.contentWindow)==null||t.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(t,s){return super._notifyParent(window.parent,t,!1,s)}},Be=class{constructor(e){this._settings=e,this._logger=new g("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new re({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),re.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},Ve=500,Ge=1e3,ne=class extends we{constructor({popupWindowTarget:e=Se,popupWindowFeatures:t={},popupSignal:s}){super(),this._logger=new g("PopupWindow");const i=se.center({...me,...t});this._window=window.open(void 0,e,se.serialize(i)),s&&s.addEventListener("abort",()=>{var r;this._abort.raise(new Error((r=s.reason)!=null?r:"Popup aborted"))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*Ge)}async navigate(e){var t;(t=this._window)==null||t.focus();const s=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},Ve);return this._disposeHandlers.add(()=>clearInterval(s)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},Qe=class{constructor(e){this._settings=e,this._logger=new g("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:s}){return new ne({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:s})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),ne.notifyOpener(e,t)}},Xe=class{constructor(e){this._settings=e,this._logger=new g("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var s;this._logger.create("prepare");let i=window.self;t==="top"&&(i=(s=window.top)!=null?s:window.self);const r=i.location[e].bind(i.location);let o;return{navigate:async n=>{this._logger.create("navigate");const a=new Promise((c,l)=>{o=l});return r(n.url),await a},close:()=>{this._logger.create("close"),o==null||o(new Error("Redirect aborted")),i.stop()}}}async callback(){}},Ye=class extends ae{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new g("UserManagerEvents"),this._userLoaded=new I("User loaded"),this._userUnloaded=new I("User unloaded"),this._silentRenewError=new I("Silent renew error"),this._userSignedIn=new I("User signed in"),this._userSignedOut=new I("User signed out"),this._userSessionChanged=new I("User session changed")}async load(e,t=!0){super.load(e),t&&await this._userLoaded.raise(e)}async unload(){super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},Ze=class{constructor(e){this._userManager=e,this._logger=new g("SilentRenewService"),this._isStarted=!1,this._retryTimer=new T("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(s){if(s instanceof $){t.warn("ErrorTimeout from signinSilent:",s,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",s),await this._userManager.events._raiseSilentRenewError(s)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},et=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},tt=class{constructor(e,t,s,i){this._logger=new g("UserManager"),this.settings=new ye(e),this._client=new _e(e),this._redirectNavigator=t??new Xe(this.settings),this._popupNavigator=s??new Qe(this.settings),this._iframeNavigator=i??new Be(this.settings),this._events=new Ye(this.settings),this._silentRenewService=new Ze(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new pe(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),await this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){var t;this._logger.create("signinRedirect");const{redirectMethod:s,...i}=e;let r;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));const o=await this._redirectNavigator.prepare({redirectMethod:s});await this._signinStart({request_type:"si:r",dpopJkt:r,...i},o)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),s=await this._signinEnd(e);return s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject"),s}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:s=!1}){const i=this._logger.create("signinResourceOwnerCredential"),r=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s,extraTokenParams:this.settings.extraTokenParams});i.debug("got signin response");const o=await this._buildUser(r);return o.profile&&o.profile.sub?i.info("success, signed in subject",o.profile.sub):i.info("no subject"),o}async signinPopup(e={}){var t;const s=this._logger.create("signinPopup");let i;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(i=await this.generateDPoPJkt(this.settings.dpop));const{popupWindowFeatures:r,popupWindowTarget:o,popupSignal:n,...a}=e,c=this.settings.popup_redirect_uri;c||s.throw(new Error("No popup_redirect_uri configured"));const l=await this._popupNavigator.prepare({popupWindowFeatures:r,popupWindowTarget:o,popupSignal:n}),d=await this._signin({request_type:"si:p",redirect_uri:c,display:"popup",dpopJkt:i,...a},l);return d&&(d.profile&&d.profile.sub?s.info("success, signed in subject",d.profile.sub):s.info("no subject")),d}async signinPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async signinSilent(e={}){var t,s;const i=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:r,...o}=e;let n=await this._loadUser();if(n!=null&&n.refresh_token){i.debug("using refresh token");const h=new et(n);return await this._useRefreshToken({state:h,redirect_uri:o.redirect_uri,resource:o.resource,extraTokenParams:o.extraTokenParams,timeoutInSeconds:r})}let a;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(a=await this.generateDPoPJkt(this.settings.dpop));const c=this.settings.silent_redirect_uri;c||i.throw(new Error("No silent_redirect_uri configured"));let l;n&&this.settings.validateSubOnSilentRenew&&(i.debug("subject prior to silent renew:",n.profile.sub),l=n.profile.sub);const d=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});return n=await this._signin({request_type:"si:s",redirect_uri:c,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?n==null?void 0:n.id_token:void 0,dpopJkt:a,...o},d,l),n&&((s=n.profile)!=null&&s.sub?i.info("success, signed in subject",n.profile.sub):i.info("no subject")),n}async _useRefreshToken(e){const t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),s=new D({...e.state,...t});return await this.storeUser(s),await this._events.load(s),s}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":await this.signinPopupCallback(e);break;case"si:s":await this.signinSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:s}=await this._client.readSignoutResponseState(e);if(s)switch(s.request_type){case"so:r":return await this.signoutRedirectCallback(e);case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:s,...i}=e,r=this.settings.silent_redirect_uri;r||t.throw(new Error("No silent_redirect_uri configured"));const o=await this._loadUser(),n=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:s}),a=await this._signinStart({request_type:"si:s",redirect_uri:r,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...i},n);try{const c={},l=await this._client.processSigninResponse(a.url,c);return t.debug("got signin response"),l.session_state&&l.profile.sub?(t.info("success for subject",l.profile.sub),{session_state:l.session_state,sub:l.profile.sub}):(t.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof x)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,t,s){const i=await this._signinStart(e,t);return await this._signinEnd(i.url,s)}async _signinStart(e,t){const s=this._logger.create("_signinStart");try{const i=await this._client.createSigninRequest(e);return s.debug("got signin request"),await t.navigate({url:i.url,state:i.state.id,response_mode:i.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw s.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signinEnd(e,t){const s=this._logger.create("_signinEnd"),i={},r=await this._client.processSigninResponse(e,i);return s.debug("got signin response"),await this._buildUser(r,t)}async _buildUser(e,t){const s=this._logger.create("_buildUser"),i=new D(e);if(t){if(t!==i.profile.sub)throw s.debug("current user does not match user returned from signin. sub from signin:",i.profile.sub),new x({...e,error:"login_required"});s.debug("current user matches user returned from signin")}return await this.storeUser(i),s.debug("user stored"),await this._events.load(i),i}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:s,...i}=e,r=await this._redirectNavigator.prepare({redirectMethod:s});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...i},r),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),s=await this._signoutEnd(e);return t.info("success"),s}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:s,popupWindowTarget:i,popupSignal:r,...o}=e,n=this.settings.popup_post_logout_redirect_uri,a=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:i,popupSignal:r});await this._signout({request_type:"so:p",post_logout_redirect_uri:n,state:n==null?void 0:{},...o},a),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async _signout(e,t){const s=await this._signoutStart(e,t);return await this._signoutEnd(s.url)}async _signoutStart(e={},t){var s;const i=this._logger.create("_signoutStart");try{const r=await this._loadUser();i.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);const o=e.id_token_hint||r&&r.id_token;o&&(i.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),i.debug("user removed, creating signout request");const n=await this._client.createSignoutRequest(e);return i.debug("got signout request"),await t.navigate({url:n.url,state:(s=n.state)==null?void 0:s.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw i.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),s=await this._client.processSignoutResponse(e);return t.debug("got signout response"),s}async signoutSilent(e={}){var t;const s=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:i,...r}=e,o=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,n=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});await this._signout({request_type:"so:s",post_logout_redirect_uri:n,id_token_hint:o,...r},a),s.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const s=this._logger.create("_revokeInternal");if(!e)return;const i=t.filter(r=>typeof e[r]=="string");if(!i.length){s.debug("no need to revoke due to no token(s)");return}for(const r of i)await this._client.revokeToken(e[r],r),s.info(`${r} revoked successfully`),r!=="access_token"&&(e[r]=null);await this.storeUser(e),s.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),D.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const s=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,s)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,s,i){var r,o;const n=await((o=(r=this.settings.dpop)==null?void 0:r.store)==null?void 0:o.get(this.settings.client_id));if(n)return await f.generateDPoPProof({url:e,accessToken:t==null?void 0:t.access_token,httpMethod:s,keyPair:n.keys,nonce:i})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);if(!t){const s=await f.generateDPoPKeys();t=new Z(s),await e.store.set(this.settings.client_id,t)}return await f.generateDPoPJkt(t.keys)}};exports.AccessTokenEvents=ae;exports.CheckSessionIFrame=ce;exports.DPoPState=Z;exports.ErrorResponse=x;exports.ErrorTimeout=$;exports.InMemoryWebStorage=G;exports.Logger=g;exports.MetadataService=le;exports.OidcClient=_e;exports.OidcClientSettingsStore=J;exports.SessionMonitor=pe;exports.SigninResponse=H;exports.SigninState=Y;exports.SignoutResponse=ue;exports.State=N;exports.User=D;exports.UserManager=tt;exports.UserManagerSettingsStore=ye;exports.WebStorageStateStore=X;
|
package/index.cjs95.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(r){var o,e,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var u=r.length;for(o=0;o<u;o++)r[o]&&(e=n(r[o]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function f(){for(var r,o,e=0,t="",u=arguments.length;e<u;e++)(r=arguments[e])&&(o=n(r))&&(t&&(t+=" "),t+=o);return t}exports.clsx=f;exports.default=f;
|