diff --git a/resources/24ramambo/ulc.lua b/resources/24ramambo/ulc.lua new file mode 100644 index 000000000..bd10df0d6 --- /dev/null +++ b/resources/24ramambo/ulc.lua @@ -0,0 +1,56 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"24ramambo"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = true, + useSync = true, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {10}, + dExtras = {11} + }, + hornConfig = { + useHorn = false, + hornExtras = {}, + }, + brakeConfig = { + useBrakes = false, + speedThreshold = 3, + brakeExtras = {}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {} + }, + doorConfig = { + useDoors = false, + driverSide = {enable = {}, disable = {}}, + passSide = {enable = {}, disable = {}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "Stage 1", key = 1, color = "red", extra = 2, linkedExtras = {2}, oppositeExtras = {}, offExtras = {1}, repair = false}, + {label = "Stage 2", key = 2, color = "red", extra = 1, linkedExtras = {1}, oppositeExtras = {}, offExtras = {2}, repair = false}, + {label = "Cruise", key = 3, color = "red", extra = 3, linkedExtras = {3}, oppositeExtras = {}, offExtras = {2,1,4,5,6}, repair = false}, + {label = "TKDN", key = 4, color = "red", extra = 4, linkedExtras = {4}, oppositeExtras = {}, offExtras = {3,2,1,5,6}, repair = false}, + {label = "<-", key = 5, color = "amber", extra = 5, linkedExtras = {5}, oppositeExtras = {}, offExtras = {6}, repair = false}, + {label = "->", key = 6, color = "amber", extra = 6, linkedExtras = {6}, oppositeExtras = {}, offExtras = {5}, repair = false} + + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/24sub/ulc.lua b/resources/24sub/ulc.lua index 5a30cce0f..247688624 100644 --- a/resources/24sub/ulc.lua +++ b/resources/24sub/ulc.lua @@ -15,9 +15,9 @@ return {names = {"24sub"}, parkConfig = { usePark = true, useSync = true, - syncWith = {}, - pExtras = {2}, - dExtras = {1} + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {10}, + dExtras = {11} }, hornConfig = { useHorn = false, diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carcols.meta b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carcols.meta new file mode 100644 index 000000000..7b4beb17b --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carcols.meta @@ -0,0 +1,1326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VehicleLight_car_standardmodern + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2020interceptorutility + + + + + + ccso1 + + + + + + + VehicleLight_sirenlight + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carvariations.meta b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carvariations.meta new file mode 100644 index 000000000..b3b6f9d49 --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/carvariations.meta @@ -0,0 +1,62 @@ + + + + + ccso1 + + + + 0 + 134 + 0 + 64 + 64 + 64 + 64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0_default_modkit + + + + + + Police guv plate + + + + + + + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/handling.meta b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/handling.meta new file mode 100644 index 000000000..24956473a --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/handling.meta @@ -0,0 +1,67 @@ + + + + + + FUCKASSEXPLORER1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 440010 + 0 + 0 + AVERAGE + + + + + + + + + + + + diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/ulc.lua new file mode 100644 index 000000000..abb8fc95b --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/ulc.lua @@ -0,0 +1,59 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"ccso1"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = true, + useSync = true, + syncWith = {"ccso1, "615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo","ccso1", "gpdchief1",}, + pExtras = {1,2}, + dExtras = {3,4,10} + }, + hornConfig = { + useHorn = false, + hornExtras = {}, + disableExtras = {} + }, + brakeConfig = { + useBrakes = false, + speedThreshold = 3, + brakeExtras = {}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {}, + disableExtras = {} + }, + doorConfig = { + useDoors = false, + driverSide = {enable = {}, disable = {}}, + passSide = {enable = {}, disable = {}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "Park", key = 1, color = "green", extra = 1, linkedExtras = {2}, oppositeExtras = {}, offExtras = {3,4,5,6}, repair = false}, + {label = "Drive", key = 2, color = "green", extra = 3, linkedExtras = {4}, oppositeExtras = {}, offExtras = {1,2,6,5}, repair = false}, + {label = "Takedowns", key = 3, color = "green", extra = 5, linkedExtras = {}, oppositeExtras = {}, offExtras = {3}, repair = false}, + {label = "Cruise", key = 4, color = "green", extra = 6, linkedExtras = {7,8,9}, oppositeExtras = {}, offExtras = {}, repair = false} + }, + stages = { + useStages = false, + stageKeys = {}, + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/vehicles.meta b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/vehicles.meta new file mode 100644 index 000000000..19ec8a70c --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/data/ccso1/vehicles.meta @@ -0,0 +1,143 @@ + + + vehshare + + + + ccso1 + ccso1 + FUCKASSEXPLORER1 + CODE3 + + null + null + null + null + + null + ecoboostv6 + LAYOUT_STD_EXITFIXUP + POLICE3_COVER_OFFSET_INFO + EXPLOSION_INFO_DEFAULT + + DEFAULT_FOLLOW_VEHICLE_CAMERA + MID_BOX_VEHICLE_AIM_CAMERA + VEHICLE_BONNET_CAMERA_MID_NEAR + DEFAULT_POV_CAMERA + + + + + + + + + + + + + + + + + + + + + + + + + + + + VFXVEHICLEINFO_CAR_GENERIC + + + + + + + + + + + + + + + + + + + + + + 35.000000 + 55.000000 + 70.000000 + 140.000000 + 500.000000 + 500.000000 + + + + + + + + + + + SWANKNESS_0 + + FLAG_EXTRAS_STRONG FLAG_HAS_LIVERY FLAG_EXTRAS_ALL FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_NO_RESPRAY FLAG_DONT_SPAWN_IN_CARGEN FLAG_HAS_INTERIOR_EXTRAS FLAG_REPORT_CRIME_IF_STANDING_ON + VEHICLE_TYPE_CAR + VPT_BACK_PLATES + VDT_FEROCI + VC_EMERGENCY + VWT_SPORT + + + + + S_M_Y_Cop_01 + + + + + + + + + + + REWARD_WEAPON_PUMPSHOTGUN + REWARD_AMMO_PUMPSHOTGUN_ENTER_VEHICLE + REWARD_STAT_WEAPON + + + WHEEL_FRONT_RIGHT_CAMERA + WHEEL_FRONT_LEFT_CAMERA + WHEEL_REAR_RIGHT_CAMERA + WHEEL_REAR_LEFT_CAMERA + + + + + + + STD_POLICE3_FRONT_LEFT + STD_POLICE3_FRONT_RIGHT + STD_POLICE2_REAR_LEFT + STD_POLICE2_REAR_RIGHT + + + + + + vehicles_feroci_interior + FPIUK + + + \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1+hi.ytd b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1+hi.ytd new file mode 100644 index 000000000..45097ef57 --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1+hi.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3a7cf1d150148620a20c85d3feffe52132647f5952b44b1c1f3f1f94119af1a +size 2959635 diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.yft b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.yft new file mode 100644 index 000000000..904b35a9b --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02fca81de9a8130277bbbcca9fdb28dd4eab4d152ec80e6831c7e33165afdbaa +size 4006045 diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.ytd b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.ytd new file mode 100644 index 000000000..a6494ab9d --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1.ytd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7f82a3d741c7c1eef02d4134e3459ab7cd73771d21cbd33066666781e8b71f5 +size 7239344 diff --git a/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1_hi.yft b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1_hi.yft new file mode 100644 index 000000000..914d9d1ad --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Bcso/stream/ccso1/ccso1_hi.yft @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6125b5ccc309de2d5a302ba8b55327b10b19df91cca117421d13ffd53f9d81d +size 5841205 diff --git a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/st23tahoe/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/st23tahoe/ulc.lua index aff7811b2..c740650ad 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Emergency/data/st23tahoe/ulc.lua +++ b/resources/[EGRP-CarPacks]/EGRP-Emergency/data/st23tahoe/ulc.lua @@ -14,10 +14,10 @@ return {names = {"st23tahoe"}, }, parkConfig = { usePark = true, - useSync = false, - syncWith = {}, - pExtras = {4}, - dExtras = {3,5} + useSync = true, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {11}, + dExtras = {10,15} }, hornConfig = { useHorn = false, diff --git a/resources/[EGRP-CarPacks]/EGRP-Extras/data/128durango/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Extras/data/128durango/ulc.lua new file mode 100644 index 000000000..d12ef9b4f --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Extras/data/128durango/ulc.lua @@ -0,0 +1,60 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"128"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = true, + useSync = true, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {11}, + dExtras = {10} + }, + hornConfig = { + useHorn = false, + hornExtras = {}, + disableExtras = {} + }, + brakeConfig = { + useBrakes = false, + speedThreshold = 3, + brakeExtras = {}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {}, + disableExtras = {} + }, + doorConfig = { + useDoors = false, + driverSide = {enable = {}, disable = {}}, + passSide = {enable = {}, disable = {}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "GSP Cover", key = 1, color = "green", extra = 1, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Park Lights", key = 2, color = "green", extra = 2, linkedExtras = {3,4,5}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Drive Lights", key = 3, color = "green", extra = 6, linkedExtras = {7}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Cruise Lights", key = 4, color = "green", extra = 8, linkedExtras = {9,10,11}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Flood Lights", key = 5, color = "green", extra = 12, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false} + }, + stages = { + useStages = false, + stageKeys = {}, + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Extras/data/640/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Extras/data/640/ulc.lua new file mode 100644 index 000000000..de5e5b0fe --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Extras/data/640/ulc.lua @@ -0,0 +1,51 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"640"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = true, + useSync = true, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {10}, + dExtras = {11} + }, + hornConfig = { + useHorn = true, + hornExtras = {12}, + }, + brakeConfig = { + useBrakes = true, + speedThreshold = 3, + brakeExtras = {7}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {} + }, + doorConfig = { + useDoors = true, + driverSide = {enable = {}, disable = {5}}, + passSide = {enable = {}, disable = {6}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "Main Lights", key = 1, color = "green", extra = 1, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Cruise Lights", key = 2, color = "green", extra = 3, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false} + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Extras/data/704/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Extras/data/704/ulc.lua new file mode 100644 index 000000000..20793bef4 --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Extras/data/704/ulc.lua @@ -0,0 +1,60 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"704"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = false, + useSync = false, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {10}, + dExtras = {11} + }, + hornConfig = { + useHorn = false, + hornExtras = {}, + disableExtras = {} + }, + brakeConfig = { + useBrakes = false, + speedThreshold = 3, + brakeExtras = {}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {}, + disableExtras = {} + }, + doorConfig = { + useDoors = false, + driverSide = {enable = {}, disable = {}}, + passSide = {enable = {}, disable = {}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "GSP Cover", key = 1, color = "green", extra = 1, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Park Lights", key = 2, color = "green", extra = 2, linkedExtras = {3,4,5}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Drive Lights", key = 3, color = "green", extra = 6, linkedExtras = {7}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Cruise Lights", key = 4, color = "green", extra = 8, linkedExtras = {9,10,11}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Flood Lights", key = 5, color = "green", extra = 12, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false} + }, + stages = { + useStages = false, + stageKeys = {}, + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Extras/data/gpd7/ulc.lua b/resources/[EGRP-CarPacks]/EGRP-Extras/data/gpd7/ulc.lua new file mode 100644 index 000000000..60f4e6189 --- /dev/null +++ b/resources/[EGRP-CarPacks]/EGRP-Extras/data/gpd7/ulc.lua @@ -0,0 +1,60 @@ + +--[[ + Ultimate Lighting Controller Config + the ULC resource is required to use this configuration + get the resource here: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/latest + To learn how to setup and use ULC visit here: https://docs.dwnstr.com/ulc/overview +]] + +return {names = {"gpd7"}, + steadyBurnConfig = { + forceOn = false, useTime = false, + disableWithLights = false, + sbExtras = {} + }, + parkConfig = { + usePark = true, + useSync = true, + syncWith = {"615", "376", "gpd7", "640", "128", "704", "st23tahoe", "24sub", "24ramambo", "23sierrafire", "23gmcleoslick", "23gmcleo", "ccso1", "gpdchief1" }, + pExtras = {11}, + dExtras = {10} + }, + hornConfig = { + useHorn = false, + hornExtras = {}, + disableExtras = {} + }, + brakeConfig = { + useBrakes = false, + speedThreshold = 3, + brakeExtras = {}, + disableExtras = {} + }, + reverseConfig = { + useReverse = false, + reverseExtras = {}, + disableExtras = {} + }, + doorConfig = { + useDoors = false, + driverSide = {enable = {}, disable = {}}, + passSide = {enable = {}, disable = {}}, + trunk = {enable ={}, disable = {}} + }, + buttons = { + {label = "Front", key = 1, color = "green", extra = 1, linkedExtras = {}, oppositeExtras = {}, offExtras = {6,7}, repair = false}, + {label = "Front White", key = 2, color = "green", extra = 2, linkedExtras = {}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Rear", key = 3, color = "green", extra = 3, linkedExtras = {4}, oppositeExtras = {}, offExtras = {}, repair = false}, + {label = "Takedowns", key = 4, color = "green", extra = 5, linkedExtras = {}, oppositeExtras = {}, offExtras = {1,2}, repair = false}, + {label = "Cruise", key = 5, color = "green", extra = 6, linkedExtras = {7}, oppositeExtras = {}, offExtras = {}, repair = false} + }, + stages = { + useStages = false, + stageKeys = {}, + }, + defaultStages = { + useDefaults = false, + enableKeys = {}, + disableKeys = {} + } +} \ No newline at end of file diff --git a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016RamSlick/2016ramslick.ytd b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016RamSlick/2016ramslick.ytd index d90b985f9..b122e7810 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016RamSlick/2016ramslick.ytd +++ b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016RamSlick/2016ramslick.ytd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6cb5da1ba73aea0c21692541f91813826b61ee7505657745a06c160a2b7e8785 -size 13132942 +oid sha256:4d92c138e9073b653b92f9b89c6ea25aa4d31a8877d7041c6d03846ef5def78c +size 12274676 diff --git a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ram/2016ram.ytd b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ram/2016ram.ytd index e06237873..2b09ea0a8 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ram/2016ram.ytd +++ b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ram/2016ram.ytd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1405d2ee890b353220e21461a28c7a2f41dd56f793b6d7d9d51926736e0d55cb -size 15719384 +oid sha256:0603551faa57a4e3d1c8c3401759fcaf72dfebb00387dcacf6889aa42e6d2d6c +size 14742061 diff --git a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ramk9/2016ramk9.ytd b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ramk9/2016ramk9.ytd index f8f5919a6..5b1674c76 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ramk9/2016ramk9.ytd +++ b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2016ramk9/2016ramk9.ytd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ee1134b57efaf9508ad9171156fb97c666346530580b5812909e76940488146 -size 18126658 +oid sha256:87f947e8998960795a79e0eaae6db4a936d433a4dbd5771c711b2353858490d7 +size 17305190 diff --git a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoe/2022tahoe.ytd b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoe/2022tahoe.ytd index 4c8817346..67357cd3a 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoe/2022tahoe.ytd +++ b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoe/2022tahoe.ytd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:442e844fc16774f44526d2403bda72acf9db2774f368663d33b4ac045df1de7f -size 16813867 +oid sha256:072847e6228c03afa99fb8f6d06801d50c488d4ca4319c1d509fb69799c554e9 +size 16825681 diff --git a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoeslick/2022tahoeslick.ytd b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoeslick/2022tahoeslick.ytd index 7e536651a..594671f8c 100644 --- a/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoeslick/2022tahoeslick.ytd +++ b/resources/[EGRP-CarPacks]/EGRP-Sasp/stream/2022tahoeslick/2022tahoeslick.ytd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e5ac8eaed69bf05eca3ff137a302347c01169b22f7f463173b0bbdf962e12d7 -size 13944609 +oid sha256:f3630184f258681b22dc0e57eefb4857dd9c5c552bf89c1969c171663520713a +size 14132975 diff --git a/resources/ulc/client/c_beeps.lua b/resources/ulc/client/c_beeps.lua new file mode 100644 index 000000000..64ce900a8 --- /dev/null +++ b/resources/ulc/client/c_beeps.lua @@ -0,0 +1,38 @@ + +------------------------- +--------- SOUND --------- +------------------------- + +function PlayBeep(highPitched) + if highPitched then + PlaySoundFrontend(-1, "5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 1) + else + PlaySoundFrontend(-1, "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS", 1) + end +end + +--[[ +coming soon, once client options arrive it will be opt in per client + +--------------- +-- REMINDERS -- +--------------- +local mute = false + +if Config.reminderBeeps then + CreateThread(function() + while true do Wait(Config.reminderBeepTime * 1000) + if Lights and not mute then PlayBeep(false) end + end + end) +end + +RegisterCommand('mutelights', function() + mute = not mute + if mute then + print("Lighting reminders muted.") + else + print("Lighting reminders unmuted.") + end +end) +]] \ No newline at end of file diff --git a/resources/ulc/client/c_blackout.lua b/resources/ulc/client/c_blackout.lua new file mode 100644 index 000000000..82d89d2a4 --- /dev/null +++ b/resources/ulc/client/c_blackout.lua @@ -0,0 +1,114 @@ +local rblIntegration = false + +function ULC:SetBlackout(newState) + --print("Setting blackout to " .. newState) + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + if newState == 0 then + -- do blackout stuff + -- turn off headlights + SetVehicleLights(vehicle, 1) + -- turn off emergency lights + SetVehicleSiren(vehicle, false) + -- turn off specified blackout extras? + -- might need to just make a blackout file and config section, i think this can work when brake patterns aren't being used? + -- turn off cruise lights (do in c_cruise.lua) + -- if lights are turned on with q, or h, or a button is pressed, cancel effect, not sure how to do this. + -- when these actions are done check [if Entity(GetVehiclePedIsIn(PlayerPedId())).state.rbl_blackout or ulc_blackout] <- depending on if these can be accessed when not defined, may have to just use a static global variable in here. + + -- if rbl is not loaded, start checking if vehicle is moving to disable blackout, rbl handles this itself if loaded + if not rblIntegration then + CreateThread(function() + while true do Wait(500) + if Entity(vehicle).state.ulc_blackout == 1 then ULC:SetBlackout(1) return end + local speed = GetEntitySpeed(vehicle) * 2.236936 + --print("Speed is " .. speed) + if speed > 5 then ULC:SetBlackout(1) return end + end + end) + end + elseif newState == 1 then + -- do undo blackout stuff + SetVehicleLights(vehicle, 0) + end +end + +-- add statebag change handler for ulc_blackout +AddStateBagChangeHandler('ulc_blackout', null, function(bagName, key, value) + Wait(0) + local vehicle = GetEntityFromStateBagName(bagName) + --print("ulc_blackout listener: Vehicle is " .. vehicle .. " and GetVehiclePedIsIn(PlayerPedId()) is " .. GetVehiclePedIsIn(PlayerPedId())) + if vehicle == 0 or vehicle ~= GetVehiclePedIsIn(PlayerPedId()) then + print("ulc_blackout listener: Vehicle is 0 or not mine.") + return + end + local blackout = value + --print("ulc_blackout listener: new state value is " .. tostring(blackout)) + if blackout == 0 then + ULC:SetBlackout(0) + elseif blackout == 1 then + ULC:SetBlackout(1) + end +end) + +-- add statebag change handler for rbl blackout +AddStateBagChangeHandler('rbl_blackout', null, function(bagName, key, value) + Wait(0) + rblIntegration = true + local vehicle = GetEntityFromStateBagName(bagName) + --print("rbl_blackout listener: Vehicle is " .. vehicle .. " and GetVehiclePedIsIn(PlayerPedId()) is " .. GetVehiclePedIsIn(PlayerPedId())) + if vehicle == 0 or vehicle ~= GetVehiclePedIsIn(PlayerPedId()) then + --print("rbl_blackout listener: Vehicle is 0 or not mine") + return + end + local blackout = value + --print("rbl_blackout listener: new state value is " .. tostring(blackout)) + if blackout == true then + --print("rbl_blackout listener: setting blackout to 0") + ULC:SetBlackout(0) + elseif blackout == false then + --print("rbl_blackout listener: setting blackout to 1") + ULC:SetBlackout(1) + end +end) + +-- register command for blackout + +-- if rbl loads first then ULC + -- ulc will overwrite command + -- ULC needs to trigger rbl:setBlackout state change on server + -- ULC only manages the extras + +-- if ulc loads first then rbl + -- rbl will overwrite command + -- rbl needs to trigger ulc:setBlackout state change on server + -- rbl only manages the brake lights + +RegisterCommand('blackout', function() + local newState + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + if not vehicle then return end + local currentState = Entity(vehicle).state.ulc_blackout + --print("/blackout: Current state: " .. tostring(currentState)) + if currentState == nil or currentState == 1 then + print("Setting blackout to true/0") + newState = 0 + elseif currentState == 0 then + print("Setting blackout to false/1") + newState = 1 + end + -- trigger server event to set blackout on my vehicle + -- might need to extract this to an event/function to control the effect programmatically, like disbling when q pressed + TriggerServerEvent('ulc:setBlackout', VehToNet(GetVehiclePedIsIn(PlayerPedId())), newState) + TriggerServerEvent('rbl:setBlackout', VehToNet(GetVehiclePedIsIn(PlayerPedId())), newState) +end) + -- toggle blackout state on vehicle + + +------------------------------- +-- DISABLE BLACKOUT TRIGGERS -- +------------------------------- + +--TODO when H is pressed to control headlights disable blackout +--TODO when Q is pressed to control emergency lights disable blackout + + diff --git a/resources/ulc/client/c_brake.lua b/resources/ulc/client/c_brake.lua new file mode 100644 index 000000000..ed7b1a931 --- /dev/null +++ b/resources/ulc/client/c_brake.lua @@ -0,0 +1,137 @@ +--print("[ULC] Brake Extras Loaded") +local realBrakeThreshold = 3 +local shouldUseRealBrakes = function() + return (MyVehicleConfig.brakeConfig.speedThreshold or 3) <= realBrakeThreshold +end +local braking = false + +------------------- +-- MAIN FUNCTIONS -- +------------------- + +local disabledExtras = {} + +local function setBrakeExtras(newState) + for _, v in pairs(MyVehicleConfig.brakeConfig.brakeExtras) do + local currentState + if IsVehicleExtraTurnedOn(MyVehicle, v) then currentState = 0 else currentState = 1 end + --print("[ULC] setBrakeExtras() newState: " .. newState .. " currentState: " .. currentState) + if currentState == newState then break end + ULC:SetStage(v, newState, false, true, false, false, true, false) + end + if newState == 0 then + -- disable the disable extras and save the ones that we change + if not MyVehicleConfig.brakeConfig.disableExtras then return end + for _, v in pairs(MyVehicleConfig.brakeConfig.disableExtras) do + if IsVehicleExtraTurnedOn(MyVehicle, v) then + ULC:SetStage(v, 1, false, true, false, false, true, false) + table.insert(disabledExtras, v) + end + end + elseif newState == 1 then + -- re-enable any extras that were disabled + for _, v in pairs(disabledExtras) do + ULC:SetStage(v, 0, false, true, false, false, true, false) + end + disabledExtras = {} + end +end + + +---------------------------- +-- REALISTIC BRAKE LIGHTS -- +---------------------------- +if shouldUseRealBrakes then + print("Realistic brake light functionality intialized.") + local mode = "STANDARD" + + -- start checking if stopped manually with a loop + CreateThread(function() + local sleep = 1000 + while true do + Wait(sleep) + -- if rbl_brakelights change handler gets triggered that means rbl exists and we want to use that functionality instead, return from this loop + if mode == "RBL" then + print("real-brake-lights resource detected, integrating brakelight functionality.") + return + end + if not MyVehicle then + sleep = 1000 + goto continue + end + if not shouldUseRealBrakes() then + sleep = 1000 + goto continue + end + if not MyVehicleConfig.brakeConfig.useBrakes then + sleep = 1000 + goto continue + end + if braking then goto continue end + sleep = 250 + local speed = GetVehicleSpeedConverted(MyVehicle) + if speed < realBrakeThreshold and shouldUseRealBrakes() and not IsControlPressed(0, 72) then + --print("[manual checks] Enabling brakes") + setBrakeExtras(0) + else + --print("[manual checks] Disabling brakes") + setBrakeExtras(1) + end + ::continue:: + end + end) + + -- add a statebag change handler for rbl_brakelights + -- once this is triggered, disable manual checking + AddStateBagChangeHandler('rbl_brakelights', null, function(bagName, key, value) + Wait(0) -- Nedded as GetEntityFromStateBagName sometimes returns 0 on first frame + mode = "RBL" -- set mode to RBL to disable manual checking + if not MyVehicle then return end + if not MyVehicleConfig.brakeConfig.useBrakes then return end + local vehicle = GetEntityFromStateBagName(bagName) + --print("state changed for vehicle") + if vehicle == 0 or vehicle ~= MyVehicle then return end + local newState + if value then newState = 0 else newState = 1 end + --print("ULC: Setting brakes to state" .. newState) + setBrakeExtras(newState) + end) +end + +----------------- +-- KEYBINDINGS -- +----------------- + +-- pressed brakes +RegisterCommand('+ulc:brakePattern', function() + braking = true + if MyVehicle and MyVehicleConfig.brakeConfig.useBrakes then + if GetVehicleCurrentGear(MyVehicle) == 0 then return end -- disable while reversing + --print("Enabling brakes") + local speed = GetVehicleSpeedConverted(MyVehicle) + -- if using real brakes always enable + if shouldUseRealBrakes() or speed > (MyVehicleConfig.brakeConfig.speedThreshold or 3) then + setBrakeExtras(0) + end + end + SendNUIMessage({ + type = 'toggleBrakeIndicator', + state = true + }) +end) + +RegisterCommand('-ulc:brakePattern', function() + braking = false + if MyVehicle and MyVehicleConfig.brakeConfig.useBrakes then + local speed = GetVehicleSpeedConverted(MyVehicle) + if shouldUseRealBrakes() and speed < realBrakeThreshold then return end + --print("Disabling brakes") + setBrakeExtras(1) + end + SendNUIMessage({ + type = 'toggleBrakeIndicator', + state = false + }) +end) + +RegisterKeyMapping('+ulc:brakePattern', 'ULC: Activate Brake Pattern (Hold)', 'keyboard', 's') diff --git a/resources/ulc/client/c_buttons.lua b/resources/ulc/client/c_buttons.lua new file mode 100644 index 000000000..cb529c7d2 --- /dev/null +++ b/resources/ulc/client/c_buttons.lua @@ -0,0 +1,275 @@ +--print("[ULC]: Stage Controls Loaded") + +------------------- +------------------- +----- HELPERS ----- +------------------- +------------------- + +function GetExtraByKey(key) + local result = nil + for _, v in pairs(MyVehicleConfig.buttons) do + if v.key == key then + result = v.extra + end + end + return result +end + +function GetButtonByExtra(extra) + local result = nil + for _, v in pairs(MyVehicleConfig.buttons) do + if v.extra == extra then + result = v + end + end + return result +end + +function ULC:ChangeExtra(extra, newState, repair) + --print("[ULC:ChangeExtra()] Changing extra: " .. extra .. " to: " .. newState) + -- disable repair + if not repair then + SetVehicleAutoRepairDisabled(MyVehicle, true) + end + -- change extra + SetVehicleExtra(MyVehicle, extra, newState) + -- fix deformation if repair is true + if repair then + SetVehicleDeformationFixed(MyVehicle) + end + -- enable repair + SetVehicleAutoRepairDisabled(MyVehicle, false) +end + +--------------- +--------------- +-- MAIN CODE -- +--------------- +--------------- + +-- new event +AddEventHandler('ulc:SetStage', function(extra, action, playSound, extraOnly, repair, forceChange, forceUi) + ULC:SetStage(extra, action, playSound, extraOnly, repair, forceChange, forceUi) +end) + +-- change specified extra, and if not extraOnly, and extra is in a button, act on the linked and off extras as well, acts recursively; +-- action 0 enables, 1 disables, 2 toggles; +-- updates ui whenever extra is used in a button +function ULC:SetStage(extra, action, playSound, extraOnly, repair, forceChange, forceUi, allowOutside) + ---------- + -- checks + if not MyVehicle then + print("[ULC:SetStage()] MyVehicle is not defined right now :/") + return false + end + if not allowOutside and not IsPedInAnyVehicle(PlayerPedId(), false) then + print("[ULC:SetStage()] Player must be in a vehicle, or allowOutside must be true.") + return false + end + + --print("[ulc:SetStage]", extra, action, playSound, extraOnly) + + -------------- + -- definitions + local button = GetButtonByExtra(extra) + local buttonStates = {} -- track button states for UI + + -------------------------- + -- determine the new state + local newState + if IsVehicleExtraTurnedOn(MyVehicle, extra) then + if action == 1 or action == 2 then + newState = 1 + end + else + if action == 0 or action == 2 then + newState = 0 + end + end + + --------------------------------------------------------- + -- built in don't try to change if it's the same already! + --[[ forceChange is used to forceChange the change even if it's the same + this is used to trigger the additional actions like linked and off extras + even if the extra is already in the state we want it to be + (used in cycling stages and one other place i cant remember)]] + if not forceChange and not newState then return end + + local canChange = true + if repair then + if not AreVehicleDoorsClosed(MyVehicle) then + canChange = false + print("[ULC:SetStage] Can't change stage with repair while a door is open.") + end + if not IsVehicleHealthy(MyVehicle) then + canChange = false + print("[ULC:SetStage] Can't change stage with repair while vehicle is damaged.") + end + end + + if not canChange then return end + + --------------------------------------- + -- if the extra corresponds to a button + if button then + -------------------- + -- sound + if playSound then + if newState == 0 then + PlayBeep(true) + else + PlayBeep(false) + end + end + + ---------------------- + -- smart stages stuff + local key = button.key + if MyVehicleConfig.stages then + local keyStage = contains(MyVehicleConfig.stages.stageKeys, key) -- find whether MyVehicleConfig.stages.stageKeys contain the key + + -- # TODO we're not getting here for some reason when cycling stages at max stage + -- if the key pressed is not a stage, just change the extra + if not keyStage then + ULC:ChangeExtra(extra, newState, repair) + end + + -- if the key pressed is a stage and extraOnly is false + if keyStage and not extraOnly then + print("key: " .. key .. " keyStage: " .. tostring(keyStage) .. " currentStage: " .. currentStage) + -- if it's the same as the current stage, change the extra and proceed normally + if keyStage == currentStage then + print("Key is the same as current stage") + ULC:ChangeExtra(extra, newState, repair) + -- set the stage to 0 + print("Setting stage to: 0") + currentStage = 0 + else + -- if it's a different stage then we want to change to a state where that stage is enabled + print("Key is not the same as current stage") + newState = 0 -- change to newState to 0 since we want the new stage to be enabled + + local currentPrimaryExtraState = IsVehicleExtraTurnedOn(MyVehicle, extra) + print("New state: " .. + newState .. "Extra " .. extra .. " current state: " .. tostring(currentPrimaryExtraState)) + + if not IsVehicleExtraTurnedOn(MyVehicle, extra) and newState == 0 then + print("Extra needs to be turned on") + ULC:ChangeExtra(extra, newState, repair) + elseif IsVehicleExtraTurnedOn(MyVehicle, extra) and newState == 1 then + print("Extra needs to be turned off") + ULC:ChangeExtra(extra, newState, repair) + else + -- if it's in the correct state + print("Extra is already in the correct state") + end + -- set the new stage + print("Setting stage to: " .. keyStage) + currentStage = keyStage + end + else -- if extraOnly is true + ULC:ChangeExtra(extra, newState, repair) + end + else + -- if there are no stages, just change the extra + ULC:ChangeExtra(extra, newState, repair) + end + + + ---------------------- + -- initialize UI changes + -- add that button to the new button states for UI with it's extra and new state + table.insert(buttonStates, { extra = extra, newState = newState }) + + ----------------------------- + -- additional actions/extras + if not extraOnly then + -- set linked extras + if button.linkedExtras then + for _, v in ipairs(button.linkedExtras) do + ULC:SetStage(v, newState, false, true, repair, forceChange) + -- add linked buttons to the new button states for UI with their extras and new state + table.insert(buttonStates, { extra = v, newState = newState }) + end + end + + -- set opposite extras + if button.oppositeExtras or false then -- in case they have old config without the feature + local oppState + if newState == 1 then oppState = 0 elseif newState == 0 then oppState = 1 end + for _, v in pairs(button.oppositeExtras) do + ULC:SetStage(v, oppState, false, true, repair, forceChange) + -- add opposite buttons to the new button states for UI with their extras and new state + table.insert(buttonStates, { extra = v, newState = oppState }) + end + end + + -- set off extras + if button.offExtras then + for _, v in ipairs(button.offExtras) do + ULC:SetStage(v, 1, false, true, repair, forceChange) + -- add off buttons to the new button states for UI with their extras and new state + table.insert(buttonStates, { extra = v, newState = 1 }) + end + end + end + + if not extraOnly or forceUi then + -- update UI + ULC:SetButtons(buttonStates) + end + else -- if it's not a button, we just change the extra because we don't care about stages or linked extras etc. + ULC:ChangeExtra(extra, newState, repair) + end +end + +----------------------- +----------------------- +------ KEYBINDS ------- +----------------------- +----------------------- + +for i = 1, 9, 1 do + RegisterKeyMapping('ulc:num' .. i, 'ULC: Toggle Button ' .. i, 'keyboard', 'NUMPAD' .. i) + RegisterCommand('ulc:num' .. i, function() + local extra = GetExtraByKey(i) + local button = GetButtonByExtra(extra) + if not button then return end + ULC:SetStage(extra, 2, true, false, button.repair or false) + end) +end + +------------------ +------ HELP ------ +------------------ + +local activeButtons = {} +local showingHelp = false + +function ShowHelp() + CreateThread(function() + if not showingHelp then + -- show help + showingHelp = true + for k, v in ipairs(activeButtons) do + --print('Showing help for button: ' .. k .. ' : ' .. v.key) + SendNUIMessage({ + type = 'showHelp', + button = k, + key = v.key, + }) + end + Wait(3000) + -- hide help + showingHelp = false + for k, v in ipairs(activeButtons) do + SendNUIMessage({ + type = 'hideHelp', + button = k, + label = string.upper(v.label), + }) + end + end + end) +end diff --git a/resources/ulc/client/c_cruise.lua b/resources/ulc/client/c_cruise.lua new file mode 100644 index 000000000..d621fe88d --- /dev/null +++ b/resources/ulc/client/c_cruise.lua @@ -0,0 +1,77 @@ +--print("[ULC]: Cruise lights Loaded") + +-- 1 disabled, 0 enabled +local sbState = 1 + +-- 0 on, 1 off +local function setCruiseLights(newState) + sbState = newState + for _, v in pairs(MyVehicleConfig.steadyBurnConfig.sbExtras) do + --print("Setting cruise lights extra: " .. v) + ULC:SetStage(v, newState, false, true, false, false, true, false) + end +end + +local function getSteadyBurnState() + if IsVehicleExtraTurnedOn(MyVehicle, MyVehicleConfig.steadyBurnConfig.sbExtras[1]) then + return 0 + else + return 1 + end +end + +CreateThread(function() + while true do + if MyVehicle then + TriggerEvent('ulc:CheckCruise', false) + end + Wait(1000) + end +end) + +--TODO: disable when lights are on, enable when lights are off + +AddEventHandler('ulc:lightsOn', function() + --print("Lights on") + if MyVehicle and (MyVehicleConfig.steadyBurnConfig.disableWithLights or false) then + setCruiseLights(1) + end +end) + +AddEventHandler('ulc:lightsOff', function() + --print("Lights off") + if MyVehicle and (MyVehicleConfig.steadyBurnConfig.disableWithLights or false) then + TriggerEvent('ulc:CheckCruise') + end +end) + +AddEventHandler('ulc:CheckCruise', function() + sbState = getSteadyBurnState() + if not MyVehicle then return end + + if Entity(MyVehicle).state.ulc_blackout == 0 then + -- print("Blackout is on, disabling cruise lights") + setCruiseLights(1) + return + end + + if MyVehicleConfig.steadyBurnConfig.forceOn then + if sbState == 0 then return end + if Lights and MyVehicleConfig.steadyBurnConfig.disableWithLights then return end + --print("Setting cruise lights on") + setCruiseLights(0) + elseif MyVehicleConfig.steadyBurnConfig.useTime then + local isTime = GetClockHours() > Config.SteadyBurnSettings.nightStartHour or + GetClockHours() < Config.SteadyBurnSettings.nightEndHour + if isTime then + -- if lights are already on do nothing + if sbState == 0 then return end + if Lights and MyVehicleConfig.steadyBurnConfig.disableWithLights then return end + setCruiseLights(0) + else + -- if already off do nothing + if sbState == 1 then return end + setCruiseLights(1) + end + end +end) diff --git a/resources/ulc/client/c_doors.lua b/resources/ulc/client/c_doors.lua new file mode 100644 index 000000000..d38c655bb --- /dev/null +++ b/resources/ulc/client/c_doors.lua @@ -0,0 +1,85 @@ +local doors = { + [0] = false, -- d front + [1] = false, -- p front + [2] = false, -- d rear + [3] = false, -- p rear + [4] = false, -- hood + [5] = false -- trunk +} + +local function intNot(value) + result = 0 + if value == 0 then + result = 1 + end + return result +end + +-- state 1 = closed, state 0 = open +local function onDoorStateChange(door, newDoorState) + --print("Handling door change", door, newDoorState) + if door == 0 or door == 2 then -- if driver side + for _, v in pairs(MyVehicleConfig.doorConfig.driverSide.enable) do + --print("Enable extra:", v) + ULC:SetStage(v, newDoorState, true, true, false, false, true, true) + end + for _, v in pairs(MyVehicleConfig.doorConfig.driverSide.disable) do + --print("Disable extra:", v, intNot(newDoorState)) + ULC:SetStage(v, intNot(newDoorState), true, true, false, false, true, true) + end + elseif door == 1 or door == 3 then -- if pass side + for _, v in pairs(MyVehicleConfig.doorConfig.passSide.enable) do + --print("Enable extra:", v) + ULC:SetStage(v, newDoorState, true, true, false, false, true, true) + end + for _, v in pairs(MyVehicleConfig.doorConfig.passSide.disable) do + --print("Disable extra:", v, intNot(newDoorState)) + ULC:SetStage(v, intNot(newDoorState), true, true, false, false, true, true) + end + elseif door == 5 then -- if trunk + for _, v in pairs(MyVehicleConfig.doorConfig.trunk.enable) do + ULC:SetStage(v, newDoorState, true, true, false, false, true, true) + end + for _, v in pairs(MyVehicleConfig.doorConfig.trunk.disable) do + ULC:SetStage(v, intNot(newDoorState), true, true, false, false, true, true) + end + end +end + +CreateThread(function() + local sleep = 1000 + while true do + Wait(sleep) + if not MyVehicle then + sleep = 1000 + goto continue + end + if not MyVehicleConfig.doorConfig or false then + sleep = 1000 + goto continue + end + if not MyVehicleConfig.doorConfig.useDoors then + sleep = 1000 + goto continue + end + sleep = 250 + + for k, v in pairs(doors) do + if GetVehicleDoorAngleRatio(MyVehicle, k) > 0.0 then + if v == false then + -- print("Setting door", k, "open.") + doors[k] = true -- set door open + onDoorStateChange(k, 0) -- handle what to do + end + else + if v == true then + -- print("Setting door", k, "closed.") + doors[k] = false -- set door closed + onDoorStateChange(k, 1) -- handle what to do + end + end + end + + ::continue:: + end +end) diff --git a/resources/ulc/client/c_horn.lua b/resources/ulc/client/c_horn.lua new file mode 100644 index 000000000..cb564fb6b --- /dev/null +++ b/resources/ulc/client/c_horn.lua @@ -0,0 +1,67 @@ +--print("[ULC]: Horn Extras Loaded") + +local extraStates = {} + +local function GetPreviousStateByExtra(extra) + for k, v in pairs(extraStates) do + --print(v.extra, v.state) + if extra == v.extra then + --print('Found state of : ' .. tostring(v.state) .. ' for extra ' .. extra) + return v.state + end + end +end + +function SetHornExtras(newState) + -- print('SetHornExtras: ' .. newState) + if newState == 0 then + for _, extra in pairs(MyVehicleConfig.hornConfig.hornExtras) do + local extraState = { + extra = extra, + state = IsVehicleExtraTurnedOn(MyVehicle, extra) + } + table.insert(extraStates, extraState) + ULC:SetStage(extra, 0, false, true, false, false, true, false) + end + if not MyVehicleConfig.hornConfig.disableExtras then return end + for _, extra in pairs(MyVehicleConfig.hornConfig.disableExtras) do + local extraState = { + extra = extra, + state = IsVehicleExtraTurnedOn(MyVehicle, extra) + } + table.insert(extraStates, extraState) + ULC:SetStage(extra, 1, false, true, false, false, true, false) + end + elseif newState == 1 then + for _, extra in pairs(MyVehicleConfig.hornConfig.hornExtras) do + local prevState = GetPreviousStateByExtra(extra) + if not prevState then + ULC:SetStage(extra, 1, false, true, false, false, true, false) + end + end + if not MyVehicleConfig.hornConfig.disableExtras then return end + for _, extra in pairs(MyVehicleConfig.hornConfig.disableExtras) do + local prevState = GetPreviousStateByExtra(extra) + if prevState then + ULC:SetStage(extra, 0, false, true, false, false, true, false) + end + end + end +end + +RegisterCommand('+ulc:horn', function() + --print('horn') + extraStates = {} + + if MyVehicle and MyVehicleConfig.hornConfig.useHorn then + SetHornExtras(0) + end +end) + +RegisterCommand('-ulc:horn', function() + if MyVehicle and MyVehicleConfig.hornConfig.useHorn then + SetHornExtras(1) + end +end) + +RegisterKeyMapping('+ulc:horn', 'ULC: Activate Horn Extras', 'keyboard', 'e') diff --git a/resources/ulc/client/c_hud.lua b/resources/ulc/client/c_hud.lua new file mode 100644 index 000000000..d988c6ff4 --- /dev/null +++ b/resources/ulc/client/c_hud.lua @@ -0,0 +1,298 @@ +-- MAIN FUNCTIONS -- + +function ULC:PopulateButtons(_buttons, placeholders) + --print("Populating buttons") + + local buttons = _buttons + + if placeholders then + buttons = { + { label = 'TEST STAGE', extra = 1, color = 'green', enabled = true }, + { label = 'TEST STAGE', extra = 2, color = 'blue', enabled = false }, + { label = 'TEST STAGE', extra = 3, color = 'blue', enabled = false }, + { label = 'TEST STAGE', extra = 4, color = 'blue', enabled = true }, + { label = 'test stage', extra = 5, color = 'red', enabled = true } + } + end + + local buttonsToSend = {} + for _, v in pairs(buttons) do + local thisButton = {} + local thisState = false + if IsVehicleExtraTurnedOn(MyVehicle, v.extra) then thisState = true end + thisButton.extra = v.extra + thisButton.enabled = thisState + thisButton.color = v.color or 'green' + thisButton.label = string.upper(v.label) + thisButton.numKey = v.key + + --print("Sending button: " .. json.encode(thisButton)) + table.insert(buttonsToSend, thisButton) + end + + SendNUIMessage({ + type = 'populateButtons', + buttons = buttonsToSend + }) +end + +-- deprecated in exchange for "SetButtons" +function ULC:SetButton(extra, enabled) + local newState + if enabled == 0 then + newState = true + elseif enabled == 1 then + newState = false + end + + SendNUIMessage({ + type = 'setButton', + extra = extra, + newState = newState + }) +end + +function ULC:SetButtons(buttonStates) + -- print("Setting buttons", json.encode(buttonStates)) + -- go through the buttons and replace newState with a boolean + -- newState = 1 means false, 0 means true + + for k, v in pairs(buttonStates) do + if v.newState == 1 then + v.newState = false + elseif v.newState == 0 then + v.newState = true + end + end + + SendNUIMessage({ + type = 'setButtons', + buttonStates = buttonStates + }) +end + +----------------- +-- UI SETTINGS -- +----------------- + +function ULC:SetDisplay(bool) + if bool then + SendNUIMessage({ + type = 'showHUD', + }) + else + SendNUIMessage({ + type = 'hideHUD', + }) + end +end + +function ULC:SetPosition(x, y) + SendNUIMessage({ + type = 'setPosition', + x = x, + y = y + }) +end + +function ULC:SetScale(float) + SendNUIMessage({ + type = 'setScale', + scale = float + }) +end + +-- TODO this is unused in game, should be in menu +function ULC:SetUseLeftAnchor(bool) + SendNUIMessage({ + type = 'setAnchor', + bool = bool + }) +end + +function ULC:SetHudDisabled(bool) + SendNUIMessage({ + type = 'setHudDisabled', + bool = bool + }) +end + +function ULC:SetHelpDisplay(bool) + if bool then + SendNUIMessage({ type = 'showHelp' }) + else + SendNUIMessage({ type = 'hideHelp' }) + end +end + +---------- +-- MENU -- +---------- + +-- TODO set this up in js +function ULC:SetMenuDisplay(bool) + --print("Client setting display", bool) + if bool then + SendNUIMessage({ + type = 'showMenu', + }) + else + SendNUIMessage({ + type = 'hideHideMenu', + }) + end +end + +---------------------- +-- USER PREFERENCES -- +---------------------- +print("[ULC] Client Storage Loaded") +ClientPrefs = {} + +local function loadUserPrefs() + -- if prefs already exist + local prefsExist = GetResourceKvpString('ulc') + if prefsExist == "exists" then + print("[ULC] Loading prefs") + -- load + ClientPrefs.hideUi = GetResourceKvpInt("ulc:hideUi") + ClientPrefs.x = GetResourceKvpInt("ulc:x") + ClientPrefs.y = GetResourceKvpInt("ulc:y") + ClientPrefs.scale = GetResourceKvpFloat("ulc:scale") + ClientPrefs.useLeftAnchor = GetResourceKvpString("ulc:useLeftAnchor") + else + print("[ULC] Creating prefs") + -- set defaults + SetResourceKvp('ulc', "exists") + SetResourceKvpInt('ulc:x', 0) + SetResourceKvpInt('ulc:y', 0) + SetResourceKvpFloat('ulc:scale', 1.0) + SetResourceKvpInt('ulc:hideUi', 0) + SetResourceKvp('ulc:useLeftAnchor', 'false') + + + loadUserPrefs() + + Wait(5000) + TriggerEvent('chat:addMessage', { + color = { 0, 153, 204 }, + multiline = false, + args = { "ULC", "^4This server uses ULC! Type /ulc to view settings and adjust the HUD!" } + }) + end +end + +loadUserPrefs() + +-- use the values +CreateThread(function() + --print("CLIENT PREF DISABLED =", ClientPrefs.hideUi) + Wait(1000) + -- positioning + if ClientPrefs.x then + --print("Loaded position from kvp: ", ClientPrefs.x, ClientPrefs.y) + ULC:SetPosition(ClientPrefs.x, ClientPrefs.y) + end + if ClientPrefs.scale then + -- print("Loaded saved scale from kvp: " .. ClientPrefs.scale) + ULC:SetScale(ClientPrefs.scale + 0.0) + end + if ClientPrefs.hideUi then + -- print("Loaded disabled HUD kvp: " .. ClientPrefs.hideUi) + ULC:SetHudDisabled(ClientPrefs.hideUi) + end + if ClientPrefs.useLeftAnchor then + -- print("Loaded useLeftAnchor from kvp", ClientPrefs.useLeftAnchor) + ULC:SetUseLeftAnchor(ClientPrefs.useLeftAnchor) + end +end) + + +-------------- +-- COMMANDS -- +-------------- + +RegisterCommand('ulc', function() + if not MyVehicle then + ULC:PopulateButtons({}, true) + ULC:SetDisplay(true) + end + ULC:SetMenuDisplay(true) + if MyVehicle then + ULC:SetHelpDisplay(true) + end + SetNuiFocus(true, true) +end) + +TriggerEvent('chat:addSuggestion', '/ulc', 'Enables dragging ULC HUD and shows settings menu and controls.', { +}) + +RegisterCommand("ulcReset", function() + DeleteResourceKvp("ulc") + loadUserPrefs() +end) + +TriggerEvent('chat:addSuggestion', '/ulcReset', 'Resets all saved ULC settings to defaults.', { +}) + +-- NUI CALLBACKS -- + +RegisterNUICallback("savePosition", function(data, cb) + --print("NUI Setting position", data.newX, data.newY, "type = ", type(data.newX)) + SetResourceKvpInt('ulc:x', data.newX) + SetResourceKvpInt('ulc:y', data.newY) + + cb({ success = true }) +end) + +RegisterNUICallback("saveScale", function(data, cb) + --print("NUI Setting Scale " .. data.scale + 0.0) + SetResourceKvpFloat('ulc:scale', data.scale + 0.0) + + cb({ success = true }) +end) + +RegisterNUICallback("saveAnchor", function(data, cb) + --print("NUI Setting Anchor ", data.useLeftAnchor) + SetResourceKvp('ulc:useLeftAnchor', data.useLeftAnchor) + + cb({ success = true }) +end) + +RegisterNUICallback("focusGame", function(data, cb) + ULC:SetMenuDisplay(false) + SetNuiFocus(false, false) + ULC:SetHelpDisplay(false) + + if not MyVehicle then + ULC:SetDisplay(false) + end + + cb({ success = true }) +end) + +RegisterNUICallback("setHudDisabled", function(data, cb) + --print("NUI Setting HUD Disabled ", data.hudDisabled) + + if not data.hudDisabled then + --print("Set HUD enabled") + if MyVehicle then + ULC:SetDisplay(true) + end + if #ClientPrefs > 0 then + ClientPrefs.hideUi = 0 + --print("Are we here?") + end + SetResourceKvpInt('ulc:hideUi', 0) + else + --print("Set HUD disabled") + ULC:SetDisplay(false) + if #ClientPrefs > 0 then + ClientPrefs.hideUi = 1 + --print("Are we here?") + end + SetResourceKvpInt('ulc:hideUi', 1) + end + + cb({ success = true }) +end) diff --git a/resources/ulc/client/c_lvc.lua b/resources/ulc/client/c_lvc.lua new file mode 100644 index 000000000..83dce75b9 --- /dev/null +++ b/resources/ulc/client/c_lvc.lua @@ -0,0 +1,32 @@ +print("[ULC] LVC Integrations Loaded") + +-- going to store the LVC siren state just for fun +LVC_SirenState = 0 + +-- received from s_lvc.lua when player changes main siren state in LVC +-- sirenId is an int representing the index of a siren in lvc/SIRENS.lua:SIRENS +RegisterNetEvent("ulc:LVC_MainSirenStateChange") +AddEventHandler("ulc:LVC_MainSirenStateChange", function(sirenId) + print("[ulc:LVC_MainSirenStateChange] " .. sirenId) + -- # TODO check how much of this is actually needed + if not MyVehicle then return end + if not MyVehicleConfig.luxartVehicleControlConfig then return end + if not MyVehicleConfig.luxartVehicleControlConfig.useLVC then return end + + local config = MyVehicleConfig.luxartVehicleControlConfig + + -- if sirenId is not in the config, return + if not MyVehicleConfig.luxartVehicleControlConfig[sirenId] then + print("[ULC: LVC_MainSirenStateChange()] siren [" .. + sirenId .. "] is not defined in MyVehicleConfig.luxartVehicleControlConfig") + return false + end + + for _, v in pairs(config[sirenId].enable) do + ULC:SetStage(v, 0, false, false, false, false, false, false) + end + + for _, v in pairs(config[sirenId].disable) do + ULC:SetStage(v, 1, false, false, false, false, false, false) + end +end) diff --git a/resources/ulc/client/c_main.lua b/resources/ulc/client/c_main.lua new file mode 100644 index 000000000..d3bfb3760 --- /dev/null +++ b/resources/ulc/client/c_main.lua @@ -0,0 +1,202 @@ +--print("[ULC]: Main Thread Loaded") + +ULC = {} + +----------------- +-- DEFINITIONS -- +----------------- + +Lights = false +MyVehicle = nil +MyVehicleConfig = nil + +------------------------------------ +------------------------------------ +------- LIGHTS STATE HANDLER ------- +------------------------------------ +------------------------------------ + +if Config.controlLights then + RegisterCommand('ulc:toggleLights', function() + if Lights then + SetVehicleSiren(MyVehicle, false) + else + SetVehicleSiren(MyVehicle, true) + end + end) + + RegisterKeyMapping('ulc:toggleLights', 'Toggle Emergency Lights', 'keyboard', 'q') +end + +AddEventHandler('ulc:lightsOn', function() + --print("Lights On") + -- set Lights on + Lights = true + setDefaultStages() + -- check if parked or driving for park patterns + TriggerEvent('ulc:checkParkState', GetVehiclePedIsIn(PlayerPedId()), false) + SendNUIMessage({ + type = 'toggleIndicator', + state = Lights + }) + if Config.controlLights then + PlayBeep(true) + end +end) + +AddEventHandler('ulc:lightsOff', function() + --print("Lights Off") + Lights = false + SendNUIMessage({ + type = 'toggleIndicator', + state = Lights + }) + if Config.controlLights then + PlayBeep(false) + end +end) + +-- check if lights are on 10 times a second; +-- used to trigger above events +CreateThread(function() + local sleep = 1000 + while true do + Wait(sleep) + if not MyVehicle then + sleep = 1000 + goto continue + end + sleep = 100 + + if not IsPedInAnyVehicle(PlayerPedId()) then goto continue end + if IsVehicleSirenOn(GetVehiclePedIsIn(PlayerPedId())) then + if not Lights then + TriggerEvent('ulc:lightsOn') + end + else + if Lights then + TriggerEvent('ulc:lightsOff') + end + end + + ::continue:: + end +end) + +--------------------------- +--------------------------- +-------- MAIN CODE -------- +--------------------------- +--------------------------- + +-- this event is called whenever player enters vehicle +RegisterNetEvent('ulc:checkVehicle') +AddEventHandler('ulc:checkVehicle', function() + CreateThread(function() + while not GlobalState.ulcloaded do + print("ULC: Waiting for load.") + Wait(250) + end + print("[ULC:checkVehicle] Checking for vehicle configuration") + local ped = PlayerPedId() + local vehicle = GetVehiclePedIsIn(ped) + local passed, vehicleConfig = GetVehicleFromConfig(vehicle) + + --print(passed, vehicleConfig) + + if passed then + MyVehicle = vehicle + MyVehicleConfig = vehicleConfig + table.sort(MyVehicleConfig.buttons, function(a, b) return a["key"] < b["key"] end) + + + print("[ULC:checkVehicle] Found vehicle, ready to go.") + + -- if i am driver + if ped == GetPedInVehicleSeat(vehicle, -1) then + ULC:PopulateButtons(MyVehicleConfig.buttons) + --ShowHelp() + if not Config.hideHud and ClientPrefs.hideUi == 0 then + ULC:SetDisplay(true) + else + print( + "HUD is hidden. Type /ulc to see if you disabled it. Otherwise, the server owner may have disabled the HUD.") + end + + TriggerEvent('ulc:CheckCruise') + TriggerEvent('ulc:checkParkState', true) + TriggerEvent('ulc:StartCheckingReverseState') + currentStage = 0 + end + else + MyVehicle = nil + TriggerEvent('ulc:cleanup') + TriggerEvent('ulc:StopCheckingReverseState') + end + end) +end) + +-- used to hide the hud +RegisterNetEvent('ulc:cleanup') +AddEventHandler('ulc:cleanup', function() + -- MyVehicle = nil + -- MyVehicleConfig = nil + ULC:SetDisplay(false) + -- hide hud + -- SendNUIMessage({ + -- type = 'hideLightsHUD', + -- }) +end) + +----------------- +-- CONFIG SYNC -- +----------------- + +RegisterNetEvent('UpdateVehicleConfigs', function(newData) + print("[ULC] Updating vehicle table. Done loading.") + Config.Vehicles = newData +end) + +-- trigger checks when spawning from one vehicle into another directly, or from another seat to driver seat +CreateThread(function() + local lastVehicle + local wasDriving + while true do + Wait(500) + if IsPedInAnyVehicle(PlayerPedId()) then + local currentVehicle = GetVehiclePedIsIn(PlayerPedId(), false) + local driving = GetPedInVehicleSeat(MyVehicle, -1) == PlayerPedId() + if currentVehicle ~= lastVehicle then + TriggerEvent('ulc:checkVehicle') + end + if MyVehicle and not wasDriving and driving then + TriggerEvent('ulc:checkVehicle') + end + lastVehicle = currentVehicle + wasDriving = driving + end + end +end) + + +------------------------- +------------------------- +-- AUTO REPAIR HANDLER -- +------------------------- +------------------------- + +-- every second set no repair on all vehicles except my own +CreateThread(function() + while true do + Wait(1000) + local vehicles = GetGamePool("CVehicle") + for _, v in pairs(vehicles) do + if v ~= GetVehiclePedIsIn(PlayerPedId(), false) then + SetVehicleAutoRepairDisabled(v, true) + else + --print("Enabling repair for" .. v) + SetVehicleAutoRepairDisabled(v, false) + end + end + end +end) diff --git a/resources/ulc/client/c_park.lua b/resources/ulc/client/c_park.lua new file mode 100644 index 000000000..519e346b3 --- /dev/null +++ b/resources/ulc/client/c_park.lua @@ -0,0 +1,150 @@ +--print("[ULC]: Park Patterns Loaded") + +local veh = GetVehiclePedIsIn(PlayerPedId()) +parked = false +local lastSync = 0 +local effectDelay = 1000 + +CreateThread(function() + while true do + if IsPedInAnyVehicle(PlayerPedId()) then + TriggerEvent('ulc:checkParkState', veh, false) + + Wait(Config.ParkSettings.delay * 1000) + else + Wait(2000) + end + end +end) + +RegisterNetEvent("ulc:checkParkState", function(delay) + CreateThread(function() + --print('Checking park state') + + if delay then + --print('Delay...') + Wait(5000) + end + local speed = GetVehicleSpeedConverted(MyVehicle) + + + if speed > Config.ParkSettings.speedThreshold and parked then + TriggerEvent("ulc:vehDrive") + end + if speed < Config.ParkSettings.speedThreshold and not parked then + Wait(effectDelay) + if not parked then -- double checks + TriggerEvent('ulc:vehPark') + end + end + end) +end) + +AddEventHandler('ulc:vehPark', function() + if Lights then + --print('[ulc:vehPark] My vehicle is parked.') + parked = true + + if MyVehicle and MyVehicleConfig.parkConfig.usePark then + -- enable pExtras + for _, v in pairs(MyVehicleConfig.parkConfig.pExtras) do + ULC:SetStage(v, 0, false, true, false, false, true, false) + end + -- disable dExtras + for _, v in pairs(MyVehicleConfig.parkConfig.dExtras) do + ULC:SetStage(v, 1, false, true, false, false, true, false) + end + + -- park pattern sync stuff + if MyVehicleConfig.parkConfig.useSync then + -- cooldown + local gameSeconds = GetGameTimer() / 1000 + if gameSeconds >= lastSync + Config.ParkSettings.syncCooldown then + lastSync = gameSeconds + + local loadedVehicles = GetGamePool("CVehicle") + --print(#loadedVehicles .. " vehicles in pool") + local vehsToSync = {} + + for k, v in pairs(loadedVehicles) do + -- don't include my vehicle + if v ~= veh then + local vehCoords = GetEntityCoords(v) + local pedCoords = GetEntityCoords(PlayerPedId()) + local distance = GetDistanceBetweenCoords(vehCoords, pedCoords) + + + if distance < Config.ParkSettings.syncDistance then + if GetVehicleClass(v) == 18 then + -- check if my vehicle is set to sync with this vehicle or if the vehicle is the same model as my vehicle + if IsVehicleInTable(v, MyVehicleConfig.parkConfig.syncWith) or GetEntityModel(v) == GetEntityModel(MyVehicle) then + --print('Vehicle' .. v .. ' should sync with me.') + + local speed = GetVehicleSpeedConverted(veh) + + if speed < Config.ParkSettings.speedThreshold then + --print("Found an eligible sync vehicle.") + table.insert(vehsToSync, v) + end + end + end + end + end + end + if #vehsToSync > 0 then + -- sync my vehicle + SetVehicleSiren(veh, false) + SetVehicleSiren(veh, true) + + -- sync other vehicles on my screen + for k, v in pairs(vehsToSync) do + if IsVehicleSirenOn(v) then + SetVehicleSiren(v, false) + SetVehicleSiren(v, true) + end + end + + -- send sync to other clients nearby + --print("Preparing to send sync to server") + local vehsToSyncNet = {} + for k, v in pairs(vehsToSync) do + --print("Candidate: " .. VehToNet(v)) + table.insert(vehsToSyncNet, VehToNet(v)) + end + TriggerServerEvent("sync:send", vehsToSyncNet) + else --print('Found no vehicles to sync.') + end + else + print("Sync on cooldown, time left: " .. + Config.ParkSettings.syncCooldown - (gameSeconds - lastSync) .. " seconds.") + end + end + end + end +end) + +RegisterNetEvent('ulc:sync:receive', function(vehicles) + --print("[sync:receive] Trying to sync " .. #vehicles .. " vehicles.") + for _, v in pairs(vehicles) do + --print("Attempting to sync: " .. NetToVeh(v)) + SetVehicleSiren(NetToVeh(v), false) + SetVehicleSiren(NetToVeh(v), true) + end +end) + +AddEventHandler('ulc:vehDrive', function() + if Lights then + --print('[ulc:vehDrive] My vehicle is driving.') + parked = false + if MyVehicle and MyVehicleConfig.parkConfig.usePark then + -- disable pExtras + for _, v in pairs(MyVehicleConfig.parkConfig.pExtras) do + ULC:SetStage(v, 1, false, true, false, false, true, false) + end + -- enable dExtras + for _, v in pairs(MyVehicleConfig.parkConfig.dExtras) do + ULC:SetStage(v, 0, false, true, false, false, true, false) + end + end + end +end) diff --git a/resources/ulc/client/c_reverse.lua b/resources/ulc/client/c_reverse.lua new file mode 100644 index 000000000..b6e3f7b2d --- /dev/null +++ b/resources/ulc/client/c_reverse.lua @@ -0,0 +1,125 @@ +--print("[ULC]: Reverse Extras Loaded") + +local reversing = false +local disabledExtras = {} +local timerExpired = false + +function setReverseExtras(newState) + -- set enable extras to match the new state + for _, v in ipairs(MyVehicleConfig.reverseConfig.reverseExtras) do + ULC:SetStage(v, newState, false, true, false, false, true, false) + end + if not MyVehicleConfig.reverseConfig.disableExtras then return end + if newState == 0 then + -- set disable extras off and save the ones we changed + for _, v in ipairs(MyVehicleConfig.reverseConfig.disableExtras) do + --print("Checking extra " .. v .. " for reverse state") + if IsVehicleExtraTurnedOn(MyVehicle, v) then + ULC:SetStage(v, 1, false, true, false, false, true, false) + table.insert(disabledExtras, v) + end + end + else -- newState == 1 + -- set the disabled extras back on + for _, v in ipairs(disabledExtras) do + ULC:SetStage(v, 0, false, true, false, false, true, false) + end + disabledExtras = {} + end +end + +AddEventHandler('ulc:StartCheckingReverseState', function() + CreateThread(function() + while true do + Wait(250) + --print("Checking reverse state") + if not IsPedInAnyVehicle(PlayerPedId()) then return end + -- this feels unncessary, but I think some people may not have .reverseConfig + if not MyVehicle then return end + if not MyVehicleConfig.reverseConfig then return end + if not MyVehicleConfig.reverseConfig.useReverse then return end + local gear = GetVehicleCurrentGear(MyVehicle) + if gear == 0 then + if not reversing then + startTimer() + reversing = true + setReverseExtras(0) + end + else + if reversing then + reversing = false + setReverseExtras(1) + end + end + end + end) +end) + +-- handle disabling lights after some time +function startTimer() + -- if disabled in config, don't start timer , if enabled or missing config, start timer + if Config and Config.ReverseSettings and not Config.ReverseSettings.useRandomExpiration then return end + -- timer thread + CreateThread(function() + local speed + local duration = math.random(3, 8) * 1000 + local expirationTime + + while true do + --print("Reverse timer tick") + if not MyVehicle then return end + if not MyVehicleConfig.reverseConfig then return end + if not MyVehicleConfig.reverseConfig.useReverse then return end + if not reversing then + timerExpired = false + --print("Not reversing") + return + end + + speed = GetVehicleSpeedConverted(MyVehicle) + + if speed < 0.5 then -- if we are in reverse and stopped + if timerExpired then + goto continue + end + if Config and Config.ReverseSettings then + duration = math.random( + (Config.ReverseSettings.minExpiration or 3) * 1000, + (Config.ReverseSettings.maxExpiration or 8) * 1000 + ) + end + expirationTime = GetGameTimer() + duration + while GetGameTimer() < expirationTime do + Wait(500) + --print("Reverse timer active") + + if GetVehicleSpeedConverted(MyVehicle) > 1 then + -- print("[ULC] Reverse: Moving, breaking timer") + break + end + if not reversing then + -- print("[ULC] Reverse: Not reversing, breaking timer") + break + end + if not IsPedInAnyVehicle(PlayerPedId()) then + -- print("[ULC] Reverse: Not in vehicle, breaking timer") + break + end + if GetGameTimer() > expirationTime then + print("[ULC] Reverse: Timer expired, disabling extras") + timerExpired = true + setReverseExtras(1) + break + end + end + else -- if we are in reverse and moving + -- print("[ULC] Reverse: Resetting timer") + setReverseExtras(0) + timerExpired = false + end + + ::continue:: + Wait(500) + end + end) +end diff --git a/resources/ulc/client/c_stages.lua b/resources/ulc/client/c_stages.lua new file mode 100644 index 000000000..31f85398a --- /dev/null +++ b/resources/ulc/client/c_stages.lua @@ -0,0 +1,157 @@ +print("[ULC] Stages Loaded") + +-- Definitions +-- # TODO maybe currentStage should not be 0 when entering a vehicle? +--[[ # TODO this file does not handle setting the currentStage, instead ULC:SetStage does, +may want to change this if possible, leads to hacky stuff like in CycleStage function ]] +-- this is set to 0 whenever ulc:checkVehicle is triggered +currentStage = 0 + + +-- helpers +local function checks() + if not MyVehicle then return end + if not MyVehicleConfig.stages then return end + if not MyVehicleConfig.stages.useStages then return end + if not MyVehicleConfig.stages.stageKeys + then + return false + end + return true +end + +function getMaxStage() + if not MyVehicle then return end + if not MyVehicleConfig.stages then return end + if not MyVehicleConfig.stages.stageKeys then return end + return #MyVehicleConfig.stages.stageKeys +end + +-- main functions +function stageUp() + print("[ULC:stageUp] Increasing stage from " .. currentStage) + if currentStage == getMaxStage() then + print("Already at max stage") + return + end + + -- this is handled in ULC:SetStage? + -- currentStage = currentStage + 1 + -- instead we just want to keep track locally + local nextStage = currentStage + 1 + + -- # TODO might want to check if the key is actually a button that exists (maybe do this in the initial checks when script starts?) + local key = MyVehicleConfig.stages.stageKeys[nextStage] + + local extra = GetExtraByKey(key) + local button = GetButtonByExtra(extra) + if not button then + print("[stageUp()] Could not find button for extra " .. extra) + return + end + print("Setting stage to: " .. nextStage .. " using key " .. key .. " with extra " .. extra) + ULC:SetStage(extra, 0, true, false, button.repair or false, false, true, false) +end + +function stageDown() + print("[ULC:stageDown] Decreasing stage from " .. currentStage) + if currentStage == 0 then + print("Already stage 0") + return + end + + -- this is handled in ULC:SetStage? + -- currentStage = currentStage - 1 + -- instead we just want to keep track locally + local nextStage = currentStage - 1 + + -- # TODO might want to check if the key is actually a button that exists (maybe do this in the initial checks when script starts?) + local key = MyVehicleConfig.stages.stageKeys[nextStage] + local extra = GetExtraByKey(key) + local button = GetButtonByExtra(extra) + if not button then + print("[stageDown()] Could not find button for extra " .. extra) + return + end + print("Setting stage to: " .. nextStage .. " using key " .. key .. " with extra " .. extra) + ULC:SetStage(extra, 0, true, false, button.repair or false, false, true, false) +end + +function cycleStages() + if not checks() then return end + if currentStage == getMaxStage() then + print("Tried to cycle stages at max stage, resetting to 0") + -- we need to turn off the current stage + local key = MyVehicleConfig.stages.stageKeys[currentStage] + local extra = GetExtraByKey(key) + local button = GetButtonByExtra(extra) + if not button then + print("[cycleStages()] Could not find button for extra " .. extra) + return + end + print("Setting stage to: 0 using key " .. key .. " with extra " .. extra) + ULC:SetStage(extra, 1, true, false, button.repair or false, true, true, false) + return + end + stageUp() +end + +-- Keybinds +RegisterKeyMapping("ulc:stage_down", "ULC: Stage Down", "keyboard", "SUBTRACT") +RegisterCommand("ulc:stage_down", function() + if not checks() then return end + stageDown() +end) + +RegisterKeyMapping("ulc:stage_up", "ULC: Stage Up", "keyboard", "ADD") +RegisterCommand("ulc:stage_up", function() + if not checks() then return end + stageUp() +end) + +RegisterKeyMapping("ulc:stage_cycle", "ULC: Cycle Stages", "keyboard", "NUMPAD0") +RegisterCommand("ulc:stage_cycle", function() + if not checks() then return end + cycleStages() +end) + +-------------------- +-------------------- +-- DEFAULT STAGES -- +-------------------- +-------------------- + +-- checks if the button.key is contained in the stageKeys array and returns the index +function getStageFromButton(button) + if not button then return false end + if not MyVehicle then return false end + -- if MyVehicleConfig.stages.stageKeys is nil or doesn't contain the button.key return false + if not MyVehicleConfig.stages.stageKeys then return false end + for i, key in pairs(MyVehicleConfig.stages.stageKeys) do + if key == button.key then + return i + end + end + return false +end + +function setDefaultStages() + -- default stages + if not MyVehicleConfig.defaultStages or false then return end + if not MyVehicleConfig.defaultStages.useDefaults then return end + for _, e in pairs(MyVehicleConfig.defaultStages.enableKeys) do + local button = GetButtonByExtra(GetExtraByKey(e)) + if not button then break end + -- if the button is a stage + local stage = getStageFromButton(button) + -- if the index of this stage = the current stage do nothing + if stage and stage == currentStage then return end + -- if this button is not a stage or the stage is not the current stage proceed normally + ULC:SetStage(GetExtraByKey(e), 0, false, false, button.repair, true, true, false) + end + for _, d in pairs(MyVehicleConfig.defaultStages.disableKeys) do + local button = GetButtonByExtra(GetExtraByKey(d)) + if not button then break end + ULC:SetStage(GetExtraByKey(d), 1, false, false, button.repair, true, true, false) + end +end diff --git a/resources/ulc/config.lua b/resources/ulc/config.lua new file mode 100644 index 000000000..aed40b05f --- /dev/null +++ b/resources/ulc/config.lua @@ -0,0 +1,85 @@ +-- Ultimate Lighting Controller by Dawnstar FiveM +-- Written by Dawnstar +-- Documentation: https://docs.dwnstr.com/ulc/overview +-- For support: https://discord.gg/dwnstr-fivem + +-- Most of these can be left at their default values. +-- View documentation for details on each value +Config = { + -- whether to enable control of lights on/off state using Q key + -- disabled by default to allow other scripts to control lights such as Luxart + -- make sure to disable light controls in other scripts if you enable this + controlLights = false, + + -- HUD SETTINGS + -- global toggle for UI (affects all clients) + hideHud = false, + -- whether to use KPH instead of MPH + useKPH = false, + + -- Park Pattern Settings; + ParkSettings = { + -- extras will toggle below this speed + speedThreshold = 1, + -- time between checks in seconds + -- should not be any lower than .5 seconds + delay = 0.5, + -- distance at which to check for other vehicles to sync patterns with + syncDistance = 32, + -- seconds before a single client triggers sync again + syncCooldown = 10, + }, + + -- Steady Burn Config; + -- changes settings for extras that are enabled at night, or enabled all the time. + SteadyBurnSettings = { + -- hour effect starts (extras are enabled) + nightStartHour = 18, + -- hour effect ends (extras are disabled) + nightEndHour = 6, + }, + + -- Brake Extras/Patterns Config; + -- temporarily empty as of v1.3.0 + BrakeSettings = {}, + + -- Reverse Extras/Patterns Config; + -- introduced in v1.8.0 + ReverseSettings = { + -- these options control the expiration of the reverse extras + -- if enabled, reverse extras will turn off after a random time between min and max + -- this is to simulate more realistic behavior where the vehicle would shifted out of reverse + -- after being stopped for some time + useRandomExpiration = true, + -- minimum time in seconds extras will stay on after stopping + minExpiration = 3, + -- maximum time in seconds extras will stay on after stopping + maxExpiration = 8, + }, + + -- Import confiurations here + -- Add the resource names of vehicle resources that include a ulc.lua config file + ExternalVehResources = { + -- ex. "my-police-vehicle", + "615", + "ccso1", + "24sub", + "24ramambo", + "704", + "640", + "128", + "gpd7", + "gpdchief1", + ""st23tahoe"", + + + + + }, + + Vehicles = { + -- this is not required! + -- see documentation for instructions! + -- https://docs.dwnstr.com/ulc/configuration + } +} diff --git a/resources/ulc/fxmanifest.lua b/resources/ulc/fxmanifest.lua new file mode 100644 index 000000000..ac3eb1f9b --- /dev/null +++ b/resources/ulc/fxmanifest.lua @@ -0,0 +1,50 @@ +fx_version 'cerulean' +games { 'gta5' } +lua54 'yes' + +name "Ultimate Lighting Controls" +description "The ultimate non-els lighting controller. Documentation: https://docs.dwnstr.com/ulc/overview" +author "Dawnstar" +version "1.8.0" + +ui_page "html/index.html" + +files { + "html/index.html", + "html/assets/*.js", + "html/assets/*.css", + "html/assets/*.png", + "html/assets/*.jpg" +} + +dependencies { + "baseevents", + "/onesync" +} + +shared_scripts { + 'config.lua', + 'shared/shared_functions.lua' +} + +client_scripts { + 'client/c_main.lua', + 'client/c_hud.lua', + 'client/c_buttons.lua', + 'client/c_brake.lua', + 'client/c_blackout.lua', + 'client/c_cruise.lua', + 'client/c_horn.lua', + 'client/c_park.lua', + 'client/c_doors.lua', + 'client/c_reverse.lua', + 'client/c_stages.lua', + 'client/c_beeps.lua', + +} + +server_scripts { + 'server/s_main.lua', + 'server/s_main.js', + 'server/s_blackout.lua', +} diff --git a/resources/ulc/html/assets/button_off.5152e6d3.png b/resources/ulc/html/assets/button_off.5152e6d3.png new file mode 100644 index 000000000..0f9970097 Binary files /dev/null and b/resources/ulc/html/assets/button_off.5152e6d3.png differ diff --git a/resources/ulc/html/assets/button_on_amber.bb2616bf.png b/resources/ulc/html/assets/button_on_amber.bb2616bf.png new file mode 100644 index 000000000..02081db83 Binary files /dev/null and b/resources/ulc/html/assets/button_on_amber.bb2616bf.png differ diff --git a/resources/ulc/html/assets/button_on_blue.2277a1b4.png b/resources/ulc/html/assets/button_on_blue.2277a1b4.png new file mode 100644 index 000000000..fa0c8ab51 Binary files /dev/null and b/resources/ulc/html/assets/button_on_blue.2277a1b4.png differ diff --git a/resources/ulc/html/assets/button_on_green.536ce497.png b/resources/ulc/html/assets/button_on_green.536ce497.png new file mode 100644 index 000000000..e8f08e588 Binary files /dev/null and b/resources/ulc/html/assets/button_on_green.536ce497.png differ diff --git a/resources/ulc/html/assets/button_on_red.2fb72a77.png b/resources/ulc/html/assets/button_on_red.2fb72a77.png new file mode 100644 index 000000000..536e6e804 Binary files /dev/null and b/resources/ulc/html/assets/button_on_red.2fb72a77.png differ diff --git a/resources/ulc/html/assets/image.7105ce7a.png b/resources/ulc/html/assets/image.7105ce7a.png new file mode 100644 index 000000000..3ba78c155 Binary files /dev/null and b/resources/ulc/html/assets/image.7105ce7a.png differ diff --git a/resources/ulc/html/assets/index.7ebd96a6.js b/resources/ulc/html/assets/index.7ebd96a6.js new file mode 100644 index 000000000..509016dc4 --- /dev/null +++ b/resources/ulc/html/assets/index.7ebd96a6.js @@ -0,0 +1,51 @@ +function Mv(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerpolicy&&(i.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?i.credentials="include":o.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();function Lv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fv(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Wa={},Sl={exports:{}},at={},k={exports:{}},G={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vo=Symbol.for("react.element"),Av=Symbol.for("react.portal"),Wv=Symbol.for("react.fragment"),Vv=Symbol.for("react.strict_mode"),Hv=Symbol.for("react.profiler"),Bv=Symbol.for("react.provider"),Uv=Symbol.for("react.context"),Gv=Symbol.for("react.forward_ref"),Yv=Symbol.for("react.suspense"),Qv=Symbol.for("react.memo"),Xv=Symbol.for("react.lazy"),ac=Symbol.iterator;function Kv(e){return e===null||typeof e!="object"?null:(e=ac&&e[ac]||e["@@iterator"],typeof e=="function"?e:null)}var sp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},up=Object.assign,cp={};function yn(e,t,r){this.props=e,this.context=t,this.refs=cp,this.updater=r||sp}yn.prototype.isReactComponent={};yn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};yn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fp(){}fp.prototype=yn.prototype;function Bs(e,t,r){this.props=e,this.context=t,this.refs=cp,this.updater=r||sp}var Us=Bs.prototype=new fp;Us.constructor=Bs;up(Us,yn.prototype);Us.isPureReactComponent=!0;var sc=Array.isArray,dp=Object.prototype.hasOwnProperty,Gs={current:null},pp={key:!0,ref:!0,__self:!0,__source:!0};function mp(e,t,r){var n,o={},i=null,l=null;if(t!=null)for(n in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)dp.call(t,n)&&!pp.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1>>1,_=z[B];if(0>>1;Bo(D,I))j<_&&0>o(A,D)?(z[B]=A,z[j]=I,B=j):(z[B]=D,z[R]=I,B=R);else if(j<_&&0>o(A,I))z[B]=A,z[j]=I,B=j;else break e}}return F}function o(z,F){var I=z.sortIndex-F.sortIndex;return I!==0?I:z.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var s=[],u=[],m=1,p=null,d=3,g=!1,h=!1,v=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(z){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=z)n(u),F.sortIndex=F.expirationTime,t(s,F);else break;F=r(u)}}function S(z){if(v=!1,y(z),!h)if(r(s)!==null)h=!0,ze(b);else{var F=r(u);F!==null&&ne(S,F.startTime-z)}}function b(z,F){h=!1,v&&(v=!1,f($),$=-1),g=!0;var I=d;try{for(y(F),p=r(s);p!==null&&(!(p.expirationTime>F)||z&&!H());){var B=p.callback;if(typeof B=="function"){p.callback=null,d=p.priorityLevel;var _=B(p.expirationTime<=F);F=e.unstable_now(),typeof _=="function"?p.callback=_:p===r(s)&&n(s),y(F)}else n(s);p=r(s)}if(p!==null)var N=!0;else{var R=r(u);R!==null&&ne(S,R.startTime-F),N=!1}return N}finally{p=null,d=I,g=!1}}var E=!1,x=null,$=-1,T=5,M=-1;function H(){return!(e.unstable_now()-Mz||125B?(z.sortIndex=I,t(u,z),r(s)===null&&z===r(u)&&(v?(f($),$=-1):v=!0,ne(S,I-B))):(z.sortIndex=_,t(s,z),h||g||(h=!0,ze(b))),z},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(z){var F=d;return function(){var I=d;d=F;try{return z.apply(this,arguments)}finally{d=I}}}})(vp);(function(e){e.exports=vp})(gp);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hp=k.exports,lt=gp.exports;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Va=Object.prototype.hasOwnProperty,th=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fc={},dc={};function rh(e){return Va.call(dc,e)?!0:Va.call(fc,e)?!1:th.test(e)?dc[e]=!0:(fc[e]=!0,!1)}function nh(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function oh(e,t,r,n){if(t===null||typeof t>"u"||nh(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function He(e,t,r,n,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Te[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Te[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Te[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Te[e]=new He(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Te[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Te[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Te[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Te[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Te[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qs=/[\-:]([a-z])/g;function Xs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Qs,Xs);Te[t]=new He(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Qs,Xs);Te[t]=new He(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Qs,Xs);Te[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Te[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Te.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Te[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ks(e,t,r,n){var o=Te.hasOwnProperty(t)?Te[t]:null;(o!==null?o.type!==0:n||!(2a||o[l]!==i[a]){var s=` +`+o[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{la=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Dn(e):""}function ih(e){switch(e.tag){case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 2:case 15:return e=aa(e.type,!1),e;case 11:return e=aa(e.type.render,!1),e;case 1:return e=aa(e.type,!0),e;default:return""}}function Ga(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wr:return"Fragment";case Ar:return"Portal";case Ha:return"Profiler";case Js:return"StrictMode";case Ba:return"Suspense";case Ua:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Sp:return(e.displayName||"Context")+".Consumer";case _p:return(e._context.displayName||"Context")+".Provider";case Zs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qs:return t=e.displayName||null,t!==null?t:Ga(e.type)||"Memo";case Jt:t=e._payload,e=e._init;try{return Ga(e(t))}catch{}}return null}function lh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ga(t);case 8:return t===Js?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Op(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ah(e){var t=Op(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bo(e){e._valueTracker||(e._valueTracker=ah(e))}function xp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Op(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function vi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ya(e,t){var r=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:e._wrapperState.initialChecked})}function mc(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=dr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $p(e,t){t=t.checked,t!=null&&Ks(e,"checked",t,!1)}function Qa(e,t){$p(e,t);var r=dr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Xa(e,t.type,r):t.hasOwnProperty("defaultValue")&&Xa(e,t.type,dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yc(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Xa(e,t,r){(t!=="number"||vi(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var jn=Array.isArray;function qr(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Eo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Fn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sh=["Webkit","ms","Moz","O"];Object.keys(Fn).forEach(function(e){sh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fn[t]=Fn[e]})});function Cp(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Fn.hasOwnProperty(e)&&Fn[e]?(""+t).trim():t+"px"}function Np(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=Cp(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var uh=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Za(e,t){if(t){if(uh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function qa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var es=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ts=null,en=null,tn=null;function hc(e){if(e=_o(e)){if(typeof ts!="function")throw Error(C(280));var t=e.stateNode;t&&(t=kl(t),ts(e.stateNode,e.type,t))}}function Tp(e){en?tn?tn.push(e):tn=[e]:en=e}function zp(){if(en){var e=en,t=tn;if(tn=en=null,hc(e),t)for(e=0;e>>=0,e===0?32:31-(_h(e)/Sh|0)|0}var Co=64,No=4194304;function In(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Si(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,l=r&268435455;if(l!==0){var a=l&~o;a!==0?n=In(a):(i&=l,i!==0&&(n=In(i)))}else l=r&~o,l!==0?n=In(l):i!==0&&(n=In(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function ho(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pt(t),e[t]=r}function $h(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Wn),bc=String.fromCharCode(32),Ec=!1;function Zp(e,t){switch(e){case"keyup":return qh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function t0(e,t){switch(e){case"compositionend":return qp(t);case"keypress":return t.which!==32?null:(Ec=!0,bc);case"textInput":return e=t.data,e===bc&&Ec?null:e;default:return null}}function r0(e,t){if(Vr)return e==="compositionend"||!su&&Zp(e,t)?(e=Kp(),ni=iu=rr=null,Vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=zc(r)}}function nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function om(){for(var e=window,t=vi();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=vi(e.document)}return t}function uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function f0(e){var t=om(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&nm(r.ownerDocument.documentElement,r)){if(n!==null&&uu(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=Rc(r,i);var l=Rc(r,n);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Hr=null,as=null,Hn=null,ss=!1;function Dc(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ss||Hr==null||Hr!==vi(n)||(n=Hr,"selectionStart"in n&&uu(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Hn&&no(Hn,n)||(Hn=n,n=xi(as,"onSelect"),0Gr||(e.current=ms[Gr],ms[Gr]=null,Gr--)}function oe(e,t){Gr++,ms[Gr]=e.current,e.current=t}var pr={},Fe=yr(pr),Ye=yr(!1),br=pr;function sn(e,t){var r=e.type.contextTypes;if(!r)return pr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Qe(e){return e=e.childContextTypes,e!=null}function ki(){le(Ye),le(Fe)}function Wc(e,t,r){if(Fe.current!==pr)throw Error(C(168));oe(Fe,t),oe(Ye,r)}function pm(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(C(108,lh(e)||"Unknown",o));return pe({},r,n)}function bi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pr,br=Fe.current,oe(Fe,e),oe(Ye,Ye.current),!0}function Vc(e,t,r){var n=e.stateNode;if(!n)throw Error(C(169));r?(e=pm(e,t,br),n.__reactInternalMemoizedMergedChildContext=e,le(Ye),le(Fe),oe(Fe,e)):le(Ye),oe(Ye,r)}var Mt=null,bl=!1,Sa=!1;function mm(e){Mt===null?Mt=[e]:Mt.push(e)}function O0(e){bl=!0,mm(e)}function gr(){if(!Sa&&Mt!==null){Sa=!0;var e=0,t=q;try{var r=Mt;for(q=1;e>=l,o-=l,Lt=1<<32-Pt(t)+o|r<$?(T=x,x=null):T=x.sibling;var M=d(f,x,y[$],S);if(M===null){x===null&&(x=T);break}e&&x&&M.alternate===null&&t(f,x),c=i(M,c,$),E===null?b=M:E.sibling=M,E=M,x=T}if($===y.length)return r(f,x),ue&&wr(f,$),b;if(x===null){for(;$$?(T=x,x=null):T=x.sibling;var H=d(f,x,M.value,S);if(H===null){x===null&&(x=T);break}e&&x&&H.alternate===null&&t(f,x),c=i(H,c,$),E===null?b=H:E.sibling=H,E=H,x=T}if(M.done)return r(f,x),ue&&wr(f,$),b;if(x===null){for(;!M.done;$++,M=y.next())M=p(f,M.value,S),M!==null&&(c=i(M,c,$),E===null?b=M:E.sibling=M,E=M);return ue&&wr(f,$),b}for(x=n(f,x);!M.done;$++,M=y.next())M=g(x,f,$,M.value,S),M!==null&&(e&&M.alternate!==null&&x.delete(M.key===null?$:M.key),c=i(M,c,$),E===null?b=M:E.sibling=M,E=M);return e&&x.forEach(function(Q){return t(f,Q)}),ue&&wr(f,$),b}function O(f,c,y,S){if(typeof y=="object"&&y!==null&&y.type===Wr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ko:e:{for(var b=y.key,E=c;E!==null;){if(E.key===b){if(b=y.type,b===Wr){if(E.tag===7){r(f,E.sibling),c=o(E,y.props.children),c.return=f,f=c;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Jt&&Xc(b)===E.type){r(f,E.sibling),c=o(E,y.props),c.ref=$n(f,E,y),c.return=f,f=c;break e}r(f,E);break}else t(f,E);E=E.sibling}y.type===Wr?(c=kr(y.props.children,f.mode,S,y.key),c.return=f,f=c):(S=fi(y.type,y.key,y.props,null,f.mode,S),S.ref=$n(f,c,y),S.return=f,f=S)}return l(f);case Ar:e:{for(E=y.key;c!==null;){if(c.key===E)if(c.tag===4&&c.stateNode.containerInfo===y.containerInfo&&c.stateNode.implementation===y.implementation){r(f,c.sibling),c=o(c,y.children||[]),c.return=f,f=c;break e}else{r(f,c);break}else t(f,c);c=c.sibling}c=Ca(y,f.mode,S),c.return=f,f=c}return l(f);case Jt:return E=y._init,O(f,c,E(y._payload),S)}if(jn(y))return h(f,c,y,S);if(_n(y))return v(f,c,y,S);Mo(f,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,c!==null&&c.tag===6?(r(f,c.sibling),c=o(c,y),c.return=f,f=c):(r(f,c),c=Ea(y,f.mode,S),c.return=f,f=c),l(f)):r(f,c)}return O}var cn=Pm(!0),Om=Pm(!1),So={},Tt=yr(So),ao=yr(So),so=yr(So);function Or(e){if(e===So)throw Error(C(174));return e}function hu(e,t){switch(oe(so,t),oe(ao,e),oe(Tt,So),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ja(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ja(t,e)}le(Tt),oe(Tt,t)}function fn(){le(Tt),le(ao),le(so)}function xm(e){Or(so.current);var t=Or(Tt.current),r=Ja(t,e.type);t!==r&&(oe(ao,e),oe(Tt,r))}function wu(e){ao.current===e&&(le(Tt),le(ao))}var fe=yr(0);function Ri(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pa=[];function _u(){for(var e=0;er?r:4,e(!0);var n=Oa.transition;Oa.transition={};try{e(!1),t()}finally{q=r,Oa.transition=n}}function Am(){return gt().memoizedState}function b0(e,t,r){var n=cr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Wm(e))Vm(t,r);else if(r=hm(e,t,r,n),r!==null){var o=We();Ot(r,e,n,o),Hm(r,t,n)}}function E0(e,t,r){var n=cr(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Wm(e))Vm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,r);if(o.hasEagerState=!0,o.eagerState=a,xt(a,l)){var s=t.interleaved;s===null?(o.next=o,gu(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}r=hm(e,t,o,n),r!==null&&(o=We(),Ot(r,e,n,o),Hm(r,t,n))}}function Wm(e){var t=e.alternate;return e===de||t!==null&&t===de}function Vm(e,t){Bn=Di=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Hm(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ru(e,r)}}var ji={readContext:yt,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},C0={readContext:yt,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:Jc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ai(4194308,4,jm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return ai(4,2,e,t)},useMemo:function(e,t){var r=kt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=kt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=b0.bind(null,de,e),[n.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:Kc,useDebugValue:$u,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=Kc(!1),t=e[0];return e=k0.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=de,o=kt();if(ue){if(r===void 0)throw Error(C(407));r=r()}else{if(r=t(),ke===null)throw Error(C(349));(Cr&30)!==0||bm(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,Jc(Cm.bind(null,n,i,e),[e]),n.flags|=2048,fo(9,Em.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=kt(),t=ke.identifierPrefix;if(ue){var r=Ft,n=Lt;r=(n&~(1<<32-Pt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=uo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=l.createElement(r,{is:n.is}):(e=l.createElement(r),r==="select"&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,r),e[Ct]=t,e[lo]=n,Zm(e,t,!1,!1),t.stateNode=e;e:{switch(l=qa(r,n),r){case"dialog":ie("cancel",e),ie("close",e),o=n;break;case"iframe":case"object":case"embed":ie("load",e),o=n;break;case"video":case"audio":for(o=0;opn&&(t.flags|=128,n=!0,kn(i,!1),t.lanes=4194304)}else{if(!n)if(e=Ri(l),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),kn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!ue)return De(t),null}else 2*ve()-i.renderingStartTime>pn&&r!==1073741824&&(t.flags|=128,n=!0,kn(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(r=i.last,r!==null?r.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ve(),t.sibling=null,r=fe.current,oe(fe,n?r&1|2:r&1),t):(De(t),null);case 22:case 23:return Tu(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(et&1073741824)!==0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function M0(e,t){switch(fu(t),t.tag){case 1:return Qe(t.type)&&ki(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fn(),le(Ye),le(Fe),_u(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return wu(t),null;case 13:if(le(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(fe),null;case 4:return fn(),null;case 10:return yu(t.type._context),null;case 22:case 23:return Tu(),null;case 24:return null;default:return null}}var Fo=!1,Le=!1,L0=typeof WeakSet=="function"?WeakSet:Set,L=null;function Kr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ye(e,t,n)}else r.current=null}function ks(e,t,r){try{r()}catch(n){ye(e,t,n)}}var af=!1;function F0(e,t){if(us=Pi,e=om(),uu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var l=0,a=-1,s=-1,u=0,m=0,p=e,d=null;t:for(;;){for(var g;p!==r||o!==0&&p.nodeType!==3||(a=l+o),p!==i||n!==0&&p.nodeType!==3||(s=l+n),p.nodeType===3&&(l+=p.nodeValue.length),(g=p.firstChild)!==null;)d=p,p=g;for(;;){if(p===e)break t;if(d===r&&++u===o&&(a=l),d===i&&++m===n&&(s=l),(g=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=g}r=a===-1||s===-1?null:{start:a,end:s}}else r=null}r=r||{start:0,end:0}}else r=null;for(cs={focusedElem:e,selectionRange:r},Pi=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,O=h.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?v:wt(t.type,v),O);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(S){ye(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return h=af,af=!1,h}function Un(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ks(t,r,i)}o=o.next}while(o!==n)}}function Nl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function bs(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function ty(e){var t=e.alternate;t!==null&&(e.alternate=null,ty(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[lo],delete t[ps],delete t[S0],delete t[P0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ry(e){return e.tag===5||e.tag===3||e.tag===4}function sf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ry(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Es(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=$i));else if(n!==4&&(e=e.child,e!==null))for(Es(e,t,r),e=e.sibling;e!==null;)Es(e,t,r),e=e.sibling}function Cs(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Cs(e,t,r),e=e.sibling;e!==null;)Cs(e,t,r),e=e.sibling}var Ee=null,_t=!1;function Gt(e,t,r){for(r=r.child;r!==null;)ny(e,t,r),r=r.sibling}function ny(e,t,r){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Pl,r)}catch{}switch(r.tag){case 5:Le||Kr(r,t);case 6:var n=Ee,o=_t;Ee=null,Gt(e,t,r),Ee=n,_t=o,Ee!==null&&(_t?(e=Ee,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ee.removeChild(r.stateNode));break;case 18:Ee!==null&&(_t?(e=Ee,r=r.stateNode,e.nodeType===8?_a(e.parentNode,r):e.nodeType===1&&_a(e,r),to(e)):_a(Ee,r.stateNode));break;case 4:n=Ee,o=_t,Ee=r.stateNode.containerInfo,_t=!0,Gt(e,t,r),Ee=n,_t=o;break;case 0:case 11:case 14:case 15:if(!Le&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&((i&2)!==0||(i&4)!==0)&&ks(r,t,l),o=o.next}while(o!==n)}Gt(e,t,r);break;case 1:if(!Le&&(Kr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ye(r,t,a)}Gt(e,t,r);break;case 21:Gt(e,t,r);break;case 22:r.mode&1?(Le=(n=Le)||r.memoizedState!==null,Gt(e,t,r),Le=n):Gt(e,t,r);break;default:Gt(e,t,r)}}function uf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new L0),t.forEach(function(n){var o=Q0.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function vt(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=l),n&=~i}if(n=o,n=ve()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*W0(n/1960))-n,10e?16:e,nr===null)var n=!1;else{if(e=nr,nr=null,Li=0,(Y&6)!==0)throw Error(C(331));var o=Y;for(Y|=4,L=e.current;L!==null;){var i=L,l=i.child;if((L.flags&16)!==0){var a=i.deletions;if(a!==null){for(var s=0;sve()-Cu?$r(e,0):Eu|=r),Xe(e,t)}function fy(e,t){t===0&&((e.mode&1)===0?t=1:(t=No,No<<=1,(No&130023424)===0&&(No=4194304)));var r=We();e=Ht(e,t),e!==null&&(ho(e,t,r),Xe(e,r))}function Y0(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),fy(e,r)}function Q0(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(C(314))}n!==null&&n.delete(t),fy(e,r)}var dy;dy=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Ge=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Ge=!1,j0(e,t,r);Ge=(e.flags&131072)!==0}else Ge=!1,ue&&(t.flags&1048576)!==0&&ym(t,Ci,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;si(e,t),e=t.pendingProps;var o=sn(t,Fe.current);nn(t,r),o=Pu(null,t,n,e,o,r);var i=Ou();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(n)?(i=!0,bi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,vu(t),o.updater=El,t.stateNode=o,o._reactInternals=t,ws(t,n,e,r),t=Ps(null,t,n,!0,i,r)):(t.tag=0,ue&&i&&cu(t),Ae(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(si(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=K0(n),e=wt(n,e),o){case 0:t=Ss(null,t,n,e,r);break e;case 1:t=nf(null,t,n,e,r);break e;case 11:t=tf(null,t,n,e,r);break e;case 14:t=rf(null,t,n,wt(n.type,e),r);break e}throw Error(C(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wt(n,o),Ss(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wt(n,o),nf(e,t,n,o,r);case 3:e:{if(Xm(t),e===null)throw Error(C(387));n=t.pendingProps,i=t.memoizedState,o=i.element,wm(e,t),zi(t,n,null,r);var l=t.memoizedState;if(n=l.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=dn(Error(C(423)),t),t=of(e,t,n,r,o);break e}else if(n!==o){o=dn(Error(C(424)),t),t=of(e,t,n,r,o);break e}else for(rt=ar(t.stateNode.containerInfo.firstChild),nt=t,ue=!0,St=null,r=Om(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(un(),n===o){t=Bt(e,t,r);break e}Ae(e,t,n,r)}t=t.child}return t;case 5:return xm(t),e===null&&gs(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,fs(n,o)?l=null:i!==null&&fs(n,i)&&(t.flags|=32),Qm(e,t),Ae(e,t,l,r),t.child;case 6:return e===null&&gs(t),null;case 13:return Km(e,t,r);case 4:return hu(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=cn(t,null,n,r):Ae(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wt(n,o),tf(e,t,n,o,r);case 7:return Ae(e,t,t.pendingProps,r),t.child;case 8:return Ae(e,t,t.pendingProps.children,r),t.child;case 12:return Ae(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,oe(Ni,n._currentValue),n._currentValue=l,i!==null)if(xt(i.value,l)){if(i.children===o.children&&!Ye.current){t=Bt(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var s=a.firstContext;s!==null;){if(s.context===n){if(i.tag===1){s=At(-1,r&-r),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var m=u.pending;m===null?s.next=s:(s.next=m.next,m.next=s),u.pending=s}}i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),vs(i.return,r,t),a.lanes|=r;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(C(341));l.lanes|=r,a=l.alternate,a!==null&&(a.lanes|=r),vs(l,r,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Ae(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,nn(t,r),o=yt(o),n=n(o),t.flags|=1,Ae(e,t,n,r),t.child;case 14:return n=t.type,o=wt(n,t.pendingProps),o=wt(n.type,o),rf(e,t,n,o,r);case 15:return Gm(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wt(n,o),si(e,t),t.tag=1,Qe(n)?(e=!0,bi(t)):e=!1,nn(t,r),Sm(t,n,o),ws(t,n,o,r),Ps(null,t,n,!0,e,r);case 19:return Jm(e,t,r);case 22:return Ym(e,t,r)}throw Error(C(156,t.tag))};function py(e,t){return Fp(e,t)}function X0(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,r,n){return new X0(e,t,r,n)}function Ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K0(e){if(typeof e=="function")return Ru(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zs)return 11;if(e===qs)return 14}return 2}function fr(e,t){var r=e.alternate;return r===null?(r=pt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function fi(e,t,r,n,o,i){var l=2;if(n=e,typeof e=="function")Ru(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Wr:return kr(r.children,o,i,t);case Js:l=8,o|=8;break;case Ha:return e=pt(12,r,t,o|2),e.elementType=Ha,e.lanes=i,e;case Ba:return e=pt(13,r,t,o),e.elementType=Ba,e.lanes=i,e;case Ua:return e=pt(19,r,t,o),e.elementType=Ua,e.lanes=i,e;case Pp:return zl(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _p:l=10;break e;case Sp:l=9;break e;case Zs:l=11;break e;case qs:l=14;break e;case Jt:l=16,n=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=pt(l,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function kr(e,t,r,n){return e=pt(7,e,n,t),e.lanes=r,e}function zl(e,t,r,n){return e=pt(22,e,n,t),e.elementType=Pp,e.lanes=r,e.stateNode={isHidden:!1},e}function Ea(e,t,r){return e=pt(6,e,null,t),e.lanes=r,e}function Ca(e,t,r){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function J0(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Du(e,t,r,n,o,i,l,a,s){return e=new J0(e,t,r,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(i),e}function Z0(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}t(),e.exports=at})(Sl);var vf=Sl.exports;Wa.createRoot=vf.createRoot,Wa.hydrateRoot=vf.hydrateRoot;var Ml={exports:{}},vy={},Lu={exports:{}},n1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",o1=n1,i1=o1;function hy(){}function wy(){}wy.resetWarningCache=hy;var l1=function(){function e(n,o,i,l,a,s){if(s!==i1){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wy,resetWarningCache:hy};return r.PropTypes=r,r};Lu.exports=l1();function _y(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";var n=(e=window.document)===null||e===void 0||(t=e.documentElement)===null||t===void 0?void 0:t.style;if(!n||r in n)return"";for(var o=0;o: Unmounted during event!");return t}var Ll={},Fl={};Object.defineProperty(Fl,"__esModule",{value:!0});Fl.default=A1;function A1(){}function Wi(e){return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(e)}Object.defineProperty(Ll,"__esModule",{value:!0});Ll.default=void 0;var Ta=V1(k.exports),Ze=Wu(Lu.exports),W1=Wu(Sl.exports),je=ge,Yt=Dt,za=Rt,En=Wu(Fl);function Wu(e){return e&&e.__esModule?e:{default:e}}function Ny(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Ny=function(o){return o?r:t})(e)}function V1(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Wi(e)!=="object"&&typeof e!="function")return{default:e};var r=Ny(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function _f(e,t){return G1(e)||U1(e,t)||B1(e,t)||H1()}function H1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B1(e,t){if(!!e){if(typeof e=="string")return Sf(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sf(e,t)}}function Sf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vi(e){return Vi=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Vi(e)}function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ht={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Qt=ht.mouse,Al=function(e){X1(r,e);var t=K1(r);function r(){var n;Y1(this,r);for(var o=arguments.length,i=new Array(o),l=0;l not mounted on DragStart!");var u=s.ownerDocument;if(!(n.props.disabled||!(a.target instanceof u.defaultView.Node)||n.props.handle&&!(0,je.matchesSelectorAndParentsTo)(a.target,n.props.handle,s)||n.props.cancel&&(0,je.matchesSelectorAndParentsTo)(a.target,n.props.cancel,s))){a.type==="touchstart"&&a.preventDefault();var m=(0,je.getTouchIdentifier)(a);n.setState({touchIdentifier:m});var p=(0,Yt.getControlPosition)(a,m,Ie(n));if(p!=null){var d=p.x,g=p.y,h=(0,Yt.createCoreData)(Ie(n),d,g);(0,En.default)("DraggableCore: handleDragStart: %j",h),(0,En.default)("calling",n.props.onStart);var v=n.props.onStart(a,h);v===!1||n.mounted===!1||(n.props.enableUserSelectHack&&(0,je.addUserSelectStyles)(u),n.setState({dragging:!0,lastX:d,lastY:g}),(0,je.addEvent)(u,Qt.move,n.handleDrag),(0,je.addEvent)(u,Qt.stop,n.handleDragStop))}}}),ct(Ie(n),"handleDrag",function(a){var s=(0,Yt.getControlPosition)(a,n.state.touchIdentifier,Ie(n));if(s!=null){var u=s.x,m=s.y;if(Array.isArray(n.props.grid)){var p=u-n.state.lastX,d=m-n.state.lastY,g=(0,Yt.snapToGrid)(n.props.grid,p,d),h=_f(g,2);if(p=h[0],d=h[1],!p&&!d)return;u=n.state.lastX+p,m=n.state.lastY+d}var v=(0,Yt.createCoreData)(Ie(n),u,m);(0,En.default)("DraggableCore: handleDrag: %j",v);var O=n.props.onDrag(a,v);if(O===!1||n.mounted===!1){try{n.handleDragStop(new MouseEvent("mouseup"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(f)}return}n.setState({lastX:u,lastY:m})}}),ct(Ie(n),"handleDragStop",function(a){if(!!n.state.dragging){var s=(0,Yt.getControlPosition)(a,n.state.touchIdentifier,Ie(n));if(s!=null){var u=s.x,m=s.y;if(Array.isArray(n.props.grid)){var p=u-n.state.lastX||0,d=m-n.state.lastY||0,g=(0,Yt.snapToGrid)(n.props.grid,p,d),h=_f(g,2);p=h[0],d=h[1],u=n.state.lastX+p,m=n.state.lastY+d}var v=(0,Yt.createCoreData)(Ie(n),u,m),O=n.props.onStop(a,v);if(O===!1||n.mounted===!1)return!1;var f=n.findDOMNode();f&&n.props.enableUserSelectHack&&(0,je.removeUserSelectStyles)(f.ownerDocument),(0,En.default)("DraggableCore: handleDragStop: %j",v),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),f&&((0,En.default)("DraggableCore: Removing handlers"),(0,je.removeEvent)(f.ownerDocument,Qt.move,n.handleDrag),(0,je.removeEvent)(f.ownerDocument,Qt.stop,n.handleDragStop))}}}),ct(Ie(n),"onMouseDown",function(a){return Qt=ht.mouse,n.handleDragStart(a)}),ct(Ie(n),"onMouseUp",function(a){return Qt=ht.mouse,n.handleDragStop(a)}),ct(Ie(n),"onTouchStart",function(a){return Qt=ht.touch,n.handleDragStart(a)}),ct(Ie(n),"onTouchEnd",function(a){return Qt=ht.touch,n.handleDragStop(a)}),n}return Q1(r,[{key:"componentDidMount",value:function(){this.mounted=!0;var o=this.findDOMNode();o&&(0,je.addEvent)(o,ht.touch.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.findDOMNode();if(o){var i=o.ownerDocument;(0,je.removeEvent)(i,ht.mouse.move,this.handleDrag),(0,je.removeEvent)(i,ht.touch.move,this.handleDrag),(0,je.removeEvent)(i,ht.mouse.stop,this.handleDragStop),(0,je.removeEvent)(i,ht.touch.stop,this.handleDragStop),(0,je.removeEvent)(o,ht.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,je.removeUserSelectStyles)(i)}}},{key:"findDOMNode",value:function(){var o,i,l;return(o=this.props)!==null&&o!==void 0&&o.nodeRef?(i=this.props)===null||i===void 0||(l=i.nodeRef)===null||l===void 0?void 0:l.current:W1.default.findDOMNode(this)}},{key:"render",value:function(){return Ta.cloneElement(Ta.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),r}(Ta.Component);Ll.default=Al;ct(Al,"displayName","DraggableCore");ct(Al,"propTypes",{allowAnyClick:Ze.default.bool,disabled:Ze.default.bool,enableUserSelectHack:Ze.default.bool,offsetParent:function(t,r){if(t[r]&&t[r].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ze.default.arrayOf(Ze.default.number),handle:Ze.default.string,cancel:Ze.default.string,nodeRef:Ze.default.object,onStart:Ze.default.func,onDrag:Ze.default.func,onStop:Ze.default.func,onMouseDown:Ze.default.func,scale:Ze.default.number,className:za.dontSetMe,style:za.dontSetMe,transform:za.dontSetMe});ct(Al,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){function t(_){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},t(_)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var r=h(k.exports),n=d(Lu.exports),o=d(Sl.exports),i=d(s1),l=ge,a=Dt,s=Rt,u=d(Ll),m=d(Fl),p=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function d(_){return _&&_.__esModule?_:{default:_}}function g(_){if(typeof WeakMap!="function")return null;var N=new WeakMap,R=new WeakMap;return(g=function(j){return j?R:N})(_)}function h(_,N){if(!N&&_&&_.__esModule)return _;if(_===null||t(_)!=="object"&&typeof _!="function")return{default:_};var R=g(N);if(R&&R.has(_))return R.get(_);var D={},j=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in _)if(A!=="default"&&Object.prototype.hasOwnProperty.call(_,A)){var U=j?Object.getOwnPropertyDescriptor(_,A):null;U&&(U.get||U.set)?Object.defineProperty(D,A,U):D[A]=_[A]}return D.default=_,R&&R.set(_,D),D}function v(){return v=Object.assign||function(_){for(var N=1;N=0)&&(!Object.prototype.propertyIsEnumerable.call(_,D)||(R[D]=_[D]))}return R}function f(_,N){if(_==null)return{};var R={},D=Object.keys(_),j,A;for(A=0;A=0)&&(R[j]=_[j]);return R}function c(_,N){var R=Object.keys(_);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(_);N&&(D=D.filter(function(j){return Object.getOwnPropertyDescriptor(_,j).enumerable})),R.push.apply(R,D)}return R}function y(_){for(var N=1;N_.length)&&(N=_.length);for(var R=0,D=new Array(N);R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function F(_){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},F(_)}function I(_,N,R){return N in _?Object.defineProperty(_,N,{value:R,enumerable:!0,configurable:!0,writable:!0}):_[N]=R,_}var B=function(_){J(R,_);var N=re(R);function R(D){var j;return M(this,R),j=N.call(this,D),I(ne(j),"onDragStart",function(A,U){(0,m.default)("Draggable: onDragStart: %j",U);var te=j.props.onStart(A,(0,a.createDraggableData)(ne(j),U));if(te===!1)return!1;j.setState({dragging:!0,dragged:!0})}),I(ne(j),"onDrag",function(A,U){if(!j.state.dragging)return!1;(0,m.default)("Draggable: onDrag: %j",U);var te=(0,a.createDraggableData)(ne(j),U),W={x:te.x,y:te.y};if(j.props.bounds){var Je=W.x,ae=W.y;W.x+=j.state.slackX,W.y+=j.state.slackY;var se=(0,a.getBoundPosition)(ne(j),W.x,W.y),jt=S(se,2),wn=jt[0],Ir=jt[1];W.x=wn,W.y=Ir,W.slackX=j.state.slackX+(Je-W.x),W.slackY=j.state.slackY+(ae-W.y),te.x=W.x,te.y=W.y,te.deltaX=W.x-j.state.x,te.deltaY=W.y-j.state.y}var xo=j.props.onDrag(A,te);if(xo===!1)return!1;j.setState(W)}),I(ne(j),"onDragStop",function(A,U){if(!j.state.dragging)return!1;var te=j.props.onStop(A,(0,a.createDraggableData)(ne(j),U));if(te===!1)return!1;(0,m.default)("Draggable: onDragStop: %j",U);var W={dragging:!1,slackX:0,slackY:0},Je=Boolean(j.props.position);if(Je){var ae=j.props.position,se=ae.x,jt=ae.y;W.x=se,W.y=jt}j.setState(W)}),j.state={dragging:!1,dragged:!1,x:D.position?D.position.x:D.defaultPosition.x,y:D.position?D.position.y:D.defaultPosition.y,prevPropsPosition:y({},D.position),slackX:0,slackY:0,isElementSVG:!1},D.position&&!(D.onDrag||D.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),j}return Q(R,[{key:"componentDidMount",value:function(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var j,A,U;return(j=(A=this.props)===null||A===void 0||(U=A.nodeRef)===null||U===void 0?void 0:U.current)!==null&&j!==void 0?j:o.default.findDOMNode(this)}},{key:"render",value:function(){var j,A=this.props;A.axis,A.bounds;var U=A.children,te=A.defaultPosition,W=A.defaultClassName,Je=A.defaultClassNameDragging,ae=A.defaultClassNameDragged,se=A.position,jt=A.positionOffset;A.scale;var wn=O(A,p),Ir={},xo=null,jv=Boolean(se),oc=!jv||this.state.dragging,ic=se||te,lc={x:(0,a.canDragX)(this)&&oc?this.state.x:ic.x,y:(0,a.canDragY)(this)&&oc?this.state.y:ic.y};this.state.isElementSVG?xo=(0,l.createSVGTransform)(lc,jt):Ir=(0,l.createCSSTransform)(lc,jt);var Iv=(0,i.default)(U.props.className||"",W,(j={},I(j,Je,this.state.dragging),I(j,ae,this.state.dragged),j));return r.createElement(u.default,v({},wn,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(U),{className:Iv,style:y(y({},U.props.style),Ir),transform:xo}))}}],[{key:"getDerivedStateFromProps",value:function(j,A){var U=j.position,te=A.prevPropsPosition;return U&&(!te||U.x!==te.x||U.y!==te.y)?((0,m.default)("Draggable: getDerivedStateFromProps %j",{position:U,prevPropsPosition:te}),{x:U.x,y:U.y,prevPropsPosition:y({},U)}):null}}]),R}(r.Component);e.default=B,I(B,"displayName","Draggable"),I(B,"propTypes",y(y({},u.default.propTypes),{},{axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe})),I(B,"defaultProps",y(y({},u.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))})(vy);var Ty=vy,zy=Ty.default,q1=Ty.DraggableCore;Ml.exports=zy;Ml.exports.default=zy;Ml.exports.DraggableCore=q1;var Wl={exports:{}},Vl={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ew=k.exports,tw=Symbol.for("react.element"),rw=Symbol.for("react.fragment"),nw=Object.prototype.hasOwnProperty,ow=ew.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,iw={key:!0,ref:!0,__self:!0,__source:!0};function Ry(e,t,r){var n,o={},i=null,l=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)nw.call(t,n)&&!iw.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:tw,type:e,key:i,ref:l,props:o,_owner:ow.current}}Vl.Fragment=rw;Vl.jsx=Ry;Vl.jsxs=Ry;(function(e){e.exports=Vl})(Wl);const Hi=Wl.exports.Fragment,P=Wl.exports.jsx,K=Wl.exports.jsxs;function Dy(e){return Array.isArray(e)?e:[e]}function lw(e){return Object.keys(e)}const jy={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function aw(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var sw=Object.defineProperty,Of=Object.getOwnPropertySymbols,uw=Object.prototype.hasOwnProperty,cw=Object.prototype.propertyIsEnumerable,xf=(e,t,r)=>t in e?sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$f=(e,t)=>{for(var r in t||(t={}))uw.call(t,r)&&xf(e,r,t[r]);if(Of)for(var r of Of(t))cw.call(t,r)&&xf(e,r,t[r]);return e};function fw(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:$f({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:$f({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Po(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function Vu(e){const t=Po(e);return(r,n,o=!0,i=!0)=>{if(typeof r=="string"&&r.includes(".")){const[a,s]=r.split("."),u=parseInt(s,10);if(a in e.colors&&u>=0&&u<10)return e.colors[a][typeof n=="number"&&!i?n:u]}const l=typeof n=="number"?n:t();return r in e.colors?e.colors[r][l]:o?e.colors[e.primaryColor][l]:r}}function Iy(e){let t="";for(let r=1;r{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function Ly(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const w=Ly("rem"),Hu=Ly("em");function V({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?Hu(e):w(e):e||t.md}function Bi(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function mw(e){return t=>`@media (min-width: ${Hu(Bi(V({size:t,sizes:e.breakpoints})))})`}function yw(e){return t=>`@media (max-width: ${Hu(Bi(V({size:t,sizes:e.breakpoints}))-1)})`}function gw(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function vw(e){let t=e.replace("#","");if(t.length===3){const l=t.split("");t=[l[0],l[0],l[1],l[1],l[2],l[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function hw(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function Bu(e){return gw(e)?vw(e):e.startsWith("rgb")?hw(e):{r:0,g:0,b:0,a:1}}function Fr(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";const{r,g:n,b:o}=Bu(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function ww(e=0){return{position:"absolute",top:w(e),right:w(e),left:w(e),bottom:w(e)}}function _w(e,t){const{r,g:n,b:o,a:i}=Bu(e),l=1-t,a=s=>Math.round(s*l);return`rgba(${a(r)}, ${a(n)}, ${a(o)}, ${i})`}function Sw(e,t){const{r,g:n,b:o,a:i}=Bu(e),l=a=>Math.round(a+(255-a)*t);return`rgba(${l(r)}, ${l(n)}, ${l(o)}, ${i})`}function Pw(e){return t=>{if(typeof t=="number")return w(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function Ow(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function xw(e){const t=Vu(e),r=Po(e),n=My(e);return({variant:o,color:i,gradient:l,primaryFallback:a})=>{const s=Ow(i,e);switch(o){case"light":return{border:"transparent",background:Fr(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Fr(t(i,e.colorScheme==="dark"?7:1,a,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Fr(t(i,e.colorScheme==="dark"?8:0,a,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?Fr(t(i,5,a,!1),.05):Fr(t(i,0,a,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,r()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(l),color:e.white,border:"transparent",hover:null};default:{const u=r(),m=s.isSplittedColor?s.shade:u,p=s.isSplittedColor?s.key:i;return{border:"transparent",background:t(p,m,a),color:e.white,hover:t(p,m===9?8:m+1)}}}}}function $w(e){return t=>{const r=Po(e)(t);return e.colors[e.primaryColor][r]}}function kw(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function bw(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function Ew(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const Pe={fontStyles:aw,themeColor:Vu,focusStyles:fw,linearGradient:dw,radialGradient:pw,smallerThan:yw,largerThan:mw,rgba:Fr,cover:ww,darken:_w,lighten:Sw,radius:Pw,variant:xw,primaryShade:Po,hover:kw,gradient:My,primaryColor:$w,placeholderStyles:bw,dimmed:Ew};var Cw=Object.defineProperty,Nw=Object.defineProperties,Tw=Object.getOwnPropertyDescriptors,kf=Object.getOwnPropertySymbols,zw=Object.prototype.hasOwnProperty,Rw=Object.prototype.propertyIsEnumerable,bf=(e,t,r)=>t in e?Cw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dw=(e,t)=>{for(var r in t||(t={}))zw.call(t,r)&&bf(e,r,t[r]);if(kf)for(var r of kf(t))Rw.call(t,r)&&bf(e,r,t[r]);return e},jw=(e,t)=>Nw(e,Tw(t));function Fy(e){return jw(Dw({},e),{fn:{fontStyles:Pe.fontStyles(e),themeColor:Pe.themeColor(e),focusStyles:Pe.focusStyles(e),largerThan:Pe.largerThan(e),smallerThan:Pe.smallerThan(e),radialGradient:Pe.radialGradient,linearGradient:Pe.linearGradient,gradient:Pe.gradient(e),rgba:Pe.rgba,cover:Pe.cover,lighten:Pe.lighten,darken:Pe.darken,primaryShade:Pe.primaryShade(e),radius:Pe.radius(e),variant:Pe.variant(e),hover:Pe.hover,primaryColor:Pe.primaryColor(e),placeholderStyles:Pe.placeholderStyles(e),dimmed:Pe.dimmed(e)}})}Object.keys(jy);const Iw={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:jy,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},Uu=Fy(Iw);function Mw(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ce(hn,--Ke):0,mn--,we===10&&(mn=1,Bl--),we}function it(){return we=Ke2||yo(we)>3?"":" "}function Xw(e,t){for(;--t&&it()&&!(we<48||we>102||we>57&&we<65||we>70&&we<97););return Oo(e,di()+(t<6&&zt()==32&&it()==32))}function Ms(e){for(;it();)switch(we){case e:return Ke;case 34:case 39:e!==34&&e!==39&&Ms(we);break;case 40:e===41&&Ms(e);break;case 92:it();break}return Ke}function Kw(e,t){for(;it()&&e+we!==47+10;)if(e+we===42+42&&zt()===47)break;return"/*"+Oo(t,Ke-1)+"*"+Hl(e===47?e:it())}function Jw(e){for(;!yo(zt());)it();return Oo(e,Ke)}function Zw(e){return Uy(mi("",null,null,null,[""],e=By(e),0,[0],e))}function mi(e,t,r,n,o,i,l,a,s){for(var u=0,m=0,p=l,d=0,g=0,h=0,v=1,O=1,f=1,c=0,y="",S=o,b=i,E=n,x=y;O;)switch(h=c,c=it()){case 40:if(h!=108&&Ce(x,p-1)==58){Is(x+=Z(pi(c),"&","&\f"),"&\f")!=-1&&(f=-1);break}case 34:case 39:case 91:x+=pi(c);break;case 9:case 10:case 13:case 32:x+=Qw(h);break;case 92:x+=Xw(di()-1,7);continue;case 47:switch(zt()){case 42:case 47:Ho(qw(Kw(it(),di()),t,r),s);break;default:x+="/"}break;case 123*v:a[u++]=bt(x)*f;case 125*v:case 59:case 0:switch(c){case 0:case 125:O=0;case 59+m:g>0&&bt(x)-p&&Ho(g>32?Cf(x+";",n,r,p-1):Cf(Z(x," ","")+";",n,r,p-2),s);break;case 59:x+=";";default:if(Ho(E=Ef(x,t,r,u,m,o,a,y,S=[],b=[],p),i),c===123)if(m===0)mi(x,t,E,E,S,i,p,a,b);else switch(d===99&&Ce(x,3)===110?100:d){case 100:case 109:case 115:mi(e,E,E,n&&Ho(Ef(e,E,E,0,0,o,a,y,o,S=[],p),b),o,b,p,a,n?S:b);break;default:mi(x,E,E,E,[""],b,0,a,b)}}u=m=g=0,v=f=1,y=x="",p=l;break;case 58:p=1+bt(x),g=h;default:if(v<1){if(c==123)--v;else if(c==125&&v++==0&&Yw()==125)continue}switch(x+=Hl(c),c*v){case 38:f=m>0?1:(x+="\f",-1);break;case 44:a[u++]=(bt(x)-1)*f,f=1;break;case 64:zt()===45&&(x+=pi(it())),d=zt(),m=p=bt(y=x+=Jw(di())),c++;break;case 45:h===45&&bt(x)==2&&(v=0)}}return i}function Ef(e,t,r,n,o,i,l,a,s,u,m){for(var p=o-1,d=o===0?i:[""],g=Qu(d),h=0,v=0,O=0;h0?d[f]+" "+c:Z(c,/&\f/g,d[f])))&&(s[O++]=y);return Ul(e,t,r,o===0?Gu:a,s,u,m)}function qw(e,t,r){return Ul(e,t,r,Ay,Hl(Gw()),mo(e,2,-2),0)}function Cf(e,t,r,n){return Ul(e,t,r,Yu,mo(e,0,n),mo(e,n+1,-1),n)}function ln(e,t){for(var r="",n=Qu(e),o=0;o6)switch(Ce(e,t+1)){case 109:if(Ce(e,t+4)!==45)break;case 102:return Z(e,/(.+:)(.+)-([^]+)/,"$1"+X+"$2-$3$1"+Ui+(Ce(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Is(e,"stretch")?Gy(Z(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ce(e,t+1)!==115)break;case 6444:switch(Ce(e,bt(e)-3-(~Is(e,"!important")&&10))){case 107:return Z(e,":",":"+X)+e;case 101:return Z(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+X+(Ce(e,14)===45?"inline-":"")+"box$3$1"+X+"$2$3$1"+Me+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return X+e+Me+Z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return X+e+Me+Z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return X+e+Me+Z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return X+e+Me+e+e}return e}var u_=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Yu:t.return=Gy(t.value,t.length);break;case Wy:return ln([Cn(t,{value:Z(t.value,"@","@"+X)})],o);case Gu:if(t.length)return Uw(t.props,function(i){switch(Bw(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ln([Cn(t,{props:[Z(i,/:(read-\w+)/,":"+Ui+"$1")]})],o);case"::placeholder":return ln([Cn(t,{props:[Z(i,/:(plac\w+)/,":"+X+"input-$1")]}),Cn(t,{props:[Z(i,/:(plac\w+)/,":"+Ui+"$1")]}),Cn(t,{props:[Z(i,/:(plac\w+)/,Me+"input-$1")]})],o)}return""})}},c_=[u_],Yy=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var O=v.getAttribute("data-emotion");O.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var o=t.stylisPlugins||c_,i={},l,a=[];l=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var O=v.getAttribute("data-emotion").split(" "),f=1;f=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var P_={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},O_=/[A-Z]|^ms/g,x_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qy=function(t){return t.charCodeAt(1)===45},zf=function(t){return t!=null&&typeof t!="boolean"},Ra=n_(function(e){return qy(e)?e:e.replace(O_,"-$&").toLowerCase()}),Rf=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(x_,function(n,o,i){return Et={name:o,styles:i,next:Et},o})}return P_[t]!==1&&!qy(t)&&typeof r=="number"&&r!==0?r+"px":r};function go(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Et={name:r.name,styles:r.styles,next:Et},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Et={name:n.name,styles:n.styles,next:Et},n=n.next;var o=r.styles+";";return o}return $_(e,t,r)}case"function":{if(e!==void 0){var i=Et,l=r(e);return Et=i,go(e,t,l)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function $_(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot in e?T_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I_=(e,t)=>{for(var r in t||(t={}))D_.call(t,r)&&Mf(e,r,t[r]);if(If)for(var r of If(t))j_.call(t,r)&&Mf(e,r,t[r]);return e},M_=(e,t)=>z_(e,R_(t));function L_({theme:e}){return P(ra,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:M_(I_({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Bo(e,t,r){Object.keys(t).forEach(n=>{e[`--mantine-${r}-${n}`]=w(t[n])})}function F_({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};Bo(t,e.shadows,"shadow"),Bo(t,e.fontSizes,"font-size"),Bo(t,e.radius,"radius"),Bo(t,e.spacing,"spacing"),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,i)=>{t[`--mantine-color-${n}-${i}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),P(ra,{styles:{":root":t}})}var A_=Object.defineProperty,W_=Object.defineProperties,V_=Object.getOwnPropertyDescriptors,Lf=Object.getOwnPropertySymbols,H_=Object.prototype.hasOwnProperty,B_=Object.prototype.propertyIsEnumerable,Ff=(e,t,r)=>t in e?A_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hr=(e,t)=>{for(var r in t||(t={}))H_.call(t,r)&&Ff(e,r,t[r]);if(Lf)for(var r of Lf(t))B_.call(t,r)&&Ff(e,r,t[r]);return e},Af=(e,t)=>W_(e,V_(t));function U_(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const l=t.headings.sizes?Object.keys(e.headings.sizes).reduce((a,s)=>(a[s]=hr(hr({},e.headings.sizes[s]),t.headings.sizes[s]),a),{}):e.headings.sizes;return Af(hr({},o),{headings:Af(hr(hr({},e.headings),t.headings),{sizes:l})})}return o[i]=typeof t[i]=="object"?hr(hr({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if((t==null?void 0:t.fontFamily)&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color");return n}function G_(e,t){return Fy(U_(e,t))}function rg(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const Y_={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${w(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Q_(){return P(ra,{styles:Y_})}var X_=Object.defineProperty,Wf=Object.getOwnPropertySymbols,K_=Object.prototype.hasOwnProperty,J_=Object.prototype.propertyIsEnumerable,Vf=(e,t,r)=>t in e?X_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qn=(e,t)=>{for(var r in t||(t={}))K_.call(t,r)&&Vf(e,r,t[r]);if(Wf)for(var r of Wf(t))J_.call(t,r)&&Vf(e,r,t[r]);return e};const Gi=k.exports.createContext({theme:Uu});function vr(){var e;return((e=k.exports.useContext(Gi))==null?void 0:e.theme)||Uu}function Z_(e){const t=vr(),r=n=>{var o,i,l,a;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((i=t.components[n])==null?void 0:i.classNames)||{},variants:(l=t.components[n])==null?void 0:l.variants,sizes:(a=t.components[n])==null?void 0:a.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function ng(){var e;return(e=k.exports.useContext(Gi))==null?void 0:e.emotionCache}function he(e,t,r){var n;const o=vr(),i=(n=o.components[e])==null?void 0:n.defaultProps,l=typeof i=="function"?i(o):i;return Qn(Qn(Qn({},t),l),rg(r))}function og({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:i=!1,children:l}){const a=k.exports.useContext(Gi),s=G_(Uu,i?Qn(Qn({},a.theme),e):e);return P(N_,{theme:s,children:K(Gi.Provider,{value:{theme:s,emotionCache:t},children:[r&&P(Q_,{}),n&&P(L_,{theme:s}),o&&P(F_,{theme:s}),typeof s.globalStyles=="function"&&P(ra,{styles:s.globalStyles(s)}),l]})})}og.displayName="@mantine/core/MantineProvider";function q_(e,t){const r=k.exports.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const eS=Yy({key:"mantine",prepend:!0});function tS(){return ng()||eS}var rS=Object.defineProperty,Hf=Object.getOwnPropertySymbols,nS=Object.prototype.hasOwnProperty,oS=Object.prototype.propertyIsEnumerable,Bf=(e,t,r)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iS=(e,t)=>{for(var r in t||(t={}))nS.call(t,r)&&Bf(e,r,t[r]);if(Hf)for(var r of Hf(t))oS.call(t,r)&&Bf(e,r,t[r]);return e};const Da="ref";function lS(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(Da in r))return{args:e,ref:t};t=r[Da];const n=iS({},r);return delete n[Da],{args:[n],ref:t}}const{cssFactory:aS}=(()=>{function e(r,n,o){const i=[],l=w_(r,i,o);return i.length<2?o:l+n(i)}function t(r){const{cache:n}=r,o=(...l)=>{const{ref:a,args:s}=lS(l),u=eg(s,n.registered);return Zy(n,u,!1),`${n.key}-${u.name}${a===void 0?"":` ${a}`}`};return{css:o,cx:(...l)=>e(n.registered,o,Sy(l))}}return{cssFactory:t}})();function ig(){const e=tS();return q_(()=>aS({cache:e}),[e])}function sS({cx:e,classes:t,context:r,classNames:n,name:o,cache:i}){const l=r.reduce((a,s)=>(Object.keys(s.classNames).forEach(u=>{typeof a[u]!="string"?a[u]=`${s.classNames[u]}`:a[u]=`${a[u]} ${s.classNames[u]}`}),a),{});return Object.keys(t).reduce((a,s)=>(a[s]=e(t[s],l[s],n!=null&&n[s],Array.isArray(o)?o.filter(Boolean).map(u=>`${(i==null?void 0:i.key)||"mantine"}-${u}-${s}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${s}`:null),a),{})}var uS=Object.defineProperty,Uf=Object.getOwnPropertySymbols,cS=Object.prototype.hasOwnProperty,fS=Object.prototype.propertyIsEnumerable,Gf=(e,t,r)=>t in e?uS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ja=(e,t)=>{for(var r in t||(t={}))cS.call(t,r)&&Gf(e,r,t[r]);if(Uf)for(var r of Uf(t))fS.call(t,r)&&Gf(e,r,t[r]);return e};function As(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=ja(ja({},e[r]),t[r]):e[r]=ja({},t[r])}),e}function Yf(e,t,r,n){const o=i=>typeof i=="function"?i(t,r||{},n):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,l)=>As(i,l),{}):o(e)}function dS({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((i,l)=>(l.variants&&n in l.variants&&As(i,l.variants[n](t,r,{variant:n,size:o})),l.sizes&&o in l.sizes&&As(i,l.sizes[o](t,r,{variant:n,size:o})),i),{})}function Se(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const i=vr(),l=Z_(o==null?void 0:o.name),a=ng(),s={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:u,cx:m}=ig(),p=t(i,n,s),d=Yf(o==null?void 0:o.styles,i,n,s),g=Yf(l,i,n,s),h=dS({ctx:l,theme:i,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),v=Object.fromEntries(Object.keys(p).map(O=>{const f=m({[u(p[O])]:!(o!=null&&o.unstyled)},u(h[O]),u(g[O]),u(d[O]));return[O,f]}));return{classes:sS({cx:m,classes:v,context:l,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:a}),cx:m,theme:i}}return r}function Nn(e){return`___ref-${e||""}`}var pS=Object.defineProperty,mS=Object.defineProperties,yS=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,gS=Object.prototype.hasOwnProperty,vS=Object.prototype.propertyIsEnumerable,Xf=(e,t,r)=>t in e?pS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tn=(e,t)=>{for(var r in t||(t={}))gS.call(t,r)&&Xf(e,r,t[r]);if(Qf)for(var r of Qf(t))vS.call(t,r)&&Xf(e,r,t[r]);return e},zn=(e,t)=>mS(e,yS(t));const Rn={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${w(10)})`},transitionProperty:"transform, opacity"},Uo={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${w(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${w(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${w(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${w(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:zn(Tn({},Rn),{common:{transformOrigin:"center center"}}),"pop-bottom-left":zn(Tn({},Rn),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":zn(Tn({},Rn),{common:{transformOrigin:"bottom right"}}),"pop-top-left":zn(Tn({},Rn),{common:{transformOrigin:"top left"}}),"pop-top-right":zn(Tn({},Rn),{common:{transformOrigin:"top right"}})};function hS(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function wS(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function _S(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=k.exports.useState(r?t:wS(e,t)),i=k.exports.useRef();return k.exports.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),hS(i.current,l=>o(l.matches))},[e]),n}function Xn(e,t,r){return Math.min(Math.max(e,t),r)}const lg=typeof document<"u"?k.exports.useLayoutEffect:k.exports.useEffect;function SS(e,t){const r=k.exports.useRef(!1);k.exports.useEffect(()=>()=>{r.current=!1},[]),k.exports.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const PS=yp["useId".toString()]||(()=>{});function OS(){const e=PS();return e?`mantine-${e.replace(/:/g,"")}`:""}function xS(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function ag(e){const t=OS(),[r,n]=k.exports.useState(t);return lg(()=>{n(xS())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function $S(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function kS(...e){return t=>{e.forEach(r=>$S(r,t))}}function sg(...e){return k.exports.useCallback(kS(...e),e)}function bS(e,t,r="ltr"){const n=k.exports.useRef(),o=k.exports.useRef(!1),i=k.exports.useRef(!1),l=k.exports.useRef(0),[a,s]=k.exports.useState(!1);return k.exports.useEffect(()=>{o.current=!0},[]),k.exports.useEffect(()=>{const u=({x:c,y})=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{if(o.current&&n.current){n.current.style.userSelect="none";const S=n.current.getBoundingClientRect();if(S.width&&S.height){const b=Xn((c-S.left)/S.width,0,1);e({x:r==="ltr"?b:1-b,y:Xn((y-S.top)/S.height,0,1)})}}})},m=()=>{document.addEventListener("mousemove",v),document.addEventListener("mouseup",g),document.addEventListener("touchmove",f),document.addEventListener("touchend",g)},p=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",g)},d=()=>{!i.current&&o.current&&(i.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),s(!0),m())},g=()=>{i.current&&o.current&&(i.current=!1,s(!1),p(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},h=c=>{d(),c.preventDefault(),v(c)},v=c=>u({x:c.clientX,y:c.clientY}),O=c=>{c.cancelable&&c.preventDefault(),d(),f(c)},f=c=>{c.cancelable&&c.preventDefault(),u({x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",h),n.current.addEventListener("touchstart",O,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",h),n.current.removeEventListener("touchstart",O))}},[r,e]),{ref:n,active:a}}function na({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,i]=k.exports.useState(t!==void 0?t:r),l=a=>{i(a),n==null||n(a)};return e!==void 0?[e,n,!0]:[o,l,!1]}function ug(e,t){return _S("(prefers-reduced-motion: reduce)",e,t)}const ES={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function CS(){const e=k.exports.useRef(0),t=k.exports.useRef(null),[r,n]=k.exports.useState(ES),o=k.exports.useMemo(()=>typeof window<"u"?new ResizeObserver(i=>{const l=i[0];l&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{t.current&&n(l.contentRect)}))}):null,[]);return k.exports.useEffect(()=>(t.current&&o.observe(t.current),()=>{o.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[t.current]),[t,r]}var Kf=Object.getOwnPropertySymbols,NS=Object.prototype.hasOwnProperty,TS=Object.prototype.propertyIsEnumerable,zS=(e,t)=>{var r={};for(var n in e)NS.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kf)for(var n of Kf(e))t.indexOf(n)<0&&TS.call(e,n)&&(r[n]=e[n]);return r};function Zu(e){const t=e,{m:r,mx:n,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:m,py:p,pt:d,pb:g,pl:h,pr:v,bg:O,c:f,opacity:c,ff:y,fz:S,fw:b,lts:E,ta:x,lh:$,fs:T,tt:M,td:H,w:Q,miw:J,maw:ce,h:re,mih:ze,mah:ne,bgsz:z,bgp:F,bgr:I,bga:B,pos:_,top:N,left:R,bottom:D,right:j,inset:A,display:U}=t,te=zS(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:rg({m:r,mx:n,my:o,mt:i,mb:l,ml:a,mr:s,p:u,px:m,py:p,pt:d,pb:g,pl:h,pr:v,bg:O,c:f,opacity:c,ff:y,fz:S,fw:b,lts:E,ta:x,lh:$,fs:T,tt:M,td:H,w:Q,miw:J,maw:ce,h:re,mih:ze,mah:ne,bgsz:z,bgp:F,bgr:I,bga:B,pos:_,top:N,left:R,bottom:D,right:j,inset:A,display:U}),rest:te}}function RS(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>Bi(V({size:n,sizes:t.breakpoints}))-Bi(V({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function DS({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return RS(e,t).reduce((l,a)=>{if(a==="base"&&e.base!==void 0){const u=r(e.base,t);return Array.isArray(n)?(n.forEach(m=>{l[m]=u}),l):(l[n]=u,l)}const s=r(e[a],t);return Array.isArray(n)?(l[t.fn.largerThan(a)]={},n.forEach(u=>{l[t.fn.largerThan(a)][u]=s}),l):(l[t.fn.largerThan(a)]={[n]:s},l)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((i,l)=>(i[l]=o,i),{}):{[n]:o}}function jS(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function IS(e){return w(e)}function MS(e){return e}function LS(e,t){return V({size:e,sizes:t.fontSizes})}const FS=["-xs","-sm","-md","-lg","-xl"];function AS(e,t){return FS.includes(e)?`calc(${V({size:e.replace("-",""),sizes:t.spacing})} * -1)`:V({size:e,sizes:t.spacing})}const WS={identity:MS,color:jS,size:IS,fontSize:LS,spacing:AS},VS={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var HS=Object.defineProperty,Jf=Object.getOwnPropertySymbols,BS=Object.prototype.hasOwnProperty,US=Object.prototype.propertyIsEnumerable,Zf=(e,t,r)=>t in e?HS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qf=(e,t)=>{for(var r in t||(t={}))BS.call(t,r)&&Zf(e,r,t[r]);if(Jf)for(var r of Jf(t))US.call(t,r)&&Zf(e,r,t[r]);return e};function Ws(e,t,r=VS){return Object.keys(r).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(DS({value:e[i],getValue:WS[r[i].type],property:r[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(l=>{typeof i[l]=="object"&&i[l]!==null&&l in o?o[l]=qf(qf({},o[l]),i[l]):o[l]=i[l]}),o),{})}function ed(e,t){return typeof e=="function"?e(t):e}function GS(e,t,r){const n=vr(),{css:o,cx:i}=ig();return Array.isArray(e)?i(r,o(Ws(t,n)),e.map(l=>o(ed(l,n)))):i(r,o(ed(e,n)),o(Ws(t,n)))}var YS=Object.defineProperty,Yi=Object.getOwnPropertySymbols,cg=Object.prototype.hasOwnProperty,fg=Object.prototype.propertyIsEnumerable,td=(e,t,r)=>t in e?YS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QS=(e,t)=>{for(var r in t||(t={}))cg.call(t,r)&&td(e,r,t[r]);if(Yi)for(var r of Yi(t))fg.call(t,r)&&td(e,r,t[r]);return e},XS=(e,t)=>{var r={};for(var n in e)cg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yi)for(var n of Yi(e))t.indexOf(n)<0&&fg.call(e,n)&&(r[n]=e[n]);return r};const dg=k.exports.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:i,sx:l}=r,a=XS(r,["className","component","style","sx"]);const{systemStyles:s,rest:u}=Zu(a);return P(o||"div",{...QS({ref:t,className:GS(l,s,n),style:i},u)})});dg.displayName="@mantine/core/Box";const me=dg;var KS=Object.defineProperty,JS=Object.defineProperties,ZS=Object.getOwnPropertyDescriptors,rd=Object.getOwnPropertySymbols,qS=Object.prototype.hasOwnProperty,eP=Object.prototype.propertyIsEnumerable,nd=(e,t,r)=>t in e?KS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,od=(e,t)=>{for(var r in t||(t={}))qS.call(t,r)&&nd(e,r,t[r]);if(rd)for(var r of rd(t))eP.call(t,r)&&nd(e,r,t[r]);return e},tP=(e,t)=>JS(e,ZS(t)),rP=Se(e=>({root:tP(od(od({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const nP=rP;var oP=Object.defineProperty,Qi=Object.getOwnPropertySymbols,pg=Object.prototype.hasOwnProperty,mg=Object.prototype.propertyIsEnumerable,id=(e,t,r)=>t in e?oP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iP=(e,t)=>{for(var r in t||(t={}))pg.call(t,r)&&id(e,r,t[r]);if(Qi)for(var r of Qi(t))mg.call(t,r)&&id(e,r,t[r]);return e},lP=(e,t)=>{var r={};for(var n in e)pg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qi)for(var n of Qi(e))t.indexOf(n)<0&&mg.call(e,n)&&(r[n]=e[n]);return r};const yg=k.exports.forwardRef((e,t)=>{const r=he("UnstyledButton",{},e),{className:n,component:o="button",unstyled:i,variant:l}=r,a=lP(r,["className","component","unstyled","variant"]),{classes:s,cx:u}=nP(null,{name:"UnstyledButton",unstyled:i,variant:l});return P(me,{...iP({component:o,ref:t,className:u(s.root,n),type:o==="button"?"button":void 0},a)})});yg.displayName="@mantine/core/UnstyledButton";const aP=yg;var sP=Object.defineProperty,Xi=Object.getOwnPropertySymbols,gg=Object.prototype.hasOwnProperty,vg=Object.prototype.propertyIsEnumerable,ld=(e,t,r)=>t in e?sP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uP=(e,t)=>{for(var r in t||(t={}))gg.call(t,r)&&ld(e,r,t[r]);if(Xi)for(var r of Xi(t))vg.call(t,r)&&ld(e,r,t[r]);return e},cP=(e,t)=>{var r={};for(var n in e)gg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xi)for(var n of Xi(e))t.indexOf(n)<0&&vg.call(e,n)&&(r[n]=e[n]);return r};function fP(e){var t=e,{size:r,color:n}=t,o=cP(t,["size","color"]);return K("svg",{...uP({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,width:r},o),children:[K("rect",{y:"10",width:"15",height:"120",rx:"6",children:[P("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]}),K("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6",children:[P("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]}),K("rect",{x:"60",width:"15",height:"140",rx:"6",children:[P("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]}),K("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6",children:[P("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]}),K("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6",children:[P("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]})]})}var dP=Object.defineProperty,Ki=Object.getOwnPropertySymbols,hg=Object.prototype.hasOwnProperty,wg=Object.prototype.propertyIsEnumerable,ad=(e,t,r)=>t in e?dP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pP=(e,t)=>{for(var r in t||(t={}))hg.call(t,r)&&ad(e,r,t[r]);if(Ki)for(var r of Ki(t))wg.call(t,r)&&ad(e,r,t[r]);return e},mP=(e,t)=>{var r={};for(var n in e)hg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ki)for(var n of Ki(e))t.indexOf(n)<0&&wg.call(e,n)&&(r[n]=e[n]);return r};function yP(e){var t=e,{size:r,color:n}=t,o=mP(t,["size","color"]);return P("svg",{...pP({width:r,height:r,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n},o),children:P("g",{fill:"none",fillRule:"evenodd",children:K("g",{transform:"translate(2.5 2.5)",strokeWidth:"5",children:[P("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),P("path",{d:"M32 16c0-9.94-8.06-16-16-16",children:P("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})})]})})})}var gP=Object.defineProperty,Ji=Object.getOwnPropertySymbols,_g=Object.prototype.hasOwnProperty,Sg=Object.prototype.propertyIsEnumerable,sd=(e,t,r)=>t in e?gP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vP=(e,t)=>{for(var r in t||(t={}))_g.call(t,r)&&sd(e,r,t[r]);if(Ji)for(var r of Ji(t))Sg.call(t,r)&&sd(e,r,t[r]);return e},hP=(e,t)=>{var r={};for(var n in e)_g.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ji)for(var n of Ji(e))t.indexOf(n)<0&&Sg.call(e,n)&&(r[n]=e[n]);return r};function wP(e){var t=e,{size:r,color:n}=t,o=hP(t,["size","color"]);return K("svg",{...vP({width:r,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n},o),children:[K("circle",{cx:"15",cy:"15",r:"15",children:[P("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]}),K("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3",children:[P("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]}),K("circle",{cx:"105",cy:"15",r:"15",children:[P("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),P("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]})]})}var _P=Object.defineProperty,Zi=Object.getOwnPropertySymbols,Pg=Object.prototype.hasOwnProperty,Og=Object.prototype.propertyIsEnumerable,ud=(e,t,r)=>t in e?_P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SP=(e,t)=>{for(var r in t||(t={}))Pg.call(t,r)&&ud(e,r,t[r]);if(Zi)for(var r of Zi(t))Og.call(t,r)&&ud(e,r,t[r]);return e},PP=(e,t)=>{var r={};for(var n in e)Pg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zi)for(var n of Zi(e))t.indexOf(n)<0&&Og.call(e,n)&&(r[n]=e[n]);return r};const Ia={bars:fP,oval:yP,dots:wP},OP={xs:w(18),sm:w(22),md:w(36),lg:w(44),xl:w(58)},xP={size:"md"};function xg(e){const t=he("Loader",xP,e),{size:r,color:n,variant:o}=t,i=PP(t,["size","color","variant"]),l=vr(),a=o in Ia?o:l.loader;return P(me,{...SP({role:"presentation",component:Ia[a]||Ia.bars,size:V({size:r,sizes:OP}),color:l.fn.variant({variant:"filled",primaryFallback:!1,color:n||l.primaryColor}).background},i)})}xg.displayName="@mantine/core/Loader";var $P=Object.defineProperty,kP=Object.defineProperties,bP=Object.getOwnPropertyDescriptors,cd=Object.getOwnPropertySymbols,EP=Object.prototype.hasOwnProperty,CP=Object.prototype.propertyIsEnumerable,fd=(e,t,r)=>t in e?$P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Go=(e,t)=>{for(var r in t||(t={}))EP.call(t,r)&&fd(e,r,t[r]);if(cd)for(var r of cd(t))CP.call(t,r)&&fd(e,r,t[r]);return e},NP=(e,t)=>kP(e,bP(t));function TP({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function zP({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function RP(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function DP({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var jP=Se((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:i,underline:l,gradient:a,weight:s,transform:u,align:m,strikethrough:p,italic:d},{size:g})=>{const h=e.fn.variant({variant:"gradient",gradient:a});return{root:NP(Go(Go(Go(Go({},e.fn.fontStyles()),e.fn.focusStyles()),RP(r)),DP({theme:e,truncate:n})),{color:zP({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||g===void 0?"inherit":V({size:g,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:TP({underline:l,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":s,textTransform:u,textAlign:m,fontStyle:d?"italic":void 0}),gradient:{backgroundImage:h.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const IP=jP;var MP=Object.defineProperty,qi=Object.getOwnPropertySymbols,$g=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,dd=(e,t,r)=>t in e?MP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,LP=(e,t)=>{for(var r in t||(t={}))$g.call(t,r)&&dd(e,r,t[r]);if(qi)for(var r of qi(t))kg.call(t,r)&&dd(e,r,t[r]);return e},FP=(e,t)=>{var r={};for(var n in e)$g.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qi)for(var n of qi(e))t.indexOf(n)<0&&kg.call(e,n)&&(r[n]=e[n]);return r};const AP={variant:"text"},bg=k.exports.forwardRef((e,t)=>{const r=he("Text",AP,e),{className:n,size:o,weight:i,transform:l,color:a,align:s,variant:u,lineClamp:m,truncate:p,gradient:d,inline:g,inherit:h,underline:v,strikethrough:O,italic:f,classNames:c,styles:y,unstyled:S,span:b,__staticSelector:E}=r,x=FP(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:$,cx:T}=IP({color:a,lineClamp:m,truncate:p,inline:g,inherit:h,underline:v,strikethrough:O,italic:f,weight:i,transform:l,align:s,gradient:d},{unstyled:S,name:E||"Text",variant:u,size:o});return P(me,{...LP({ref:t,className:T($.root,{[$.gradient]:u==="gradient"},n),component:b?"span":"div"},x)})});bg.displayName="@mantine/core/Text";const xr=bg,Yo={xs:w(1),sm:w(2),md:w(3),lg:w(4),xl:w(5)};function Qo(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var WP=Se((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:w(1),borderTop:`${V({size:r,sizes:Yo})} ${n} ${Qo(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${V({size:r,sizes:Yo})} ${n} ${Qo(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:w(V({size:r,sizes:Yo})),borderTopColor:Qo(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:w(V({size:r,sizes:Yo})),borderLeftColor:Qo(e,t),borderLeftStyle:n}}));const VP=WP;var HP=Object.defineProperty,BP=Object.defineProperties,UP=Object.getOwnPropertyDescriptors,el=Object.getOwnPropertySymbols,Eg=Object.prototype.hasOwnProperty,Cg=Object.prototype.propertyIsEnumerable,pd=(e,t,r)=>t in e?HP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,md=(e,t)=>{for(var r in t||(t={}))Eg.call(t,r)&&pd(e,r,t[r]);if(el)for(var r of el(t))Cg.call(t,r)&&pd(e,r,t[r]);return e},GP=(e,t)=>BP(e,UP(t)),YP=(e,t)=>{var r={};for(var n in e)Eg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&el)for(var n of el(e))t.indexOf(n)<0&&Cg.call(e,n)&&(r[n]=e[n]);return r};const QP={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ng=k.exports.forwardRef((e,t)=>{const r=he("Divider",QP,e),{className:n,color:o,orientation:i,size:l,label:a,labelPosition:s,labelProps:u,variant:m,styles:p,classNames:d,unstyled:g}=r,h=YP(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:v,cx:O}=VP({color:o},{classNames:d,styles:p,unstyled:g,name:"Divider",variant:m,size:l}),f=i==="vertical",c=i==="horizontal",y=!!a&&c,S=!(u!=null&&u.color);return P(me,{...md({ref:t,className:O(v.root,{[v.vertical]:f,[v.horizontal]:c,[v.withLabel]:y},n),role:"separator"},h),children:y&&P(xr,{...GP(md({},u),{size:(u==null?void 0:u.size)||"xs",mt:w(2),className:O(v.label,v[s],{[v.labelDefaultStyles]:S})}),children:a})})});Ng.displayName="@mantine/core/Divider";var XP=Object.defineProperty,yd=Object.getOwnPropertySymbols,KP=Object.prototype.hasOwnProperty,JP=Object.prototype.propertyIsEnumerable,gd=(e,t,r)=>t in e?XP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lr=(e,t)=>{for(var r in t||(t={}))KP.call(t,r)&&gd(e,r,t[r]);if(yd)for(var r of yd(t))JP.call(t,r)&&gd(e,r,t[r]);return e};const vd={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function ZP({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Uo?Lr(Lr(Lr({transitionProperty:Uo[e].transitionProperty},o),Uo[e].common),Uo[e][vd[t]]):null:Lr(Lr(Lr({transitionProperty:e.transitionProperty},o),e.common),e[vd[t]])}function qP({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:l,onExited:a}){const s=vr(),u=ug(),m=s.respectReducedMotion?u:!1,[p,d]=k.exports.useState(n?"entered":"exited");let g=m?0:e;const h=k.exports.useRef(-1),v=O=>{const f=O?o:i,c=O?l:a;if(d(O?"pre-entering":"pre-exiting"),window.clearTimeout(h.current),g=m?0:O?e:t,g===0)typeof f=="function"&&f(),typeof c=="function"&&c(),d(O?"entered":"exited");else{const y=window.setTimeout(()=>{typeof f=="function"&&f(),d(O?"entering":"exiting")},10);h.current=window.setTimeout(()=>{window.clearTimeout(y),typeof c=="function"&&c(),d(O?"entered":"exited")},g)}};return SS(()=>{v(n)},[n]),k.exports.useEffect(()=>()=>window.clearTimeout(h.current),[]),{transitionDuration:g,transitionStatus:p,transitionTimingFunction:r||s.transitionTimingFunction}}function Tg({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:l,onExit:a,onEntered:s,onEnter:u,onExited:m}){const{transitionDuration:p,transitionStatus:d,transitionTimingFunction:g}=qP({mounted:o,exitDuration:n,duration:r,timingFunction:l,onExit:a,onEntered:s,onEnter:u,onExited:m});return p===0?o?P(Hi,{children:i({})}):e?i({display:"none"}):null:d==="exited"?e?i({display:"none"}):null:P(Hi,{children:i(ZP({transition:t,duration:p,state:d,timingFunction:g}))})}Tg.displayName="@mantine/core/Transition";var eO=Se((e,t,{size:r})=>({label:{display:"inline-block",fontSize:V({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const tO=eO;var rO=Object.defineProperty,tl=Object.getOwnPropertySymbols,zg=Object.prototype.hasOwnProperty,Rg=Object.prototype.propertyIsEnumerable,hd=(e,t,r)=>t in e?rO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nO=(e,t)=>{for(var r in t||(t={}))zg.call(t,r)&&hd(e,r,t[r]);if(tl)for(var r of tl(t))Rg.call(t,r)&&hd(e,r,t[r]);return e},oO=(e,t)=>{var r={};for(var n in e)zg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tl)for(var n of tl(e))t.indexOf(n)<0&&Rg.call(e,n)&&(r[n]=e[n]);return r};const iO={labelElement:"label",size:"sm"},qu=k.exports.forwardRef((e,t)=>{const r=he("InputLabel",iO,e),{labelElement:n,children:o,required:i,size:l,classNames:a,styles:s,unstyled:u,className:m,htmlFor:p,__staticSelector:d,variant:g,onMouseDown:h}=r,v=oO(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:O,cx:f}=tO(null,{name:["InputWrapper",d],classNames:a,styles:s,unstyled:u,variant:g,size:l});return K(me,{...nO({component:n,ref:t,className:f(O.label,m),htmlFor:n==="label"?p:void 0,onMouseDown:c=>{h==null||h(c),!c.defaultPrevented&&c.detail>1&&c.preventDefault()}},v),children:[o,i&&P("span",{className:O.required,"aria-hidden":!0,children:" *"})]})});qu.displayName="@mantine/core/InputLabel";var lO=Se((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${V({size:r,sizes:e.fontSizes})} - ${w(2)})`,lineHeight:1.2,display:"block"}}));const aO=lO;var sO=Object.defineProperty,rl=Object.getOwnPropertySymbols,Dg=Object.prototype.hasOwnProperty,jg=Object.prototype.propertyIsEnumerable,wd=(e,t,r)=>t in e?sO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uO=(e,t)=>{for(var r in t||(t={}))Dg.call(t,r)&&wd(e,r,t[r]);if(rl)for(var r of rl(t))jg.call(t,r)&&wd(e,r,t[r]);return e},cO=(e,t)=>{var r={};for(var n in e)Dg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rl)for(var n of rl(e))t.indexOf(n)<0&&jg.call(e,n)&&(r[n]=e[n]);return r};const fO={size:"sm"},ec=k.exports.forwardRef((e,t)=>{const r=he("InputError",fO,e),{children:n,className:o,classNames:i,styles:l,unstyled:a,size:s,__staticSelector:u,variant:m}=r,p=cO(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:g}=aO(null,{name:["InputWrapper",u],classNames:i,styles:l,unstyled:a,variant:m,size:s});return P(xr,{...uO({className:g(d.error,o),ref:t},p),children:n})});ec.displayName="@mantine/core/InputError";var dO=Se((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${V({size:r,sizes:e.fontSizes})} - ${w(2)})`,lineHeight:1.2,display:"block"}}));const pO=dO;var mO=Object.defineProperty,nl=Object.getOwnPropertySymbols,Ig=Object.prototype.hasOwnProperty,Mg=Object.prototype.propertyIsEnumerable,_d=(e,t,r)=>t in e?mO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yO=(e,t)=>{for(var r in t||(t={}))Ig.call(t,r)&&_d(e,r,t[r]);if(nl)for(var r of nl(t))Mg.call(t,r)&&_d(e,r,t[r]);return e},gO=(e,t)=>{var r={};for(var n in e)Ig.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&nl)for(var n of nl(e))t.indexOf(n)<0&&Mg.call(e,n)&&(r[n]=e[n]);return r};const vO={size:"sm"},tc=k.exports.forwardRef((e,t)=>{const r=he("InputDescription",vO,e),{children:n,className:o,classNames:i,styles:l,unstyled:a,size:s,__staticSelector:u,variant:m}=r,p=gO(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:g}=pO(null,{name:["InputWrapper",u],classNames:i,styles:l,unstyled:a,variant:m,size:s});return P(xr,{...yO({color:"dimmed",className:g(d.description,o),ref:t,unstyled:a},p),children:n})});tc.displayName="@mantine/core/InputDescription";const Lg=k.exports.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),hO=Lg.Provider,wO=()=>k.exports.useContext(Lg);function _O(e,{hasDescription:t,hasError:r}){const n=e.findIndex(s=>s==="input"),o=e[n-1],i=e[n+1];return{offsetBottom:t&&i==="description"||r&&i==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var SO=Object.defineProperty,PO=Object.defineProperties,OO=Object.getOwnPropertyDescriptors,Sd=Object.getOwnPropertySymbols,xO=Object.prototype.hasOwnProperty,$O=Object.prototype.propertyIsEnumerable,Pd=(e,t,r)=>t in e?SO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kO=(e,t)=>{for(var r in t||(t={}))xO.call(t,r)&&Pd(e,r,t[r]);if(Sd)for(var r of Sd(t))$O.call(t,r)&&Pd(e,r,t[r]);return e},bO=(e,t)=>PO(e,OO(t)),EO=Se(e=>({root:bO(kO({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const CO=EO;var NO=Object.defineProperty,TO=Object.defineProperties,zO=Object.getOwnPropertyDescriptors,ol=Object.getOwnPropertySymbols,Fg=Object.prototype.hasOwnProperty,Ag=Object.prototype.propertyIsEnumerable,Od=(e,t,r)=>t in e?NO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xt=(e,t)=>{for(var r in t||(t={}))Fg.call(t,r)&&Od(e,r,t[r]);if(ol)for(var r of ol(t))Ag.call(t,r)&&Od(e,r,t[r]);return e},xd=(e,t)=>TO(e,zO(t)),RO=(e,t)=>{var r={};for(var n in e)Fg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ol)for(var n of ol(e))t.indexOf(n)<0&&Ag.call(e,n)&&(r[n]=e[n]);return r};const DO={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Wg=k.exports.forwardRef((e,t)=>{const r=he("InputWrapper",DO,e),{className:n,label:o,children:i,required:l,id:a,error:s,description:u,labelElement:m,labelProps:p,descriptionProps:d,errorProps:g,classNames:h,styles:v,size:O,inputContainer:f,__staticSelector:c,unstyled:y,inputWrapperOrder:S,withAsterisk:b,variant:E}=r,x=RO(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:$,cx:T}=CO(null,{classNames:h,styles:v,name:["InputWrapper",c],unstyled:y,variant:E,size:O}),M={classNames:h,styles:v,unstyled:y,size:O,variant:E,__staticSelector:c},H=typeof b=="boolean"?b:l,Q=a?`${a}-error`:g==null?void 0:g.id,J=a?`${a}-description`:d==null?void 0:d.id,re=`${!!s&&typeof s!="boolean"?Q:""} ${u?J:""}`,ze=re.trim().length>0?re.trim():void 0,ne=o&&P(qu,{...Xt(Xt({key:"label",labelElement:m,id:a?`${a}-label`:void 0,htmlFor:a,required:H},M),p),children:o}),z=u&&P(tc,{...xd(Xt(Xt({key:"description"},d),M),{size:(d==null?void 0:d.size)||M.size,id:(d==null?void 0:d.id)||J}),children:u}),F=P(k.exports.Fragment,{children:f(i)},"input"),I=typeof s!="boolean"&&s&&P(ec,{...xd(Xt(Xt({},g),M),{size:(g==null?void 0:g.size)||M.size,key:"error",id:(g==null?void 0:g.id)||Q}),children:s}),B=S.map(_=>{switch(_){case"label":return ne;case"input":return F;case"description":return z;case"error":return I;default:return null}});return P(hO,{value:Xt({describedBy:ze},_O(S,{hasDescription:!!z,hasError:!!I})),children:P(me,{...Xt({className:T($.root,n),ref:t},x),children:B})})});Wg.displayName="@mantine/core/InputWrapper";var jO=Object.defineProperty,il=Object.getOwnPropertySymbols,Vg=Object.prototype.hasOwnProperty,Hg=Object.prototype.propertyIsEnumerable,$d=(e,t,r)=>t in e?jO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IO=(e,t)=>{for(var r in t||(t={}))Vg.call(t,r)&&$d(e,r,t[r]);if(il)for(var r of il(t))Hg.call(t,r)&&$d(e,r,t[r]);return e},MO=(e,t)=>{var r={};for(var n in e)Vg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&il)for(var n of il(e))t.indexOf(n)<0&&Hg.call(e,n)&&(r[n]=e[n]);return r};const LO={},Bg=k.exports.forwardRef((e,t)=>{const r=he("InputPlaceholder",LO,e),{sx:n}=r,o=MO(r,["sx"]);return P(me,{...IO({component:"span",sx:[i=>i.fn.placeholderStyles(),...Dy(n)],ref:t},o)})});Bg.displayName="@mantine/core/InputPlaceholder";var FO=Object.defineProperty,AO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,kd=Object.getOwnPropertySymbols,VO=Object.prototype.hasOwnProperty,HO=Object.prototype.propertyIsEnumerable,bd=(e,t,r)=>t in e?FO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xo=(e,t)=>{for(var r in t||(t={}))VO.call(t,r)&&bd(e,r,t[r]);if(kd)for(var r of kd(t))HO.call(t,r)&&bd(e,r,t[r]);return e},Ma=(e,t)=>AO(e,WO(t));const Be={xs:w(30),sm:w(36),md:w(42),lg:w(50),xl:w(60)},BO=["default","filled","unstyled"];function UO({theme:e,variant:t}){return BO.includes(t)?t==="default"?{border:`${w(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${w(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:w(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var GO=Se((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:i,iconWidth:l,offsetBottom:a,offsetTop:s,pointer:u},{variant:m,size:p})=>{const d=e.fn.variant({variant:"filled",color:"red"}).background,g=m==="default"||m==="filled"?{minHeight:V({size:p,sizes:Be}),paddingLeft:`calc(${V({size:p,sizes:Be})} / 3)`,paddingRight:i?o||V({size:p,sizes:Be}):`calc(${V({size:p,sizes:Be})} / 3)`,borderRadius:e.fn.radius(r)}:null;return{wrapper:{position:"relative",marginTop:s?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0},input:Ma(Xo(Xo(Ma(Xo({},e.fn.fontStyles()),{height:t?m==="unstyled"?void 0:"auto":V({size:p,sizes:Be}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${V({size:p,sizes:Be})} - ${w(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:V({size:p,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),UO({theme:e,variant:m})),g),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:d,borderColor:d,"&::placeholder":{opacity:1,color:d}},"&[data-with-icon]":{paddingLeft:typeof l=="number"?w(l):V({size:p,sizes:Be})},"&::placeholder":Ma(Xo({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:l?w(l):V({size:p,sizes:Be}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||V({size:p,sizes:Be})}}}),YO=Object.defineProperty,QO=Object.defineProperties,XO=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ug=Object.prototype.hasOwnProperty,Gg=Object.prototype.propertyIsEnumerable,Ed=(e,t,r)=>t in e?YO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ko=(e,t)=>{for(var r in t||(t={}))Ug.call(t,r)&&Ed(e,r,t[r]);if(ll)for(var r of ll(t))Gg.call(t,r)&&Ed(e,r,t[r]);return e},Cd=(e,t)=>QO(e,XO(t)),KO=(e,t)=>{var r={};for(var n in e)Ug.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ll)for(var n of ll(e))t.indexOf(n)<0&&Gg.call(e,n)&&(r[n]=e[n]);return r};const JO={size:"sm",variant:"default"},jr=k.exports.forwardRef((e,t)=>{const r=he("Input",JO,e),{className:n,error:o,required:i,disabled:l,variant:a,icon:s,style:u,rightSectionWidth:m,iconWidth:p,rightSection:d,rightSectionProps:g,radius:h,size:v,wrapperProps:O,classNames:f,styles:c,__staticSelector:y,multiline:S,sx:b,unstyled:E,pointer:x}=r,$=KO(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:T,offsetTop:M,describedBy:H}=wO(),{classes:Q,cx:J}=GO({radius:h,multiline:S,invalid:!!o,rightSectionWidth:m?w(m):void 0,iconWidth:p,withRightSection:!!d,offsetBottom:T,offsetTop:M,pointer:x},{classNames:f,styles:c,name:["Input",y],unstyled:E,variant:a,size:v}),{systemStyles:ce,rest:re}=Zu($);return K(me,{...Ko(Ko({className:J(Q.wrapper,n),sx:b,style:u},ce),O),children:[s&&P("div",{className:Q.icon,children:s}),P(me,{...Cd(Ko({component:"input"},re),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":H,disabled:l,"data-disabled":l||void 0,"data-with-icon":!!s||void 0,"data-invalid":!!o||void 0,className:Q.input})}),d&&P("div",{...Cd(Ko({},g),{className:Q.rightSection}),children:d})]})});jr.displayName="@mantine/core/Input";jr.Wrapper=Wg;jr.Label=qu;jr.Description=tc;jr.Error=ec;jr.Placeholder=Bg;const Vs=jr;var ZO=Se((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${w(r)} / 2)`},"&:last-of-type":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${w(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${w(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${w(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const qO=ZO;var ex=Object.defineProperty,al=Object.getOwnPropertySymbols,Yg=Object.prototype.hasOwnProperty,Qg=Object.prototype.propertyIsEnumerable,Nd=(e,t,r)=>t in e?ex(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tx=(e,t)=>{for(var r in t||(t={}))Yg.call(t,r)&&Nd(e,r,t[r]);if(al)for(var r of al(t))Qg.call(t,r)&&Nd(e,r,t[r]);return e},rx=(e,t)=>{var r={};for(var n in e)Yg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&al)for(var n of al(e))t.indexOf(n)<0&&Qg.call(e,n)&&(r[n]=e[n]);return r};const nx={orientation:"horizontal",buttonBorderWidth:1},Xg=k.exports.forwardRef((e,t)=>{const r=he("ButtonGroup",nx,e),{className:n,orientation:o,buttonBorderWidth:i,unstyled:l}=r,a=rx(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:s,cx:u}=qO({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:l});return P(me,{...tx({className:u(s.root,n),ref:t},a)})});Xg.displayName="@mantine/core/ButtonGroup";var ox=Object.defineProperty,ix=Object.defineProperties,lx=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,ax=Object.prototype.hasOwnProperty,sx=Object.prototype.propertyIsEnumerable,zd=(e,t,r)=>t in e?ox(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qt=(e,t)=>{for(var r in t||(t={}))ax.call(t,r)&&zd(e,r,t[r]);if(Td)for(var r of Td(t))sx.call(t,r)&&zd(e,r,t[r]);return e},yi=(e,t)=>ix(e,lx(t));const ux=["filled","outline","light","white","default","subtle","gradient"],Hs={xs:{height:Be.xs,paddingLeft:w(14),paddingRight:w(14)},sm:{height:Be.sm,paddingLeft:w(18),paddingRight:w(18)},md:{height:Be.md,paddingLeft:w(22),paddingRight:w(22)},lg:{height:Be.lg,paddingLeft:w(26),paddingRight:w(26)},xl:{height:Be.xl,paddingLeft:w(32),paddingRight:w(32)},"compact-xs":{height:w(22),paddingLeft:w(7),paddingRight:w(7)},"compact-sm":{height:w(26),paddingLeft:w(8),paddingRight:w(8)},"compact-md":{height:w(30),paddingLeft:w(10),paddingRight:w(10)},"compact-lg":{height:w(34),paddingLeft:w(12),paddingRight:w(12)},"compact-xl":{height:w(40),paddingLeft:w(14),paddingRight:w(14)}};function cx({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return Hs[`compact-${t}`];const o=Hs[t];return o?yi(qt({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const fx=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function dx({variant:e,theme:t,color:r,gradient:n}){if(!ux.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?qt({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):{border:`${w(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color,"&:not([data-disabled])":t.fn.hover({backgroundColor:o.hover})}}var px=Se((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:i,color:l,gradient:a},{variant:s,size:u})=>({root:yi(qt(yi(qt(qt(qt(qt({},cx({compact:n,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),fx(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:V({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),dx({variant:s,theme:e,color:l,gradient:a})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":yi(qt({content:'""'},e.fn.cover(w(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const mx=px;var yx=Object.defineProperty,sl=Object.getOwnPropertySymbols,Kg=Object.prototype.hasOwnProperty,Jg=Object.prototype.propertyIsEnumerable,Rd=(e,t,r)=>t in e?yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dd=(e,t)=>{for(var r in t||(t={}))Kg.call(t,r)&&Rd(e,r,t[r]);if(sl)for(var r of sl(t))Jg.call(t,r)&&Rd(e,r,t[r]);return e},gx=(e,t)=>{var r={};for(var n in e)Kg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sl)for(var n of sl(e))t.indexOf(n)<0&&Jg.call(e,n)&&(r[n]=e[n]);return r};const vx={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},rc=k.exports.forwardRef((e,t)=>{const r=he("Button",vx,e),{className:n,size:o,color:i,type:l,disabled:a,children:s,leftIcon:u,rightIcon:m,fullWidth:p,variant:d,radius:g,uppercase:h,compact:v,loading:O,loaderPosition:f,loaderProps:c,gradient:y,classNames:S,styles:b,unstyled:E}=r,x=gx(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:$,cx:T,theme:M}=mx({radius:g,color:i,fullWidth:p,compact:v,gradient:y,withLeftIcon:!!u,withRightIcon:!!m},{name:"Button",unstyled:E,classNames:S,styles:b,variant:d,size:o}),H=M.fn.variant({color:i,variant:d}),Q=P(xg,{...Dd({color:H.color,size:`calc(${V({size:o,sizes:Hs}).height} / 2)`},c)});return P(aP,{...Dd({className:T($.root,n),type:l,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":O||void 0,ref:t,unstyled:E},x),children:K("div",{className:$.inner,children:[(u||O&&f==="left")&&P("span",{className:T($.icon,$.leftIcon),children:O&&f==="left"?Q:u}),O&&f==="center"&&P("span",{className:$.centerLoader,children:Q}),P("span",{className:$.label,style:{textTransform:h?"uppercase":void 0},children:s}),(m||O&&f==="right")&&P("span",{className:T($.icon,$.rightIcon),children:O&&f==="right"?Q:m})]})})});rc.displayName="@mantine/core/Button";rc.Group=Xg;const jd=rc;var hx=Se((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const wx=hx;var _x=Object.defineProperty,ul=Object.getOwnPropertySymbols,Zg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable,Id=(e,t,r)=>t in e?_x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sx=(e,t)=>{for(var r in t||(t={}))Zg.call(t,r)&&Id(e,r,t[r]);if(ul)for(var r of ul(t))qg.call(t,r)&&Id(e,r,t[r]);return e},Px=(e,t)=>{var r={};for(var n in e)Zg.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ul)for(var n of ul(e))t.indexOf(n)<0&&qg.call(e,n)&&(r[n]=e[n]);return r};const ev=k.exports.forwardRef((e,t)=>{const r=he("Center",{},e),{inline:n,className:o,unstyled:i,variant:l}=r,a=Px(r,["inline","className","unstyled","variant"]),{classes:s,cx:u}=wx({inline:n},{name:"Center",unstyled:i,variant:l});return P(me,{...Sx({ref:t,className:u(s.root,o)},a)})});ev.displayName="@mantine/core/Center";const La=ev;var Ox=Object.defineProperty,xx=Object.defineProperties,$x=Object.getOwnPropertyDescriptors,Md=Object.getOwnPropertySymbols,kx=Object.prototype.hasOwnProperty,bx=Object.prototype.propertyIsEnumerable,Ld=(e,t,r)=>t in e?Ox(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ex=(e,t)=>{for(var r in t||(t={}))kx.call(t,r)&&Ld(e,r,t[r]);if(Md)for(var r of Md(t))bx.call(t,r)&&Ld(e,r,t[r]);return e},Cx=(e,t)=>xx(e,$x(t));const Fa={xs:w(16),sm:w(20),md:w(24),lg:w(30),xl:w(36)};var Nx=Se((e,{labelPosition:t},{size:r})=>({root:{},body:{display:"flex"},labelWrapper:Cx(Ex({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:r in Fa?V({size:r,sizes:e.fontSizes}):void 0,lineHeight:r in Fa?V({size:r,sizes:Fa}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Tx=Nx;var zx=Object.defineProperty,cl=Object.getOwnPropertySymbols,tv=Object.prototype.hasOwnProperty,rv=Object.prototype.propertyIsEnumerable,Fd=(e,t,r)=>t in e?zx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rx=(e,t)=>{for(var r in t||(t={}))tv.call(t,r)&&Fd(e,r,t[r]);if(cl)for(var r of cl(t))rv.call(t,r)&&Fd(e,r,t[r]);return e},Dx=(e,t)=>{var r={};for(var n in e)tv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cl)for(var n of cl(e))t.indexOf(n)<0&&rv.call(e,n)&&(r[n]=e[n]);return r};function nv(e){var t=e,{__staticSelector:r,className:n,classNames:o,styles:i,unstyled:l,children:a,label:s,description:u,id:m,disabled:p,error:d,size:g,labelPosition:h,variant:v}=t,O=Dx(t,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:f,cx:c}=Tx({labelPosition:h},{name:r,styles:i,classNames:o,unstyled:l,variant:v,size:g});return P(me,{...Rx({className:c(f.root,n)},O),children:K("div",{className:c(f.body),children:[a,K("div",{className:f.labelWrapper,children:[s&&P("label",{className:f.label,"data-disabled":p||void 0,htmlFor:m,children:s}),u&&P(Vs.Description,{className:f.description,children:u}),d&&d!=="boolean"&&P(Vs.Error,{className:f.error,children:d})]})]})})}nv.displayName="@mantine/core/InlineInput";var jx=Se((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":V({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const Ix=jx;var Mx=Object.defineProperty,fl=Object.getOwnPropertySymbols,ov=Object.prototype.hasOwnProperty,iv=Object.prototype.propertyIsEnumerable,Ad=(e,t,r)=>t in e?Mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lx=(e,t)=>{for(var r in t||(t={}))ov.call(t,r)&&Ad(e,r,t[r]);if(fl)for(var r of fl(t))iv.call(t,r)&&Ad(e,r,t[r]);return e},Fx=(e,t)=>{var r={};for(var n in e)ov.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fl)for(var n of fl(e))t.indexOf(n)<0&&iv.call(e,n)&&(r[n]=e[n]);return r};const Ax={sizes:{xs:w(540),sm:w(720),md:w(960),lg:w(1140),xl:w(1320)}},Kt=k.exports.forwardRef((e,t)=>{const r=he("Container",Ax,e),{className:n,fluid:o,size:i,unstyled:l,sizes:a,variant:s}=r,u=Fx(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:m,cx:p}=Ix({fluid:o,sizes:a},{unstyled:l,name:"Container",variant:s,size:i});return P(me,{...Lx({className:p(m.root,n),ref:t},u)})});Kt.displayName="@mantine/core/Container";const Wx={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var Vx=Object.defineProperty,Hx=Object.defineProperties,Bx=Object.getOwnPropertyDescriptors,dl=Object.getOwnPropertySymbols,lv=Object.prototype.hasOwnProperty,av=Object.prototype.propertyIsEnumerable,Wd=(e,t,r)=>t in e?Vx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ux=(e,t)=>{for(var r in t||(t={}))lv.call(t,r)&&Wd(e,r,t[r]);if(dl)for(var r of dl(t))av.call(t,r)&&Wd(e,r,t[r]);return e},Gx=(e,t)=>Hx(e,Bx(t)),Yx=(e,t)=>{var r={};for(var n in e)lv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dl)for(var n of dl(e))t.indexOf(n)<0&&av.call(e,n)&&(r[n]=e[n]);return r};const Qx={},sv=k.exports.forwardRef((e,t)=>{const r=he("Flex",Qx,e),{gap:n,rowGap:o,columnGap:i,align:l,justify:a,wrap:s,direction:u,sx:m}=r,p=Yx(r,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return P(me,{...Gx(Ux({},p),{sx:[{display:"flex"},d=>Ws({gap:n,rowGap:o,columnGap:i,align:l,justify:a,wrap:s,direction:u},d,Wx),...Dy(m)],ref:t})})});sv.displayName="@mantine/core/Flex";var Xx=Object.defineProperty,Kx=Object.defineProperties,Jx=Object.getOwnPropertyDescriptors,Vd=Object.getOwnPropertySymbols,Zx=Object.prototype.hasOwnProperty,qx=Object.prototype.propertyIsEnumerable,Hd=(e,t,r)=>t in e?Xx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jo=(e,t)=>{for(var r in t||(t={}))Zx.call(t,r)&&Hd(e,r,t[r]);if(Vd)for(var r of Vd(t))qx.call(t,r)&&Hd(e,r,t[r]);return e},e$=(e,t)=>Kx(e,Jx(t));const gi=4,Bd={xs:`${w(3)} ${w(6)}`,sm:`${w(5)} ${w(10)}`,md:`${w(7)} ${w(14)}`,lg:`${w(9)} ${w(16)}`,xl:`${w(12)} ${w(20)}`};var t$=Se((e,{fullWidth:t,color:r,radius:n,shouldAnimate:o,transitionDuration:i,transitionTimingFunction:l,orientation:a},{size:s})=>{const u=a==="vertical",m=e.fn.variant({variant:"filled",color:r});return{label:e$(Jo(Jo({ref:Nn("label")},e.fn.focusStyles()),e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",borderRadius:e.fn.radius(n),fontWeight:500,fontSize:s in e.fontSizes?e.fontSizes[s]:e.fontSizes.sm,cursor:"pointer",display:"block",textAlign:"center",padding:Bd[s in Bd?s:"sm"],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],transition:`color ${o?0:i}ms ${l||e.transitionTimingFunction}`,"&:hover":{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black},"&[data-disabled]":{"&, &:hover":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed"}},"&[data-active]":{"&, &:hover":{color:r||e.colorScheme==="dark"?e.white:e.black}}}),control:{ref:Nn("control"),position:"relative",boxSizing:"border-box",flex:1,zIndex:2,transition:`border-left-color ${o?0:i}ms ${l||e.transitionTimingFunction}`,"&:not(:first-of-type)":{borderStyle:"solid",borderWidth:u?`${w(1)} 0 0 0`:`0 0 0 ${w(1)}`,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}},input:{height:0,width:0,position:"absolute",overflow:"hidden",whiteSpace:"nowrap",opacity:0,"&:focus":{outline:"none",[`& + .${Nn("label")}`]:Jo({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${Nn("label")}`]:Jo({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}},root:{position:"relative",display:t||u?"flex":"inline-flex",width:u&&!t?"max-content":"auto",flexDirection:u?"column":"row",backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[1],borderRadius:e.fn.radius(n),overflow:"hidden",padding:gi},controlActive:{borderLeftColor:"transparent !important",borderTopColor:"transparent !important",[`& + .${Nn("control")}`]:{borderLeftColor:"transparent !important",borderTopColor:"transparent !important"},borderRadius:e.fn.radius(n),boxShadow:o?r||e.colorScheme==="dark"?"none":e.shadows.xs:void 0,backgroundColor:o?r?m.background:e.colorScheme==="dark"?e.colors.dark[5]:e.white:void 0},indicator:{boxSizing:"border-box",borderRadius:e.fn.radius(n),position:"absolute",zIndex:1,boxShadow:r||e.colorScheme==="dark"?"none":e.shadows.xs,transition:`transform ${o?0:i}ms ${e.transitionTimingFunction}, width ${o?0:i/2}ms ${l||e.transitionTimingFunction}`,backgroundColor:r?m.background:e.colorScheme==="dark"?e.colors.dark[5]:e.white}}});const r$=t$;var n$=Object.defineProperty,pl=Object.getOwnPropertySymbols,uv=Object.prototype.hasOwnProperty,cv=Object.prototype.propertyIsEnumerable,Ud=(e,t,r)=>t in e?n$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o$=(e,t)=>{for(var r in t||(t={}))uv.call(t,r)&&Ud(e,r,t[r]);if(pl)for(var r of pl(t))cv.call(t,r)&&Ud(e,r,t[r]);return e},i$=(e,t)=>{var r={};for(var n in e)uv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pl)for(var n of pl(e))t.indexOf(n)<0&&cv.call(e,n)&&(r[n]=e[n]);return r};const l$={disabled:!1,size:"sm",transitionDuration:200},fv=k.exports.forwardRef((e,t)=>{var r,n,o,i;const l=he("SegmentedControl",l$,e),{className:a,disabled:s,data:u,name:m,value:p,onChange:d,color:g,fullWidth:h,radius:v,size:O,transitionDuration:f,transitionTimingFunction:c,classNames:y,styles:S,defaultValue:b,orientation:E,unstyled:x,variant:$,readOnly:T}=l,M=i$(l,["className","disabled","data","name","value","onChange","color","fullWidth","radius","size","transitionDuration","transitionTimingFunction","classNames","styles","defaultValue","orientation","unstyled","variant","readOnly"]),H=vr(),Q=ug(),J=H.respectReducedMotion?Q:!1,ce=u.map(W=>typeof W=="string"?{label:W,value:W}:W),re=k.exports.useRef(),[ze,ne]=k.exports.useState(!1),[z,F]=na({value:p,defaultValue:b,finalValue:Array.isArray(ce)&&(i=(o=(r=ce.find(W=>!W.disabled))==null?void 0:r.value)!=null?o:(n=ce[0])==null?void 0:n.value)!=null?i:null,onChange:d}),{classes:I,cx:B}=r$({fullWidth:h,color:g,radius:v,shouldAnimate:J||!ze,transitionDuration:f,transitionTimingFunction:c,orientation:E},{name:"SegmentedControl",classNames:y,styles:S,unstyled:x,variant:$,size:O}),[_,N]=k.exports.useState({width:0,height:0,translate:[0,0]}),R=ag(m),D=k.exports.useRef({}),[j,A]=CS();lg(()=>{re.current?ne(!0):(re.current=!0,ne(!1))}),k.exports.useEffect(()=>{if(z in D.current&&j.current){const W=D.current[z],Je=W.getBoundingClientRect(),ae=W.offsetWidth/Je.width,se=Je.width*ae||0,jt=Je.height*ae||0,wn=A.width-W.parentElement.offsetLeft+gi-se,Ir=W.parentElement.offsetLeft-gi;N({width:se,height:jt,translate:[H.dir==="rtl"?wn:Ir,W.parentElement.offsetTop-gi]})}},[z,A]);const U=ce.map(W=>K("div",{className:B(I.control,{[I.controlActive]:z===W.value}),children:[P("input",{className:I.input,disabled:s||W.disabled,type:"radio",name:R,value:W.value,id:`${R}-${W.value}`,checked:z===W.value,onChange:()=>!T&&F(W.value)}),P("label",{className:I.label,"data-active":z===W.value&&!(s||W.disabled)||void 0,"data-disabled":s||W.disabled||void 0,htmlFor:`${R}-${W.value}`,ref:Je=>{D.current[W.value]=Je},children:W.label})]},W.value)),te=sg(j,t);return ce.length===0?null:K(me,{...o$({className:B(I.root,a),ref:te},M),children:[typeof z=="string"&&ze&&P(me,{component:"span",className:I.indicator,sx:{width:_.width,height:_.height,transform:`translate(${_.translate[0]}px, ${_.translate[1]}px)`}}),U]})});fv.displayName="@mantine/core/SegmentedControl";function dv({value:e,min:t,max:r}){const n=(e-t)/(r-t)*100;return Math.min(Math.max(n,0),100)}function a$({value:e,containerWidth:t,min:r,max:n,step:o,precision:i}){const a=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),s=(a!==0?Math.round(a/o)*o:0)+r,u=Math.max(s,r);return i!==void 0?Number(u.toFixed(i)):u}var s$=Object.defineProperty,u$=Object.defineProperties,c$=Object.getOwnPropertyDescriptors,Gd=Object.getOwnPropertySymbols,f$=Object.prototype.hasOwnProperty,d$=Object.prototype.propertyIsEnumerable,Yd=(e,t,r)=>t in e?s$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p$=(e,t)=>{for(var r in t||(t={}))f$.call(t,r)&&Yd(e,r,t[r]);if(Gd)for(var r of Gd(t))d$.call(t,r)&&Yd(e,r,t[r]);return e},m$=(e,t)=>u$(e,c$(t));const tt={xs:w(4),sm:w(6),md:w(8),lg:w(10),xl:w(12)};var y$=Se((e,{disabled:t},{size:r})=>({root:m$(p$({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,height:`calc(${V({sizes:tt,size:r})} * 2)`,display:"flex",alignItems:"center",cursor:t?"not-allowed":"pointer",touchAction:"none"})}));const g$=y$;var v$=Object.defineProperty,h$=Object.defineProperties,w$=Object.getOwnPropertyDescriptors,Qd=Object.getOwnPropertySymbols,_$=Object.prototype.hasOwnProperty,S$=Object.prototype.propertyIsEnumerable,Xd=(e,t,r)=>t in e?v$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P$=(e,t)=>{for(var r in t||(t={}))_$.call(t,r)&&Xd(e,r,t[r]);if(Qd)for(var r of Qd(t))S$.call(t,r)&&Xd(e,r,t[r]);return e},O$=(e,t)=>h$(e,w$(t)),x$=Se((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({label:{position:"absolute",top:w(-36),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs} / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:O$(P$({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:r?"none":"flex",height:n?w(n):`calc(${V({sizes:tt,size:o})} * 2)`,width:n?w(n):`calc(${V({sizes:tt,size:o})} * 2)`,backgroundColor:e.colorScheme==="dark"?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`${w(4)} solid ${e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}}));const $$=x$,pv=k.exports.forwardRef(({max:e,min:t,value:r,position:n,label:o,dragging:i,onMouseDown:l,color:a,classNames:s,styles:u,size:m,labelTransition:p,labelTransitionDuration:d,labelTransitionTimingFunction:g,labelAlwaysOn:h,thumbLabel:v,onFocus:O,onBlur:f,showLabelOnHover:c,children:y=null,disabled:S,unstyled:b,thumbSize:E,variant:x},$)=>{const{classes:T,cx:M,theme:H}=$$({color:a,disabled:S,thumbSize:E},{name:"Slider",classNames:s,styles:u,unstyled:b,variant:x,size:m}),[Q,J]=k.exports.useState(!1),ce=h||i||Q||c;return K(me,{tabIndex:0,role:"slider","aria-label":v,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:$,className:M(T.thumb,{[T.dragging]:i}),onFocus:()=>{J(!0),typeof O=="function"&&O()},onBlur:()=>{J(!1),typeof f=="function"&&f()},onTouchStart:l,onMouseDown:l,onClick:re=>re.stopPropagation(),style:{[H.dir==="rtl"?"right":"left"]:`${n}%`},children:[y,P(Tg,{mounted:o!=null&&ce,duration:d,transition:p,timingFunction:g||H.transitionTimingFunction,children:re=>P("div",{style:re,className:T.label,children:o})})]})});pv.displayName="@mantine/core/SliderThumb";function k$({mark:e,offset:t,value:r,inverted:n=!1}){return n?typeof t=="number"&&e.value<=t||e.value>=r:typeof t=="number"?e.value>=t&&e.value<=r:e.value<=r}var b$=Se((e,{color:t,disabled:r},{size:n})=>({markWrapper:{position:"absolute",top:0,zIndex:2},mark:{boxSizing:"border-box",border:`${w(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,height:V({sizes:tt,size:n}),width:V({sizes:tt,size:n}),borderRadius:1e3,transform:`translateX(calc(-${V({sizes:tt,size:n})} / 2))`,backgroundColor:e.white},markFilled:{borderColor:r?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:t}).background},markLabel:{transform:"translate(-50%, 0)",fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginTop:`calc(${e.spacing.xs} / 2)`,whiteSpace:"nowrap"}}));const E$=b$;function mv({marks:e,color:t,size:r,min:n,max:o,value:i,classNames:l,styles:a,offset:s,onChange:u,disabled:m,unstyled:p,inverted:d,variant:g}){const{classes:h,cx:v}=E$({color:t,disabled:m},{name:"Slider",classNames:l,styles:a,unstyled:p,variant:g,size:r}),O=e.map((f,c)=>K(me,{className:h.markWrapper,sx:{left:`${dv({value:f.value,min:n,max:o})}%`},children:[P("div",{className:v(h.mark,{[h.markFilled]:k$({mark:f,value:i,offset:s,inverted:d})})}),f.label&&P("div",{className:h.markLabel,onMouseDown:y=>{y.stopPropagation(),u(f.value)},onTouchStart:y=>{y.stopPropagation(),u(f.value)},children:f.label})]},c));return P("div",{children:O})}mv.displayName="@mantine/core/SliderMarks";var C$=Se((e,{radius:t,color:r,disabled:n,inverted:o},{size:i})=>({track:{position:"relative",height:V({sizes:tt,size:i}),width:"100%",marginRight:V({size:i,sizes:tt}),marginLeft:V({size:i,sizes:tt}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.radius(t),right:`calc(${V({size:i,sizes:tt})} * -1)`,left:`calc(${V({size:i,sizes:tt})} * -1)`,backgroundColor:o?n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background,borderRadius:e.fn.radius(t)}}));const N$=C$;var T$=Object.defineProperty,z$=Object.defineProperties,R$=Object.getOwnPropertyDescriptors,ml=Object.getOwnPropertySymbols,yv=Object.prototype.hasOwnProperty,gv=Object.prototype.propertyIsEnumerable,Kd=(e,t,r)=>t in e?T$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D$=(e,t)=>{for(var r in t||(t={}))yv.call(t,r)&&Kd(e,r,t[r]);if(ml)for(var r of ml(t))gv.call(t,r)&&Kd(e,r,t[r]);return e},j$=(e,t)=>z$(e,R$(t)),I$=(e,t)=>{var r={};for(var n in e)yv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ml)for(var n of ml(e))t.indexOf(n)<0&&gv.call(e,n)&&(r[n]=e[n]);return r};function vv(e){var t=e,{filled:r,size:n,color:o,classNames:i,styles:l,radius:a,children:s,offset:u,onMouseLeave:m,onMouseEnter:p,disabled:d,marksOffset:g,unstyled:h,inverted:v,variant:O}=t,f=I$(t,["filled","size","color","classNames","styles","radius","children","offset","onMouseLeave","onMouseEnter","disabled","marksOffset","unstyled","inverted","variant"]);const{classes:c}=N$({color:o,radius:a,disabled:d,inverted:v},{name:"Slider",classNames:i,styles:l,unstyled:h,variant:O,size:n});return K("div",{className:c.track,onMouseLeave:m,onMouseEnter:p,children:[P(me,{className:c.bar,sx:{left:`calc(${u}% - ${V({size:n,sizes:tt})})`,width:`calc(${r}% + ${V({size:n,sizes:tt})})`}}),s,P(mv,{...j$(D$({},f),{size:n,color:o,offset:g,classNames:i,styles:l,disabled:d,unstyled:h,inverted:v,variant:O})})]})}vv.displayName="@mantine/core/SliderTrack";var M$=Object.defineProperty,L$=Object.defineProperties,F$=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,hv=Object.prototype.hasOwnProperty,wv=Object.prototype.propertyIsEnumerable,Jd=(e,t,r)=>t in e?M$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A$=(e,t)=>{for(var r in t||(t={}))hv.call(t,r)&&Jd(e,r,t[r]);if(yl)for(var r of yl(t))wv.call(t,r)&&Jd(e,r,t[r]);return e},W$=(e,t)=>L$(e,F$(t)),V$=(e,t)=>{var r={};for(var n in e)hv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yl)for(var n of yl(e))t.indexOf(n)<0&&wv.call(e,n)&&(r[n]=e[n]);return r};const _v=k.exports.forwardRef((e,t)=>{var r=e,{className:n,size:o,classNames:i,styles:l,disabled:a,unstyled:s,variant:u}=r,m=V$(r,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:p,cx:d}=g$({disabled:a},{name:"Slider",classNames:i,styles:l,unstyled:s,variant:u,size:o});return P(me,{...W$(A$({},m),{tabIndex:-1,className:d(p.root,n),ref:t})})});_v.displayName="@mantine/core/SliderRoot";var H$=Object.defineProperty,B$=Object.defineProperties,U$=Object.getOwnPropertyDescriptors,gl=Object.getOwnPropertySymbols,Sv=Object.prototype.hasOwnProperty,Pv=Object.prototype.propertyIsEnumerable,Zd=(e,t,r)=>t in e?H$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G$=(e,t)=>{for(var r in t||(t={}))Sv.call(t,r)&&Zd(e,r,t[r]);if(gl)for(var r of gl(t))Pv.call(t,r)&&Zd(e,r,t[r]);return e},Y$=(e,t)=>B$(e,U$(t)),Q$=(e,t)=>{var r={};for(var n in e)Sv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gl)for(var n of gl(e))t.indexOf(n)<0&&Pv.call(e,n)&&(r[n]=e[n]);return r};const X$={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},Ov=k.exports.forwardRef((e,t)=>{const r=he("Slider",X$,e),{classNames:n,styles:o,color:i,value:l,onChange:a,onChangeEnd:s,size:u,radius:m,min:p,max:d,step:g,precision:h,defaultValue:v,name:O,marks:f,label:c,labelTransition:y,labelTransitionDuration:S,labelTransitionTimingFunction:b,labelAlwaysOn:E,thumbLabel:x,showLabelOnHover:$,thumbChildren:T,disabled:M,unstyled:H,thumbSize:Q,scale:J,inverted:ce,variant:re}=r,ze=Q$(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),ne=vr(),[z,F]=k.exports.useState(!1),[I,B]=na({value:typeof l=="number"?Xn(l,p,d):l,defaultValue:typeof v=="number"?Xn(v,p,d):v,finalValue:Xn(0,p,d),onChange:a}),_=k.exports.useRef(I),N=k.exports.useRef(),R=dv({value:I,min:p,max:d}),D=J(I),j=typeof c=="function"?c(D):c,A=k.exports.useCallback(({x:ae})=>{if(!M){const se=a$({value:ae,min:p,max:d,step:g,precision:h});B(se),_.current=se}},[M,p,d,g,h]),{ref:U,active:te}=bS(A,{onScrubEnd:()=>s==null?void 0:s(_.current)},ne.dir),W=ae=>{ae.stopPropagation()},Je=ae=>{if(!M)switch(ae.key){case"ArrowUp":{ae.preventDefault(),N.current.focus();const se=Math.min(Math.max(I+g,p),d);s==null||s(se),B(se);break}case"ArrowRight":{ae.preventDefault(),N.current.focus();const se=Math.min(Math.max(ne.dir==="rtl"?I-g:I+g,p),d);s==null||s(se),B(se);break}case"ArrowDown":{ae.preventDefault(),N.current.focus();const se=Math.min(Math.max(I-g,p),d);s==null||s(se),B(se);break}case"ArrowLeft":{ae.preventDefault(),N.current.focus();const se=Math.min(Math.max(ne.dir==="rtl"?I+g:I-g,p),d);s==null||s(se),B(se);break}case"Home":{ae.preventDefault(),N.current.focus(),s==null||s(p),B(p);break}case"End":{ae.preventDefault(),N.current.focus(),s==null||s(d),B(d);break}}};return K(_v,{...Y$(G$({},ze),{size:u,ref:sg(U,t),onKeyDownCapture:Je,onMouseDownCapture:()=>{var ae;return(ae=U.current)==null?void 0:ae.focus()},classNames:n,styles:o,disabled:M,unstyled:H,variant:re}),children:[P(vv,{inverted:ce,offset:0,filled:R,marks:f,size:u,radius:m,color:i,min:p,max:d,value:D,onChange:B,onMouseEnter:$?()=>F(!0):void 0,onMouseLeave:$?()=>F(!1):void 0,classNames:n,styles:o,disabled:M,unstyled:H,variant:re,children:P(pv,{max:d,min:p,value:D,position:R,dragging:te,color:i,size:u,label:j,ref:N,onMouseDown:W,labelTransition:y,labelTransitionDuration:S,labelTransitionTimingFunction:b,labelAlwaysOn:E,classNames:n,styles:o,thumbLabel:x,showLabelOnHover:$&&z,disabled:M,unstyled:H,thumbSize:Q,variant:re,children:T})}),P("input",{type:"hidden",name:O,value:D})]})});Ov.displayName="@mantine/core/Slider";var K$=Object.defineProperty,vl=Object.getOwnPropertySymbols,xv=Object.prototype.hasOwnProperty,$v=Object.prototype.propertyIsEnumerable,qd=(e,t,r)=>t in e?K$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J$=(e,t)=>{for(var r in t||(t={}))xv.call(t,r)&&qd(e,r,t[r]);if(vl)for(var r of vl(t))$v.call(t,r)&&qd(e,r,t[r]);return e},Z$=(e,t)=>{var r={};for(var n in e)xv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vl)for(var n of vl(e))t.indexOf(n)<0&&$v.call(e,n)&&(r[n]=e[n]);return r};const q$={w:0,h:0},Ln=k.exports.forwardRef((e,t)=>{const r=he("Space",q$,e),{w:n,h:o}=r,i=Z$(r,["w","h"]);return P(me,{...J$({ref:t,w:n,miw:n,h:o,mih:o},i)})});Ln.displayName="@mantine/core/Space";const kv=k.exports.createContext(null),ek=kv.Provider,tk=()=>k.exports.useContext(kv);var rk=Object.defineProperty,hl=Object.getOwnPropertySymbols,bv=Object.prototype.hasOwnProperty,Ev=Object.prototype.propertyIsEnumerable,ep=(e,t,r)=>t in e?rk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tp=(e,t)=>{for(var r in t||(t={}))bv.call(t,r)&&ep(e,r,t[r]);if(hl)for(var r of hl(t))Ev.call(t,r)&&ep(e,r,t[r]);return e},nk=(e,t)=>{var r={};for(var n in e)bv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hl)for(var n of hl(e))t.indexOf(n)<0&&Ev.call(e,n)&&(r[n]=e[n]);return r};const ok={size:"sm"},Cv=k.exports.forwardRef((e,t)=>{const r=he("SwitchGroup",ok,e),{children:n,value:o,defaultValue:i,onChange:l,size:a,wrapperProps:s}=r,u=nk(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[m,p]=na({value:o,defaultValue:i,finalValue:[],onChange:l});return P(ek,{value:{value:m,onChange:g=>{const h=g.currentTarget.value;p(m.includes(h)?m.filter(v=>v!==h):[...m,h])},size:a},children:P(Vs.Wrapper,{...tp(tp({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:t},s),u),children:n})})});Cv.displayName="@mantine/core/SwitchGroup";var ik=Object.defineProperty,lk=Object.defineProperties,ak=Object.getOwnPropertyDescriptors,rp=Object.getOwnPropertySymbols,sk=Object.prototype.hasOwnProperty,uk=Object.prototype.propertyIsEnumerable,np=(e,t,r)=>t in e?ik(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ck=(e,t)=>{for(var r in t||(t={}))sk.call(t,r)&&np(e,r,t[r]);if(rp)for(var r of rp(t))uk.call(t,r)&&np(e,r,t[r]);return e},fk=(e,t)=>lk(e,ak(t));const dk={xs:w(16),sm:w(20),md:w(24),lg:w(30),xl:w(36)},pk={xs:w(32),sm:w(38),md:w(46),lg:w(56),xl:w(72)},mk={xs:w(12),sm:w(14),md:w(18),lg:w(22),xl:w(28)},yk={xs:w(5),sm:w(6),md:w(7),lg:w(9),xl:w(11)},gk={xs:w(4),sm:w(5),md:w(6),lg:w(8),xl:w(10)};var vk=Se((e,{radius:t,color:r,labelPosition:n,error:o},{size:i})=>{const l=V({size:i,sizes:mk}),a=V({size:t,sizes:e.radius}),s=e.fn.variant({variant:"filled",color:r}),u=V({size:i,sizes:pk}),m=w(i==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:fk(ck({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${w(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:V({size:i,sizes:dk}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:V({size:i,sizes:yk}),fontWeight:600,order:n==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:s.background,borderColor:s.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:l,width:l,border:`${w(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:m,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${l} - ${m})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${l})`,paddingInline:V({size:i,sizes:gk}),margin:`0 0 0 calc(${l} + ${m})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{margin:`0 calc(${l} + ${m}) 0 0`}}}});const hk=vk;var wk=Object.defineProperty,_k=Object.defineProperties,Sk=Object.getOwnPropertyDescriptors,wl=Object.getOwnPropertySymbols,Nv=Object.prototype.hasOwnProperty,Tv=Object.prototype.propertyIsEnumerable,op=(e,t,r)=>t in e?wk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Aa=(e,t)=>{for(var r in t||(t={}))Nv.call(t,r)&&op(e,r,t[r]);if(wl)for(var r of wl(t))Tv.call(t,r)&&op(e,r,t[r]);return e},Pk=(e,t)=>_k(e,Sk(t)),Ok=(e,t)=>{var r={};for(var n in e)Nv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wl)for(var n of wl(e))t.indexOf(n)<0&&Tv.call(e,n)&&(r[n]=e[n]);return r};const xk={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},nc=k.exports.forwardRef((e,t)=>{var r;const n=he("Switch",xk,e),{className:o,color:i,label:l,offLabel:a,onLabel:s,id:u,style:m,size:p,radius:d,wrapperProps:g,children:h,unstyled:v,styles:O,classNames:f,thumbIcon:c,sx:y,checked:S,defaultChecked:b,onChange:E,labelPosition:x,description:$,error:T,disabled:M,variant:H}=n,Q=Ok(n,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),J=tk(),ce=(J==null?void 0:J.size)||p,{classes:re}=hk({color:i,radius:d,labelPosition:x,error:!!T},{name:"Switch",classNames:f,styles:O,unstyled:v,size:ce,variant:H}),{systemStyles:ze,rest:ne}=Zu(Q),z=ag(u),F=J?{checked:J.value.includes(ne.value),onChange:J.onChange}:{},[I,B]=na({value:(r=F.checked)!=null?r:S,defaultValue:b,finalValue:!1});return K(nv,{...Aa(Aa({className:o,sx:y,style:m,id:z,size:(J==null?void 0:J.size)||p,labelPosition:x,label:l,description:$,error:T,disabled:M,__staticSelector:"Switch",classNames:f,styles:O,unstyled:v,"data-checked":F.checked||void 0,variant:H},ze),g),children:[P("input",{...Pk(Aa({},ne),{disabled:M,checked:I,onChange:_=>{J?F.onChange(_):E==null||E(_),B(_.currentTarget.checked)},id:z,ref:t,type:"checkbox",className:re.input})}),K("label",{htmlFor:z,className:re.track,children:[P("div",{className:re.thumb,children:c}),P("div",{className:re.trackLabel,children:I?s:a})]})]})});nc.displayName="@mantine/core/Switch";nc.Group=Cv;var $k=Object.defineProperty,kk=Object.defineProperties,bk=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertySymbols,Ek=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable,lp=(e,t,r)=>t in e?$k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zo=(e,t)=>{for(var r in t||(t={}))Ek.call(t,r)&&lp(e,r,t[r]);if(ip)for(var r of ip(t))Ck.call(t,r)&&lp(e,r,t[r]);return e},qo=(e,t)=>kk(e,bk(t)),Nk=Se(e=>{const t=lw(e.headings.sizes).reduce((r,n)=>{const o=e.headings.sizes[n];return r[`& ${n}`]=qo(Zo({fontFamily:e.headings.fontFamily,fontWeight:o.fontWeight||e.headings.fontWeight,marginTop:typeof o.lineHeight=="number"?`calc(${e.spacing.xl} * ${o.lineHeight})`:e.spacing.xl,marginBottom:e.spacing.sm},o),{[`@media (max-width: ${e.breakpoints.sm})`]:{fontSize:`calc(${w(o.fontSize)} / 1.3)`}}),r},{});return{root:qo(Zo(qo(Zo({},e.fn.fontStyles()),{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,[`@media (max-width: ${e.breakpoints.sm})`]:{fontSize:e.fontSizes.sm}}),t),{"& img":{maxWidth:"100%",marginBottom:e.spacing.xs},"& p":{marginTop:0,marginBottom:e.spacing.lg},"& mark":{backgroundColor:e.fn.themeColor("yellow",e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"},"& hr":{marginTop:e.spacing.md,marginBottom:e.spacing.sm,borderBottom:0,borderLeft:0,borderRight:0,borderTop:`${w(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":qo(Zo({},e.fn.focusStyles()),{color:e.colors[e.primaryColor][e.colorScheme==="dark"?4:6],textDecoration:"none","&:hover":{textDecoration:"underline"}}),"& pre":{padding:e.spacing.xs,lineHeight:e.lineHeight,margin:0,marginTop:e.spacing.md,marginBottom:e.spacing.md,overflowX:"auto",fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,borderRadius:e.radius.sm,backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],"& code":{backgroundColor:"transparent",padding:0,borderRadius:0,color:"inherit",border:0}},"& code":{lineHeight:e.lineHeight,padding:`${w(1)} ${w(5)}`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[0],fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs,border:`${w(1)} solid ${e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[3]}`},"& ul, & ol":{marginBottom:e.spacing.md,paddingLeft:38,"& li":{marginTop:e.spacing.xs}},"& table":{width:"100%",borderCollapse:"collapse",captionSide:"bottom",marginBottom:e.spacing.md,"& caption":{marginTop:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:14,padding:`${w(7)} ${w(10)}`},"& thead th":{borderBottom:`${w(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${w(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${w(7)} ${w(10)}`,borderBottom:`${w(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,fontSize:14},"& tr:last-of-type td":{borderBottom:"none"}},"& blockquote":{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,margin:`${e.spacing.md} 0`,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderLeft:`${w(6)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"& cite":{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}})}});const Tk=Nk;var zk=Object.defineProperty,_l=Object.getOwnPropertySymbols,zv=Object.prototype.hasOwnProperty,Rv=Object.prototype.propertyIsEnumerable,ap=(e,t,r)=>t in e?zk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rk=(e,t)=>{for(var r in t||(t={}))zv.call(t,r)&&ap(e,r,t[r]);if(_l)for(var r of _l(t))Rv.call(t,r)&&ap(e,r,t[r]);return e},Dk=(e,t)=>{var r={};for(var n in e)zv.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_l)for(var n of _l(e))t.indexOf(n)<0&&Rv.call(e,n)&&(r[n]=e[n]);return r};const Dv=k.exports.forwardRef((e,t)=>{const r=he("TypographyStylesProvider",{},e),{className:n,unstyled:o,variant:i}=r,l=Dk(r,["className","unstyled","variant"]),{classes:a,cx:s}=Tk(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return P(me,{...Rk({className:s(a.root,n),ref:t},l)})});Dv.displayName="@mantine/core/TypographyStylesProvider";function jk(e){const{label:t,numKey:r,enabled:n,color:o,showHelp:i}=e,[l,a]=k.exports.useState("button");return k.exports.useEffect(()=>{a(n?`button ${o}`:"button")}),i?P("div",{className:l,children:`NUM ${r}`}):P("div",{className:l,children:t})}function Ik({hudDisabled:e,setHudDisabled:t,useLeftAnchor:r,setUseLeftAnchor:n,scale:o,setScale:i,setPosition:l,opacity:a,setMenuOpacity:s}){return P(Kt,{sx:{opacity:`${a}%`,transition:"opacity 0.25s ease"},children:P(La,{sx:{height:"100vh"},children:K(sv,{direction:"column",sx:u=>({minHeight:"30vh",background:"rgba(26,28,32,0.85)",borderRadius:u.radius.md,padding:"10px"}),children:[P(Kt,{sx:{minWidth:"350px",paddingTop:"15px",WebkitBackdropFilter:"blur(10px)",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:P(La,{sx:{width:"100%"},children:P(Dv,{children:P("h1",{children:"ULC SETTINGS"})})})}),P(Kt,{sx:{minWidth:"350px",paddingTop:"15px",WebkitBackdropFilter:"blur(10px)",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:P(La,{sx:{width:"100%"},children:P(xr,{fz:"lg",children:"Click & drag HUD to reposition!"})})}),P(Ng,{my:"xl"}),K(Kt,{sx:{minWidth:"350px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:[P(xr,{fw:"bold",children:"Anchor Position"}),P(fv,{sx:{float:"right"},value:r,onChange:u=>{n(u),l(0,0)},data:[{label:"Right",value:"false"},{label:"Left",value:"true"}]})]}),P(Ln,{h:"md"}),K(Kt,{sx:{minWidth:"350px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:[P(xr,{fw:"bold",children:"HUD Scale"}),P(Ov,{value:o,onChange:i,min:.5,max:2,step:.1,sx:{width:"60%"},size:"lg",label:u=>`${u.toFixed(1)}`})]}),P(Ln,{h:"md"}),K(Kt,{sx:{minWidth:"350px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:[P(xr,{fw:"bold",children:"Disable HUD"}),P(nc,{size:"lg",radius:"sm",checked:e,onChange:u=>t(u.currentTarget.checked)})]}),P(Ln,{h:"xl"}),K(Kt,{sx:{minWidth:"350px",marginTop:"auto",marginBottom:"10px",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w:"25vw",children:[P(jd,{onClick:()=>{i(1),n("false"),l(0,0),t(!1)},sx:{width:"100%"},uppercase:!0,color:"red",children:"Reset"}),P(Ln,{w:"md"}),P(jd,{onClick:()=>{s(0),fetch("https://ulc/focusGame",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})},sx:{width:"100%"},uppercase:!0,children:"Done"})]})]})})})}function Mk(){k.exports.useState(0);const[e,t]=k.exports.useState(0),[r,n]=k.exports.useState(0),[o,i]=k.exports.useState(1),[l,a]=k.exports.useState("false"),[s,u]=k.exports.useState(!1),[m,p]=k.exports.useState(!1),[d,g]=k.exports.useState(0),[h,v]=k.exports.useState(0),[O,f]=k.exports.useState([]);k.exports.useEffect(()=>{fetch("https://ulc/saveScale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scale:o})})},[o]),k.exports.useEffect(()=>{fetch("https://ulc/saveAnchor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({useLeftAnchor:l})})},[l]),k.exports.useEffect(()=>{fetch("https://ulc/setHudDisabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hudDisabled:s})})},[s]);function c($,T){console.log(`Setting button ${$} to ${T}`);let M=O.map(H=>H.extra===$?{...H,enabled:T}:H);console.log(`Updated buttons ${JSON.stringify(M)}`),f(M)}function y($){let T=O.map(M=>{let H=$.find(Q=>Q.extra===M.extra);return H?{...M,enabled:H.newState}:M});f(T)}const S=async($,T)=>{console.log(~~T.x,~~T.y);let M=~~T.x,H=~~T.y;b(M,H)};function b($,T){g($),v(T),fetch("https://ulc/savePosition",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({newX:$,newY:T})})}const E=$=>{var T=$.data;T.type==="showHUD"?t(100):T.type==="hideHUD"?t(0):T.type==="setPosition"?(console.log(`Received x: ${T.x} and y: ${T.y} from lua`),g(T.x),v(T.y)):T.type==="setScale"?(console.log(`Received scale: ${T.scale} from lua`),i(T.scale)):T.type==="setAnchor"?a(T.bool):T.type==="showMenu"?n(100):T.type==="hideMenu"?n(0):T.type==="setHudDisabled"?T.bool===1?u(!0):u(!1):T.type==="showHelp"?p(!0):T.type==="hideHelp"&&p(!1),T.type==="clearButtons"&&f([]),T.type==="populateButtons"&&f(T.buttons),T.type==="setButton"&&c(T.extra,T.newState),T.type==="setButtons"&&y(T.buttonStates)};k.exports.useEffect(()=>(window.removeEventListener("message",E),window.addEventListener("message",E),()=>{window.removeEventListener("message",E)}),[E]);let x=O.map(($,T)=>P(Hi,{children:P(jk,{showHelp:m,extra:$.extra,numKey:$.numKey,enabled:$.enabled,color:$.color,label:$.label},T)}));return K(Hi,{children:[P(Ik,{hudDisabled:s,setHudDisabled:u,opacity:r,setMenuOpacity:n,scale:o,setScale:i,useLeftAnchor:l,setUseLeftAnchor:a,setPosition:b}),P(Ml.exports,{defaultPosition:{x:d,y:h},scale:o,position:{x:d,y:h},onStop:($,T)=>{S($,T)},children:P(me,{sx:{position:"absolute",bottom:40,...l==="true"?{left:40}:{right:40},scale:`${o}`,opacity:`${e}%`,transition:"opacity 0.25s ease"},children:P("div",{className:"background",children:P("div",{className:"buttons",children:x})})})})]})}Wa.createRoot(document.getElementById("root")).render(P(og,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"dark",fontFamily:"Arial, Helvetica, sans-serif",globalStyles:e=>({html:{colorScheme:"normal"}})},children:P(Mk,{})})); diff --git a/resources/ulc/html/assets/index.e1c6fa6f.css b/resources/ulc/html/assets/index.e1c6fa6f.css new file mode 100644 index 000000000..b91622526 --- /dev/null +++ b/resources/ulc/html/assets/index.e1c6fa6f.css @@ -0,0 +1 @@ +#root{background-color:#0000!important}body{background-color:#0000!important;overflow:hidden}.background{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:2px;border:10px solid;background-image:url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/wAALCAB9AXMBAREA/8QAGAABAQEBAQAAAAAAAAAAAAAAAQACAwj/xAAuEAEAAgICAgEEAgIBBAMBAAABABECITFBElFhInGBkTKhQrEDYsHR4RMj8fD/2gAIAQEAAD8A8J42YtNb75l4tUZSp4xrJqplckXx4/qNniBdc3ERav8AHuQXurDmZy3sbJod1d/Ezi1/I+3zNFcVcMf462h6i+Ti14/DBxoxxG799McvpxQdXv5jf0pjVdyvG/puuRqZS8vpy44mmtj+Jn+PG/deoje+33JLu8rr+pXk3kwF/j17jzqte5ZB5UuviT40W1Bo1sPtKrachvj4g3Wi6JrwxyBuopaW/wBwq29GoKa99y5b3GrNvPuZSr1+Y1448rEW/GlZZeXDzXEyfUod631NY1f1D6v3LMtNfiHxVeviNeORjlz16ZfU5Vkc9y+k/wAIOTbpTrUhKW25pycSkG+iFfSrs4ldlV9rlincqeQ169S/y8qbNS/lz+/UtFt2HUQ7dHUHbTweoIU46qLqmoWGq5kmgqvmVcApvccjFOO4UWmQytoot/qTibB2aWPP27lqzHHJcXm+JLj5bqv9SscUTXUmqH+pCXvriX1PZUhpS7gYmXGPEq1qO3TK601VQKOaN69xfqb8twLCo3qlqSvHH4h2/O47/B3K/v8AmQ5GqqVZemvcj+vvAbQ8rPfqN2Nr+pXh3m395CdGuTcsrb+k3JPFD8LcsrXx8afhgvXUdaAqVOTdu9QvKqdH35imPDKrLvUn6mv0yu2q+/zM0nN0++prICmm5G1v8sy1bXTv5mq1Ybgpj49BHJHv8yy8V7uqlrjE3fHxAsfqb+Zp48rpOYULeOMEyHjbHxU5+8P4Nv4qNWb59w8XyvnXMdn01f5gVWzfGoprVyQNetyEWkPzDI5R44ia4v3Is3q3mTZfAcyE3r5JWAnk/ZgfTqkuaqjbcH0d6hnjTVuv9xVtKp/3FUHrrUz4/wDH3/x4vzH7W9VK1f8A4w2xfltNZahtydfvuWzK9f7kLxY+ggq8e+Ipqqqoc6e4/Vjl9QK+oK1633FoCuTmVN2lD2y07b3xDJvKm/vIA657+ZH1KqESr21R+4BV1sd8xBRADvcFb3R7qOPDvRC8dHJ7icf3cLv6r+r1xDGsVzxuLffFXGgdMjxxK3bz6gd5Y6fmJkHR+ZVzanWpYlKbr7SdvFVKgvf4OJe/1IKbrVRxr1YTFeFvlr5iiHkY79+ojuWjiRv6izqoNjbupV4uldyK/kLfqV49ivuWOX005VkPUeBTvqWLWVlHx3JyBvK2pUnO5UDZr2yxbbSpW1w7hWSdnUQvf9epUJ45bYIelriuprxvdw8vIb4hQGy/n1NfS/Uu/wDXzMFfy0WzSPFP7ljRlWPfJGy0GnGWvdfEzi7vi+pYpvcaxyL57hoRv4i2NnTf3l4qrenuVlq16kI2tvqFcY5PGyoujfEsjET6mjj1G/Ra+4a97ku64D11B3vg/wByFW7+xxcN3WRXUdtKf+5F5b8guAf5dn+pqtX1UMsjRdyQtxR+IpiHa/MUXi77g5F7yIZGx49RH2329TJb9r/UU3cRW9PGpeNA3qSb8krXbHy3AX3ZJd8B6lZVOnu4DZd7NJXMVWi6Hg9SDHK7WyHqjVXT3HbS40+mJSfVy+iYbbt7laeueI1lTrddxTWzfLLuy7OoXYlWPUTl8cbmcg559vqauwTXuAOKULfMbMd0PTLL6j6WumXGvED37lunV113DJxSjTdMeb41zLL6m6vV3LINVv2Sv6a9Sza2UxyMchcR2cTIlONa1G9CBuD5B66kKlZO+I6DhZb65P1JXV8QE23x1IWtkbTg16l/ls/ENg2c6jW9rYS/jiKfZkAm7bf1L6e9WQQPXHEtcZFXHGnl6/UHIQPXcrcS3fcsUdpvu+41w3XolT5XelqBl1+Iq4Ypia7gcAl66ZfSVeO/9R7PGyWuktkmVe26WDWAN88ybTy2MecS8f13Ftcen1B1q7eqhldDf9RUocv1DI7yWgriI0+RiVC+mx9yN47/ABUVD+XHFy5XI/vuZKy2th/uaTj/AJKouqjk1b409VCr+VOZao8uDuBocabiPlzlTxG7aIbq71cjduWNsHmrpiePx+WVUY1uKgfVu2FB9KjvmZdPOj9zdBxVMy5N/VqNN/VnuH8vpEOKuL3rffzC7UxDiOIGqNyVyemuoXVaF7h9OTpo+YhjWjj3EG/iTd74f3DVgPxF38svLxy3Tq5COkr/AHAtzTs43G/EePkkIv0dnEtjdcf1A8tVVP8AcdGKb3w+pHLuwbtkuVUVqRk2rf4ippeHmA60NfMt8Y5B/okbzHJsr1xL6ey336iBvn9QQByxeOpB5U4qQPN1gvzEu+pZapcnTHPH6r5f9Q8vLvbJLryNJ1HQW4oe/cMini79vUKehkc1l+Jq0RyeYBze/Ul2fS3xLhpNdQoMXlD3BW9JNJg7rcmsW391JK7qFuWWiWt6BmkNdfaZcXh4i48GJQwxXL0X7kiuv/2BjfJ4nNfM3jZan5OoJuxCVW1lo5uVUuKA8XIMsbF+0gbXZ8kgOOLkYgVjetwrK68j7yxvx/j3z7ldUU0x/koofLDJs4p4PmVJVn/iVt3yeoi3ZIKW+27ljSNZ9bmTxMDx2vfuaQBxHq5Y5fTSprmRldAVWncsqsKZeWOFbGiBWWJ4rvt6kZdoDEKb+P6liXdOgh43tMvxIyOixj5Pidvcmrlzz3Kt27OSWK8X/wC5dC1fHEGubeZcNZO4v7GBpBt/7RcS0b13DQ+Knu77jtpu/mSZIKijvcgDTsiCl8188TOLYpjRBVPqK+Dua4u0fUNccvqQWOnjUa+kcsdQHyfLAKPmRpTLH5+8TKsRMrd6lju15r9shaciqgNdcxQzRsK6kNrVUdrC26E/7R+iw2alj9X15Na4JXbVUfqId4ifBM1eP08HTG3l5kZPZzy1Mh7bP9zbRj1fZcyjfB+pHGymNnAX3fzDoOA7llugxRvmdPMNb/cyFvJvqZpuvLXLEMczzG6hrHVXL6dPFRtMd7LuZKMhLmhOj6iN+TwC8kzy60HqRyqgMRfFLo9MaXE2b4gWqa+Kkad6gc2DqQ5L5Hem42tiX/UrNVv5l4jkFa+8PEcrv/1EtdvzqW2u92yFy9epXkljdfEnGsdc8yyWikR4IJ1evjuLkm646l/Ksv45RQy+nKphvD6HYf3FP+lfUKLsNfE0hknNVwwyCy73xLELBcn5i3ldX+odULfsjjkL3UMqvf3iPR+u5LZRjdf1L4CrKIeKNm5rVI8QFr+P7gvAO+DqRSaGzm5Yj/jiW7ify03bUtKgOmpPL1BunyfGWI97oipTYssnE3WoWt3x6k1VGiu4uwC6+fcqfdsHnE9SuiscartgmrHZ8zVvH+Pct8FLKjuh7hYNXp028yNNYEaH+OP3lVv8dknzHxxLfhjQPgN93eoNiW0SqsrW37QUe8tdRHz2de+oGNvj7ZJV7V9vUcfqL4+ZdFP3kp/5H3B2UXchHV38zWKYt4/mQ8un+pmg0tvv1EKoy/cLF07iXdLQ61JE15LUsf5cJ8fML5DHvdwyq3/639zek+mr/wBzI4+XPOmX/U/b8RDGvIys6fUvKji5dcTOlR6iBeg/cgFMQ7ip5eWQc0ysLEN+oZKPHXMsfHksvgioOn7SVFxXfG+octt6ivI8/EFMevhuP09cWQ8xzqtLykg5xQ1/qOXIVXcXnyP1M+VL5Wj/AFED7Udeob1uq9Ecst3Ip26vkuWk9Qy0AqYvEby1i8Ywpd1vrfUaMnjjmoGFZX+mIeJfJI+oUy43uB5XVEi+cooFfeV1o59HcAff7l2PDNWXTVPZBR5/ELttPtuO/J1dcwt6xyYlvYHqColH4qLt3zVMqfipWn5hxvv0RTX5tl/J8ud6kVe71Isu8effUqxNJZKxaDRx8Q7tV+8qNeJUfHFaXRz7YNe9Q4y+o3NNLdG+Y65CpcF6x/8A7mZ5pCv+8lfJ3bLfipdsXeJvjVQNcj92W8lTS6k1QvEsVu60R8cDHfcT6y+zpmW8st8yyRft6iLXXjdcyDd9HPzK7T6eOWGjQb/3LfvmPx+Ilp4qfrcAvXlaakthv4bh7X9EsbU4361EKPFbX3KuLIC2e+NTRYV/qZcf8q/MW13keR2x+lVbB+YPAVLLTq7i3dePPuFU2Y2v6INhzp5kjS5H2qaCw1+YLT41err1B2Xu+wkNFnL/AFNGshMrs2+oK1VDvdS8dfB3Lb1z/Utp40XIb0fy7lXJ+PvB4q91zEbxqyGrfZJ3F82l+/Mi7c7OIaxODn9ROPfxIvsLeJV3XxDVcstgcPcSnLj/APIXa44xDXlfMyK/y79TTTvKuZKPGXEF+pcTRGuMqgK/V2PqL5G9fDBvIqu5o1xCqusud7l46QLfiZ8snfkTT9N17hTsuIPv4gJkn/G46Nyw4o4NRRq/J1qZ8qKS98zedY5JV2TOGVpRVx8TaKV6liV5/iK0uPQSxRArqH/IGAJ3zJxxryqFfUt8RxL5eZYl5iaeJZhjmmOqg8faN7b33LzvnE5qFeL49Go8f8bkRfpwv+peIAn+RbMoLXFFzQDh5cUTGTXyXxNGI1fcgXJxuqGNUePOpgyWvvNFnD3Jtyq/tK0PlZny89JXU1R5eIVKryBZNt745+YZPLFKxX8VI4xyvnmXktq91B/ljrTE9b4gf86acB+Z/9k=);border-radius:20px;border-image:url(./image.7105ce7a.png) 20 repeat;transition:all .5s ease}.buttons{display:flex;flex-direction:row}.ta{height:24px;width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center}.ta-off{display:none}.button{aspect-ratio:144/121;width:65px;display:flex;justify-content:center;align-items:center;text-align:center;background-image:url(./button_off.5152e6d3.png);background-size:contain;background-repeat:no-repeat;margin:4px;padding:5px;color:#515151;font-family:Arial,Helvetica,sans-serif;font-weight:800;font-size:10pt;line-height:14px}.blue{background-image:url(./button_on_blue.2277a1b4.png);color:#4e598f}.red{background-image:url(./button_on_red.2fb72a77.png);color:#95665d}.amber{background-image:url(./button_on_amber.bb2616bf.png);color:#948255}.green{background-image:url(./button_on_green.536ce497.png);color:#596a2d} diff --git a/resources/ulc/html/index.html b/resources/ulc/html/index.html new file mode 100644 index 000000000..5696af57e --- /dev/null +++ b/resources/ulc/html/index.html @@ -0,0 +1,15 @@ + + + + + + + Vite + React + TS + + + + +
+ + + diff --git a/resources/ulc/html/vite.svg b/resources/ulc/html/vite.svg new file mode 100644 index 000000000..e7b8dfb1b --- /dev/null +++ b/resources/ulc/html/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/ulc/server/s_blackout.lua b/resources/ulc/server/s_blackout.lua new file mode 100644 index 000000000..cdf417746 --- /dev/null +++ b/resources/ulc/server/s_blackout.lua @@ -0,0 +1,7 @@ + +RegisterNetEvent('ulc:setBlackout', function(netId, state) + print("[ULC] Setting blackout to " .. tostring(state) .. " on vehicle " .. tostring(netId)) + local vehicle = NetworkGetEntityFromNetworkId(netId) + Entity(vehicle).state.ulc_blackout = state +end) + diff --git a/resources/ulc/server/s_lvc.lua b/resources/ulc/server/s_lvc.lua new file mode 100644 index 000000000..fe9f733d3 --- /dev/null +++ b/resources/ulc/server/s_lvc.lua @@ -0,0 +1,12 @@ +print("[ULC] LVC Integrations Loaded") + +-- triggers when player changes main siren state in LVC +-- newState is an int representing the index of a siren in lvc/SIRENS.lua:SIRENS +RegisterNetEvent("lvc:SetLxSirenState_s") +AddEventHandler("lvc:SetLxSirenState_s", function(newState) + local src = source + print("[lvc:SetLxSirenState_s] " .. src .. " " .. newState) + TriggerClientEvent("ulc:LVC_MainSirenStateChange", src, newState) +end) + +-- TODO: this isn't use anywhere yet diff --git a/resources/ulc/server/s_main.js b/resources/ulc/server/s_main.js new file mode 100644 index 000000000..d7ed37210 --- /dev/null +++ b/resources/ulc/server/s_main.js @@ -0,0 +1,45 @@ +// This API died :( + +// https.get('https://api.countapi.xyz/hit/dwnstr.com/ulcloadcount/', (res) => { +// const { statusCode } = res; +// const contentType = res.headers['content-type']; + +// let error; +// // Any 2xx status code signals a successful response but +// // here we're only checking for 200. +// if (statusCode !== 200) { +// error = new Error('Request Failed.\n' + +// `Status Code: ${statusCode}`); +// } else if (!/^application\/json/.test(contentType)) { +// error = new Error('Invalid content-type.\n' + +// `Expected application/json but received ${contentType}`); +// } +// if (error) { +// // console.error(error.message); +// // Consume response data to free up memory +// res.resume(); +// return; +// } + +// res.setEncoding('utf8'); +// let rawData = ''; +// res.on('data', (chunk) => { rawData += chunk; }); +// res.on('end', () => { +// try { +// const parsedData = JSON.parse(rawData); +// console.log(`[ULC] ULC has been loaded on servers ${parsedData.value} times :D`); +// } catch (e) { +// // console.error(e.message); +// } +// }); +// }).on('error', (e) => { +// // console.error(`Got error: ${e.message}`); +// }); + +// // Create a local server to receive data from +// const server = http.createServer((req, res) => { +// res.writeHead(200, { 'Content-Type': 'application/json' }); +// res.end(JSON.stringify({ +// data: 'Hello World!', +// })); +// }); diff --git a/resources/ulc/server/s_main.lua b/resources/ulc/server/s_main.lua new file mode 100644 index 000000000..4348db28a --- /dev/null +++ b/resources/ulc/server/s_main.lua @@ -0,0 +1,390 @@ +print("Server thread loaded.") + +AddEventHandler('ulc:error', function(error) + print("^1[ULC ERROR] " .. error) +end) + +AddEventHandler('ulc:warn', function(error) + print("^3[ULC WARNING] " .. error) +end) + +local myVersion = GetResourceMetadata("ulc", "version", 0) +local latestVersion = '' + +if GetCurrentResourceName() ~= 'ulc' then + TriggerEvent('ulc:error', "Resource is named incorrectly. Version checks will not work.") +end + +--TODO change loading state to use this instead of events +GlobalState.ulcloaded = false + +PerformHttpRequest("https://api.github.com/repos/Flohhhhh/ultimate-lighting-controller/releases/latest", + function(errorCode, resultData, resultHeaders) + print("[ULC] My Version: [" .. myVersion .. "]") + + local errorString = tostring(errorCode) + if errorString == "403" or errorString == "404" then + print("Got code " .. errorString .. " when trying to get version.") + return + end + + latestVersion = json.decode(resultData).name + print("^0[ULC] Latest Version: [" .. latestVersion .. "]") + + print([[ + ___ ___ ___ ________ + |\ \|\ \ |\ \ |\ ____\ + \ \ \\\ \\ \ \ \ \ \___| + \ \ \\\ \\ \ \ \ \ \ + \ \ \\\ \\ \ \____ \ \ \____ + \ \_______\\ \_______\\ \_______\ + \|_______| \|_______| \|_______| + + ULTIMATE LIGHTING CONTROLLER + by Dawnstar + ^2Loaded + ]]) + if myVersion and ("v" .. myVersion) == latestVersion then + print('[ULC] Up to date!') + else + print("^1[ULC] OUTDATED. A NEW VERSION (" .. latestVersion .. ") IS AVAILABLE.^0") + print("^1[ULC] YOUR VERSION: " .. myVersion .. "^0") + print("[ULC] GET LATEST VERSION HERE: https://github.com/Flohhhhh/ultimate-lighting-controller/releases/") + end + end) + + +local function IsIntInTable(table, int) + for k, v in ipairs(table) do + if v == int then + return true + end + end + return false +end + +if Config.ParkSettings.delay < 0.5 then + TriggerEvent("ulc:warn", + 'Park Pattern delay is too short! This will hurt performance! Recommended values are above 0.5s.') +end + +-- removed v1.7.0 +-- if Config.SteadyBurnSettings.delay <= 2 then +-- TriggerEvent("ulc:error", 'Steady burn delay is too short! Steady burns will be unstable or not work!') +-- end + +if Config.SteadyBurnSettings.nightStartHour < Config.SteadyBurnSettings.nightEndHour then + TriggerEvent("ulc:error", 'Steady burn night start hour should be later/higher than night end hour.') +end + +-- removed v1.7.0 +-- if Config.SteadyBurnSettings.delay < 2 then +-- TriggerEvent("ulc:error", "Steady burn check delay can never be lower than 2 seconds. Will cause stability issues.") +-- end + +local function CheckData(data, resourceName) + if not data.name and not data.names then + TriggerEvent("ulc:error", "^1Vehicle config in resource \"" .. resourceName .. "\" does not include model names!^0") + return false + elseif data.name then + TriggerEvent("ulc:warn", + "^1Vehicle config in resource \"" .. + resourceName .. "\" uses deprecated 'name' field. Change to > names = {'yourvehicle'}^0") + if type(data.name) ~= "string" then + TriggerEvent("ulc:error", + "^1Vehicle config in resource \"" .. resourceName .. "\" 'name' field can only accept a string.^0") + return false + end + elseif data.names then + if type(data.names) ~= "table" then + TriggerEvent("ulc:error", + "^1Vehicle config in resource \"" .. resourceName .. "\" 'names' field can only accept a table of strings.^0") + return false + end + end + + -- check if data is missing + if not data.parkConfig or not data.brakeConfig or not data.buttons or not data.hornConfig then + TriggerEvent("ulc:error", + "^1Vehicle config in resource \"" .. resourceName .. "\" is missing data or not formatted properly. View docs.^0") + return false + end + + -- check if steady burns are enabled but no extras specified + if (data.steadyBurnConfig.forceOn or data.steadyBurnConfig.useTime) and #data.steadyBurnConfig.sbExtras == 0 then + TriggerEvent("ulc:warn", + 'A config in "' .. resourceName .. '" uses Steady Burns, but no extras were specified (sbExtras = {})') + end + + -- check if park pattern enabled but no extras specified + if data.parkConfig.usePark then + if #data.parkConfig.pExtras == 0 and #data.parkConfig.dExtras == 0 then + TriggerEvent("ulc:warn", + 'A config in "' .. + resourceName .. '" uses Park Patterns, but no park or drive extras were specified (pExtras = {}, dExtras = {})') + end + end + + -- check if brakes enabled but no extras specified + if data.brakeConfig.useBrakes and #data.brakeConfig.brakeExtras == 0 then + TriggerEvent("ulc:warn", + 'A config in "' .. resourceName .. '" uses Brake Pattern, but no brake extras were specified.') + end + + -- check if horn enabled but no extras specified + if data.hornConfig.useHorn and #data.hornConfig.hornExtras == 0 then + TriggerEvent("ulc:warn", 'A config in "' .. resourceName .. '" uses Horn Extras, but no horn extras were specified.') + end + + -- stages + if data.stages then + -- check if stages are enabled but no keys specified + if data.stages.useStages and #data.stages.stageKeys == 0 then + TriggerEvent("ulc:warn", + 'A config in "' .. resourceName .. '" uses Stages, but no keys were specified.') + end + + -- check each key + for _, v in pairs(data.stages.stageKeys) do + -- if key is not a numpad value + if v > 9 then + TriggerEvent("ulc:error", + 'A config in "' .. + resourceName .. + '" has an invalid key in stageKeys (' .. v .. '). Value must be 1-9 representing numpad keys.') + break + end + + -- make sure each item in data.stages.stageKeys corresponds to a button with key = the value + local buttonExists = false + for _, b in pairs(data.buttons) do + if b.key == v then + buttonExists = true + break + end + end + if not buttonExists then + TriggerEvent("ulc:error", + 'A config in "' .. + resourceName .. + '" has a key in stageKeys (' .. v .. ') that does not correspond to a key assigned to a button.') + end + end + end + + + -------------------- + -- DEFAULT STAGES -- + -------------------- + if data.defaultStages or false then + if data.defaultStages.useDefaults then + if #data.defaultStages.enableKeys == 0 and #data.defaultStages.disableKeys == 0 then + TriggerEvent("ulc:warn", + 'A config in "' .. + resourceName .. + '" uses Default Stages, but no keys were specified to enable (enableKeys = {}) or disable (disableKeys = {}).') + else + if #data.defaultStages.enableKeys > 0 then + for _, v in pairs(data.defaultStages.enableKeys) do + if v > 9 then + TriggerEvent("ulc:error", + 'A config in "' .. + resourceName .. + '" has an invalid key in enableKeys = {}. Value must be 1-9 representing numpad keys.') + end + end + end + if #data.defaultStages.disableKeys > 0 then + for _, v in pairs(data.defaultStages.disableKeys) do + if v > 9 then + TriggerEvent("ulc:error", + 'A config in "' .. + resourceName .. '" has an invalid key in disableKeys = {}. Value must be 1-9 representing numpad keys.') + end + end + end + end + end + end + + + -- Buttons + -- check if vehicle uses buttons but hud is disabled + if #data.buttons > 0 and Config.hideHud == true then + TriggerEvent("ulc:warn", + 'A config in "' .. + resourceName .. + '" uses Stage Buttons, but HUD/UI is globally disabled. This is not recommended for user experience.') + end + + local usedButtons = {} + local usedExtras = {} + for i, b in ipairs(data.buttons) do + -- check if key is valid + if b.key > 9 or b.key < 1 then + TriggerEvent('ulc:error', + 'Button ' .. + i .. + ' in a config found in the resource: "' .. + resourceName .. '" has an invalid key. Key must be 1-9 representing number pad keys.') + return false + end + -- check if label is empty + if b.label == '' then + TriggerEvent("ulc:error", + 'A config in "' .. resourceName .. '" has an un-labeled button using extra: ' .. b.extra) + return false + end + if not validateButtonText(b.label) then + TriggerEvent("ulc:warn", + 'A config in "' .. + resourceName .. + '" has a button with label: "' .. + b.label .. + '" which is not valid and will result in a poor user experience. Please make sure there are no more than 3 words and each word is a maximum of 5 characters. Use abbreviations where possible. Ex. "Takedowns" -> "TKD".') + end + if b.color and (b.color ~= 'blue' and b.color ~= 'green' and b.color ~= 'amber' and b.color ~= 'red') then + TriggerEvent("ulc:error", + 'A config in "' .. + resourceName .. '" has a button with an invalid color input: "' .. b.color .. '" is not a supported color.') + end + -- check if any keys are used twice + if IsIntInTable(usedButtons, b.key) then + TriggerEvent("ulc:error", + 'A config in "' .. resourceName .. '" uses key: " .. b.key .. " more than once in button config.') + return false + end + -- check if any extras are used twice + if IsIntInTable(usedExtras, b.extra) then + TriggerEvent("ulc:error", + 'A config in "' .. resourceName .. '" uses extra: " .. b.extra .. " more than once in button config.') + return false + end + end + return true +end + +RegisterNetEvent('baseevents:enteredVehicle') +AddEventHandler('baseevents:enteredVehicle', function() + local src = source + TriggerClientEvent("UpdateVehicleConfigs", src, Config.Vehicles) + TriggerClientEvent('ulc:checkVehicle', src) +end) + +RegisterNetEvent('baseevents:leftVehicle') +AddEventHandler('baseevents:leftVehicle', function() + local src = source + TriggerClientEvent('ulc:cleanup', src) +end) + +RegisterNetEvent('ulc:sync:send') +AddEventHandler('ulc:sync:send', function(vehicles) + print("Player " .. source .. " sent a sync request.") + local players = GetPlayers() + for i, v in ipairs(players) do + if not v == source then + --print("Sending veh sync array to player: " .. v) + TriggerClientEvent('ulc:sync:receive', vehicles) + end + end +end) + + +local function LoadExternalVehicleConfig(resourceName) + local resourceState = GetResourceState(resourceName) + + if resourceState == "missing" then + TriggerEvent("ulc:error", + "^1Couldn't load external ulc.lua file from resource: \"" .. + resourceName .. + "\". Resource is missing. You probably entered the model name in config.lua instead of the resource name.^0") + return + end + + if resourceState == "stopped" then + TriggerEvent("ulc:error", + "^1Couldn't load external ulc.lua file from resource: \"" .. resourceName .. "\". Resource is stopped.^0") + return + end + + if resourceState == "uninitialized" or resourceState == "unknown" then + TriggerEvent("ulc:error", + "^1Couldn't load external ulc.lua file from resource: \"" .. + resourceName .. "\". Resource could not be loaded. Unknown issue.^0") + return + end + + local data = LoadResourceFile(resourceName, "data/ulc.lua") + if not data then + data = LoadResourceFile(resourceName, "ulc.lua") + if not data then + print("Error loading 'ulc.lua' file. Make sure it is at the root of your resource or in the 'data' folder.") + TriggerEvent("ulc:error", '^1Could not load external configuration in: "' .. resourceName .. '"^0') + return + end + end + + local f, err = load(data) + if err then + TriggerEvent("ulc:error", + '^1Could not load external configuration in: "' .. resourceName .. '"; error: "' .. err .. '"^0') + return + end + if not f or not f() then + TriggerEvent("ulc:error", + '^1Could not load external configuration; data loaded from: "' .. resourceName .. '" was nil. ^0') + return + end + + -- NEW STUFF FOR MULTIPLE CONFIGS + local configs = { f() } + for _, v in pairs(configs) do + if CheckData(v, resourceName) then + if v.name then -- if using old single name + print('^2[ULC] Loaded external configuration for "' .. v.name .. '"^0') + elseif v.names then -- if using new table + for _, name in ipairs(v.names) do + print('^2[ULC] Loaded external configuration for "' .. name .. '"^0') + end + end + + table.insert(Config.Vehicles, v) + else + TriggerEvent("ulc:error", '^1Could not load external configuration in "' .. resourceName .. '"^0') + end + end + + -- if CheckData(f(), resourceName) then + -- print('^2Loaded external configuration for "' .. f().name .. '"^0') + -- table.insert(Config.Vehicles, f()) + -- else + -- TriggerEvent("ulc:error", '^1Could not load external configuration for "' .. f().name .. '"^0') + -- end +end + +CreateThread(function() + Wait(2000) + print("[ULC] Checking for external vehicle resources.") + for k, v in ipairs(Config.ExternalVehResources) do + local resourceState = GetResourceState(v) + while resourceState == "starting" do + print("^3[ULC] Waiting for resource: " .. resourceName .. " to load.") + Wait(100) + end + LoadExternalVehicleConfig(v) + end + --TriggerClientEvent('ulc:Loaded', -1) + GlobalState.ulcloaded = true + TriggerClientEvent("UpdateVehicleConfigs", -1, Config.Vehicles) + print("[ULC] Loading complete: " .. + #Config.Vehicles .. " external vehicle configurations loaded. State check: " .. tostring(GlobalState.ulcloaded)) + for _, v in ipairs(Config.Vehicles) do + if v.name then -- if using old single name + print('[ULC] Loaded: ' .. v.name) + elseif v.names then -- if using new table + for _, name in ipairs(v.names) do + print('[ULC] Loaded: ' .. name) + end + end + end +end) diff --git a/resources/ulc/shared/shared_functions.lua b/resources/ulc/shared/shared_functions.lua new file mode 100644 index 000000000..9d3b86cc8 --- /dev/null +++ b/resources/ulc/shared/shared_functions.lua @@ -0,0 +1,110 @@ +-- Returns: bool (whether vehicle was found), table (vehicle config info) +function GetVehicleFromConfig(vehicle) + for _, v in pairs(Config.Vehicles) do + -- if old method with just a string + if v.name then + -- find which vehicle matches + if GetEntityModel(vehicle) == GetHashKey(v.name) then + --print("Vehicle [" .. v.name .. "] was found in Config.") + return true, v + end + elseif v.names then -- if new method with a table + -- for each name check if it matches the vehicle + for _, n in ipairs(v.names) do + if GetEntityModel(vehicle) == GetHashKey(n) then + --print("Vehicle [" .. v.name .. "] was found in Config.") + return true, v + end + end + end + end +end + +-- Returns whether a vehicle is in a table of vehicle spawn names given a vehicle handle +function IsVehicleInTable(vehicle, table) + --print(table) + for _, v in pairs(table) do + --print(v) + --print(GetHashKey(v)) + --print(vehicle) + --print(GetEntityModel(vehicle)) + if GetEntityModel(vehicle) == GetHashKey(v) then + return true, v + else + --print("Vehicle [" .. v .. "] not found in table.") + end + end +end + +-- Returns the vehicle speed converted to MPH or KPH based on config value +function GetVehicleSpeedConverted(vehicle) + if Config.useKPH then + return GetEntitySpeed(Entity(vehicle)) * 3.6 + else + return GetEntitySpeed(Entity(vehicle)) * 2.236936 + end +end + +-- returns true when all vehicle doors are fully closed +function AreVehicleDoorsClosed(vehicle) + local result = true + local numberOfDoors = GetNumberOfVehicleDoors(vehicle) + for i = 0, numberOfDoors, 1 do + if GetVehicleDoorAngleRatio(vehicle, i) > 0.0 then + --print("[AreVehicleDoorsClosed()] Door " .. i .. " is open.") + result = false + end + end + return result +end + +-- returns true when vehicle health is above config threshold +function IsVehicleHealthy(vehicle) + local vehHealth = GetVehicleBodyHealth(vehicle) + + if vehHealth > 980 then + return true + else + --print("[IsVehicleHealth())] Vehicle is damaged.") + return false + end +end + +function SortButtonsByKey(arr) + table.sort(arr, function(a, b) + return a["key"] < b["key"] + end) +end + +function formatInt(num) + local formatted = tostring(num) + local length = formatted:len() + + for i = length - 3, 1, -3 do + formatted = formatted:sub(1, i) .. ',' .. formatted:sub(i + 1) + end + + return formatted +end + +function validateButtonText(text) + local count = 0 + for word in text:gmatch("%w+") do + count = count + 1 + if count > 3 or #word > 5 then + return false + end + end + return true +end + +-- Function to check if a value exists in a table +-- Returns: bool (whether value is contained), int (index of value if contained) +function contains(table, val) + for i, v in ipairs(table) do + if v == val then + return i + end + end + return false +end