diff --git a/Boards/arduino_mega.board.json b/Boards/arduino_mega.board.json
index 66cfe820d..e9a6ce8b1 100644
--- a/Boards/arduino_mega.board.json
+++ b/Boards/arduino_mega.board.json
@@ -2,7 +2,7 @@
"$schema": "./mfboard.schema.json",
"AvrDudeSettings": {
"Device": "atmega2560",
- "BaudRates": ["115200"],
+ "BaudRates": [ "115200" ],
"Programmer": "wiring",
"Timeout": 15000
},
@@ -40,7 +40,27 @@
"LatestFirmwareVersion": "2.5.1",
"FriendlyName": "Arduino Mega 2560",
"MobiFlightType": "MobiFlight Mega",
- "ResetFirmwareFile": "reset.arduino_mega_1_0_2.hex"
+ "ResetFirmwareFile": "reset.arduino_mega_1_0_2.hex",
+ "Community": {
+ "Project": "MobiFlight Mega",
+ "Website": "https://mobiflight.com/links/connector/info/website/mega.html",
+ "Docs": "https://mobiflight.com/links/connector/info/docs/mega.html",
+ "Support": "https://mobiflight.com/discord"
+ },
+ "DeviceConfigs": [
+ {
+ "Name": "Prototyping Board (Latest version)",
+ "Description": "The device definitions for the Prototyping Board from the Community Shop",
+ "File": "prototyping-board-latest.mega.mfmc",
+ "DefaultUpload": false
+ },
+ {
+ "Name": "Prototyping Board v2.0",
+ "Description": "The device definitions for the Prototyping Board from the Community Shop",
+ "File": "prototyping-board-latest.mega.mfmc",
+ "DefaultUpload": false
+ }
+ ]
},
"ModuleLimits": {
"MaxAnalogInputs": 16,
@@ -54,7 +74,7 @@
"MaxShifters": 6,
"MaxSteppers": 10,
"MaxInputMultiplexer": 6,
- "MaxCustomDevices" : 0
+ "MaxCustomDevices": 0
},
"Pins": [
{
diff --git a/Boards/arduino_micro.board.json b/Boards/arduino_micro.board.json
index c856d7866..716d9db0e 100644
--- a/Boards/arduino_micro.board.json
+++ b/Boards/arduino_micro.board.json
@@ -29,7 +29,13 @@
"FriendlyName": "Arduino Pro Micro",
"LatestFirmwareVersion": "2.5.1",
"MobiFlightType": "MobiFlight Micro",
- "ResetFirmwareFile": "reset.arduino_promicro_1_0_2.hex"
+ "ResetFirmwareFile": "reset.arduino_promicro_1_0_2.hex",
+ "Community": {
+ "Project": "MobiFlight Pro Micro",
+ "Website": "https://mobiflight.com/links/connector/info/website/micro.html",
+ "Docs": "https://mobiflight.com/links/connector/info/docs/micro.html",
+ "Support": "https://mobiflight.com/discord"
+ }
},
"ModuleLimits": {
"MaxAnalogInputs": 9,
diff --git a/Boards/arduino_nano.board.json b/Boards/arduino_nano.board.json
index fef3d441f..cc7ec60b7 100644
--- a/Boards/arduino_nano.board.json
+++ b/Boards/arduino_nano.board.json
@@ -35,7 +35,13 @@
"FriendlyName": "Arduino Nano",
"LatestFirmwareVersion": "2.5.1",
"MobiFlightType": "MobiFlight Nano",
- "ResetFirmwareFile": "reset.arduino_uno_1_0_2.hex"
+ "ResetFirmwareFile": "reset.arduino_uno_1_0_2.hex",
+ "Community": {
+ "Project": "MobiFlight Nano",
+ "Website": "https://mobiflight.com/links/connector/info/website/nano.html",
+ "Docs": "https://mobiflight.com/links/connector/info/docs/nano.html",
+ "Support": "https://mobiflight.com/discord"
+ }
},
"ModuleLimits": {
"MaxAnalogInputs": 8,
diff --git a/Boards/arduino_uno.board.json b/Boards/arduino_uno.board.json
index 0a4cd7e20..2009e0ece 100644
--- a/Boards/arduino_uno.board.json
+++ b/Boards/arduino_uno.board.json
@@ -34,7 +34,13 @@
"FirmwareExtension": "hex",
"LatestFirmwareVersion": "2.5.1",
"MobiFlightType": "MobiFlight Uno",
- "ResetFirmwareFile": "reset.arduino_uno_1_0_2.hex"
+ "ResetFirmwareFile": "reset.arduino_uno_1_0_2.hex",
+ "Community": {
+ "Project": "MobiFlight Uno",
+ "Website": "https://mobiflight.com/links/connector/info/website/uno.html",
+ "Docs": "https://mobiflight.com/links/connector/info/docs/uno.html",
+ "Support": "https://mobiflight.com/discord"
+ }
},
"ModuleLimits": {
"MaxAnalogInputs": 6,
diff --git a/Boards/config/prototyping-board-latest.mega.mfmc b/Boards/config/prototyping-board-latest.mega.mfmc
new file mode 100644
index 000000000..958e9d5ee
--- /dev/null
+++ b/Boards/config/prototyping-board-latest.mega.mfmc
@@ -0,0 +1,59 @@
+
+
+ MobiFlight Mega
+ ProtoBoard-v2
+ 600
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Boards/mobiflight_mega.png b/Boards/mobiflight_mega.png
new file mode 100644
index 000000000..30f10e1b0
Binary files /dev/null and b/Boards/mobiflight_mega.png differ
diff --git a/Boards/mobiflight_micro.png b/Boards/mobiflight_micro.png
new file mode 100644
index 000000000..b86964f0a
Binary files /dev/null and b/Boards/mobiflight_micro.png differ
diff --git a/Boards/mobiflight_nano.png b/Boards/mobiflight_nano.png
new file mode 100644
index 000000000..580d107d4
Binary files /dev/null and b/Boards/mobiflight_nano.png differ
diff --git a/Boards/mobiflight_uno.png b/Boards/mobiflight_uno.png
new file mode 100644
index 000000000..6ff8de5e9
Binary files /dev/null and b/Boards/mobiflight_uno.png differ
diff --git a/MobiFlight/Board.cs b/MobiFlight/Board.cs
index 9c2008da8..5c57c969e 100644
--- a/MobiFlight/Board.cs
+++ b/MobiFlight/Board.cs
@@ -19,6 +19,7 @@ public class DeviceConfigFile
public string Name;
public string Description;
public string File;
+ public bool DefaultUpload = true;
}
///
@@ -445,7 +446,7 @@ public override string ToString()
/// The
protected string GetDefaultDeviceConfigFilePath()
{
- return Path.Combine(BasePath, "config", $"{Info.FirmwareBaseName}.mfmc") ;
+ return Path.Combine(BasePath, "config", $"{Info.FirmwareBaseName}.mfmc");
}
public IEnumerable GetExistingDeviceConfigFiles()
@@ -456,7 +457,7 @@ public IEnumerable GetExistingDeviceConfigFiles()
var DefaultDeviceConfigFile = GetDefaultDeviceConfigFilePath();
if (!File.Exists(DefaultDeviceConfigFile))
return new List();
-
+
return new List
{
new DeviceConfigFile
@@ -467,13 +468,22 @@ public IEnumerable GetExistingDeviceConfigFiles()
}
};
}
-
+
+ var configFolder = Path.Combine(BasePath, "config");
+
+ if (PartnerLevel==BoardPartnerLevel.Core)
+ {
+ // for the built-in boards, the folder structure is not the same as for community boards
+ configFolder = Path.Combine(BasePath, "Boards/config");
+ }
+
+
return Info.DeviceConfigs
- .Select(file => new DeviceConfigFile
+ .Select(file => new DeviceConfigFile()
{
Name = file.Name,
Description = file.Description,
- File = Path.Combine(BasePath, "config", file.File)
+ File = Path.Combine(configFolder, file.File)
})
.Where(file => File.Exists(file.File));
}
diff --git a/MobiFlightConnector.csproj b/MobiFlightConnector.csproj
index a34a950b6..e0ae3c41b 100644
--- a/MobiFlightConnector.csproj
+++ b/MobiFlightConnector.csproj
@@ -1018,6 +1018,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -1324,6 +1327,18 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
diff --git a/UI/Panels/Device/MFModulePanel.Designer.cs b/UI/Panels/Device/MFModulePanel.Designer.cs
index c146e89f3..efbba5b47 100644
--- a/UI/Panels/Device/MFModulePanel.Designer.cs
+++ b/UI/Panels/Device/MFModulePanel.Designer.cs
@@ -52,11 +52,15 @@ private void InitializeComponent()
this.buttonSupport = new System.Windows.Forms.Button();
this.buttonDocs = new System.Windows.Forms.Button();
this.buttonWebsite = new System.Windows.Forms.Button();
+ this.communityInfoPanel = new System.Windows.Forms.Panel();
+ this.panel1 = new System.Windows.Forms.Panel();
this.groupBoxName.SuspendLayout();
this.groupBoxInformation.SuspendLayout();
this.groupBoxDetails.SuspendLayout();
this.UploadDeviceConfigPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).BeginInit();
+ this.communityInfoPanel.SuspendLayout();
+ this.panel1.SuspendLayout();
this.SuspendLayout();
//
// groupBoxName
@@ -137,13 +141,10 @@ private void InitializeComponent()
// groupBoxDetails
//
resources.ApplyResources(this.groupBoxDetails, "groupBoxDetails");
- this.groupBoxDetails.Controls.Add(this.labelProjectValue);
- this.groupBoxDetails.Controls.Add(this.labelProject);
this.groupBoxDetails.Controls.Add(this.UploadDeviceConfigPanel);
+ this.groupBoxDetails.Controls.Add(this.panel1);
this.groupBoxDetails.Controls.Add(this.pictureBoxLogo);
- this.groupBoxDetails.Controls.Add(this.buttonSupport);
- this.groupBoxDetails.Controls.Add(this.buttonDocs);
- this.groupBoxDetails.Controls.Add(this.buttonWebsite);
+ this.groupBoxDetails.Controls.Add(this.communityInfoPanel);
this.groupBoxDetails.Name = "groupBoxDetails";
this.groupBoxDetails.TabStop = false;
//
@@ -152,12 +153,12 @@ private void InitializeComponent()
resources.ApplyResources(this.labelProject, "labelProject");
this.labelProject.Name = "labelProject";
//
- // panel1
+ // UploadDeviceConfigPanel
//
this.UploadDeviceConfigPanel.Controls.Add(this.label1);
this.UploadDeviceConfigPanel.Controls.Add(this.buttonUploadDefaultConfig);
- resources.ApplyResources(this.UploadDeviceConfigPanel, "panel1");
- this.UploadDeviceConfigPanel.Name = "panel1";
+ resources.ApplyResources(this.UploadDeviceConfigPanel, "UploadDeviceConfigPanel");
+ this.UploadDeviceConfigPanel.Name = "UploadDeviceConfigPanel";
//
// label1
//
@@ -194,6 +195,21 @@ private void InitializeComponent()
this.buttonWebsite.Name = "buttonWebsite";
this.buttonWebsite.UseVisualStyleBackColor = true;
//
+ // communityInfoPanel
+ //
+ this.communityInfoPanel.Controls.Add(this.labelProject);
+ this.communityInfoPanel.Controls.Add(this.labelProjectValue);
+ resources.ApplyResources(this.communityInfoPanel, "communityInfoPanel");
+ this.communityInfoPanel.Name = "communityInfoPanel";
+ //
+ // panel1
+ //
+ this.panel1.Controls.Add(this.buttonWebsite);
+ this.panel1.Controls.Add(this.buttonDocs);
+ this.panel1.Controls.Add(this.buttonSupport);
+ resources.ApplyResources(this.panel1, "panel1");
+ this.panel1.Name = "panel1";
+ //
// MFModulePanel
//
resources.ApplyResources(this, "$this");
@@ -207,9 +223,11 @@ private void InitializeComponent()
this.groupBoxInformation.ResumeLayout(false);
this.groupBoxInformation.PerformLayout();
this.groupBoxDetails.ResumeLayout(false);
- this.groupBoxDetails.PerformLayout();
this.UploadDeviceConfigPanel.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).EndInit();
+ this.communityInfoPanel.ResumeLayout(false);
+ this.communityInfoPanel.PerformLayout();
+ this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -239,5 +257,7 @@ private void InitializeComponent()
private System.Windows.Forms.Button buttonUploadDefaultConfig;
private System.Windows.Forms.Label labelProjectValue;
private System.Windows.Forms.Label labelProject;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Panel communityInfoPanel;
}
}
diff --git a/UI/Panels/Device/MFModulePanel.cs b/UI/Panels/Device/MFModulePanel.cs
index 5de9d4d4c..d7252584d 100644
--- a/UI/Panels/Device/MFModulePanel.cs
+++ b/UI/Panels/Device/MFModulePanel.cs
@@ -51,7 +51,12 @@ public MFModulePanel(MobiFlightModule module)
PortValueLabel.Text = module.Port;
- DisplayDetails(module.Board);
+ groupBoxDetails.Visible = false;
+
+ if (module.HasMfFirmware())
+ {
+ DisplayDetails(module.Board);
+ }
initialized = true;
}
@@ -64,6 +69,8 @@ private void DisplayDetails(Board board)
return;
}
+ groupBoxDetails.Visible = true;
+
if (board.Info.Community?.Project != null)
labelProjectValue.Text = board.Info.Community.Project;
else
@@ -105,7 +112,10 @@ private void DisplayDetails(Board board)
if (specificDeviceConfigs.Count() == 1)
{
var profile = specificDeviceConfigs.First();
- UploadDefaultConfigRequested?.Invoke(this, profile.File);
+ if(profile.DefaultUpload)
+ {
+ UploadDefaultConfigRequested?.Invoke(this, profile.File);
+ }
}
// since we have more options, we present a context menu
else
diff --git a/UI/Panels/Device/MFModulePanel.resx b/UI/Panels/Device/MFModulePanel.resx
index 0dc5ca919..dd46de706 100644
--- a/UI/Panels/Device/MFModulePanel.resx
+++ b/UI/Panels/Device/MFModulePanel.resx
@@ -532,10 +532,10 @@
Top, Left, Right
- 73, 19
+ 70, 8
- 184, 18
+ 203, 18
18
@@ -553,10 +553,10 @@
System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- groupBoxDetails
+ communityInfoPanel
- 0
+ 1
True
@@ -564,32 +564,23 @@
GrowAndShrink
-
- True
-
-
- 18, 19
-
-
- 40, 13
-
-
- 17
+
+ 3, 4
-
- Project
+
+ 0, 0, 0, 0
-
- labelProject
+
+ 158, 23
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 18
-
- groupBoxDetails
+
+ Upload board's default config:
-
- 1
+
+ MiddleRight
label1
@@ -598,11 +589,23 @@
System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- panel1
+ UploadDeviceConfigPanel
0
+
+ 192, 4
+
+
+ 72, 23
+
+
+ 17
+
+
+ Upload
+
buttonUploadDefaultConfig
@@ -610,22 +613,85 @@
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- panel1
+ UploadDeviceConfigPanel
1
-
- 16, 185
+
+ Top
-
+
+ 3, 178
+
+
0, 0, 0, 0
+
+ 276, 32
+
+
+ 16
+
+
+ UploadDeviceConfigPanel
+
+
+ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ groupBoxDetails
+
+
+ 0
+
+
+ buttonWebsite
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panel1
+
+
+ 0
+
+
+ buttonDocs
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panel1
+
+
+ 1
+
+
+ buttonSupport
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panel1
+
+
+ 2
+
+
+ Top
+
+
+ 3, 146
+
- 251, 28
+ 276, 32
- 16
+ 20
panel1
@@ -637,13 +703,19 @@
groupBoxDetails
- 2
+ 1
+
+
+ Top
- 17, 40
+ 3, 46
+
+
+ 0, 2, 0, 2
- 250, 100
+ 276, 100
Zoom
@@ -661,79 +733,43 @@
groupBoxDetails
- 3
-
-
- 196, 155
-
-
- 72, 23
-
-
- 14
-
-
- Support
-
-
- buttonSupport
-
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- groupBoxDetails
-
-
- 4
-
-
- 107, 155
-
-
- 75, 23
-
-
- 13
-
-
- Docs
+ 2
-
- buttonDocs
+
+ labelProject
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- groupBoxDetails
+
+ communityInfoPanel
-
- 5
+
+ 0
-
- 18, 155
+
+ Top
-
- 75, 23
+
+ 3, 16
-
- 12
+
+ 276, 30
-
- Website
+
+ 19
-
- buttonWebsite
+
+ communityInfoPanel
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
groupBoxDetails
-
- 6
+
+ 3
Top
@@ -748,7 +784,7 @@
3, 3, 3, 0
- 282, 226
+ 282, 210
7
@@ -768,60 +804,105 @@
0
-
- 3, 3
-
-
- 0, 0, 0, 0
+
+ True
-
- 158, 23
+
+ 15, 8
-
- 18
+
+ 40, 13
-
- Upload board's default config:
+
+ 17
-
- MiddleRight
+
+ Project
-
- label1
+
+ labelProject
-
+
System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- panel1
+
+ communityInfoPanel
-
+
0
-
- 179, 3
+
+ 192, 5
-
+
72, 23
-
- 17
+
+ 14
-
- Upload
+
+ Support
-
- buttonUploadDefaultConfig
+
+ buttonSupport
-
+
System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
panel1
-
+
+ 2
+
+
+ 103, 5
+
+
+ 75, 23
+
+
+ 13
+
+
+ Docs
+
+
+ buttonDocs
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panel1
+
+
1
+
+ 15, 5
+
+
+ 75, 23
+
+
+ 12
+
+
+ Website
+
+
+ buttonWebsite
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ panel1
+
+
+ 0
+
True
diff --git a/frontend/dist/assets/background-nologo.jpg b/frontend/dist/assets/background-nologo.jpg
new file mode 100644
index 000000000..62d32d047
Binary files /dev/null and b/frontend/dist/assets/background-nologo.jpg differ
diff --git a/frontend/dist/assets/edit/elements/example_wiring_button.png b/frontend/dist/assets/edit/elements/example_wiring_button.png
new file mode 100644
index 000000000..993f1b9f5
Binary files /dev/null and b/frontend/dist/assets/edit/elements/example_wiring_button.png differ
diff --git a/frontend/dist/assets/hand-flipping-switch-BavH9Bvp.png b/frontend/dist/assets/hand-flipping-switch-BavH9Bvp.png
new file mode 100644
index 000000000..97fe3b62a
Binary files /dev/null and b/frontend/dist/assets/hand-flipping-switch-BavH9Bvp.png differ
diff --git a/frontend/dist/assets/index-D17jxULl.css b/frontend/dist/assets/index-D17jxULl.css
new file mode 100644
index 000000000..1abe31025
--- /dev/null
+++ b/frontend/dist/assets/index-D17jxULl.css
@@ -0,0 +1 @@
+*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 360 0% 97%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 220 60% 50%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 0 0% 12%;--foreground: 210 40% 98%;--card: 0 0% 18%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 95%;--primary: 220 60% 50%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-4{width:1rem;height:1rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-60{height:15rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.5rem\]{height:1.5rem}.h-\[1px\]{height:1px}.h-\[300px\]{height:300px}.h-\[\]{height:}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.min-h-\[200px\]{min-height:200px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-96{width:24rem}.w-\[1\.5rem\]{width:1.5rem}.w-\[120px\]{width:120px}.w-\[150px\]{width:150px}.w-\[180px\]{width:180px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[240px\]{width:240px}.w-\[350px\]{width:350px}.w-\[360px\]{width:360px}.w-\[80px\]{width:80px}.w-auto{width:auto}.w-full{width:100%}.min-w-12{min-width:3rem}.min-w-16{min-width:4rem}.min-w-\[200px\]{min-width:200px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-\[350px\]{max-width:350px}.max-w-\[500px\]{max-width:500px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes low-bounce{0%,to{transform:translateY(-3%);animation-timing-function:cubicBezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubicBezier(0,0,.2,1)}}.animate-low-bounce{animation:low-bounce .8s ease-in-out infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.scroll-m-20{scroll-margin:5rem}.grid-flow-row{grid-auto-flow:row}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.content-baseline{align-content:baseline}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/80{background-color:#000c}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-800{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity))}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-800{--tw-bg-opacity: 1;background-color:rgb(107 33 168 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.bg-red-800{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-zinc-400{--tw-bg-opacity: 1;background-color:rgb(161 161 170 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-\[url\(\'\/assets\/background-nologo\.jpg\'\)\]{background-image:url(/assets/background-nologo.jpg)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-10\%{--tw-gradient-from-position: 10%}.via-sky-500{--tw-gradient-to: rgb(14 165 233 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0ea5e9 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-30\%{--tw-gradient-via-position: 30%}.to-emerald-500{--tw-gradient-to: #10b981 var(--tw-gradient-to-position)}.to-90\%{--tw-gradient-to-position: 90%}.fill-current{fill:currentColor}.fill-none{fill:none}.fill-pink-600{fill:#db2777}.fill-slate-400{fill:#94a3b8}.fill-teal-600{fill:#0d9488}.stroke-current{stroke:currentColor}.stroke-pink-600{stroke:#db2777}.stroke-primary{stroke:hsl(var(--primary))}.stroke-slate-400{stroke:#94a3b8}.stroke-teal-600{stroke:#0d9488}.stroke-white{stroke:#fff}.stroke-2{stroke-width:2}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-12{padding-left:3rem}.pl-8{padding-left:2rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-24{padding-top:6rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.align-text-top{vertical-align:text-top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-gray-300{--tw-shadow-color: #d1d5db;--tw-shadow: var(--tw-shadow-colored)}.shadow-slate-800\/40{--tw-shadow-color: rgb(30 41 59 / .4);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.animate-out{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.fade-in-80{--tw-enter-opacity: .8}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.first\:mt-0:first-child{margin-top:0}.hover\:border:hover{border-width:1px}.hover\:border-none:hover{border-style:none}.hover\:border-gray-200:hover{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.hover\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.hover\:bg-transparent:hover{background-color:transparent}.hover\:stroke-blue-300:hover{stroke:#93c5fd}.hover\:stroke-blue-400:hover{stroke:#60a5fa}.hover\:stroke-primary:hover{stroke:hsl(var(--primary))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/card:hover .group-hover\/card\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.group\/card:hover .group-hover\/card\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.group\/card:hover .group-hover\/card\:bg-green-800{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.group\/card:hover .group-hover\/card\:bg-primary{background-color:hsl(var(--primary))}.group\/side:hover .group-hover\/side\:stroke-blue-900{stroke:#1e3a8a}.group\/header:hover .group-hover\/header\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-disabled\:cursor-not-allowed[aria-disabled=true]{cursor:not-allowed}.aria-disabled\:bg-gray-600[aria-disabled=true]{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}:is(.dark .dark\:-rotate-90){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:rotate-0){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:scale-0){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:scale-100){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:border-none){border-style:none}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-600){--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity))}:is(.dark .dark\:border-primary){border-color:hsl(var(--primary))}:is(.dark .dark\:bg-background){background-color:hsl(var(--background))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-950){--tw-bg-opacity: 1;background-color:rgb(5 46 22 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-800){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-transparent){background-color:transparent}:is(.dark .dark\:bg-zinc-700\/10){background-color:#3f3f461a}:is(.dark .dark\:bg-zinc-800){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-600){--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:hsl(var(--primary))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-gray-800){--tw-shadow-color: #1f2937;--tw-shadow: var(--tw-shadow-colored)}:is(.dark .hover\:dark\:border-primary):hover{border-color:hsl(var(--primary))}:is(.dark .dark\:hover\:bg-slate-800:hover){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-zinc-700\/20:hover){background-color:#3f3f4633}:is(.dark .dark\:hover\:bg-zinc-700\/40:hover){background-color:#3f3f4666}:is(.dark .hover\:dark\:bg-gray-700):hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:data-\[state\=checked\]\:bg-gray-700[data-state=checked]){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:data-\[state\=checked\]\:bg-slate-800[data-state=checked]){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:block{display:block}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:gap-32{gap:8rem}}@media (min-width: 1024px){.lg\:visible{visibility:visible}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:w-3\/12{width:25%}.lg\:w-96{width:24rem}.lg\:w-\[250px\]{width:250px}.lg\:flex-row{flex-direction:row}.lg\:overflow-y-auto{overflow-y:auto}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}}@media (min-width: 1280px){.xl\:table-cell{display:table-cell}}@media (min-width: 1400px){.\32xl\:table-cell{display:table-cell}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:invisible svg{visibility:hidden}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}
diff --git a/frontend/dist/assets/index-IouAf6f-.js b/frontend/dist/assets/index-IouAf6f-.js
new file mode 100644
index 000000000..1e8f86c13
--- /dev/null
+++ b/frontend/dist/assets/index-IouAf6f-.js
@@ -0,0 +1,185 @@
+function m0(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(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 r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var KS={exports:{}},Pf={},GS={exports:{}},et={};/**
+ * @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 zc=Symbol.for("react.element"),Nk=Symbol.for("react.portal"),kk=Symbol.for("react.fragment"),Dk=Symbol.for("react.strict_mode"),jk=Symbol.for("react.profiler"),Mk=Symbol.for("react.provider"),Tk=Symbol.for("react.context"),Ik=Symbol.for("react.forward_ref"),Ok=Symbol.for("react.suspense"),Lk=Symbol.for("react.memo"),Ak=Symbol.for("react.lazy"),Zy=Symbol.iterator;function Fk(e){return e===null||typeof e!="object"?null:(e=Zy&&e[Zy]||e["@@iterator"],typeof e=="function"?e:null)}var qS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YS=Object.assign,XS={};function Ja(e,t,n){this.props=e,this.context=t,this.refs=XS,this.updater=n||qS}Ja.prototype.isReactComponent={};Ja.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")};Ja.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QS(){}QS.prototype=Ja.prototype;function v0(e,t,n){this.props=e,this.context=t,this.refs=XS,this.updater=n||qS}var x0=v0.prototype=new QS;x0.constructor=v0;YS(x0,Ja.prototype);x0.isPureReactComponent=!0;var ew=Array.isArray,JS=Object.prototype.hasOwnProperty,y0={current:null},ZS={key:!0,ref:!0,__self:!0,__source:!0};function e2(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)JS.call(t,r)&&!ZS.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(c===1)o.children=n;else if(1>>1,oe=U[H];if(0>>1;Ho(Se,L))meo(pe,Se)?(U[H]=pe,U[me]=L,H=me):(U[H]=Se,U[fe]=L,H=fe);else if(meo(pe,L))U[H]=pe,U[me]=L,H=me;else break e}}return B}function o(U,B){var L=U.sortIndex-B.sortIndex;return L!==0?L:U.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],f=[],h=1,m=null,v=3,x=!1,w=!1,b=!1,P=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(U){for(var B=n(f);B!==null;){if(B.callback===null)r(f);else if(B.startTime<=U)r(f),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(f)}}function _(U){if(b=!1,E(U),!w)if(n(u)!==null)w=!0,W(D);else{var B=n(f);B!==null&&Y(_,B.startTime-U)}}function D(U,B){w=!1,b&&(b=!1,C(O),O=-1),x=!0;var L=v;try{for(E(B),m=n(u);m!==null&&(!(m.expirationTime>B)||U&&!ie());){var H=m.callback;if(typeof H=="function"){m.callback=null,v=m.priorityLevel;var oe=H(m.expirationTime<=B);B=e.unstable_now(),typeof oe=="function"?m.callback=oe:m===n(u)&&r(u),E(B)}else r(u);m=n(u)}if(m!==null)var ne=!0;else{var fe=n(f);fe!==null&&Y(_,fe.startTime-B),ne=!1}return ne}finally{m=null,v=L,x=!1}}var N=!1,j=null,O=-1,V=5,J=-1;function ie(){return!(e.unstable_now()-JU||125H?(U.sortIndex=L,t(f,U),n(u)===null&&U===n(f)&&(b?(C(O),O=-1):b=!0,Y(_,L-H))):(U.sortIndex=oe,t(u,U),w||x||(w=!0,W(D))),U},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(U){var B=v;return function(){var L=v;v=B;try{return U.apply(this,arguments)}finally{v=L}}}})(o2);r2.exports=o2;var Xk=r2.exports;/**
+ * @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 i2=p,sr=Xk;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ig=Object.prototype.hasOwnProperty,Qk=/^[: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]*$/,nw={},rw={};function Jk(e){return Ig.call(rw,e)?!0:Ig.call(nw,e)?!1:Qk.test(e)?rw[e]=!0:(nw[e]=!0,!1)}function Zk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function e8(e,t,n,r){if(t===null||typeof t>"u"||Zk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 kn(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var an={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){an[e]=new kn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];an[t]=new kn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){an[e]=new kn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){an[e]=new kn(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){an[e]=new kn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){an[e]=new kn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){an[e]=new kn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){an[e]=new kn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){an[e]=new kn(e,5,!1,e.toLowerCase(),null,!1,!1)});var S0=/[\-:]([a-z])/g;function C0(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(S0,C0);an[t]=new kn(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(S0,C0);an[t]=new kn(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(S0,C0);an[t]=new kn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){an[e]=new kn(e,1,!1,e.toLowerCase(),null,!1,!1)});an.xlinkHref=new kn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){an[e]=new kn(e,1,!1,e.toLowerCase(),null,!0,!0)});function $0(e,t,n,r){var o=an.hasOwnProperty(t)?an[t]:null;(o!==null?o.type!==0:r||!(2c||o[a]!==i[c]){var u=`
+`+o[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=c);break}}}finally{Ih=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gl(e):""}function t8(e){switch(e.tag){case 5:return Gl(e.type);case 16:return Gl("Lazy");case 13:return Gl("Suspense");case 19:return Gl("SuspenseList");case 0:case 2:case 15:return e=Oh(e.type,!1),e;case 11:return e=Oh(e.type.render,!1),e;case 1:return e=Oh(e.type,!0),e;default:return""}}function Fg(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 fa:return"Fragment";case da:return"Portal";case Og:return"Profiler";case P0:return"StrictMode";case Lg:return"Suspense";case Ag:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case l2:return(e.displayName||"Context")+".Consumer";case a2:return(e._context.displayName||"Context")+".Provider";case E0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R0:return t=e.displayName||null,t!==null?t:Fg(e.type)||"Memo";case vi:t=e._payload,e=e._init;try{return Fg(e(t))}catch{}}return null}function n8(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 Fg(t);case 8:return t===P0?"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 Mi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function u2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function r8(e){var t=u2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hu(e){e._valueTracker||(e._valueTracker=r8(e))}function d2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Id(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 zg(e,t){var n=t.checked;return Rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function iw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function f2(e,t){t=t.checked,t!=null&&$0(e,"checked",t,!1)}function Ug(e,t){f2(e,t);var n=Mi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bg(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bg(e,t.type,Mi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Bg(e,t,n){(t!=="number"||Id(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ql=Array.isArray;function Ra(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Wu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ql={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},o8=["Webkit","ms","Moz","O"];Object.keys(Ql).forEach(function(e){o8.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ql[t]=Ql[e]})});function m2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ql.hasOwnProperty(e)&&Ql[e]?(""+t).trim():t+"px"}function v2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=m2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var i8=Rt({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 Wg(e,t){if(t){if(i8[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function Kg(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 Gg=null;function _0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qg=null,_a=null,Na=null;function cw(e){if(e=Vc(e)){if(typeof qg!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=kf(t),qg(e.stateNode,e.type,t))}}function x2(e){_a?Na?Na.push(e):Na=[e]:_a=e}function y2(){if(_a){var e=_a,t=Na;if(Na=_a=null,cw(e),t)for(e=0;e>>=0,e===0?32:31-(m8(e)/v8|0)|0}var Ku=64,Gu=4194304;function Yl(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 Fd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~o;c!==0?r=Yl(c):(i&=a,i!==0&&(r=Yl(i)))}else a=n&~o,a!==0?r=Yl(a):i!==0&&(r=Yl(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Uc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hr(t),e[t]=n}function b8(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=Zl),xw=" ",yw=!1;function F2(e,t){switch(e){case"keyup":return Y8.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function Q8(e,t){switch(e){case"compositionend":return z2(t);case"keypress":return t.which!==32?null:(yw=!0,xw);case"textInput":return e=t.data,e===xw&&yw?null:e;default:return null}}function J8(e,t){if(pa)return e==="compositionend"||!O0&&F2(e,t)?(e=L2(),Pd=M0=bi=null,pa=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cw(n)}}function H2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W2(){for(var e=window,t=Id();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Id(e.document)}return t}function L0(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 aD(e){var t=W2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&H2(n.ownerDocument.documentElement,n)){if(r!==null&&L0(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=$w(n,i);var a=$w(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ha=null,em=null,tc=null,tm=!1;function Pw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tm||ha==null||ha!==Id(r)||(r=ha,"selectionStart"in r&&L0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),tc&&yc(tc,r)||(tc=r,r=Bd(em,"onSelect"),0va||(e.current=am[va],am[va]=null,va--)}function mt(e,t){va++,am[va]=e.current,e.current=t}var Ti={},vn=Ui(Ti),Bn=Ui(!1),vs=Ti;function La(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Vn(e){return e=e.childContextTypes,e!=null}function Hd(){bt(Bn),bt(vn)}function jw(e,t,n){if(vn.current!==Ti)throw Error(ae(168));mt(vn,t),mt(Bn,n)}function eC(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ae(108,n8(e)||"Unknown",o));return Rt({},n,r)}function Wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,vs=vn.current,mt(vn,e),mt(Bn,Bn.current),!0}function Mw(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=eC(e,t,vs),r.__reactInternalMemoizedMergedChildContext=e,bt(Bn),bt(vn),mt(vn,e)):bt(Bn),mt(Bn,n)}var Do=null,Df=!1,Xh=!1;function tC(e){Do===null?Do=[e]:Do.push(e)}function yD(e){Df=!0,tC(e)}function Bi(){if(!Xh&&Do!==null){Xh=!0;var e=0,t=ut;try{var n=Do;for(ut=1;e>=a,o-=a,jo=1<<32-Hr(t)+o|n<O?(V=j,j=null):V=j.sibling;var J=v(C,j,E[O],_);if(J===null){j===null&&(j=V);break}e&&j&&J.alternate===null&&t(C,j),S=i(J,S,O),N===null?D=J:N.sibling=J,N=J,j=V}if(O===E.length)return n(C,j),Ct&&os(C,O),D;if(j===null){for(;OO?(V=j,j=null):V=j.sibling;var ie=v(C,j,J.value,_);if(ie===null){j===null&&(j=V);break}e&&j&&ie.alternate===null&&t(C,j),S=i(ie,S,O),N===null?D=ie:N.sibling=ie,N=ie,j=V}if(J.done)return n(C,j),Ct&&os(C,O),D;if(j===null){for(;!J.done;O++,J=E.next())J=m(C,J.value,_),J!==null&&(S=i(J,S,O),N===null?D=J:N.sibling=J,N=J);return Ct&&os(C,O),D}for(j=r(C,j);!J.done;O++,J=E.next())J=x(j,C,O,J.value,_),J!==null&&(e&&J.alternate!==null&&j.delete(J.key===null?O:J.key),S=i(J,S,O),N===null?D=J:N.sibling=J,N=J);return e&&j.forEach(function(te){return t(C,te)}),Ct&&os(C,O),D}function P(C,S,E,_){if(typeof E=="object"&&E!==null&&E.type===fa&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Vu:e:{for(var D=E.key,N=S;N!==null;){if(N.key===D){if(D=E.type,D===fa){if(N.tag===7){n(C,N.sibling),S=o(N,E.props.children),S.return=C,C=S;break e}}else if(N.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===vi&&zw(D)===N.type){n(C,N.sibling),S=o(N,E.props),S.ref=Il(C,N,E),S.return=C,C=S;break e}n(C,N);break}else t(C,N);N=N.sibling}E.type===fa?(S=gs(E.props.children,C.mode,_,E.key),S.return=C,C=S):(_=Md(E.type,E.key,E.props,null,C.mode,_),_.ref=Il(C,S,E),_.return=C,C=_)}return a(C);case da:e:{for(N=E.key;S!==null;){if(S.key===N)if(S.tag===4&&S.stateNode.containerInfo===E.containerInfo&&S.stateNode.implementation===E.implementation){n(C,S.sibling),S=o(S,E.children||[]),S.return=C,C=S;break e}else{n(C,S);break}else t(C,S);S=S.sibling}S=og(E,C.mode,_),S.return=C,C=S}return a(C);case vi:return N=E._init,P(C,S,N(E._payload),_)}if(ql(E))return w(C,S,E,_);if(kl(E))return b(C,S,E,_);ed(C,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,S!==null&&S.tag===6?(n(C,S.sibling),S=o(S,E),S.return=C,C=S):(n(C,S),S=rg(E,C.mode,_),S.return=C,C=S),a(C)):n(C,S)}return P}var Fa=cC(!0),uC=cC(!1),Hc={},lo=Ui(Hc),Cc=Ui(Hc),$c=Ui(Hc);function cs(e){if(e===Hc)throw Error(ae(174));return e}function K0(e,t){switch(mt($c,t),mt(Cc,e),mt(lo,Hc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hg(t,e)}bt(lo),mt(lo,t)}function za(){bt(lo),bt(Cc),bt($c)}function dC(e){cs($c.current);var t=cs(lo.current),n=Hg(t,e.type);t!==n&&(mt(Cc,e),mt(lo,n))}function G0(e){Cc.current===e&&(bt(lo),bt(Cc))}var Pt=Ui(0);function Qd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Qh=[];function q0(){for(var e=0;en?n:4,e(!0);var r=Jh.transition;Jh.transition={};try{e(!1),t()}finally{ut=n,Jh.transition=r}}function RC(){return Rr().memoizedState}function CD(e,t,n){var r=Di(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_C(e))NC(t,n);else if(n=iC(e,t,n,r),n!==null){var o=En();Wr(n,e,r,o),kC(n,t,r)}}function $D(e,t,n){var r=Di(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_C(e))NC(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,c=i(a,n);if(o.hasEagerState=!0,o.eagerState=c,qr(c,a)){var u=t.interleaved;u===null?(o.next=o,H0(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=iC(e,t,o,r),n!==null&&(o=En(),Wr(n,e,r,o),kC(n,t,r))}}function _C(e){var t=e.alternate;return e===Et||t!==null&&t===Et}function NC(e,t){nc=Jd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kC(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,k0(e,n)}}var Zd={readContext:Er,useCallback:dn,useContext:dn,useEffect:dn,useImperativeHandle:dn,useInsertionEffect:dn,useLayoutEffect:dn,useMemo:dn,useReducer:dn,useRef:dn,useState:dn,useDebugValue:dn,useDeferredValue:dn,useTransition:dn,useMutableSource:dn,useSyncExternalStore:dn,useId:dn,unstable_isNewReconciler:!1},PD={readContext:Er,useCallback:function(e,t){return ro().memoizedState=[e,t===void 0?null:t],e},useContext:Er,useEffect:Bw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nd(4194308,4,SC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nd(4,2,e,t)},useMemo:function(e,t){var n=ro();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ro();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=CD.bind(null,Et,e),[r.memoizedState,e]},useRef:function(e){var t=ro();return e={current:e},t.memoizedState=e},useState:Uw,useDebugValue:Z0,useDeferredValue:function(e){return ro().memoizedState=e},useTransition:function(){var e=Uw(!1),t=e[0];return e=SD.bind(null,e[1]),ro().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Et,o=ro();if(Ct){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),en===null)throw Error(ae(349));ys&30||hC(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Bw(mC.bind(null,r,i,e),[e]),r.flags|=2048,Rc(9,gC.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ro(),t=en.identifierPrefix;if(Ct){var n=Mo,r=jo;n=(r&~(1<<32-Hr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[io]=t,e[Sc]=r,FC(e,t,!1,!1),t.stateNode=e;e:{switch(a=Kg(n,r),n){case"dialog":wt("cancel",e),wt("close",e),o=r;break;case"iframe":case"object":case"embed":wt("load",e),o=r;break;case"video":case"audio":for(o=0;oBa&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qd(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ct)return fn(t),null}else 2*Lt()-i.renderingStartTime>Ba&&n!==1073741824&&(t.flags|=128,r=!0,Ol(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Lt(),t.sibling=null,n=Pt.current,mt(Pt,r?n&1|2:n&1),t):(fn(t),null);case 22:case 23:return iv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zn&1073741824&&(fn(t),t.subtreeFlags&6&&(t.flags|=8192)):fn(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function MD(e,t){switch(F0(t),t.tag){case 1:return Vn(t.type)&&Hd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return za(),bt(Bn),bt(vn),q0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return G0(t),null;case 13:if(bt(Pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));Aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return bt(Pt),null;case 4:return za(),null;case 10:return V0(t.type._context),null;case 22:case 23:return iv(),null;case 24:return null;default:return null}}var nd=!1,gn=!1,TD=typeof WeakSet=="function"?WeakSet:Set,xe=null;function ba(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Dt(e,t,r)}else n.current=null}function ym(e,t,n){try{n()}catch(r){Dt(e,t,r)}}var Qw=!1;function ID(e,t){if(nm=zd,e=W2(),L0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,c=-1,u=-1,f=0,h=0,m=e,v=null;t:for(;;){for(var x;m!==n||o!==0&&m.nodeType!==3||(c=a+o),m!==i||r!==0&&m.nodeType!==3||(u=a+r),m.nodeType===3&&(a+=m.nodeValue.length),(x=m.firstChild)!==null;)v=m,m=x;for(;;){if(m===e)break t;if(v===n&&++f===o&&(c=a),v===i&&++h===r&&(u=a),(x=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=x}n=c===-1||u===-1?null:{start:c,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(rm={focusedElem:e,selectionRange:n},zd=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var b=w.memoizedProps,P=w.memoizedState,C=t.stateNode,S=C.getSnapshotBeforeUpdate(t.elementType===t.type?b:zr(t.type,b),P);C.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(_){Dt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return w=Qw,Qw=!1,w}function rc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ym(t,n,i)}o=o.next}while(o!==r)}}function Tf(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function BC(e){var t=e.alternate;t!==null&&(e.alternate=null,BC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[io],delete t[Sc],delete t[sm],delete t[vD],delete t[xD])),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 VC(e){return e.tag===5||e.tag===3||e.tag===4}function Jw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||VC(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 bm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vd));else if(r!==4&&(e=e.child,e!==null))for(bm(e,t,n),e=e.sibling;e!==null;)bm(e,t,n),e=e.sibling}function Sm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Sm(e,t,n),e=e.sibling;e!==null;)Sm(e,t,n),e=e.sibling}var on=null,Ur=!1;function fi(e,t,n){for(n=n.child;n!==null;)HC(e,t,n),n=n.sibling}function HC(e,t,n){if(ao&&typeof ao.onCommitFiberUnmount=="function")try{ao.onCommitFiberUnmount(Ef,n)}catch{}switch(n.tag){case 5:gn||ba(n,t);case 6:var r=on,o=Ur;on=null,fi(e,t,n),on=r,Ur=o,on!==null&&(Ur?(e=on,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):on.removeChild(n.stateNode));break;case 18:on!==null&&(Ur?(e=on,n=n.stateNode,e.nodeType===8?Yh(e.parentNode,n):e.nodeType===1&&Yh(e,n),vc(e)):Yh(on,n.stateNode));break;case 4:r=on,o=Ur,on=n.stateNode.containerInfo,Ur=!0,fi(e,t,n),on=r,Ur=o;break;case 0:case 11:case 14:case 15:if(!gn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ym(n,t,a),o=o.next}while(o!==r)}fi(e,t,n);break;case 1:if(!gn&&(ba(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Dt(n,t,c)}fi(e,t,n);break;case 21:fi(e,t,n);break;case 22:n.mode&1?(gn=(r=gn)||n.memoizedState!==null,fi(e,t,n),gn=r):fi(e,t,n);break;default:fi(e,t,n)}}function Zw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TD),t.forEach(function(r){var o=HD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ar(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=Lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*LD(r/1960))-r,10e?16:e,Si===null)var r=!1;else{if(e=Si,Si=null,nf=0,rt&6)throw Error(ae(331));var o=rt;for(rt|=4,xe=e.current;xe!==null;){var i=xe,a=i.child;if(xe.flags&16){var c=i.deletions;if(c!==null){for(var u=0;uLt()-rv?hs(e,0):nv|=n),Hn(e,t)}function JC(e,t){t===0&&(e.mode&1?(t=Gu,Gu<<=1,!(Gu&130023424)&&(Gu=4194304)):t=1);var n=En();e=Uo(e,t),e!==null&&(Uc(e,t,n),Hn(e,n))}function VD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),JC(e,n)}function HD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),JC(e,n)}var ZC;ZC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bn.current)zn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zn=!1,DD(e,t,n);zn=!!(e.flags&131072)}else zn=!1,Ct&&t.flags&1048576&&nC(t,Gd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kd(e,t),e=t.pendingProps;var o=La(t,vn.current);Da(t,n),o=X0(null,t,r,e,o,n);var i=Q0();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,Vn(r)?(i=!0,Wd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,W0(t),o.updater=jf,t.stateNode=o,o._reactInternals=t,fm(t,r,e,n),t=gm(null,t,r,!0,i,n)):(t.tag=0,Ct&&i&&A0(t),Pn(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=KD(r),e=zr(r,e),o){case 0:t=hm(null,t,r,e,n);break e;case 1:t=qw(null,t,r,e,n);break e;case 11:t=Kw(null,t,r,e,n);break e;case 14:t=Gw(null,t,r,zr(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zr(r,o),hm(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zr(r,o),qw(e,t,r,o,n);case 3:e:{if(OC(t),e===null)throw Error(ae(387));r=t.pendingProps,i=t.memoizedState,o=i.element,sC(e,t),Xd(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ua(Error(ae(423)),t),t=Yw(e,t,r,n,o);break e}else if(r!==o){o=Ua(Error(ae(424)),t),t=Yw(e,t,r,n,o);break e}else for(nr=_i(t.stateNode.containerInfo.firstChild),rr=t,Ct=!0,Vr=null,n=uC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Aa(),r===o){t=Bo(e,t,n);break e}Pn(e,t,r,n)}t=t.child}return t;case 5:return dC(t),e===null&&cm(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,om(r,o)?a=null:i!==null&&om(r,i)&&(t.flags|=32),IC(e,t),Pn(e,t,a,n),t.child;case 6:return e===null&&cm(t),null;case 13:return LC(e,t,n);case 4:return K0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):Pn(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zr(r,o),Kw(e,t,r,o,n);case 7:return Pn(e,t,t.pendingProps,n),t.child;case 8:return Pn(e,t,t.pendingProps.children,n),t.child;case 12:return Pn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,mt(qd,r._currentValue),r._currentValue=a,i!==null)if(qr(i.value,a)){if(i.children===o.children&&!Bn.current){t=Bo(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){a=i.child;for(var u=c.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=To(-1,n&-n),u.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),um(i.return,n,t),c.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ae(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),um(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Pn(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Da(t,n),o=Er(o),r=r(o),t.flags|=1,Pn(e,t,r,n),t.child;case 14:return r=t.type,o=zr(r,t.pendingProps),o=zr(r.type,o),Gw(e,t,r,o,n);case 15:return MC(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:zr(r,o),kd(e,t),t.tag=1,Vn(r)?(e=!0,Wd(t)):e=!1,Da(t,n),lC(t,r,o),fm(t,r,o,n),gm(null,t,r,!0,e,n);case 19:return AC(e,t,n);case 22:return TC(e,t,n)}throw Error(ae(156,t.tag))};function e$(e,t){return E2(e,t)}function WD(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(e,t,n,r){return new WD(e,t,n,r)}function av(e){return e=e.prototype,!(!e||!e.isReactComponent)}function KD(e){if(typeof e=="function")return av(e)?1:0;if(e!=null){if(e=e.$$typeof,e===E0)return 11;if(e===R0)return 14}return 2}function ji(e,t){var n=e.alternate;return n===null?(n=$r(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Md(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")av(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case fa:return gs(n.children,o,i,t);case P0:a=8,o|=8;break;case Og:return e=$r(12,n,t,o|2),e.elementType=Og,e.lanes=i,e;case Lg:return e=$r(13,n,t,o),e.elementType=Lg,e.lanes=i,e;case Ag:return e=$r(19,n,t,o),e.elementType=Ag,e.lanes=i,e;case c2:return Of(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case a2:a=10;break e;case l2:a=9;break e;case E0:a=11;break e;case R0:a=14;break e;case vi:a=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=$r(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function gs(e,t,n,r){return e=$r(7,e,r,t),e.lanes=n,e}function Of(e,t,n,r){return e=$r(22,e,r,t),e.elementType=c2,e.lanes=n,e.stateNode={isHidden:!1},e}function rg(e,t,n){return e=$r(6,e,null,t),e.lanes=n,e}function og(e,t,n){return t=$r(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GD(e,t,n,r,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=Ah(0),this.expirationTimes=Ah(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ah(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function lv(e,t,n,r,o,i,a,c,u){return e=new GD(e,t,n,c,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$r(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},W0(i),e}function qD(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o$)}catch(e){console.error(e)}}o$(),n2.exports=lr;var po=n2.exports;const Uf=Qa(po),ZD=m0({__proto__:null,default:Uf},[po]);var ab=po;Tg.createRoot=ab.createRoot,Tg.hydrateRoot=ab.hydrateRoot;/**
+ * @remix-run/router v1.15.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function jt(){return jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ss(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tj(){return Math.random().toString(36).substr(2,8)}function cb(e,t){return{usr:e.state,key:e.key,idx:t}}function Nc(e,t,n,r){return n===void 0&&(n=null),jt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?qo(t):t,{state:n,key:t&&t.key||r||tj()})}function Cs(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function qo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function nj(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,c=Ot.Pop,u=null,f=h();f==null&&(f=0,a.replaceState(jt({},a.state,{idx:f}),""));function h(){return(a.state||{idx:null}).idx}function m(){c=Ot.Pop;let P=h(),C=P==null?null:P-f;f=P,u&&u({action:c,location:b.location,delta:C})}function v(P,C){c=Ot.Push;let S=Nc(b.location,P,C);n&&n(S,P),f=h()+1;let E=cb(S,f),_=b.createHref(S);try{a.pushState(E,"",_)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;o.location.assign(_)}i&&u&&u({action:c,location:b.location,delta:1})}function x(P,C){c=Ot.Replace;let S=Nc(b.location,P,C);n&&n(S,P),f=h();let E=cb(S,f),_=b.createHref(S);a.replaceState(E,"",_),i&&u&&u({action:c,location:b.location,delta:0})}function w(P){let C=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof P=="string"?P:Cs(P);return Ge(C,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,C)}let b={get action(){return c},get location(){return e(o,a)},listen(P){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(lb,m),u=P,()=>{o.removeEventListener(lb,m),u=null}},createHref(P){return t(o,P)},createURL:w,encodeLocation(P){let C=w(P);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:x,go(P){return a.go(P)}};return b}var kt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kt||(kt={}));const rj=new Set(["lazy","caseSensitive","path","id","index","children"]);function oj(e){return e.index===!0}function Rm(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let a=[...n,i],c=typeof o.id=="string"?o.id:a.join("-");if(Ge(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ge(!r[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),oj(o)){let u=jt({},o,t(o),{id:c});return r[c]=u,u}else{let u=jt({},o,t(o),{id:c,children:void 0});return r[c]=u,o.children&&(u.children=Rm(o.children,t,a,r)),u}})}function Ca(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?qo(t):t,o=Yr(r.pathname||"/",n);if(o==null)return null;let i=i$(e);sj(i);let a=null;for(let c=0;a==null&&c{let u={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(Ge(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let f=Io([r,u.relativePath]),h=n.concat(u);i.children&&i.children.length>0&&(Ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),i$(i.children,t,h,f)),!(i.path==null&&!i.index)&&t.push({path:f,score:pj(f,i.index),routesMeta:h})};return e.forEach((i,a)=>{var c;if(i.path===""||!((c=i.path)!=null&&c.includes("?")))o(i,a);else for(let u of s$(i.path))o(i,a,u)}),t}function s$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=s$(r.join("/")),c=[];return c.push(...a.map(u=>u===""?i:[i,u].join("/"))),o&&c.push(...a),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function sj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hj(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aj=/^:[\w-]+$/,lj=3,cj=2,uj=1,dj=10,fj=-2,ub=e=>e==="*";function pj(e,t){let n=e.split("/"),r=n.length;return n.some(ub)&&(r+=fj),t&&(r+=cj),n.filter(o=>!ub(o)).reduce((o,i)=>o+(aj.test(i)?lj:i===""?uj:dj),r)}function hj(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function gj(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{let{paramName:v,isOptional:x}=h;if(v==="*"){let b=c[m]||"";a=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const w=c[m];return x&&!w?f[v]=void 0:f[v]=xj(w||"",v),f},{}),pathname:i,pathnameBase:a,pattern:e}}function mj(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ss(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,u)=>(r.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function vj(e){try{return decodeURI(e)}catch(t){return Ss(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xj(e,t){try{return decodeURIComponent(e)}catch(n){return Ss(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Yr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function yj(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?qo(e):e;return{pathname:n?n.startsWith("/")?n:wj(n,t):t,search:Sj(r),hash:Cj(o)}}function wj(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function ig(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function a$(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fv(e,t){let n=a$(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function pv(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=qo(e):(o=jt({},e),Ge(!o.pathname||!o.pathname.includes("?"),ig("?","pathname","search",o)),Ge(!o.pathname||!o.pathname.includes("#"),ig("#","pathname","hash",o)),Ge(!o.search||!o.search.includes("#"),ig("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,c;if(a==null)c=n;else{let m=t.length-1;if(!r&&a.startsWith("..")){let v=a.split("/");for(;v[0]==="..";)v.shift(),m-=1;o.pathname=v.join("/")}c=m>=0?t[m]:"/"}let u=yj(o,c),f=a&&a!=="/"&&a.endsWith("/"),h=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}const Io=e=>e.join("/").replace(/\/\/+/g,"/"),bj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Sj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class hv{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function gv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const l$=["post","put","patch","delete"],$j=new Set(l$),Pj=["get",...l$],Ej=new Set(Pj),Rj=new Set([301,302,303,307,308]),_j=new Set([307,308]),sg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nj={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ca={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},c$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kj=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),u$="remix-router-transitions";function Dj(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ge(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let z=e.detectErrorBoundary;o=K=>({hasErrorBoundary:z(K)})}else o=kj;let i={},a=Rm(e.routes,o,void 0,i),c,u=e.basename||"/",f=jt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),h=null,m=new Set,v=null,x=null,w=null,b=e.hydrationData!=null,P=Ca(a,e.history.location,u),C=null;if(P==null){let z=br(404,{pathname:e.history.location.pathname}),{matches:K,route:Q}=xb(a);P=K,C={[Q.id]:z}}let S,E=P.some(z=>z.route.lazy),_=P.some(z=>z.route.loader);if(E)S=!1;else if(!_)S=!0;else if(f.v7_partialHydration){let z=e.hydrationData?e.hydrationData.loaderData:null,K=e.hydrationData?e.hydrationData.errors:null;S=P.every(Q=>Q.route.loader&&Q.route.loader.hydrate!==!0&&(z&&z[Q.route.id]!==void 0||K&&K[Q.route.id]!==void 0))}else S=e.hydrationData!=null;let D,N={historyAction:e.history.action,location:e.history.location,matches:P,initialized:S,navigation:sg,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},j=Ot.Pop,O=!1,V,J=!1,ie=new Map,te=null,ge=!1,le=!1,T=[],W=[],Y=new Map,U=0,B=-1,L=new Map,H=new Set,oe=new Map,ne=new Map,fe=new Set,Se=new Map,me=new Map,pe=!1;function Te(){if(h=e.history.listen(z=>{let{action:K,location:Q,delta:ue}=z;if(pe){pe=!1;return}Ss(me.size===0||ue!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=ft({currentLocation:N.location,nextLocation:Q,historyAction:K});if(ye&&ue!=null){pe=!0,e.history.go(ue*-1),nt(ye,{state:"blocked",location:Q,proceed(){nt(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:Q}),e.history.go(ue)},reset(){let Ve=new Map(N.blockers);Ve.set(ye,ca),Pe({blockers:Ve})}});return}return Qe(K,Q)}),n){Bj(t,ie);let z=()=>Vj(t,ie);t.addEventListener("pagehide",z),te=()=>t.removeEventListener("pagehide",z)}return N.initialized||Qe(Ot.Pop,N.location,{initialHydration:!0}),D}function Fe(){h&&h(),te&&te(),m.clear(),V&&V.abort(),N.fetchers.forEach((z,K)=>fr(K)),N.blockers.forEach((z,K)=>De(K))}function We(z){return m.add(z),()=>m.delete(z)}function Pe(z,K){K===void 0&&(K={}),N=jt({},N,z);let Q=[],ue=[];f.v7_fetcherPersist&&N.fetchers.forEach((ye,Ve)=>{ye.state==="idle"&&(fe.has(Ve)?ue.push(Ve):Q.push(Ve))}),[...m].forEach(ye=>ye(N,{deletedFetchers:ue,unstable_viewTransitionOpts:K.viewTransitionOpts,unstable_flushSync:K.flushSync===!0})),f.v7_fetcherPersist&&(Q.forEach(ye=>N.fetchers.delete(ye)),ue.forEach(ye=>fr(ye)))}function Me(z,K,Q){var ue,ye;let{flushSync:Ve}=Q===void 0?{}:Q,je=N.actionData!=null&&N.navigation.formMethod!=null&&Br(N.navigation.formMethod)&&N.navigation.state==="loading"&&((ue=z.state)==null?void 0:ue._isRedirect)!==!0,Ee;K.actionData?Object.keys(K.actionData).length>0?Ee=K.actionData:Ee=null:je?Ee=N.actionData:Ee=null;let be=K.loaderData?vb(N.loaderData,K.loaderData,K.matches||[],K.errors):N.loaderData,qe=N.blockers;qe.size>0&&(qe=new Map(qe),qe.forEach((dt,Bt)=>qe.set(Bt,ca)));let _t=O===!0||N.navigation.formMethod!=null&&Br(N.navigation.formMethod)&&((ye=z.state)==null?void 0:ye._isRedirect)!==!0;c&&(a=c,c=void 0),ge||j===Ot.Pop||(j===Ot.Push?e.history.push(z,z.state):j===Ot.Replace&&e.history.replace(z,z.state));let Ae;if(j===Ot.Pop){let dt=ie.get(N.location.pathname);dt&&dt.has(z.pathname)?Ae={currentLocation:N.location,nextLocation:z}:ie.has(z.pathname)&&(Ae={currentLocation:z,nextLocation:N.location})}else if(J){let dt=ie.get(N.location.pathname);dt?dt.add(z.pathname):(dt=new Set([z.pathname]),ie.set(N.location.pathname,dt)),Ae={currentLocation:N.location,nextLocation:z}}Pe(jt({},K,{actionData:Ee,loaderData:be,historyAction:j,location:z,initialized:!0,navigation:sg,revalidation:"idle",restoreScrollPosition:ul(z,K.matches||N.matches),preventScrollReset:_t,blockers:qe}),{viewTransitionOpts:Ae,flushSync:Ve===!0}),j=Ot.Pop,O=!1,J=!1,ge=!1,le=!1,T=[],W=[]}async function Mt(z,K){if(typeof z=="number"){e.history.go(z);return}let Q=Nm(N.location,N.matches,u,f.v7_prependBasename,z,f.v7_relativeSplatPath,K==null?void 0:K.fromRouteId,K==null?void 0:K.relative),{path:ue,submission:ye,error:Ve}=db(f.v7_normalizeFormMethod,!1,Q,K),je=N.location,Ee=Nc(N.location,ue,K&&K.state);Ee=jt({},Ee,e.history.encodeLocation(Ee));let be=K&&K.replace!=null?K.replace:void 0,qe=Ot.Push;be===!0?qe=Ot.Replace:be===!1||ye!=null&&Br(ye.formMethod)&&ye.formAction===N.location.pathname+N.location.search&&(qe=Ot.Replace);let _t=K&&"preventScrollReset"in K?K.preventScrollReset===!0:void 0,Ae=(K&&K.unstable_flushSync)===!0,dt=ft({currentLocation:je,nextLocation:Ee,historyAction:qe});if(dt){nt(dt,{state:"blocked",location:Ee,proceed(){nt(dt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),Mt(z,K)},reset(){let Bt=new Map(N.blockers);Bt.set(dt,ca),Pe({blockers:Bt})}});return}return await Qe(qe,Ee,{submission:ye,pendingError:Ve,preventScrollReset:_t,replace:K&&K.replace,enableViewTransition:K&&K.unstable_viewTransition,flushSync:Ae})}function lt(){if(xn(),Pe({revalidation:"loading"}),N.navigation.state!=="submitting"){if(N.navigation.state==="idle"){Qe(N.historyAction,N.location,{startUninterruptedRevalidation:!0});return}Qe(j||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation})}}async function Qe(z,K,Q){V&&V.abort(),V=null,j=z,ge=(Q&&Q.startUninterruptedRevalidation)===!0,cl(N.location,N.matches),O=(Q&&Q.preventScrollReset)===!0,J=(Q&&Q.enableViewTransition)===!0;let ue=c||a,ye=Q&&Q.overrideNavigation,Ve=Ca(ue,K,u),je=(Q&&Q.flushSync)===!0;if(!Ve){let Bt=br(404,{pathname:K.pathname}),{matches:Mn,route:At}=xb(ue);Xt(),Me(K,{matches:Mn,loaderData:{},errors:{[At.id]:Bt}},{flushSync:je});return}if(N.initialized&&!le&&Oj(N.location,K)&&!(Q&&Q.submission&&Br(Q.submission.formMethod))){Me(K,{matches:Ve},{flushSync:je});return}V=new AbortController;let Ee=Fl(e.history,K,V.signal,Q&&Q.submission),be,qe;if(Q&&Q.pendingError)qe={[sc(Ve).route.id]:Q.pendingError};else if(Q&&Q.submission&&Br(Q.submission.formMethod)){let Bt=await tn(Ee,K,Q.submission,Ve,{replace:Q.replace,flushSync:je});if(Bt.shortCircuited)return;be=Bt.pendingActionData,qe=Bt.pendingActionError,ye=ag(K,Q.submission),je=!1,Ee=new Request(Ee.url,{signal:Ee.signal})}let{shortCircuited:_t,loaderData:Ae,errors:dt}=await Ut(Ee,K,Ve,ye,Q&&Q.submission,Q&&Q.fetcherSubmission,Q&&Q.replace,Q&&Q.initialHydration===!0,je,be,qe);_t||(V=null,Me(K,jt({matches:Ve},be?{actionData:be}:{},{loaderData:Ae,errors:dt})))}async function tn(z,K,Q,ue,ye){ye===void 0&&(ye={}),xn();let Ve=zj(K,Q);Pe({navigation:Ve},{flushSync:ye.flushSync===!0});let je,Ee=Dm(ue,K);if(!Ee.route.action&&!Ee.route.lazy)je={type:kt.error,error:br(405,{method:z.method,pathname:K.pathname,routeId:Ee.route.id})};else if(je=await Al("action",z,Ee,ue,i,o,u,f.v7_relativeSplatPath),z.signal.aborted)return{shortCircuited:!0};if(ds(je)){let be;return ye&&ye.replace!=null?be=ye.replace:be=je.location===N.location.pathname+N.location.search,await vt(N,je,{submission:Q,replace:be}),{shortCircuited:!0}}if($a(je)){let be=sc(ue,Ee.route.id);return(ye&&ye.replace)!==!0&&(j=Ot.Push),{pendingActionData:{},pendingActionError:{[be.route.id]:je.error}}}if(us(je))throw br(400,{type:"defer-action"});return{pendingActionData:{[Ee.route.id]:je.data}}}async function Ut(z,K,Q,ue,ye,Ve,je,Ee,be,qe,_t){let Ae=ue||ag(K,ye),dt=ye||Ve||bb(Ae),Bt=c||a,[Mn,At]=fb(e.history,N,Q,dt,K,f.v7_partialHydration&&Ee===!0,le,T,W,fe,oe,H,Bt,u,qe,_t);if(Xt(ot=>!(Q&&Q.some(ht=>ht.route.id===ot))||Mn&&Mn.some(ht=>ht.route.id===ot)),B=++U,Mn.length===0&&At.length===0){let ot=Qr();return Me(K,jt({matches:Q,loaderData:{},errors:_t||null},qe?{actionData:qe}:{},ot?{fetchers:new Map(N.fetchers)}:{}),{flushSync:be}),{shortCircuited:!0}}if(!ge&&(!f.v7_partialHydration||!Ee)){At.forEach(ht=>{let bn=N.fetchers.get(ht.key),zs=zl(void 0,bn?bn.data:void 0);N.fetchers.set(ht.key,zs)});let ot=qe||N.actionData;Pe(jt({navigation:Ae},ot?Object.keys(ot).length===0?{actionData:null}:{actionData:ot}:{},At.length>0?{fetchers:new Map(N.fetchers)}:{}),{flushSync:be})}At.forEach(ot=>{Y.has(ot.key)&&yn(ot.key),ot.controller&&Y.set(ot.key,ot.controller)});let ei=()=>At.forEach(ot=>yn(ot.key));V&&V.signal.addEventListener("abort",ei);let{results:dl,loaderResults:ti,fetcherResults:Mr}=await dr(N.matches,Q,Mn,At,z);if(z.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",ei),At.forEach(ot=>Y.delete(ot.key));let mo=yb(dl);if(mo){if(mo.idx>=Mn.length){let ot=At[mo.idx-Mn.length].key;H.add(ot)}return await vt(N,mo.result,{replace:je}),{shortCircuited:!0}}let{loaderData:fl,errors:pl}=mb(N,Q,Mn,ti,_t,At,Mr,Se);Se.forEach((ot,ht)=>{ot.subscribe(bn=>{(bn||ot.done)&&Se.delete(ht)})});let hl=Qr(),ni=wn(B),Fs=hl||ni||At.length>0;return jt({loaderData:fl,errors:pl},Fs?{fetchers:new Map(N.fetchers)}:{})}function Jo(z,K,Q,ue){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Y.has(z)&&yn(z);let ye=(ue&&ue.unstable_flushSync)===!0,Ve=c||a,je=Nm(N.location,N.matches,u,f.v7_prependBasename,Q,f.v7_relativeSplatPath,K,ue==null?void 0:ue.relative),Ee=Ca(Ve,je,u);if(!Ee){Yt(z,K,br(404,{pathname:je}),{flushSync:ye});return}let{path:be,submission:qe,error:_t}=db(f.v7_normalizeFormMethod,!0,je,ue);if(_t){Yt(z,K,_t,{flushSync:ye});return}let Ae=Dm(Ee,be);if(O=(ue&&ue.preventScrollReset)===!0,qe&&Br(qe.formMethod)){Xr(z,K,be,Ae,Ee,ye,qe);return}oe.set(z,{routeId:K,path:be}),Dr(z,K,be,Ae,Ee,ye,qe)}async function Xr(z,K,Q,ue,ye,Ve,je){if(xn(),oe.delete(z),!ue.route.action&&!ue.route.lazy){let ht=br(405,{method:je.formMethod,pathname:Q,routeId:K});Yt(z,K,ht,{flushSync:Ve});return}let Ee=N.fetchers.get(z);Kn(z,Uj(je,Ee),{flushSync:Ve});let be=new AbortController,qe=Fl(e.history,Q,be.signal,je);Y.set(z,be);let _t=U,Ae=await Al("action",qe,ue,ye,i,o,u,f.v7_relativeSplatPath);if(qe.signal.aborted){Y.get(z)===be&&Y.delete(z);return}if(f.v7_fetcherPersist&&fe.has(z)){if(ds(Ae)||$a(Ae)){Kn(z,gi(void 0));return}}else{if(ds(Ae))if(Y.delete(z),B>_t){Kn(z,gi(void 0));return}else return H.add(z),Kn(z,zl(je)),vt(N,Ae,{fetcherSubmission:je});if($a(Ae)){Yt(z,K,Ae.error);return}}if(us(Ae))throw br(400,{type:"defer-action"});let dt=N.navigation.location||N.location,Bt=Fl(e.history,dt,be.signal),Mn=c||a,At=N.navigation.state!=="idle"?Ca(Mn,N.navigation.location,u):N.matches;Ge(At,"Didn't find any matches after fetcher action");let ei=++U;L.set(z,ei);let dl=zl(je,Ae.data);N.fetchers.set(z,dl);let[ti,Mr]=fb(e.history,N,At,je,dt,!1,le,T,W,fe,oe,H,Mn,u,{[ue.route.id]:Ae.data},void 0);Mr.filter(ht=>ht.key!==z).forEach(ht=>{let bn=ht.key,zs=N.fetchers.get(bn),Sp=zl(void 0,zs?zs.data:void 0);N.fetchers.set(bn,Sp),Y.has(bn)&&yn(bn),ht.controller&&Y.set(bn,ht.controller)}),Pe({fetchers:new Map(N.fetchers)});let mo=()=>Mr.forEach(ht=>yn(ht.key));be.signal.addEventListener("abort",mo);let{results:fl,loaderResults:pl,fetcherResults:hl}=await dr(N.matches,At,ti,Mr,Bt);if(be.signal.aborted)return;be.signal.removeEventListener("abort",mo),L.delete(z),Y.delete(z),Mr.forEach(ht=>Y.delete(ht.key));let ni=yb(fl);if(ni){if(ni.idx>=ti.length){let ht=Mr[ni.idx-ti.length].key;H.add(ht)}return vt(N,ni.result)}let{loaderData:Fs,errors:ot}=mb(N,N.matches,ti,pl,void 0,Mr,hl,Se);if(N.fetchers.has(z)){let ht=gi(Ae.data);N.fetchers.set(z,ht)}wn(ei),N.navigation.state==="loading"&&ei>B?(Ge(j,"Expected pending action"),V&&V.abort(),Me(N.navigation.location,{matches:At,loaderData:Fs,errors:ot,fetchers:new Map(N.fetchers)})):(Pe({errors:ot,loaderData:vb(N.loaderData,Fs,At,ot),fetchers:new Map(N.fetchers)}),le=!1)}async function Dr(z,K,Q,ue,ye,Ve,je){let Ee=N.fetchers.get(z);Kn(z,zl(je,Ee?Ee.data:void 0),{flushSync:Ve});let be=new AbortController,qe=Fl(e.history,Q,be.signal);Y.set(z,be);let _t=U,Ae=await Al("loader",qe,ue,ye,i,o,u,f.v7_relativeSplatPath);if(us(Ae)&&(Ae=await p$(Ae,qe.signal,!0)||Ae),Y.get(z)===be&&Y.delete(z),!qe.signal.aborted){if(fe.has(z)){Kn(z,gi(void 0));return}if(ds(Ae))if(B>_t){Kn(z,gi(void 0));return}else{H.add(z),await vt(N,Ae);return}if($a(Ae)){Yt(z,K,Ae.error);return}Ge(!us(Ae),"Unhandled fetcher deferred data"),Kn(z,gi(Ae.data))}}async function vt(z,K,Q){let{submission:ue,fetcherSubmission:ye,replace:Ve}=Q===void 0?{}:Q;K.revalidate&&(le=!0);let je=Nc(z.location,K.location,{_isRedirect:!0});if(Ge(je,"Expected a location on the redirect navigation"),n){let dt=!1;if(K.reloadDocument)dt=!0;else if(c$.test(K.location)){const Bt=e.history.createURL(K.location);dt=Bt.origin!==t.location.origin||Yr(Bt.pathname,u)==null}if(dt){Ve?t.location.replace(K.location):t.location.assign(K.location);return}}V=null;let Ee=Ve===!0?Ot.Replace:Ot.Push,{formMethod:be,formAction:qe,formEncType:_t}=z.navigation;!ue&&!ye&&be&&qe&&_t&&(ue=bb(z.navigation));let Ae=ue||ye;if(_j.has(K.status)&&Ae&&Br(Ae.formMethod))await Qe(Ee,je,{submission:jt({},Ae,{formAction:K.location}),preventScrollReset:O});else{let dt=ag(je,ue);await Qe(Ee,je,{overrideNavigation:dt,fetcherSubmission:ye,preventScrollReset:O})}}async function dr(z,K,Q,ue,ye){let Ve=await Promise.all([...Q.map(be=>Al("loader",ye,be,K,i,o,u,f.v7_relativeSplatPath)),...ue.map(be=>be.matches&&be.match&&be.controller?Al("loader",Fl(e.history,be.path,be.controller.signal),be.match,be.matches,i,o,u,f.v7_relativeSplatPath):{type:kt.error,error:br(404,{pathname:be.path})})]),je=Ve.slice(0,Q.length),Ee=Ve.slice(Q.length);return await Promise.all([wb(z,Q,je,je.map(()=>ye.signal),!1,N.loaderData),wb(z,ue.map(be=>be.match),Ee,ue.map(be=>be.controller?be.controller.signal:null),!0)]),{results:Ve,loaderResults:je,fetcherResults:Ee}}function xn(){le=!0,T.push(...Xt()),oe.forEach((z,K)=>{Y.has(K)&&(W.push(K),yn(K))})}function Kn(z,K,Q){Q===void 0&&(Q={}),N.fetchers.set(z,K),Pe({fetchers:new Map(N.fetchers)},{flushSync:(Q&&Q.flushSync)===!0})}function Yt(z,K,Q,ue){ue===void 0&&(ue={});let ye=sc(N.matches,K);fr(z),Pe({errors:{[ye.route.id]:Q},fetchers:new Map(N.fetchers)},{flushSync:(ue&&ue.flushSync)===!0})}function Ki(z){return f.v7_fetcherPersist&&(ne.set(z,(ne.get(z)||0)+1),fe.has(z)&&fe.delete(z)),N.fetchers.get(z)||Nj}function fr(z){let K=N.fetchers.get(z);Y.has(z)&&!(K&&K.state==="loading"&&L.has(z))&&yn(z),oe.delete(z),L.delete(z),H.delete(z),fe.delete(z),N.fetchers.delete(z)}function jr(z){if(f.v7_fetcherPersist){let K=(ne.get(z)||0)-1;K<=0?(ne.delete(z),fe.add(z)):ne.set(z,K)}else fr(z);Pe({fetchers:new Map(N.fetchers)})}function yn(z){let K=Y.get(z);Ge(K,"Expected fetch controller: "+z),K.abort(),Y.delete(z)}function Zo(z){for(let K of z){let Q=Ki(K),ue=gi(Q.data);N.fetchers.set(K,ue)}}function Qr(){let z=[],K=!1;for(let Q of H){let ue=N.fetchers.get(Q);Ge(ue,"Expected fetcher: "+Q),ue.state==="loading"&&(H.delete(Q),z.push(Q),K=!0)}return Zo(z),K}function wn(z){let K=[];for(let[Q,ue]of L)if(ue0}function Gi(z,K){let Q=N.blockers.get(z)||ca;return me.get(z)!==K&&me.set(z,K),Q}function De(z){N.blockers.delete(z),me.delete(z)}function nt(z,K){let Q=N.blockers.get(z)||ca;Ge(Q.state==="unblocked"&&K.state==="blocked"||Q.state==="blocked"&&K.state==="blocked"||Q.state==="blocked"&&K.state==="proceeding"||Q.state==="blocked"&&K.state==="unblocked"||Q.state==="proceeding"&&K.state==="unblocked","Invalid blocker state transition: "+Q.state+" -> "+K.state);let ue=new Map(N.blockers);ue.set(z,K),Pe({blockers:ue})}function ft(z){let{currentLocation:K,nextLocation:Q,historyAction:ue}=z;if(me.size===0)return;me.size>1&&Ss(!1,"A router only supports one blocker at a time");let ye=Array.from(me.entries()),[Ve,je]=ye[ye.length-1],Ee=N.blockers.get(Ve);if(!(Ee&&Ee.state==="proceeding")&&je({currentLocation:K,nextLocation:Q,historyAction:ue}))return Ve}function Xt(z){let K=[];return Se.forEach((Q,ue)=>{(!z||z(ue))&&(Q.cancel(),K.push(ue),Se.delete(ue))}),K}function jn(z,K,Q){if(v=z,w=K,x=Q||null,!b&&N.navigation===sg){b=!0;let ue=ul(N.location,N.matches);ue!=null&&Pe({restoreScrollPosition:ue})}return()=>{v=null,w=null,x=null}}function go(z,K){return x&&x(z,K.map(ue=>ij(ue,N.loaderData)))||z.key}function cl(z,K){if(v&&w){let Q=go(z,K);v[Q]=w()}}function ul(z,K){if(v){let Q=go(z,K),ue=v[Q];if(typeof ue=="number")return ue}return null}function tu(z){i={},c=Rm(z,o,void 0,i)}return D={get basename(){return u},get future(){return f},get state(){return N},get routes(){return a},get window(){return t},initialize:Te,subscribe:We,enableScrollRestoration:jn,navigate:Mt,fetch:Jo,revalidate:lt,createHref:z=>e.history.createHref(z),encodeLocation:z=>e.history.encodeLocation(z),getFetcher:Ki,deleteFetcher:jr,dispose:Fe,getBlocker:Gi,deleteBlocker:De,_internalFetchControllers:Y,_internalActiveDeferreds:Se,_internalSetRoutes:tu},D}function jj(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nm(e,t,n,r,o,i,a,c){let u,f;if(a){u=[];for(let m of t)if(u.push(m),m.route.id===a){f=m;break}}else u=t,f=t[t.length-1];let h=pv(o||".",fv(u,i),Yr(e.pathname,n)||e.pathname,c==="path");return o==null&&(h.search=e.search,h.hash=e.hash),(o==null||o===""||o===".")&&f&&f.route.index&&!mv(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Io([n,h.pathname])),Cs(h)}function db(e,t,n,r){if(!r||!jj(r))return{path:n};if(r.formMethod&&!Fj(r.formMethod))return{path:n,error:br(405,{method:r.formMethod})};let o=()=>({path:n,error:br(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),c=f$(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Br(a))return o();let v=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,w)=>{let[b,P]=w;return""+x+b+"="+P+`
+`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:v}}}else if(r.formEncType==="application/json"){if(!Br(a))return o();try{let v=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:c,formEncType:r.formEncType,formData:void 0,json:v,text:void 0}}}catch{return o()}}}Ge(typeof FormData=="function","FormData is not available in this environment");let u,f;if(r.formData)u=km(r.formData),f=r.formData;else if(r.body instanceof FormData)u=km(r.body),f=r.body;else if(r.body instanceof URLSearchParams)u=r.body,f=gb(u);else if(r.body==null)u=new URLSearchParams,f=new FormData;else try{u=new URLSearchParams(r.body),f=gb(u)}catch{return o()}let h={formMethod:a,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Br(h.formMethod))return{path:n,submission:h};let m=qo(n);return t&&m.search&&mv(m.search)&&u.append("index",""),m.search="?"+u,{path:Cs(m),submission:h}}function Mj(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function fb(e,t,n,r,o,i,a,c,u,f,h,m,v,x,w,b){let P=b?Object.values(b)[0]:w?Object.values(w)[0]:void 0,C=e.createURL(t.location),S=e.createURL(o),E=b?Object.keys(b)[0]:void 0,D=Mj(n,E).filter((j,O)=>{let{route:V}=j;if(V.lazy)return!0;if(V.loader==null)return!1;if(i)return V.loader.hydrate?!0:t.loaderData[V.id]===void 0&&(!t.errors||t.errors[V.id]===void 0);if(Tj(t.loaderData,t.matches[O],j)||c.some(te=>te===j.route.id))return!0;let J=t.matches[O],ie=j;return pb(j,jt({currentUrl:C,currentParams:J.params,nextUrl:S,nextParams:ie.params},r,{actionResult:P,defaultShouldRevalidate:a||C.pathname+C.search===S.pathname+S.search||C.search!==S.search||d$(J,ie)}))}),N=[];return h.forEach((j,O)=>{if(i||!n.some(ge=>ge.route.id===j.routeId)||f.has(O))return;let V=Ca(v,j.path,x);if(!V){N.push({key:O,routeId:j.routeId,path:j.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(O),ie=Dm(V,j.path),te=!1;m.has(O)?te=!1:u.includes(O)?te=!0:J&&J.state!=="idle"&&J.data===void 0?te=a:te=pb(ie,jt({currentUrl:C,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:P,defaultShouldRevalidate:a})),te&&N.push({key:O,routeId:j.routeId,path:j.path,matches:V,match:ie,controller:new AbortController})}),[D,N]}function Tj(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function d$(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function pb(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function hb(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ge(o,"No route found in manifest");let i={};for(let a in r){let u=o[a]!==void 0&&a!=="hasErrorBoundary";Ss(!u,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!rj.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,jt({},t(o),{lazy:void 0}))}async function Al(e,t,n,r,o,i,a,c,u){u===void 0&&(u={});let f,h,m,v=b=>{let P,C=new Promise((S,E)=>P=E);return m=()=>P(),t.signal.addEventListener("abort",m),Promise.race([b({request:t,params:n.params,context:u.requestContext}),C])};try{let b=n.route[e];if(n.route.lazy)if(b){let P,C=await Promise.all([v(b).catch(S=>{P=S}),hb(n.route,i,o)]);if(P)throw P;h=C[0]}else if(await hb(n.route,i,o),b=n.route[e],b)h=await v(b);else if(e==="action"){let P=new URL(t.url),C=P.pathname+P.search;throw br(405,{method:t.method,pathname:C,routeId:n.route.id})}else return{type:kt.data,data:void 0};else if(b)h=await v(b);else{let P=new URL(t.url),C=P.pathname+P.search;throw br(404,{pathname:C})}Ge(h!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(b){f=kt.error,h=b}finally{m&&t.signal.removeEventListener("abort",m)}if(Aj(h)){let b=h.status;if(Rj.has(b)){let C=h.headers.get("Location");if(Ge(C,"Redirects returned/thrown from loaders/actions must have a Location header"),!c$.test(C))C=Nm(new URL(t.url),r.slice(0,r.indexOf(n)+1),a,!0,C,c);else if(!u.isStaticRequest){let S=new URL(t.url),E=C.startsWith("//")?new URL(S.protocol+C):new URL(C),_=Yr(E.pathname,a)!=null;E.origin===S.origin&&_&&(C=E.pathname+E.search+E.hash)}if(u.isStaticRequest)throw h.headers.set("Location",C),h;return{type:kt.redirect,status:b,location:C,revalidate:h.headers.get("X-Remix-Revalidate")!==null,reloadDocument:h.headers.get("X-Remix-Reload-Document")!==null}}if(u.isRouteRequest)throw{type:f===kt.error?kt.error:kt.data,response:h};let P;try{let C=h.headers.get("Content-Type");C&&/\bapplication\/json\b/.test(C)?h.body==null?P=null:P=await h.json():P=await h.text()}catch(C){return{type:kt.error,error:C}}return f===kt.error?{type:f,error:new hv(b,h.statusText,P),headers:h.headers}:{type:kt.data,data:P,statusCode:h.status,headers:h.headers}}if(f===kt.error)return{type:f,error:h};if(Lj(h)){var x,w;return{type:kt.deferred,deferredData:h,statusCode:(x=h.init)==null?void 0:x.status,headers:((w=h.init)==null?void 0:w.headers)&&new Headers(h.init.headers)}}return{type:kt.data,data:h}}function Fl(e,t,n,r){let o=e.createURL(f$(t)).toString(),i={signal:n};if(r&&Br(r.formMethod)){let{formMethod:a,formEncType:c}=r;i.method=a.toUpperCase(),c==="application/json"?(i.headers=new Headers({"Content-Type":c}),i.body=JSON.stringify(r.json)):c==="text/plain"?i.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?i.body=km(r.formData):i.body=r.formData}return new Request(o,i)}function km(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function gb(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ij(e,t,n,r,o){let i={},a=null,c,u=!1,f={};return n.forEach((h,m)=>{let v=t[m].route.id;if(Ge(!ds(h),"Cannot handle redirect results in processLoaderData"),$a(h)){let x=sc(e,v),w=h.error;r&&(w=Object.values(r)[0],r=void 0),a=a||{},a[x.route.id]==null&&(a[x.route.id]=w),i[v]=void 0,u||(u=!0,c=gv(h.error)?h.error.status:500),h.headers&&(f[v]=h.headers)}else us(h)?(o.set(v,h.deferredData),i[v]=h.deferredData.data):i[v]=h.data,h.statusCode!=null&&h.statusCode!==200&&!u&&(c=h.statusCode),h.headers&&(f[v]=h.headers)}),r&&(a=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:a,statusCode:c||200,loaderHeaders:f}}function mb(e,t,n,r,o,i,a,c){let{loaderData:u,errors:f}=Ij(t,n,r,o,c);for(let h=0;hr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function xb(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function br(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,a="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(a="Bad Request",o&&n&&r?c="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):e===403?(a="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",c='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",o&&n&&r?c="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(c='Invalid request method "'+o.toUpperCase()+'"')),new hv(e||500,a,new Error(c),!0)}function yb(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(ds(n))return{result:n,idx:t}}}function f$(e){let t=typeof e=="string"?qo(e):e;return Cs(jt({},t,{hash:""}))}function Oj(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function us(e){return e.type===kt.deferred}function $a(e){return e.type===kt.error}function ds(e){return(e&&e.type)===kt.redirect}function Lj(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Aj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Fj(e){return Ej.has(e.toLowerCase())}function Br(e){return $j.has(e.toLowerCase())}async function wb(e,t,n,r,o,i){for(let a=0;am.route.id===u.route.id),h=f!=null&&!d$(f,u)&&(i&&i[u.route.id])!==void 0;if(us(c)&&(o||h)){let m=r[a];Ge(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await p$(c,m,o).then(v=>{v&&(n[a]=v||n[a])})}}}async function p$(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:kt.data,data:e.deferredData.unwrappedData}}catch(o){return{type:kt.error,error:o}}return{type:kt.data,data:e.deferredData.data}}}function mv(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Dm(e,t){let n=typeof t=="string"?qo(t).search:t.search;if(e[e.length-1].route.index&&mv(n||""))return e[e.length-1];let r=a$(e);return r[r.length-1]}function bb(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function ag(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zj(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function zl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Uj(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function gi(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Bj(e,t){try{let n=e.sessionStorage.getItem(u$);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function Vj(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(u$,JSON.stringify(n))}catch(r){Ss(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
+ * React Router v6.22.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{c.current=!0}),p.useCallback(function(f,h){if(h===void 0&&(h={}),!c.current)return;if(typeof f=="number"){r.go(f);return}let m=pv(f,JSON.parse(a),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Io([t,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[t,r,a,i,e])}const m$=p.createContext(null);function Kj(){return p.useContext(m$)}function Gj(e){let t=p.useContext(Yo).outlet;return t&&p.createElement(m$.Provider,{value:e},t)}function tl(){let{matches:e}=p.useContext(Yo),t=e[e.length-1];return t?t.params:{}}function Vf(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Vi),{matches:o}=p.useContext(Yo),{pathname:i}=js(),a=JSON.stringify(fv(o,r.v7_relativeSplatPath));return p.useMemo(()=>pv(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function qj(e,t,n,r){Kc()||Ge(!1);let{navigator:o}=p.useContext(Vi),{matches:i}=p.useContext(Yo),a=i[i.length-1],c=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let f=js(),h;if(t){var m;let P=typeof t=="string"?qo(t):t;u==="/"||(m=P.pathname)!=null&&m.startsWith(u)||Ge(!1),h=P}else h=f;let v=h.pathname||"/",x=u==="/"?v:v.slice(u.length)||"/",w=Ca(e,{pathname:x}),b=Zj(w&&w.map(P=>Object.assign({},P,{params:Object.assign({},c,P.params),pathname:Io([u,o.encodeLocation?o.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?u:Io([u,o.encodeLocation?o.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),i,n,r);return t&&b?p.createElement(Bf.Provider,{value:{location:$s({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ot.Pop}},b):b}function Yj(){let e=w$(),t=gv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,null)}const Xj=p.createElement(Yj,null);class Qj extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(Yo.Provider,{value:this.props.routeContext},p.createElement(h$.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Jj(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(Wc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Yo.Provider,{value:t},r)}function Zj(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let a=e,c=(o=n)==null?void 0:o.errors;if(c!=null){let h=a.findIndex(m=>m.route.id&&(c==null?void 0:c[m.route.id]));h>=0||Ge(!1),a=a.slice(0,Math.min(a.length,h+1))}let u=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((h,m,v)=>{let x,w=!1,b=null,P=null;n&&(x=c&&m.route.id?c[m.route.id]:void 0,b=m.route.errorElement||Xj,u&&(f<0&&v===0?(rM("route-fallback",!1),w=!0,P=null):f===v&&(w=!0,P=m.route.hydrateFallbackElement||null)));let C=t.concat(a.slice(0,v+1)),S=()=>{let E;return x?E=b:w?E=P:m.route.Component?E=p.createElement(m.route.Component,null):m.route.element?E=m.route.element:E=h,p.createElement(Jj,{match:m,routeContext:{outlet:h,matches:C,isDataRoute:n!=null},children:E})};return n&&(m.route.ErrorBoundary||m.route.errorElement||v===0)?p.createElement(Qj,{location:n.location,revalidation:n.revalidation,component:b,error:x,children:S(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):S()},null)}var xv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xv||{}),kc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(kc||{});function v$(e){let t=p.useContext(Wc);return t||Ge(!1),t}function x$(e){let t=p.useContext(vv);return t||Ge(!1),t}function eM(e){let t=p.useContext(Yo);return t||Ge(!1),t}function y$(e){let t=eM(),n=t.matches[t.matches.length-1];return n.route.id||Ge(!1),n.route.id}function w$(){var e;let t=p.useContext(h$),n=x$(kc.UseRouteError),r=y$(kc.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let tM=0;function b$(e){let{router:t,basename:n}=v$(xv.UseBlocker),r=x$(kc.UseBlocker),[o,i]=p.useState(""),a=p.useCallback(c=>{if(typeof e!="function")return!!e;if(n==="/")return e(c);let{currentLocation:u,nextLocation:f,historyAction:h}=c;return e({currentLocation:$s({},u,{pathname:Yr(u.pathname,n)||u.pathname}),nextLocation:$s({},f,{pathname:Yr(f.pathname,n)||f.pathname}),historyAction:h})},[n,e]);return p.useEffect(()=>{let c=String(++tM);return i(c),()=>t.deleteBlocker(c)},[t]),p.useEffect(()=>{o!==""&&t.getBlocker(o,a)},[t,o,a]),o&&r.blockers.has(o)?r.blockers.get(o):ca}function nM(){let{router:e}=v$(xv.UseNavigateStable),t=y$(kc.UseNavigateStable),n=p.useRef(!1);return g$(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,$s({fromRouteId:t},i)))},[e,t])}const Sb={};function rM(e,t,n){!t&&!Sb[e]&&(Sb[e]=!0)}function S$(e){return Gj(e.context)}function oM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ot.Pop,navigator:i,static:a=!1,future:c}=e;Kc()&&Ge(!1);let u=t.replace(/^\/*/,"/"),f=p.useMemo(()=>({basename:u,navigator:i,static:a,future:$s({v7_relativeSplatPath:!1},c)}),[u,c,i,a]);typeof r=="string"&&(r=qo(r));let{pathname:h="/",search:m="",hash:v="",state:x=null,key:w="default"}=r,b=p.useMemo(()=>{let P=Yr(h,u);return P==null?null:{location:{pathname:P,search:m,hash:v,state:x,key:w},navigationType:o}},[u,h,m,v,x,w,o]);return b==null?null:p.createElement(Vi.Provider,{value:f},p.createElement(Bf.Provider,{children:n,value:b}))}new Promise(()=>{});function iM(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
+ * React Router DOM v6.22.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function sM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aM(e,t){return e.button===0&&(!t||t==="_self")&&!sM(e)}function jm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function lM(e,t){let n=jm(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const cM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],uM=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],dM="6";try{window.__reactRouterVersion=dM}catch{}function fM(e,t){return Dj({basename:t==null?void 0:t.basename,future:Va({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:ej({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||pM(),routes:e,mapRouteProperties:iM,window:t==null?void 0:t.window}).initialize()}function pM(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Va({},t,{errors:hM(t.errors)})),t}function hM(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new hv(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const $$=p.createContext({isTransitioning:!1}),gM=p.createContext(new Map),mM="startTransition",Cb=b0[mM],vM="flushSync",$b=ZD[vM];function xM(e){Cb?Cb(e):e()}function Ul(e){$b?$b(e):e()}class yM{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function wM(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=p.useState(n.state),[a,c]=p.useState(),[u,f]=p.useState({isTransitioning:!1}),[h,m]=p.useState(),[v,x]=p.useState(),[w,b]=p.useState(),P=p.useRef(new Map),{v7_startTransition:C}=r||{},S=p.useCallback(j=>{C?xM(j):j()},[C]),E=p.useCallback((j,O)=>{let{deletedFetchers:V,unstable_flushSync:J,unstable_viewTransitionOpts:ie}=O;V.forEach(ge=>P.current.delete(ge)),j.fetchers.forEach((ge,le)=>{ge.data!==void 0&&P.current.set(le,ge.data)});let te=n.window==null||typeof n.window.document.startViewTransition!="function";if(!ie||te){J?Ul(()=>i(j)):S(()=>i(j));return}if(J){Ul(()=>{v&&(h&&h.resolve(),v.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})});let ge=n.window.document.startViewTransition(()=>{Ul(()=>i(j))});ge.finished.finally(()=>{Ul(()=>{m(void 0),x(void 0),c(void 0),f({isTransitioning:!1})})}),Ul(()=>x(ge));return}v?(h&&h.resolve(),v.skipTransition(),b({state:j,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})):(c(j),f({isTransitioning:!0,flushSync:!1,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation}))},[n.window,v,h,P,S]);p.useLayoutEffect(()=>n.subscribe(E),[n,E]),p.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new yM)},[u]),p.useEffect(()=>{if(h&&a&&n.window){let j=a,O=h.promise,V=n.window.document.startViewTransition(async()=>{S(()=>i(j)),await O});V.finished.finally(()=>{m(void 0),x(void 0),c(void 0),f({isTransitioning:!1})}),x(V)}},[S,a,h,n.window]),p.useEffect(()=>{h&&a&&o.location.key===a.location.key&&h.resolve()},[h,v,o.location,a]),p.useEffect(()=>{!u.isTransitioning&&w&&(c(w.state),f({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),b(void 0))},[u.isTransitioning,w]),p.useEffect(()=>{},[]);let _=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:j=>n.navigate(j),push:(j,O,V)=>n.navigate(j,{state:O,preventScrollReset:V==null?void 0:V.preventScrollReset}),replace:(j,O,V)=>n.navigate(j,{replace:!0,state:O,preventScrollReset:V==null?void 0:V.preventScrollReset})}),[n]),D=n.basename||"/",N=p.useMemo(()=>({router:n,navigator:_,static:!1,basename:D}),[n,_,D]);return p.createElement(p.Fragment,null,p.createElement(Wc.Provider,{value:N},p.createElement(vv.Provider,{value:o},p.createElement(gM.Provider,{value:P.current},p.createElement($$.Provider,{value:u},p.createElement(oM,{basename:D,location:o.location,navigationType:o.historyAction,navigator:_,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?p.createElement(bM,{routes:n.routes,future:n.future,state:o}):t))))),null)}function bM(e){let{routes:t,future:n,state:r}=e;return qj(t,void 0,r,n)}const SM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tr=p.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:c,target:u,to:f,preventScrollReset:h,unstable_viewTransition:m}=t,v=C$(t,cM),{basename:x}=p.useContext(Vi),w,b=!1;if(typeof f=="string"&&CM.test(f)&&(w=f,SM))try{let E=new URL(window.location.href),_=f.startsWith("//")?new URL(E.protocol+f):new URL(f),D=Yr(_.pathname,x);_.origin===E.origin&&D!=null?f=D+_.search+_.hash:b=!0}catch{}let P=Hj(f,{relative:o}),C=PM(f,{replace:a,state:c,target:u,preventScrollReset:h,relative:o,unstable_viewTransition:m});function S(E){r&&r(E),E.defaultPrevented||C(E)}return p.createElement("a",Va({},v,{href:w||P,onClick:b||i?r:S,ref:n,target:u}))}),Pa=p.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:c,to:u,unstable_viewTransition:f,children:h}=t,m=C$(t,uM),v=Vf(u,{relative:m.relative}),x=js(),w=p.useContext(vv),{navigator:b,basename:P}=p.useContext(Vi),C=w!=null&&RM(v)&&f===!0,S=b.encodeLocation?b.encodeLocation(v).pathname:v.pathname,E=x.pathname,_=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;o||(E=E.toLowerCase(),_=_?_.toLowerCase():null,S=S.toLowerCase()),_&&P&&(_=Yr(_,P)||_);const D=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let N=E===S||!a&&E.startsWith(S)&&E.charAt(D)==="/",j=_!=null&&(_===S||!a&&_.startsWith(S)&&_.charAt(S.length)==="/"),O={isActive:N,isPending:j,isTransitioning:C},V=N?r:void 0,J;typeof i=="function"?J=i(O):J=[i,N?"active":null,j?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ie=typeof c=="function"?c(O):c;return p.createElement(tr,Va({},m,{"aria-current":V,className:J,ref:n,style:ie,to:u,unstable_viewTransition:f}),typeof h=="function"?h(O):h)});var Mm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Mm||(Mm={}));var Pb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Pb||(Pb={}));function $M(e){let t=p.useContext(Wc);return t||Ge(!1),t}function PM(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:c}=t===void 0?{}:t,u=Hi(),f=js(),h=Vf(e,{relative:a});return p.useCallback(m=>{if(aM(m,n)){m.preventDefault();let v=r!==void 0?r:Cs(f)===Cs(h);u(e,{replace:v,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:c})}},[f,u,h,r,o,n,e,i,a,c])}function EM(e){let t=p.useRef(jm(e)),n=p.useRef(!1),r=js(),o=p.useMemo(()=>lM(r.search,n.current?null:t.current),[r.search]),i=Hi(),a=p.useCallback((c,u)=>{const f=jm(typeof c=="function"?c(o):c);n.current=!0,i("?"+f,u)},[i,o]);return[o,a]}function RM(e,t){t===void 0&&(t={});let n=p.useContext($$);n==null&&Ge(!1);let{basename:r}=$M(Mm.useViewTransitionState),o=Vf(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Yr(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Yr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return _m(o.pathname,a)!=null||_m(o.pathname,i)!=null}const _M={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class sf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||_M,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[c,u]=a;for(let f=0;f{let[c,u]=a;for(let f=0;f{e=r,t=o});return n.resolve=e,n.reject=t,n}function Eb(e){return e==null?"":""+e}function NM(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const kM=/###/g;function ac(e,t,n){function r(c){return c&&c.indexOf("###")>-1?c.replace(kM,"."):c}function o(){return!e||typeof e=="string"}const i=typeof t!="string"?t:t.split(".");let a=0;for(;a":">",'"':""","'":"'","/":"/"};function TM(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>MM[t]):e}class IM{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const OM=[" ",",","?","!",";"],LM=new IM(20);function AM(e,t,n){t=t||"",n=n||"";const r=OM.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=LM.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Tm(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&u0?e.replace("_","-"):e}class _b extends Hf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):typeof r=="string"&&i?c.push(...r.split(i)):c.push(r)));const u=af(this.data,c);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),u||!a||typeof r!="string"?u:Tm(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),Rb(this.data,c,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let u=af(this.data,c)||{};o?P$(u,r,i):u={...u,...r},Rb(this.data,c,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var E$={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const Nb={};class cf extends Hf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),NM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=so.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!AM(t,r,o);if(a&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:i};const f=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(f[0])>-1)&&(i=f.shift()),t=f.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(t[t.length-1],n),u=c[c.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(h){const _=n.nsSeparator||this.options.nsSeparator;return o?{res:`${u}${_}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${_}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const m=this.resolve(t,n);let v=m&&m.res;const x=m&&m.usedKey||a,w=m&&m.exactUsedKey||a,b=Object.prototype.toString.apply(v),P=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject;if(S&&v&&(typeof v!="string"&&typeof v!="boolean"&&typeof v!="number")&&P.indexOf(b)<0&&!(typeof C=="string"&&b==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,v,{...n,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(m.res=_,m.usedParams=this.getUsedParamsDetails(n),m):_}if(i){const _=b==="[object Array]",D=_?[]:{},N=_?w:x;for(const j in v)if(Object.prototype.hasOwnProperty.call(v,j)){const O=`${N}${i}${j}`;D[j]=this.translate(O,{...n,joinArrays:!1,ns:c}),D[j]===O&&(D[j]=v[j])}v=D}}else if(S&&typeof C=="string"&&b==="[object Array]")v=v.join(C),v&&(v=this.extendTranslation(v,t,n,r));else{let _=!1,D=!1;const N=n.count!==void 0&&typeof n.count!="string",j=cf.hasDefaultValue(n),O=N?this.pluralResolver.getSuffix(f,n.count,n):"",V=n.ordinal&&N?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",J=N&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ie=J&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${V}`]||n.defaultValue;!this.isValidLookup(v)&&j&&(_=!0,v=ie),this.isValidLookup(v)||(D=!0,v=a);const ge=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:v,le=j&&ie!==v&&this.options.updateMissing;if(D||_||le){if(this.logger.log(le?"updateKey":"missingKey",f,u,a,le?ie:v),i){const U=this.resolve(a,{...n,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let U=0;U{const H=j&&L!==v?L:ge;this.options.missingKeyHandler?this.options.missingKeyHandler(U,u,B,H,le,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(U,u,B,H,le,n),this.emit("missingKey",U,u,B,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?T.forEach(U=>{const B=this.pluralResolver.getSuffixes(U,n);J&&n[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(L=>{Y([U],a+L,n[`defaultValue${L}`]||ie)})}):Y(T,a,ie))}v=this.extendTranslation(v,t,n,m,r),D&&v===a&&this.options.appendNamespaceToMissingKey&&(v=`${u}:${a}`),(D||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,_?v:void 0):v=this.options.parseMissingKeyHandler(v))}return o?(m.res=v,m.usedParams=this.getUsedParamsDetails(n),m):v}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const v=t.match(this.interpolator.nestingRegexp);h=v&&v.length}let m=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language,r),f){const v=t.match(this.interpolator.nestingRegexp),x=v&&v.length;h1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,c;return typeof t=="string"&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(u,n),h=f.key;o=h;let m=f.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const v=n.count!==void 0&&typeof n.count!="string",x=v&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),w=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(P=>{this.isValidLookup(r)||(c=P,!Nb[`${b[0]}-${P}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(c)&&(Nb[`${b[0]}-${P}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(C=>{if(this.isValidLookup(r))return;a=C;const S=[h];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(S,h,C,P,n);else{let _;v&&(_=this.pluralResolver.getSuffix(C,n.count,n));const D=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(S.push(h+_),n.ordinal&&_.indexOf(N)===0&&S.push(h+_.replace(N,this.options.pluralSeparator)),x&&S.push(h+D)),w){const j=`${h}${this.options.contextSeparator}${n.context}`;S.push(j),v&&(S.push(j+_),n.ordinal&&_.indexOf(N)===0&&S.push(j+_.replace(N,this.options.pluralSeparator)),x&&S.push(j+D))}}let E;for(;E=S.pop();)this.isValidLookup(r)||(i=E,r=this.getResource(C,P,E,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function lg(e){return e.charAt(0).toUpperCase()+e.slice(1)}class kb{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=so.create("languageUtils")}getScriptPartFromCode(t){if(t=lf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=lf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=lg(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=lg(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=lg(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&i.indexOf(o)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let FM=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],zM={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const UM=["v1","v2","v3"],BM=["v4"],Db={zero:0,one:1,two:2,few:3,many:4,other:5};function VM(){const e={};return FM.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:zM[t.fc]}})}),e}class HM{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=so.create("pluralResolver"),(!this.options.compatibilityJSON||BM.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=VM()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(lf(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>Db[o]-Db[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!UM.includes(this.options.compatibilityJSON)}}function jb(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=jM(e,t,n);return!i&&o&&typeof n=="string"&&(i=Tm(e,n,r),i===void 0&&(i=Tm(t,n,r))),i}class WM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=so.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:TM,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?na(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?na(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?na(n.nestingPrefix):n.nestingPrefixEscaped||na("$t("),this.nestingSuffix=n.nestingSuffix?na(n.nestingSuffix):n.nestingSuffixEscaped||na(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(w){return w.replace(/\$/g,"$$$$")}const h=w=>{if(w.indexOf(this.formatSeparator)<0){const S=jb(n,u,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,r,{...o,...n,interpolationkey:w}):S}const b=w.split(this.formatSeparator),P=b.shift().trim(),C=b.join(this.formatSeparator).trim();return this.format(jb(n,u,P,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...o,...n,interpolationkey:P})};this.resetRegExp();const m=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,v=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>f(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?f(this.escape(w)):f(w)}].forEach(w=>{for(c=0;i=w.regex.exec(t);){const b=i[1].trim();if(a=h(b),a===void 0)if(typeof m=="function"){const C=m(t,i,o);a=typeof C=="string"?C:""}else if(o&&Object.prototype.hasOwnProperty.call(o,b))a="";else if(v){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=Eb(a));const P=w.safeValue(a);if(t=t.replace(i[0],P),v?(w.regex.lastIndex+=a.length,w.regex.lastIndex-=i[0].length):w.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;function c(u,f){const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const m=u.split(new RegExp(`${h}[ ]*{`));let v=`{${m[1]}`;u=m[0],v=this.interpolate(v,a);const x=v.match(/'/g),w=v.match(/"/g);(x&&x.length%2===0&&!w||w.length%2!==0)&&(v=v.replace(/'/g,'"'));try{a=JSON.parse(v),f&&(a={...f,...a})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${h}${v}`}return delete a.defaultValue,u}for(;o=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(m=>m.trim());o[1]=h.shift(),u=h,f=!0}if(i=n(c.call(this,o[1].trim(),a),a),i&&o[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Eb(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),f&&(i=u.reduce((h,m)=>this.format(h,m,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}function KM(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(!a)return;const[c,...u]=a.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=f),f==="false"&&(n[c.trim()]=!1),f==="true"&&(n[c.trim()]=!0),isNaN(f)||(n[c.trim()]=parseInt(f,10))})}return{formatName:t,formatOptions:n}}function ra(e){const t={};return function(r,o,i){const a=o+JSON.stringify(i);let c=t[a];return c||(c=e(lf(o),i),t[a]=c),c(r)}}class GM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=so.create("formatter"),this.options=t,this.formats={number:ra((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:ra((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:ra((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:ra((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:ra((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ra(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((c,u)=>{const{formatName:f,formatOptions:h}=KM(u);if(this.formats[f]){let m=c;try{const v=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},x=v.locale||v.lng||o.locale||o.lng||r;m=this.formats[f](c,x,{...h,...o,...v})}catch(v){this.logger.warn(v)}return m}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}function qM(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class YM extends Hf{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=so.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},c={},u={};return t.forEach(f=>{let h=!0;n.forEach(m=>{const v=`${f}|${m}`;!r.reload&&this.store.hasResourceBundle(f,m)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?a[v]===void 0&&(a[v]=!0):(this.state[v]=1,h=!1,a[v]===void 0&&(a[v]=!0),i[v]===void 0&&(i[v]=!0),u[m]===void 0&&(u[m]=!0)))}),h||(c[f]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r),this.state[t]=n?-1:2;const c={};this.queue.forEach(u=>{DM(u.loaded,[i],a),qM(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{c[f]||(c[f]={});const h=u.loaded[f];h.length&&h.forEach(m=>{c[f][m]===void 0&&(c[f][m]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const c=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&h&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(f,h)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const f=u(t,n);f&&typeof f.then=="function"?f.then(h=>c(null,h)).catch(c):c(null,f)}catch(f){c(f)}return}return u(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,c)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&c&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,c),this.loaded(t,a,c)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const u={...a,isUpdate:i},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(t,n,r,o,u):h=f(t,n,r,o),h&&typeof h.then=="function"?h.then(m=>c(null,m)).catch(c):c(null,h)}catch(h){c(h)}else f(t,n,r,o,c,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function Mb(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Tb(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function id(){}function XM(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Dc extends Hf{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Tb(t),this.services={},this.logger=so,this.modules={external:[]},XM(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Mb();this.options={...o,...this.options,...Tb(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(h){return h?typeof h=="function"?new h:h:null}if(!this.options.isClone){this.modules.logger?so.init(i(this.modules.logger),this.options):so.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:typeof Intl<"u"&&(h=GM);const m=new kb(this.options);this.store=new _b(this.options.resources,this.options);const v=this.services;v.logger=so,v.resourceStore=this.store,v.languageUtils=m,v.pluralResolver=new HM(m,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(v.formatter=i(h),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new WM(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new YM(i(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(x){for(var w=arguments.length,b=new Array(w>1?w-1:0),P=1;P1?w-1:0),P=1;P{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,r||(r=id),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return t.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t}});const u=Bl(),f=()=>{const h=(m,v)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(v),r(m,v)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:id;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&i.indexOf(f)<0&&i.push(f)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload&&this.options.preload.forEach(c=>a(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=Bl();return t||(t=this.languages),n||(n=this.options.ns),r||(r=id),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&E$.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Bl();this.emit("languageChanging",t);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,f)=>{f?(i(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},c=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const f=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);f&&(this.language||i(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(f)),this.loadResources(f,h=>{a(h,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const i=function(a,c){let u;if(typeof c!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),m=2;m`${u.keyPrefix}${v}${w}`):x=u.keyPrefix?`${u.keyPrefix}${v}${a}`:a,o.t(x,u)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(c,u)=>{const f=this.services.backendConnector.state[`${c}|${u}`];return f===-1||f===2};if(n.precheck){const c=n.precheck(this,a);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=Bl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Bl();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0);return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new kb(Mb());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Dc(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:id;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Dc(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(c=>{i[c]=this[c]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new _b(this.store.data,o),i.services.resourceStore=i.store),i.translator=new cf(i.services,o),i.translator.on("*",function(c){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h"u"?"undefined":Im(XMLHttpRequest))==="object"}function QM(e){return!!e&&typeof e.then=="function"}function JM(e){return QM(e)?e:Promise.resolve(e)}function ZM(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Om={exports:{}},sd={exports:{}},Ib;function e9(){return Ib||(Ib=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof oo<"u"&&oo,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var c=typeof i<"u"&&i||typeof self<"u"&&self||typeof c<"u"&&c,u={searchParams:"URLSearchParams"in c,iterable:"Symbol"in c&&"iterator"in Symbol,blob:"FileReader"in c&&"Blob"in c&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in c,arrayBuffer:"ArrayBuffer"in c};function f(T){return T&&DataView.prototype.isPrototypeOf(T)}if(u.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(T){return T&&h.indexOf(Object.prototype.toString.call(T))>-1};function v(T){if(typeof T!="string"&&(T=String(T)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(T)||T==="")throw new TypeError('Invalid character in header field name: "'+T+'"');return T.toLowerCase()}function x(T){return typeof T!="string"&&(T=String(T)),T}function w(T){var W={next:function(){var Y=T.shift();return{done:Y===void 0,value:Y}}};return u.iterable&&(W[Symbol.iterator]=function(){return W}),W}function b(T){this.map={},T instanceof b?T.forEach(function(W,Y){this.append(Y,W)},this):Array.isArray(T)?T.forEach(function(W){this.append(W[0],W[1])},this):T&&Object.getOwnPropertyNames(T).forEach(function(W){this.append(W,T[W])},this)}b.prototype.append=function(T,W){T=v(T),W=x(W);var Y=this.map[T];this.map[T]=Y?Y+", "+W:W},b.prototype.delete=function(T){delete this.map[v(T)]},b.prototype.get=function(T){return T=v(T),this.has(T)?this.map[T]:null},b.prototype.has=function(T){return this.map.hasOwnProperty(v(T))},b.prototype.set=function(T,W){this.map[v(T)]=x(W)},b.prototype.forEach=function(T,W){for(var Y in this.map)this.map.hasOwnProperty(Y)&&T.call(W,this.map[Y],Y,this)},b.prototype.keys=function(){var T=[];return this.forEach(function(W,Y){T.push(Y)}),w(T)},b.prototype.values=function(){var T=[];return this.forEach(function(W){T.push(W)}),w(T)},b.prototype.entries=function(){var T=[];return this.forEach(function(W,Y){T.push([Y,W])}),w(T)},u.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function P(T){if(T.bodyUsed)return Promise.reject(new TypeError("Already read"));T.bodyUsed=!0}function C(T){return new Promise(function(W,Y){T.onload=function(){W(T.result)},T.onerror=function(){Y(T.error)}})}function S(T){var W=new FileReader,Y=C(W);return W.readAsArrayBuffer(T),Y}function E(T){var W=new FileReader,Y=C(W);return W.readAsText(T),Y}function _(T){for(var W=new Uint8Array(T),Y=new Array(W.length),U=0;U-1?W:T}function V(T,W){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');W=W||{};var Y=W.body;if(T instanceof V){if(T.bodyUsed)throw new TypeError("Already read");this.url=T.url,this.credentials=T.credentials,W.headers||(this.headers=new b(T.headers)),this.method=T.method,this.mode=T.mode,this.signal=T.signal,!Y&&T._bodyInit!=null&&(Y=T._bodyInit,T.bodyUsed=!0)}else this.url=String(T);if(this.credentials=W.credentials||this.credentials||"same-origin",(W.headers||!this.headers)&&(this.headers=new b(W.headers)),this.method=O(W.method||this.method||"GET"),this.mode=W.mode||this.mode||null,this.signal=W.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(Y),(this.method==="GET"||this.method==="HEAD")&&(W.cache==="no-store"||W.cache==="no-cache")){var U=/([?&])_=[^&]*/;if(U.test(this.url))this.url=this.url.replace(U,"$1_="+new Date().getTime());else{var B=/\?/;this.url+=(B.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function J(T){var W=new FormData;return T.trim().split("&").forEach(function(Y){if(Y){var U=Y.split("="),B=U.shift().replace(/\+/g," "),L=U.join("=").replace(/\+/g," ");W.append(decodeURIComponent(B),decodeURIComponent(L))}}),W}function ie(T){var W=new b,Y=T.replace(/\r?\n[\t ]+/g," ");return Y.split("\r").map(function(U){return U.indexOf(`
+`)===0?U.substr(1,U.length):U}).forEach(function(U){var B=U.split(":"),L=B.shift().trim();if(L){var H=B.join(":").trim();W.append(L,H)}}),W}N.call(V.prototype);function te(T,W){if(!(this instanceof te))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');W||(W={}),this.type="default",this.status=W.status===void 0?200:W.status,this.ok=this.status>=200&&this.status<300,this.statusText=W.statusText===void 0?"":""+W.statusText,this.headers=new b(W.headers),this.url=W.url||"",this._initBody(T)}N.call(te.prototype),te.prototype.clone=function(){return new te(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},te.error=function(){var T=new te(null,{status:0,statusText:""});return T.type="error",T};var ge=[301,302,303,307,308];te.redirect=function(T,W){if(ge.indexOf(W)===-1)throw new RangeError("Invalid status code");return new te(null,{status:W,headers:{location:T}})},a.DOMException=c.DOMException;try{new a.DOMException}catch{a.DOMException=function(W,Y){this.message=W,this.name=Y;var U=Error(W);this.stack=U.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function le(T,W){return new Promise(function(Y,U){var B=new V(T,W);if(B.signal&&B.signal.aborted)return U(new a.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function H(){L.abort()}L.onload=function(){var ne={status:L.status,statusText:L.statusText,headers:ie(L.getAllResponseHeaders()||"")};ne.url="responseURL"in L?L.responseURL:ne.headers.get("X-Request-URL");var fe="response"in L?L.response:L.responseText;setTimeout(function(){Y(new te(fe,ne))},0)},L.onerror=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},L.ontimeout=function(){setTimeout(function(){U(new TypeError("Network request failed"))},0)},L.onabort=function(){setTimeout(function(){U(new a.DOMException("Aborted","AbortError"))},0)};function oe(ne){try{return ne===""&&c.location.href?c.location.href:ne}catch{return ne}}L.open(B.method,oe(B.url),!0),B.credentials==="include"?L.withCredentials=!0:B.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&(u.blob?L.responseType="blob":u.arrayBuffer&&B.headers.get("Content-Type")&&B.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(L.responseType="arraybuffer")),W&&typeof W.headers=="object"&&!(W.headers instanceof b)?Object.getOwnPropertyNames(W.headers).forEach(function(ne){L.setRequestHeader(ne,x(W.headers[ne]))}):B.headers.forEach(function(ne,fe){L.setRequestHeader(fe,ne)}),B.signal&&(B.signal.addEventListener("abort",H),L.onreadystatechange=function(){L.readyState===4&&B.signal.removeEventListener("abort",H)}),L.send(typeof B._bodyInit>"u"?null:B._bodyInit)})}return le.polyfill=!0,c.fetch||(c.fetch=le,c.Headers=b,c.Request=V,c.Response=te),a.Headers=b,a.Request=V,a.Response=te,a.fetch=le,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(sd,sd.exports)),sd.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof oo<"u"&&oo.fetch?n=oo.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof ZM<"u"&&(typeof window>"u"||typeof window.document>"u")){var r=n||e9();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Om,Om.exports);var _$=Om.exports;const N$=Qa(_$),Ob=m0({__proto__:null,default:N$},[_$]);function Lb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ab(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=Ab({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},zb?{}:a);try{Fb(n,c,o)}catch(u){if(!a||Object.keys(a).length===0||!u.message||u.message.indexOf("not implemented")<0)return o(u);try{Object.keys(a).forEach(function(f){delete c[f]}),Fb(n,c,o),zb=!0}catch(f){o(f)}}},i9=function(t,n,r,o){r&&Ps(r)==="object"&&(r=Lm("",r).slice(1)),t.queryStringParams&&(n=Lm(n,t.queryStringParams));try{var i;jc?i=new jc:i=new uf("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var c in a)i.setRequestHeader(c,a[c]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(u){console&&console.log(u)}},s9=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Oo&&n.indexOf("file:")!==0)return o9(t,n,r,o);if(R$()||typeof ActiveXObject=="function")return i9(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function Mc(e){"@babel/helpers - typeof";return Mc=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},Mc(e)}function Ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a9(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return l9(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=cg(cg(cg({},u9()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var c=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,o)),u=JM(u),u.then(function(f){if(!f)return a(null,{});var h=c.services.interpolator.interpolate(f,{lng:n.join("+"),ns:o.join("+")});c.loadUrl(h,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,c=typeof o=="string"?[o]:o,u=typeof i=="string"?[i]:i,f=this.options.parseLoadPayload(c,u);this.options.request(this.options,n,f,function(h,m){if(m&&(m.status>=500&&m.status<600||!m.status))return r("failed loading "+n+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+n+"; status code: "+m.status,!1);if(!m&&h&&h.message&&h.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+h.message,!0);if(h)return r(h,!1);var v,x;try{typeof m.data=="string"?v=a.options.parse(m.data,o,i):v=m.data}catch{x="failed parsing "+n+" to json"}if(x)return r(x,!1);r(null,v)})}},{key:"create",value:function(n,r,o,i,a){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,o,i),f=0,h=[],m=[];n.forEach(function(v){var x=c.options.addPath;typeof c.options.addPath=="function"&&(x=c.options.addPath(v,r));var w=c.services.interpolator.interpolate(x,{lng:v,ns:r});c.options.request(c.options,w,u,function(b,P){f+=1,h.push(b),m.push(P),f===n.length&&typeof a=="function"&&a(h,m)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,c=o.language;if(!(c&&c.toLowerCase()==="cimode")){var u=[],f=function(m){var v=i.toResolveHierarchy(m);v.forEach(function(x){u.indexOf(x)<0&&u.push(x)})};f(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return f(h)}),u.forEach(function(h){n.allOptions.ns.forEach(function(m){o.read(h,m,"read",null,null,function(v,x){v&&a.warn("loading namespace ".concat(m," for language ").concat(h," failed"),v),!v&&x&&a.log("loaded namespace ".concat(m," for language ").concat(h),x),o.loaded("".concat(h,"|").concat(m),v,x)})})})}}}]),e}();j$.type="backend";function d9(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Hb(e,t,n){e.loadNamespaces(t,M$(e,n))}function Wb(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,M$(e,r))}function f9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(c,u)=>{const f=t.services.backendConnector.state[`${c}|${u}`];return f===-1||f===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}function p9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Am("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,e))return!1}}):f9(e,t,n)}const h9=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,g9={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},m9=e=>g9[e],v9=e=>e.replace(h9,m9);let Fm={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:v9};function x9(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fm={...Fm,...e}}function y9(){return Fm}let T$;function w9(e){T$=e}function b9(){return T$}const S9={type:"3rdParty",init(e){x9(e.options.react),w9(e)}},C9=p.createContext();class $9{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const P9=(e,t)=>{const n=p.useRef();return p.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function I$(e,t,n,r){return e.getFixedT(t,n,r)}function E9(e,t,n,r){return p.useCallback(I$(e,t,n,r),[e,t,n,r])}function yv(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=p.useContext(C9)||{},i=n||r||b9();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new $9),!i){Am("You will need to pass in an i18next instance by using initReactI18next");const D=(j,O)=>typeof O=="string"?O:O&&typeof O=="object"&&typeof O.defaultValue=="string"?O.defaultValue:Array.isArray(j)?j[j.length-1]:j,N=[D,{},!1];return N.t=D,N.i18n={},N.ready=!1,N}i.options.react&&i.options.react.wait!==void 0&&Am("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...y9(),...i.options.react,...t},{useSuspense:c,keyPrefix:u}=a;let f=e||o||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);const h=(i.isInitialized||i.initializedStoreOnce)&&f.every(D=>p9(D,i,a)),m=E9(i,t.lng||null,a.nsMode==="fallback"?f:f[0],u),v=()=>m,x=()=>I$(i,t.lng||null,a.nsMode==="fallback"?f:f[0],u),[w,b]=p.useState(v);let P=f.join();t.lng&&(P=`${t.lng}${P}`);const C=P9(P),S=p.useRef(!0);p.useEffect(()=>{const{bindI18n:D,bindI18nStore:N}=a;S.current=!0,!h&&!c&&(t.lng?Wb(i,t.lng,f,()=>{S.current&&b(x)}):Hb(i,f,()=>{S.current&&b(x)})),h&&C&&C!==P&&S.current&&b(x);function j(){S.current&&b(x)}return D&&i&&i.on(D,j),N&&i&&i.store.on(N,j),()=>{S.current=!1,D&&i&&D.split(" ").forEach(O=>i.off(O,j)),N&&i&&N.split(" ").forEach(O=>i.store.off(O,j))}},[i,P]);const E=p.useRef(!0);p.useEffect(()=>{S.current&&!E.current&&b(v),E.current=!1},[i,u]);const _=[w,i,h];if(_.t=w,_.i18n=i,_.ready=h,h||!h&&!c)return _;throw new Promise(D=>{t.lng?Wb(i,t.lng,f,()=>D()):Hb(i,f,()=>D())})}ln.use(j$).use(S9).init({fallbackLng:"en",debug:!1});function Kb(){const e=w$();return console.error(e),d.jsxs("div",{id:"error-page",children:[d.jsx("h1",{children:"Oops!"}),d.jsx("p",{children:"Sorry, an unexpected error has occurred."}),d.jsx("p",{children:d.jsx("i",{children:gv(e)&&e.statusText})})]})}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>R9(n,t))}function Ze(...e){return p.useCallback(Wf(...e),e)}const Vo=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(_9);if(i){const a=i.props.children,c=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return p.createElement(zm,q({},r,{ref:t}),p.isValidElement(a)?p.cloneElement(a,void 0,c):null)}return p.createElement(zm,q({},r,{ref:t}),n)});Vo.displayName="Slot";const zm=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...N9(r,n.props),ref:t?Wf(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});zm.displayName="SlotClone";const O$=({children:e})=>p.createElement(p.Fragment,null,e);function _9(e){return p.isValidElement(e)&&e.type===O$}function N9(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{i(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function L$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;tc(i)))==null?void 0:a.classGroupId}const Gb=/^\[(.+)\]$/;function j9(e){if(Gb.test(e)){const t=Gb.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function M9(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return I9(Object.entries(e.classGroups),n).forEach(([i,a])=>{Um(a,r,i,t)}),r}function Um(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:qb(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(T9(o)){Um(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Um(a,qb(t,i),n,r)})})}function qb(e,t){let n=e;return t.split(wv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function T9(e){return e.isThemeGetter}function I9(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,c])=>[t+a,c])):i);return[n,o]}):e}function O9(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}}const F$="!";function L9(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(a){const c=[];let u=0,f=0,h;for(let b=0;bf?h-f:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:w}}}function A9(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function F9(e){return{cache:O9(e.cacheSize),splitModifiers:L9(e),...D9(e)}}const z9=/\s+/;function U9(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(z9).map(a=>{const{modifiers:c,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:h}=n(a);let m=r(h?f.substring(0,h):f),v=!!h;if(!m){if(!h)return{isTailwindClass:!1,originalClassName:a};if(m=r(f),!m)return{isTailwindClass:!1,originalClassName:a};v=!1}const x=A9(c).join(":");return{isTailwindClass:!0,modifierId:u?x+F$:x,classGroupId:m,originalClassName:a,hasPostfixModifier:v}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:c,classGroupId:u,hasPostfixModifier:f}=a,h=c+u;return i.has(h)?!1:(i.add(h),o(u,f).forEach(m=>i.add(c+m)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function B9(){let e=0,t,n,r="";for(;em(h),e());return n=F9(f),r=n.cache.get,o=n.cache.set,i=c,c(u)}function c(u){const f=r(u);if(f)return f;const h=U9(u,n);return o(u,h),h}return function(){return i(B9.apply(null,arguments))}}function yt(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const U$=/^\[(?:([a-z-]+):)?(.+)\]$/i,H9=/^\d+\/\d+$/,W9=new Set(["px","full","screen"]),K9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,G9=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Y9=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,X9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Eo(e){return fs(e)||W9.has(e)||H9.test(e)}function pi(e){return nl(e,"length",oT)}function fs(e){return!!e&&!Number.isNaN(Number(e))}function ad(e){return nl(e,"number",fs)}function Vl(e){return!!e&&Number.isInteger(Number(e))}function Q9(e){return e.endsWith("%")&&fs(e.slice(0,-1))}function Ue(e){return U$.test(e)}function hi(e){return K9.test(e)}const J9=new Set(["length","size","percentage"]);function Z9(e){return nl(e,J9,B$)}function eT(e){return nl(e,"position",B$)}const tT=new Set(["image","url"]);function nT(e){return nl(e,tT,sT)}function rT(e){return nl(e,"",iT)}function Hl(){return!0}function nl(e,t,n){const r=U$.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function oT(e){return G9.test(e)&&!q9.test(e)}function B$(){return!1}function iT(e){return Y9.test(e)}function sT(e){return X9.test(e)}function aT(){const e=yt("colors"),t=yt("spacing"),n=yt("blur"),r=yt("brightness"),o=yt("borderColor"),i=yt("borderRadius"),a=yt("borderSpacing"),c=yt("borderWidth"),u=yt("contrast"),f=yt("grayscale"),h=yt("hueRotate"),m=yt("invert"),v=yt("gap"),x=yt("gradientColorStops"),w=yt("gradientColorStopPositions"),b=yt("inset"),P=yt("margin"),C=yt("opacity"),S=yt("padding"),E=yt("saturate"),_=yt("scale"),D=yt("sepia"),N=yt("skew"),j=yt("space"),O=yt("translate"),V=()=>["auto","contain","none"],J=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",Ue,t],te=()=>[Ue,t],ge=()=>["",Eo,pi],le=()=>["auto",fs,Ue],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],U=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",Ue],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[fs,ad],oe=()=>[fs,Ue];return{cacheSize:500,separator:":",theme:{colors:[Hl],spacing:[Eo,pi],blur:["none","",hi,Ue],brightness:H(),borderColor:[e],borderRadius:["none","","full",hi,Ue],borderSpacing:te(),borderWidth:ge(),contrast:H(),grayscale:B(),hueRotate:oe(),invert:B(),gap:te(),gradientColorStops:[e],gradientColorStopPositions:[Q9,pi],inset:ie(),margin:ie(),opacity:H(),padding:te(),saturate:H(),scale:H(),sepia:B(),skew:oe(),space:te(),translate:te()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],container:["container"],columns:[{columns:[hi]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Ue]}],overflow:[{overflow:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Vl,Ue]}],basis:[{basis:ie()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Vl,Ue]}],"grid-cols":[{"grid-cols":[Hl]}],"col-start-end":[{col:["auto",{span:["full",Vl,Ue]},Ue]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[Hl]}],"row-start-end":[{row:["auto",{span:[Vl,Ue]},Ue]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ue,t]}],"min-w":[{"min-w":[Ue,t,"min","max","fit"]}],"max-w":[{"max-w":[Ue,t,"none","full","min","max","fit","prose",{screen:[hi]},hi]}],h:[{h:[Ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",hi,pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ad]}],"font-family":[{font:[Hl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ue]}],"line-clamp":[{"line-clamp":["none",fs,ad]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Eo,Ue]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Eo,pi]}],"underline-offset":[{"underline-offset":["auto",Eo,Ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),eT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Z9]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Eo,Ue]}],"outline-w":[{outline:[Eo,pi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Eo,pi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",hi,rT]}],"shadow-color":[{shadow:[Hl]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":Y()}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",hi,Ue]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[E]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ue]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Vl,Ue]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Eo,pi,ad]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const lT=V9(aT);function se(...e){return lT(k9(e))}function V$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Xb=cT,bv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Xb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(f=>{const h=n==null?void 0:n[f],m=i==null?void 0:i[f];if(h===null)return null;const v=Yb(h)||Yb(m);return o[f][v]}),c=n&&Object.entries(n).reduce((f,h)=>{let[m,v]=h;return v===void 0||(f[m]=v),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:m,className:v,...x}=h;return Object.entries(x).every(w=>{let[b,P]=w;return Array.isArray(P)?P.includes({...i,...c}[b]):{...i,...c}[b]===P})?[...f,m,v]:f},[]);return Xb(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},Sv=bv("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),at=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?Vo:"button";return d.jsx(a,{className:se(Sv({variant:t,size:n,className:e})),ref:i,...o})});at.displayName="Button";function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function uT(e,t){const n=p.createContext(t);function r(i){const{children:a,...c}=i,u=p.useMemo(()=>c,Object.values(c));return p.createElement(n.Provider,{value:u},a)}function o(i){const a=p.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function ur(e,t=[]){let n=[];function r(i,a){const c=p.createContext(a),u=n.length;n=[...n,a];function f(m){const{scope:v,children:x,...w}=m,b=(v==null?void 0:v[e][u])||c,P=p.useMemo(()=>w,Object.values(w));return p.createElement(b.Provider,{value:P},x)}function h(m,v){const x=(v==null?void 0:v[e][u])||c,w=p.useContext(x);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return f.displayName=i+"Provider",[f,h]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(c){const u=(c==null?void 0:c[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,dT(o,...t)]}function dT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:u,scopeName:f})=>{const m=u(i)[`__scope${f}`];return{...c,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Zt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Ii({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=fT({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,c=Zt(n),u=p.useCallback(f=>{if(i){const m=typeof f=="function"?f(e):f;m!==e&&c(m)}else o(f)},[i,e,o,c]);return[a,u]}function fT({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Zt(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function H$(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const _n=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function W$(e){const[t,n]=p.useState(void 0);return _n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,c;if("borderBoxSize"in i){const u=i.borderBoxSize,f=Array.isArray(u)?u[0]:u;a=f.inlineSize,c=f.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const pT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Oe=pT.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,c=i?Vo:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(c,q({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function K$(e,t){e&&po.flushSync(()=>e.dispatchEvent(t))}const G$="Switch",[hT,OW]=ur(G$),[gT,mT]=hT(G$),vT=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:c,value:u="on",onCheckedChange:f,...h}=e,[m,v]=p.useState(null),x=Ze(t,S=>v(S)),w=p.useRef(!1),b=m?!!m.closest("form"):!0,[P=!1,C]=Ii({prop:o,defaultProp:i,onChange:f});return p.createElement(gT,{scope:n,checked:P,disabled:c},p.createElement(Oe.button,q({type:"button",role:"switch","aria-checked":P,"aria-required":a,"data-state":q$(P),"data-disabled":c?"":void 0,disabled:c,value:u},h,{ref:x,onClick:he(e.onClick,S=>{C(E=>!E),b&&(w.current=S.isPropagationStopped(),w.current||S.stopPropagation())})})),b&&p.createElement(wT,{control:m,bubbles:!w.current,name:r,value:u,checked:P,required:a,disabled:c,style:{transform:"translateX(-100%)"}}))}),xT="SwitchThumb",yT=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=mT(xT,n);return p.createElement(Oe.span,q({"data-state":q$(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),wT=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=p.useRef(null),a=H$(n),c=W$(t);return p.useEffect(()=>{const u=i.current,f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(a!==n&&m){const v=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(v)}},[a,n,r]),p.createElement("input",q({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function q$(e){return e?"checked":"unchecked"}const Y$=vT,bT=yT,Wt=p.forwardRef(({className:e,...t},n)=>d.jsx(Y$,{className:se("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:d.jsx(bT,{className:se("pointer-events-none block h-5 w-5 dark:data-[state=checked]:bg-slate-800 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Wt.displayName=Y$.displayName;var ST={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Qb=e=>{let t;const n=new Set,r=(h,m)=>{const v=typeof h=="function"?h(t):h;if(!Object.is(v,t)){const x=t;t=m??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(w=>w(t,x))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(ST?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,o,u);return u},CT=e=>e?Qb(e):Qb;var X$={exports:{}},Q$={},J$={exports:{}},Z$={};/**
+ * @license React
+ * use-sync-external-store-shim.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 Ha=p;function $T(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PT=typeof Object.is=="function"?Object.is:$T,ET=Ha.useState,RT=Ha.useEffect,_T=Ha.useLayoutEffect,NT=Ha.useDebugValue;function kT(e,t){var n=t(),r=ET({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return _T(function(){o.value=n,o.getSnapshot=t,ug(o)&&i({inst:o})},[e,n,t]),RT(function(){return ug(o)&&i({inst:o}),e(function(){ug(o)&&i({inst:o})})},[e]),NT(n),n}function ug(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!PT(e,n)}catch{return!0}}function DT(e,t){return t()}var jT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DT:kT;Z$.useSyncExternalStore=Ha.useSyncExternalStore!==void 0?Ha.useSyncExternalStore:jT;J$.exports=Z$;var MT=J$.exports;/**
+ * @license React
+ * use-sync-external-store-shim/with-selector.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 Kf=p,TT=MT;function IT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OT=typeof Object.is=="function"?Object.is:IT,LT=TT.useSyncExternalStore,AT=Kf.useRef,FT=Kf.useEffect,zT=Kf.useMemo,UT=Kf.useDebugValue;Q$.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=AT(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=zT(function(){function u(x){if(!f){if(f=!0,h=x,x=r(x),o!==void 0&&a.hasValue){var w=a.value;if(o(w,x))return m=w}return m=x}if(w=m,OT(h,x))return w;var b=r(x);return o!==void 0&&o(w,b)?w:(h=x,m=b)}var f=!1,h,m,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,o]);var c=LT(e,i[0],i[1]);return FT(function(){a.hasValue=!0,a.value=c},[c]),UT(c),c};X$.exports=Q$;var BT=X$.exports;const VT=Qa(BT);var eP={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:HT}=ce,{useSyncExternalStoreWithSelector:WT}=VT;let Jb=!1;const KT=e=>e;function GT(e,t=KT,n){(eP?"production":void 0)!=="production"&&n&&!Jb&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Jb=!0);const r=WT(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return HT(r),r}const Zb=e=>{(eP?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?CT(e):e,n=(r,o)=>GT(t,r,o);return Object.assign(n,t),n},Ms=e=>e?Zb(e):Zb,df=Ms(e=>({settings:{},updateSetting:t=>e(n=>({settings:{...n.settings,...t}})),setSettings:t=>e(()=>({settings:t}))}));var ff={exports:{}};/**
+ * @license
+ * Lodash
+ * Copyright OpenJS Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */ff.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",m=1,v=2,x=4,w=1,b=2,P=1,C=2,S=4,E=8,_=16,D=32,N=64,j=128,O=256,V=512,J=30,ie="...",te=800,ge=16,le=1,T=2,W=3,Y=1/0,U=9007199254740991,B=17976931348623157e292,L=NaN,H=4294967295,oe=H-1,ne=H>>>1,fe=[["ary",j],["bind",P],["bindKey",C],["curry",E],["curryRight",_],["flip",V],["partial",D],["partialRight",N],["rearg",O]],Se="[object Arguments]",me="[object Array]",pe="[object AsyncFunction]",Te="[object Boolean]",Fe="[object Date]",We="[object DOMException]",Pe="[object Error]",Me="[object Function]",Mt="[object GeneratorFunction]",lt="[object Map]",Qe="[object Number]",tn="[object Null]",Ut="[object Object]",Jo="[object Promise]",Xr="[object Proxy]",Dr="[object RegExp]",vt="[object Set]",dr="[object String]",xn="[object Symbol]",Kn="[object Undefined]",Yt="[object WeakMap]",Ki="[object WeakSet]",fr="[object ArrayBuffer]",jr="[object DataView]",yn="[object Float32Array]",Zo="[object Float64Array]",Qr="[object Int8Array]",wn="[object Int16Array]",Gi="[object Int32Array]",De="[object Uint8Array]",nt="[object Uint8ClampedArray]",ft="[object Uint16Array]",Xt="[object Uint32Array]",jn=/\b__p \+= '';/g,go=/\b(__p \+=) '' \+/g,cl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ul=/&(?:amp|lt|gt|quot|#39);/g,tu=/[&<>"']/g,z=RegExp(ul.source),K=RegExp(tu.source),Q=/<%-([\s\S]+?)%>/g,ue=/<%([\s\S]+?)%>/g,ye=/<%=([\s\S]+?)%>/g,Ve=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,je=/^\w*$/,Ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,be=/[\\^$.*+?()[\]{}|]/g,qe=RegExp(be.source),_t=/^\s+/,Ae=/\s/,dt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Mn=/,? & /,At=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ei=/[()=,{}\[\]\/\s]/,dl=/\\(\\)?/g,ti=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mr=/\w*$/,mo=/^[-+]0x[0-9a-f]+$/i,fl=/^0b[01]+$/i,pl=/^\[object .+?Constructor\]$/,hl=/^0o[0-7]+$/i,ni=/^(?:0|[1-9]\d*)$/,Fs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ot=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,bn="\\ud800-\\udfff",zs="\\u0300-\\u036f",Sp="\\ufe20-\\ufe2f",$R="\\u20d0-\\u20ff",_1=zs+Sp+$R,N1="\\u2700-\\u27bf",k1="a-z\\xdf-\\xf6\\xf8-\\xff",PR="\\xac\\xb1\\xd7\\xf7",ER="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",RR="\\u2000-\\u206f",_R=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",D1="A-Z\\xc0-\\xd6\\xd8-\\xde",j1="\\ufe0e\\ufe0f",M1=PR+ER+RR+_R,Cp="['’]",NR="["+bn+"]",T1="["+M1+"]",nu="["+_1+"]",I1="\\d+",kR="["+N1+"]",O1="["+k1+"]",L1="[^"+bn+M1+I1+N1+k1+D1+"]",$p="\\ud83c[\\udffb-\\udfff]",DR="(?:"+nu+"|"+$p+")",A1="[^"+bn+"]",Pp="(?:\\ud83c[\\udde6-\\uddff]){2}",Ep="[\\ud800-\\udbff][\\udc00-\\udfff]",Us="["+D1+"]",F1="\\u200d",z1="(?:"+O1+"|"+L1+")",jR="(?:"+Us+"|"+L1+")",U1="(?:"+Cp+"(?:d|ll|m|re|s|t|ve))?",B1="(?:"+Cp+"(?:D|LL|M|RE|S|T|VE))?",V1=DR+"?",H1="["+j1+"]?",MR="(?:"+F1+"(?:"+[A1,Pp,Ep].join("|")+")"+H1+V1+")*",TR="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",IR="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",W1=H1+V1+MR,OR="(?:"+[kR,Pp,Ep].join("|")+")"+W1,LR="(?:"+[A1+nu+"?",nu,Pp,Ep,NR].join("|")+")",AR=RegExp(Cp,"g"),FR=RegExp(nu,"g"),Rp=RegExp($p+"(?="+$p+")|"+LR+W1,"g"),zR=RegExp([Us+"?"+O1+"+"+U1+"(?="+[T1,Us,"$"].join("|")+")",jR+"+"+B1+"(?="+[T1,Us+z1,"$"].join("|")+")",Us+"?"+z1+"+"+U1,Us+"+"+B1,IR,TR,I1,OR].join("|"),"g"),UR=RegExp("["+F1+bn+_1+j1+"]"),BR=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,VR=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],HR=-1,xt={};xt[yn]=xt[Zo]=xt[Qr]=xt[wn]=xt[Gi]=xt[De]=xt[nt]=xt[ft]=xt[Xt]=!0,xt[Se]=xt[me]=xt[fr]=xt[Te]=xt[jr]=xt[Fe]=xt[Pe]=xt[Me]=xt[lt]=xt[Qe]=xt[Ut]=xt[Dr]=xt[vt]=xt[dr]=xt[Yt]=!1;var gt={};gt[Se]=gt[me]=gt[fr]=gt[jr]=gt[Te]=gt[Fe]=gt[yn]=gt[Zo]=gt[Qr]=gt[wn]=gt[Gi]=gt[lt]=gt[Qe]=gt[Ut]=gt[Dr]=gt[vt]=gt[dr]=gt[xn]=gt[De]=gt[nt]=gt[ft]=gt[Xt]=!0,gt[Pe]=gt[Me]=gt[Yt]=!1;var WR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},KR={"&":"&","<":"<",">":">",'"':""","'":"'"},GR={"&":"&","<":"<",">":">",""":'"',"'":"'"},qR={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},YR=parseFloat,XR=parseInt,K1=typeof oo=="object"&&oo&&oo.Object===Object&&oo,QR=typeof self=="object"&&self&&self.Object===Object&&self,nn=K1||QR||Function("return this")(),_p=t&&!t.nodeType&&t,qi=_p&&!0&&e&&!e.nodeType&&e,G1=qi&&qi.exports===_p,Np=G1&&K1.process,pr=function(){try{var A=qi&&qi.require&&qi.require("util").types;return A||Np&&Np.binding&&Np.binding("util")}catch{}}(),q1=pr&&pr.isArrayBuffer,Y1=pr&&pr.isDate,X1=pr&&pr.isMap,Q1=pr&&pr.isRegExp,J1=pr&&pr.isSet,Z1=pr&&pr.isTypedArray;function Gn(A,X,G){switch(G.length){case 0:return A.call(X);case 1:return A.call(X,G[0]);case 2:return A.call(X,G[0],G[1]);case 3:return A.call(X,G[0],G[1],G[2])}return A.apply(X,G)}function JR(A,X,G,ve){for(var Ie=-1,it=A==null?0:A.length;++Ie-1}function kp(A,X,G){for(var ve=-1,Ie=A==null?0:A.length;++ve-1;);return G}function ax(A,X){for(var G=A.length;G--&&Bs(X,A[G],0)>-1;);return G}function a_(A,X){for(var G=A.length,ve=0;G--;)A[G]===X&&++ve;return ve}var l_=Tp(WR),c_=Tp(KR);function u_(A){return"\\"+qR[A]}function d_(A,X){return A==null?n:A[X]}function Vs(A){return UR.test(A)}function f_(A){return BR.test(A)}function p_(A){for(var X,G=[];!(X=A.next()).done;)G.push(X.value);return G}function Ap(A){var X=-1,G=Array(A.size);return A.forEach(function(ve,Ie){G[++X]=[Ie,ve]}),G}function lx(A,X){return function(G){return A(X(G))}}function ii(A,X){for(var G=-1,ve=A.length,Ie=0,it=[];++G-1}function e5(s,l){var g=this.__data__,y=wu(g,s);return y<0?(++this.size,g.push([s,l])):g[y][1]=l,this}vo.prototype.clear=X_,vo.prototype.delete=Q_,vo.prototype.get=J_,vo.prototype.has=Z_,vo.prototype.set=e5;function xo(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l=l?s:l)),s}function vr(s,l,g,y,$,k){var M,I=l&m,F=l&v,Z=l&x;if(g&&(M=$?g(s,y,$,k):g(s)),M!==n)return M;if(!$t(s))return s;var ee=Le(s);if(ee){if(M=oN(s),!I)return Tn(s,M)}else{var re=un(s),de=re==Me||re==Mt;if(di(s))return Hx(s,I);if(re==Ut||re==Se||de&&!$){if(M=F||de?{}:cy(s),!I)return F?G5(s,m5(M,s)):K5(s,wx(M,s))}else{if(!gt[re])return $?s:{};M=iN(s,re,I)}}k||(k=new Ir);var we=k.get(s);if(we)return we;k.set(s,M),Ay(s)?s.forEach(function(_e){M.add(vr(_e,l,g,_e,s,k))}):Oy(s)&&s.forEach(function(_e,Ye){M.set(Ye,vr(_e,l,g,Ye,s,k))});var Re=Z?F?uh:ch:F?On:Qt,He=ee?n:Re(s);return hr(He||s,function(_e,Ye){He&&(Ye=_e,_e=s[Ye]),bl(M,Ye,vr(_e,l,g,Ye,s,k))}),M}function v5(s){var l=Qt(s);return function(g){return bx(g,s,l)}}function bx(s,l,g){var y=g.length;if(s==null)return!y;for(s=pt(s);y--;){var $=g[y],k=l[$],M=s[$];if(M===n&&!($ in s)||!k(M))return!1}return!0}function Sx(s,l,g){if(typeof s!="function")throw new gr(a);return _l(function(){s.apply(n,g)},l)}function Sl(s,l,g,y){var $=-1,k=ru,M=!0,I=s.length,F=[],Z=l.length;if(!I)return F;g&&(l=St(l,qn(g))),y?(k=kp,M=!1):l.length>=o&&(k=gl,M=!1,l=new Qi(l));e:for(;++$$?0:$+g),y=y===n||y>$?$:ze(y),y<0&&(y+=$),y=g>y?0:zy(y);g0&&g(I)?l>1?rn(I,l-1,g,y,$):oi($,I):y||($[$.length]=I)}return $}var Wp=Xx(),Px=Xx(!0);function Jr(s,l){return s&&Wp(s,l,Qt)}function Kp(s,l){return s&&Px(s,l,Qt)}function Su(s,l){return ri(l,function(g){return Co(s[g])})}function Zi(s,l){l=ci(l,s);for(var g=0,y=l.length;s!=null&&gl}function w5(s,l){return s!=null&&ct.call(s,l)}function b5(s,l){return s!=null&&l in pt(s)}function S5(s,l,g){return s>=cn(l,g)&&s=120&&ee.length>=120)?new Qi(M&&ee):n}ee=s[0];var re=-1,de=I[0];e:for(;++re<$&&Z.length-1;)I!==s&&pu.call(I,F,1),pu.call(s,F,1);return s}function Ox(s,l){for(var g=s?l.length:0,y=g-1;g--;){var $=l[g];if(g==y||$!==k){var k=$;So($)?pu.call(s,$,1):nh(s,$)}}return s}function Zp(s,l){return s+mu(mx()*(l-s+1))}function I5(s,l,g,y){for(var $=-1,k=Ht(gu((l-s)/(g||1)),0),M=G(k);k--;)M[y?k:++$]=s,s+=g;return M}function eh(s,l){var g="";if(!s||l<1||l>U)return g;do l%2&&(g+=s),l=mu(l/2),l&&(s+=s);while(l);return g}function Ke(s,l){return vh(fy(s,l,Ln),s+"")}function O5(s){return yx(ea(s))}function L5(s,l){var g=ea(s);return Mu(g,Ji(l,0,g.length))}function Pl(s,l,g,y){if(!$t(s))return s;l=ci(l,s);for(var $=-1,k=l.length,M=k-1,I=s;I!=null&&++$$?0:$+l),g=g>$?$:g,g<0&&(g+=$),$=l>g?0:g-l>>>0,l>>>=0;for(var k=G($);++y<$;)k[y]=s[y+l];return k}function z5(s,l){var g;return ai(s,function(y,$,k){return g=l(y,$,k),!g}),!!g}function $u(s,l,g){var y=0,$=s==null?y:s.length;if(typeof l=="number"&&l===l&&$<=ne){for(;y<$;){var k=y+$>>>1,M=s[k];M!==null&&!Xn(M)&&(g?M<=l:M=o){var Z=l?null:Q5(s);if(Z)return iu(Z);M=!1,$=gl,F=new Qi}else F=l?[]:I;e:for(;++y=y?s:xr(s,l,g)}var Vx=__||function(s){return nn.clearTimeout(s)};function Hx(s,l){if(l)return s.slice();var g=s.length,y=dx?dx(g):new s.constructor(g);return s.copy(y),y}function sh(s){var l=new s.constructor(s.byteLength);return new du(l).set(new du(s)),l}function B5(s,l){var g=l?sh(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function V5(s){var l=new s.constructor(s.source,Mr.exec(s));return l.lastIndex=s.lastIndex,l}function H5(s){return wl?pt(wl.call(s)):{}}function Wx(s,l){var g=l?sh(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Kx(s,l){if(s!==l){var g=s!==n,y=s===null,$=s===s,k=Xn(s),M=l!==n,I=l===null,F=l===l,Z=Xn(l);if(!I&&!Z&&!k&&s>l||k&&M&&F&&!I&&!Z||y&&M&&F||!g&&F||!$)return 1;if(!y&&!k&&!Z&&s=I)return F;var Z=g[y];return F*(Z=="desc"?-1:1)}}return s.index-l.index}function Gx(s,l,g,y){for(var $=-1,k=s.length,M=g.length,I=-1,F=l.length,Z=Ht(k-M,0),ee=G(F+Z),re=!y;++I1?g[$-1]:n,M=$>2?g[2]:n;for(k=s.length>3&&typeof k=="function"?($--,k):n,M&&Cn(g[0],g[1],M)&&(k=$<3?n:k,$=1),l=pt(l);++y<$;){var I=g[y];I&&s(l,I,y,k)}return l})}function Yx(s,l){return function(g,y){if(g==null)return g;if(!In(g))return s(g,y);for(var $=g.length,k=l?$:-1,M=pt(g);(l?k--:++k<$)&&y(M[k],k,M)!==!1;);return g}}function Xx(s){return function(l,g,y){for(var $=-1,k=pt(l),M=y(l),I=M.length;I--;){var F=M[s?I:++$];if(g(k[F],F,k)===!1)break}return l}}function q5(s,l,g){var y=l&P,$=El(s);function k(){var M=this&&this!==nn&&this instanceof k?$:s;return M.apply(y?g:this,arguments)}return k}function Qx(s){return function(l){l=st(l);var g=Vs(l)?Tr(l):n,y=g?g[0]:l.charAt(0),$=g?ui(g,1).join(""):l.slice(1);return y[s]()+$}}function Qs(s){return function(l){return Dp(Yy(qy(l).replace(AR,"")),s,"")}}function El(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=Ys(s.prototype),y=s.apply(g,l);return $t(y)?y:g}}function Y5(s,l,g){var y=El(s);function $(){for(var k=arguments.length,M=G(k),I=k,F=Js($);I--;)M[I]=arguments[I];var Z=k<3&&M[0]!==F&&M[k-1]!==F?[]:ii(M,F);if(k-=Z.length,k-1?$[k?l[M]:M]:n}}function Zx(s){return bo(function(l){var g=l.length,y=g,$=mr.prototype.thru;for(s&&l.reverse();y--;){var k=l[y];if(typeof k!="function")throw new gr(a);if($&&!M&&Du(k)=="wrapper")var M=new mr([],!0)}for(y=M?y:g;++y1&&tt.reverse(),ee&&FI))return!1;var Z=k.get(s),ee=k.get(l);if(Z&&ee)return Z==l&&ee==s;var re=-1,de=!0,we=g&b?new Qi:n;for(k.set(s,l),k.set(l,s);++re1?"& ":"")+l[y],l=l.join(g>2?", ":" "),s.replace(dt,`{
+/* [wrapped with `+l+`] */
+`)}function aN(s){return Le(s)||ns(s)||!!(hx&&s&&s[hx])}function So(s,l){var g=typeof s;return l=l??U,!!l&&(g=="number"||g!="symbol"&&ni.test(s))&&s>-1&&s%1==0&&s0){if(++l>=te)return arguments[0]}else l=0;return s.apply(n,arguments)}}function Mu(s,l){var g=-1,y=s.length,$=y-1;for(l=l===n?y:l;++g1?s[l-1]:n;return g=typeof g=="function"?(s.pop(),g):n,$y(s,g)});function Py(s){var l=R(s);return l.__chain__=!0,l}function x4(s,l){return l(s),s}function Tu(s,l){return l(s)}var y4=bo(function(s){var l=s.length,g=l?s[0]:0,y=this.__wrapped__,$=function(k){return Hp(k,s)};return l>1||this.__actions__.length||!(y instanceof Je)||!So(g)?this.thru($):(y=y.slice(g,+g+(l?1:0)),y.__actions__.push({func:Tu,args:[$],thisArg:n}),new mr(y,this.__chain__).thru(function(k){return l&&!k.length&&k.push(n),k}))});function w4(){return Py(this)}function b4(){return new mr(this.value(),this.__chain__)}function S4(){this.__values__===n&&(this.__values__=Fy(this.value()));var s=this.__index__>=this.__values__.length,l=s?n:this.__values__[this.__index__++];return{done:s,value:l}}function C4(){return this}function $4(s){for(var l,g=this;g instanceof yu;){var y=xy(g);y.__index__=0,y.__values__=n,l?$.__wrapped__=y:l=y;var $=y;g=g.__wrapped__}return $.__wrapped__=s,l}function P4(){var s=this.__wrapped__;if(s instanceof Je){var l=s;return this.__actions__.length&&(l=new Je(this)),l=l.reverse(),l.__actions__.push({func:Tu,args:[xh],thisArg:n}),new mr(l,this.__chain__)}return this.thru(xh)}function E4(){return Ux(this.__wrapped__,this.__actions__)}var R4=Eu(function(s,l,g){ct.call(s,g)?++s[g]:yo(s,g,1)});function _4(s,l,g){var y=Le(s)?ex:x5;return g&&Cn(s,l,g)&&(l=n),y(s,$e(l,3))}function N4(s,l){var g=Le(s)?ri:$x;return g(s,$e(l,3))}var k4=Jx(yy),D4=Jx(wy);function j4(s,l){return rn(Iu(s,l),1)}function M4(s,l){return rn(Iu(s,l),Y)}function T4(s,l,g){return g=g===n?1:ze(g),rn(Iu(s,l),g)}function Ey(s,l){var g=Le(s)?hr:ai;return g(s,$e(l,3))}function Ry(s,l){var g=Le(s)?ZR:Cx;return g(s,$e(l,3))}var I4=Eu(function(s,l,g){ct.call(s,g)?s[g].push(l):yo(s,g,[l])});function O4(s,l,g,y){s=In(s)?s:ea(s),g=g&&!y?ze(g):0;var $=s.length;return g<0&&(g=Ht($+g,0)),zu(s)?g<=$&&s.indexOf(l,g)>-1:!!$&&Bs(s,l,g)>-1}var L4=Ke(function(s,l,g){var y=-1,$=typeof l=="function",k=In(s)?G(s.length):[];return ai(s,function(M){k[++y]=$?Gn(l,M,g):Cl(M,l,g)}),k}),A4=Eu(function(s,l,g){yo(s,g,l)});function Iu(s,l){var g=Le(s)?St:kx;return g(s,$e(l,3))}function F4(s,l,g,y){return s==null?[]:(Le(l)||(l=l==null?[]:[l]),g=y?n:g,Le(g)||(g=g==null?[]:[g]),Tx(s,l,g))}var z4=Eu(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function U4(s,l,g){var y=Le(s)?Dp:ox,$=arguments.length<3;return y(s,$e(l,4),g,$,ai)}function B4(s,l,g){var y=Le(s)?e_:ox,$=arguments.length<3;return y(s,$e(l,4),g,$,Cx)}function V4(s,l){var g=Le(s)?ri:$x;return g(s,Au($e(l,3)))}function H4(s){var l=Le(s)?yx:O5;return l(s)}function W4(s,l,g){(g?Cn(s,l,g):l===n)?l=1:l=ze(l);var y=Le(s)?p5:L5;return y(s,l)}function K4(s){var l=Le(s)?h5:F5;return l(s)}function G4(s){if(s==null)return 0;if(In(s))return zu(s)?Hs(s):s.length;var l=un(s);return l==lt||l==vt?s.size:Xp(s).length}function q4(s,l,g){var y=Le(s)?jp:z5;return g&&Cn(s,l,g)&&(l=n),y(s,$e(l,3))}var Y4=Ke(function(s,l){if(s==null)return[];var g=l.length;return g>1&&Cn(s,l[0],l[1])?l=[]:g>2&&Cn(l[0],l[1],l[2])&&(l=[l[0]]),Tx(s,rn(l,1),[])}),Ou=N_||function(){return nn.Date.now()};function X4(s,l){if(typeof l!="function")throw new gr(a);return s=ze(s),function(){if(--s<1)return l.apply(this,arguments)}}function _y(s,l,g){return l=g?n:l,l=s&&l==null?s.length:l,wo(s,j,n,n,n,n,l)}function Ny(s,l){var g;if(typeof l!="function")throw new gr(a);return s=ze(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=n),g}}var wh=Ke(function(s,l,g){var y=P;if(g.length){var $=ii(g,Js(wh));y|=D}return wo(s,y,l,g,$)}),ky=Ke(function(s,l,g){var y=P|C;if(g.length){var $=ii(g,Js(ky));y|=D}return wo(l,y,s,g,$)});function Dy(s,l,g){l=g?n:l;var y=wo(s,E,n,n,n,n,n,l);return y.placeholder=Dy.placeholder,y}function jy(s,l,g){l=g?n:l;var y=wo(s,_,n,n,n,n,n,l);return y.placeholder=jy.placeholder,y}function My(s,l,g){var y,$,k,M,I,F,Z=0,ee=!1,re=!1,de=!0;if(typeof s!="function")throw new gr(a);l=wr(l)||0,$t(g)&&(ee=!!g.leading,re="maxWait"in g,k=re?Ht(wr(g.maxWait)||0,l):k,de="trailing"in g?!!g.trailing:de);function we(It){var Lr=y,Po=$;return y=$=n,Z=It,M=s.apply(Po,Lr),M}function Re(It){return Z=It,I=_l(Ye,l),ee?we(It):M}function He(It){var Lr=It-F,Po=It-Z,Jy=l-Lr;return re?cn(Jy,k-Po):Jy}function _e(It){var Lr=It-F,Po=It-Z;return F===n||Lr>=l||Lr<0||re&&Po>=k}function Ye(){var It=Ou();if(_e(It))return tt(It);I=_l(Ye,He(It))}function tt(It){return I=n,de&&y?we(It):(y=$=n,M)}function Qn(){I!==n&&Vx(I),Z=0,y=F=$=I=n}function $n(){return I===n?M:tt(Ou())}function Jn(){var It=Ou(),Lr=_e(It);if(y=arguments,$=this,F=It,Lr){if(I===n)return Re(F);if(re)return Vx(I),I=_l(Ye,l),we(F)}return I===n&&(I=_l(Ye,l)),M}return Jn.cancel=Qn,Jn.flush=$n,Jn}var Q4=Ke(function(s,l){return Sx(s,1,l)}),J4=Ke(function(s,l,g){return Sx(s,wr(l)||0,g)});function Z4(s){return wo(s,V)}function Lu(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new gr(a);var g=function(){var y=arguments,$=l?l.apply(this,y):y[0],k=g.cache;if(k.has($))return k.get($);var M=s.apply(this,y);return g.cache=k.set($,M)||k,M};return g.cache=new(Lu.Cache||xo),g}Lu.Cache=xo;function Au(s){if(typeof s!="function")throw new gr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function e6(s){return Ny(2,s)}var t6=U5(function(s,l){l=l.length==1&&Le(l[0])?St(l[0],qn($e())):St(rn(l,1),qn($e()));var g=l.length;return Ke(function(y){for(var $=-1,k=cn(y.length,g);++$=l}),ns=Rx(function(){return arguments}())?Rx:function(s){return Nt(s)&&ct.call(s,"callee")&&!px.call(s,"callee")},Le=G.isArray,m6=q1?qn(q1):$5;function In(s){return s!=null&&Fu(s.length)&&!Co(s)}function Tt(s){return Nt(s)&&In(s)}function v6(s){return s===!0||s===!1||Nt(s)&&Sn(s)==Te}var di=D_||jh,x6=Y1?qn(Y1):P5;function y6(s){return Nt(s)&&s.nodeType===1&&!Nl(s)}function w6(s){if(s==null)return!0;if(In(s)&&(Le(s)||typeof s=="string"||typeof s.splice=="function"||di(s)||Zs(s)||ns(s)))return!s.length;var l=un(s);if(l==lt||l==vt)return!s.size;if(Rl(s))return!Xp(s).length;for(var g in s)if(ct.call(s,g))return!1;return!0}function b6(s,l){return $l(s,l)}function S6(s,l,g){g=typeof g=="function"?g:n;var y=g?g(s,l):n;return y===n?$l(s,l,n,g):!!y}function Sh(s){if(!Nt(s))return!1;var l=Sn(s);return l==Pe||l==We||typeof s.message=="string"&&typeof s.name=="string"&&!Nl(s)}function C6(s){return typeof s=="number"&&gx(s)}function Co(s){if(!$t(s))return!1;var l=Sn(s);return l==Me||l==Mt||l==pe||l==Xr}function Iy(s){return typeof s=="number"&&s==ze(s)}function Fu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function $t(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function Nt(s){return s!=null&&typeof s=="object"}var Oy=X1?qn(X1):R5;function $6(s,l){return s===l||Yp(s,l,fh(l))}function P6(s,l,g){return g=typeof g=="function"?g:n,Yp(s,l,fh(l),g)}function E6(s){return Ly(s)&&s!=+s}function R6(s){if(uN(s))throw new Ie(i);return _x(s)}function _6(s){return s===null}function N6(s){return s==null}function Ly(s){return typeof s=="number"||Nt(s)&&Sn(s)==Qe}function Nl(s){if(!Nt(s)||Sn(s)!=Ut)return!1;var l=fu(s);if(l===null)return!0;var g=ct.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&lu.call(g)==P_}var Ch=Q1?qn(Q1):_5;function k6(s){return Iy(s)&&s>=-U&&s<=U}var Ay=J1?qn(J1):N5;function zu(s){return typeof s=="string"||!Le(s)&&Nt(s)&&Sn(s)==dr}function Xn(s){return typeof s=="symbol"||Nt(s)&&Sn(s)==xn}var Zs=Z1?qn(Z1):k5;function D6(s){return s===n}function j6(s){return Nt(s)&&un(s)==Yt}function M6(s){return Nt(s)&&Sn(s)==Ki}var T6=ku(Qp),I6=ku(function(s,l){return s<=l});function Fy(s){if(!s)return[];if(In(s))return zu(s)?Tr(s):Tn(s);if(ml&&s[ml])return p_(s[ml]());var l=un(s),g=l==lt?Ap:l==vt?iu:ea;return g(s)}function $o(s){if(!s)return s===0?s:0;if(s=wr(s),s===Y||s===-Y){var l=s<0?-1:1;return l*B}return s===s?s:0}function ze(s){var l=$o(s),g=l%1;return l===l?g?l-g:l:0}function zy(s){return s?Ji(ze(s),0,H):0}function wr(s){if(typeof s=="number")return s;if(Xn(s))return L;if($t(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=$t(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ix(s);var g=fl.test(s);return g||hl.test(s)?XR(s.slice(2),g?2:8):mo.test(s)?L:+s}function Uy(s){return Zr(s,On(s))}function O6(s){return s?Ji(ze(s),-U,U):s===0?s:0}function st(s){return s==null?"":Yn(s)}var L6=Xs(function(s,l){if(Rl(l)||In(l)){Zr(l,Qt(l),s);return}for(var g in l)ct.call(l,g)&&bl(s,g,l[g])}),By=Xs(function(s,l){Zr(l,On(l),s)}),Uu=Xs(function(s,l,g,y){Zr(l,On(l),s,y)}),A6=Xs(function(s,l,g,y){Zr(l,Qt(l),s,y)}),F6=bo(Hp);function z6(s,l){var g=Ys(s);return l==null?g:wx(g,l)}var U6=Ke(function(s,l){s=pt(s);var g=-1,y=l.length,$=y>2?l[2]:n;for($&&Cn(l[0],l[1],$)&&(y=1);++g1),k}),Zr(s,uh(s),g),y&&(g=vr(g,m|v|x,J5));for(var $=l.length;$--;)nh(g,l[$]);return g});function i7(s,l){return Hy(s,Au($e(l)))}var s7=bo(function(s,l){return s==null?{}:M5(s,l)});function Hy(s,l){if(s==null)return{};var g=St(uh(s),function(y){return[y]});return l=$e(l),Ix(s,g,function(y,$){return l(y,$[0])})}function a7(s,l,g){l=ci(l,s);var y=-1,$=l.length;for($||($=1,s=n);++y<$;){var k=s==null?n:s[eo(l[y])];k===n&&(y=$,k=g),s=Co(k)?k.call(s):k}return s}function l7(s,l,g){return s==null?s:Pl(s,l,g)}function c7(s,l,g,y){return y=typeof y=="function"?y:n,s==null?s:Pl(s,l,g,y)}var Wy=ry(Qt),Ky=ry(On);function u7(s,l,g){var y=Le(s),$=y||di(s)||Zs(s);if(l=$e(l,4),g==null){var k=s&&s.constructor;$?g=y?new k:[]:$t(s)?g=Co(k)?Ys(fu(s)):{}:g={}}return($?hr:Jr)(s,function(M,I,F){return l(g,M,I,F)}),g}function d7(s,l){return s==null?!0:nh(s,l)}function f7(s,l,g){return s==null?s:zx(s,l,ih(g))}function p7(s,l,g,y){return y=typeof y=="function"?y:n,s==null?s:zx(s,l,ih(g),y)}function ea(s){return s==null?[]:Lp(s,Qt(s))}function h7(s){return s==null?[]:Lp(s,On(s))}function g7(s,l,g){return g===n&&(g=l,l=n),g!==n&&(g=wr(g),g=g===g?g:0),l!==n&&(l=wr(l),l=l===l?l:0),Ji(wr(s),l,g)}function m7(s,l,g){return l=$o(l),g===n?(g=l,l=0):g=$o(g),s=wr(s),S5(s,l,g)}function v7(s,l,g){if(g&&typeof g!="boolean"&&Cn(s,l,g)&&(l=g=n),g===n&&(typeof l=="boolean"?(g=l,l=n):typeof s=="boolean"&&(g=s,s=n)),s===n&&l===n?(s=0,l=1):(s=$o(s),l===n?(l=s,s=0):l=$o(l)),s>l){var y=s;s=l,l=y}if(g||s%1||l%1){var $=mx();return cn(s+$*(l-s+YR("1e-"+(($+"").length-1))),l)}return Zp(s,l)}var x7=Qs(function(s,l,g){return l=l.toLowerCase(),s+(g?Gy(l):l)});function Gy(s){return Eh(st(s).toLowerCase())}function qy(s){return s=st(s),s&&s.replace(Fs,l_).replace(FR,"")}function y7(s,l,g){s=st(s),l=Yn(l);var y=s.length;g=g===n?y:Ji(ze(g),0,y);var $=g;return g-=l.length,g>=0&&s.slice(g,$)==l}function w7(s){return s=st(s),s&&K.test(s)?s.replace(tu,c_):s}function b7(s){return s=st(s),s&&qe.test(s)?s.replace(be,"\\$&"):s}var S7=Qs(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),C7=Qs(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),$7=Qx("toLowerCase");function P7(s,l,g){s=st(s),l=ze(l);var y=l?Hs(s):0;if(!l||y>=l)return s;var $=(l-y)/2;return Nu(mu($),g)+s+Nu(gu($),g)}function E7(s,l,g){s=st(s),l=ze(l);var y=l?Hs(s):0;return l&&y>>0,g?(s=st(s),s&&(typeof l=="string"||l!=null&&!Ch(l))&&(l=Yn(l),!l&&Vs(s))?ui(Tr(s),0,g):s.split(l,g)):[]}var M7=Qs(function(s,l,g){return s+(g?" ":"")+Eh(l)});function T7(s,l,g){return s=st(s),g=g==null?0:Ji(ze(g),0,s.length),l=Yn(l),s.slice(g,g+l.length)==l}function I7(s,l,g){var y=R.templateSettings;g&&Cn(s,l,g)&&(l=n),s=st(s),l=Uu({},l,y,oy);var $=Uu({},l.imports,y.imports,oy),k=Qt($),M=Lp($,k),I,F,Z=0,ee=l.interpolate||ot,re="__p += '",de=Fp((l.escape||ot).source+"|"+ee.source+"|"+(ee===ye?ti:ot).source+"|"+(l.evaluate||ot).source+"|$","g"),we="//# sourceURL="+(ct.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++HR+"]")+`
+`;s.replace(de,function(_e,Ye,tt,Qn,$n,Jn){return tt||(tt=Qn),re+=s.slice(Z,Jn).replace(ht,u_),Ye&&(I=!0,re+=`' +
+__e(`+Ye+`) +
+'`),$n&&(F=!0,re+=`';
+`+$n+`;
+__p += '`),tt&&(re+=`' +
+((__t = (`+tt+`)) == null ? '' : __t) +
+'`),Z=Jn+_e.length,_e}),re+=`';
+`;var Re=ct.call(l,"variable")&&l.variable;if(!Re)re=`with (obj) {
+`+re+`
+}
+`;else if(ei.test(Re))throw new Ie(c);re=(F?re.replace(jn,""):re).replace(go,"$1").replace(cl,"$1;"),re="function("+(Re||"obj")+`) {
+`+(Re?"":`obj || (obj = {});
+`)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
+function print() { __p += __j.call(arguments, '') }
+`:`;
+`)+re+`return __p
+}`;var He=Xy(function(){return it(k,we+"return "+re).apply(n,M)});if(He.source=re,Sh(He))throw He;return He}function O7(s){return st(s).toLowerCase()}function L7(s){return st(s).toUpperCase()}function A7(s,l,g){if(s=st(s),s&&(g||l===n))return ix(s);if(!s||!(l=Yn(l)))return s;var y=Tr(s),$=Tr(l),k=sx(y,$),M=ax(y,$)+1;return ui(y,k,M).join("")}function F7(s,l,g){if(s=st(s),s&&(g||l===n))return s.slice(0,cx(s)+1);if(!s||!(l=Yn(l)))return s;var y=Tr(s),$=ax(y,Tr(l))+1;return ui(y,0,$).join("")}function z7(s,l,g){if(s=st(s),s&&(g||l===n))return s.replace(_t,"");if(!s||!(l=Yn(l)))return s;var y=Tr(s),$=sx(y,Tr(l));return ui(y,$).join("")}function U7(s,l){var g=J,y=ie;if($t(l)){var $="separator"in l?l.separator:$;g="length"in l?ze(l.length):g,y="omission"in l?Yn(l.omission):y}s=st(s);var k=s.length;if(Vs(s)){var M=Tr(s);k=M.length}if(g>=k)return s;var I=g-Hs(y);if(I<1)return y;var F=M?ui(M,0,I).join(""):s.slice(0,I);if($===n)return F+y;if(M&&(I+=F.length-I),Ch($)){if(s.slice(I).search($)){var Z,ee=F;for($.global||($=Fp($.source,st(Mr.exec($))+"g")),$.lastIndex=0;Z=$.exec(ee);)var re=Z.index;F=F.slice(0,re===n?I:re)}}else if(s.indexOf(Yn($),I)!=I){var de=F.lastIndexOf($);de>-1&&(F=F.slice(0,de))}return F+y}function B7(s){return s=st(s),s&&z.test(s)?s.replace(ul,v_):s}var V7=Qs(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),Eh=Qx("toUpperCase");function Yy(s,l,g){return s=st(s),l=g?n:l,l===n?f_(s)?w_(s):r_(s):s.match(l)||[]}var Xy=Ke(function(s,l){try{return Gn(s,n,l)}catch(g){return Sh(g)?g:new Ie(g)}}),H7=bo(function(s,l){return hr(l,function(g){g=eo(g),yo(s,g,wh(s[g],s))}),s});function W7(s){var l=s==null?0:s.length,g=$e();return s=l?St(s,function(y){if(typeof y[1]!="function")throw new gr(a);return[g(y[0]),y[1]]}):[],Ke(function(y){for(var $=-1;++$U)return[];var g=H,y=cn(s,H);l=$e(l),s-=H;for(var $=Op(y,l);++g0||l<0)?new Je(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==n&&(l=ze(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},Je.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Je.prototype.toArray=function(){return this.take(H)},Jr(Je.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),y=/^(?:head|last)$/.test(l),$=R[y?"take"+(l=="last"?"Right":""):l],k=y||/^find/.test(l);$&&(R.prototype[l]=function(){var M=this.__wrapped__,I=y?[1]:arguments,F=M instanceof Je,Z=I[0],ee=F||Le(M),re=function(Ye){var tt=$.apply(R,oi([Ye],I));return y&&de?tt[0]:tt};ee&&g&&typeof Z=="function"&&Z.length!=1&&(F=ee=!1);var de=this.__chain__,we=!!this.__actions__.length,Re=k&&!de,He=F&&!we;if(!k&&ee){M=He?M:new Je(this);var _e=s.apply(M,I);return _e.__actions__.push({func:Tu,args:[re],thisArg:n}),new mr(_e,de)}return Re&&He?s.apply(this,I):(_e=this.thru(re),Re?y?_e.value()[0]:_e.value():_e)})}),hr(["pop","push","shift","sort","splice","unshift"],function(s){var l=su[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);R.prototype[s]=function(){var $=arguments;if(y&&!this.__chain__){var k=this.value();return l.apply(Le(k)?k:[],$)}return this[g](function(M){return l.apply(Le(M)?M:[],$)})}}),Jr(Je.prototype,function(s,l){var g=R[l];if(g){var y=g.name+"";ct.call(qs,y)||(qs[y]=[]),qs[y].push({name:l,func:g})}}),qs[Ru(n,C).name]=[{name:"wrapper",func:n}],Je.prototype.clone=B_,Je.prototype.reverse=V_,Je.prototype.value=H_,R.prototype.at=y4,R.prototype.chain=w4,R.prototype.commit=b4,R.prototype.next=S4,R.prototype.plant=$4,R.prototype.reverse=P4,R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=E4,R.prototype.first=R.prototype.head,ml&&(R.prototype[ml]=C4),R},Ws=b_();qi?((qi.exports=Ws)._=Ws,_p._=Ws):nn._=Ws}).call(oo)})(ff,ff.exports);var tP=ff.exports;const Bm=Qa(tP),no=(e,t)=>{p.useEffect(()=>{var r,o;const n=i=>{try{const a=JSON.parse(i.data);a.key===e&&t(a)}catch(a){console.error("Error parsing message",a)}};return(o=(r=window.chrome)==null?void 0:r.webview)==null||o.addEventListener("message",n),()=>{var i,a;(a=(i=window.chrome)==null?void 0:i.webview)==null||a.removeEventListener("message",n)}},[e,t])},qT=()=>Kj(),Gc=()=>({publish:e=>{var t,n;console.log(`Publishing FrontendMessage -> ${e.key}`),(n=(t=window.chrome)==null?void 0:t.webview)==null||n.postMessage(e)}}),YT=()=>{const e=Hi(),{t}=yv();return{prepareForToast:n=>{const r=n.payload,o={};typeof r.Value=="string"?o.Value=r.Value:Object.keys(r.Value??{}).forEach(u=>{var f;o[u]=(f=r.Value[u])==null?void 0:f.toString()});const i=t(`notification.${r.Type}.title`,o),a={duration:6e3,description:t(`notification.${r.Type}.description`,o)};return r.Action&&r.Action!==""&&(a.action={label:t(`notification.${r.Type}.action.label`),onClick:()=>{console.log(`Navigating to ${t(`notification.${r.Type}.action.navigate`)}`),e(t(`notification.${r.Type}.action.navigate`,o))}}),{title:i,options:a}}}},zt=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:se("rounded-lg bg-card text-card-foreground shadow-md border-4 border-transparent hover:border-gray-200 hover:bg-slate-100 hover:dark:border-primary ease-in-out transition-all hover:dark:bg-gray-700 group/card",e),...t}));zt.displayName="Card";const Rn=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:se("flex flex-col p-6",e),...t}));Rn.displayName="CardHeader";const pf=p.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...t}));pf.displayName="CardTitle";const XT=p.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:se("text-sm text-muted-foreground",e),...t}));XT.displayName="CardDescription";const Un=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:se("p-6 pt-0",e),...t}));Un.displayName="CardContent";const Lo=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:se("flex items-center p-6 pt-0",e),...t}));Lo.displayName="CardFooter";var nP={exports:{}},QT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",JT=QT,ZT=JT;function rP(){}function oP(){}oP.resetWarningCache=rP;var eI=function(){function e(r,o,i,a,c,u){if(u!==ZT){var f=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 f.name="Invariant Violation",f}}e.isRequired=e;function t(){return e}var n={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:oP,resetWarningCache:rP};return n.PropTypes=n,n};nP.exports=eI();var tI=nP.exports;const rs=Qa(tI);var nI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rI=Object.defineProperty,oI=Object.defineProperties,iI=Object.getOwnPropertyDescriptors,hf=Object.getOwnPropertySymbols,iP=Object.prototype.hasOwnProperty,sP=Object.prototype.propertyIsEnumerable,eS=(e,t,n)=>t in e?rI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tS=(e,t)=>{for(var n in t||(t={}))iP.call(t,n)&&eS(e,n,t[n]);if(hf)for(var n of hf(t))sP.call(t,n)&&eS(e,n,t[n]);return e},sI=(e,t)=>oI(e,iI(t)),aI=(e,t)=>{var n={};for(var r in e)iP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hf)for(var r of hf(e))t.indexOf(r)<0&&sP.call(e,r)&&(n[r]=e[r]);return n},Be=(e,t,n)=>{const r=p.forwardRef((o,i)=>{var a=o,{color:c="currentColor",size:u=24,stroke:f=2,children:h}=a,m=aI(a,["color","size","stroke","children"]);return p.createElement("svg",tS(sI(tS({ref:i},nI),{width:u,height:u,stroke:c,strokeWidth:f,className:`tabler-icon tabler-icon-${e}`}),m),[...n.map(([v,x])=>p.createElement(v,x)),...h||[]])});return r.propTypes={color:rs.string,size:rs.oneOfType([rs.string,rs.number]),stroke:rs.oneOfType([rs.string,rs.number])},r.displayName=`${t}`,r},lI=Be("123","Icon123",[["path",{d:"M3 10l2 -2v8",key:"svg-0"}],["path",{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3",key:"svg-1"}],["path",{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5",key:"svg-2"}]]),cI=Be("abc","IconAbc",[["path",{d:"M3 16v-6a2 2 0 1 1 4 0v6",key:"svg-0"}],["path",{d:"M3 13h4",key:"svg-1"}],["path",{d:"M10 8v6a2 2 0 1 0 4 0v-1a2 2 0 1 0 -4 0v1",key:"svg-2"}],["path",{d:"M20.732 12a2 2 0 0 0 -3.732 1v1a2 2 0 0 0 3.726 1.01",key:"svg-3"}]]),uI=Be("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),or=Be("arrows-left-right","IconArrowsLeftRight",[["path",{d:"M21 17l-18 0",key:"svg-0"}],["path",{d:"M6 10l-3 -3l3 -3",key:"svg-1"}],["path",{d:"M3 7l18 0",key:"svg-2"}],["path",{d:"M18 20l3 -3l-3 -3",key:"svg-3"}]]),aP=Be("arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),dI=Be("box","IconBox",[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]]),fI=Be("brand-discord","IconBrandDiscord",[["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-0"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3",key:"svg-2"}],["path",{d:"M7 16.5c3.5 1 6.5 1 10 0",key:"svg-3"}]]),pI=Be("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),hI=Be("brand-paypal","IconBrandPaypal",[["path",{d:"M10 13l2.5 0c2.5 0 5 -2.5 5 -5c0 -3 -1.9 -5 -5 -5h-5.5c-.5 0 -1 .5 -1 1l-2 14c0 .5 .5 1 1 1h2.8l1.2 -5c.1 -.6 .4 -1 1 -1zm7.5 -5.8c1.7 1 2.5 2.8 2.5 4.8c0 2.5 -2.5 4.5 -5 4.5h-2.6l-.6 3.6a1 1 0 0 1 -1 .8l-2.7 0a.5 .5 0 0 1 -.5 -.6l.2 -1.4",key:"svg-0"}]]),gI=Be("brand-youtube","IconBrandYoutube",[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3z",key:"svg-1"}]]),mI=Be("bulb","IconBulb",[["path",{d:"M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7",key:"svg-0"}],["path",{d:"M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3",key:"svg-1"}],["path",{d:"M9.7 17l4.6 0",key:"svg-2"}]]),Gf=Be("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),qf=Be("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),vI=Be("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),lP=Be("chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]),xI=Be("circle-plus","IconCirclePlus",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]]),yI=Be("circle","IconCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}]]),wI=Be("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),bI=Be("device-gamepad-2","IconDeviceGamepad2",[["path",{d:"M12 5h3.5a5 5 0 0 1 0 10h-5.5l-4.015 4.227a2.3 2.3 0 0 1 -3.923 -2.035l1.634 -8.173a5 5 0 0 1 4.904 -4.019h3.4z",key:"svg-0"}],["path",{d:"M14 15l4.07 4.284a2.3 2.3 0 0 0 3.925 -2.023l-1.6 -8.232",key:"svg-1"}],["path",{d:"M8 9v2",key:"svg-2"}],["path",{d:"M7 10h2",key:"svg-3"}],["path",{d:"M14 10h2",key:"svg-4"}]]),SI=Be("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),cP=Be("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),CI=Be("gauge","IconGauge",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M13.41 10.59l2.59 -2.59",key:"svg-2"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-3"}]]),Ao=Be("help","IconHelp",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 17l0 .01",key:"svg-1"}],["path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4",key:"svg-2"}]]),$I=Be("info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]),PI=Be("list-search","IconListSearch",[["path",{d:"M15 15m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M18.5 18.5l2.5 2.5",key:"svg-1"}],["path",{d:"M4 6h16",key:"svg-2"}],["path",{d:"M4 12h4",key:"svg-3"}],["path",{d:"M4 18h4",key:"svg-4"}]]),EI=Be("list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]),RI=Be("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),uP=Be("pencil","IconPencil",[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]]),_I=Be("player-play","IconPlayerPlay",[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]]),NI=Be("player-skip-forward","IconPlayerSkipForward",[["path",{d:"M4 5v14l12 -7z",key:"svg-0"}],["path",{d:"M20 5l0 14",key:"svg-1"}]]),kI=Be("player-stop","IconPlayerStop",[["path",{d:"M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}]]),DI=Be("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),jI=Be("power","IconPower",[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]]),MI=Be("question-mark","IconQuestionMark",[["path",{d:"M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4",key:"svg-0"}],["path",{d:"M12 19l0 .01",key:"svg-1"}]]),TI=Be("refresh-dot","IconRefreshDot",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),II=Be("refresh","IconRefresh",[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]]),OI=Be("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),LI=Be("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),AI=Be("sun-high","IconSunHigh",[["path",{d:"M14.828 14.828a4 4 0 1 0 -5.656 -5.656a4 4 0 0 0 5.656 5.656z",key:"svg-0"}],["path",{d:"M6.343 17.657l-1.414 1.414",key:"svg-1"}],["path",{d:"M6.343 6.343l-1.414 -1.414",key:"svg-2"}],["path",{d:"M17.657 6.343l1.414 -1.414",key:"svg-3"}],["path",{d:"M17.657 17.657l1.414 1.414",key:"svg-4"}],["path",{d:"M4 12h-2",key:"svg-5"}],["path",{d:"M12 4v-2",key:"svg-6"}],["path",{d:"M20 12h2",key:"svg-7"}],["path",{d:"M12 20v2",key:"svg-8"}]]),FI=Be("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),Yf=Be("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),nS=1,zI=.9,UI=.8,BI=.17,dg=.1,fg=.999,VI=.9999,HI=.99,WI=/[\\\/_+.#"@\[\(\{&]/,KI=/[\\\/_+.#"@\[\(\{&]/g,GI=/[\s-]/,dP=/[\s-]/g;function Vm(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?nS:HI;var c=`${o},${i}`;if(a[c]!==void 0)return a[c];for(var u=r.charAt(i),f=n.indexOf(u,o),h=0,m,v,x,w;f>=0;)m=Vm(e,t,n,r,f+1,i+1,a),m>h&&(f===o?m*=nS:WI.test(e.charAt(f-1))?(m*=UI,x=e.slice(o,f-1).match(KI),x&&o>0&&(m*=Math.pow(fg,x.length))):GI.test(e.charAt(f-1))?(m*=zI,w=e.slice(o,f-1).match(dP),w&&o>0&&(m*=Math.pow(fg,w.length))):(m*=BI,o>0&&(m*=Math.pow(fg,f-o))),e.charAt(f)!==t.charAt(i)&&(m*=VI)),(mm&&(m=v*dg)),m>h&&(h=m),f=n.indexOf(u,f+1);return a[c]=h,h}function rS(e){return e.toLowerCase().replace(dP," ")}function qI(e,t){return Vm(e,t,rS(e),rS(t),0,0,{})}function Ma(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function YI(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function fP(...e){return t=>e.forEach(n=>YI(n,t))}function qc(...e){return p.useCallback(fP(...e),e)}function XI(e,t=[]){let n=[];function r(i,a){const c=p.createContext(a),u=n.length;n=[...n,a];function f(m){const{scope:v,children:x,...w}=m,b=(v==null?void 0:v[e][u])||c,P=p.useMemo(()=>w,Object.values(w));return p.createElement(b.Provider,{value:P},x)}function h(m,v){const x=(v==null?void 0:v[e][u])||c,w=p.useContext(x);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return f.displayName=i+"Provider",[f,h]}const o=()=>{const i=n.map(a=>p.createContext(a));return function(c){const u=(c==null?void 0:c[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,QI(o,...t)]}function QI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((c,{useScope:u,scopeName:f})=>{const m=u(i)[`__scope${f}`];return{...c,...m}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const Hm=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},JI=b0.useId||(()=>{});let ZI=0;function pg(e){const[t,n]=p.useState(JI());return Hm(()=>{e||n(r=>r??String(ZI++))},[e]),e||(t?`radix-${t}`:"")}function Es(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function eO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=tO({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,c=Es(n),u=p.useCallback(f=>{if(i){const m=typeof f=="function"?f(e):f;m!==e&&c(m)}else o(f)},[i,e,o,c]);return[a,u]}function tO({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Es(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Cv=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(rO);if(i){const a=i.props.children,c=o.map(u=>u===i?p.Children.count(a)>1?p.Children.only(null):p.isValidElement(a)?a.props.children:null:u);return p.createElement(Wm,q({},r,{ref:t}),p.isValidElement(a)?p.cloneElement(a,void 0,c):null)}return p.createElement(Wm,q({},r,{ref:t}),n)});Cv.displayName="Slot";const Wm=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...oO(r,n.props),ref:fP(t,n.ref)}):p.Children.count(n)>1?p.Children.only(null):null});Wm.displayName="SlotClone";const nO=({children:e})=>p.createElement(p.Fragment,null,e);function rO(e){return p.isValidElement(e)&&e.type===nO}function oO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?n[r]=(...c)=>{i==null||i(...c),o==null||o(...c)}:r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const iO=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],Xf=iO.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...a}=r,c=i?Cv:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(c,q({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sO(e,t){e&&po.flushSync(()=>e.dispatchEvent(t))}function aO(e){const t=Es(e);p.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const Km="dismissableLayer.update",lO="dismissableLayer.pointerDownOutside",cO="dismissableLayer.focusOutside";let oS;const uO=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dO=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:c,...u}=e,f=p.useContext(uO),[h,m]=p.useState(null),[,v]=p.useState({}),x=qc(t,N=>m(N)),w=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),P=w.indexOf(b),C=h?w.indexOf(h):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,E=C>=P,_=fO(N=>{const j=N.target,O=[...f.branches].some(V=>V.contains(j));!E||O||(o==null||o(N),a==null||a(N),N.defaultPrevented||c==null||c())}),D=pO(N=>{const j=N.target;[...f.branches].some(V=>V.contains(j))||(i==null||i(N),a==null||a(N),N.defaultPrevented||c==null||c())});return aO(N=>{C===f.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&c&&(N.preventDefault(),c()))}),p.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(oS=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),iS(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=oS)}},[h,n,f]),p.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),iS())},[h,f]),p.useEffect(()=>{const N=()=>v({});return document.addEventListener(Km,N),()=>document.removeEventListener(Km,N)},[]),p.createElement(Xf.div,q({},u,{ref:x,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ma(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Ma(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Ma(e.onPointerDownCapture,_.onPointerDownCapture)}))});function fO(e){const t=Es(e),n=p.useRef(!1),r=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let f=function(){pP(lO,t,u,{discrete:!0})};var c=f;const u={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=f,document.addEventListener("click",r.current,{once:!0})):f()}n.current=!1},i=window.setTimeout(()=>{document.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),document.removeEventListener("pointerdown",o),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function pO(e){const t=Es(e),n=p.useRef(!1);return p.useEffect(()=>{const r=o=>{o.target&&!n.current&&pP(cO,t,{originalEvent:o},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function iS(){const e=new CustomEvent(Km);document.dispatchEvent(e)}function pP(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?sO(o,i):o.dispatchEvent(i)}const hg="focusScope.autoFocusOnMount",gg="focusScope.autoFocusOnUnmount",sS={bubbles:!1,cancelable:!0},hO=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,u]=p.useState(null),f=Es(o),h=Es(i),m=p.useRef(null),v=qc(t,b=>u(b)),x=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let C=function(E){if(x.paused||!c)return;const _=E.target;c.contains(_)?m.current=_:ss(m.current,{select:!0})},S=function(E){x.paused||!c||c.contains(E.relatedTarget)||ss(m.current,{select:!0})};var b=C,P=S;return document.addEventListener("focusin",C),document.addEventListener("focusout",S),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",S)}}},[r,c,x.paused]),p.useEffect(()=>{if(c){lS.add(x);const b=document.activeElement;if(!c.contains(b)){const C=new CustomEvent(hg,sS);c.addEventListener(hg,f),c.dispatchEvent(C),C.defaultPrevented||(gO(wO(hP(c)),{select:!0}),document.activeElement===b&&ss(c))}return()=>{c.removeEventListener(hg,f),setTimeout(()=>{const C=new CustomEvent(gg,sS);c.addEventListener(gg,h),c.dispatchEvent(C),C.defaultPrevented||ss(b??document.body,{select:!0}),c.removeEventListener(gg,h),lS.remove(x)},0)}}},[c,f,h,x]);const w=p.useCallback(b=>{if(!n&&!r||x.paused)return;const P=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,C=document.activeElement;if(P&&C){const S=b.currentTarget,[E,_]=mO(S);E&&_?!b.shiftKey&&C===_?(b.preventDefault(),n&&ss(E,{select:!0})):b.shiftKey&&C===E&&(b.preventDefault(),n&&ss(_,{select:!0})):C===S&&b.preventDefault()}},[n,r,x.paused]);return p.createElement(Xf.div,q({tabIndex:-1},a,{ref:v,onKeyDown:w}))});function gO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ss(r,{select:t}),document.activeElement!==n)return}function mO(e){const t=hP(e),n=aS(t,e),r=aS(t.reverse(),e);return[n,r]}function hP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function aS(e,t){for(const n of e)if(!vO(n,{upTo:t}))return n}function vO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xO(e){return e instanceof HTMLInputElement&&"select"in e}function ss(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xO(e)&&t&&e.select()}}const lS=yO();function yO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=cS(e,t),e.unshift(t)},remove(t){var n;e=cS(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function cS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wO(e){return e.filter(t=>t.tagName!=="A")}const bO=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Uf.createPortal(p.createElement(Xf.div,q({},o,{ref:t})),r):null});function SO(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Qf=e=>{const{present:t,children:n}=e,r=CO(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=qc(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Qf.displayName="Presence";function CO(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[c,u]=SO(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const f=ld(r.current);i.current=c==="mounted"?f:"none"},[c]),Hm(()=>{const f=r.current,h=o.current;if(h!==e){const v=i.current,x=ld(f);e?u("MOUNT"):x==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Hm(()=>{if(t){const f=m=>{const x=ld(r.current).includes(m.animationName);m.target===t&&x&&po.flushSync(()=>u("ANIMATION_END"))},h=m=>{m.target===t&&(i.current=ld(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:p.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function ld(e){return(e==null?void 0:e.animationName)||"none"}let mg=0;function $O(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:uS()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:uS()),mg++,()=>{mg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),mg--}},[])}function uS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var mn=function(){return mn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return OO;var t=LO(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},FO=Pv(),zO=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
+ .`.concat(PO,` {
+ overflow: hidden `).concat(r,`;
+ padding-right: `).concat(c,"px ").concat(r,`;
+ }
+ body {
+ overflow: hidden `).concat(r,`;
+ overscroll-behavior: contain;
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
+ padding-left: `.concat(o,`px;
+ padding-top: `).concat(i,`px;
+ padding-right: `).concat(a,`px;
+ margin-left:0;
+ margin-top:0;
+ margin-right: `).concat(c,"px ").concat(r,`;
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
+ }
+
+ .`).concat(lc,` {
+ right: `).concat(c,"px ").concat(r,`;
+ }
+
+ .`).concat(cc,` {
+ margin-right: `).concat(c,"px ").concat(r,`;
+ }
+
+ .`).concat(lc," .").concat(lc,` {
+ right: 0 `).concat(r,`;
+ }
+
+ .`).concat(cc," .").concat(cc,` {
+ margin-right: 0 `).concat(r,`;
+ }
+
+ body {
+ `).concat(EO,": ").concat(c,`px;
+ }
+`)},bP=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=p.useMemo(function(){return AO(o)},[o]);return p.createElement(FO,{styles:zO(i,!t,o,n?"":"!important")})},Gm=!1;if(typeof window<"u")try{var cd=Object.defineProperty({},"passive",{get:function(){return Gm=!0,!0}});window.addEventListener("test",cd,cd),window.removeEventListener("test",cd,cd)}catch{Gm=!1}var oa=Gm?{passive:!1}:!1,UO=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},BO=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},fS=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=SP(e,n);if(r){var o=CP(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},VO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},SP=function(e,t){return e==="v"?UO(t):BO(t)},CP=function(e,t){return e==="v"?VO(t):HO(t)},WO=function(e,t){return e==="h"&&t==="rtl"?-1:1},KO=function(e,t,n,r,o){var i=WO(e,window.getComputedStyle(t).direction),a=i*r,c=n.target,u=t.contains(c),f=!1,h=a>0,m=0,v=0;do{var x=CP(e,c),w=x[0],b=x[1],P=x[2],C=b-P-i*w;(w||C)&&SP(e,c)&&(m+=C,v+=w),c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&a>m)||!h&&(o&&v===0||!o&&-a>v))&&(f=!0),f},ud=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pS=function(e){return[e.deltaX,e.deltaY]},hS=function(e){return e&&"current"in e?e.current:e},GO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qO=function(e){return`
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
+`)},YO=0,ia=[];function XO(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(YO++)[0],i=p.useState(function(){return Pv()})[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=gP([e.lockRef.current],(e.shards||[]).map(hS),!0).filter(Boolean);return b.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=p.useCallback(function(b,P){if("touches"in b&&b.touches.length===2)return!a.current.allowPinchZoom;var C=ud(b),S=n.current,E="deltaX"in b?b.deltaX:S[0]-C[0],_="deltaY"in b?b.deltaY:S[1]-C[1],D,N=b.target,j=Math.abs(E)>Math.abs(_)?"h":"v";if("touches"in b&&j==="h"&&N.type==="range")return!1;var O=fS(j,N);if(!O)return!0;if(O?D=j:(D=j==="v"?"h":"v",O=fS(j,N)),!O)return!1;if(!r.current&&"changedTouches"in b&&(E||_)&&(r.current=D),!D)return!0;var V=r.current||D;return KO(V,P,b,V==="h"?E:_,!0)},[]),u=p.useCallback(function(b){var P=b;if(!(!ia.length||ia[ia.length-1]!==i)){var C="deltaY"in P?pS(P):ud(P),S=t.current.filter(function(D){return D.name===P.type&&D.target===P.target&&GO(D.delta,C)})[0];if(S&&S.should){P.preventDefault();return}if(!S){var E=(a.current.shards||[]).map(hS).filter(Boolean).filter(function(D){return D.contains(P.target)}),_=E.length>0?c(P,E[0]):!a.current.noIsolation;_&&P.preventDefault()}}},[]),f=p.useCallback(function(b,P,C,S){var E={name:b,delta:P,target:C,should:S};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(_){return _!==E})},1)},[]),h=p.useCallback(function(b){n.current=ud(b),r.current=void 0},[]),m=p.useCallback(function(b){f(b.type,pS(b),b.target,c(b,e.lockRef.current))},[]),v=p.useCallback(function(b){f(b.type,ud(b),b.target,c(b,e.lockRef.current))},[]);p.useEffect(function(){return ia.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",u,oa),document.addEventListener("touchmove",u,oa),document.addEventListener("touchstart",h,oa),function(){ia=ia.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,oa),document.removeEventListener("touchmove",u,oa),document.removeEventListener("touchstart",h,oa)}},[]);var x=e.removeScrollBar,w=e.inert;return p.createElement(p.Fragment,null,w?p.createElement(i,{styles:qO(o)}):null,x?p.createElement(bP,{gapMode:"margin"}):null)}const QO=yP(wP,XO);var $P=p.forwardRef(function(e,t){return p.createElement(Jf,mn({},e,{ref:t,sideCar:QO}))});$P.classNames=Jf.classNames;const JO=$P;var ZO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sa=new WeakMap,dd=new WeakMap,fd={},wg=0,PP=function(e){return e&&(e.host||PP(e.parentNode))},eL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=PP(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tL=function(e,t,n,r){var o=eL(t,Array.isArray(e)?e:[e]);fd[n]||(fd[n]=new WeakMap);var i=fd[n],a=[],c=new Set,u=new Set(o),f=function(m){!m||c.has(m)||(c.add(m),f(m.parentNode))};o.forEach(f);var h=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(v){if(c.has(v))h(v);else{var x=v.getAttribute(r),w=x!==null&&x!=="false",b=(sa.get(v)||0)+1,P=(i.get(v)||0)+1;sa.set(v,b),i.set(v,P),a.push(v),b===1&&w&&dd.set(v,!0),P===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}})};return h(t),c.clear(),wg++,function(){a.forEach(function(m){var v=sa.get(m)-1,x=i.get(m)-1;sa.set(m,v),i.set(m,x),v||(dd.has(m)||m.removeAttribute(r),dd.delete(m)),x||m.removeAttribute(n)}),wg--,wg||(sa=new WeakMap,sa=new WeakMap,dd=new WeakMap,fd={})}},Yc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||ZO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),tL(r,o,n,"aria-hidden")):function(){return null}};const EP="Dialog",[RP,LW]=XI(EP),[nL,Ts]=RP(EP),rL=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=p.useRef(null),u=p.useRef(null),[f=!1,h]=eO({prop:r,defaultProp:o,onChange:i});return p.createElement(nL,{scope:t,triggerRef:c,contentRef:u,contentId:pg(),titleId:pg(),descriptionId:pg(),open:f,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(m=>!m),[h]),modal:a},n)},_P="DialogPortal",[oL,NP]=RP(_P,{forceMount:void 0}),iL=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Ts(_P,t);return p.createElement(oL,{scope:t,forceMount:n},p.Children.map(r,a=>p.createElement(Qf,{present:n||i.open},p.createElement(bO,{asChild:!0,container:o},a))))},qm="DialogOverlay",sL=p.forwardRef((e,t)=>{const n=NP(qm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(qm,e.__scopeDialog);return i.modal?p.createElement(Qf,{present:r||i.open},p.createElement(aL,q({},o,{ref:t}))):null}),aL=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ts(qm,n);return p.createElement(JO,{as:Cv,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Xf.div,q({"data-state":DP(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Tc="DialogContent",lL=p.forwardRef((e,t)=>{const n=NP(Tc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ts(Tc,e.__scopeDialog);return p.createElement(Qf,{present:r||i.open},i.modal?p.createElement(cL,q({},o,{ref:t})):p.createElement(uL,q({},o,{ref:t})))}),cL=p.forwardRef((e,t)=>{const n=Ts(Tc,e.__scopeDialog),r=p.useRef(null),o=qc(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return Yc(i)},[]),p.createElement(kP,q({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ma(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ma(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:Ma(e.onFocusOutside,i=>i.preventDefault())}))}),uL=p.forwardRef((e,t)=>{const n=Ts(Tc,e.__scopeDialog),r=p.useRef(!1);return p.createElement(kP,q({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(r.current=!0);const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault()}}))}),kP=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,c=Ts(Tc,n),u=p.useRef(null),f=qc(t,u);return $O(),p.createElement(p.Fragment,null,p.createElement(hO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},p.createElement(dO,q({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":DP(c.open)},a,{ref:f,onDismiss:()=>c.onOpenChange(!1)}))),!1)});function DP(e){return e?"open":"closed"}const dL=rL,fL=iL,pL=sL,hL=lL;var gL='[cmdk-list-sizer=""]',Wl='[cmdk-group=""]',bg='[cmdk-group-items=""]',mL='[cmdk-group-heading=""]',Ev='[cmdk-item=""]',gS=`${Ev}:not([aria-disabled="true"])`,Ym="cmdk-item-select",No="data-value",vL=(e,t)=>qI(e,t),jP=p.createContext(void 0),Xc=()=>p.useContext(jP),MP=p.createContext(void 0),Rv=()=>p.useContext(MP),TP=p.createContext(void 0),IP=p.forwardRef((e,t)=>{let n=p.useRef(null),r=ua(()=>{var L,H,oe;return{search:"",value:(oe=(H=e.value)!=null?H:(L=e.defaultValue)==null?void 0:L.toLowerCase())!=null?oe:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=ua(()=>new Set),i=ua(()=>new Map),a=ua(()=>new Map),c=ua(()=>new Set),u=OP(e),{label:f,children:h,value:m,onValueChange:v,filter:x,shouldFilter:w,vimBindings:b=!0,...P}=e,C=p.useId(),S=p.useId(),E=p.useId(),_=_L();rl(()=>{if(m!==void 0){let L=m.trim().toLowerCase();r.current.value=L,_(6,ie),D.emit()}},[m]);let D=p.useMemo(()=>({subscribe:L=>(c.current.add(L),()=>c.current.delete(L)),snapshot:()=>r.current,setState:(L,H,oe)=>{var ne,fe,Se;if(!Object.is(r.current[L],H)){if(r.current[L]=H,L==="search")J(),O(),_(1,V);else if(L==="value")if(((ne=u.current)==null?void 0:ne.value)!==void 0){let me=H??"";(Se=(fe=u.current).onValueChange)==null||Se.call(fe,me);return}else oe||_(5,ie);D.emit()}},emit:()=>{c.current.forEach(L=>L())}}),[]),N=p.useMemo(()=>({value:(L,H)=>{H!==a.current.get(L)&&(a.current.set(L,H),r.current.filtered.items.set(L,j(H)),_(2,()=>{O(),D.emit()}))},item:(L,H)=>(o.current.add(L),H&&(i.current.has(H)?i.current.get(H).add(L):i.current.set(H,new Set([L]))),_(3,()=>{J(),O(),r.current.value||V(),D.emit()}),()=>{a.current.delete(L),o.current.delete(L),r.current.filtered.items.delete(L);let oe=te();_(4,()=>{J(),(oe==null?void 0:oe.getAttribute("id"))===L&&V(),D.emit()})}),group:L=>(i.current.has(L)||i.current.set(L,new Set),()=>{a.current.delete(L),i.current.delete(L)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],commandRef:n,listId:C,inputId:E,labelId:S}),[]);function j(L){var H,oe;let ne=(oe=(H=u.current)==null?void 0:H.filter)!=null?oe:vL;return L?ne(L,r.current.search):0}function O(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let L=r.current.filtered.items,H=[];r.current.filtered.groups.forEach(ne=>{let fe=i.current.get(ne),Se=0;fe.forEach(me=>{let pe=L.get(me);Se=Math.max(pe,Se)}),H.push([ne,Se])});let oe=n.current.querySelector(gL);ge().sort((ne,fe)=>{var Se,me;let pe=ne.getAttribute(No),Te=fe.getAttribute(No);return((Se=L.get(Te))!=null?Se:0)-((me=L.get(pe))!=null?me:0)}).forEach(ne=>{let fe=ne.closest(bg);fe?fe.appendChild(ne.parentElement===fe?ne:ne.closest(`${bg} > *`)):oe.appendChild(ne.parentElement===oe?ne:ne.closest(`${bg} > *`))}),H.sort((ne,fe)=>fe[1]-ne[1]).forEach(ne=>{let fe=n.current.querySelector(`${Wl}[${No}="${ne[0]}"]`);fe==null||fe.parentElement.appendChild(fe)})}function V(){let L=ge().find(oe=>!oe.ariaDisabled),H=L==null?void 0:L.getAttribute(No);D.setState("value",H||void 0)}function J(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let L=0;for(let H of o.current){let oe=a.current.get(H),ne=j(oe);r.current.filtered.items.set(H,ne),ne>0&&L++}for(let[H,oe]of i.current)for(let ne of oe)if(r.current.filtered.items.get(ne)>0){r.current.filtered.groups.add(H);break}r.current.filtered.count=L}function ie(){var L,H,oe;let ne=te();ne&&(((L=ne.parentElement)==null?void 0:L.firstChild)===ne&&((oe=(H=ne.closest(Wl))==null?void 0:H.querySelector(mL))==null||oe.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function te(){var L;return(L=n.current)==null?void 0:L.querySelector(`${Ev}[aria-selected="true"]`)}function ge(){return Array.from(n.current.querySelectorAll(gS))}function le(L){let H=ge()[L];H&&D.setState("value",H.getAttribute(No))}function T(L){var H;let oe=te(),ne=ge(),fe=ne.findIndex(me=>me===oe),Se=ne[fe+L];(H=u.current)!=null&&H.loop&&(Se=fe+L<0?ne[ne.length-1]:fe+L===ne.length?ne[0]:ne[fe+L]),Se&&D.setState("value",Se.getAttribute(No))}function W(L){let H=te(),oe=H==null?void 0:H.closest(Wl),ne;for(;oe&&!ne;)oe=L>0?EL(oe,Wl):RL(oe,Wl),ne=oe==null?void 0:oe.querySelector(gS);ne?D.setState("value",ne.getAttribute(No)):T(L)}let Y=()=>le(ge().length-1),U=L=>{L.preventDefault(),L.metaKey?Y():L.altKey?W(1):T(1)},B=L=>{L.preventDefault(),L.metaKey?le(0):L.altKey?W(-1):T(-1)};return p.createElement("div",{ref:Qc([n,t]),...P,"cmdk-root":"",onKeyDown:L=>{var H;if((H=P.onKeyDown)==null||H.call(P,L),!L.defaultPrevented)switch(L.key){case"n":case"j":{b&&L.ctrlKey&&U(L);break}case"ArrowDown":{U(L);break}case"p":case"k":{b&&L.ctrlKey&&B(L);break}case"ArrowUp":{B(L);break}case"Home":{L.preventDefault(),le(0);break}case"End":{L.preventDefault(),Y();break}case"Enter":if(!L.nativeEvent.isComposing){L.preventDefault();let oe=te();if(oe){let ne=new Event(Ym);oe.dispatchEvent(ne)}}}}},p.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:NL},f),p.createElement(MP.Provider,{value:D},p.createElement(jP.Provider,{value:N},h)))}),xL=p.forwardRef((e,t)=>{var n,r;let o=p.useId(),i=p.useRef(null),a=p.useContext(TP),c=Xc(),u=OP(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;rl(()=>c.item(o,a==null?void 0:a.id),[]);let h=LP(o,i,[e.value,e.children,i]),m=Rv(),v=Rs(D=>D.value&&D.value===h.current),x=Rs(D=>f||c.filter()===!1?!0:D.search?D.filtered.items.get(o)>0:!0);p.useEffect(()=>{let D=i.current;if(!(!D||e.disabled))return D.addEventListener(Ym,w),()=>D.removeEventListener(Ym,w)},[x,e.onSelect,e.disabled]);function w(){var D,N;b(),(N=(D=u.current).onSelect)==null||N.call(D,h.current)}function b(){m.setState("value",h.current,!0)}if(!x)return null;let{disabled:P,value:C,onSelect:S,forceMount:E,..._}=e;return p.createElement("div",{ref:Qc([i,t]),..._,id:o,"cmdk-item":"",role:"option","aria-disabled":P||void 0,"aria-selected":v||void 0,"data-disabled":P||void 0,"data-selected":v||void 0,onPointerMove:P?void 0:b,onClick:P?void 0:w},e.children)}),yL=p.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=p.useId(),c=p.useRef(null),u=p.useRef(null),f=p.useId(),h=Xc(),m=Rs(w=>o||h.filter()===!1?!0:w.search?w.filtered.groups.has(a):!0);rl(()=>h.group(a),[]),LP(a,c,[e.value,e.heading,u]);let v=p.useMemo(()=>({id:a,forceMount:o}),[o]),x=p.createElement(TP.Provider,{value:v},r);return p.createElement("div",{ref:Qc([c,t]),...i,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&p.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),p.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},x))}),wL=p.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=p.useRef(null),i=Rs(a=>!a.search);return!n&&!i?null:p.createElement("div",{ref:Qc([o,t]),...r,"cmdk-separator":"",role:"separator"})}),bL=p.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=Rv(),a=Rs(h=>h.search),c=Rs(h=>h.value),u=Xc(),f=p.useMemo(()=>{var h;let m=(h=u.commandRef.current)==null?void 0:h.querySelector(`${Ev}[${No}="${c}"]`);return m==null?void 0:m.getAttribute("id")},[c,u.commandRef]);return p.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),p.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":f,id:u.inputId,type:"text",value:o?e.value:a,onChange:h=>{o||i.setState("search",h.target.value),n==null||n(h.target.value)}})}),SL=p.forwardRef((e,t)=>{let{children:n,...r}=e,o=p.useRef(null),i=p.useRef(null),a=Xc();return p.useEffect(()=>{if(i.current&&o.current){let c=i.current,u=o.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;u.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),p.createElement("div",{ref:Qc([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},p.createElement("div",{ref:i,"cmdk-list-sizer":""},n))}),CL=p.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...c}=e;return p.createElement(dL,{open:n,onOpenChange:r},p.createElement(fL,{container:a},p.createElement(pL,{"cmdk-overlay":"",className:o}),p.createElement(hL,{"aria-label":e.label,"cmdk-dialog":"",className:i},p.createElement(IP,{ref:t,...c}))))}),$L=p.forwardRef((e,t)=>{let n=p.useRef(!0),r=Rs(o=>o.filtered.count===0);return p.useEffect(()=>{n.current=!1},[]),n.current||!r?null:p.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),PL=p.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return p.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},p.createElement("div",{"aria-hidden":!0},r))}),Wn=Object.assign(IP,{List:SL,Item:xL,Input:bL,Group:yL,Separator:wL,Dialog:CL,Empty:$L,Loading:PL});function EL(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function RL(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function OP(e){let t=p.useRef(e);return rl(()=>{t.current=e}),t}var rl=typeof window>"u"?p.useEffect:p.useLayoutEffect;function ua(e){let t=p.useRef();return t.current===void 0&&(t.current=e()),t}function Qc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Rs(e){let t=Rv(),n=()=>e(t.snapshot());return p.useSyncExternalStore(t.subscribe,n,n)}function LP(e,t,n){let r=p.useRef(),o=Xc();return rl(()=>{var i;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim().toLowerCase():r.current}})();o.value(e,a),(i=t.current)==null||i.setAttribute(No,a),r.current=a}),r}var _L=()=>{let[e,t]=p.useState(),n=ua(()=>new Map);return rl(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}},NL={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const kL=b0.useId||(()=>{});let DL=0;function co(e){const[t,n]=p.useState(kL());return _n(()=>{e||n(r=>r??String(DL++))},[e]),e||(t?`radix-${t}`:"")}function jL(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Xm="dismissableLayer.update",ML="dismissableLayer.pointerDownOutside",TL="dismissableLayer.focusOutside";let mS;const IL=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...f}=e,h=p.useContext(IL),[m,v]=p.useState(null),x=(n=m==null?void 0:m.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,w]=p.useState({}),b=Ze(t,O=>v(O)),P=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),S=P.indexOf(C),E=m?P.indexOf(m):-1,_=h.layersWithOutsidePointerEventsDisabled.size>0,D=E>=S,N=OL(O=>{const V=O.target,J=[...h.branches].some(ie=>ie.contains(V));!D||J||(i==null||i(O),c==null||c(O),O.defaultPrevented||u==null||u())},x),j=LL(O=>{const V=O.target;[...h.branches].some(ie=>ie.contains(V))||(a==null||a(O),c==null||c(O),O.defaultPrevented||u==null||u())},x);return jL(O=>{E===h.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&u&&(O.preventDefault(),u()))},x),p.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(mS=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),vS(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=mS)}},[m,x,r,h]),p.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),vS())},[m,h]),p.useEffect(()=>{const O=()=>w({});return document.addEventListener(Xm,O),()=>document.removeEventListener(Xm,O)},[]),p.createElement(Oe.div,q({},f,{ref:b,style:{pointerEvents:_?D?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,j.onFocusCapture),onBlurCapture:he(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,N.onPointerDownCapture)}))});function OL(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let h=function(){AP(ML,n,f,{discrete:!0})};var u=h;const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LL(e,t=globalThis==null?void 0:globalThis.document){const n=Zt(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&AP(TL,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vS(){const e=new CustomEvent(Xm);document.dispatchEvent(e)}function AP(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?K$(o,i):o.dispatchEvent(i)}const Sg="focusScope.autoFocusOnMount",Cg="focusScope.autoFocusOnUnmount",xS={bubbles:!1,cancelable:!0},ep=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[c,u]=p.useState(null),f=Zt(o),h=Zt(i),m=p.useRef(null),v=Ze(t,b=>u(b)),x=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let S=function(N){if(x.paused||!c)return;const j=N.target;c.contains(j)?m.current=j:mi(m.current,{select:!0})},E=function(N){if(x.paused||!c)return;const j=N.relatedTarget;j!==null&&(c.contains(j)||mi(m.current,{select:!0}))},_=function(N){if(document.activeElement===document.body)for(const O of N)O.removedNodes.length>0&&mi(c)};var b=S,P=E,C=_;document.addEventListener("focusin",S),document.addEventListener("focusout",E);const D=new MutationObserver(_);return c&&D.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",E),D.disconnect()}}},[r,c,x.paused]),p.useEffect(()=>{if(c){wS.add(x);const b=document.activeElement;if(!c.contains(b)){const C=new CustomEvent(Sg,xS);c.addEventListener(Sg,f),c.dispatchEvent(C),C.defaultPrevented||(AL(VL(FP(c)),{select:!0}),document.activeElement===b&&mi(c))}return()=>{c.removeEventListener(Sg,f),setTimeout(()=>{const C=new CustomEvent(Cg,xS);c.addEventListener(Cg,h),c.dispatchEvent(C),C.defaultPrevented||mi(b??document.body,{select:!0}),c.removeEventListener(Cg,h),wS.remove(x)},0)}}},[c,f,h,x]);const w=p.useCallback(b=>{if(!n&&!r||x.paused)return;const P=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,C=document.activeElement;if(P&&C){const S=b.currentTarget,[E,_]=FL(S);E&&_?!b.shiftKey&&C===_?(b.preventDefault(),n&&mi(E,{select:!0})):b.shiftKey&&C===E&&(b.preventDefault(),n&&mi(_,{select:!0})):C===S&&b.preventDefault()}},[n,r,x.paused]);return p.createElement(Oe.div,q({tabIndex:-1},a,{ref:v,onKeyDown:w}))});function AL(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mi(r,{select:t}),document.activeElement!==n)return}function FL(e){const t=FP(e),n=yS(t,e),r=yS(t.reverse(),e);return[n,r]}function FP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yS(e,t){for(const n of e)if(!zL(n,{upTo:t}))return n}function zL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function UL(e){return e instanceof HTMLInputElement&&"select"in e}function mi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&UL(e)&&t&&e.select()}}const wS=BL();function BL(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bS(e,t),e.unshift(t)},remove(t){var n;e=bS(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function VL(e){return e.filter(t=>t.tagName!=="A")}const tp=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Uf.createPortal(p.createElement(Oe.div,q({},o,{ref:t})),r):null});function HL(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Dn=e=>{const{present:t,children:n}=e,r=WL(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Ze(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Dn.displayName="Presence";function WL(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),a=e?"mounted":"unmounted",[c,u]=HL(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const f=pd(r.current);i.current=c==="mounted"?f:"none"},[c]),_n(()=>{const f=r.current,h=o.current;if(h!==e){const v=i.current,x=pd(f);e?u("MOUNT"):x==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),_n(()=>{if(t){const f=m=>{const x=pd(r.current).includes(m.animationName);m.target===t&&x&&po.flushSync(()=>u("ANIMATION_END"))},h=m=>{m.target===t&&(i.current=pd(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:p.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function pd(e){return(e==null?void 0:e.animationName)||"none"}let $g=0;function np(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:SS()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:SS()),$g++,()=>{$g===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),$g--}},[])}function SS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var zP=vP(),Pg=function(){},rp=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Pg,onWheelCapture:Pg,onTouchMoveCapture:Pg}),o=r[0],i=r[1],a=e.forwardProps,c=e.children,u=e.className,f=e.removeScrollBar,h=e.enabled,m=e.shards,v=e.sideCar,x=e.noIsolation,w=e.inert,b=e.allowPinchZoom,P=e.as,C=P===void 0?"div":P,S=$v(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=v,_=mP([n,t]),D=mn(mn({},S),o);return p.createElement(p.Fragment,null,h&&p.createElement(E,{sideCar:zP,removeScrollBar:f,shards:m,noIsolation:x,inert:w,setCallbacks:i,allowPinchZoom:!!b,lockRef:n}),a?p.cloneElement(p.Children.only(c),mn(mn({},D),{ref:_})):p.createElement(C,mn({},D,{className:u,ref:_}),c))});rp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rp.classNames={fullWidth:cc,zeroRight:lc};var Qm=!1;if(typeof window<"u")try{var hd=Object.defineProperty({},"passive",{get:function(){return Qm=!0,!0}});window.addEventListener("test",hd,hd),window.removeEventListener("test",hd,hd)}catch{Qm=!1}var aa=Qm?{passive:!1}:!1,KL=function(e){return e.tagName==="TEXTAREA"},UP=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!KL(e)&&n[t]==="visible")},GL=function(e){return UP(e,"overflowY")},qL=function(e){return UP(e,"overflowX")},CS=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=BP(e,n);if(r){var o=VP(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},YL=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},XL=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},BP=function(e,t){return e==="v"?GL(t):qL(t)},VP=function(e,t){return e==="v"?YL(t):XL(t)},QL=function(e,t){return e==="h"&&t==="rtl"?-1:1},JL=function(e,t,n,r,o){var i=QL(e,window.getComputedStyle(t).direction),a=i*r,c=n.target,u=t.contains(c),f=!1,h=a>0,m=0,v=0;do{var x=VP(e,c),w=x[0],b=x[1],P=x[2],C=b-P-i*w;(w||C)&&BP(e,c)&&(m+=C,v+=w),c=c.parentNode}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&(o&&m===0||!o&&a>m)||!h&&(o&&v===0||!o&&-a>v))&&(f=!0),f},gd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$S=function(e){return[e.deltaX,e.deltaY]},PS=function(e){return e&&"current"in e?e.current:e},ZL=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eA=function(e){return`
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
+`)},tA=0,la=[];function nA(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(tA++)[0],i=p.useState(function(){return Pv()})[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=gP([e.lockRef.current],(e.shards||[]).map(PS),!0).filter(Boolean);return b.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=p.useCallback(function(b,P){if("touches"in b&&b.touches.length===2)return!a.current.allowPinchZoom;var C=gd(b),S=n.current,E="deltaX"in b?b.deltaX:S[0]-C[0],_="deltaY"in b?b.deltaY:S[1]-C[1],D,N=b.target,j=Math.abs(E)>Math.abs(_)?"h":"v";if("touches"in b&&j==="h"&&N.type==="range")return!1;var O=CS(j,N);if(!O)return!0;if(O?D=j:(D=j==="v"?"h":"v",O=CS(j,N)),!O)return!1;if(!r.current&&"changedTouches"in b&&(E||_)&&(r.current=D),!D)return!0;var V=r.current||D;return JL(V,P,b,V==="h"?E:_,!0)},[]),u=p.useCallback(function(b){var P=b;if(!(!la.length||la[la.length-1]!==i)){var C="deltaY"in P?$S(P):gd(P),S=t.current.filter(function(D){return D.name===P.type&&D.target===P.target&&ZL(D.delta,C)})[0];if(S&&S.should){P.cancelable&&P.preventDefault();return}if(!S){var E=(a.current.shards||[]).map(PS).filter(Boolean).filter(function(D){return D.contains(P.target)}),_=E.length>0?c(P,E[0]):!a.current.noIsolation;_&&P.cancelable&&P.preventDefault()}}},[]),f=p.useCallback(function(b,P,C,S){var E={name:b,delta:P,target:C,should:S};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(_){return _!==E})},1)},[]),h=p.useCallback(function(b){n.current=gd(b),r.current=void 0},[]),m=p.useCallback(function(b){f(b.type,$S(b),b.target,c(b,e.lockRef.current))},[]),v=p.useCallback(function(b){f(b.type,gd(b),b.target,c(b,e.lockRef.current))},[]);p.useEffect(function(){return la.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",u,aa),document.addEventListener("touchmove",u,aa),document.addEventListener("touchstart",h,aa),function(){la=la.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,aa),document.removeEventListener("touchmove",u,aa),document.removeEventListener("touchstart",h,aa)}},[]);var x=e.removeScrollBar,w=e.inert;return p.createElement(p.Fragment,null,w?p.createElement(i,{styles:eA(o)}):null,x?p.createElement(bP,{gapMode:"margin"}):null)}const rA=yP(zP,nA);var HP=p.forwardRef(function(e,t){return p.createElement(rp,mn({},e,{ref:t,sideCar:rA}))});HP.classNames=rp.classNames;const op=HP,WP="Dialog",[KP,GP]=ur(WP),[oA,ho]=KP(WP),iA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,c=p.useRef(null),u=p.useRef(null),[f=!1,h]=Ii({prop:r,defaultProp:o,onChange:i});return p.createElement(oA,{scope:t,triggerRef:c,contentRef:u,contentId:co(),titleId:co(),descriptionId:co(),open:f,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(m=>!m),[h]),modal:a},n)},qP="DialogPortal",[sA,YP]=KP(qP,{forceMount:void 0}),aA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=ho(qP,t);return p.createElement(sA,{scope:t,forceMount:n},p.Children.map(r,a=>p.createElement(Dn,{present:n||i.open},p.createElement(tp,{asChild:!0,container:o},a))))},Jm="DialogOverlay",lA=p.forwardRef((e,t)=>{const n=YP(Jm,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ho(Jm,e.__scopeDialog);return i.modal?p.createElement(Dn,{present:r||i.open},p.createElement(cA,q({},o,{ref:t}))):null}),cA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ho(Jm,n);return p.createElement(op,{as:Vo,allowPinchZoom:!0,shards:[o.contentRef]},p.createElement(Oe.div,q({"data-state":JP(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Wa="DialogContent",uA=p.forwardRef((e,t)=>{const n=YP(Wa,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=ho(Wa,e.__scopeDialog);return p.createElement(Dn,{present:r||i.open},i.modal?p.createElement(dA,q({},o,{ref:t})):p.createElement(fA,q({},o,{ref:t})))}),dA=p.forwardRef((e,t)=>{const n=ho(Wa,e.__scopeDialog),r=p.useRef(null),o=Ze(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return Yc(i)},[]),p.createElement(XP,q({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault())}))}),fA=p.forwardRef((e,t)=>{const n=ho(Wa,e.__scopeDialog),r=p.useRef(!1),o=p.useRef(!1);return p.createElement(XP,q({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var c;r.current||(c=n.triggerRef.current)===null||c===void 0||c.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,c;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=i.target;((c=n.triggerRef.current)===null||c===void 0?void 0:c.contains(u))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),XP=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,c=ho(Wa,n),u=p.useRef(null),f=Ze(t,u);return np(),p.createElement(p.Fragment,null,p.createElement(ep,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},p.createElement(Zf,q({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":JP(c.open)},a,{ref:f,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),QP="DialogTitle",pA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ho(QP,n);return p.createElement(Oe.h2,q({id:o.titleId},r,{ref:t}))}),hA="DialogDescription",gA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ho(hA,n);return p.createElement(Oe.p,q({id:o.descriptionId},r,{ref:t}))}),mA="DialogClose",vA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ho(mA,n);return p.createElement(Oe.button,q({type:"button"},r,{ref:t,onClick:he(e.onClick,()=>o.onOpenChange(!1))}))});function JP(e){return e?"open":"closed"}const xA="DialogTitleWarning",[yA,AW]=uT(xA,{contentName:Wa,titleName:QP,docsSlug:"dialog"}),ZP=iA,eE=aA,_v=lA,Nv=uA,kv=pA,Dv=gA,jv=vA,tE=ZP,wA=eE,nE=p.forwardRef(({className:e,...t},n)=>d.jsx(_v,{ref:n,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nE.displayName=_v.displayName;const Mv=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(wA,{children:[d.jsx(nE,{}),d.jsxs(Nv,{ref:r,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(jv,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(Yf,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Mv.displayName=Nv.displayName;const rE=({className:e,...t})=>d.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rE.displayName="DialogHeader";const bA=p.forwardRef(({className:e,...t},n)=>d.jsx(kv,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));bA.displayName=kv.displayName;const SA=p.forwardRef(({className:e,...t},n)=>d.jsx(Dv,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));SA.displayName=Dv.displayName;const Tv=p.forwardRef(({className:e,...t},n)=>d.jsx(Wn,{ref:n,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Tv.displayName=Wn.displayName;const Iv=p.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d.jsx(OI,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),d.jsx(Wn.Input,{ref:n,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Iv.displayName=Wn.Input.displayName;const oE=p.forwardRef(({className:e,...t},n)=>d.jsx(Wn.List,{ref:n,className:se("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));oE.displayName=Wn.List.displayName;const Ov=p.forwardRef((e,t)=>d.jsx(Wn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ov.displayName=Wn.Empty.displayName;const gf=p.forwardRef(({className:e,...t},n)=>d.jsx(Wn.Group,{ref:n,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));gf.displayName=Wn.Group.displayName;const iE=p.forwardRef(({className:e,...t},n)=>d.jsx(Wn.Separator,{ref:n,className:se("-mx-1 h-px bg-border",e),...t}));iE.displayName=Wn.Separator.displayName;const mf=p.forwardRef(({className:e,...t},n)=>d.jsx(Wn.Item,{ref:n,className:se("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));mf.displayName=Wn.Item.displayName;const CA=["top","right","bottom","left"],Oi=Math.min,er=Math.max,vf=Math.round,md=Math.floor,Li=e=>({x:e,y:e}),$A={left:"right",right:"left",bottom:"top",top:"bottom"},PA={start:"end",end:"start"};function Zm(e,t,n){return er(e,Oi(t,n))}function Ho(e,t){return typeof e=="function"?e(t):e}function Wo(e){return e.split("-")[0]}function ol(e){return e.split("-")[1]}function Lv(e){return e==="x"?"y":"x"}function Av(e){return e==="y"?"height":"width"}function il(e){return["top","bottom"].includes(Wo(e))?"y":"x"}function Fv(e){return Lv(il(e))}function EA(e,t,n){n===void 0&&(n=!1);const r=ol(e),o=Fv(e),i=Av(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xf(a)),[a,xf(a)]}function RA(e){const t=xf(e);return[e0(e),t,e0(t)]}function e0(e){return e.replace(/start|end/g,t=>PA[t])}function _A(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function NA(e,t,n,r){const o=ol(e);let i=_A(Wo(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(e0)))),i}function xf(e){return e.replace(/left|right|bottom|top/g,t=>$A[t])}function kA(e){return{top:0,right:0,bottom:0,left:0,...e}}function sE(e){return typeof e!="number"?kA(e):{top:e,right:e,bottom:e,left:e}}function yf(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ES(e,t,n){let{reference:r,floating:o}=e;const i=il(t),a=Fv(t),c=Av(a),u=Wo(t),f=i==="y",h=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,v=r[c]/2-o[c]/2;let x;switch(u){case"top":x={x:h,y:r.y-o.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-o.width,y:m};break;default:x={x:r.x,y:r.y}}switch(ol(t)){case"start":x[a]-=v*(n&&f?-1:1);break;case"end":x[a]+=v*(n&&f?-1:1);break}return x}const DA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:m}=ES(f,r,u),v=r,x={},w=0;for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:u}=t,{element:f,padding:h=0}=Ho(e,t)||{};if(f==null)return{};const m=sE(h),v={x:n,y:r},x=Fv(o),w=Av(x),b=await a.getDimensions(f),P=x==="y",C=P?"top":"left",S=P?"bottom":"right",E=P?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[x]-v[x]-i.floating[w],D=v[x]-i.reference[x],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let j=N?N[E]:0;(!j||!await(a.isElement==null?void 0:a.isElement(N)))&&(j=c.floating[E]||i.floating[w]);const O=_/2-D/2,V=j/2-b[w]/2-1,J=Oi(m[C],V),ie=Oi(m[S],V),te=J,ge=j-b[w]-ie,le=j/2-b[w]/2+O,T=Zm(te,le,ge),W=!u.arrow&&ol(o)!=null&&le!==T&&i.reference[w]/2-(lete<=0)){var V,J;const te=(((V=i.flip)==null?void 0:V.index)||0)+1,ge=D[te];if(ge)return{data:{index:te,overflows:O},reset:{placement:ge}};let le=(J=O.filter(T=>T.overflows[0]<=0).sort((T,W)=>T.overflows[1]-W.overflows[1])[0])==null?void 0:J.placement;if(!le)switch(x){case"bestFit":{var ie;const T=(ie=O.map(W=>[W.placement,W.overflows.filter(Y=>Y>0).reduce((Y,U)=>Y+U,0)]).sort((W,Y)=>W[1]-Y[1])[0])==null?void 0:ie[0];T&&(le=T);break}case"initialPlacement":le=c;break}if(o!==le)return{reset:{placement:le}}}return{}}}};function RS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _S(e){return CA.some(t=>e[t]>=0)}const TA=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ho(e,t);switch(r){case"referenceHidden":{const i=await Ic(t,{...o,elementContext:"reference"}),a=RS(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:_S(a)}}}case"escaped":{const i=await Ic(t,{...o,altBoundary:!0}),a=RS(i,n.floating);return{data:{escapedOffsets:a,escaped:_S(a)}}}default:return{}}}}};async function IA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wo(n),c=ol(n),u=il(n)==="y",f=["left","top"].includes(a)?-1:1,h=i&&u?-1:1,m=Ho(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return c&&typeof w=="number"&&(x=c==="end"?w*-1:w),u?{x:x*h,y:v*f}:{x:v*f,y:x*h}}const OA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,u=await IA(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},LA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:P=>{let{x:C,y:S}=P;return{x:C,y:S}}},...u}=Ho(e,t),f={x:n,y:r},h=await Ic(t,u),m=il(Wo(o)),v=Lv(m);let x=f[v],w=f[m];if(i){const P=v==="y"?"top":"left",C=v==="y"?"bottom":"right",S=x+h[P],E=x-h[C];x=Zm(S,x,E)}if(a){const P=m==="y"?"top":"left",C=m==="y"?"bottom":"right",S=w+h[P],E=w-h[C];w=Zm(S,w,E)}const b=c.fn({...t,[v]:x,[m]:w});return{...b,data:{x:b.x-n,y:b.y-r}}}}},AA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=Ho(e,t),h={x:n,y:r},m=il(o),v=Lv(m);let x=h[v],w=h[m];const b=Ho(c,t),P=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const E=v==="y"?"height":"width",_=i.reference[v]-i.floating[E]+P.mainAxis,D=i.reference[v]+i.reference[E]-P.mainAxis;x<_?x=_:x>D&&(x=D)}if(f){var C,S;const E=v==="y"?"width":"height",_=["top","left"].includes(Wo(o)),D=i.reference[m]-i.floating[E]+(_&&((C=a.offset)==null?void 0:C[m])||0)+(_?0:P.crossAxis),N=i.reference[m]+i.reference[E]+(_?0:((S=a.offset)==null?void 0:S[m])||0)-(_?P.crossAxis:0);wN&&(w=N)}return{[v]:x,[m]:w}}}},FA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...c}=Ho(e,t),u=await Ic(t,c),f=Wo(n),h=ol(n),m=il(n)==="y",{width:v,height:x}=r.floating;let w,b;f==="top"||f==="bottom"?(w=f,b=h===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=f,w=h==="end"?"top":"bottom");const P=x-u[w],C=v-u[b],S=!t.middlewareData.shift;let E=P,_=C;if(m){const N=v-u.left-u.right;_=h||S?Oi(C,N):N}else{const N=x-u.top-u.bottom;E=h||S?Oi(P,N):N}if(S&&!h){const N=er(u.left,0),j=er(u.right,0),O=er(u.top,0),V=er(u.bottom,0);m?_=v-2*(N!==0||j!==0?N+j:er(u.left,u.right)):E=x-2*(O!==0||V!==0?O+V:er(u.top,u.bottom))}await a({...t,availableWidth:_,availableHeight:E});const D=await o.getDimensions(i.floating);return v!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function Ai(e){return aE(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xo(e){var t;return(t=(aE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aE(e){return e instanceof Node||e instanceof ir(e).Node}function Ko(e){return e instanceof Element||e instanceof ir(e).Element}function fo(e){return e instanceof HTMLElement||e instanceof ir(e).HTMLElement}function NS(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}function Jc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function zA(e){return["table","td","th"].includes(Ai(e))}function zv(e){const t=Uv(),n=_r(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function UA(e){let t=Ka(e);for(;fo(t)&&!ip(t);){if(zv(t))return t;t=Ka(t)}return null}function Uv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ip(e){return["html","body","#document"].includes(Ai(e))}function _r(e){return ir(e).getComputedStyle(e)}function sp(e){return Ko(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ka(e){if(Ai(e)==="html")return e;const t=e.assignedSlot||e.parentNode||NS(e)&&e.host||Xo(e);return NS(t)?t.host:t}function lE(e){const t=Ka(e);return ip(t)?e.ownerDocument?e.ownerDocument.body:e.body:fo(t)&&Jc(t)?t:lE(t)}function Oc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=ir(o);return i?t.concat(a,a.visualViewport||[],Jc(o)?o:[],a.frameElement&&n?Oc(a.frameElement):[]):t.concat(o,Oc(o,[],n))}function cE(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fo(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=vf(n)!==i||vf(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function Bv(e){return Ko(e)?e:e.contextElement}function Ta(e){const t=Bv(e);if(!fo(t))return Li(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cE(t);let a=(i?vf(n.width):n.width)/r,c=(i?vf(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const BA=Li(0);function uE(e){const t=ir(e);return!Uv()||!t.visualViewport?BA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ir(e)?!1:t}function _s(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Bv(e);let a=Li(1);t&&(r?Ko(r)&&(a=Ta(r)):a=Ta(e));const c=VA(i,n,r)?uE(i):Li(0);let u=(o.left+c.x)/a.x,f=(o.top+c.y)/a.y,h=o.width/a.x,m=o.height/a.y;if(i){const v=ir(i),x=r&&Ko(r)?ir(r):r;let w=v,b=w.frameElement;for(;b&&r&&x!==w;){const P=Ta(b),C=b.getBoundingClientRect(),S=_r(b),E=C.left+(b.clientLeft+parseFloat(S.paddingLeft))*P.x,_=C.top+(b.clientTop+parseFloat(S.paddingTop))*P.y;u*=P.x,f*=P.y,h*=P.x,m*=P.y,u+=E,f+=_,w=ir(b),b=w.frameElement}}return yf({width:h,height:m,x:u,y:f})}const HA=[":popover-open",":modal"];function dE(e){return HA.some(t=>{try{return e.matches(t)}catch{return!1}})}function WA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Xo(r),c=t?dE(t.floating):!1;if(r===a||c&&i)return n;let u={scrollLeft:0,scrollTop:0},f=Li(1);const h=Li(0),m=fo(r);if((m||!m&&!i)&&((Ai(r)!=="body"||Jc(a))&&(u=sp(r)),fo(r))){const v=_s(r);f=Ta(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x,y:n.y*f.y-u.scrollTop*f.y+h.y}}function KA(e){return Array.from(e.getClientRects())}function fE(e){return _s(Xo(e)).left+sp(e).scrollLeft}function GA(e){const t=Xo(e),n=sp(e),r=e.ownerDocument.body,o=er(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=er(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+fE(e);const c=-n.scrollTop;return _r(r).direction==="rtl"&&(a+=er(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}function qA(e,t){const n=ir(e),r=Xo(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,u=0;if(o){i=o.width,a=o.height;const f=Uv();(!f||f&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:c,y:u}}function YA(e,t){const n=_s(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=fo(e)?Ta(e):Li(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,u=o*i.x,f=r*i.y;return{width:a,height:c,x:u,y:f}}function kS(e,t,n){let r;if(t==="viewport")r=qA(e,n);else if(t==="document")r=GA(Xo(e));else if(Ko(t))r=YA(t,n);else{const o=uE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return yf(r)}function pE(e,t){const n=Ka(e);return n===t||!Ko(n)||ip(n)?!1:_r(n).position==="fixed"||pE(n,t)}function XA(e,t){const n=t.get(e);if(n)return n;let r=Oc(e,[],!1).filter(c=>Ko(c)&&Ai(c)!=="body"),o=null;const i=_r(e).position==="fixed";let a=i?Ka(e):e;for(;Ko(a)&&!ip(a);){const c=_r(a),u=zv(a);!u&&c.position==="fixed"&&(o=null),(i?!u&&!o:!u&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Jc(a)&&!u&&pE(e,a))?r=r.filter(h=>h!==a):o=c,a=Ka(a)}return t.set(e,r),r}function QA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?XA(t,this._c):[].concat(n),r],c=a[0],u=a.reduce((f,h)=>{const m=kS(t,h,o);return f.top=er(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=er(m.left,f.left),f},kS(t,c,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JA(e){const{width:t,height:n}=cE(e);return{width:t,height:n}}function ZA(e,t,n){const r=fo(t),o=Xo(t),i=n==="fixed",a=_s(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Li(0);if(r||!r&&!i)if((Ai(t)!=="body"||Jc(o))&&(c=sp(t)),r){const m=_s(t,!0,i,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&(u.x=fE(o));const f=a.left+c.scrollLeft-u.x,h=a.top+c.scrollTop-u.y;return{x:f,y:h,width:a.width,height:a.height}}function DS(e,t){return!fo(e)||_r(e).position==="fixed"?null:t?t(e):e.offsetParent}function hE(e,t){const n=ir(e);if(!fo(e)||dE(e))return n;let r=DS(e,t);for(;r&&zA(r)&&_r(r).position==="static";)r=DS(r,t);return r&&(Ai(r)==="html"||Ai(r)==="body"&&_r(r).position==="static"&&!zv(r))?n:r||UA(e)||n}const eF=async function(e){const t=this.getOffsetParent||hE,n=this.getDimensions;return{reference:ZA(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function tF(e){return _r(e).direction==="rtl"}const nF={convertOffsetParentRelativeRectToViewportRelativeRect:WA,getDocumentElement:Xo,getClippingRect:QA,getOffsetParent:hE,getElementRects:eF,getClientRects:KA,getDimensions:JA,getScale:Ta,isElement:Ko,isRTL:tF};function rF(e,t){let n=null,r;const o=Xo(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const{left:f,top:h,width:m,height:v}=e.getBoundingClientRect();if(c||t(),!m||!v)return;const x=md(h),w=md(o.clientWidth-(f+m)),b=md(o.clientHeight-(h+v)),P=md(f),S={rootMargin:-x+"px "+-w+"px "+-b+"px "+-P+"px",threshold:er(0,Oi(1,u))||1};let E=!0;function _(D){const N=D[0].intersectionRatio;if(N!==u){if(!E)return a();N?a(!1,N):r=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{n=new IntersectionObserver(_,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,S)}n.observe(e)}return a(!0),i}function oF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=Bv(e),h=o||i?[...f?Oc(f):[],...Oc(t)]:[];h.forEach(C=>{o&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const m=f&&c?rF(f,n):null;let v=-1,x=null;a&&(x=new ResizeObserver(C=>{let[S]=C;S&&S.target===f&&x&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=x)==null||E.observe(t)})),n()}),f&&!u&&x.observe(f),x.observe(t));let w,b=u?_s(e):null;u&&P();function P(){const C=_s(e);b&&(C.x!==b.x||C.y!==b.y||C.width!==b.width||C.height!==b.height)&&n(),b=C,w=requestAnimationFrame(P)}return n(),()=>{var C;h.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),m==null||m(),(C=x)==null||C.disconnect(),x=null,u&&cancelAnimationFrame(w)}}const iF=LA,sF=MA,aF=FA,lF=TA,jS=jA,cF=AA,uF=(e,t,n)=>{const r=new Map,o={platform:nF,...n},i={...o.platform,_c:r};return DA(e,t,{...o,platform:i})},dF=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jS({element:r.current,padding:o}).fn(n):{}:r?jS({element:r,padding:o}).fn(n):{}}}};var Td=typeof document<"u"?p.useLayoutEffect:p.useEffect;function wf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!wf(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!wf(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function gE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function MS(e,t){const n=gE(e);return Math.round(t*n)/n}function TS(e){const t=p.useRef(e);return Td(()=>{t.current=e}),t}function fF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[h,m]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=p.useState(r);wf(v,r)||x(r);const[w,b]=p.useState(null),[P,C]=p.useState(null),S=p.useCallback(Y=>{Y!==N.current&&(N.current=Y,b(Y))},[]),E=p.useCallback(Y=>{Y!==j.current&&(j.current=Y,C(Y))},[]),_=i||w,D=a||P,N=p.useRef(null),j=p.useRef(null),O=p.useRef(h),V=u!=null,J=TS(u),ie=TS(o),te=p.useCallback(()=>{if(!N.current||!j.current)return;const Y={placement:t,strategy:n,middleware:v};ie.current&&(Y.platform=ie.current),uF(N.current,j.current,Y).then(U=>{const B={...U,isPositioned:!0};ge.current&&!wf(O.current,B)&&(O.current=B,po.flushSync(()=>{m(B)}))})},[v,t,n,ie]);Td(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[f]);const ge=p.useRef(!1);Td(()=>(ge.current=!0,()=>{ge.current=!1}),[]),Td(()=>{if(_&&(N.current=_),D&&(j.current=D),_&&D){if(J.current)return J.current(_,D,te);te()}},[_,D,te,J,V]);const le=p.useMemo(()=>({reference:N,floating:j,setReference:S,setFloating:E}),[S,E]),T=p.useMemo(()=>({reference:_,floating:D}),[_,D]),W=p.useMemo(()=>{const Y={position:n,left:0,top:0};if(!T.floating)return Y;const U=MS(T.floating,h.x),B=MS(T.floating,h.y);return c?{...Y,transform:"translate("+U+"px, "+B+"px)",...gE(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:B}},[n,c,T.floating,h.x,h.y]);return p.useMemo(()=>({...h,update:te,refs:le,elements:T,floatingStyles:W}),[h,te,le,T,W])}const mE="Popper",[vE,sl]=ur(mE),[pF,xE]=vE(mE),hF=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(pF,{scope:t,anchor:r,onAnchorChange:o},n)},gF="PopperAnchor",mF=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=xE(gF,n),a=p.useRef(null),c=Ze(t,a);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:p.createElement(Oe.div,q({},o,{ref:c}))}),yE="PopperContent",[vF,FW]=vE(yE),xF=p.forwardRef((e,t)=>{var n,r,o,i,a,c,u,f;const{__scopePopper:h,side:m="bottom",sideOffset:v=0,align:x="center",alignOffset:w=0,arrowPadding:b=0,avoidCollisions:P=!0,collisionBoundary:C=[],collisionPadding:S=0,sticky:E="partial",hideWhenDetached:_=!1,updatePositionStrategy:D="optimized",onPlaced:N,...j}=e,O=xE(yE,h),[V,J]=p.useState(null),ie=Ze(t,Qe=>J(Qe)),[te,ge]=p.useState(null),le=W$(te),T=(n=le==null?void 0:le.width)!==null&&n!==void 0?n:0,W=(r=le==null?void 0:le.height)!==null&&r!==void 0?r:0,Y=m+(x!=="center"?"-"+x:""),U=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},B=Array.isArray(C)?C:[C],L=B.length>0,H={padding:U,boundary:B.filter(yF),altBoundary:L},{refs:oe,floatingStyles:ne,placement:fe,isPositioned:Se,middlewareData:me}=fF({strategy:"fixed",placement:Y,whileElementsMounted:(...Qe)=>oF(...Qe,{animationFrame:D==="always"}),elements:{reference:O.anchor},middleware:[OA({mainAxis:v+W,alignmentAxis:w}),P&&iF({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?cF():void 0,...H}),P&&sF({...H}),aF({...H,apply:({elements:Qe,rects:tn,availableWidth:Ut,availableHeight:Jo})=>{const{width:Xr,height:Dr}=tn.reference,vt=Qe.floating.style;vt.setProperty("--radix-popper-available-width",`${Ut}px`),vt.setProperty("--radix-popper-available-height",`${Jo}px`),vt.setProperty("--radix-popper-anchor-width",`${Xr}px`),vt.setProperty("--radix-popper-anchor-height",`${Dr}px`)}}),te&&dF({element:te,padding:b}),wF({arrowWidth:T,arrowHeight:W}),_&&lF({strategy:"referenceHidden",...H})]}),[pe,Te]=wE(fe),Fe=Zt(N);_n(()=>{Se&&(Fe==null||Fe())},[Se,Fe]);const We=(o=me.arrow)===null||o===void 0?void 0:o.x,Pe=(i=me.arrow)===null||i===void 0?void 0:i.y,Me=((a=me.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Mt,lt]=p.useState();return _n(()=>{V&<(window.getComputedStyle(V).zIndex)},[V]),p.createElement("div",{ref:oe.setFloating,"data-radix-popper-content-wrapper":"",style:{...ne,transform:Se?ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Mt,"--radix-popper-transform-origin":[(c=me.transformOrigin)===null||c===void 0?void 0:c.x,(u=me.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},p.createElement(vF,{scope:h,placedSide:pe,onArrowChange:ge,arrowX:We,arrowY:Pe,shouldHideArrow:Me},p.createElement(Oe.div,q({"data-side":pe,"data-align":Te},j,{ref:ie,style:{...j.style,animation:Se?void 0:"none",opacity:(f=me.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))});function yF(e){return e!==null}const wF=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:c,rects:u,middlewareData:f}=t,m=((n=f.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,v=m?0:e.arrowWidth,x=m?0:e.arrowHeight,[w,b]=wE(c),P={start:"0%",center:"50%",end:"100%"}[b],C=((r=(o=f.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+v/2,S=((i=(a=f.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+x/2;let E="",_="";return w==="bottom"?(E=m?P:`${C}px`,_=`${-x}px`):w==="top"?(E=m?P:`${C}px`,_=`${u.floating.height+x}px`):w==="right"?(E=`${-x}px`,_=m?P:`${S}px`):w==="left"&&(E=`${u.floating.width+x}px`,_=m?P:`${S}px`),{data:{x:E,y:_}}}});function wE(e){const[t,n="center"]=e.split("-");return[t,n]}const Vv=hF,Hv=mF,Wv=xF,bE="Popover",[SE,zW]=ur(bE,[sl]),Kv=sl(),[bF,al]=SE(bE),SF=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,c=Kv(t),u=p.useRef(null),[f,h]=p.useState(!1),[m=!1,v]=Ii({prop:r,defaultProp:o,onChange:i});return p.createElement(Vv,c,p.createElement(bF,{scope:t,contentId:co(),triggerRef:u,open:m,onOpenChange:v,onOpenToggle:p.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:f,onCustomAnchorAdd:p.useCallback(()=>h(!0),[]),onCustomAnchorRemove:p.useCallback(()=>h(!1),[]),modal:a},n))},CF="PopoverTrigger",$F=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=al(CF,n),i=Kv(n),a=Ze(t,o.triggerRef),c=p.createElement(Oe.button,q({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":PE(o.open)},r,{ref:a,onClick:he(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?c:p.createElement(Hv,q({asChild:!0},i),c)}),CE="PopoverPortal",[PF,EF]=SE(CE,{forceMount:void 0}),RF=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=al(CE,t);return p.createElement(PF,{scope:t,forceMount:n},p.createElement(Dn,{present:n||i.open},p.createElement(tp,{asChild:!0,container:o},r)))},Lc="PopoverContent",_F=p.forwardRef((e,t)=>{const n=EF(Lc,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=al(Lc,e.__scopePopover);return p.createElement(Dn,{present:r||i.open},i.modal?p.createElement(NF,q({},o,{ref:t})):p.createElement(kF,q({},o,{ref:t})))}),NF=p.forwardRef((e,t)=>{const n=al(Lc,e.__scopePopover),r=p.useRef(null),o=Ze(t,r),i=p.useRef(!1);return p.useEffect(()=>{const a=r.current;if(a)return Yc(a)},[]),p.createElement(op,{as:Vo,allowPinchZoom:!0},p.createElement($E,q({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),i.current||(c=n.triggerRef.current)===null||c===void 0||c.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;i.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:he(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})))}),kF=p.forwardRef((e,t)=>{const n=al(Lc,e.__scopePopover),r=p.useRef(!1),o=p.useRef(!1);return p.createElement($E,q({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var c;r.current||(c=n.triggerRef.current)===null||c===void 0||c.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,c;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=i.target;((c=n.triggerRef.current)===null||c===void 0?void 0:c.contains(u))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),$E=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,...m}=e,v=al(Lc,n),x=Kv(n);return np(),p.createElement(ep,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},p.createElement(Zf,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>v.onOpenChange(!1)},p.createElement(Wv,q({"data-state":PE(v.open),role:"dialog",id:v.contentId},x,m,{ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function PE(e){return e?"open":"closed"}const DF=SF,jF=$F,MF=RF,EE=_F,RE=DF,_E=jF,Gv=p.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>d.jsx(MF,{children:d.jsx(EE,{ref:o,align:t,sideOffset:n,className:se("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Gv.displayName=EE.displayName;const TF=p.createContext(void 0);function Zc(e){const t=p.useContext(TF);return e||t||"ltr"}function t0(e,[t,n]){return Math.min(n,Math.max(t,e))}function IF(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const NE="ScrollArea",[kE,UW]=ur(NE),[OF,Nr]=kE(NE),LF=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...a}=e,[c,u]=p.useState(null),[f,h]=p.useState(null),[m,v]=p.useState(null),[x,w]=p.useState(null),[b,P]=p.useState(null),[C,S]=p.useState(0),[E,_]=p.useState(0),[D,N]=p.useState(!1),[j,O]=p.useState(!1),V=Ze(t,ie=>u(ie)),J=Zc(o);return p.createElement(OF,{scope:n,type:r,dir:J,scrollHideDelay:i,scrollArea:c,viewport:f,onViewportChange:h,content:m,onContentChange:v,scrollbarX:x,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:N,scrollbarY:b,onScrollbarYChange:P,scrollbarYEnabled:j,onScrollbarYEnabledChange:O,onCornerWidthChange:S,onCornerHeightChange:_},p.createElement(Oe.div,q({dir:J},a,{ref:V,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),AF="ScrollAreaViewport",FF=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Nr(AF,n),a=p.useRef(null),c=Ze(t,a,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Oe.div,q({"data-radix-scroll-area-viewport":""},o,{ref:c,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Qo="ScrollAreaScrollbar",DE=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nr(Qo,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,c=e.orientation==="horizontal";return p.useEffect(()=>(c?i(!0):a(!0),()=>{c?i(!1):a(!1)}),[c,i,a]),o.type==="hover"?p.createElement(zF,q({},r,{ref:t,forceMount:n})):o.type==="scroll"?p.createElement(UF,q({},r,{ref:t,forceMount:n})):o.type==="auto"?p.createElement(jE,q({},r,{ref:t,forceMount:n})):o.type==="always"?p.createElement(qv,q({},r,{ref:t})):null}),zF=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nr(Qo,e.__scopeScrollArea),[i,a]=p.useState(!1);return p.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const f=()=>{window.clearTimeout(u),a(!0)},h=()=>{u=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",f),c.addEventListener("pointerleave",h),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",f),c.removeEventListener("pointerleave",h)}}},[o.scrollArea,o.scrollHideDelay]),p.createElement(Dn,{present:n||i},p.createElement(jE,q({"data-state":i?"visible":"hidden"},r,{ref:t})))}),UF=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nr(Qo,e.__scopeScrollArea),i=e.orientation==="horizontal",a=lp(()=>u("SCROLL_END"),100),[c,u]=IF("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(c==="idle"){const f=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[c,o.scrollHideDelay,u]),p.useEffect(()=>{const f=o.viewport,h=i?"scrollLeft":"scrollTop";if(f){let m=f[h];const v=()=>{const x=f[h];m!==x&&(u("SCROLL"),a()),m=x};return f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[o.viewport,i,u,a]),p.createElement(Dn,{present:n||c!=="hidden"},p.createElement(qv,q({"data-state":c==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:he(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:he(e.onPointerLeave,()=>u("POINTER_LEAVE"))})))}),jE=p.forwardRef((e,t)=>{const n=Nr(Qo,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,a]=p.useState(!1),c=e.orientation==="horizontal",u=lp(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Nr(Qo,e.__scopeScrollArea),i=p.useRef(null),a=p.useRef(0),[c,u]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=OE(c.viewport,c.content),h={...r,sizes:c,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:v=>i.current=v,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:v=>a.current=v};function m(v,x){return YF(v,a.current,c,x)}return n==="horizontal"?p.createElement(BF,q({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const v=o.viewport.scrollLeft,x=IS(v,c,o.dir);i.current.style.transform=`translate3d(${x}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=m(v,o.dir))}})):n==="vertical"?p.createElement(VF,q({},h,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const v=o.viewport.scrollTop,x=IS(v,c);i.current.style.transform=`translate3d(0, ${x}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=m(v))}})):null}),BF=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Nr(Qo,e.__scopeScrollArea),[a,c]=p.useState(),u=p.useRef(null),f=Ze(t,u,i.onScrollbarXChange);return p.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),p.createElement(TE,q({"data-orientation":"horizontal"},o,{ref:f,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ap(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(i.viewport){const v=i.viewport.scrollLeft+h.deltaX;e.onWheelScroll(v),AE(v,m)&&h.preventDefault()}},onResize:()=>{u.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:bf(a.paddingLeft),paddingEnd:bf(a.paddingRight)}})}}))}),VF=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Nr(Qo,e.__scopeScrollArea),[a,c]=p.useState(),u=p.useRef(null),f=Ze(t,u,i.onScrollbarYChange);return p.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),p.createElement(TE,q({"data-orientation":"vertical"},o,{ref:f,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ap(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(i.viewport){const v=i.viewport.scrollTop+h.deltaY;e.onWheelScroll(v),AE(v,m)&&h.preventDefault()}},onResize:()=>{u.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:bf(a.paddingTop),paddingEnd:bf(a.paddingBottom)}})}}))}),[HF,ME]=kE(Qo),TE=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:h,onResize:m,...v}=e,x=Nr(Qo,n),[w,b]=p.useState(null),P=Ze(t,V=>b(V)),C=p.useRef(null),S=p.useRef(""),E=x.viewport,_=r.content-r.viewport,D=Zt(h),N=Zt(u),j=lp(m,10);function O(V){if(C.current){const J=V.clientX-C.current.left,ie=V.clientY-C.current.top;f({x:J,y:ie})}}return p.useEffect(()=>{const V=J=>{const ie=J.target;(w==null?void 0:w.contains(ie))&&D(J,_)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[E,w,_,D]),p.useEffect(N,[r,N]),Ga(w,j),Ga(x.content,j),p.createElement(HF,{scope:n,scrollbar:w,hasThumb:o,onThumbChange:Zt(i),onThumbPointerUp:Zt(a),onThumbPositionChange:N,onThumbPointerDown:Zt(c)},p.createElement(Oe.div,q({},v,{ref:P,style:{position:"absolute",...v.style},onPointerDown:he(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),C.current=w.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),O(V))}),onPointerMove:he(e.onPointerMove,O),onPointerUp:he(e.onPointerUp,V=>{const J=V.target;J.hasPointerCapture(V.pointerId)&&J.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=S.current,x.viewport&&(x.viewport.style.scrollBehavior=""),C.current=null})})))}),n0="ScrollAreaThumb",WF=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ME(n0,e.__scopeScrollArea);return p.createElement(Dn,{present:n||o.hasThumb},p.createElement(KF,q({ref:t},r)))}),KF=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Nr(n0,n),a=ME(n0,n),{onThumbPositionChange:c}=a,u=Ze(t,m=>a.onThumbChange(m)),f=p.useRef(),h=lp(()=>{f.current&&(f.current(),f.current=void 0)},100);return p.useEffect(()=>{const m=i.viewport;if(m){const v=()=>{if(h(),!f.current){const x=XF(m,c);f.current=x,c()}};return c(),m.addEventListener("scroll",v),()=>m.removeEventListener("scroll",v)}},[i.viewport,h,c]),p.createElement(Oe.div,q({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:he(e.onPointerDownCapture,m=>{const x=m.target.getBoundingClientRect(),w=m.clientX-x.left,b=m.clientY-x.top;a.onThumbPointerDown({x:w,y:b})}),onPointerUp:he(e.onPointerUp,a.onThumbPointerUp)}))}),IE="ScrollAreaCorner",GF=p.forwardRef((e,t)=>{const n=Nr(IE,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(qF,q({},e,{ref:t})):null}),qF=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Nr(IE,n),[i,a]=p.useState(0),[c,u]=p.useState(0),f=!!(i&&c);return Ga(o.scrollbarX,()=>{var h;const m=((h=o.scrollbarX)===null||h===void 0?void 0:h.offsetHeight)||0;o.onCornerHeightChange(m),u(m)}),Ga(o.scrollbarY,()=>{var h;const m=((h=o.scrollbarY)===null||h===void 0?void 0:h.offsetWidth)||0;o.onCornerWidthChange(m),a(m)}),f?p.createElement(Oe.div,q({},r,{ref:t,style:{width:i,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function bf(e){return e?parseInt(e,10):0}function OE(e,t){const n=e/t;return isNaN(n)?0:n}function ap(e){const t=OE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function YF(e,t,n,r="ltr"){const o=ap(n),i=o/2,a=t||i,c=o-a,u=n.scrollbar.paddingStart+a,f=n.scrollbar.size-n.scrollbar.paddingEnd-c,h=n.content-n.viewport,m=r==="ltr"?[0,h]:[h*-1,0];return LE([u,f],m)(e)}function IS(e,t,n="ltr"){const r=ap(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,c=i-r,u=n==="ltr"?[0,a]:[a*-1,0],f=t0(e,u);return LE([0,a],[0,c])(f)}function LE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function AE(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=n.left!==i.left,c=n.top!==i.top;(a||c)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function lp(e,t){const n=Zt(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ga(e,t){const n=Zt(t);_n(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const FE=LF,QF=FF,JF=GF,Yv=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(FE,{ref:r,className:se("relative overflow-hidden",e),...n,children:[d.jsx(QF,{className:"h-full w-full rounded-[inherit]",children:t}),d.jsx(zE,{}),d.jsx(JF,{})]}));Yv.displayName=FE.displayName;const zE=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>d.jsx(DE,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:d.jsx(WF,{className:"relative flex-1 rounded-full bg-border"})}));zE.displayName=DE.displayName;function Xe(e){var u;const t=e.className,n=e.options,r=e.value,o=e.onSelect,[i,a]=p.useState(!1),c=e.showFilter??!1;return d.jsxs(RE,{open:i,onOpenChange:a,children:[d.jsx(_E,{asChild:!0,children:d.jsxs(at,{variant:"outline",role:"combobox","aria-expanded":i,className:se("w-[200px] justify-between",t),children:[r?(u=n.find(f=>f.value===r))==null?void 0:u.label:"Select level...",d.jsx(qf,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),d.jsx(Gv,{className:se("w-[200px] p-0",t),children:d.jsxs(Tv,{children:[c&&d.jsx(Iv,{placeholder:"Select level..."}),d.jsx(Ov,{children:"No framework found."}),d.jsx(Yv,{className:"max-h-[300px]",children:d.jsx(gf,{children:n.map(f=>d.jsxs(mf,{role:"option",value:f.value,onSelect:()=>{o(f.value),a(!1)},children:[d.jsx(Gf,{className:se("mr-2 h-4 w-4",r===f.value?"opacity-100":"opacity-0")}),f.label]},f.value))})})]})})]})}const ZF="AlertDialog",[ez,BW]=ur(ZF,[GP]),Wi=GP(),tz=e=>{const{__scopeAlertDialog:t,...n}=e,r=Wi(t);return p.createElement(ZP,q({},r,n,{modal:!0}))},nz=e=>{const{__scopeAlertDialog:t,...n}=e,r=Wi(t);return p.createElement(eE,q({},r,n))},rz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Wi(n);return p.createElement(_v,q({},o,r,{ref:t}))}),UE="AlertDialogContent",[oz,iz]=ez(UE),sz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=Wi(n),a=p.useRef(null),c=Ze(t,a),u=p.useRef(null);return p.createElement(yA,{contentName:UE,titleName:az,docsSlug:"alert-dialog"},p.createElement(oz,{scope:n,cancelRef:u},p.createElement(Nv,q({role:"alertdialog"},i,o,{ref:c,onOpenAutoFocus:he(o.onOpenAutoFocus,f=>{var h;f.preventDefault(),(h=u.current)===null||h===void 0||h.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault()}),p.createElement(O$,null,r),!1)))}),az="AlertDialogTitle",lz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Wi(n);return p.createElement(kv,q({},o,r,{ref:t}))}),cz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Wi(n);return p.createElement(Dv,q({},o,r,{ref:t}))}),uz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Wi(n);return p.createElement(jv,q({},o,r,{ref:t}))}),dz="AlertDialogCancel",fz=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=iz(dz,n),i=Wi(n),a=Ze(t,o);return p.createElement(jv,q({},i,r,{ref:a}))}),pz=tz,hz=nz,BE=rz,VE=sz,HE=uz,WE=fz,KE=lz,GE=cz,qE=pz,gz=hz,YE=p.forwardRef(({className:e,...t},n)=>d.jsx(BE,{className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));YE.displayName=BE.displayName;const Xv=p.forwardRef(({className:e,...t},n)=>d.jsxs(gz,{children:[d.jsx(YE,{}),d.jsx(VE,{ref:n,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Xv.displayName=VE.displayName;const Qv=({className:e,...t})=>d.jsx("div",{className:se("flex flex-col space-y-2 text-center sm:text-left",e),...t});Qv.displayName="AlertDialogHeader";const Jv=({className:e,...t})=>d.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Jv.displayName="AlertDialogFooter";const Zv=p.forwardRef(({className:e,...t},n)=>d.jsx(KE,{ref:n,className:se("text-lg font-semibold",e),...t}));Zv.displayName=KE.displayName;const e1=p.forwardRef(({className:e,...t},n)=>d.jsx(GE,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));e1.displayName=GE.displayName;const t1=p.forwardRef(({className:e,...t},n)=>d.jsx(HE,{ref:n,className:se(Sv(),e),...t}));t1.displayName=HE.displayName;const n1=p.forwardRef(({className:e,...t},n)=>d.jsx(WE,{ref:n,className:se(Sv({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));n1.displayName=WE.displayName;function mz(){var u;const{settings:e}=df(),[t,n]=p.useState(),{publish:r}=Gc(),o=b$(({currentLocation:f,nextLocation:h})=>!Bm.isEqual(t,e)&&f.pathname!==h.pathname),i=f=>{n({...t,LogLevel:f})},a=f=>{n({...t,TestTimerInterval:Number.parseInt(f||"250")})},c=f=>{n({...t,Language:f})};return p.useEffect(()=>{n(df.getState().settings)},[e]),d.jsxs("div",{className:"flex flex-col gap-4 overflow-y-auto",children:[o&&d.jsx(qE,{open:o.state==="blocked",children:d.jsxs(Xv,{children:[d.jsxs(Qv,{children:[d.jsx(Zv,{children:"You have unsaved changes"}),d.jsx(e1,{children:"You will lose all unsaved changes if you continue."})]}),d.jsxs(Jv,{children:[d.jsx(n1,{onClick:()=>{var f;return(f=o.reset)==null?void 0:f.call(o)},children:"Cancel"}),d.jsx(t1,{onClick:()=>{var f;return(f=o.proceed)==null?void 0:f.call(o)},children:"Continue"})]})]})}),d.jsx("h2",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Global settings"}),d.jsxs("div",{className:"flex flex-row gap-4 flex-wrap overflow-y-auto pb-3",children:[d.jsxs(zt,{className:"w-[350px]",children:[d.jsx(Rn,{className:"flex flex-row gap-2 items-center",children:d.jsx("div",{className:"flex flex-col mt-0",children:d.jsx("div",{className:"text-xl font-semibold",children:"General"})})}),d.jsxs(Un,{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",children:"Number of recent files"}),d.jsxs(at,{variant:"outline",className:"flex flex-row p-3",children:[t==null?void 0:t.RecentFilesMaxCount,d.jsxs("div",{className:"flex flex-col",children:[d.jsx(lP,{role:"button",className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:stroke-primary hover:opacity-100",onClick:()=>n({...t,RecentFilesMaxCount:Math.min(10,((t==null?void 0:t.RecentFilesMaxCount)??5)+1)})}),d.jsx(qf,{role:"button",className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:stroke-primary hover:opacity-100",onClick:()=>n({...t,RecentFilesMaxCount:Math.max(1,t.RecentFilesMaxCount-1)})})]})]})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Beta updates"}),d.jsx(Wt,{checked:t==null?void 0:t.BetaUpdates,onClick:()=>n({...t,BetaUpdates:!(t!=null&&t.BetaUpdates)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Community feedback"}),d.jsx(Wt,{checked:t==null?void 0:t.CommunityFeedback,onClick:()=>n({...t,CommunityFeedback:!(t!=null&&t.CommunityFeedback)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Joystick support"}),d.jsx(Wt,{checked:t==null?void 0:t.EnableJoystickSupport,onClick:()=>n({...t,EnableJoystickSupport:!(t!=null&&t.EnableJoystickSupport)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Midi device support"}),d.jsx(Wt,{checked:t==null?void 0:t.EnableMidiSupport,onClick:()=>n({...t,EnableMidiSupport:!(t!=null&&t.EnableMidiSupport)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Test speed"}),d.jsx(Xe,{className:"w-32",options:[{value:"1000",label:"1 sec"},{value:"500",label:"500ms"},{value:"250",label:"250ms"},{value:"100",label:"100ms"},{value:"50",label:"50ms"}],value:((u=t==null?void 0:t.TestTimerInterval)==null?void 0:u.toString())??"250",onSelect:a})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"UI Language"}),d.jsx(Xe,{className:"w-48",options:[{value:"system",label:"System Default"},{value:"en-US",label:"English"},{value:"de-DE",label:"Deutsch"}],value:(t==null?void 0:t.Language)??"system",onSelect:c})]})]})]}),d.jsxs(zt,{className:"w-[350px]",children:[d.jsx(Rn,{children:d.jsx("div",{className:"flex flex-col mt-0",children:d.jsx("div",{className:"text-xl font-semibold",children:"Logging"})})}),d.jsxs(Un,{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Enabled"}),d.jsx(Wt,{checked:t==null?void 0:t.LogEnabled,onClick:()=>n({...t,LogEnabled:!(t!=null&&t.LogEnabled)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Log level"}),d.jsx(Xe,{className:"w-32",value:(t==null?void 0:t.LogLevel)??"Info",options:[{value:"Debug",label:"Debug"},{value:"Info",label:"Info"},{value:"Warn",label:"Warning"},{value:"Error",label:"Error"}],onSelect:i})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Log joystick axis"}),d.jsx(Wt,{checked:t==null?void 0:t.LogJoystickAxis,onClick:()=>n({...t,LogJoystickAxis:!(t!=null&&t.LogJoystickAxis)})})]})]})]}),d.jsxs(zt,{className:"w-[350px]",children:[d.jsx(Rn,{children:d.jsx("div",{className:"flex flex-col mt-0",children:d.jsx("div",{className:"text-xl font-semibold",children:"Run options"})})}),d.jsxs(Un,{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Auto retrigger"}),d.jsx(Wt,{checked:t==null?void 0:t.AutoRetrigger,onClick:()=>n({...t,AutoRetrigger:!(t!=null&&t.AutoRetrigger)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Auto run"}),d.jsx(Wt,{checked:t==null?void 0:t.AutoRun,onClick:()=>n({...t,AutoRun:!(t!=null&&t.AutoRun)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Auto load linked config"}),d.jsx(Wt,{checked:t==null?void 0:t.AutoLoadLinkedConfig,onClick:()=>n({...t,AutoLoadLinkedConfig:!(t!=null&&t.AutoLoadLinkedConfig)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Firmware auto update check"}),d.jsx(Wt,{checked:t==null?void 0:t.FwAutoUpdateCheck,onClick:()=>n({...t,FwAutoUpdateCheck:!(t!=null&&t.FwAutoUpdateCheck)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Hub hop auto check"}),d.jsx(Wt,{checked:t==null?void 0:t.HubHopAutoCheck,onClick:()=>n({...t,HubHopAutoCheck:!(t!=null&&t.HubHopAutoCheck)})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center justify-between",children:[d.jsx("label",{className:"w-56",htmlFor:"",children:"Minimize on auto run"}),d.jsx(Wt,{checked:t==null?void 0:t.MinimizeOnAutoRun,onClick:()=>n({...t,MinimizeOnAutoRun:!(t!=null&&t.MinimizeOnAutoRun)})})]})]})]})]}),d.jsx("div",{className:"flex flex-row gap-4",children:d.jsx(at,{variant:"default",className:"dark:text-white",disabled:Bm.isEqual(t,e),onClick:()=>{t&&r({key:"GlobalSettingsUpdate",payload:t})},children:"Save changes"})})]})}const cp=[{id:"1",filePath:"C:\\temp",name:"FBW A320",linkedAircraft:["FBW A320*"],status:{configs:{files:0,configs:0,status:"New"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"2",filePath:"C:\\temp",name:"PMDG B737",linkedAircraft:["PMDG B737-800","PMDG B737-900"],status:{configs:{files:1,configs:4,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"3",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"4",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"5",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"6",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"7",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"8",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"9",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"10",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}},{id:"11",filePath:"C:\\temp",name:"C172",status:{configs:{files:2,configs:6,status:"OK"},devices:{count:5,status:"OK"},sim:{name:"MSFS2020",status:"OK"}}}],qa=Ms(e=>({items:[],setItems:t=>e(()=>({items:t})),updateItem:t=>e(n=>({items:n.items.map(r=>r.GUID===t.GUID?t:r)}))}));function vz(){var o;const{t:e}=yv(),t=tl(),n=qa(i=>i.items),r=cp.find(i=>i.id===t.id);return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[d.jsx(tr,{to:"/",className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Projects"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0 font-bold",children:r==null?void 0:r.name}),d.jsx(uP,{})]}),d.jsx(zt,{children:d.jsxs("form",{action:"",className:"p-4 flex flex-row gap-4",children:[d.jsx("div",{className:"w-auto",children:"Selected simulator"}),d.jsx("div",{className:"font-bold",children:r==null?void 0:r.status.sim.name}),d.jsx("div",{className:"w-auto",children:"Linked aircraft"}),(o=r==null?void 0:r.linkedAircraft)==null?void 0:o.map(i=>d.jsx("div",{className:"font-bold",children:i},i))]})}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsx(tr,{to:`/projects/${r==null?void 0:r.id}/configs`,children:d.jsxs(zt,{className:"w-[350px]",children:[d.jsx(Rn,{children:d.jsx(pf,{children:e("project.configs")})}),d.jsxs(Un,{children:[d.jsxs("p",{children:[e("project.status.files"),": ",n.length>0?1:0]}),d.jsxs("p",{children:[e("project.status.configs"),": ",n.length.toString()]})]})]})}),d.jsxs(zt,{className:"w-[350px]",children:[d.jsx(Rn,{children:d.jsx(pf,{children:"Devices"})}),d.jsxs(Un,{children:[d.jsxs("p",{children:["Number: ",r==null?void 0:r.status.devices.count.toString()]}),d.jsxs("p",{children:["Status: ",r==null?void 0:r.status.devices.status]})]})]})]})]})}const xz=bv("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent dark:border-primary dark:text-primary dark:bg-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Fn({className:e,variant:t,...n}){return d.jsx("div",{className:se(xz({variant:t}),e),...n})}const yz=e=>{var n,r;const t=e.project;return d.jsxs(zt,{className:"w-[350px] dark:border-gray-800 shadow-md",children:[d.jsxs(Rn,{children:[d.jsx(pf,{children:t.name}),d.jsx("div",{children:d.jsx(Fn,{className:"bg-green-700",variant:"default",children:t.status.sim.name})})]}),d.jsx(Un,{children:d.jsxs("div",{className:"grid w-full items-center gap-4",children:[d.jsxs("div",{className:"flex flex-col justify-between gap-0",children:[d.jsx("p",{className:"font-bold",children:"Aircraft"}),d.jsx("p",{children:(((n=t.linkedAircraft)==null?void 0:n.length)||0)>0?(r=t.linkedAircraft)==null?void 0:r.join(", "):"None"})]}),d.jsxs("div",{className:"flex flex-row justify-between content-baseline text-center",children:[d.jsxs("div",{children:[d.jsx("p",{children:"Devices"}),d.jsxs(Fn,{color:"",variant:"outline",children:["1 of ",t.status.devices.count.toString()]})]}),d.jsxs("div",{children:[d.jsx("p",{children:"Configs"}),d.jsx(Fn,{variant:"outline",children:t.status.configs.configs.toString()})]}),d.jsxs("div",{children:[d.jsx("p",{children:"Files"}),d.jsx(Fn,{variant:"outline",children:t.status.configs.files.toString()})]})]})]})}),d.jsxs(Lo,{className:"flex justify-between",children:[d.jsxs("div",{className:"flex gap-2 content-baseline",children:[d.jsx(Wt,{}),d.jsx("span",{children:"Auto run"})]}),d.jsx(tr,{to:`/projects/${t.id}`,children:d.jsx(at,{variant:"default",children:"Open"})})]})]})},OS=()=>{const e=cp;return d.jsxs(d.Fragment,{children:[d.jsx("h2",{className:"scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0",children:"Projects"}),d.jsx("div",{className:"flex flex-row pt-4 w-full gap-4 flex-wrap max-w-full h-full",children:e.map(t=>d.jsx(yz,{project:t},t.id))})]})};function r1(e){const t=e+"CollectionProvider",[n,r]=ur(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:w,children:b}=x,P=ce.useRef(null),C=ce.useRef(new Map).current;return ce.createElement(o,{scope:w,itemMap:C,collectionRef:P},b)},c=e+"CollectionSlot",u=ce.forwardRef((x,w)=>{const{scope:b,children:P}=x,C=i(c,b),S=Ze(w,C.collectionRef);return ce.createElement(Vo,{ref:S},P)}),f=e+"CollectionItemSlot",h="data-radix-collection-item",m=ce.forwardRef((x,w)=>{const{scope:b,children:P,...C}=x,S=ce.useRef(null),E=Ze(w,S),_=i(f,b);return ce.useEffect(()=>(_.itemMap.set(S,{ref:S,...C}),()=>void _.itemMap.delete(S))),ce.createElement(Vo,{[h]:"",ref:E},P)});function v(x){const w=i(e+"CollectionConsumer",x);return ce.useCallback(()=>{const P=w.collectionRef.current;if(!P)return[];const C=Array.from(P.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((_,D)=>C.indexOf(_.ref.current)-C.indexOf(D.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},v,r]}const Eg="rovingFocusGroup.onEntryFocus",wz={bubbles:!1,cancelable:!0},o1="RovingFocusGroup",[r0,XE,bz]=r1(o1),[Sz,up]=ur(o1,[bz]),[Cz,$z]=Sz(o1),Pz=p.forwardRef((e,t)=>p.createElement(r0.Provider,{scope:e.__scopeRovingFocusGroup},p.createElement(r0.Slot,{scope:e.__scopeRovingFocusGroup},p.createElement(Ez,q({},e,{ref:t}))))),Ez=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,...h}=e,m=p.useRef(null),v=Ze(t,m),x=Zc(i),[w=null,b]=Ii({prop:a,defaultProp:c,onChange:u}),[P,C]=p.useState(!1),S=Zt(f),E=XE(n),_=p.useRef(!1),[D,N]=p.useState(0);return p.useEffect(()=>{const j=m.current;if(j)return j.addEventListener(Eg,S),()=>j.removeEventListener(Eg,S)},[S]),p.createElement(Cz,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:w,onItemFocus:p.useCallback(j=>b(j),[b]),onItemShiftTab:p.useCallback(()=>C(!0),[]),onFocusableItemAdd:p.useCallback(()=>N(j=>j+1),[]),onFocusableItemRemove:p.useCallback(()=>N(j=>j-1),[])},p.createElement(Oe.div,q({tabIndex:P||D===0?-1:0,"data-orientation":r},h,{ref:v,style:{outline:"none",...e.style},onMouseDown:he(e.onMouseDown,()=>{_.current=!0}),onFocus:he(e.onFocus,j=>{const O=!_.current;if(j.target===j.currentTarget&&O&&!P){const V=new CustomEvent(Eg,wz);if(j.currentTarget.dispatchEvent(V),!V.defaultPrevented){const J=E().filter(T=>T.focusable),ie=J.find(T=>T.active),te=J.find(T=>T.id===w),le=[ie,te,...J].filter(Boolean).map(T=>T.ref.current);QE(le)}}_.current=!1}),onBlur:he(e.onBlur,()=>C(!1))})))}),Rz="RovingFocusGroupItem",_z=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,c=co(),u=i||c,f=$z(Rz,n),h=f.currentTabStopId===u,m=XE(n),{onFocusableItemAdd:v,onFocusableItemRemove:x}=f;return p.useEffect(()=>{if(r)return v(),()=>x()},[r,v,x]),p.createElement(r0.ItemSlot,{scope:n,id:u,focusable:r,active:o},p.createElement(Oe.span,q({tabIndex:h?0:-1,"data-orientation":f.orientation},a,{ref:t,onMouseDown:he(e.onMouseDown,w=>{r?f.onItemFocus(u):w.preventDefault()}),onFocus:he(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:he(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const b=Dz(w,f.orientation,f.dir);if(b!==void 0){w.preventDefault();let C=m().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")C.reverse();else if(b==="prev"||b==="next"){b==="prev"&&C.reverse();const S=C.indexOf(w.currentTarget);C=f.loop?jz(C,S+1):C.slice(S+1)}setTimeout(()=>QE(C))}})})))}),Nz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kz(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Dz(e,t,n){const r=kz(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nz[r]}function QE(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function jz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const JE=Pz,ZE=_z,e3="Tabs",[Mz,VW]=ur(e3,[up]),t3=up(),[Tz,i1]=Mz(e3),Iz=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:c,activationMode:u="automatic",...f}=e,h=Zc(c),[m,v]=Ii({prop:r,onChange:o,defaultProp:i});return p.createElement(Tz,{scope:n,baseId:co(),value:m,onValueChange:v,orientation:a,dir:h,activationMode:u},p.createElement(Oe.div,q({dir:h,"data-orientation":a},f,{ref:t})))}),Oz="TabsList",Lz=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=i1(Oz,n),a=t3(n);return p.createElement(JE,q({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),p.createElement(Oe.div,q({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),Az="TabsTrigger",Fz=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=i1(Az,n),c=t3(n),u=n3(a.baseId,r),f=r3(a.baseId,r),h=r===a.value;return p.createElement(ZE,q({asChild:!0},c,{focusable:!o,active:h}),p.createElement(Oe.button,q({type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u},i,{ref:t,onMouseDown:he(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:he(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:he(e.onFocus,()=>{const m=a.activationMode!=="manual";!h&&!o&&m&&a.onValueChange(r)})})))}),zz="TabsContent",Uz=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,c=i1(zz,n),u=n3(c.baseId,r),f=r3(c.baseId,r),h=r===c.value,m=p.useRef(h);return p.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),p.createElement(Dn,{present:o||h},({present:v})=>p.createElement(Oe.div,q({"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:f,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0}}),v&&i))});function n3(e,t){return`${e}-trigger-${t}`}function r3(e,t){return`${e}-content-${t}`}const Bz=Iz,o3=Lz,i3=Fz,s3=Uz,a3=Bz,s1=p.forwardRef(({className:e,...t},n)=>d.jsx(o3,{ref:n,className:se("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));s1.displayName=o3.displayName;const Ci=p.forwardRef(({className:e,...t},n)=>d.jsx(i3,{ref:n,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Ci.displayName=i3.displayName;const Ea=p.forwardRef(({className:e,...t},n)=>d.jsx(s3,{ref:n,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ea.displayName=s3.displayName;/**
+ * table-core
+ *
+ * Copyright (c) TanStack
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function $i(e,t){return typeof e=="function"?e(t):e}function ar(e,t){return n=>{t.setState(r=>({...r,[e]:$i(n,r[e])}))}}function Sf(e){return e instanceof Function}function Vz(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Hz(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function Ne(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const c=e(i);if(!(c.length!==r.length||c.some((h,m)=>r[m]!==h)))return o;r=c;let f;if(n.key&&n.debug&&(f=Date.now()),o=t(...c),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-a)*100)/100,m=Math.round((Date.now()-f)*100)/100,v=m/16,x=(w,b)=>{for(w=String(w);w.length{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function Wz(e,t,n,r){var o,i;const c={...e._getDefaultColumnDef(),...t},u=c.accessorKey;let f=(o=(i=c.id)!=null?i:u?u.replace(".","_"):void 0)!=null?o:typeof c.header=="string"?c.header:void 0,h;if(c.accessorFn?h=c.accessorFn:u&&(u.includes(".")?h=v=>{let x=v;for(const b of u.split(".")){var w;x=(w=x)==null?void 0:w[b]}return x}:h=v=>v[c.accessorKey]),!f)throw new Error;let m={id:`${String(f)}`,accessorFn:h,parent:r,depth:n,columnDef:c,columns:[],getFlatColumns:Ne(()=>[!0],()=>{var v;return[m,...(v=m.columns)==null?void 0:v.flatMap(x=>x.getFlatColumns())]},ke(e.options,"debugColumns")),getLeafColumns:Ne(()=>[e._getOrderColumnsFn()],v=>{var x;if((x=m.columns)!=null&&x.length){let w=m.columns.flatMap(b=>b.getLeafColumns());return v(w)}return[m]},ke(e.options,"debugColumns"))};for(const v of e._features)v.createColumn==null||v.createColumn(m,e);return m}const pn="debugHeaders";function LS(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],c=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(c),a.push(u)};return c(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const Kz={createTable:e=>{e.getHeaderGroups=Ne(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const c=(i=r==null?void 0:r.map(m=>n.find(v=>v.id===m)).filter(Boolean))!=null?i:[],u=(a=o==null?void 0:o.map(m=>n.find(v=>v.id===m)).filter(Boolean))!=null?a:[],f=n.filter(m=>!(r!=null&&r.includes(m.id))&&!(o!=null&&o.includes(m.id)));return vd(t,[...c,...f,...u],e)},ke(e.options,pn)),e.getCenterHeaderGroups=Ne(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),vd(t,n,e,"center")),ke(e.options,pn)),e.getLeftHeaderGroups=Ne(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(c=>c.id===a)).filter(Boolean))!=null?o:[];return vd(t,i,e,"left")},ke(e.options,pn)),e.getRightHeaderGroups=Ne(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(c=>c.id===a)).filter(Boolean))!=null?o:[];return vd(t,i,e,"right")},ke(e.options,pn)),e.getFooterGroups=Ne(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ke(e.options,pn)),e.getLeftFooterGroups=Ne(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ke(e.options,pn)),e.getCenterFooterGroups=Ne(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ke(e.options,pn)),e.getRightFooterGroups=Ne(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ke(e.options,pn)),e.getFlatHeaders=Ne(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),ke(e.options,pn)),e.getLeftFlatHeaders=Ne(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),ke(e.options,pn)),e.getCenterFlatHeaders=Ne(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),ke(e.options,pn)),e.getRightFlatHeaders=Ne(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),ke(e.options,pn)),e.getCenterLeafHeaders=Ne(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ke(e.options,pn)),e.getLeftLeafHeaders=Ne(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ke(e.options,pn)),e.getRightLeafHeaders=Ne(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ke(e.options,pn)),e.getLeafHeaders=Ne(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,c,u,f;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(c=n[0])==null?void 0:c.headers)!=null?a:[],...(u=(f=r[0])==null?void 0:f.headers)!=null?u:[]].map(h=>h.getLeafHeaders()).flat()},ke(e.options,pn))}};function vd(e,t,n,r){var o,i;let a=0;const c=function(v,x){x===void 0&&(x=1),a=Math.max(a,x),v.filter(w=>w.getIsVisible()).forEach(w=>{var b;(b=w.columns)!=null&&b.length&&c(w.columns,x+1)},0)};c(e);let u=[];const f=(v,x)=>{const w={depth:x,id:[r,`${x}`].filter(Boolean).join("_"),headers:[]},b=[];v.forEach(P=>{const C=[...b].reverse()[0],S=P.column.depth===w.depth;let E,_=!1;if(S&&P.column.parent?E=P.column.parent:(E=P.column,_=!0),C&&(C==null?void 0:C.column)===E)C.subHeaders.push(P);else{const D=LS(n,E,{id:[r,x,E.id,P==null?void 0:P.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${b.filter(N=>N.column===E).length}`:void 0,depth:x,index:b.length});D.subHeaders.push(P),b.push(D)}w.headers.push(P),P.headerGroup=w}),u.push(w),x>0&&f(b,x-1)},h=t.map((v,x)=>LS(n,v,{depth:a,index:x}));f(h,a-1),u.reverse();const m=v=>v.filter(w=>w.column.getIsVisible()).map(w=>{let b=0,P=0,C=[0];w.subHeaders&&w.subHeaders.length?(C=[],m(w.subHeaders).forEach(E=>{let{colSpan:_,rowSpan:D}=E;b+=_,C.push(D)})):b=1;const S=Math.min(...C);return P=P+S,w.colSpan=b,w.rowSpan=P,{colSpan:b,rowSpan:P}});return m((o=(i=u[0])==null?void 0:i.headers)!=null?o:[]),u}const xd={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Rg=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gz={getDefaultColumnDef:()=>xd,getInitialState:e=>({columnSizing:{},columnSizingInfo:Rg(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:ar("columnSizing",e),onColumnSizingInfoChange:ar("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:xd.minSize,(r=i??e.columnDef.size)!=null?r:xd.size),(o=e.columnDef.maxSize)!=null?o:xd.maxSize)},e.getStart=Ne(n=>[n,uc(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),ke(t.options,"debugColumns")),e.getAfter=Ne(n=>[n,uc(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),ke(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),_g(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),c=e?e.getLeafHeaders().map(C=>[C.column.id,C.column.getSize()]):[[r.id,r.getSize()]],u=_g(i)?Math.round(i.touches[0].clientX):i.clientX,f={},h=(C,S)=>{typeof S=="number"&&(t.setColumnSizingInfo(E=>{var _,D;const N=t.options.columnResizeDirection==="rtl"?-1:1,j=(S-((_=E==null?void 0:E.startOffset)!=null?_:0))*N,O=Math.max(j/((D=E==null?void 0:E.startSize)!=null?D:0),-.999999);return E.columnSizingStart.forEach(V=>{let[J,ie]=V;f[J]=Math.round(Math.max(ie+ie*O,0)*100)/100}),{...E,deltaOffset:j,deltaPercentage:O}}),(t.options.columnResizeMode==="onChange"||C==="end")&&t.setColumnSizing(E=>({...E,...f})))},m=C=>h("move",C),v=C=>{h("end",C),t.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},x=n||typeof document<"u"?document:null,w={moveHandler:C=>m(C.clientX),upHandler:C=>{x==null||x.removeEventListener("mousemove",w.moveHandler),x==null||x.removeEventListener("mouseup",w.upHandler),v(C.clientX)}},b={moveHandler:C=>(C.cancelable&&(C.preventDefault(),C.stopPropagation()),m(C.touches[0].clientX),!1),upHandler:C=>{var S;x==null||x.removeEventListener("touchmove",b.moveHandler),x==null||x.removeEventListener("touchend",b.upHandler),C.cancelable&&(C.preventDefault(),C.stopPropagation()),v((S=C.touches[0])==null?void 0:S.clientX)}},P=qz()?{passive:!1}:!1;_g(i)?(x==null||x.addEventListener("touchmove",b.moveHandler,P),x==null||x.addEventListener("touchend",b.upHandler,P)):(x==null||x.addEventListener("mousemove",w.moveHandler,P),x==null||x.addEventListener("mouseup",w.upHandler,P)),t.setColumnSizingInfo(C=>({...C,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Rg():(n=e.initialState.columnSizingInfo)!=null?n:Rg())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let yd=null;function qz(){if(typeof yd=="boolean")return yd;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return yd=e,yd}function _g(e){return e.type==="touchstart"}const Yz={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:ar("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(c=>{a[c]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:c,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},l3=(e,t,n)=>{var r;const o=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};l3.autoRemove=e=>Kr(e);const c3=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};c3.autoRemove=e=>Kr(e);const u3=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};u3.autoRemove=e=>Kr(e);const d3=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};d3.autoRemove=e=>Kr(e)||!(e!=null&&e.length);const f3=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});f3.autoRemove=e=>Kr(e)||!(e!=null&&e.length);const p3=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});p3.autoRemove=e=>Kr(e)||!(e!=null&&e.length);const h3=(e,t,n)=>e.getValue(t)===n;h3.autoRemove=e=>Kr(e);const g3=(e,t,n)=>e.getValue(t)==n;g3.autoRemove=e=>Kr(e);const a1=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};a1.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const c=i;i=a,a=c}return[i,a]};a1.autoRemove=e=>Kr(e)||Kr(e[0])&&Kr(e[1]);const Ro={includesString:l3,includesStringSensitive:c3,equalsString:u3,arrIncludes:d3,arrIncludesAll:f3,arrIncludesSome:p3,equals:h3,weakEquals:g3,inNumberRange:a1};function Kr(e){return e==null||e===""}const Xz={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:ar("columnFilters",e),onGlobalFilterChange:ar("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Ro.includesString:typeof r=="number"?Ro.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ro.equals:Array.isArray(r)?Ro.arrIncludes:Ro.weakEquals},e.getFilterFn=()=>{var n,r;return Sf(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ro[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(h=>h.id===e.id),a=$i(n,i?i.value:void 0);if(AS(o,a,e)){var c;return(c=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?c:[]}const u={id:e.id,value:a};if(i){var f;return(f=r==null?void 0:r.map(h=>h.id===e.id?u:h))!=null?f:[]}return r!=null&&r.length?[...r,u]:[u]})},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ro.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Sf(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ro[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=$i(t,o))==null?void 0:i.filter(a=>{const c=n.find(u=>u.id===a.id);if(c){const u=c.getFilterFn();if(AS(u,a.value,c))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function AS(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Qz=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Jz=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},Zz=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r=i)&&(r=i)}),r},eU=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},nU=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Vz(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},rU=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),oU=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,iU=(e,t)=>t.length,Ng={sum:Qz,min:Jz,max:Zz,extent:eU,mean:tU,median:nU,unique:rU,uniqueCount:oU,count:iU},sU={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:ar("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r,o,i;return(n=(r=(o=(i=e.columnDef.enableGrouping)!=null?i:!0)!=null?o:t.options.enableGrouping)!=null?r:!0)!=null?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Ng.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Ng.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Sf(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Ng[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function aU(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const lU={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:ar("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Ne(n=>[uc(t,n)],n=>n.findIndex(r=>r.id===e.id),ke(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=uc(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=uc(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Ne(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],c=[...o];for(;c.length&&a.length;){const u=a.shift(),f=c.findIndex(h=>h.id===u);f>-1&&i.push(c.splice(f,1)[0])}i=[...i,...c]}return aU(i,n,r)},ke(e.options,"debugTable"))}},o0=0,i0=10,kg=()=>({pageIndex:o0,pageSize:i0}),cU={getInitialState:e=>({...e,pagination:{...kg(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:ar("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>$i(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?kg():(o=e.initialState.pagination)!=null?o:kg())},e.setPageIndex=r=>{e.setPagination(o=>{let i=$i(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?o0:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:o0)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?i0:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:i0)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,$i(r,o.pageSize)),a=o.pageSize*o.pageIndex,c=Math.floor(a/i);return{...o,pageIndex:c,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=$i(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Ne(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},ke(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},Dg=()=>({left:[],right:[]}),jg=()=>({top:[],bottom:[]}),uU={getInitialState:e=>({columnPinning:Dg(),rowPinning:jg(),...e}),getDefaultOptions:e=>({onColumnPinningChange:ar("columnPinning",e),onRowPinningChange:ar("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var c,u;return{left:((c=o==null?void 0:o.left)!=null?c:[]).filter(m=>!(r!=null&&r.includes(m))),right:[...((u=o==null?void 0:o.right)!=null?u:[]).filter(m=>!(r!=null&&r.includes(m))),...r]}}if(n==="left"){var f,h;return{left:[...((f=o==null?void 0:o.left)!=null?f:[]).filter(m=>!(r!=null&&r.includes(m))),...r],right:((h=o==null?void 0:o.right)!=null?h:[]).filter(m=>!(r!=null&&r.includes(m)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(m=>!(r!=null&&r.includes(m))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(m=>!(r!=null&&r.includes(m)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(c=>c.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(c=>r==null?void 0:r.includes(c)),a=n.some(c=>o==null?void 0:o.includes(c));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(u=>{let{id:f}=u;return f}):[],a=o?e.getParentRows().map(u=>{let{id:f}=u;return f}):[],c=new Set([...a,e.id,...i]);t.setRowPinning(u=>{var f,h;if(n==="bottom"){var m,v;return{top:((m=u==null?void 0:u.top)!=null?m:[]).filter(b=>!(c!=null&&c.has(b))),bottom:[...((v=u==null?void 0:u.bottom)!=null?v:[]).filter(b=>!(c!=null&&c.has(b))),...Array.from(c)]}}if(n==="top"){var x,w;return{top:[...((x=u==null?void 0:u.top)!=null?x:[]).filter(b=>!(c!=null&&c.has(b))),...Array.from(c)],bottom:((w=u==null?void 0:u.bottom)!=null?w:[]).filter(b=>!(c!=null&&c.has(b)))}}return{top:((f=u==null?void 0:u.top)!=null?f:[]).filter(b=>!(c!=null&&c.has(b))),bottom:((h=u==null?void 0:u.bottom)!=null?h:[]).filter(b=>!(c!=null&&c.has(b)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(c=>r==null?void 0:r.includes(c)),a=n.some(c=>o==null?void 0:o.includes(c));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=t._getPinnedRows(o))==null?void 0:n.map(a=>{let{id:c}=a;return c});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=Ne(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},ke(t.options,"debugRows")),e.getLeftVisibleCells=Ne(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),ke(t.options,"debugRows")),e.getRightVisibleCells=Ne(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),ke(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Dg():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Dg())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Ne(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ke(e.options,"debugColumns")),e.getRightLeafColumns=Ne(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ke(e.options,"debugColumns")),e.getCenterLeafColumns=Ne(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},ke(e.options,"debugColumns")),e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?jg():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:jg())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Ne(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const c=e.getRow(a,!0);return c.getIsAllParentsExpanded()?c:null}):(n??[]).map(a=>t.find(c=>c.id===a))).filter(Boolean).map(a=>({...a,position:r}))},ke(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Ne(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},ke(e.options,"debugRows"))}},dU={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:ar("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{s0(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Ne(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Mg(e,n):{rows:[],flatRows:[],rowsById:{}},ke(e.options,"debugTable")),e.getFilteredSelectedRowModel=Ne(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Mg(e,n):{rows:[],flatRows:[],rowsById:{}},ke(e.options,"debugTable")),e.getGroupedSelectedRowModel=Ne(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Mg(e,n):{rows:[],flatRows:[],rowsById:{}},ke(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const c={...i};return s0(c,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),c})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return l1(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return a0(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return a0(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},s0=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(c=>delete e[c]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(c=>s0(e,c.id,n,r,o))};function Mg(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,c){return a.map(u=>{var f;const h=l1(u,n);if(h&&(r.push(u),o[u.id]=u),(f=u.subRows)!=null&&f.length&&(u={...u,subRows:i(u.subRows)}),h)return u}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function l1(e,t){var n;return(n=t[e.id])!=null?n:!1}function a0(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(l1(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const c=a0(a,t);c==="all"?i=!0:(c==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const l0=/([0-9]+)/gm,fU=(e,t,n)=>m3(Fi(e.getValue(n)).toLowerCase(),Fi(t.getValue(n)).toLowerCase()),pU=(e,t,n)=>m3(Fi(e.getValue(n)),Fi(t.getValue(n))),hU=(e,t,n)=>c1(Fi(e.getValue(n)).toLowerCase(),Fi(t.getValue(n)).toLowerCase()),gU=(e,t,n)=>c1(Fi(e.getValue(n)),Fi(t.getValue(n))),mU=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rc1(e.getValue(n),t.getValue(n));function c1(e,t){return e===t?0:e>t?1:-1}function Fi(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function m3(e,t){const n=e.split(l0).filter(Boolean),r=t.split(l0).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),c=parseInt(i,10),u=[a,c].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>c)return 1;if(c>a)return-1}return n.length-r.length}const Kl={alphanumeric:fU,alphanumericCaseSensitive:pU,text:hU,textCaseSensitive:gU,datetime:mU,basic:vU},xU={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:ar("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Kl.datetime;if(typeof i=="string"&&(r=!0,i.split(l0).length>1))return Kl.alphanumeric}return r?Kl.text:Kl.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Sf(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Kl[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const c=a==null?void 0:a.find(x=>x.id===e.id),u=a==null?void 0:a.findIndex(x=>x.id===e.id);let f=[],h,m=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?c?h="toggle":h="add":a!=null&&a.length&&u!==a.length-1?h="replace":c?h="toggle":h="replace",h==="toggle"&&(i||o||(h="remove")),h==="add"){var v;f=[...a,{id:e.id,desc:m}],f.splice(0,f.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=a.map(x=>x.id===e.id?{...x,desc:m}:x):h==="remove"?f=a.filter(x=>x.id!==e.id):f=[{id:e.id,desc:m}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},yU={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:ar("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;return(n=(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Ne(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ke(t.options,"debugRows")),e.getVisibleCells=Ne(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],ke(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Ne(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),ke(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function uc(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const FS=[Kz,yU,lU,uU,Xz,xU,sU,Yz,cU,dU,Gz];function wU(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:FS};const r=n._features.reduce((h,m)=>Object.assign(h,m.getDefaultOptions==null?void 0:m.getDefaultOptions(n)),{}),o=h=>n.options.mergeOptions?n.options.mergeOptions(r,h):{...r,...h};let a={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(h=>{var m;a=(m=h.getInitialState==null?void 0:h.getInitialState(a))!=null?m:a});const c=[];let u=!1;const f={_features:FS,options:{...r,...e},initialState:a,_queue:h=>{c.push(h),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{n.setState(n.initialState)},setOptions:h=>{const m=$i(h,n.options);n.options=o(m)},getState:()=>n.options.state,setState:h=>{n.options.onStateChange==null||n.options.onStateChange(h)},_getRowId:(h,m,v)=>{var x;return(x=n.options.getRowId==null?void 0:n.options.getRowId(h,m,v))!=null?x:`${v?[v.id,m].join("."):m}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(h,m)=>{let v=(m?n.getPrePaginationRowModel():n.getRowModel()).rowsById[h];if(!v&&(v=n.getCoreRowModel().rowsById[h],!v))throw new Error;return v},_getDefaultColumnDef:Ne(()=>[n.options.defaultColumn],h=>{var m;return h=(m=h)!=null?m:{},{header:v=>{const x=v.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:v=>{var x,w;return(x=(w=v.renderValue())==null||w.toString==null?void 0:w.toString())!=null?x:null},...n._features.reduce((v,x)=>Object.assign(v,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...h}},ke(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:Ne(()=>[n._getColumnDefs()],h=>{const m=function(v,x,w){return w===void 0&&(w=0),v.map(b=>{const P=Wz(n,b,w,x),C=b;return P.columns=C.columns?m(C.columns,P,w+1):[],P})};return m(h)},ke(e,"debugColumns")),getAllFlatColumns:Ne(()=>[n.getAllColumns()],h=>h.flatMap(m=>m.getFlatColumns()),ke(e,"debugColumns")),_getAllFlatColumnsById:Ne(()=>[n.getAllFlatColumns()],h=>h.reduce((m,v)=>(m[v.id]=v,m),{}),ke(e,"debugColumns")),getAllLeafColumns:Ne(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(h,m)=>{let v=h.flatMap(x=>x.getLeafColumns());return m(v)},ke(e,"debugColumns")),getColumn:h=>n._getAllFlatColumnsById()[h]};Object.assign(n,f);for(let h=0;h{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Ne(()=>[e,n,t,i],(a,c,u,f)=>({table:a,column:c,row:u,cell:f,getValue:f.getValue,renderValue:f.renderValue}),ke(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}const u1=(e,t,n,r,o,i,a)=>{let c={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(c._valuesCache.hasOwnProperty(u))return c._valuesCache[u];const f=e.getColumn(u);if(f!=null&&f.accessorFn)return c._valuesCache[u]=f.accessorFn(c.original,r),c._valuesCache[u]},getUniqueValues:u=>{if(c._uniqueValuesCache.hasOwnProperty(u))return c._uniqueValuesCache[u];const f=e.getColumn(u);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(c._uniqueValuesCache[u]=f.columnDef.getUniqueValues(c.original,r),c._uniqueValuesCache[u]):(c._uniqueValuesCache[u]=[c.getValue(u)],c._uniqueValuesCache[u])},renderValue:u=>{var f;return(f=c.getValue(u))!=null?f:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>Hz(c.subRows,u=>u.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let u=[],f=c;for(;;){const h=f.getParentRow();if(!h)break;u.push(h),f=h}return u.reverse()},getAllCells:Ne(()=>[e.getAllLeafColumns()],u=>u.map(f=>bU(e,c,f,f.id)),ke(e.options,"debugRows")),_getAllCellsByColumnId:Ne(()=>[c.getAllCells()],u=>u.reduce((f,h)=>(f[h.column.id]=h,f),{}),ke(e.options,"debugRows"))};for(let u=0;uNe(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const c=[];for(let f=0;fe._autoResetPageIndex()))}function v3(e,t,n){return n.options.filterFromLeafRows?SU(e,t,n):CU(e,t,n)}function SU(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,c=function(u,f){f===void 0&&(f=0);const h=[];for(let v=0;vNe(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let v=0;v{var x;const w=e.getColumn(v.id);if(!w)return;const b=w.getFilterFn();b&&o.push({id:v.id,filterFn:b,resolvedValue:(x=b.resolveFilterValue==null?void 0:b.resolveFilterValue(v.value))!=null?x:v.value})});const a=n.map(v=>v.id),c=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(v=>v.getCanGlobalFilter());r&&c&&u.length&&(a.push("__global__"),u.forEach(v=>{var x;i.push({id:v.id,filterFn:c,resolvedValue:(x=c.resolveFilterValue==null?void 0:c.resolveFilterValue(r))!=null?x:r})}));let f,h;for(let v=0;v{x.columnFiltersMeta[b]=P})}if(i.length){for(let w=0;w{x.columnFiltersMeta[b]=P})){x.columnFilters.__global__=!0;break}}x.columnFilters.__global__!==!0&&(x.columnFilters.__global__=!1)}}const m=v=>{for(let x=0;xe._autoResetPageIndex()))}function p1(){return(e,t)=>Ne(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const i=[...r.map(c=>c.id).filter(c=>c!==t),o?"__global__":void 0].filter(Boolean),a=c=>{for(let u=0;uNe(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let i=0;iNe(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(u=>{var f;return(f=e.getColumn(u.id))==null?void 0:f.getCanSort()}),a={};i.forEach(u=>{const f=e.getColumn(u.id);f&&(a[u.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const c=u=>{const f=u.map(h=>({...h}));return f.sort((h,m)=>{for(let x=0;x{var m;o.push(h),(m=h.subRows)!=null&&m.length&&(h.subRows=c(h.subRows))}),f};return{rows:c(n.rows),flatRows:o,rowsById:n.rowsById}},ke(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
+ * react-table
+ *
+ * Copyright (c) TanStack
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Ya(e,t){return e?$U(e)?p.createElement(e,t):e:null}function $U(e){return PU(e)||typeof e=="function"||EU(e)}function PU(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function EU(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function m1(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:wU(t)})),[r,o]=p.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const dp=p.forwardRef(({className:e,...t},n)=>d.jsx("table",{ref:n,className:se("w-full caption-bottom text-sm",e),...t}));dp.displayName="Table";const fp=p.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:se("sticky top-0 bg-secondary [&_tr]:border-b",e),...t}));fp.displayName="TableHeader";const pp=p.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:se("[&_tr:last-child]:border-0",e),...t}));pp.displayName="TableBody";const RU=p.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:se("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));RU.displayName="TableFooter";const uo=p.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:se("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));uo.displayName="TableRow";const hp=p.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:se("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));hp.displayName="TableHead";const Ns=p.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:se("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Ns.displayName="TableCell";const _U=p.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:se("mt-4 text-sm text-muted-foreground",e),...t}));_U.displayName="TableCaption";const qt=p.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));qt.displayName="Input";const c0="horizontal",NU=["horizontal","vertical"],x3=p.forwardRef((e,t)=>{const{decorative:n,orientation:r=c0,...o}=e,i=y3(r)?r:c0,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return p.createElement(Oe.div,q({"data-orientation":i},c,o,{ref:t}))});x3.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!y3(r)?new Error(kU(o,n)):null}};function kU(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:
+ - horizontal
+ - vertical
+
+Defaulting to \`${c0}\`.`}function y3(e){return NU.includes(e)}const w3=x3,b3=p.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>d.jsx(w3,{ref:o,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));b3.displayName=w3.displayName;function ms({column:e,title:t,options:n}){const r=e==null?void 0:e.getFacetedUniqueValues(),o=new Set(e==null?void 0:e.getFilterValue());return d.jsxs(RE,{children:[d.jsx(_E,{asChild:!0,children:d.jsxs(at,{variant:"outline",size:"sm",className:"h-10 border-dashed",children:[d.jsx(xI,{className:"mr-2 h-4 w-4"}),t,(o==null?void 0:o.size)>0&&d.jsxs(d.Fragment,{children:[d.jsx(b3,{orientation:"vertical",className:"mx-2 h-4"}),d.jsx(Fn,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:o.size}),d.jsx("div",{className:"hidden space-x-1 lg:flex",children:o.size>2?d.jsxs(Fn,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[o.size," selected"]}):n.filter(i=>o.has(i.value)).map(i=>d.jsx(Fn,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:i.label},i.value))})]})]})}),d.jsx(Gv,{className:"w-[200px] p-0",align:"start",children:d.jsxs(Tv,{children:[d.jsx(Iv,{placeholder:t}),d.jsxs(oE,{children:[d.jsx(Ov,{children:"No results found."}),d.jsx(gf,{children:n.map(i=>{const a=o.has(i.value);return d.jsxs(mf,{onSelect:()=>{a?o.delete(i.value):o.add(i.value);const c=Array.from(o);e==null||e.setFilterValue(c.length?c:void 0)},children:[d.jsx("div",{className:se("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",a?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:d.jsx(Gf,{className:se("h-4 w-4")})}),i.icon&&d.jsx(i.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),d.jsx("span",{children:i.label}),(r==null?void 0:r.get(i.value))&&d.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:r.get(i.value)})]},i.value)})}),o.size>0&&d.jsxs(d.Fragment,{children:[d.jsx(iE,{}),d.jsx(gf,{children:d.jsx(mf,{onSelect:()=>e==null?void 0:e.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function DU({table:e,items:t}){var a;const n=e.getState().columnFilters.length>0,r=[...new Set(t.map(c=>c.Device))].map(c=>({label:c.split("/")[0],value:c})),o=[...new Set(t.map(c=>c.Component))].map(c=>({label:c,value:c})),i=[...new Set(t.map(c=>c.Type))].map(c=>({label:c,value:c}));return d.jsx("div",{className:"flex items-center justify-between",children:d.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[d.jsx(qt,{placeholder:"Filter items...",value:((a=e.getColumn("Description"))==null?void 0:a.getFilterValue())??"",onChange:c=>{var u;return(u=e.getColumn("Description"))==null?void 0:u.setFilterValue(c.target.value)},className:"h-8 w-[150px] lg:w-[250px]"}),e.getColumn("Device")&&d.jsx(ms,{column:e.getColumn("Device"),title:"Devices",options:r}),e.getColumn("Component")&&d.jsx(ms,{column:e.getColumn("Component"),title:"Component",options:o}),e.getColumn("Type")&&d.jsx(ms,{column:e.getColumn("Type"),title:"Types",options:i}),n&&d.jsxs(at,{variant:"ghost",onClick:()=>e.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",d.jsx(Yf,{className:"ml-2 h-4 w-4"})]})]})})}function jU({columns:e,data:t}){var f;const[n,r]=p.useState([]),[o,i]=p.useState([]),[a,c]=p.useState({Type:!1}),u=m1({data:t,columns:e,onSortingChange:r,onColumnFiltersChange:i,onColumnVisibilityChange:c,getCoreRowModel:d1(),getSortedRowModel:g1(),getFilteredRowModel:f1(),getFacetedRowModel:p1(),getFacetedUniqueValues:h1(),state:{sorting:n,columnFilters:o,columnVisibility:a},defaultColumn:{size:10,minSize:1,maxSize:250}});return d.jsxs("div",{className:"flex flex-col gap-4 grow overflow-y-auto",children:[d.jsx("div",{className:"px-1 py-2",children:d.jsx(DU,{table:u,items:t})}),d.jsx("div",{className:"flex flex-col grow overflow-y-auto border rounded-lg",children:d.jsxs(dp,{className:"table-fixed",children:[d.jsx(fp,{className:"group/header",children:u.getHeaderGroups().map(h=>d.jsx(uo,{className:"",children:h.headers.map(m=>{var v,x;return d.jsx(hp,{className:`z-50 sticky top-0 ${((x=(v=m.column.columnDef)==null?void 0:v.meta)==null?void 0:x.className)??""}`,children:m.isPlaceholder?null:Ya(m.column.columnDef.header,m.getContext())},m.id)})},h.id))}),d.jsx(pp,{className:"overflow-y-auto",children:(f=u.getRowModel().rows)!=null&&f.length?u.getRowModel().rows.map(h=>d.jsx(uo,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(m=>{var v,x;return d.jsx(Ns,{className:`${(x=(v=m.column.columnDef)==null?void 0:v.meta)==null?void 0:x.className}`,children:Ya(m.column.columnDef.cell,m.getContext())},m.id)})},h.id)):d.jsx(uo,{children:d.jsx(Ns,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})]})}const u0=["Enter"," "],MU=["ArrowDown","PageUp","Home"],S3=["ArrowUp","PageDown","End"],TU=[...MU,...S3],IU={ltr:[...u0,"ArrowRight"],rtl:[...u0,"ArrowLeft"]},OU={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gp="Menu",[Ac,LU,AU]=r1(gp),[Is,C3]=ur(gp,[AU,sl,up]),v1=sl(),$3=up(),[FU,Os]=Is(gp),[zU,eu]=Is(gp),UU=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,c=v1(t),[u,f]=p.useState(null),h=p.useRef(!1),m=Zt(i),v=Zc(o);return p.useEffect(()=>{const x=()=>{h.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>h.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.createElement(Vv,c,p.createElement(FU,{scope:t,open:n,onOpenChange:m,content:u,onContentChange:f},p.createElement(zU,{scope:t,onClose:p.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:h,dir:v,modal:a},r)))},P3=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=v1(n);return p.createElement(Hv,q({},o,r,{ref:t}))}),E3="MenuPortal",[BU,R3]=Is(E3,{forceMount:void 0}),VU=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Os(E3,t);return p.createElement(BU,{scope:t,forceMount:n},p.createElement(Dn,{present:n||i.open},p.createElement(tp,{asChild:!0,container:o},r)))},Gr="MenuContent",[HU,x1]=Is(Gr),WU=p.forwardRef((e,t)=>{const n=R3(Gr,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Os(Gr,e.__scopeMenu),a=eu(Gr,e.__scopeMenu);return p.createElement(Ac.Provider,{scope:e.__scopeMenu},p.createElement(Dn,{present:r||i.open},p.createElement(Ac.Slot,{scope:e.__scopeMenu},a.modal?p.createElement(KU,q({},o,{ref:t})):p.createElement(GU,q({},o,{ref:t})))))}),KU=p.forwardRef((e,t)=>{const n=Os(Gr,e.__scopeMenu),r=p.useRef(null),o=Ze(t,r);return p.useEffect(()=>{const i=r.current;if(i)return Yc(i)},[]),p.createElement(y1,q({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:he(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),GU=p.forwardRef((e,t)=>{const n=Os(Gr,e.__scopeMenu);return p.createElement(y1,q({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),y1=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:v,onDismiss:x,disableOutsideScroll:w,...b}=e,P=Os(Gr,n),C=eu(Gr,n),S=v1(n),E=$3(n),_=LU(n),[D,N]=p.useState(null),j=p.useRef(null),O=Ze(t,j,P.onContentChange),V=p.useRef(0),J=p.useRef(""),ie=p.useRef(0),te=p.useRef(null),ge=p.useRef("right"),le=p.useRef(0),T=w?op:p.Fragment,W=w?{as:Vo,allowPinchZoom:!0}:void 0,Y=B=>{var L,H;const oe=J.current+B,ne=_().filter(Fe=>!Fe.disabled),fe=document.activeElement,Se=(L=ne.find(Fe=>Fe.ref.current===fe))===null||L===void 0?void 0:L.textValue,me=ne.map(Fe=>Fe.textValue),pe=cB(me,oe,Se),Te=(H=ne.find(Fe=>Fe.textValue===pe))===null||H===void 0?void 0:H.ref.current;(function Fe(We){J.current=We,window.clearTimeout(V.current),We!==""&&(V.current=window.setTimeout(()=>Fe(""),1e3))})(oe),Te&&setTimeout(()=>Te.focus())};p.useEffect(()=>()=>window.clearTimeout(V.current),[]),np();const U=p.useCallback(B=>{var L,H;return ge.current===((L=te.current)===null||L===void 0?void 0:L.side)&&dB(B,(H=te.current)===null||H===void 0?void 0:H.area)},[]);return p.createElement(HU,{scope:n,searchRef:J,onItemEnter:p.useCallback(B=>{U(B)&&B.preventDefault()},[U]),onItemLeave:p.useCallback(B=>{var L;U(B)||((L=j.current)===null||L===void 0||L.focus(),N(null))},[U]),onTriggerLeave:p.useCallback(B=>{U(B)&&B.preventDefault()},[U]),pointerGraceTimerRef:ie,onPointerGraceIntentChange:p.useCallback(B=>{te.current=B},[])},p.createElement(T,W,p.createElement(ep,{asChild:!0,trapped:o,onMountAutoFocus:he(i,B=>{var L;B.preventDefault(),(L=j.current)===null||L===void 0||L.focus()}),onUnmountAutoFocus:a},p.createElement(Zf,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:v,onDismiss:x},p.createElement(JE,q({asChild:!0},E,{dir:C.dir,orientation:"vertical",loop:r,currentTabStopId:D,onCurrentTabStopIdChange:N,onEntryFocus:he(u,B=>{C.isUsingKeyboardRef.current||B.preventDefault()})}),p.createElement(Wv,q({role:"menu","aria-orientation":"vertical","data-state":j3(P.open),"data-radix-menu-content":"",dir:C.dir},S,b,{ref:O,style:{outline:"none",...b.style},onKeyDown:he(b.onKeyDown,B=>{const H=B.target.closest("[data-radix-menu-content]")===B.currentTarget,oe=B.ctrlKey||B.altKey||B.metaKey,ne=B.key.length===1;H&&(B.key==="Tab"&&B.preventDefault(),!oe&&ne&&Y(B.key));const fe=j.current;if(B.target!==fe||!TU.includes(B.key))return;B.preventDefault();const me=_().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);S3.includes(B.key)&&me.reverse(),aB(me)}),onBlur:he(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(V.current),J.current="")}),onPointerMove:he(e.onPointerMove,Fc(B=>{const L=B.target,H=le.current!==B.clientX;if(B.currentTarget.contains(L)&&H){const oe=B.clientX>le.current?"right":"left";ge.current=oe,le.current=B.clientX}}))})))))))}),qU=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(Oe.div,q({},r,{ref:t}))}),d0="MenuItem",zS="menu.itemSelect",w1=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=p.useRef(null),a=eu(d0,e.__scopeMenu),c=x1(d0,e.__scopeMenu),u=Ze(t,i),f=p.useRef(!1),h=()=>{const m=i.current;if(!n&&m){const v=new CustomEvent(zS,{bubbles:!0,cancelable:!0});m.addEventListener(zS,x=>r==null?void 0:r(x),{once:!0}),K$(m,v),v.defaultPrevented?f.current=!1:a.onClose()}};return p.createElement(_3,q({},o,{ref:u,disabled:n,onClick:he(e.onClick,h),onPointerDown:m=>{var v;(v=e.onPointerDown)===null||v===void 0||v.call(e,m),f.current=!0},onPointerUp:he(e.onPointerUp,m=>{var v;f.current||(v=m.currentTarget)===null||v===void 0||v.click()}),onKeyDown:he(e.onKeyDown,m=>{const v=c.searchRef.current!=="";n||v&&m.key===" "||u0.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})}))}),_3=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=x1(d0,n),c=$3(n),u=p.useRef(null),f=Ze(t,u),[h,m]=p.useState(!1),[v,x]=p.useState("");return p.useEffect(()=>{const w=u.current;if(w){var b;x(((b=w.textContent)!==null&&b!==void 0?b:"").trim())}},[i.children]),p.createElement(Ac.ItemSlot,{scope:n,disabled:r,textValue:o??v},p.createElement(ZE,q({asChild:!0},c,{focusable:!r}),p.createElement(Oe.div,q({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:f,onPointerMove:he(e.onPointerMove,Fc(w=>{r?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus())})),onPointerLeave:he(e.onPointerLeave,Fc(w=>a.onItemLeave(w))),onFocus:he(e.onFocus,()=>m(!0)),onBlur:he(e.onBlur,()=>m(!1))}))))}),YU=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.createElement(k3,{scope:e.__scopeMenu,checked:n},p.createElement(w1,q({role:"menuitemcheckbox","aria-checked":Cf(n)?"mixed":n},o,{ref:t,"data-state":b1(n),onSelect:he(o.onSelect,()=>r==null?void 0:r(Cf(n)?!0:!n),{checkForDefaultPrevented:!1})})))}),XU="MenuRadioGroup",[HW,QU]=Is(XU,{value:void 0,onValueChange:()=>{}}),JU="MenuRadioItem",ZU=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=QU(JU,e.__scopeMenu),i=n===o.value;return p.createElement(k3,{scope:e.__scopeMenu,checked:i},p.createElement(w1,q({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":b1(i),onSelect:he(r.onSelect,()=>{var a;return(a=o.onValueChange)===null||a===void 0?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})))}),N3="MenuItemIndicator",[k3,eB]=Is(N3,{checked:!1}),tB=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=eB(N3,n);return p.createElement(Dn,{present:r||Cf(i.checked)||i.checked===!0},p.createElement(Oe.span,q({},o,{ref:t,"data-state":b1(i.checked)})))}),nB=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.createElement(Oe.div,q({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),rB="MenuSub",[WW,D3]=Is(rB),wd="MenuSubTrigger",oB=p.forwardRef((e,t)=>{const n=Os(wd,e.__scopeMenu),r=eu(wd,e.__scopeMenu),o=D3(wd,e.__scopeMenu),i=x1(wd,e.__scopeMenu),a=p.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,f={__scopeMenu:e.__scopeMenu},h=p.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return p.useEffect(()=>h,[h]),p.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),u(null)}},[c,u]),p.createElement(P3,q({asChild:!0},f),p.createElement(_3,q({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":j3(n.open)},e,{ref:Wf(t,o.onTriggerChange),onClick:m=>{var v;(v=e.onClick)===null||v===void 0||v.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:he(e.onPointerMove,Fc(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:he(e.onPointerLeave,Fc(m=>{var v;h();const x=(v=n.content)===null||v===void 0?void 0:v.getBoundingClientRect();if(x){var w;const b=(w=n.content)===null||w===void 0?void 0:w.dataset.side,P=b==="right",C=P?-5:5,S=x[P?"left":"right"],E=x[P?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+C,y:m.clientY},{x:S,y:x.top},{x:E,y:x.top},{x:E,y:x.bottom},{x:S,y:x.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:he(e.onKeyDown,m=>{const v=i.searchRef.current!=="";if(!(e.disabled||v&&m.key===" ")&&IU[r.dir].includes(m.key)){var x;n.onOpenChange(!0),(x=n.content)===null||x===void 0||x.focus(),m.preventDefault()}})})))}),iB="MenuSubContent",sB=p.forwardRef((e,t)=>{const n=R3(Gr,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Os(Gr,e.__scopeMenu),a=eu(Gr,e.__scopeMenu),c=D3(iB,e.__scopeMenu),u=p.useRef(null),f=Ze(t,u);return p.createElement(Ac.Provider,{scope:e.__scopeMenu},p.createElement(Dn,{present:r||i.open},p.createElement(Ac.Slot,{scope:e.__scopeMenu},p.createElement(y1,q({id:c.contentId,"aria-labelledby":c.triggerId},o,{ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var m;a.isUsingKeyboardRef.current&&((m=u.current)===null||m===void 0||m.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:he(e.onFocusOutside,h=>{h.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:he(e.onEscapeKeyDown,h=>{a.onClose(),h.preventDefault()}),onKeyDown:he(e.onKeyDown,h=>{const m=h.currentTarget.contains(h.target),v=OU[a.dir].includes(h.key);if(m&&v){var x;i.onOpenChange(!1),(x=c.trigger)===null||x===void 0||x.focus(),h.preventDefault()}})})))))});function j3(e){return e?"open":"closed"}function Cf(e){return e==="indeterminate"}function b1(e){return Cf(e)?"indeterminate":e?"checked":"unchecked"}function aB(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function lB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function cB(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=lB(e,Math.max(i,0));o.length===1&&(a=a.filter(f=>f!==n));const u=a.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function uB(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;ir!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(o=!o)}return o}function dB(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return uB(n,t)}function Fc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const fB=UU,pB=P3,hB=VU,gB=WU,mB=qU,vB=w1,xB=YU,yB=ZU,wB=tB,bB=nB,SB=oB,CB=sB,M3="DropdownMenu",[$B,KW]=ur(M3,[C3]),kr=C3(),[PB,T3]=$B(M3),EB=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:c=!0}=e,u=kr(t),f=p.useRef(null),[h=!1,m]=Ii({prop:o,defaultProp:i,onChange:a});return p.createElement(PB,{scope:t,triggerId:co(),triggerRef:f,contentId:co(),open:h,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(v=>!v),[m]),modal:c},p.createElement(fB,q({},u,{open:h,onOpenChange:m,dir:r,modal:c}),n))},RB="DropdownMenuTrigger",I3=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=T3(RB,n),a=kr(n);return p.createElement(pB,q({asChild:!0},a),p.createElement(Oe.button,q({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:Wf(t,i.triggerRef),onPointerDown:he(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:he(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})))}),_B=e=>{const{__scopeDropdownMenu:t,...n}=e,r=kr(t);return p.createElement(hB,q({},r,n))},NB="DropdownMenuContent",kB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=T3(NB,n),i=kr(n),a=p.useRef(!1);return p.createElement(gB,q({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:he(e.onCloseAutoFocus,c=>{var u;a.current||(u=o.triggerRef.current)===null||u===void 0||u.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:he(e.onInteractOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;(!o.modal||h)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),DB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(mB,q({},o,r,{ref:t}))}),jB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(vB,q({},o,r,{ref:t}))}),MB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(xB,q({},o,r,{ref:t}))}),TB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(yB,q({},o,r,{ref:t}))}),IB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(wB,q({},o,r,{ref:t}))}),OB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(bB,q({},o,r,{ref:t}))}),LB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(SB,q({},o,r,{ref:t}))}),AB=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=kr(n);return p.createElement(CB,q({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),FB=EB,zB=I3,UB=_B,O3=kB,L3=DB,A3=jB,F3=MB,z3=TB,U3=IB,B3=OB,V3=LB,H3=AB,S1=FB,W3=zB,BB=p.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(V3,{ref:o,className:se("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,d.jsx(vI,{className:"ml-auto h-4 w-4"})]}));BB.displayName=V3.displayName;const VB=p.forwardRef(({className:e,...t},n)=>d.jsx(H3,{ref:n,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));VB.displayName=H3.displayName;const mp=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(UB,{children:d.jsx(O3,{ref:r,sideOffset:t,className:se("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));mp.displayName=O3.displayName;const hn=p.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(A3,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));hn.displayName=A3.displayName;const HB=p.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(F3,{ref:o,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(U3,{children:d.jsx(Gf,{className:"h-4 w-4"})})}),t]}));HB.displayName=F3.displayName;const WB=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(z3,{ref:r,className:se("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(U3,{children:d.jsx(yI,{className:"h-2 w-2 fill-current"})})}),t]}));WB.displayName=z3.displayName;const dc=p.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(L3,{ref:r,className:se("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));dc.displayName=L3.displayName;const Ia=p.forwardRef(({className:e,...t},n)=>d.jsx(B3,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));Ia.displayName=B3.displayName;const KB=e=>{const t=se("stroke-current fill-current ",e.className);return d.jsx("svg",{className:t,id:"icon_device_analog",width:"24",height:"24",version:"1.1",viewBox:"0 0 24 24",children:d.jsx("g",{transform:"translate(247 -655)",children:d.jsxs("g",{id:"icon_in_analog",transform:"translate(1.1176e-5 -24)",children:[d.jsx("path",{d:"m-235 685c-3.3019 0-6 2.6981-6 6 0 3.3018 2.6981 6 6 6 3.3018 0 6-2.6982 6-6 0-1.2863-0.41034-2.4798-1.1055-3.459-0.0806 0.0689-0.15094 0.13071-0.19726 0.17578l-3.5 3.4102c-0.39587 0.3851-1.029 0.37634-1.4141-0.0195-0.38509-0.39587-0.37633-1.029 0.0195-1.4141l3.5-3.4082c0.0419-0.0408 0.0989-0.10623 0.16016-0.17579-0.98006-0.69704-2.1746-1.1094-3.4629-1.1094z",stroke:"none",strokeLinecap:"round",strokeLinejoin:"round"}),d.jsx("path",{d:"m-241.36 697.36a9 9 0 0 1 0-12.728 9 9 0 0 1 12.728 0 9 9 0 0 1 0 12.728",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})})})},GB=e=>{const t=se("stroke-current fill-current ",e.className);return d.jsxs("svg",{className:t,id:"SVGRoot",width:"24",height:"24",version:"1.1",viewBox:"0 0 24 24",children:[d.jsx("path",{d:"m15.414 6.9269a1 1 0 0 0-0.70703 0.29297 1 1 0 0 0 0 1.4141l3.293 3.293-3.293 3.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 0.81836 0.28516 1 1 0 0 0 0.5957-0.28516l4-4a1 1 0 0 0 0.05664-0.06055 1 1 0 0 0-0.05664-1.3535l-4-4a1 1 0 0 0-0.70703-0.29297z",stroke:"none"}),d.jsx("path",{d:"m9.4138 6.9269a1 1 0 0 0-0.70703 0.29297 1 1 0 0 0 0 1.4141l3.293 3.293-3.293 3.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1 1 0 0 0 0.05664-0.06055 1 1 0 0 0-0.05664-1.3535l-4-4a1 1 0 0 0-0.70703-0.29297z",stroke:"none"}),d.jsx("path",{d:"m5.3535 2.9269a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1 1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1z",stroke:"none"})]})},qB=e=>{const t=se("stroke-current fill-current ",e.className);return d.jsxs("svg",{className:t,id:"SVGRoot",width:"24",height:"24",version:"1.1",viewBox:"0 0 24 24",children:[d.jsx("path",{d:"m5.2924 7.0005a1 1 0 0 1 0.70703 0.29297l4 4a1 1 0 0 1 0.13867 1.2383 1 1 0 0 1-0.13867 0.17578l-4 4a1 1 0 0 1-1.4141 0 1 1 0 0 1 0-1.4141l3.293-3.293-3.293-3.293a1 1 0 0 1 0-1.4141 1 1 0 0 1 0.70703-0.29297z",stroke:"none"}),d.jsx("path",{d:"m11.292 7.0005a1 1 0 0 1 0.70703 0.29297l4 4a1 1 0 0 1 0 1.4141l-4 4a1 1 0 0 1-1.4141 0 1 1 0 0 1 0-1.4141l3.293-3.293-3.293-3.293a1 1 0 0 1 0-1.4141 1 1 0 0 1 0.70703-0.29297z",stroke:"none"}),d.jsx("path",{d:"m19 3.0005a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1 1 1 0 0 0 1-1v-16a1 1 0 0 0-1-1z",stroke:"none"})]})},YB=e=>{const t=se("stroke-current fill-current ",e.className);return d.jsx("svg",{className:t,id:"SVGRoot",width:"6.35mm",height:"6.35mm",version:"1.1",viewBox:"0 0 24 24",children:d.jsx("path",{d:"m18 2.0006a3 3 0 0 0-2.8242 1.998h-2.332c-1.9106 0-3.1917 0.80732-4.2207 1.9258-0.74301 0.80766-1.4651 1.7715-2.5742 2.9258a3.25 3.25 0 0 0-0.79883-0.099615 3.25 3.25 0 0 0-3.25 3.25 3.25 3.25 0 0 0 3.25 3.25 3.25 3.25 0 0 0 0.79688-0.10155c1.1143 1.1581 1.8389 2.1217 2.582 2.9297 1.0276 1.1174 2.3052 1.9219 4.2148 1.9219h2.332a3 3 0 0 0 0.24999 0.52929 3 3 0 0 0 0.02925 0.0489 3 3 0 0 0 0.34766 0.45898 3 3 0 0 0 0.02145 0.02145 3 3 0 0 0 0.43946 0.38672 3 3 0 0 0 0.0075 6e-3 3 3 0 0 0 0.4961 0.27734 3 3 0 0 0 0.0684 0.0312 3 3 0 0 0 0.52539 0.16797 3 3 0 0 0 0.07035 0.012 3 3 0 0 0 0.56836 0.0606 3 3 0 0 0 0.53126-0.05265 3 3 0 0 0 0.09375-0.01755 3 3 0 0 0 0.49218-0.1485 3 3 0 0 0 0.084-0.039 3 3 0 0 0 0.4375-0.23438 3 3 0 0 0 0.0351-0.02145 3 3 0 0 0 0.4043-0.33008 3 3 0 0 0 0.07815-0.07815 3 3 0 0 0 0.32618-0.39844 3 3 0 0 0 0.03315-0.05265 3 3 0 0 0 0.22461-0.41992 3 3 0 0 0 0.0429-0.09375 3 3 0 0 0 0.1446-0.48438 3 3 0 0 0 0.0195-0.0996 3 3 0 0 0 0.0528-0.5293 3 3 0 0 0-0.05865-0.58593 3 3 0 0 0-0.16797-0.55665 3 3 0 0 0-0.0015-6e-3 3 3 0 0 0-0.0015-6e-3 3 3 0 0 0-0.27538-0.51171 3 3 0 0 0-0.37305-0.45508 3 3 0 0 0-0.45507-0.37305 3 3 0 0 0-0.51172-0.27538 3 3 0 0 0-6e-3 -0.0015 3 3 0 0 0-6e-3 -0.0015 3 3 0 0 0-0.55665-0.16796 3 3 0 0 0-0.58593-0.05865 3 3 0 0 0-0.58398 0.0606 3 3 0 0 0-0.0429 0.0105 3 3 0 0 0-0.5371 0.16992 3 3 0 0 0-0.0684 0.0312 3 3 0 0 0-0.4961 0.2793 3 3 0 0 0-0.0015 0 3 3 0 0 0-0.0045 0.0015 3 3 0 0 0-0.45704 0.40234 3 3 0 0 0-0.35742 0.4707 3 3 0 0 0-0.0234 0.0411 3 3 0 0 0-0.25196 0.5332h-2.332c-1.4643 0-1.8704-0.32546-2.7441-1.2754-0.58306-0.63398-1.2853-1.5536-2.3359-2.6738a3.25 3.25 0 0 0 0.64844-1.3008h6.6855a3 3 0 0 0 2.9024 2.25 3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-2.9024 2.25h-6.6855a3.25 3.25 0 0 0-0.64258-1.3047c1.0456-1.1158 1.7435-2.0346 2.3262-2.668 0.87509-0.95124 1.2847-1.2773 2.748-1.2773h2.332a3 3 0 0 0 2.8241 1.9984 3 3 0 0 0 3-3 3 3 0 0 0-3-3zm0.084 2.082a0.91666 0.91666 0 0 1 0.91602 0.91797 0.91666 0.91666 0 0 1-0.91602 0.91602 0.91666 0.91666 0 0 1-0.91797-0.91602 0.91666 0.91666 0 0 1 0.91797-0.91797zm-12.834 6.668a1.25 1.25 0 0 1 1.25 1.25 1.25 1.25 0 0 1-1.25 1.25 1.25 1.25 0 0 1-1.25-1.25 1.25 1.25 0 0 1 1.25-1.25zm12.834 0.33204a0.91666 0.91666 0 0 1 0.91602 0.91797 0.91666 0.91666 0 0 1-0.91602 0.916 0.91666 0.91666 0 0 1-0.91797-0.916 0.91666 0.91666 0 0 1 0.91797-0.91797zm0 7a0.91666 0.91666 0 0 1 0.91602 0.91797 0.91666 0.91666 0 0 1-0.91602 0.91602 0.91666 0.91666 0 0 1-0.91797-0.91602 0.91666 0.91666 0 0 1 0.91797-0.91797z",strokeLinecap:"round",strokeLinejoin:"round",stroke:"none"})})},vp=e=>{const{variant:t,disabled:n,className:r}=e;let o=d.jsx(MI,{className:r});return t==="Output"?o=d.jsx(mI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)}):t==="LedModule"?o=d.jsx(lI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)}):t==="LcdDisplay"?o=d.jsx(cI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)}):t==="ShiftRegister"?o=d.jsx(GB,{className:se("stroke-pink-600 fill-pink-600",n?"stroke-slate-400 fill-slate-400":"",r)}):t==="Stepper"?o=d.jsx(CI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)}):t==="Servo"?o=d.jsx(wI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)}):t==="Button"?o=d.jsx(jI,{className:se("stroke-teal-600",n?"stroke-slate-400":"",r)}):t==="Encoder"?o=d.jsx(TI,{className:se("stroke-teal-600",n?"stroke-slate-400":"",r)}):t==="AnalogInput"?o=d.jsx(KB,{className:se("stroke-teal-600 fill-teal-600 stroke-2",n?"stroke-slate-400 fill-slate-400":"",r)}):t==="InputShiftRegister"?o=d.jsx(qB,{className:se("stroke-teal-600 fill-teal-600",n?"stroke-slate-400 fill-slate-400":"",r)}):t==="InputMultiplexer"?o=d.jsx(YB,{className:se("stroke-teal-600 fill-teal-600",n?"stroke-slate-400 fill-slate-400":"",r)}):t==="CustomDevice"&&(o=d.jsx(dI,{className:se("stroke-pink-600",n?"stroke-slate-400":"",r)})),d.jsx("div",{className:"inline-block",children:o})},XB=[{accessorKey:"Active",meta:{className:"w-[80px]"},header:()=>d.jsx("div",{className:"text-center",children:"Active"}),cell:({row:e})=>d.jsx("div",{className:"text-center",children:d.jsx(Wt,{className:"dark:bg-gray-800 dark:data-[state=checked]:bg-gray-700",checked:e.getValue("Active")})})},{accessorKey:"Description",meta:{className:"hidden xl:table-cell"},cell:({row:e})=>{const t=e.getValue("Description");return d.jsx("div",{children:d.jsx("p",{className:"font-semibold",children:t})})},header:({column:e})=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{children:"Description"}),d.jsx(at,{className:"p-1 h-auto w-auto",variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:d.jsx(aP,{className:"h-4 w-4"})})]})},{meta:{className:"w-[200px]"},accessorKey:"Device",header:()=>d.jsx("div",{children:"Device"}),cell:({row:e})=>{const t=e.getValue("Device").split("/")[0],n=e.getValue("Device").split("/")[1];return d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-md font-semibold truncate",children:t}),d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n})]})},filterFn:(e,t,n)=>n.includes(e.getValue(t))},{meta:{className:"w-[200px]"},accessorKey:"Component",header:"Component",cell:({row:e})=>{const t=e.getValue("Component"),n=e.getValue("Type"),r=d.jsx(vp,{variant:n??"default"});return d.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d.jsx("div",{children:r}),d.jsxs("div",{className:"flex flex-col",children:[d.jsx("p",{className:"text-md font-semibold truncate",children:t}),d.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n})]})]})},filterFn:(e,t,n)=>n.includes(e.getValue(t))},{meta:{className:"w-20"},accessorKey:"Type",header:()=>d.jsx("div",{children:"Type"}),cell:({row:e})=>{const t=e.getValue("Type");return d.jsx("p",{className:"text-md font-semibold",children:t})},filterFn:(e,t,n)=>n.includes(e.getValue(t))},{meta:{className:"hidden 2xl:table-cell w-[150px] 3xl:w-[250px]"},accessorKey:"Tags",header:()=>d.jsx("div",{children:"Tags"}),cell:({row:e})=>{const t=e.getValue("Tags");return t!=""?d.jsx("p",{className:"text-md font-semibold",children:t}):d.jsx("div",{className:"text-xs text-muted-foreground",children:d.jsx(Fn,{children:"Default"})})}},{meta:{className:"w-[120px]"},accessorKey:"Status",header:"Status",cell:({row:e})=>{const t=e.getValue("Status");return t!=""?d.jsx("p",{className:"text-md font-semibold",children:t}):d.jsx("div",{className:"text-xs text-muted-foreground",children:d.jsx(Fn,{className:"dark:border-green-600 dark:text-green-500 bg-green-600",children:"normal"})})}},{meta:{className:"w-[120px]"},accessorKey:"RawValue",header:"Raw Value",cell:({row:e})=>{const t=e.getValue("RawValue");return d.jsx("div",{className:"text-md truncate",children:t})}},{meta:{className:"w-[120px]"},accessorKey:"ModifiedValue",header:"Final Value",cell:({row:e})=>{const t=e.getValue("ModifiedValue");return d.jsx("div",{className:"text-md truncate",children:t})}},{meta:{className:"w-[80px]"},id:"actions",cell:({row:e})=>{const t=e.original,n=tl(),r=Hi();return d.jsx("div",{className:"relative",children:d.jsxs(S1,{children:[d.jsx(I3,{asChild:!0,children:d.jsxs(at,{variant:"ghost",className:"h-8 w-8 p-0",children:[d.jsx("span",{className:"sr-only",children:"Open menu"}),d.jsx(cP,{className:"h-4 w-4"})]})}),d.jsxs(mp,{align:"end",children:[d.jsx(dc,{children:"Actions"}),d.jsx(hn,{onClick:()=>{const o=`/projects/${n.id}/configs/${t.GUID}`;console.log(o),r(o)},children:"Edit"}),d.jsx(Ia,{}),d.jsx(hn,{children:"Duplicate"}),d.jsx(hn,{children:"Copy"}),d.jsx(hn,{children:"Paste"}),d.jsx(Ia,{}),d.jsx(hn,{children:"Test"})]})]})})}}],QB=()=>{const e=tl(),{items:t}=qa(),n=cp.find(r=>r.id===e.id);return d.jsxs("div",{className:"flex flex-col gap-4 overflow-y-auto",children:[d.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[d.jsx(tr,{to:"/",className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Project"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:(n==null?void 0:n.name)??"Default"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0 font-bold",children:"Configs"}),d.jsx(uP,{})]}),d.jsxs(a3,{defaultValue:"config-1",className:"grow flex flex-col overflow-y-auto",children:[d.jsx("div",{children:d.jsxs(s1,{className:"mb-4 mt-0",children:[d.jsx(Ci,{value:"config-1",children:"Config one"}),d.jsx(Ci,{value:"config-2",children:"Autopilot"}),d.jsx(Ci,{value:"config-3",children:"Radio"})]})}),d.jsx(Ea,{value:"config-1",className:"mt-0 flex flex-col grow overflow-y-auto",children:d.jsx(jU,{columns:XB,data:t})})]})]})},ps=p.forwardRef((e,t)=>p.createElement(Oe.label,q({},e,{ref:t,onMouseDown:n=>{var r;(r=e.onMouseDown)===null||r===void 0||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),K3=ps,JB="/assets/msfs2020-logo-BXS3GGap.png",C1="/assets/mobiflight-logo-border-DSJoqCyo.png",ZB="/assets/hand-flipping-switch-BavH9Bvp.png",eV=p.forwardRef((e,t)=>p.createElement(Oe.span,q({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),tV=[" ","Enter","ArrowUp","ArrowDown"],nV=[" ","Enter"],xp="Select",[yp,wp,rV]=r1(xp),[ll,GW]=ur(xp,[rV,sl]),$1=sl(),[oV,Ls]=ll(xp),[iV,sV]=ll(xp),aV=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:c,onValueChange:u,dir:f,name:h,autoComplete:m,disabled:v,required:x}=e,w=$1(t),[b,P]=p.useState(null),[C,S]=p.useState(null),[E,_]=p.useState(!1),D=Zc(f),[N=!1,j]=Ii({prop:r,defaultProp:o,onChange:i}),[O,V]=Ii({prop:a,defaultProp:c,onChange:u}),J=p.useRef(null),ie=b?!!b.closest("form"):!0,[te,ge]=p.useState(new Set),le=Array.from(te).map(T=>T.props.value).join(";");return p.createElement(Vv,w,p.createElement(oV,{required:x,scope:t,trigger:b,onTriggerChange:P,valueNode:C,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:_,contentId:co(),value:O,onValueChange:V,open:N,onOpenChange:j,dir:D,triggerPointerDownPosRef:J,disabled:v},p.createElement(yp.Provider,{scope:t},p.createElement(iV,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(T=>{ge(W=>new Set(W).add(T))},[]),onNativeOptionRemove:p.useCallback(T=>{ge(W=>{const Y=new Set(W);return Y.delete(T),Y})},[])},n)),ie?p.createElement(Q3,{key:le,"aria-hidden":!0,required:x,tabIndex:-1,name:h,autoComplete:m,value:O,onChange:T=>V(T.target.value),disabled:v},O===void 0?p.createElement("option",{value:""}):null,Array.from(te)):null))},lV="SelectTrigger",cV=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=$1(n),a=Ls(lV,n),c=a.disabled||r,u=Ze(t,a.onTriggerChange),f=wp(n),[h,m,v]=J3(w=>{const b=f().filter(S=>!S.disabled),P=b.find(S=>S.value===a.value),C=Z3(b,w,P);C!==void 0&&a.onValueChange(C.value)}),x=()=>{c||(a.onOpenChange(!0),v())};return p.createElement(Hv,q({asChild:!0},i),p.createElement(Oe.button,q({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":X3(a.value)?"":void 0},o,{ref:u,onClick:he(o.onClick,w=>{w.currentTarget.focus()}),onPointerDown:he(o.onPointerDown,w=>{const b=w.target;b.hasPointerCapture(w.pointerId)&&b.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&(x(),a.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)},w.preventDefault())}),onKeyDown:he(o.onKeyDown,w=>{const b=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&m(w.key),!(b&&w.key===" ")&&tV.includes(w.key)&&(x(),w.preventDefault())})})))}),uV="SelectValue",dV=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...c}=e,u=Ls(uV,n),{onValueNodeHasChildrenChange:f}=u,h=i!==void 0,m=Ze(t,u.onValueNodeChange);return _n(()=>{f(h)},[f,h]),p.createElement(Oe.span,q({},c,{ref:m,style:{pointerEvents:"none"}}),X3(u.value)?p.createElement(p.Fragment,null,a):i)}),fV=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(Oe.span,q({"aria-hidden":!0},o,{ref:t}),r||"▼")}),pV=e=>p.createElement(tp,q({asChild:!0},e)),Xa="SelectContent",hV=p.forwardRef((e,t)=>{const n=Ls(Xa,e.__scopeSelect),[r,o]=p.useState();if(_n(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?po.createPortal(p.createElement(G3,{scope:e.__scopeSelect},p.createElement(yp.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),i):null}return p.createElement(gV,q({},e,{ref:t}))}),ko=10,[G3,As]=ll(Xa),gV=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:c,sideOffset:u,align:f,alignOffset:h,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:w,hideWhenDetached:b,avoidCollisions:P,...C}=e,S=Ls(Xa,n),[E,_]=p.useState(null),[D,N]=p.useState(null),j=Ze(t,pe=>_(pe)),[O,V]=p.useState(null),[J,ie]=p.useState(null),te=wp(n),[ge,le]=p.useState(!1),T=p.useRef(!1);p.useEffect(()=>{if(E)return Yc(E)},[E]),np();const W=p.useCallback(pe=>{const[Te,...Fe]=te().map(Me=>Me.ref.current),[We]=Fe.slice(-1),Pe=document.activeElement;for(const Me of pe)if(Me===Pe||(Me==null||Me.scrollIntoView({block:"nearest"}),Me===Te&&D&&(D.scrollTop=0),Me===We&&D&&(D.scrollTop=D.scrollHeight),Me==null||Me.focus(),document.activeElement!==Pe))return},[te,D]),Y=p.useCallback(()=>W([O,E]),[W,O,E]);p.useEffect(()=>{ge&&Y()},[ge,Y]);const{onOpenChange:U,triggerPointerDownPosRef:B}=S;p.useEffect(()=>{if(E){let pe={x:0,y:0};const Te=We=>{var Pe,Me,Mt,lt;pe={x:Math.abs(Math.round(We.pageX)-((Pe=(Me=B.current)===null||Me===void 0?void 0:Me.x)!==null&&Pe!==void 0?Pe:0)),y:Math.abs(Math.round(We.pageY)-((Mt=(lt=B.current)===null||lt===void 0?void 0:lt.y)!==null&&Mt!==void 0?Mt:0))}},Fe=We=>{pe.x<=10&&pe.y<=10?We.preventDefault():E.contains(We.target)||U(!1),document.removeEventListener("pointermove",Te),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",Te),document.addEventListener("pointerup",Fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",Fe,{capture:!0})}}},[E,U,B]),p.useEffect(()=>{const pe=()=>U(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[U]);const[L,H]=J3(pe=>{const Te=te().filter(Pe=>!Pe.disabled),Fe=Te.find(Pe=>Pe.ref.current===document.activeElement),We=Z3(Te,pe,Fe);We&&setTimeout(()=>We.ref.current.focus())}),oe=p.useCallback((pe,Te,Fe)=>{const We=!T.current&&!Fe;(S.value!==void 0&&S.value===Te||We)&&(V(pe),We&&(T.current=!0))},[S.value]),ne=p.useCallback(()=>E==null?void 0:E.focus(),[E]),fe=p.useCallback((pe,Te,Fe)=>{const We=!T.current&&!Fe;(S.value!==void 0&&S.value===Te||We)&&ie(pe)},[S.value]),Se=r==="popper"?US:mV,me=Se===US?{side:c,sideOffset:u,align:f,alignOffset:h,arrowPadding:m,collisionBoundary:v,collisionPadding:x,sticky:w,hideWhenDetached:b,avoidCollisions:P}:{};return p.createElement(G3,{scope:n,content:E,viewport:D,onViewportChange:N,itemRefCallback:oe,selectedItem:O,onItemLeave:ne,itemTextRefCallback:fe,focusSelectedItem:Y,selectedItemText:J,position:r,isPositioned:ge,searchRef:L},p.createElement(op,{as:Vo,allowPinchZoom:!0},p.createElement(ep,{asChild:!0,trapped:S.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:he(o,pe=>{var Te;(Te=S.trigger)===null||Te===void 0||Te.focus({preventScroll:!0}),pe.preventDefault()})},p.createElement(Zf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>S.onOpenChange(!1)},p.createElement(Se,q({role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:pe=>pe.preventDefault()},C,me,{onPlaced:()=>le(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:he(C.onKeyDown,pe=>{const Te=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!Te&&pe.key.length===1&&H(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let We=te().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(We=We.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Pe=pe.target,Me=We.indexOf(Pe);We=We.slice(Me+1)}setTimeout(()=>W(We)),pe.preventDefault()}})}))))))}),mV=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Ls(Xa,n),a=As(Xa,n),[c,u]=p.useState(null),[f,h]=p.useState(null),m=Ze(t,j=>h(j)),v=wp(n),x=p.useRef(!1),w=p.useRef(!0),{viewport:b,selectedItem:P,selectedItemText:C,focusSelectedItem:S}=a,E=p.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&b&&P&&C){const j=i.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),V=i.valueNode.getBoundingClientRect(),J=C.getBoundingClientRect();if(i.dir!=="rtl"){const Pe=J.left-O.left,Me=V.left-Pe,Mt=j.left-Me,lt=j.width+Mt,Qe=Math.max(lt,O.width),tn=window.innerWidth-ko,Ut=t0(Me,[ko,tn-Qe]);c.style.minWidth=lt+"px",c.style.left=Ut+"px"}else{const Pe=O.right-J.right,Me=window.innerWidth-V.right-Pe,Mt=window.innerWidth-j.right-Me,lt=j.width+Mt,Qe=Math.max(lt,O.width),tn=window.innerWidth-ko,Ut=t0(Me,[ko,tn-Qe]);c.style.minWidth=lt+"px",c.style.right=Ut+"px"}const ie=v(),te=window.innerHeight-ko*2,ge=b.scrollHeight,le=window.getComputedStyle(f),T=parseInt(le.borderTopWidth,10),W=parseInt(le.paddingTop,10),Y=parseInt(le.borderBottomWidth,10),U=parseInt(le.paddingBottom,10),B=T+W+ge+U+Y,L=Math.min(P.offsetHeight*5,B),H=window.getComputedStyle(b),oe=parseInt(H.paddingTop,10),ne=parseInt(H.paddingBottom,10),fe=j.top+j.height/2-ko,Se=te-fe,me=P.offsetHeight/2,pe=P.offsetTop+me,Te=T+W+pe,Fe=B-Te;if(Te<=fe){const Pe=P===ie[ie.length-1].ref.current;c.style.bottom="0px";const Me=f.clientHeight-b.offsetTop-b.offsetHeight,Mt=Math.max(Se,me+(Pe?ne:0)+Me+Y),lt=Te+Mt;c.style.height=lt+"px"}else{const Pe=P===ie[0].ref.current;c.style.top="0px";const Mt=Math.max(fe,T+b.offsetTop+(Pe?oe:0)+me)+Fe;c.style.height=Mt+"px",b.scrollTop=Te-fe+b.offsetTop}c.style.margin=`${ko}px 0`,c.style.minHeight=L+"px",c.style.maxHeight=te+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[v,i.trigger,i.valueNode,c,f,b,P,C,i.dir,r]);_n(()=>E(),[E]);const[_,D]=p.useState();_n(()=>{f&&D(window.getComputedStyle(f).zIndex)},[f]);const N=p.useCallback(j=>{j&&w.current===!0&&(E(),S==null||S(),w.current=!1)},[E,S]);return p.createElement(vV,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:N},p.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_}},p.createElement(Oe.div,q({},o,{ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),US=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ko,...i}=e,a=$1(n);return p.createElement(Wv,q({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[vV,P1]=ll(Xa,{}),BS="SelectViewport",xV=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=As(BS,n),i=P1(BS,n),a=Ze(t,o.onViewportChange),c=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(yp.Slot,{scope:n},p.createElement(Oe.div,q({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:he(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=i;if(m!=null&&m.current&&h){const v=Math.abs(c.current-f.scrollTop);if(v>0){const x=window.innerHeight-ko*2,w=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),P=Math.max(w,b);if(P0?E:0,h.style.justifyContent="flex-end")}}}c.current=f.scrollTop})}))))}),yV="SelectGroup",[qW,wV]=ll(yV),bV="SelectLabel",SV=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=wV(bV,n);return p.createElement(Oe.div,q({id:o.id},r,{ref:t}))}),f0="SelectItem",[CV,q3]=ll(f0),$V=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,c=Ls(f0,n),u=As(f0,n),f=c.value===r,[h,m]=p.useState(i??""),[v,x]=p.useState(!1),w=Ze(t,C=>{var S;return(S=u.itemRefCallback)===null||S===void 0?void 0:S.call(u,C,r,o)}),b=co(),P=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.createElement(CV,{scope:n,value:r,disabled:o,textId:b,isSelected:f,onItemTextChange:p.useCallback(C=>{m(S=>{var E;return S||((E=C==null?void 0:C.textContent)!==null&&E!==void 0?E:"").trim()})},[])},p.createElement(yp.ItemSlot,{scope:n,value:r,disabled:o,textValue:h},p.createElement(Oe.div,q({role:"option","aria-labelledby":b,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:w,onFocus:he(a.onFocus,()=>x(!0)),onBlur:he(a.onBlur,()=>x(!1)),onPointerUp:he(a.onPointerUp,P),onPointerMove:he(a.onPointerMove,C=>{if(o){var S;(S=u.onItemLeave)===null||S===void 0||S.call(u)}else C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(a.onPointerLeave,C=>{if(C.currentTarget===document.activeElement){var S;(S=u.onItemLeave)===null||S===void 0||S.call(u)}}),onKeyDown:he(a.onKeyDown,C=>{var S;((S=u.searchRef)===null||S===void 0?void 0:S.current)!==""&&C.key===" "||(nV.includes(C.key)&&P(),C.key===" "&&C.preventDefault())})}))))}),bd="SelectItemText",PV=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Ls(bd,n),c=As(bd,n),u=q3(bd,n),f=sV(bd,n),[h,m]=p.useState(null),v=Ze(t,C=>m(C),u.onItemTextChange,C=>{var S;return(S=c.itemTextRefCallback)===null||S===void 0?void 0:S.call(c,C,u.value,u.disabled)}),x=h==null?void 0:h.textContent,w=p.useMemo(()=>p.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},x),[u.disabled,u.value,x]),{onNativeOptionAdd:b,onNativeOptionRemove:P}=f;return _n(()=>(b(w),()=>P(w)),[b,P,w]),p.createElement(p.Fragment,null,p.createElement(Oe.span,q({id:u.textId},i,{ref:v})),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?po.createPortal(i.children,a.valueNode):null)}),EV="SelectItemIndicator",RV=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return q3(EV,n).isSelected?p.createElement(Oe.span,q({"aria-hidden":!0},r,{ref:t})):null}),VS="SelectScrollUpButton",_V=p.forwardRef((e,t)=>{const n=As(VS,e.__scopeSelect),r=P1(VS,e.__scopeSelect),[o,i]=p.useState(!1),a=Ze(t,r.onScrollButtonChange);return _n(()=>{if(n.viewport&&n.isPositioned){let f=function(){const h=u.scrollTop>0;i(h)};var c=f;const u=n.viewport;return f(),u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?p.createElement(Y3,q({},e,{ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}})):null}),HS="SelectScrollDownButton",NV=p.forwardRef((e,t)=>{const n=As(HS,e.__scopeSelect),r=P1(HS,e.__scopeSelect),[o,i]=p.useState(!1),a=Ze(t,r.onScrollButtonChange);return _n(()=>{if(n.viewport&&n.isPositioned){let f=function(){const h=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)u.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),o?p.createElement(Y3,q({},e,{ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}})):null}),Y3=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=As("SelectScrollButton",n),a=p.useRef(null),c=wp(n),u=p.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return p.useEffect(()=>()=>u(),[u]),_n(()=>{var f;const h=c().find(m=>m.ref.current===document.activeElement);h==null||(f=h.ref.current)===null||f===void 0||f.scrollIntoView({block:"nearest"})},[c]),p.createElement(Oe.div,q({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:he(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:he(o.onPointerMove,()=>{var f;(f=i.onItemLeave)===null||f===void 0||f.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:he(o.onPointerLeave,()=>{u()})}))}),kV=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Oe.div,q({"aria-hidden":!0},r,{ref:t}))});function X3(e){return e===""||e===void 0}const Q3=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),i=Ze(t,o),a=H$(n);return p.useEffect(()=>{const c=o.current,u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&h){const m=new Event("change",{bubbles:!0});h.call(c,n),c.dispatchEvent(m)}},[a,n]),p.createElement(eV,{asChild:!0},p.createElement("select",q({},r,{ref:i,defaultValue:n})))});Q3.displayName="BubbleSelect";function J3(e){const t=Zt(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(a=>{const c=n.current+a;t(c),function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(c)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Z3(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=DV(e,Math.max(i,0));o.length===1&&(a=a.filter(f=>f!==n));const u=a.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function DV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const jV=aV,eR=cV,MV=dV,TV=fV,IV=pV,tR=hV,OV=xV,nR=SV,rR=$V,LV=PV,AV=RV,oR=_V,iR=NV,sR=kV,FV=jV,zV=MV,aR=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(eR,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(TV,{asChild:!0,children:d.jsx(qf,{className:"h-4 w-4 opacity-50"})})]}));aR.displayName=eR.displayName;const lR=p.forwardRef(({className:e,...t},n)=>d.jsx(oR,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(lP,{className:"h-4 w-4"})}));lR.displayName=oR.displayName;const cR=p.forwardRef(({className:e,...t},n)=>d.jsx(iR,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(qf,{className:"h-4 w-4"})}));cR.displayName=iR.displayName;const uR=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(IV,{children:d.jsxs(tR,{ref:o,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(lR,{}),d.jsx(OV,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(cR,{})]})}));uR.displayName=tR.displayName;const UV=p.forwardRef(({className:e,...t},n)=>d.jsx(nR,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));UV.displayName=nR.displayName;const dR=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(rR,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(AV,{children:d.jsx(Gf,{className:"h-4 w-4"})})}),d.jsx(LV,{children:t})]}));dR.displayName=rR.displayName;const BV=p.forwardRef(({className:e,...t},n)=>d.jsx(sR,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));BV.displayName=sR.displayName;const VV=({onUse:e})=>[{accessorKey:"label",meta:{className:"max-w-[350px]"},header:()=>d.jsx("div",{className:"w-8",children:"Preset"}),cell:({row:t})=>{const n=t.original.label,r=t.original.aircraft,o=t.original.system,i=t.original.vendor;return d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-md truncate font-semibold",children:n}),d.jsxs("p",{className:"truncate text-xs text-muted-foreground",children:[i," > ",r," > ",o]})]})},filterFn:(t,n,r)=>t.getValue(n).toUpperCase().indexOf(r.toUpperCase())>-1},{accessorKey:"description",meta:{className:"w-[200px] max-w-[500px]"},header:()=>d.jsx("div",{className:"w-8",children:"Description"}),cell:({row:t})=>d.jsx("div",{children:d.jsx("p",{className:"text-xs truncate",children:t.original.description})}),filterFn:(t,n,r)=>r.includes(t.getValue(n))},{accessorKey:"vendor",header:()=>d.jsx("div",{className:"w-8",children:"Vendor"}),filterFn:(t,n,r)=>r.includes(t.getValue(n))},{accessorKey:"aircraft",header:()=>d.jsx("div",{className:"w-8",children:"Aircraft"}),filterFn:(t,n,r)=>r.includes(t.getValue(n))},{accessorKey:"system",header:()=>d.jsx("div",{className:"w-8",children:"System"}),filterFn:(t,n,r)=>r.includes(t.getValue(n))},{accessorKey:"actions",header:()=>d.jsx("div",{className:"w-8",children:"Actions"}),meta:{className:"w-[80px]"},cell:({row:t})=>d.jsx("div",{className:"flex flex-row gap-2",children:d.jsx(at,{size:"sm",onClick:()=>{e(t.original)},children:"Use"})})}];function HV({table:e,items:t}){var a;const n=e.getState().columnFilters.length>0,r=[...new Set(t.map(c=>c.vendor))].map(c=>({label:c,value:c})),o=[...new Set(t.map(c=>c.aircraft))].map(c=>({label:c,value:c})),i=[...new Set(t.map(c=>c.system))].map(c=>({label:c,value:c}));return d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[d.jsx(qt,{placeholder:"Filter items...",value:((a=e.getColumn("label"))==null?void 0:a.getFilterValue())??"",onChange:c=>{var u;return(u=e.getColumn("label"))==null?void 0:u.setFilterValue(c.target.value)},className:"w-[150px] lg:w-[250px]"}),e.getColumn("vendor")&&d.jsx(ms,{column:e.getColumn("vendor"),title:"Vendor",options:r}),e.getColumn("aircraft")&&d.jsx(ms,{column:e.getColumn("aircraft"),title:"Aircraft",options:o}),e.getColumn("system")&&d.jsx(ms,{column:e.getColumn("system"),title:"System",options:i}),n&&d.jsxs(at,{onClick:()=>e.resetColumnFilters(),children:["Reset",d.jsx(Yf,{className:"ml-2 h-4 w-4"})]})]}),e.getFilteredRowModel().rows.length>0&&d.jsxs("div",{className:"text-sm",children:[e.getFilteredRowModel().rows.length," items"]})]})}function WV({columns:e,data:t,config:n}){var m;const[r,o]=p.useState([]),[i,a]=p.useState([]),[c,u]=p.useState({vendor:!1,aircraft:!1,system:!1}),f=m1({data:t,columns:e,onSortingChange:o,onColumnFiltersChange:a,getCoreRowModel:d1(),getSortedRowModel:g1(),getFilteredRowModel:f1(),getFacetedRowModel:p1(),getFacetedUniqueValues:h1(),onColumnVisibilityChange:u,state:{sorting:r,columnFilters:i,columnVisibility:c},defaultColumn:{size:10,minSize:1,maxSize:250}}),h=p.useRef(null);return p.useEffect(()=>{if(h.current){const v=t.findIndex(w=>w.code==n.Event.Settings.Value),x=h.current.querySelector(`[data-row-index="${v}"]`);x&&x.scrollIntoView({behavior:"smooth",block:"center"})}},[n,t]),d.jsxs("div",{className:"flex flex-col gap-4 grow overflow-y-auto",children:[d.jsx("div",{className:"",children:d.jsx(HV,{table:f,items:t})}),d.jsx("div",{className:"flex flex-col overflow-y-auto border rounded-lg",children:d.jsx(Yv,{className:"h-[300px] min-h-[200px] max-h-[400px] rounded-md border",children:d.jsxs(dp,{ref:h,className:"w-full",children:[d.jsx(fp,{className:"sticky top-0 bg-slate-700 dark:bg-slate-800 text-white group/header",children:f.getHeaderGroups().map(v=>d.jsx(uo,{className:"hover:bg-slate-800",children:v.headers.map(x=>{var w,b;return d.jsx(hp,{className:`text-white px-2 bg-slate-700 dark:bg-slate-800 ${((b=(w=x.column.columnDef)==null?void 0:w.meta)==null?void 0:b.className)??""}`,children:x.isPlaceholder?null:Ya(x.column.columnDef.header,x.getContext())},x.id)})},v.id))}),d.jsx(pp,{className:"overflow-y-auto bg-white",children:(m=f.getRowModel().rows)!=null&&m.length?f.getRowModel().rows.map(v=>d.jsx(uo,{"data-state":v.getIsSelected()&&"selected","data-row-index":v.index,className:n.Event.Settings.Value===v.original.code?"bg-blue-200 hover:bg-blue-300":"",children:v.getVisibleCells().map(x=>{var w,b;return d.jsx(Ns,{className:`p-2 ${(b=(w=x.column.columnDef)==null?void 0:w.meta)==null?void 0:b.className}`,children:Ya(x.column.columnDef.cell,x.getContext())},x.id)})},v.id)):d.jsx(uo,{children:d.jsx(Ns,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})})]})}const fR=p.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));fR.displayName="Textarea";const pR=Ms(e=>({presets:[],setPresets:t=>e(()=>({presets:t}))})),KV=Ms(e=>({presets:[],setPresets:t=>e(()=>({presets:t}))})),GV=e=>{const{config:t,onChange:n}=e,r=pR().presets.filter(c=>c.presetType==="Output"),o=p.useCallback(c=>{n({...t,Event:{...t.Event,Settings:{UUID:c.id,Value:c.code,VarType:"CODE"}}})},[t]),i=p.useCallback(c=>{const u=c.target.value;n({...t,Event:{...t.Event,Settings:{...t.Event.Settings,Value:u}}})},[t]),a=p.useMemo(()=>VV({onUse:o}),[]);return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex h-auto flex-row items-center gap-4 align-text-top",children:[d.jsx(ps,{className:"w-16",children:"Presets"}),d.jsx("div",{children:d.jsx(WV,{columns:a,data:r,config:t})})]}),d.jsxs("div",{className:"flex h-auto flex-row items-center gap-4",children:[d.jsx(ps,{className:"w-16",children:"Code"}),d.jsx(fR,{onChange:i,value:t.Event.Settings.Value})]})]})},qV=()=>d.jsx("div",{children:"MobiFlightVariable Yeah!"}),YV=()=>d.jsx("div",{children:"XplaneEvent"}),XV=()=>d.jsx("div",{children:"FSUIPC"}),QV=e=>{const{config:t,editMode:n,className:r,onChange:o}=e,[i,a]=p.useState(!1),[c,u]=p.useState(!1),f=Hi(),[h,m]=p.useState(t),v=p.useCallback(b=>{const P={...h,Event:{...h.Event,Type:b}};m(P),o(h)},[]),x=p.useCallback(b=>{const P={...h,Event:{...h.Event,Settings:b.Event.Settings}};m(P),o(P)},[]);p.useEffect(()=>{u(!Bm.isEqual(t,h))},[t,h]);const w={SIMCONNECT:"MSFS 2020",XPLANE:"X-Plane",VARIABLE:"MobiFlight",FSUIPC:"FSUIPC"};return d.jsxs("div",{className:se("",r),children:[d.jsxs(zt,{children:[d.jsx(Rn,{children:d.jsxs("h2",{className:"",children:["Select one type of event from the set of options: ",c?"true":"false"]})}),d.jsxs(Un,{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-row items-center gap-4",children:[d.jsx("div",{className:"w-16",children:"Type:"}),d.jsx("div",{children:d.jsxs(FV,{onValueChange:v,defaultValue:t.Event.Type,children:[d.jsx(aR,{className:"w-[180px]",children:d.jsx(zV,{placeholder:t.Event.Type})}),d.jsx(uR,{children:Object.entries(w).map(([b,P])=>d.jsx(dR,{value:b,children:P},b))})]})})]}),d.jsxs("div",{children:[h.Event.Type==="SIMCONNECT"&&d.jsx(GV,{config:h,onChange:x}),h.Event.Type==="VARIABLE"&&d.jsx(qV,{}),h.Event.Type==="XPLANE"&&d.jsx(YV,{}),h.Event.Type==="FSUIPC"&&d.jsx(XV,{})]})]}),d.jsx(Lo,{className:"flex flex-row items-center gap-4"})]}),d.jsx(tE,{open:i,onOpenChange:()=>{f("../"),a(!1)},children:d.jsx(Mv,{className:"max-w-3xl",children:d.jsxs(rE,{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("h2",{className:"text-2xl",children:"What kind of event would you like to use?"}),d.jsx("div",{className:"text-sm",children:"You can use different event sources for the value which you want to use"})]}),d.jsxs("ul",{className:"grid grid-cols-3 gap-4",children:[d.jsx("li",{children:d.jsxs(zt,{className:"flex aspect-square cursor-pointer flex-col items-center gap-4 pt-4",children:[d.jsx("img",{src:ZB,alt:"Hand flipping the switch",className:"h-32 rounded-xl"}),d.jsx("div",{className:"text-center text-xl",children:d.jsx("span",{className:"font-bold",children:"Device input"})})]})}),d.jsx("li",{children:d.jsxs(zt,{className:"flex aspect-square cursor-pointer flex-col items-center gap-4 pt-4",children:[d.jsx("img",{src:JB,alt:"MSFS2020 Logo",className:"h-32 rounded-xl"}),d.jsxs("div",{className:"text-center text-xl",children:[d.jsx("span",{className:"font-bold",children:"MSFS2020"}),d.jsx("br",{})," Simulator Value"]})]})}),d.jsx("li",{children:d.jsxs(zt,{className:"flex aspect-square cursor-pointer flex-col items-center gap-4 pt-4",onClickCapture:()=>{f("../mobiflight"),a(!1)},children:[d.jsx("img",{src:C1,alt:"MobiFlightLogo",className:"h-32 rounded-xl"}),d.jsxs("div",{className:"text-center text-xl",children:[d.jsxs("span",{className:"font-bold",children:["MobiFlight",d.jsx("br",{})]}),"Variable"]})]})})]}),d.jsxs("div",{className:"flex flex-row items-center gap-2 text-primary",children:[d.jsx(Ao,{})," What are the different options?"]})]})})})]})},JV=()=>{const{publish:e}=Gc(),{configId:t,projectId:n}=tl(),r=qa(C=>C.items),o=qa(C=>C.updateItem),i=r.find(C=>C.GUID===t),[a,c]=p.useState({...i}),[u,f]=p.useState(!1),[h,m]=p.useState("1"),[v]=p.useState("1"),[x,w]=p.useState(""),b=cp.find(C=>C.id===n);p.useEffect(()=>{const C=!tP.isEqual(i,a);f(C)},[i,a]);const P=p.useCallback(()=>{console.log("Saving changes",a),o(a),e({key:"config.update",payload:a})},[a]);return d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"flex flex-row items-center gap-4",role:"navigation",children:[d.jsx(tr,{to:"/",className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Project"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:(b==null?void 0:b.name)??"Default"}),d.jsx(tr,{to:`/project/${n}/configs`,className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Configs"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl font-bold tracking-tight first:mt-0",children:i==null?void 0:i.Description}),u&&d.jsxs("div",{children:[d.jsx(at,{variant:"default",onClick:P,children:"Save changes"}),d.jsx(at,{variant:"ghost",children:"Discard changes"})]})]}),d.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:gap-32",children:[d.jsxs("div",{className:"flex flex-row items-center gap-2",children:[d.jsx(Wt,{checked:i==null?void 0:i.Active,children:"Active"}),d.jsx(ps,{children:"Active"})]}),d.jsxs("div",{className:"flex flex-row items-center gap-4",children:[d.jsx("p",{children:"Tags"}),d.jsxs("ul",{className:"flex flex-row items-center gap-2",children:[d.jsx("li",{className:"flex flex-row items-center gap-2",children:d.jsx(Fn,{children:"Autopilot"})}),d.jsx("li",{className:"flex flex-row items-center gap-2",children:d.jsx(Fn,{children:"Autopilot"})}),d.jsx("li",{className:"flex flex-row items-center gap-2",children:d.jsx(Fn,{children:"Autopilot"})}),d.jsx("li",{className:"flex flex-row items-center gap-2",children:d.jsx(Fn,{children:"Autopilot"})})]}),d.jsxs(at,{className:"h-6 rounded-xl text-xs",variant:"ghost",children:[d.jsx(DI,{className:"size-4"}),"Add tag"]})]})]}),d.jsx("div",{className:"just flex flex-row gap-4",children:d.jsxs(a3,{defaultValue:"tab-event",className:"w-full",children:[d.jsxs(s1,{className:"grid w-full grid-cols-4",children:[d.jsxs(Ci,{value:"tab-event",children:["Event",u&&d.jsx(Fn,{className:"ml-2",children:"!"})]}),d.jsx(Ci,{value:"tab-modifiers",children:"Modifiers"}),d.jsx(Ci,{value:"tab-action",children:"Action"}),d.jsx(Ci,{value:"tab-context",children:"Context"})]}),d.jsx(Ea,{value:"tab-event",children:d.jsx(QV,{config:i,editMode:x==="event",onCancelEditMode:()=>{},onEnterEditMode:()=>{},onSaveEditMode:()=>{},onChange:C=>{c(C)}})}),d.jsx(Ea,{value:"tab-modifiers",children:d.jsxs(zt,{children:[d.jsxs(Rn,{className:"",children:[d.jsx("h3",{className:"text-xl",children:"Modifiers"}),d.jsx("p",{className:"text-xs",children:"Modify your event value (optional)"})]}),d.jsx(Un,{className:"text-center",children:i==null?void 0:i.Modifiers.map((C,S)=>d.jsx("div",{children:C.Type},S))}),d.jsxs(Lo,{className:"flex flex-row items-center justify-between",children:[d.jsx(at,{onClick:()=>w("modify"),children:"Edit"}),d.jsx(Ao,{children:"Learn more"})]})]})}),d.jsx(Ea,{value:"tab-action",children:d.jsxs(zt,{children:[d.jsxs(Rn,{className:"",children:[d.jsx("h3",{className:"text-xl",children:"Action"}),d.jsx("p",{className:"text-xs",children:"Do something with your sim or device"})]}),d.jsx(Un,{className:"text-center",children:i==null?void 0:i.Action.Type}),d.jsxs(Lo,{className:"flex flex-row items-center justify-between",children:[d.jsx(at,{onClick:()=>w("action"),children:"Edit"}),d.jsx(Ao,{children:"Learn more"})]})]})}),d.jsx(Ea,{value:"tab-context",children:d.jsxs(zt,{className:"w-1/3 bg-background",children:[d.jsxs(Rn,{className:"",children:[d.jsx("h3",{className:"text-xl",children:"Context"}),d.jsx("p",{className:"text-xs",children:"Define when this config will be applied"})]}),d.jsx(Un,{className:"text-center align-middle",children:i==null?void 0:i.Context.Preconditions.map((C,S)=>d.jsx("div",{children:C.Type},S))}),d.jsxs(Lo,{className:"flex flex-row items-center justify-between",children:[d.jsx(at,{onClick:()=>w("context"),children:"Edit"}),d.jsx(Ao,{children:"Learn more"})]})]})})]})}),d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-col",children:[d.jsx("h2",{className:"text-2xl",children:"Test your settings"}),d.jsx("p",{className:"text-xs",children:"Test your current config settings interactively by defining a custom test value."})]}),d.jsx(zt,{className:"flex flex-row items-center",children:d.jsxs(Un,{className:"flex-flow flex h-auto items-center gap-4 py-3",children:[d.jsx(ps,{children:"Value type"}),d.jsx(Xe,{options:[{label:"Number",value:"Number"},{label:"String",value:"Text"}],onSelect:()=>{},value:"Number"}),d.jsx(ps,{children:"Value"}),d.jsx(qt,{value:h,className:"w-auto",onChange:C=>m(C.target.value)}),d.jsx(at,{children:"Test"}),d.jsx(at,{children:"Stop"}),d.jsx(ps,{className:"ml-12",children:"Test result"}),d.jsx("div",{className:"w-auto min-w-[200px] rounded-lg bg-background px-6 py-2",children:v})]})})]})]})},ZV=e=>{const{condition:t,wrapper:n,children:r}=e;return t?n(r):r},hR="Progress",bp=100,[eH,YW]=ur(hR),[tH,nH]=eH(hR),gR=p.forwardRef((e,t)=>{const{__scopeProgress:n,value:r,max:o,getValueLabel:i=iH,...a}=e,c=p0(o)?o:bp,u=vR(r,c)?r:null,f=$f(u)?i(u,c):void 0;return p.createElement(tH,{scope:n,value:u,max:c},p.createElement(Oe.div,q({"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":$f(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":mR(u,c),"data-value":u??void 0,"data-max":c},a,{ref:t})))});gR.propTypes={max(e,t,n){const r=e[t],o=String(r);return r&&!p0(r)?new Error(sH(o,n)):null},value(e,t,n){const r=e[t],o=String(r),i=p0(e.max)?e.max:bp;return r!=null&&!vR(r,i)?new Error(aH(o,n)):null}};const rH="ProgressIndicator",oH=p.forwardRef((e,t)=>{var n;const{__scopeProgress:r,...o}=e,i=nH(rH,r);return p.createElement(Oe.div,q({"data-state":mR(i.value,i.max),"data-value":(n=i.value)!==null&&n!==void 0?n:void 0,"data-max":i.max},o,{ref:t}))});function iH(e,t){return`${Math.round(e/t*100)}%`}function mR(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function $f(e){return typeof e=="number"}function p0(e){return $f(e)&&!isNaN(e)&&e>0}function vR(e,t){return $f(e)&&!isNaN(e)&&e<=t&&e>=0}function sH(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${bp}\`.`}function aH(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
+ - a positive number
+ - less than the value passed to \`max\` (or ${bp} if no \`max\` prop is set)
+ - \`null\` if the progress is indeterminate.
+
+Defaulting to \`null\`.`}const xR=gR,lH=oH,E1=p.forwardRef(({className:e,value:t,color:n,...r},o)=>d.jsx(xR,{ref:o,className:se("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:d.jsx(lH,{className:se("h-full w-full flex-1 transition-all",n||"bg-primary"),style:{transform:`translateX(-${100-(t||0)}%)`}})}));E1.displayName=xR.displayName;const yR=e=>{var v;const{device:t,className:n,navLink:r}=e,{publish:o}=Gc(),i=t.Pins?(v=t.Pins)==null?void 0:v.filter(x=>x.Used).length:0,a=t.Pins?Math.round(i*100/t.Pins.length):0,c=()=>{console.log("Upload config request"),o({key:"DeviceUploadMessage",payload:t})},u=()=>{o({key:"DeviceFileOpenRequest",payload:{IgnoreTypeMismatch:!1,Device:t}})},f=()=>{o({key:"DeviceFileSaveRequest",payload:{Device:t}})},h=()=>{o({key:"DeviceFirmwareUpdateRequest",payload:t})},m=()=>{o({key:"DeviceFirmwareResetRequest",payload:t})};return d.jsxs(zt,{className:n,children:[d.jsxs(ZV,{condition:r===void 0,wrapper:x=>d.jsx(Pa,{to:`/devices/${t.Type}/${t.Id}`,children:x}),children:[d.jsxs(Rn,{className:se("flex flex-row items-center gap-2"),children:[(t==null?void 0:t.MetaData)&&d.jsx("div",{children:(t==null?void 0:t.MetaData.Icon)&&d.jsx("img",{className:"h-10 w-10",src:t.MetaData.Icon})}),d.jsxs("div",{className:"mt-0 flex flex-col",children:[d.jsx("div",{className:"text-xl font-semibold",children:t.Name}),d.jsx("div",{className:"text-sm",children:t.Type})]})]}),d.jsx(Un,{className:"hidden md:block",children:(t==null?void 0:t.MetaData)&&d.jsx("div",{className:"flex h-60 items-center overflow-hidden",children:(t==null?void 0:t.MetaData.Picture)&&d.jsx("img",{className:"h-full w-full object-contain",src:t.MetaData.Picture})})})]}),d.jsxs(Lo,{className:"group flex flex-row justify-between gap-4",children:[d.jsx(Wt,{children:"Active"}),t.Pins&&d.jsx(E1,{color:se("bg-gray-200 group-hover/card:bg-green-800",a>60?"group-hover/card:bg-green-600":"",a>70?"group-hover/card:bg-blue-500":"",a>90?"group-hover/card:bg-primary":""),className:"w-1/2",value:a}),t.Type==="MobiFlight"&&d.jsxs(S1,{children:[d.jsx(W3,{children:d.jsx(cP,{className:"cursor-pointer"})}),d.jsxs(mp,{side:"top",align:"end",children:[d.jsx(hn,{onClick:c,children:"Upload config"}),d.jsx(Ia,{}),d.jsx(dc,{children:"Backup"}),d.jsx(hn,{onClick:u,children:"Open from file"}),d.jsx(hn,{onClick:f,children:"Save to file"}),d.jsx(Ia,{}),d.jsx(dc,{children:"Firmware"}),d.jsx(hn,{onClick:h,children:"Update"}),d.jsx(hn,{onClick:m,children:"Reset"}),d.jsx(Ia,{}),d.jsx(dc,{children:"Troubleshooting"}),d.jsx(hn,{children:"Regenerate serial"}),d.jsx(hn,{children:"Reload config"})]})]})]})]})},R1=Ms(e=>({devices:[],setDevices:t=>e(()=>({devices:t}))}));function cH(){const{devices:e}=R1();return d.jsxs("div",{className:"flex flex-col overflow-y-auto gap-4",children:[d.jsx("div",{className:"flex flex-row gap-4 items-center",children:d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0 font-bold",children:"Devices"})}),d.jsx("div",{className:"flex flex-row flex-wrap w-full gap-4 overflow-y-auto",children:e==null?void 0:e.map(t=>d.jsx(yR,{className:"w-96 h-[]",device:t},t.Id))})]})}const uH=e=>{const{device:t,onElementDelete:n}=e;return d.jsx("div",{className:"w-full h-full flex flex-col p-4 overflow-y-auto gap-2 overscroll-contain",children:((t==null?void 0:t.Elements)??[]).map(r=>d.jsx(Pa,{className:o=>o.isActive?"bg-slate-200 dark:bg-slate-800 border-2 rounded-md transition-all":"border-2 rounded-md transition-all dark:bg-background",to:`elements/${r.Id}`,children:d.jsxs("div",{className:"flex flex-row items-center py-2 pr-4 cursor-pointer group transition-opacity hover:dark:bg-gray-700 rounded-md ",children:[d.jsx(SI,{className:"group-hover:opacity-100 opacity-0 text-gray-400"}),d.jsxs("div",{className:"flex flex-row grow gap-4 items-center",children:[d.jsx(vp,{className:"w-8 h-8",variant:r.Type}),d.jsx("div",{className:"grow",children:r.Name}),d.jsx("div",{className:"group-hover:opacity-100 opacity-0",children:d.jsx(FI,{role:"button",className:"text-gray-400",onClick:()=>{n(r)}})})]})]})},r.Id))})},dH=({children:e})=>d.jsx("h2",{className:"pb-8 text-3xl font-semibold tracking-tight first:mt-0",children:e}),fH=({children:e})=>d.jsx("h2",{className:"pb-8 text-2xl font-semibold tracking-tight first:mt-0",children:e}),pH=["Button","Encoder","AnalogInput","InputShiftRegister","InputMultiplexer","Output","LedModule","Stepper","Servo","LcdDisplay","ShiftRegister","CustomDevice"],hH={Button:{Pins:1,PwmPins:0},Encoder:{Pins:2,PwmPins:0},AnalogInput:{Pins:1,PwmPins:0},InputShiftRegister:{Pins:4,PwmPins:0},InputMultiplexer:{Pins:4,PwmPins:0},Output:{Pins:1,PwmPins:0},LedModule:{Pins:4,PwmPins:0},Stepper:{Pins:4,PwmPins:0},Servo:{Pins:1,PwmPins:1},LcdDisplay:{Pins:0,PwmPins:0,i2c:!0},ShiftRegister:{Pins:4,PwmPins:0},CustomDevice:{Pins:1,PwmPins:0}},gH=[{label:"28BYJ - Half-step mode (recommended)",value:{id:"1",Mode:"0",Speed:1400,Acceleration:2800,Backlash:6,StepsPerRevolution:4096}},{label:"28BYJ - Full-step mode (classic)",value:{id:"0",Mode:"1",Speed:467,Acceleration:800,Backlash:3,StepsPerRevolution:2040}},{label:"x.27 - Half-step mode",value:{id:"2",Mode:"0",Speed:100,Acceleration:100,Backlash:0,StepsPerRevolution:1100}},{label:"Generic - EasyDriver",value:{id:"3",Mode:"2",Speed:400,Acceleration:800,Backlash:0,StepsPerRevolution:1e3}},{label:"Custom Stepper",value:{id:"255",Mode:"0",Speed:400,Acceleration:800,Backlash:0,StepsPerRevolution:1e3}}],mH=(e,t)=>{const n={Id:xH(e,t),Name:vH(e,t),Type:e,ConfigData:{}};switch(e){case"AnalogInput":return yH(n,t);case"Button":return wH(n,t);case"CustomDevice":return bH(n,t);case"Encoder":return SH(n,t);case"InputMultiplexer":return CH(n,t);case"ShiftRegister":return PH(n,t);case"Stepper":return NH(n,t);case"Servo":return kH(n,t);case"InputShiftRegister":return $H(n,t);case"LcdDisplay":return EH(n,t);case"LedModule":return RH(n,t);case"Output":return _H(n,t);default:throw new Error("Unknown element type")}},vH=(e,t)=>{const n=t.Elements.filter(o=>o.Type===e).length,r=n>0?" "+n.toString():"";return`${e}${r}`},xH=(e,t)=>t.Id+e+t.Elements.filter(n=>n.Type===e).length;function yH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Pin:n[0].Pin.toString()}}}function wH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Pin:n[0].Pin.toString()}}}function bH(e,t){throw e.Type,t.Elements,new Error("Function not implemented.")}function SH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Model:"0",PinLeft:n[0].Pin.toString(),PinRight:n[1].Pin.toString()}}}function CH(e,t){const n=t.Pins.filter(a=>!a.Used),r=t.Elements.find(a=>a.Type==="InputMultiplexer"),o=r?r.ConfigData:{PinS0:n[0].Pin.toString(),PinS1:n[1].Pin.toString(),PinS2:n[2].Pin.toString(),PinS3:n[3].Pin.toString()},i=r?n[0].Pin.toString():n[4].Pin.toString();return{...e,ConfigData:{...o,PinData:i}}}function $H(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{PinData:n[0].Pin.toString(),PinLatch:n[1].Pin.toString(),PinClock:n[2].Pin.toString(),NumberOfModules:"1"}}}function PH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{PinData:n[0].Pin.toString(),PinLatch:n[1].Pin.toString(),PinClock:n[2].Pin.toString(),NumberOfModules:"1"}}}function EH(e,t){const n=t.Pins.filter(r=>!r.Used&&r.isI2C);return{...e,ConfigData:{Address:"0x27",PinSLA:n[0].Pin.toString(),PinSCL:n[1].Pin.toString()}}}function RH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Model:"0",PinData:n[0].Pin.toString(),PinLatch:n[1].Pin.toString(),PinClock:n[2].Pin.toString(),NumberOfModules:"1",Brightness:15}}}function _H(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Pin:n[0].Pin.toString()}}}function NH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Pin1:n[0].Pin.toString(),Pin2:n[1].Pin.toString(),Pin3:n[2].Pin.toString(),Pin4:n[3].Pin.toString(),Profile:"0"}}}function kH(e,t){const n=t.Pins.filter(r=>!r.Used);return{...e,ConfigData:{Pin:n[0].Pin.toString()}}}const DH=e=>{const t=pH,n=e.device,{t:r}=yv(),o=a=>{const c=mH(a,n);e.onDeviceSelected({Device:n,Element:c})},i=(a,c)=>{const u=a.Pins.filter(h=>!h.Used);if(c.Type==="LcdDisplay")return u.filter(h=>h.isI2C&&!h.Used).length>=2;if(c.Type==="InputMultiplexer")return a.Elements.find(m=>m.Type==="InputMultiplexer")?u.length>=1:u.length>=5;const f=hH[c.Type];return u.length>=f.Pins};return d.jsx("div",{className:"grid grid-flow-row grid-cols-4 gap-4 items-center justify-items-center w-full",children:t.map(a=>{const c=i(n,{Type:a});return d.jsxs("div",{onClick:()=>{c&&o(a)},className:se("border dark:border-none h-32 w-32 group flex flex-col gap-1 items-center justify-center hover:bg-slate-200 dark:hover:bg-slate-800 py-2 px-4 rounded-md cursor-pointer text-center",c?"":"disabled"),children:[d.jsx(vp,{disabled:!c,className:"w-12 h-12",variant:a}),d.jsx("div",{className:"",children:r(`device.type.${a}`)})]},a)})})},jH=()=>{var E;const e=js().pathname.split("/elements")[0],t=b$(({nextLocation:_})=>h&&_.pathname.indexOf(e)!==0),{publish:n}=Gc(),r=Hi(),o=tl(),i=o.id,a=o.elementId,{devices:c}=R1(),[u,f]=p.useState(c.find(_=>_.Id===i)),[h,m]=p.useState(!1),[v,x]=p.useState(!1),w=(E=u==null?void 0:u.Elements)==null?void 0:E.find(_=>_.Id===a),b=_=>{f(_),m(!0)},P=()=>{n({key:"DeviceUpload",payload:u})},C=_=>{const D=u.Elements.filter(O=>O.Id!==_.Id),N=Object.keys(_.ConfigData).filter(O=>O.indexOf("Pin")>-1).map(O=>_.ConfigData[O]),j=u.Pins.map(O=>N.indexOf(O.Pin.toString())>-1?{...O,Used:!1}:O)??[];b({...u,Elements:D,Pins:j})},S=_=>{const D=Object.keys(_.Element.ConfigData).filter(j=>j.indexOf("Pin")>-1).map(j=>_.Element.ConfigData[j]),N=u.Pins.map(j=>D.indexOf(j.Pin.toString())>-1?{...j,Used:!0}:j);b({...u,Elements:[...u.Elements,_.Element],Pins:N}),x(!1),r(`/devices/${u==null?void 0:u.Type}/${u.Id}/elements/${_.Element.Id}`)};return p.useEffect(()=>{m(!1),f(c.find(_=>_.Id===i))},[c,i]),d.jsxs("div",{className:"flex select-none flex-col gap-4 overflow-y-auto",children:[t&&d.jsx(qE,{open:t.state==="blocked",children:d.jsxs(Xv,{children:[d.jsxs(Qv,{children:[d.jsx(Zv,{children:"You have unsaved changes"}),d.jsx(e1,{children:"You will lose all unsaved changes if you continue."})]}),d.jsxs(Jv,{children:[d.jsx(n1,{onClick:()=>{var _;return(_=t.reset)==null?void 0:_.call(t)},children:"Cancel"}),d.jsx(t1,{onClick:()=>{var _;return(_=t.proceed)==null?void 0:_.call(t)},children:"Continue"})]})]})}),d.jsxs("div",{className:"flex flex-row items-center gap-4",role:"navigation",children:[d.jsx(tr,{to:"/devices",className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:"Devices"}),d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:`scroll-m-20 text-3xl tracking-tight first:mt-0 ${w?"":"font-bold"}`,children:u==null?void 0:u.Name}),w&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"scroll-m-20 text-3xl tracking-tight first:mt-0",children:">"}),d.jsx("p",{className:"scroll-m-20 text-3xl font-bold tracking-tight first:mt-0",children:w.Name})]})]}),h&&d.jsxs("div",{className:"flex flex-row items-center gap-4 rounded-md bg-green-200 p-4 text-green-700 dark:bg-green-950 dark:text-green-600",children:[d.jsx($I,{}),d.jsx("p",{children:"Device has been updated"}),d.jsx(at,{onClick:P,children:"Upload changes"})]}),d.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pb-4 lg:flex-row",children:[!u&&d.jsx("div",{children:"Device not found"}),u&&d.jsx("div",{className:"flex w-auto flex-col lg:w-3/12",children:d.jsx(yR,{device:u})}),u&&u.Type==="MobiFlight"&&u.Elements&&d.jsxs(zt,{className:"flex w-auto select-none flex-col border-none bg-transparent shadow-lg hover:border-none hover:bg-transparent dark:bg-zinc-700/10 dark:hover:bg-zinc-700/20 lg:w-96 lg:overflow-y-auto",children:[d.jsxs(Rn,{className:"mt-0 flex flex-col",children:[d.jsx("div",{className:"text-xl font-semibold",children:"Components"}),d.jsx("div",{className:"text-sm",children:"Some cool sub title here"})]}),d.jsx(uH,{device:u,onElementDelete:C}),d.jsx(Lo,{className:"p-6 px-4",children:d.jsxs(tE,{open:v,onOpenChange:x,children:[d.jsx(at,{onClick:()=>x(!0),children:"Add device"}),d.jsxs(Mv,{className:"max-w-2xl items-center",children:[d.jsxs(fH,{children:["Select your new device (",u.Pins.filter(_=>!_.Used).length||0," pins free)"]}),d.jsx(DH,{device:u,onDeviceSelected:S})]})]})})]}),u&&u.Type=="Joystick"&&d.jsxs(zt,{className:"w-96",children:[d.jsx(Rn,{className:"flex flex-row items-center gap-2 text-2xl",children:"Settings"}),d.jsx("div",{children:"Joystick"})]}),d.jsx("div",{className:"grow",children:d.jsx(S$,{context:{device:u,element:w,updateDevice:b}})}),v&&d.jsxs("div",{className:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50",children:[d.jsx("div",{className:"bg-white p-4",children:"Add device"}),d.jsx(at,{onClick:()=>x(!1),children:"Close"})]})]})]})},MH=bv("text-md font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 mb-1 px-1"),Ce=p.forwardRef(({className:e,...t},n)=>d.jsx(K3,{ref:n,className:se(MH(),e),...t}));Ce.displayName=K3.displayName;const TH=e=>{const{element:t,setElement:n}=e,r=t.ConfigData.Address,o=t.ConfigData.Lines,i=t.ConfigData.Columns,a=[{value:"0x20",label:"0x20"},{value:"0x21",label:"0x21"},{value:"0x22",label:"0x22"},{value:"0x23",label:"0x23"},{value:"0x24",label:"0x24"},{value:"0x25",label:"0x25"},{value:"0x26",label:"0x26"},{value:"0x27",label:"0x27"},{value:"0x38",label:"0x38"},{value:"0x39",label:"0x39"},{value:"0x3A",label:"0x3A"},{value:"0x3B",label:"0x3B"},{value:"0x3C",label:"0x3C"},{value:"0x3D",label:"0x3D"},{value:"0x3E",label:"0x3E"},{value:"0x3F",label:"0x3F"}];return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:c=>n({...t,Name:c.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx(Ce,{children:"Address"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-24",options:a,value:r,onSelect:c=>n({...t,ConfigData:{...t.ConfigData,Address:c}})})})]}),d.jsxs("div",{className:"flex flex-col gap-2 w-16",children:[d.jsx(Ce,{children:"Rows"}),d.jsx(qt,{name:"Rows",value:o,onChange:c=>n({...t,ConfigData:{...t.ConfigData,Rows:c.target.value}})})]}),d.jsxs("div",{className:"flex flex-col gap-2 w-16",children:[d.jsx(Ce,{children:"Columns"}),d.jsx(qt,{name:"Columns",value:i,onChange:c=>n({...t,ConfigData:{...t.ConfigData,Columns:c.target.value}})})]}),d.jsx("div",{className:"mt-8 cursor-pointer stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400",children:d.jsxs("a",{onClick:()=>{},className:"flex flex-row mb-2 gap-2 items-center",children:[d.jsx(Ao,{}),d.jsx("p",{children:"Help me choose the right values"})]})})]})]})})},IH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.Pin,i=n.Pins.filter(a=>!a.Used||a.Pin===parseInt(t.ConfigData.Pin));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:a=>r({...t,Name:a.target.value})})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{showFilter:!1,className:"w-[120px]",options:i.map(a=>({value:a.Pin.toString(),label:`${a.Pin}${a.isPWM?" (PWM)":""}`})),value:o,onSelect:a=>r({...t,ConfigData:{...t.ConfigData,Pin:a}})})})]})]})})},OH=e=>{var a;const{element:t,device:n,setElement:r}=e,o=t.ConfigData.Pin,i=((a=n.Pins)==null?void 0:a.filter(c=>!c.Used||c.Pin===parseInt(t.ConfigData.Pin)))??[];return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:c=>r({...t,Name:c.target.value})})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:i.map(c=>({value:c.Pin.toString(),label:`${c.Pin}${c.isPWM?" (PWM)":""}`})),value:o,onSelect:c=>r({...t,ConfigData:{...t.ConfigData,Pin:c}})})})]})]})})},LH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.Pin,i=n.Pins.filter(a=>!a.Used||a.Pin===parseInt(t.ConfigData.Pin));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:a=>r({...t,Name:a.target.value})})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:i.map(a=>({value:a.Pin.toString(),label:`${a.Pin}${a.isPWM?" (PWM)":""}`})),value:o,onSelect:a=>r({...t,ConfigData:{...t.ConfigData,Pin:a}})})})]})]})})},AH=e=>{const t=gH,{element:n,device:r,setElement:o}=e,i=n.ConfigData.Pin1,a=n.ConfigData.Pin2,c=n.ConfigData.Pin3,u=n.ConfigData.Pin4,f=n.ConfigData.AutoHome==="True",h=n.ConfigData.PinHome,m=n.ConfigData.Mode,v=n.ConfigData.Backlash,x=n.ConfigData.Profile,w=r.Pins.filter(S=>!S.Used||S.Pin===parseInt(n.ConfigData.Pin1)||S.Pin===parseInt(n.ConfigData.Pin2)||S.Pin===parseInt(n.ConfigData.Pin3)||S.Pin===parseInt(n.ConfigData.Pin4)||S.Pin===parseInt(n.ConfigData.PinHome)),b=t.map(S=>({value:S.value.id,label:S.label})),P=[{value:"0",label:"Half-step mode"},{value:"1",label:"Full-step mode"},{value:"2",label:"Driver mode"}],C=S=>{const E=t.find(_=>_.value.id===S);o({...n,ConfigData:{...n.ConfigData,Mode:E.value.Mode,Backlash:E.value.Backlash.toString(),Profile:E.value.id.toString()}})};return p.useEffect(()=>{if(f&&h==="0"&&w.find(S=>S.Pin.toString()==h)===void 0){const S=w.filter(E=>!E.Used);o({...n,ConfigData:{...n.ConfigData,PinHome:S[0].Pin.toString()}})}},[f,h,w,n,o]),d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/2",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{className:"w-1/2",name:"Name",value:n.Name,onChange:S=>o({...n,Name:S.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-end",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Profile"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[360px]",options:b,value:x,onSelect:C})})]}),d.jsx("div",{className:"cursor-pointer stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400",children:d.jsxs("a",{onClick:()=>{},className:"flex flex-row mb-2 gap-2 items-center",children:[d.jsx(Ao,{}),d.jsx("p",{children:"Help me choose the right profile"})]})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin1"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:w.map(S=>({value:S.Pin.toString(),label:`${S.Pin}${S.isPWM?" (PWM)":""}`})),value:i,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,Pin1:S}})})})]}),d.jsx(or,{className:"stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400 mt-8 cursor-pointer",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,Pin2:i,Pin1:a}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin2"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:w.map(S=>({value:S.Pin.toString(),label:`${S.Pin}${S.isPWM?" (PWM)":""}`})),value:a,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,Pin2:S}})})})]}),m!=="2"&&d.jsxs(d.Fragment,{children:[d.jsx(or,{className:"stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400 mt-8 cursor-pointer",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,Pin3:a,Pin2:c}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin3"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:w.map(S=>({value:S.Pin.toString(),label:`${S.Pin}${S.isPWM?" (PWM)":""}`})),value:c,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,Pin3:S}})})})]})]}),m!=="2"&&d.jsxs(d.Fragment,{children:[d.jsx(or,{className:"stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400 mt-8 cursor-pointer",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,Pin3:u,Pin4:c}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin4"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:w.map(S=>({value:S.Pin.toString(),label:`${S.Pin}${S.isPWM?" (PWM)":""}`})),value:u,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,Pin4:S}})})})]})]}),d.jsx("div",{className:"cursor-pointer stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400 mt-8 ",children:d.jsxs("a",{onClick:()=>{},className:"flex flex-row mb-2 gap-2 items-center",children:[d.jsx(II,{}),d.jsx("p",{children:"Change direction"})]})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-center h-12",children:[d.jsxs("div",{className:"flex flex-row items-center gap-4",children:[d.jsx(Wt,{checked:f,onCheckedChange:()=>o({...n,ConfigData:{...n.ConfigData,AutoHome:f?"False":"True"}})}),d.jsx(Ce,{children:"Use Auto Home"})]}),f&&d.jsx("div",{className:"flex flex-col",children:d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:w.map(S=>({value:S.Pin.toString(),label:`${S.Pin}${S.isPWM?" (PWM)":""}`})),value:h,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,PinHome:S}})})})})]}),x==="255"&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-row gap-4 items-end",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Mode"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[240px]",options:P,value:m,onSelect:S=>o({...n,ConfigData:{...n.ConfigData,Mode:S}})})})]}),d.jsx("div",{className:"cursor-pointer stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400",children:d.jsxs("a",{onClick:()=>{},className:"flex flex-row mb-2 gap-2 items-center",children:[d.jsx(Ao,{}),d.jsx("p",{children:"Help me choose the right mode"})]})})]}),d.jsx("div",{className:"flex flex-row gap-4 items-end",children:d.jsxs("div",{children:[d.jsx(Ce,{children:"Backlash"}),d.jsx("div",{className:"w-1/3",children:d.jsx(qt,{name:"Backlash",value:v,onChange:S=>o({...n,ConfigData:{...n.ConfigData,Backlash:S.target.value}})})})]})})]})]})})},FH=e=>{var x;const t=Hi(),{element:n,device:r,setElement:o}=e,i=n.ConfigData.PinS0,a=n.ConfigData.PinS1,c=n.ConfigData.PinS2,u=n.ConfigData.PinS3,f=n.ConfigData.PinData,h=(x=r.Elements)==null?void 0:x.find(w=>w.Type==="InputMultiplexer"),m=(h==null?void 0:h.Id)===n.Id,v=r.Pins.filter(w=>!w.Used||w.Pin===parseInt(n.ConfigData.PinS0)||w.Pin===parseInt(n.ConfigData.PinS1)||w.Pin===parseInt(n.ConfigData.PinS2)||w.Pin===parseInt(n.ConfigData.PinS3)||w.Pin===parseInt(n.ConfigData.PinData));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:n.Name,onChange:w=>o({...n,Name:w.target.value})})]}),m?d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 0"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:v.map(w=>({value:w.Pin.toString(),label:`${w.Pin}${w.isPWM?" (PWM)":""}`})),value:i,onSelect:w=>o({...n,ConfigData:{...n.ConfigData,PinS0:w}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,PinS0:a,PinS1:i}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 1"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:v.map(w=>({value:w.Pin.toString(),label:`${w.Pin}${w.isPWM?" (PWM)":""}`})),value:a,onSelect:w=>o({...n,ConfigData:{...n.ConfigData,PinS1:w}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,PinS1:c,PinS2:a}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 2"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:v.map(w=>({value:w.Pin.toString(),label:`${w.Pin}${w.isPWM?" (PWM)":""}`})),value:c,onSelect:w=>o({...n,ConfigData:{...n.ConfigData,PinS2:w}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{o({...n,ConfigData:{...n.ConfigData,PinS2:u,PinS3:c}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 3"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:v.map(w=>({value:w.Pin.toString(),label:`${w.Pin}${w.isPWM?" (PWM)":""}`})),value:u,onSelect:w=>o({...n,ConfigData:{...n.ConfigData,PinS3:w}})})})]})]}):d.jsxs("div",{className:"flex flex-row gap-4 items-end",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 0"}),d.jsx("div",{className:"p-2 bg-gray-200 dark:bg-background rounded-sm border text-center",children:i})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 1"}),d.jsx("div",{className:"p-2 bg-gray-200 dark:bg-background rounded-sm border text-center",children:a})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 2"}),d.jsx("div",{className:"p-2 bg-gray-200 dark:bg-background rounded-sm border text-center",children:c})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin 3"}),d.jsx("div",{className:"p-2 bg-gray-200 dark:bg-background rounded-sm border text-center",children:u})]}),d.jsx(at,{variant:"ghost",onClick:()=>{t(`/devices/${r.Type}/${r.Id}/elements/${h.Id}`)},children:"Edit shared settings"})]}),d.jsx("div",{className:"flex flex-row gap-4",children:d.jsxs("div",{children:[d.jsx(Ce,{children:"Data"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:v.map(w=>({value:w.Pin.toString(),label:`${w.Pin}${w.isPWM?" (PWM)":""}`})),value:f,onSelect:w=>o({...n,ConfigData:{...n.ConfigData,PinData:w}})})})]})})]})})},zH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.PinData,i=t.ConfigData.PinLatch,a=t.ConfigData.PinClock,c=t.ConfigData.NumberOfModules,u=Array.from({length:8},(h,m)=>({value:`${m+1}`,label:`${m+1}`})),f=n.Pins.filter(h=>!h.Used||h.Pin===parseInt(t.ConfigData.PinData)||h.Pin===parseInt(t.ConfigData.PinClock)||h.Pin===parseInt(t.ConfigData.PinLatch));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:h=>r({...t,Name:h.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Data"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:o,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinData:h}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinData:i,PinLatch:o}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Latch / Pin CS"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:i,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinLatch:h}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinLatch:a,PinClock:i}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Clock"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:a,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinClock:h}})})})]})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Number of modules"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:u,value:c,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,NumberOfModules:h}})})})]})]})})},UH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.PinData,i=t.ConfigData.PinLatch,a=t.ConfigData.PinClock,c=t.ConfigData.NumberOfModules,u=Array.from({length:8},(h,m)=>({value:`${m+1}`,label:`${m+1}`})),f=n.Pins.filter(h=>!h.Used||h.Pin===parseInt(t.ConfigData.PinData)||h.Pin===parseInt(t.ConfigData.PinClock)||h.Pin===parseInt(t.ConfigData.PinLatch));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:h=>r({...t,Name:h.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Data"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:o,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinData:h}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinData:i,PinLatch:o}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Latch / Pin CS"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:i,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinLatch:h}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer hover:stroke-blue-300 transition-all",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinLatch:a,PinClock:i}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Clock"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:f.map(h=>({value:h.Pin.toString(),label:`${h.Pin}${h.isPWM?" (PWM)":""}`})),value:a,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,PinClock:h}})})})]})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Number of modules"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:u,value:c,onSelect:h=>r({...t,ConfigData:{...t.ConfigData,NumberOfModules:h}})})})]})]})})},BH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.Model,i=t.ConfigData.PinData,a=t.ConfigData.PinLatch,c=t.ConfigData.PinClock,u=n.Pins.filter(m=>!m.Used||m.Pin===parseInt(t.ConfigData.PinData)||m.Pin===parseInt(t.ConfigData.PinClock)||m.Pin===parseInt(t.ConfigData.PinLatch)),f=t.ConfigData.NumberOfModules,h=Array.from({length:8},(m,v)=>({value:`${v+1}`,label:`${v+1}`}));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:m=>r({...t,Name:m.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4 items-end",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Model"}),d.jsx("div",{className:"w-1/2",children:d.jsx(Xe,{className:"w-[240px]",options:[{value:"0",label:"MAX7219"},{value:"1",label:"TM1637 - (4 digits)"},{value:"2",label:"TM1637 - (6 digits)"}],value:o,onSelect:m=>r({...t,ConfigData:{...t.ConfigData,Model:m}})})})]}),d.jsx("div",{className:"cursor-pointer stroke-primary text-primary hover:stroke-blue-400 hover:text-blue-400",children:d.jsxs("a",{onClick:()=>{},className:"flex flex-row mb-2 gap-2",children:[d.jsx(Ao,{}),d.jsx("p",{children:"Help me choose the right model"})]})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Data"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:u.map(m=>({value:m.Pin.toString(),label:`${m.Pin}${m.isPWM?" (PWM)":""}`})),value:i,onSelect:m=>r({...t,ConfigData:{...t.ConfigData,PinData:m}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinData:a,PinLatch:i}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Latch / Pin CS"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:u.map(m=>({value:m.Pin.toString(),label:`${m.Pin}${m.isPWM?" (PWM)":""}`})),value:a,onSelect:m=>r({...t,ConfigData:{...t.ConfigData,PinLatch:m}})})})]}),d.jsx(or,{className:"stroke-primary mt-8 cursor-pointer",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinLatch:c,PinClock:a}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin Clock"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:u.map(m=>({value:m.Pin.toString(),label:`${m.Pin}${m.isPWM?" (PWM)":""}`})),value:c,onSelect:m=>r({...t,ConfigData:{...t.ConfigData,PinClock:m}})})})]})]}),o==="0"&&d.jsxs("div",{children:[d.jsx(Ce,{children:"Number of modules"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:h,value:f,onSelect:m=>r({...t,ConfigData:{...t.ConfigData,NumberOfModules:m}})})})]})]})})},VH=()=>d.jsx("div",{children:"CustomDeviceForm"}),HH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.Pin,i=n.Pins.filter(a=>!a.Used||a.Pin===parseInt(t.ConfigData.Pin));return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:a=>r({...t,Name:a.target.value})})]}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:i.map(a=>({value:a.Pin.toString(),label:`${a.Pin}${a.isPWM?" (PWM)":""}`})),value:o,onSelect:a=>r({...t,ConfigData:{...t.ConfigData,Pin:a}})})})]})]})})},WH=e=>{const{element:t,device:n,setElement:r}=e,o=t.ConfigData.PinLeft,i=t.ConfigData.PinRight,a=t.ConfigData.Model,c=n.Pins.filter(f=>!f.Used||f.Pin===parseInt(t.ConfigData.PinLeft)||f.Pin===parseInt(t.ConfigData.PinRight)),u=[{value:"0",label:"1 detent per cycle (11)"},{value:"1",label:"1 detent per cycle (00)"},{value:"2",label:"2 detent per cycle (00, 11)"},{value:"3",label:"2 detent per cycle (01, 10)"},{value:"4",label:"4 detent per cycle"}];return d.jsx(d.Fragment,{children:d.jsxs("div",{className:"flex flex-col gap-8",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Name"}),d.jsx(qt,{name:"Name",value:t.Name,onChange:f=>r({...t,Name:f.target.value})})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{className:"w-1/4",children:[d.jsx(Ce,{children:"Encoder type"}),d.jsx("div",{children:d.jsx(Xe,{className:"w-full",options:u,value:a,onSelect:f=>r({...t,ConfigData:{...t.ConfigData,Model:f}})})})]}),d.jsx(Ao,{className:"w-8 h-8 stroke-primary hover:stroke-blue-300 transition-all mt-7 cursor-pointer"})]}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{children:[d.jsx(Ce,{children:"Left Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:c.map(f=>({value:f.Pin.toString(),label:`${f.Pin}${f.isPWM?" (PWM)":""}`})),value:o,onSelect:f=>r({...t,ConfigData:{...t.ConfigData,PinLeft:f}})})})]}),d.jsx(or,{className:"stroke-primary hover:stroke-blue-300 transition-all mt-8 cursor-pointer",onClick:()=>{r({...t,ConfigData:{...t.ConfigData,PinLeft:i,PinRight:o}})}}),d.jsxs("div",{children:[d.jsx(Ce,{children:"Right Pin"}),d.jsx("div",{className:"w-1/3",children:d.jsx(Xe,{className:"w-[120px]",options:c.map(f=>({value:f.Pin.toString(),label:`${f.Pin}${f.isPWM?" (PWM)":""}`})),value:i,onSelect:f=>r({...t,ConfigData:{...t.ConfigData,PinRight:f}})})})]})]})]})})},KH=()=>{const{element:e,device:t,updateDevice:n}=qT(),r=o=>{const i=t.Elements.find(u=>u.Id===o.Id),a=t.Pins;Object.keys(i.ConfigData).forEach(u=>{if(i.ConfigData[u]!==o.ConfigData[u]){const f=a.find(m=>m.Pin===parseInt(o.ConfigData[u]));f&&(f.Used=!0);const h=a.find(m=>m.Pin===parseInt(i.ConfigData[u]));h&&(h.Used=!1)}});const c={...t,Elements:t.Elements.map(u=>u.Id===o.Id?o:u),Pins:a};n(c)};return d.jsxs(zt,{className:"grow select-none bg-transparent shadow-none hover:border-none border-none hover:bg-transparent dark:bg-zinc-700/10 dark:hover:bg-zinc-700/40",children:[d.jsxs(Rn,{className:"flex flex-col mt-0",children:[d.jsxs("div",{className:"flex flex-row gap-2 mt-0 items-center",children:[d.jsx(vp,{variant:e==null?void 0:e.Type}),d.jsxs("div",{className:"text-xl font-semibold",children:["Edit ",e==null?void 0:e.Type]})]}),d.jsx("div",{className:"text-sm",children:"Some cool sub title here"})]}),d.jsxs(Un,{children:[(e==null?void 0:e.Type)=="AnalogInput"&&d.jsx(HH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="Button"&&d.jsx(OH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="CustomDevice"&&d.jsx(VH,{}),(e==null?void 0:e.Type)=="Encoder"&&d.jsx(WH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="InputMultiplexer"&&d.jsx(FH,{device:t,element:e,setElement:r,allowEditPinSx:!1}),(e==null?void 0:e.Type)=="InputShiftRegister"&&d.jsx(UH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="LcdDisplay"&&d.jsx(TH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="LedModule"&&d.jsx(BH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="Output"&&d.jsx(IH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="Servo"&&d.jsx(LH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="ShiftRegister"&&d.jsx(zH,{device:t,element:e,setElement:r}),(e==null?void 0:e.Type)=="Stepper"&&d.jsx(AH,{device:t,element:e,setElement:r})]}),d.jsx(Lo,{className:"flex justify-between"})]})},GH=e=>(e=e.toLowerCase(),e==="error"?"text-red-600":e==="warn"?"text-yellow-600":e==="info"?"text-blue-600":"text-gray-400"),qH=[{accessorKey:"Severity",size:75,header:()=>d.jsx("div",{className:"w-8",children:"Level"}),cell:({row:e})=>{const t=GH(e.getValue("Severity"));return d.jsx("div",{className:"w-8 justify-center flex flex-row",children:d.jsx(uI,{className:se(t,"dark:bg-gray-800 dark:data-[state=checked]:bg-gray-700")})})},filterFn:(e,t,n)=>n.includes(e.getValue(t))},{accessorKey:"Timestamp",size:150,cell:({row:e})=>{const t=new Date(e.getValue("Timestamp")).toLocaleTimeString(ln.language,{hour:"2-digit",minute:"2-digit",second:"2-digit"});return d.jsx("div",{className:"w-64",children:d.jsx("p",{className:"font-semibold",children:t})})},header:({column:e})=>d.jsx("div",{className:"w-64",children:d.jsxs(at,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Time",d.jsx(aP,{className:"opacity-0 group-hover/header:opacity-100 ml-2 h-4 w-4 animate-in animate-out duration-300 "})]})})},{size:1,accessorKey:"Message",header:()=>d.jsx("div",{className:"grow",children:"Messages"}),cell:({row:e})=>d.jsx("div",{className:"grow",children:d.jsx("p",{className:"text-md font-semibold",children:e.getValue("Message")})})}];function YH({table:e,items:t}){var o;const n=e.getState().columnFilters.length>0,r=[...new Set(t.map(i=>i.Severity))].map(i=>({label:i.split("/")[0],value:i}));return d.jsx("div",{className:"flex items-center justify-between",children:d.jsxs("div",{className:"flex flex-1 items-center space-x-2 h-auto",children:[d.jsx(qt,{placeholder:"Filter items...",value:((o=e.getColumn("Message"))==null?void 0:o.getFilterValue())??"",onChange:i=>{var a;return(a=e.getColumn("Message"))==null?void 0:a.setFilterValue(i.target.value)},className:"h-8 w-[150px] lg:w-[250px]"}),e.getColumn("Severity")&&d.jsx(ms,{column:e.getColumn("Severity"),title:"Severity",options:r}),n&&d.jsxs(at,{variant:"default",onClick:()=>e.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:["Reset",d.jsx(Yf,{className:"ml-2 h-4 w-4"})]})]})})}function XH({columns:e,data:t}){var c;const[n,r]=p.useState([]),[o,i]=p.useState([]),a=m1({data:t,columns:e,onSortingChange:r,onColumnFiltersChange:i,getCoreRowModel:d1(),getSortedRowModel:g1(),getFilteredRowModel:f1(),getFacetedRowModel:p1(),getFacetedUniqueValues:h1(),state:{sorting:n,columnFilters:o},defaultColumn:{size:10,minSize:1,maxSize:250}});return d.jsxs("div",{className:"flex flex-col gap-4 grow overflow-y-auto",children:[d.jsx("div",{className:"",children:d.jsx(YH,{table:a,items:t})}),d.jsx("div",{className:"flex flex-col overflow-y-auto border rounded-lg",children:d.jsxs(dp,{className:"w-full table-fixed",children:[d.jsx(fp,{className:"bg-slate-700 dark:bg-slate-800 text-white group/header",children:a.getHeaderGroups().map(u=>d.jsx(uo,{className:"hover:bg-slate-800",children:u.headers.map(f=>d.jsx(hp,{size:f.column.getSize(),className:"text-white px-2 sticky top-0 bg-slate-700 dark:bg-slate-800",children:f.isPlaceholder?null:Ya(f.column.columnDef.header,f.getContext())},f.id))},u.id))}),d.jsx(pp,{className:"overflow-y-auto",children:(c=a.getRowModel().rows)!=null&&c.length?a.getRowModel().rows.map(u=>d.jsx(uo,{"data-state":u.getIsSelected()&&"selected",children:u.getVisibleCells().map(f=>d.jsx(Ns,{className:"p-2",children:Ya(f.column.columnDef.cell,f.getContext())},f.id))},u.id)):d.jsx(uo,{children:d.jsx(Ns,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})]})}const wR=Ms(e=>({messages:[],addMessage:t=>e(n=>({messages:[...n.messages,t]})),clearMessages:()=>e(()=>({messages:[]}))})),QH=()=>{const{messages:e}=wR();return d.jsx(XH,{columns:qH,data:e})},JH=()=>d.jsxs("div",{className:"h-full flex flex-col gap-4 overflow-y-auto",children:[d.jsx("h2",{className:"pb-4 text-3xl font-semibold tracking-tight first:mt-0",children:"Logs"}),d.jsx("div",{className:"grow flex flex-col overflow-y-auto",children:d.jsx(QH,{})})]}),ZH=()=>d.jsxs("div",{className:"flex flex-col gap-4 overflow-y-auto",children:[d.jsx(dH,{children:"Test Page"}),d.jsx("div",{className:"overflow-y-auto",children:d.jsxs("ul",{children:[d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"}),d.jsx("li",{children:"Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dolor nemo labore, sapiente eveniet alias nihil! Necessitatibus, voluptate dolorem? Recusandae necessitatibus sint, consectetur tenetur molestias dolorum dignissimos debitis in id? Perferendis?"})]})})]}),eW={theme:"system",setTheme:()=>null},bR=p.createContext(eW),tW=()=>{const e=p.useContext(bR);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function nW(e){const{setTheme:t}=tW();return d.jsxs(S1,{children:[d.jsx(W3,{asChild:!0,children:d.jsxs(at,{variant:"outline",className:se(e.className,"w-12 h-12 p-0"),children:[d.jsx(AI,{className:"h-[1.5rem] w-[1.5rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0 stroke-14"}),d.jsx(RI,{className:"absolute h-[1.5rem] w-[1.5rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),d.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),d.jsxs(mp,{align:"end",children:[d.jsx(hn,{onClick:()=>t("light"),children:"Light"}),d.jsx(hn,{onClick:()=>t("dark"),children:"Dark"}),d.jsx(hn,{onClick:()=>t("system"),children:"System"})]})]})}const rW=e=>{const t=tl(),n="border-none hover:bg-gray-200 w-12 h-12 group/side",r="dark:bg-gray-700 border-none bg-primary stroke-white";return d.jsxs("div",{className:se("z-50 flex w-16 min-w-16 flex-col items-center justify-between bg-zinc-400 pb-8 dark:bg-slate-800",e.className),children:[d.jsxs("div",{className:"flex flex-col items-center gap-8 pt-24",children:[d.jsx(Pa,{to:"/devices",children:o=>d.jsx(at,{variant:"outline",className:o.isActive?`${r} ${n}`:n,size:"icon",children:d.jsx(bI,{className:o.isActive?"stroke-white group-hover/side:stroke-blue-900":"group-hover/side:stroke-blue-900"})})}),d.jsx(Pa,{to:`/projects/${t.id}/configs`,children:o=>d.jsx(at,{variant:"outline",className:o.isActive?`${r} ${n}`:n,size:"icon",children:d.jsx(EI,{className:o.isActive?"stroke-white group-hover/side:stroke-blue-900":"group-hover/side:stroke-blue-900"})})})]}),d.jsxs("div",{className:"flex flex-col items-center gap-8",children:[d.jsx(Pa,{to:"/log",children:o=>d.jsx(at,{variant:"outline",className:o.isActive?`${r} ${n}`:n,size:"icon",children:d.jsx(PI,{className:o.isActive?"stroke-white group-hover/side:stroke-blue-900":"group-hover/side:stroke-blue-900"})})}),d.jsx(Pa,{to:"/settings",children:o=>d.jsx(at,{variant:"outline",className:o.isActive?`${r} ${n}`:n,size:"icon",children:d.jsx(LI,{className:o.isActive?"stroke-white group-hover/side:stroke-blue-900":"group-hover/side:stroke-blue-900"})})}),d.jsx(nW,{className:"hover:border hover:border-gray-500"})]})]})},oW=e=>{const t="stroke-current fill-none "+(e.className?e.className:"");return d.jsxs("svg",{className:t,width:"37.794998",height:"37.795277",viewBox:"0 0 9.9999266 10",version:"1.1",id:"svg891",children:[d.jsx("defs",{id:"defs885"}),d.jsx("metadata",{id:"metadata888"}),d.jsx("g",{id:"layer1",children:d.jsx("path",{id:"path847",d:"M 2.8254303,0.66702107 C 2.4003304,0.66703194 2.0557278,1.0116518 2.0557405,1.4367517 c 9.9e-6,0.4250837 0.3446062,0.7696799 0.7696898,0.7696908 0.2035117,-1e-5 0.3987361,-0.080616 0.5429723,-0.2241869 0.1523521,0.1402914 0.3654164,0.4017725 0.463558,0.827052 0.048348,0.2095021 0.080997,0.3680278 0.1047221,0.4938457 C 3.3409601,3.5135709 2.8618544,3.9658632 2.6175125,4.5484918 L 2.1203312,4.3487272 2.1741629,4.0311519 1.7965761,4.1163635 C 1.7220329,3.7699236 1.4611146,3.4444173 1.0330271,3.4444291 c -0.42807203,1e-5 -0.77508476,0.3470408 -0.77507298,0.7751129 9.97e-6,0.4280567 0.34701636,0.775063 0.77507298,0.775073 0.2447371,-1.8e-6 0.4750967,-0.1155917 0.6213831,-0.3117969 l 0.2613842,0.2472043 0.053832,-0.1399107 0.5136888,0.202937 c -0.02663,0.1388929 -0.040036,0.2799964 -0.040054,0.4214191 3.6e-6,0.5182979 0.1798081,1.0205433 0.5087489,1.4210814 L 2.0449796,7.6859404 1.8404907,7.4015452 c 0,0 -0.038568,0.3138263 -0.055128,0.3877522 -0.1064733,-0.050342 -0.203945,-0.049535 -0.3217194,-0.049526 -0.4399478,10e-6 -0.796593,0.3566561 -0.79660387,0.7966039 9.97e-6,0.4399479 0.35665607,0.796594 0.79660387,0.7966039 0.4399488,-9.9e-6 0.7965948,-0.356656 0.7966048,-0.7966039 1.8e-6,-0.069902 -0.0092,-0.1394946 -0.027355,-0.206995 L 2.6074333,8.2564684 2.4701747,8.0492368 3.441597,7.2783803 c 0.3675637,0.2447008 0.7992732,0.375262 1.24084,0.3752647 0.6209452,-4.6e-6 1.2520676,-0.2806944 1.675575,-0.7348022 v 0 0 l 0.6510499,0.3016134 c -9.019e-4,0.015191 -0.00136,0.03041 -0.00136,0.045638 1.08e-5,0.422126 0.3422214,0.7643193 0.7643484,0.7643076 C 8.1941613,8.0303916 8.5363483,7.6882055 8.5363582,7.266094 8.53637,6.843967 8.1941767,6.5017565 7.7720507,6.5017456 c -0.2472243,0 -0.4791801,0.1195772 -0.6225895,0.3209552 L 6.6447385,6.5276481 C 6.7371072,6.3613436 6.921587,5.7949424 6.9215788,5.4144741 6.9215861,5.2042876 6.8920027,4.9951471 6.8336842,4.7932107 7.033883,4.7326535 7.3088071,4.6224567 7.5782683,4.4456233 7.922754,4.2195547 8.1595636,4.0150051 8.1595636,4.0150051 l 0.096889,0.1399506 c 0,0 0.183015,-0.043064 0.2583704,-0.1937777 0.035549,-0.07109 0.080462,-0.2257886 0.1182194,-0.3696413 0.1127864,0.065814 0.2410262,0.1004964 0.37161,0.1005046 C 9.4118987,3.6920295 9.7420345,3.3618941 9.7420454,2.9546468 9.7420572,2.547385 9.4119141,2.2172242 9.0046523,2.2172134 8.5973741,2.2172016 8.2672061,2.5473687 8.2672179,2.9546468 c 3.6e-6,0.078985 0.012699,0.1574615 0.037598,0.2324217 L 7.7720461,3.218403 7.6428609,3.2829938 7.7397489,3.4444354 6.5878858,4.1657212 6.5522548,4.1825895 C 5.9749985,3.5227048 5.341833,3.146309 4.6146737,3.1763393 4.5525031,2.943217 4.5546785,2.9264203 4.2329854,2.3060279 4.0795945,2.0102111 3.698295,1.7022809 3.5786987,1.5950218 3.5896391,1.5429757 3.5951592,1.4899371 3.5951682,1.4367535 3.59518,1.0116382 3.2505529,0.6670111 2.8254385,0.66702288 Z"})})]})},SR=Ms(e=>({state:"Stopped",setState:t=>e(()=>({state:t}))})),iW=()=>{const{publish:e}=Gc(),{state:t}=SR(),{settings:n,updateSetting:r}=df();return d.jsxs("div",{className:"flex gap-4 items-center",children:[d.jsx("div",{className:"bg-green-800 py-2 px-2 aria-disabled:bg-gray-600 cursor-pointer aria-disabled:cursor-not-allowed","aria-disabled":t=="Running"||t=="Testing",onClick:()=>{e({key:"ExecutionUpdate",payload:"Running"})},children:d.jsx(_I,{className:"h-8 w-8 text-white"})}),d.jsx("div",{className:"bg-blue-800 py-2 px-2 aria-disabled:bg-gray-600 cursor-pointer aria-disabled:cursor-not-allowed","aria-disabled":t=="Running"||t=="Testing",onClick:()=>{e({key:"ExecutionUpdate",payload:"Testing"})},children:d.jsx(NI,{className:"h-8 w-8 text-white"})}),d.jsx("div",{className:"bg-red-800 py-2 px-2 aria-disabled:bg-gray-600 cursor-pointer aria-disabled:cursor-not-allowed","aria-disabled":t=="Stopped",onClick:()=>{e({key:"ExecutionUpdate",payload:"Stopped"})},children:d.jsx(kI,{className:"h-8 w-8 text-white"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Wt,{checked:n.AutoRun,onCheckedChange:()=>r({AutoRun:!n.AutoRun})}),"AutoRun"]})]})},sW=()=>d.jsxs("div",{className:"flex flex-row h-12 justify-between items-center pr-16 gap-4 shadow-gray-300 dark:shadow-gray-800 dark:shadow-lg shadow-md",children:[d.jsx("div",{className:"pl-12",children:d.jsx(iW,{})}),d.jsxs("div",{className:"flex flex-row gap-4",children:[d.jsxs("div",{className:"lg:flex lg:flex-row gap-4 hidden lg:visible",children:[d.jsx("div",{className:"bg-purple-800 py-2 px-2",children:d.jsx(tr,{to:"https://mobiflight.com/discord",target:"_blank",children:d.jsx(fI,{className:"h-8 w-8 text-white"})})}),d.jsx("div",{className:"bg-red-700 py-2 px-2",children:d.jsx(tr,{to:"https://youtube.com/mobiflight",target:"_blank",children:d.jsx(gI,{className:"h-8 w-8 text-white"})})}),d.jsx("div",{className:"bg-black py-2 px-2",children:d.jsx(tr,{to:"https://github.com/mobiflight",target:"_blank",children:d.jsx(pI,{className:"h-8 w-8 text-white"})})}),d.jsx("div",{className:"bg-orange-400 py-2 px-2",children:d.jsx(tr,{to:"https://hubhop.mobiflight.com",target:"_blank",children:d.jsx(oW,{className:"h-8 w-8 text-white"})})}),d.jsx(tr,{to:"https://paypal.me/mobiflight",target:"_blank",children:d.jsxs("div",{className:"bg-yellow-500 py-2 px-1 flex items-center gap-1 pr-2 italic text-white font-bold",children:[d.jsx(hI,{className:"h-8 w-8 text-white"}),d.jsx("div",{children:"Donate"})]})})]}),d.jsx("div",{className:"min-w-12",children:d.jsx("img",{src:C1,className:"w-12 h-12"})})]})]}),aW=p.createContext(void 0),lW={setTheme:e=>{},themes:[]},cW=()=>{var e;return(e=p.useContext(aW))!==null&&e!==void 0?e:lW};function uW(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}uW(`html[dir=ltr],[data-sonner-toaster][dir=ltr]{--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}html[dir=rtl],[data-sonner-toaster][dir=rtl]{--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toast][data-theme=dark] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=info],[data-rich-colors=true] [data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true] [data-sonner-toast][data-type=warning],[data-rich-colors=true] [data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
+`);var dW=e=>{switch(e){case"success":return hW;case"info":return mW;case"warning":return gW;case"error":return vW;default:return null}},fW=Array(12).fill(0),pW=({visible:e})=>ce.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},ce.createElement("div",{className:"sonner-spinner"},fW.map((t,n)=>ce.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),hW=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gW=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mW=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),vW=ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xW=()=>{let[e,t]=ce.useState(!1);return ce.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},h0=1,yW=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:h0++,i=this.toasts.find(c=>c.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...e,id:o,title:n}),{...c,...e,id:o,dismissible:a,title:n}):c):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0;return r.then(i=>{if(i&&typeof i.ok=="boolean"&&!i.ok){o=!1;let a=typeof t.error=="function"?t.error(`HTTP error! status: ${i.status}`):t.error,c=typeof t.description=="function"?t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:n,type:"error",message:a,description:c})}else if(t.success!==void 0){o=!1;let a=typeof t.success=="function"?t.success(i):t.success,c=typeof t.description=="function"?t.description(i):t.description;this.create({id:n,type:"success",message:a,description:c})}}).catch(i=>{if(t.error!==void 0){o=!1;let a=typeof t.error=="function"?t.error(i):t.error,c=typeof t.description=="function"?t.description(i):t.description;this.create({id:n,type:"error",message:a,description:c})}}).finally(()=>{var i;o&&(this.dismiss(n),n=void 0),(i=t.finally)==null||i.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||h0++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Fr=new yW,wW=(e,t)=>{let n=(t==null?void 0:t.id)||h0++;return Fr.addToast({title:e,...t,id:n}),n},bW=wW,SW=Object.assign(bW,{success:Fr.success,info:Fr.info,warning:Fr.warning,error:Fr.error,custom:Fr.custom,message:Fr.message,promise:Fr.promise,dismiss:Fr.dismiss,loading:Fr.loading}),CW=3,$W="32px",PW=4e3,EW=356,CR=14,RW=20,_W=200;function NW(...e){return e.filter(Boolean).join(" ")}var kW=e=>{var t,n,r,o,i,a,c;let{invert:u,toast:f,unstyled:h,interacting:m,setHeights:v,visibleToasts:x,heights:w,index:b,toasts:P,expanded:C,removeToast:S,closeButton:E,style:_,cancelButtonStyle:D,actionButtonStyle:N,className:j="",descriptionClassName:O="",duration:V,position:J,gap:ie=CR,loadingIcon:te,expandByDefault:ge,classNames:le,icons:T,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:Y,cn:U}=e,[B,L]=ce.useState(!1),[H,oe]=ce.useState(!1),[ne,fe]=ce.useState(!1),[Se,me]=ce.useState(!1),[pe,Te]=ce.useState(0),[Fe,We]=ce.useState(0),Pe=ce.useRef(null),Me=ce.useRef(null),Mt=b===0,lt=b+1<=x,Qe=f.type,tn=f.dismissible!==!1,Ut=f.className||"",Jo=f.descriptionClassName||"",Xr=ce.useMemo(()=>w.findIndex(De=>De.toastId===f.id)||0,[w,f.id]),Dr=ce.useMemo(()=>{var De;return(De=f.closeButton)!=null?De:E},[f.closeButton,E]),vt=ce.useMemo(()=>f.duration||V||PW,[f.duration,V]),dr=ce.useRef(0),xn=ce.useRef(0),Kn=ce.useRef(0),Yt=ce.useRef(null),[Ki,fr]=J.split("-"),jr=ce.useMemo(()=>w.reduce((De,nt,ft)=>ft>=Xr?De:De+nt.height,0),[w,Xr]),yn=xW(),Zo=f.invert||u,Qr=Qe==="loading";xn.current=ce.useMemo(()=>Xr*ie+jr,[Xr,jr]),ce.useEffect(()=>{L(!0)},[]),ce.useLayoutEffect(()=>{if(!B)return;let De=Me.current,nt=De.style.height;De.style.height="auto";let ft=De.getBoundingClientRect().height;De.style.height=nt,We(ft),v(Xt=>Xt.find(jn=>jn.toastId===f.id)?Xt.map(jn=>jn.toastId===f.id?{...jn,height:ft}:jn):[{toastId:f.id,height:ft,position:f.position},...Xt])},[B,f.title,f.description,v,f.id]);let wn=ce.useCallback(()=>{oe(!0),Te(xn.current),v(De=>De.filter(nt=>nt.toastId!==f.id)),setTimeout(()=>{S(f)},_W)},[f,S,v,xn]);ce.useEffect(()=>{if(f.promise&&Qe==="loading"||f.duration===1/0||f.type==="loading")return;let De,nt=vt;return C||m||Y&&yn?(()=>{if(Kn.current{var ft;(ft=f.onAutoClose)==null||ft.call(f,f),wn()},nt)),()=>clearTimeout(De)},[C,m,ge,f,vt,wn,f.promise,Qe,Y,yn]),ce.useEffect(()=>{let De=Me.current;if(De){let nt=De.getBoundingClientRect().height;return We(nt),v(ft=>[{toastId:f.id,height:nt,position:f.position},...ft]),()=>v(ft=>ft.filter(Xt=>Xt.toastId!==f.id))}},[v,f.id]),ce.useEffect(()=>{f.delete&&wn()},[wn,f.delete]);function Gi(){return T!=null&&T.loading?ce.createElement("div",{className:"loader","data-visible":Qe==="loading"},T.loading):te?ce.createElement("div",{className:"sonner-loader","data-visible":Qe==="loading"},te):ce.createElement(pW,{visible:Qe==="loading"})}return ce.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Me,className:U(j,Ut,le==null?void 0:le.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,le==null?void 0:le.default,le==null?void 0:le[Qe],(n=f==null?void 0:f.classNames)==null?void 0:n[Qe]),"data-sonner-toast":"","data-styled":!(f.jsx||f.unstyled||h),"data-mounted":B,"data-promise":!!f.promise,"data-removed":H,"data-visible":lt,"data-y-position":Ki,"data-x-position":fr,"data-index":b,"data-front":Mt,"data-swiping":ne,"data-dismissible":tn,"data-type":Qe,"data-invert":Zo,"data-swipe-out":Se,"data-expanded":!!(C||ge&&B),style:{"--index":b,"--toasts-before":b,"--z-index":P.length-b,"--offset":`${H?pe:xn.current}px`,"--initial-height":ge?"auto":`${Fe}px`,..._,...f.style},onPointerDown:De=>{Qr||!tn||(Pe.current=new Date,Te(xn.current),De.target.setPointerCapture(De.pointerId),De.target.tagName!=="BUTTON"&&(fe(!0),Yt.current={x:De.clientX,y:De.clientY}))},onPointerUp:()=>{var De,nt,ft,Xt;if(Se||!tn)return;Yt.current=null;let jn=Number(((De=Me.current)==null?void 0:De.style.getPropertyValue("--swipe-amount").replace("px",""))||0),go=new Date().getTime()-((nt=Pe.current)==null?void 0:nt.getTime()),cl=Math.abs(jn)/go;if(Math.abs(jn)>=RW||cl>.11){Te(xn.current),(ft=f.onDismiss)==null||ft.call(f,f),wn(),me(!0);return}(Xt=Me.current)==null||Xt.style.setProperty("--swipe-amount","0px"),fe(!1)},onPointerMove:De=>{var nt;if(!Yt.current||!tn)return;let ft=De.clientY-Yt.current.y,Xt=De.clientX-Yt.current.x,jn=(Ki==="top"?Math.min:Math.max)(0,ft),go=De.pointerType==="touch"?10:2;Math.abs(jn)>go?(nt=Me.current)==null||nt.style.setProperty("--swipe-amount",`${ft}px`):Math.abs(Xt)>go&&(Yt.current=null)}},Dr&&!f.jsx?ce.createElement("button",{"aria-label":W,"data-disabled":Qr,"data-close-button":!0,onClick:Qr||!tn?()=>{}:()=>{var De;wn(),(De=f.onDismiss)==null||De.call(f,f)},className:U(le==null?void 0:le.closeButton,(r=f==null?void 0:f.classNames)==null?void 0:r.closeButton)},ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ce.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ce.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||ce.isValidElement(f.title)?f.jsx||f.title:ce.createElement(ce.Fragment,null,Qe||f.icon||f.promise?ce.createElement("div",{"data-icon":""},f.promise||f.type==="loading"&&!f.icon?f.icon||(T==null?void 0:T.loading)||Gi():null,f.type!=="loading"?f.icon||(T==null?void 0:T[Qe])||dW(Qe):null):null,ce.createElement("div",{"data-content":""},ce.createElement("div",{"data-title":"",className:U(le==null?void 0:le.title,(o=f==null?void 0:f.classNames)==null?void 0:o.title)},f.title),f.description?ce.createElement("div",{"data-description":"",className:U(O,Jo,le==null?void 0:le.description,(i=f==null?void 0:f.classNames)==null?void 0:i.description)},f.description):null),f.cancel?ce.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||D,onClick:De=>{var nt;tn&&(wn(),(nt=f.cancel)!=null&&nt.onClick&&f.cancel.onClick(De))},className:U(le==null?void 0:le.cancelButton,(a=f==null?void 0:f.classNames)==null?void 0:a.cancelButton)},f.cancel.label):null,f.action?ce.createElement("button",{"data-button":"",style:f.actionButtonStyle||N,onClick:De=>{var nt;(nt=f.action)==null||nt.onClick(De),!De.defaultPrevented&&wn()},className:U(le==null?void 0:le.actionButton,(c=f==null?void 0:f.classNames)==null?void 0:c.actionButton)},f.action.label):null))};function WS(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var DW=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:c,theme:u="light",richColors:f,duration:h,style:m,visibleToasts:v=CW,toastOptions:x,dir:w=WS(),gap:b,loadingIcon:P,icons:C,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:E,cn:_=NW}=e,[D,N]=ce.useState([]),j=ce.useMemo(()=>Array.from(new Set([n].concat(D.filter(H=>H.position).map(H=>H.position)))),[D,n]),[O,V]=ce.useState([]),[J,ie]=ce.useState(!1),[te,ge]=ce.useState(!1),[le,T]=ce.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=ce.useRef(null),Y=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=ce.useRef(null),B=ce.useRef(!1),L=ce.useCallback(H=>N(oe=>oe.filter(({id:ne})=>ne!==H.id)),[]);return ce.useEffect(()=>Fr.subscribe(H=>{if(H.dismiss){N(oe=>oe.map(ne=>ne.id===H.id?{...ne,delete:!0}:ne));return}setTimeout(()=>{Uf.flushSync(()=>{N(oe=>{let ne=oe.findIndex(fe=>fe.id===H.id);return ne!==-1?[...oe.slice(0,ne),{...oe[ne],...H},...oe.slice(ne+1)]:[H,...oe]})})})}),[]),ce.useEffect(()=>{if(u!=="system"){T(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?T("dark"):T("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:H})=>{T(H?"dark":"light")})},[u]),ce.useEffect(()=>{D.length<=1&&ie(!1)},[D]),ce.useEffect(()=>{let H=oe=>{var ne,fe;r.every(Se=>oe[Se]||oe.code===Se)&&(ie(!0),(ne=W.current)==null||ne.focus()),oe.code==="Escape"&&(document.activeElement===W.current||(fe=W.current)!=null&&fe.contains(document.activeElement))&&ie(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[r]),ce.useEffect(()=>{if(W.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,B.current=!1)}},[W.current]),D.length?ce.createElement("section",{"aria-label":`${S} ${Y}`,tabIndex:-1},j.map((H,oe)=>{var ne;let[fe,Se]=H.split("-");return ce.createElement("ol",{key:H,dir:w==="auto"?WS():w,tabIndex:-1,ref:W,className:a,"data-sonner-toaster":!0,"data-theme":le,"data-rich-colors":f,"data-y-position":fe,"data-x-position":Se,style:{"--front-toast-height":`${((ne=O[0])==null?void 0:ne.height)||0}px`,"--offset":typeof c=="number"?`${c}px`:c||$W,"--width":`${EW}px`,"--gap":`${CR}px`,...m},onBlur:me=>{B.current&&!me.currentTarget.contains(me.relatedTarget)&&(B.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||B.current||(B.current=!0,U.current=me.relatedTarget)},onMouseEnter:()=>ie(!0),onMouseMove:()=>ie(!0),onMouseLeave:()=>{te||ie(!1)},onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||ge(!0)},onPointerUp:()=>ge(!1)},D.filter(me=>!me.position&&oe===0||me.position===H).map((me,pe)=>{var Te,Fe;return ce.createElement(kW,{key:me.id,icons:C,index:pe,toast:me,duration:(Te=x==null?void 0:x.duration)!=null?Te:h,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:t,visibleToasts:v,closeButton:(Fe=x==null?void 0:x.closeButton)!=null?Fe:i,interacting:te,position:H,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:L,toasts:D.filter(We=>We.position==me.position),heights:O.filter(We=>We.position==me.position),setHeights:V,expandByDefault:o,gap:b,loadingIcon:P,expanded:J,pauseWhenPageIsHidden:E,cn:_})}))})):null};const jW=({...e})=>{const{theme:t="system"}=cW();return d.jsx(DW,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var g0=(e=>(e[e.NONE=0]="NONE",e[e.UNKNOWN=1]="UNKNOWN",e[e.FS9=2]="FS9",e[e.FSX=3]="FSX",e[e.P3D=4]="P3D",e[e.XPLANE=5]="XPLANE",e[e.MSFS2020=6]="MSFS2020",e))(g0||{});function MW(){const e=Hi(),{setItems:t,updateItem:n}=qa(),{setSettings:r}=df(),{addMessage:o}=wR(),{setState:i}=SR(),{setDevices:a}=R1(),{prepareForToast:c}=YT(),{setPresets:u}=pR(),{setPresets:f}=KV();no("StatusBarUpdate",x=>{v(x.payload)}),no("ConfigFile",x=>{v({Value:100,Text:"Finished!"});const w=x.payload;console.log(w),t(w.ConfigItems),e("/projects/1")}),no("LogMessage",x=>{const w=x.payload;o(w)}),no("ExecutionUpdate",x=>{const w=x.payload;i(w.State)}),no("ConfigValueUpdate",x=>{const w=x.payload,b=qa.getState().items.map(P=>{const C=w.ConfigItems.find(S=>S.GUID===P.GUID);return C||P});t(b)}),no("GlobalSettings",x=>{const w=x.payload;console.log("Global Settings Loaded"),r(w)}),no("Msfs2020HubhopPresetList",x=>{const w=x.payload;w.FlightSimType===g0.MSFS2020?u(w.Items):w.FlightSimType===g0.XPLANE&&f(w.Items),console.log("HubHop Presets loaded")}),no("config.update",x=>{const w=x.payload;n(w)}),no("DeviceUpdate",x=>{const w=x.payload;a(w.Devices)}),no("Notification",x=>{const{title:w,options:b}=c(x);SW(w,b)});const[h]=EM(),[m,v]=p.useState({Value:0,Text:"Starting..."});return p.useEffect(()=>{const x=w=>{w.key=="116"&&w.preventDefault()};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[]),p.useEffect(()=>{h.get("progress")=="100"&&v({Value:100,Text:"Finished!"})},[h]),d.jsx(d.Fragment,{children:m.Value<100?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 bg-[url('/assets/background-nologo.jpg')]"}),d.jsx("div",{className:"fixed inset-0 bg-gradient-to-br from-indigo-500 from-10% via-sky-500 via-30% to-emerald-500 to-90%"}),d.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center gap-8 p-10",children:[d.jsx("div",{className:"animate-low-bounce",children:d.jsx("img",{src:C1,className:"h-48 w-48 shadow-xl shadow-slate-800/40"})}),d.jsx(E1,{className:"h-12 max-w-xl",value:m.Value}),d.jsx("p",{className:"text-white",children:m.Text})]})]}):d.jsxs("div",{className:"flex h-svh flex-row",children:[d.jsx(rW,{}),d.jsxs("div",{className:"flex grow flex-col",children:[d.jsx(sW,{}),d.jsx("div",{className:"flex grow flex-col overflow-hidden p-12",children:d.jsx(S$,{})}),d.jsxs("div",{className:"flex flex-row justify-end gap-2 bg-white px-5 py-2 dark:bg-zinc-800",children:[d.jsx("div",{className:"text-xs text-gray-500",children:"MobiFlight 2024"}),d.jsx("div",{className:"text-xs text-gray-500",children:"Version 1.0.0"})]})]}),d.jsx(jW,{position:"bottom-right",offset:48})]})})}const TW=fM([{path:"/",element:d.jsx(MW,{}),children:[{index:!0,element:d.jsx(OS,{})},{path:"index.html",element:d.jsx(OS,{})},{path:"settings",element:d.jsx(mz,{}),errorElement:d.jsx(Kb,{})},{path:"log",element:d.jsx(JH,{})},{path:"test",element:d.jsx(ZH,{})},{path:"devices",element:d.jsx(cH,{})},{path:"devices/:type/:id",element:d.jsx(jH,{}),children:[{path:"elements/:elementId",element:d.jsx(KH,{})}]},{path:"projects/:id",element:d.jsx(vz,{})},{path:"projects/:id/configs",element:d.jsx(QB,{})},{path:"projects/:projectId/configs/:configId",element:d.jsx(JV,{})}]},{path:"*",element:d.jsx(Kb,{})}]);function IW({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=p.useState(()=>localStorage.getItem(n)||t);p.useEffect(()=>{const c=window.document.documentElement;if(c.classList.remove("light","dark"),o==="system"){const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";c.classList.add(u);return}c.classList.add(o)},[o]);const a={theme:o,setTheme:c=>{localStorage.setItem(n,c),i(c)}};return d.jsx(bR.Provider,{...r,value:a,children:e})}Tg.createRoot(document.getElementById("root")).render(d.jsx(ce.StrictMode,{children:d.jsx(IW,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:d.jsx(ce.Suspense,{fallback:"Loading",children:d.jsx(wM,{router:TW})})})}));
diff --git a/frontend/dist/assets/mobiflight-logo-border-DSJoqCyo.png b/frontend/dist/assets/mobiflight-logo-border-DSJoqCyo.png
new file mode 100644
index 000000000..799110e89
Binary files /dev/null and b/frontend/dist/assets/mobiflight-logo-border-DSJoqCyo.png differ
diff --git a/frontend/dist/assets/msfs2020-logo-BXS3GGap.png b/frontend/dist/assets/msfs2020-logo-BXS3GGap.png
new file mode 100644
index 000000000..496219908
Binary files /dev/null and b/frontend/dist/assets/msfs2020-logo-BXS3GGap.png differ
diff --git a/frontend/dist/index.html b/frontend/dist/index.html
new file mode 100644
index 000000000..62616ab05
--- /dev/null
+++ b/frontend/dist/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ MobiFlight
+
+
+
+
+
+
+
diff --git a/frontend/dist/locales/de/translation.json b/frontend/dist/locales/de/translation.json
new file mode 100644
index 000000000..fbeb19dd6
--- /dev/null
+++ b/frontend/dist/locales/de/translation.json
@@ -0,0 +1,13 @@
+{
+ "app": {
+ "greeting":"hello Amelie"
+ },
+ "project": {
+ "configs" : "Configs",
+ "status" : "Status",
+ "status.files" : "Files",
+ "status.configs" : "Configs",
+ "status.devices" : "Devices"
+
+ }
+}
\ No newline at end of file
diff --git a/frontend/dist/locales/en/translation.json b/frontend/dist/locales/en/translation.json
new file mode 100644
index 000000000..11031112f
--- /dev/null
+++ b/frontend/dist/locales/en/translation.json
@@ -0,0 +1,90 @@
+{
+ "interpolation": "Hello {{name}}!",
+ "app": {
+ "greeting": "hello Amelie"
+ },
+ "project": {
+ "configs": "Configs",
+ "status": "Status",
+ "status.files": "Files",
+ "status.configs": "Configs",
+ "status.devices": "Devices"
+ },
+ "device": {
+ "type": {
+ "Button": "Button",
+ "Encoder": "Encoder",
+ "AnalogInput": "Analog Input",
+ "InputShiftRegister": "Input Shift Register",
+ "InputMultiplexer": "Input Multiplexer",
+ "Output": "Output",
+ "LedModule": "7-Segment Display",
+ "Stepper": "Stepper Motor",
+ "Servo": "Servo Motor",
+ "LcdDisplay": "LCD Display",
+ "ShiftRegister": "Output Shift Register",
+ "CustomDevice": "Custom Device"
+ }
+ },
+ "notification": {
+ "firmware": {
+ "install.possible": {
+ "title": "Compatible device!",
+ "description": "A device was detected which is supported by MobiFlight.",
+ "action.label": "Install firmware"
+ }
+ },
+ "hubhop": {
+ "update": {
+ "title": "Perform HubHop update",
+ "description": "Your HubHop presets are older than 7 days.",
+ "action.label": "Update now",
+ "action.navigate": "/settings"
+ }
+ },
+ "device": {
+ "connected" : {
+ "title": "Device connected",
+ "description": "A new device ({{Name}}) was detected.",
+ "action.label": "View device",
+ "action.navigate": "/devices/{{Type}}/{{Id}}"
+ },
+ "removed": {
+ "title": "Device removed",
+ "description": "{{Name}} was removed."
+ },
+ "missing": {
+ "title": "Device(s) missing",
+ "description": "At least one device is missing which is referenced in the current project.",
+ "action.label": "Manage missing devices",
+ "action.navigate": "/devices"
+ }
+ },
+ "joystick": {
+ "missing": {
+ "title": "Joystick missing",
+ "description": "{{Data}} is missing which is referenced in the current project.",
+ "action.label": "Manage missing devices",
+ "action.navigate": "/joysticks"
+ }
+ },
+ "sim" : {
+ "connection" : {
+ "established.title" : "Simulator connection established",
+ "established.description" : "MobiFlight is now connected to {{Value}}.",
+ "closed.title" : "Simulator connection closed",
+ "closed.description" : "The connection to the simulator ({{Value}}) was closed."
+ },
+ "config.autoloaded" : {
+ "title" : "MobiFlight configuration loaded",
+ "description" : "The configuration for {{Value}} was loaded automatically.",
+ "action.label" : "Manage configuration",
+ "action.navigate" : "/"
+ },
+ "aircraft.changed": {
+ "title" : "Aircraft changed",
+ "description" : "The aircraft was changed to {{Value}}."
+ }
+ }
+ }
+}