diff --git a/Makefile b/Makefile index 62f1dad3b..50f73d732 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ install: .PHONY: run run: - ENVIRONMENT=dev GATUS_CONFIG_PATH=./config.yaml go run main.go + ENVIRONMENT=dev GATUS_LOG_LEVEL=debug GATUS_CONFIG_PATH=./config.yaml go run main.go .PHONY: run-binary run-binary: diff --git a/config.yaml b/config.yaml index f386ea273..af77a17b9 100644 --- a/config.yaml +++ b/config.yaml @@ -1,53 +1,97 @@ +maintenance: + enabled: true + start: "01:25" + duration: "5m" + timezone: "Europe/Berlin" + +storage: + type: sqlite + path: ./gatus.db + +states: + - name: degraded + priority: 1 + +ui: + state-colors: + degraded: "#FFA500" # Orange color for degraded state + endpoints: - - name: front-end + - name: healthy-test group: core - url: "https://twin.sh/health" - interval: 5m + url: "icmp://9.9.9.9" + interval: 10s conditions: - - "[STATUS] == 200" - - "[BODY].status == UP" - - "[RESPONSE_TIME] < 150" + - "[CONNECTED] == true" - - name: back-end + - name: maintenance-test group: core - url: "https://example.org/" - interval: 5m + url: "http://localhost:8088/" + interval: 10s conditions: - "[STATUS] == 200" - - "[CERTIFICATE_EXPIRATION] > 48h" + - "[RESPONSE_TIME] < 150" + maintenance-windows: + - start: "12:00" + duration: "23h59m" - - name: monitoring - group: internal - url: "https://example.org/" - interval: 5m + - name: degraded-test + group: core + url: "icmp://9.9.9.9" + interval: 10s conditions: - - "[STATUS] == 200" + - "[CONNECTED] == true" + - "degraded::[RESPONSE_TIME] < 22" - - name: nas - group: internal - url: "https://example.org/" - interval: 5m + - name: unhealthy-test (error) + group: core + url: "http://doesnotexist.local/" + interval: 10s conditions: - "[STATUS] == 200" - - name: example-dns-query - url: "8.8.8.8" # Address of the DNS server to use - interval: 5m - dns: - query-name: "example.com" - query-type: "A" + - name: unhealthy-test (failing condition) + group: core + url: "icmp://9.9.9.9" + interval: 10s conditions: - - "[BODY] == pat(*.*.*.*)" # Matches any IPv4 address - - "[DNS_RCODE] == NOERROR" + - "[CONNECTED] == true" + - "[RESPONSE_TIME] < 1" - - name: icmp-ping - url: "icmp://example.org" - interval: 1m + - name: unhealthy-test (invalid linked condition state) + group: core + url: "icmp://9.9.9.9" + interval: 10s conditions: - "[CONNECTED] == true" + - "invalid::[RESPONSE_TIME] < 1" - - name: check-domain-expiration - url: "https://example.org/" - interval: 1h - conditions: - - "[DOMAIN_EXPIRATION] > 720h" +suites: + - name: custom-state-test + group: api-tests + interval: 10s + endpoints: + - name: create-item + url: icmp://9.9.9.9 + conditions: + - "[CONNECTED] == true" + - "[RESPONSE_TIME] < 23" + + - name: update-item + url: icmp://9.9.9.9 + conditions: + - "[CONNECTED] == true" + - "degraded::[RESPONSE_TIME] < 24" + + - name: get-item + url: icmp://9.9.9.9 + conditions: + - "[CONNECTED] == true" + - "[RESPONSE_TIME] < 23" + + - name: delete-item + url: icmp://9.9.9.9 + always-run: true + conditions: + - "[CONNECTED] == true" + - "degraded::[RESPONSE_TIME] < 23" diff --git a/config/config.go b/config/config.go index 4d9724b54..6dfb41488 100644 --- a/config/config.go +++ b/config/config.go @@ -21,6 +21,7 @@ import ( "github.com/TwiN/gatus/v5/config/key" "github.com/TwiN/gatus/v5/config/maintenance" "github.com/TwiN/gatus/v5/config/remote" + "github.com/TwiN/gatus/v5/config/state" "github.com/TwiN/gatus/v5/config/suite" "github.com/TwiN/gatus/v5/config/tunneling" "github.com/TwiN/gatus/v5/config/ui" @@ -88,6 +89,9 @@ type Config struct { // Alerting is the configuration for alerting providers Alerting *alerting.Config `yaml:"alerting,omitempty"` + // States is the list of configured states + States []*state.State `yaml:"states,omitempty"` // TODO#227 Make this a map since state names should always be unique? + // Endpoints is the list of endpoints to monitor Endpoints []*endpoint.Endpoint `yaml:"endpoints,omitempty"` @@ -304,6 +308,9 @@ func parseAndValidateConfigBytes(yamlBytes []byte) (config *Config, err error) { if err := ValidateSecurityConfig(config); err != nil { return nil, err } + if er := ValidateStatesConfig(config); er != nil { + return nil, er + } if err := ValidateEndpointsConfig(config); err != nil { return nil, err } @@ -450,6 +457,7 @@ func ValidateMaintenanceConfig(config *Config) error { return nil } +// Must be called after ValidateStatesConfig to ensure all states are available for validation func ValidateUIConfig(config *Config) error { if config.UI == nil { config.UI = ui.GetDefaultConfig() @@ -458,6 +466,21 @@ func ValidateUIConfig(config *Config) error { return err } } + + // Validate all states configured have a corresponding UI color configured + // TODO#227 Add tests + stateColorMap := config.UI.StateColors + colorsMissing := []string{} + for _, state := range config.States { + if _, exists := stateColorMap[state.Name]; !exists { + colorsMissing = append(colorsMissing, state.Name) + } + } + if len(colorsMissing) > 0 { + return fmt.Errorf("no colors configured for states: %s", strings.Join(colorsMissing, ", ")) + } else { + logr.Debugf("[config.ValidateUIConfig] Configured colors for all %d state(s)", len(config.States)) + } return nil } @@ -470,9 +493,61 @@ func ValidateWebConfig(config *Config) error { return nil } +func ValidateStatesConfig(config *Config) error { // TODO#227 Add tests + if config.States == nil { + logr.Info("[config.ValidateStatesConfig] No custom states configured, using defaults") + config.States = state.GetDefaultConfig() + logr.Debugf("[config.ValidateStatesConfig] Inserted %d default state(s)", len(config.States)) + return nil + } + + // Insert default states if they are missing + defaultStates := state.GetDefaultConfig() + for _, defaultState := range defaultStates { + found := false + for _, customState := range config.States { + if customState.Name == defaultState.Name { + found = true + break + } + } + if !found { + logr.Debugf("[config.ValidateStatesConfig] Inserting default state into config: %s", defaultState.Name) + config.States = append(config.States, defaultState) + } + } + + // Validate custom states + stateNames := make(map[string]bool) + statePriorities := make(map[int]string) + for _, state := range config.States { + // Check for duplicate state names + if stateNames[state.Name] { + return fmt.Errorf("duplicate state name: %s", state.Name) + } + stateNames[state.Name] = true + + // Check for duplicate state priorities + if existingState, exists := statePriorities[state.Priority]; exists { + return fmt.Errorf("priority of state '%s' (%d) conflicts with state '%s'", state.Name, state.Priority, existingState) + } + statePriorities[state.Priority] = state.Name + + // Validate the state configuration + if err := state.ValidateAndSetDefaults(); err != nil { + return fmt.Errorf("invalid state '%s': %w", state.Name, err) + } + } + logr.Infof("[config.ValidateStatesConfig] Validated %d state(s) (%d custom)", len(config.States), len(config.States)-len(defaultStates)) + return nil +} + func ValidateEndpointsConfig(config *Config) error { - duplicateValidationMap := make(map[string]bool) + // Set state configuration for all endpoints + endpoint.SetStateConfig(config.States) + // Validate endpoints + duplicateValidationMap := make(map[string]bool) for _, ep := range config.Endpoints { logr.Debugf("[config.ValidateEndpointsConfig] Validating endpoint with key %s", ep.Key()) if endpointKey := ep.Key(); duplicateValidationMap[endpointKey] { @@ -485,6 +560,7 @@ func ValidateEndpointsConfig(config *Config) error { } } logr.Infof("[config.ValidateEndpointsConfig] Validated %d endpoints", len(config.Endpoints)) + // Validate external endpoints for _, ee := range config.ExternalEndpoints { logr.Debugf("[config.ValidateEndpointsConfig] Validating external endpoint '%s'", ee.Key()) @@ -497,6 +573,7 @@ func ValidateEndpointsConfig(config *Config) error { return fmt.Errorf("invalid external endpoint %s: %w", ee.Key(), err) } } + logr.Infof("[config.ValidateEndpointsConfig] Validated %d external endpoints", len(config.ExternalEndpoints)) return nil } diff --git a/config/endpoint/condition.go b/config/endpoint/condition.go index 02feb575b..f28c54e7d 100644 --- a/config/endpoint/condition.go +++ b/config/endpoint/condition.go @@ -8,6 +8,7 @@ import ( "time" "github.com/TwiN/gatus/v5/config/gontext" + "github.com/TwiN/gatus/v5/config/state" "github.com/TwiN/gatus/v5/pattern" ) @@ -24,7 +25,7 @@ const ( type Condition string // Validate checks if the Condition is valid -func (c Condition) Validate() error { +func (c Condition) Validate() error { // TODO#227 Validate conditions with linked states have valid states or just default to error state then? r := &Result{} c.evaluate(r, false, nil) if len(r.Errors) != 0 { @@ -37,6 +38,18 @@ func (c Condition) Validate() error { func (c Condition) evaluate(result *Result, dontResolveFailedConditions bool, context *gontext.Gontext) bool { condition := string(c) success := false + + var linkedStateName = state.DefaultUnhealthyStateName + if strings.Contains(condition, "::") { + conditionParts := strings.Split(condition, "::") + if len(conditionParts) != 2 { // TODO#227 Not sure if this makes sense. Checking that it is 2 or more should be enough. Then there is no character restriction in the remaining condition. + result.AddError(fmt.Sprintf("invalid condition: %s", condition)) + return false + } + linkedStateName = conditionParts[0] + condition = conditionParts[1] + } + conditionToDisplay := condition if strings.Contains(condition, " == ") { parameters, resolvedParameters := sanitizeAndResolveWithContext(strings.Split(condition, " == "), result, context) @@ -81,7 +94,8 @@ func (c Condition) evaluate(result *Result, dontResolveFailedConditions bool, co if !success { //logr.Debugf("[Condition.evaluate] Condition '%s' did not succeed because '%s' is false", condition, condition) } - result.ConditionResults = append(result.ConditionResults, &ConditionResult{Condition: conditionToDisplay, Success: success}) + + result.ConditionResults = append(result.ConditionResults, &ConditionResult{Condition: conditionToDisplay, Success: success, LinkedStateName: linkedStateName}) return success } diff --git a/config/endpoint/condition_result.go b/config/endpoint/condition_result.go index 00af8620b..70e97a11a 100644 --- a/config/endpoint/condition_result.go +++ b/config/endpoint/condition_result.go @@ -7,4 +7,7 @@ type ConditionResult struct { // Success whether the condition was met (successful) or not (failed) Success bool `json:"success"` + + // Name of the state the condition is linked to + LinkedStateName string `json:"-"` } diff --git a/config/endpoint/condition_test.go b/config/endpoint/condition_test.go index 074def485..9c3dd4052 100644 --- a/config/endpoint/condition_test.go +++ b/config/endpoint/condition_test.go @@ -38,12 +38,20 @@ func TestCondition_Validate(t *testing.T) { {condition: "[BODY].name == pat(john*)", expectedErr: nil}, {condition: "[CERTIFICATE_EXPIRATION] > 48h", expectedErr: nil}, {condition: "[DOMAIN_EXPIRATION] > 720h", expectedErr: nil}, + {condition: "state::[STATUS] == 200", expectedErr: nil}, + {condition: "state::[RESPONSE_TIME] < 500", expectedErr: nil}, {condition: "raw == raw", expectedErr: nil}, {condition: "[STATUS] ? 201", expectedErr: errors.New("invalid condition: [STATUS] ? 201")}, {condition: "[STATUS]==201", expectedErr: errors.New("invalid condition: [STATUS]==201")}, {condition: "[STATUS] = = 201", expectedErr: errors.New("invalid condition: [STATUS] = = 201")}, {condition: "[STATUS] ==", expectedErr: errors.New("invalid condition: [STATUS] ==")}, {condition: "[STATUS]", expectedErr: errors.New("invalid condition: [STATUS]")}, + {condition: "state::", expectedErr: errors.New("invalid condition: state::")}, + {condition: "state:: ", expectedErr: errors.New("invalid condition: state:: ")}, + {condition: "::[RESPONSE_TIME] < 500", expectedErr: errors.New("invalid condition: ::[RESPONSE_TIME] < 500")}, + {condition: " ::[RESPONSE_TIME] < 500", expectedErr: errors.New("invalid condition: ::[RESPONSE_TIME] < 500")}, + {condition: "state::another::[STATUS] == 200", expectedErr: errors.New("invalid condition: state::another::[STATUS] == 200")}, + {condition: "[STATUS] != 200::[RESPONSE_TIME] < 500", expectedErr: errors.New("invalid condition: [STATUS] != 200::[RESPONSE_TIME] < 500")}, // FIXME: Should return an error, but doesn't because jsonpath isn't evaluated due to body being empty in Condition.Validate() //{condition: "len([BODY].users == 100", expectedErr: nil}, } diff --git a/config/endpoint/endpoint.go b/config/endpoint/endpoint.go index 2014e5098..75fc10876 100644 --- a/config/endpoint/endpoint.go +++ b/config/endpoint/endpoint.go @@ -24,6 +24,7 @@ import ( "github.com/TwiN/gatus/v5/config/gontext" "github.com/TwiN/gatus/v5/config/key" "github.com/TwiN/gatus/v5/config/maintenance" + "github.com/TwiN/gatus/v5/config/state" "golang.org/x/crypto/ssh" ) @@ -67,13 +68,16 @@ var ( ErrUnknownEndpointType = errors.New("unknown endpoint type") // ErrInvalidConditionFormat is the error with which Gatus will panic if a condition has an invalid format - ErrInvalidConditionFormat = errors.New("invalid condition format: does not match ' '") + ErrInvalidConditionFormat = errors.New("invalid condition format: does not match '[STATE::] '") // ErrInvalidEndpointIntervalForDomainExpirationPlaceholder is the error with which Gatus will panic if an endpoint // has both an interval smaller than 5 minutes and a condition with DomainExpirationPlaceholder. // This is because the free whois service we are using should not be abused, especially considering the fact that // the data takes a while to be updated. ErrInvalidEndpointIntervalForDomainExpirationPlaceholder = errors.New("the minimum interval for an endpoint with a condition using the " + DomainExpirationPlaceholder + " placeholder is 300s (5m)") + + // State config + states []*state.State ) // Endpoint is the configuration of a service to be monitored @@ -151,6 +155,19 @@ type Endpoint struct { AlwaysRun bool `yaml:"always-run,omitempty"` } +func SetStateConfig(cfg []*state.State) { + states = cfg +} + +func FindStateByName(name string) *state.State { + for _, state := range states { + if state.Name == name { + return state + } + } + return nil +} + // IsEnabled returns whether the endpoint is enabled or not func (e *Endpoint) IsEnabled() bool { if e.Enabled == nil { @@ -337,6 +354,23 @@ func (e *Endpoint) EvaluateHealthWithContext(context *gontext.Gontext) *Result { result.Success = false } } + if result.Success { + result.State = state.DefaultHealthyStateName + } else { + highestPrioritySeen := 0 + for _, conditionResult := range result.ConditionResults { + if !conditionResult.Success { + linkedState := FindStateByName(conditionResult.LinkedStateName) + if linkedState != nil && linkedState.Priority > highestPrioritySeen { + highestPrioritySeen = linkedState.Priority + result.State = conditionResult.LinkedStateName + } + } + } + if len(result.State) == 0 { + result.State = state.DefaultUnhealthyStateName + } + } result.Timestamp = time.Now() // Clean up parameters that we don't need to keep in the results if processedEndpoint.UIConfig.HideURL { diff --git a/config/endpoint/event.go b/config/endpoint/event.go index da8d2275b..fc6fc96cb 100644 --- a/config/endpoint/event.go +++ b/config/endpoint/event.go @@ -9,6 +9,8 @@ type Event struct { // Type is the kind of event Type EventType `json:"type"` + State string `json:"state,omitempty"` + // Timestamp is the moment at which the event happened Timestamp time.Time `json:"timestamp"` } @@ -29,7 +31,7 @@ var ( // NewEventFromResult creates an Event from a Result func NewEventFromResult(result *Result) *Event { - event := &Event{Timestamp: result.Timestamp} + event := &Event{Timestamp: result.Timestamp, State: result.State} if result.Success { event.Type = EventHealthy } else { diff --git a/config/endpoint/result.go b/config/endpoint/result.go index e2561f0e4..bd415cf9e 100644 --- a/config/endpoint/result.go +++ b/config/endpoint/result.go @@ -35,6 +35,9 @@ type Result struct { // Success whether the result signifies a success or not Success bool `json:"success"` + // State of the endpoint after evaluating the result + State string `json:"state,omitempty"` + // Timestamp when the request was sent Timestamp time.Time `json:"timestamp"` diff --git a/config/state/state.go b/config/state/state.go new file mode 100644 index 000000000..e31096552 --- /dev/null +++ b/config/state/state.go @@ -0,0 +1,61 @@ +package state + +import ( + "errors" + "math" +) + +const ( + DefaultHealthyStateName = "healthy" + DefaultUnhealthyStateName = "unhealthy" + DefaultMaintenanceStateName = "maintenance" +) + +var ( + ErrInvalidName = errors.New("invalid name: must be non-empty and contain only lowercase letters, digits, hyphens, or underscores") + ErrInvalidPriority = errors.New("invalid priority: must be non-negative") +) + +type State struct { + Name string `yaml:"name"` + Priority int `yaml:"priority"` +} + +func GetDefaultConfig() []*State { + return []*State{ + { + Name: DefaultHealthyStateName, + Priority: 0, + }, + { + Name: DefaultUnhealthyStateName, + Priority: math.MaxInt - 1, + }, + { + Name: DefaultMaintenanceStateName, + Priority: math.MaxInt, + }, + } +} + +func (cfg *State) ValidateAndSetDefaults() error { + if err := ValidateName(cfg.Name); err != nil { + return err + } + if cfg.Priority < 0 { + return ErrInvalidPriority + } + return nil +} + +func ValidateName(name string) error { + if len(name) == 0 { + return ErrInvalidName + } + for _, r := range name { + if !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '-' && r != '_' { + return ErrInvalidName + } + } + return nil +} diff --git a/config/state/state_test.go b/config/state/state_test.go new file mode 100644 index 000000000..f29e72add --- /dev/null +++ b/config/state/state_test.go @@ -0,0 +1,127 @@ +package state + +import ( + "testing" +) + +func TestState_GetDefaultConfig(t *testing.T) { + defaultConfig := GetDefaultConfig() + if len(defaultConfig) != 3 { + t.Errorf("expected 3 default states, got %d", len(defaultConfig)) + } + + expectedNames := []string{ + DefaultHealthyStateName, + DefaultUnhealthyStateName, + DefaultMaintenanceStateName, + } + + for i, state := range defaultConfig { + if state.Name != expectedNames[i] { + t.Errorf("expected state name %s, got %s", expectedNames[i], state.Name) + } + } + + for _, state := range defaultConfig { + if err := state.ValidateAndSetDefaults(); err != nil { + t.Errorf("default state %s failed validation: %v", state.Name, err) + } + } +} + +func TestState_ValidateAndSetDefaults(t *testing.T) { + t.Run("valid state", func(t *testing.T) { + state := &State{ + Name: "custom", + Priority: 10, + } + if err := state.ValidateAndSetDefaults(); err != nil { + t.Errorf("expected valid state, got error: %v", err) + } + if state.Name != "custom" { + t.Errorf("expected name 'custom', got %s", state.Name) + } + if state.Priority != 10 { + t.Errorf("expected priority 10, got %d", state.Priority) + } + }) + + t.Run("valid name", func(t *testing.T) { + state := &State{ + Name: "valid-name_123", + Priority: 5, + } + if err := state.ValidateAndSetDefaults(); err != nil { + t.Errorf("expected valid state, got error: %v", err) + } + }) + + t.Run("empty name", func(t *testing.T) { + state := &State{ + Name: "", + Priority: 10, + } + err := state.ValidateAndSetDefaults() + if err != ErrInvalidName { + t.Errorf("expected ErrInvalidName, got %v", err) + } + }) + + t.Run("whitespace name", func(t *testing.T) { + state := &State{ + Name: " ", + Priority: 10, + } + err := state.ValidateAndSetDefaults() + if err != ErrInvalidName { + t.Errorf("expected ErrInvalidName, got %v", err) + } + }) + + t.Run("special character name", func(t *testing.T) { + state := &State{ + Name: "custom@state", + Priority: 10, + } + err := state.ValidateAndSetDefaults() + if err != ErrInvalidName { + t.Errorf("expected ErrInvalidName, got %v", err) + } + }) + + t.Run("uppercase name", func(t *testing.T) { + state := &State{ + Name: "CustomState", + Priority: 10, + } + err := state.ValidateAndSetDefaults() + if err != ErrInvalidName { + t.Errorf("expected ErrInvalidName, got %v", err) + } + }) + + t.Run("zero priority", func(t *testing.T) { + state := &State{ + Name: "custom", + Priority: 0, + } + err := state.ValidateAndSetDefaults() + if err == ErrInvalidPriority { + t.Errorf("did not expect ErrInvalidPriority for zero priority, got %v", err) + } + if state.Priority != 0 { + t.Errorf("expected priority to be set to 0, got %d", state.Priority) + } + }) + + t.Run("negative priority", func(t *testing.T) { + state := &State{ + Name: "custom", + Priority: -1, + } + err := state.ValidateAndSetDefaults() + if err != ErrInvalidPriority { + t.Errorf("expected ErrInvalidPriority, got %v", err) + } + }) +} diff --git a/config/ui/ui.go b/config/ui/ui.go index e56a8c5c4..38facd7c4 100644 --- a/config/ui/ui.go +++ b/config/ui/ui.go @@ -5,21 +5,22 @@ import ( "errors" "html/template" + "github.com/TwiN/gatus/v5/config/state" "github.com/TwiN/gatus/v5/storage" static "github.com/TwiN/gatus/v5/web" ) const ( - defaultTitle = "Health Dashboard | Gatus" - defaultDescription = "Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue" - defaultHeader = "Gatus" - defaultDashboardHeading = "Health Dashboard" - defaultDashboardSubheading = "Monitor the health of your endpoints in real-time" - defaultLogo = "" - defaultLink = "" - defaultCustomCSS = "" - defaultSortBy = "name" - defaultFilterBy = "none" + defaultTitle = "Health Dashboard | Gatus" + defaultDescription = "Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue" + defaultHeader = "Gatus" + defaultDashboardHeading = "Health Dashboard" + defaultDashboardSubheading = "Monitor the health of your endpoints in real-time" + defaultLogo = "" + defaultLink = "" + defaultCustomCSS = "" + defaultSortBy = "name" + defaultFilterBy = "none" ) var ( @@ -28,22 +29,26 @@ var ( ErrButtonValidationFailed = errors.New("invalid button configuration: missing required name or link") ErrInvalidDefaultSortBy = errors.New("invalid default-sort-by value: must be 'name', 'group', or 'health'") ErrInvalidDefaultFilterBy = errors.New("invalid default-filter-by value: must be 'none', 'failing', or 'unstable'") + ErrInvalidColorHexCode = errors.New("invalid color hex code: must be in the format #RRGGBB") ) +type Color string + // Config is the configuration for the UI of Gatus type Config struct { - Title string `yaml:"title,omitempty"` // Title of the page - Description string `yaml:"description,omitempty"` // Meta description of the page - DashboardHeading string `yaml:"dashboard-heading,omitempty"` // Dashboard Title between header and endpoints - DashboardSubheading string `yaml:"dashboard-subheading,omitempty"` // Dashboard Description between header and endpoints - Header string `yaml:"header,omitempty"` // Header is the text at the top of the page - Logo string `yaml:"logo,omitempty"` // Logo to display on the page - Link string `yaml:"link,omitempty"` // Link to open when clicking on the logo - Buttons []Button `yaml:"buttons,omitempty"` // Buttons to display below the header - CustomCSS string `yaml:"custom-css,omitempty"` // Custom CSS to include in the page - DarkMode *bool `yaml:"dark-mode,omitempty"` // DarkMode is a flag to enable dark mode by default - DefaultSortBy string `yaml:"default-sort-by,omitempty"` // DefaultSortBy is the default sort option ('name', 'group', 'health') - DefaultFilterBy string `yaml:"default-filter-by,omitempty"` // DefaultFilterBy is the default filter option ('none', 'failing', 'unstable') + Title string `yaml:"title,omitempty"` // Title of the page + Description string `yaml:"description,omitempty"` // Meta description of the page + DashboardHeading string `yaml:"dashboard-heading,omitempty"` // Dashboard Title between header and endpoints + DashboardSubheading string `yaml:"dashboard-subheading,omitempty"` // Dashboard Description between header and endpoints + Header string `yaml:"header,omitempty"` // Header is the text at the top of the page + Logo string `yaml:"logo,omitempty"` // Logo to display on the page + Link string `yaml:"link,omitempty"` // Link to open when clicking on the logo + Buttons []Button `yaml:"buttons,omitempty"` // Buttons to display below the header + CustomCSS string `yaml:"custom-css,omitempty"` // Custom CSS to include in the page + DarkMode *bool `yaml:"dark-mode,omitempty"` // DarkMode is a flag to enable dark mode by default + DefaultSortBy string `yaml:"default-sort-by,omitempty"` // DefaultSortBy is the default sort option ('name', 'group', 'health') + DefaultFilterBy string `yaml:"default-filter-by,omitempty"` // DefaultFilterBy is the default filter option ('none', 'failing', 'unstable') + StateColors map[string]Color `yaml:"state-colors,omitempty"` // StateColors is a map of state to color hex code // TODO#227 Add tests ////////////////////////////////////////////// // Non-configurable - used for UI rendering // ////////////////////////////////////////////// @@ -71,6 +76,14 @@ func (btn *Button) Validate() error { return nil } +func GetDefaultStateColors() map[string]Color { + return map[string]Color{ + state.DefaultHealthyStateName: "#22C55E", // Green + state.DefaultUnhealthyStateName: "#E43B3C", // Red (Default for result bar before was "#EF4444 saw #AD0116 on GitHub (was too dark) so I used https://colordesigner.io/gradient-generator to use some color in between TODO#227 Change to darker red for better visibility good?) + state.DefaultMaintenanceStateName: "#3B82F6", // Blue + } +} + // GetDefaultConfig returns a Config struct with the default values func GetDefaultConfig() *Config { return &Config{ @@ -85,6 +98,7 @@ func GetDefaultConfig() *Config { DarkMode: &defaultDarkMode, DefaultSortBy: defaultSortBy, DefaultFilterBy: defaultFilterBy, + StateColors: GetDefaultStateColors(), MaximumNumberOfResults: storage.DefaultMaximumNumberOfResults, } } @@ -128,6 +142,20 @@ func (cfg *Config) ValidateAndSetDefaults() error { } else if cfg.DefaultFilterBy != "none" && cfg.DefaultFilterBy != "failing" && cfg.DefaultFilterBy != "unstable" { return ErrInvalidDefaultFilterBy } + if len(cfg.StateColors) == 0 { + cfg.StateColors = GetDefaultStateColors() + } else { + for _, color := range cfg.StateColors { + if err := color.Validate(); err != nil { + return err + } + } + for stateName, defaultColor := range GetDefaultStateColors() { + if _, exists := cfg.StateColors[stateName]; !exists { + cfg.StateColors[stateName] = defaultColor + } + } + } for _, btn := range cfg.Buttons { if err := btn.Validate(); err != nil { return err @@ -146,3 +174,22 @@ type ViewData struct { UI *Config Theme string } + +func (color Color) Validate() error { + if !IsValidColorHexCode(color) { + return ErrInvalidColorHexCode + } + return nil +} + +func IsValidColorHexCode(color Color) bool { + if len(color) != 7 || color[0] != '#' { + return false + } + for _, char := range color[1:] { + if (char < '0' || char > '9') && (char < 'A' || char > 'F') && (char < 'a' || char > 'f') { + return false + } + } + return true +} diff --git a/storage/store/sql/specific_postgres.go b/storage/store/sql/specific_postgres.go index b895564de..09e8f6f14 100644 --- a/storage/store/sql/specific_postgres.go +++ b/storage/store/sql/specific_postgres.go @@ -40,22 +40,26 @@ func (s *Store) createPostgresSchema() error { if err != nil { return err } + _, err = s.db.Exec(` CREATE TABLE IF NOT EXISTS endpoint_events ( endpoint_event_id BIGSERIAL PRIMARY KEY, endpoint_id BIGINT NOT NULL REFERENCES endpoints(endpoint_id) ON DELETE CASCADE, event_type TEXT NOT NULL, + event_state TEXT NOT NULL, event_timestamp TIMESTAMP NOT NULL ) `) if err != nil { return err } + _, err = s.db.Exec(` CREATE TABLE IF NOT EXISTS endpoint_results ( endpoint_result_id BIGSERIAL PRIMARY KEY, endpoint_id BIGINT NOT NULL REFERENCES endpoints(endpoint_id) ON DELETE CASCADE, success BOOLEAN NOT NULL, + state TEXT NOT NULL, errors TEXT NOT NULL, connected BOOLEAN NOT NULL, status BIGINT NOT NULL, @@ -116,6 +120,11 @@ func (s *Store) createPostgresSchema() error { `) // Silent table modifications TODO: Remove this in v6.0.0 _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD IF NOT EXISTS domain_expiration BIGINT NOT NULL DEFAULT 0`) + // Add new state columns + _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD IF NOT EXISTS state TEXT NOT NULL DEFAULT 'MIGRATION#1457'`) + _, _ = s.db.Exec(`ALTER TABLE endpoint_events ADD IF NOT EXISTS event_state TEXT NOT NULL DEFAULT 'MIGRATION#1457'`) + _, _ = s.db.Exec(`UPDATE endpoint_results SET state = CASE WHEN success = TRUE THEN 'healthy' ELSE 'unhealthy' END WHERE state = 'MIGRATION#1457'`) + _, _ = s.db.Exec(`UPDATE endpoint_events SET event_state = CASE WHEN event_type = 'HEALTHY' THEN 'healthy' WHEN event_type = 'UNHEALTHY' THEN 'unhealthy' ELSE event_state = 'undefined' END WHERE event_state = 'MIGRATION#1457'`) // Add suite_result_id to endpoint_results table for suite endpoint linkage _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD COLUMN IF NOT EXISTS suite_result_id BIGINT REFERENCES suite_results(suite_result_id) ON DELETE CASCADE`) // Create index for suite_result_id diff --git a/storage/store/sql/specific_sqlite.go b/storage/store/sql/specific_sqlite.go index fbb81d3cf..5b4948364 100644 --- a/storage/store/sql/specific_sqlite.go +++ b/storage/store/sql/specific_sqlite.go @@ -40,22 +40,26 @@ func (s *Store) createSQLiteSchema() error { if err != nil { return err } + _, err = s.db.Exec(` CREATE TABLE IF NOT EXISTS endpoint_events ( endpoint_event_id INTEGER PRIMARY KEY, endpoint_id INTEGER NOT NULL REFERENCES endpoints(endpoint_id) ON DELETE CASCADE, event_type TEXT NOT NULL, + event_state TEXT NOT NULL, event_timestamp TIMESTAMP NOT NULL ) `) if err != nil { return err } + _, err = s.db.Exec(` CREATE TABLE IF NOT EXISTS endpoint_results ( endpoint_result_id INTEGER PRIMARY KEY, endpoint_id INTEGER NOT NULL REFERENCES endpoints(endpoint_id) ON DELETE CASCADE, success INTEGER NOT NULL, + state TEXT NOT NULL, errors TEXT NOT NULL, connected INTEGER NOT NULL, status INTEGER NOT NULL, @@ -138,6 +142,12 @@ func (s *Store) createSQLiteSchema() error { } // Silent table modifications TODO: Remove this in v6.0.0 _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD domain_expiration INTEGER NOT NULL DEFAULT 0`) + // Add new state columns + _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD state TEXT NOT NULL DEFAULT 'MIGRATION#1457'`) + _, _ = s.db.Exec(`ALTER TABLE endpoint_events ADD event_state TEXT NOT NULL DEFAULT 'MIGRATION#1457'`) + // Replace unknown default values with healthy if success is 1 else unhealthy + _, _ = s.db.Exec(`UPDATE endpoint_results SET state = CASE WHEN success = 1 THEN 'healthy' ELSE 'unhealthy' END WHERE state = 'MIGRATION#1457'`) + _, _ = s.db.Exec(`UPDATE endpoint_events SET event_state = CASE WHEN event_type = 'HEALTHY' THEN 'healthy' WHEN event_type = 'UNHEALTHY' THEN 'unhealthy' ELSE '' END WHERE event_state = 'MIGRATION#1457'`) // Add suite_result_id to endpoint_results table for suite endpoint linkage _, _ = s.db.Exec(`ALTER TABLE endpoint_results ADD suite_result_id INTEGER REFERENCES suite_results(suite_result_id) ON DELETE CASCADE`) // Create index for suite_result_id diff --git a/storage/store/sql/sql.go b/storage/store/sql/sql.go index 32e2aff81..c46c47b96 100644 --- a/storage/store/sql/sql.go +++ b/storage/store/sql/sql.go @@ -287,8 +287,8 @@ func (s *Store) InsertEndpointResult(ep *endpoint.Endpoint, result *endpoint.Res } } else { // Get the success value of the previous result - var lastResultSuccess bool - if lastResultSuccess, err = s.getLastEndpointResultSuccessValue(tx, endpointID); err != nil { + var lastResultState string + if lastResultState, err = s.getLastEndpointResultStateValue(tx, endpointID); err != nil { // Silently fail logr.Errorf("[sql.InsertEndpointResult] Failed to retrieve outcome of previous result for endpoint with key=%s: %s", ep.Key(), err.Error()) } else { @@ -296,7 +296,7 @@ func (s *Store) InsertEndpointResult(ep *endpoint.Endpoint, result *endpoint.Res // If the final outcome (success or failure) of the previous and the new result aren't the same, it means // that the endpoint either went from Healthy to Unhealthy or Unhealthy -> Healthy, therefore, we'll add // an event to mark the change in state - if lastResultSuccess != result.Success { + if lastResultState != result.State { event := endpoint.NewEventFromResult(result) if err = s.insertEndpointEvent(tx, endpointID, event); err != nil { // Silently fail @@ -602,9 +602,10 @@ func (s *Store) insertEndpoint(tx *sql.Tx, ep *endpoint.Endpoint) (int64, error) // insertEndpointEvent inserts en event in the store func (s *Store) insertEndpointEvent(tx *sql.Tx, endpointID int64, event *endpoint.Event) error { _, err := tx.Exec( - "INSERT INTO endpoint_events (endpoint_id, event_type, event_timestamp) VALUES ($1, $2, $3)", + "INSERT INTO endpoint_events (endpoint_id, event_type, event_state, event_timestamp) VALUES ($1, $2, $3, $4)", endpointID, event.Type, + event.State, event.Timestamp.UTC(), ) if err != nil { @@ -623,12 +624,13 @@ func (s *Store) insertEndpointResultWithSuiteID(tx *sql.Tx, endpointID int64, re var endpointResultID int64 err := tx.QueryRow( ` - INSERT INTO endpoint_results (endpoint_id, success, errors, connected, status, dns_rcode, certificate_expiration, domain_expiration, hostname, ip, duration, timestamp, suite_result_id) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) + INSERT INTO endpoint_results (endpoint_id, success, state, errors, connected, status, dns_rcode, certificate_expiration, domain_expiration, hostname, ip, duration, timestamp, suite_result_id) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING endpoint_result_id `, endpointID, result.Success, + result.State, strings.Join(result.Errors, arraySeparator), result.Connected, result.HTTPStatus, @@ -763,9 +765,9 @@ func (s *Store) getEndpointEventsByEndpointID(tx *sql.Tx, endpointID int64, page // First, get the most recent events using a subquery, then order them chronologically rows, err := tx.Query( ` - SELECT event_type, event_timestamp + SELECT event_type, event_state, event_timestamp FROM ( - SELECT event_type, event_timestamp, endpoint_event_id + SELECT event_type, event_state, event_timestamp, endpoint_event_id FROM endpoint_events WHERE endpoint_id = $1 ORDER BY endpoint_event_id DESC @@ -782,7 +784,7 @@ func (s *Store) getEndpointEventsByEndpointID(tx *sql.Tx, endpointID int64, page } for rows.Next() { event := &endpoint.Event{} - _ = rows.Scan(&event.Type, &event.Timestamp) + _ = rows.Scan(&event.Type, &event.State, &event.Timestamp) events = append(events, event) } return @@ -791,7 +793,7 @@ func (s *Store) getEndpointEventsByEndpointID(tx *sql.Tx, endpointID int64, page func (s *Store) getEndpointResultsByEndpointID(tx *sql.Tx, endpointID int64, page, pageSize int) (results []*endpoint.Result, err error) { rows, err := tx.Query( ` - SELECT endpoint_result_id, success, errors, connected, status, dns_rcode, certificate_expiration, domain_expiration, hostname, ip, duration, timestamp + SELECT endpoint_result_id, success, state, errors, connected, status, dns_rcode, certificate_expiration, domain_expiration, hostname, ip, duration, timestamp FROM endpoint_results WHERE endpoint_id = $1 ORDER BY endpoint_result_id DESC -- Normally, we'd sort by timestamp, but sorting by endpoint_result_id is faster @@ -809,7 +811,7 @@ func (s *Store) getEndpointResultsByEndpointID(tx *sql.Tx, endpointID int64, pag result := &endpoint.Result{} var id int64 var joinedErrors string - err = rows.Scan(&id, &result.Success, &joinedErrors, &result.Connected, &result.HTTPStatus, &result.DNSRCode, &result.CertificateExpiration, &result.DomainExpiration, &result.Hostname, &result.IP, &result.Duration, &result.Timestamp) + err = rows.Scan(&id, &result.Success, &result.State, &joinedErrors, &result.Connected, &result.HTTPStatus, &result.DNSRCode, &result.CertificateExpiration, &result.DomainExpiration, &result.Hostname, &result.IP, &result.Duration, &result.Timestamp) if err != nil { logr.Errorf("[sql.getEndpointResultsByEndpointID] Silently failed to retrieve endpoint result for endpointID=%d: %s", endpointID, err.Error()) err = nil @@ -990,16 +992,16 @@ func (s *Store) getAgeOfOldestEndpointUptimeEntry(tx *sql.Tx, endpointID int64) return time.Since(time.Unix(oldestEndpointUptimeUnixTimestamp, 0)), nil } -func (s *Store) getLastEndpointResultSuccessValue(tx *sql.Tx, endpointID int64) (bool, error) { - var success bool - err := tx.QueryRow("SELECT success FROM endpoint_results WHERE endpoint_id = $1 ORDER BY endpoint_result_id DESC LIMIT 1", endpointID).Scan(&success) +func (s *Store) getLastEndpointResultStateValue(tx *sql.Tx, endpointID int64) (string, error) { + var state string + err := tx.QueryRow("SELECT state FROM endpoint_results WHERE endpoint_id = $1 ORDER BY endpoint_result_id DESC LIMIT 1", endpointID).Scan(&state) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return false, errNoRowsReturned + return "", errNoRowsReturned } - return false, err + return "", err } - return success, nil + return state, nil } // deleteOldEndpointEvents deletes endpoint events that are no longer needed diff --git a/storage/store/sql/sql_test.go b/storage/store/sql/sql_test.go index 9cbaf492b..7547bee1f 100644 --- a/storage/store/sql/sql_test.go +++ b/storage/store/sql/sql_test.go @@ -38,6 +38,7 @@ var ( Errors: nil, Connected: true, Success: true, + State: "healthy", Timestamp: now, Duration: 150 * time.Millisecond, CertificateExpiration: 10 * time.Hour, @@ -63,6 +64,7 @@ var ( Errors: []string{"error-1", "error-2"}, Connected: true, Success: false, + State: "unhealthy", Timestamp: now, Duration: 750 * time.Millisecond, CertificateExpiration: 10 * time.Hour, @@ -519,7 +521,7 @@ func TestStore_InvalidTransaction(t *testing.T) { if _, err := store.getAgeOfOldestEndpointUptimeEntry(tx, 1); err == nil { t.Error("should've returned an error, because the transaction was already committed") } - if _, err := store.getLastEndpointResultSuccessValue(tx, 1); err == nil { + if _, err := store.getLastEndpointResultStateValue(tx, 1); err == nil { t.Error("should've returned an error, because the transaction was already committed") } } @@ -529,7 +531,7 @@ func TestStore_NoRows(t *testing.T) { defer store.Close() tx, _ := store.db.Begin() defer tx.Rollback() - if _, err := store.getLastEndpointResultSuccessValue(tx, 1); !errors.Is(err, errNoRowsReturned) { + if _, err := store.getLastEndpointResultStateValue(tx, 1); !errors.Is(err, errNoRowsReturned) { t.Errorf("should've %v, got %v", errNoRowsReturned, err) } if _, err := store.getAgeOfOldestEndpointUptimeEntry(tx, 1); !errors.Is(err, errNoRowsReturned) { @@ -900,9 +902,14 @@ func TestEventOrderingFix(t *testing.T) { } // Create many events over time baseTime := time.Now().Add(-100 * time.Hour) // Start 100 hours ago - for i := 0; i < 50; i++ { + for i := range 50 { + state := "healthy" + if i%2 != 0 { + state = "unhealthy" + } result := &endpoint.Result{ Success: i%2 == 0, // Alternate between true/false to create events + State: state, Timestamp: baseTime.Add(time.Duration(i) * time.Hour), } err := store.InsertEndpointResult(ep, result) diff --git a/storage/store/store_test.go b/storage/store/store_test.go index 42cdc5ddf..6dafa06ef 100644 --- a/storage/store/store_test.go +++ b/storage/store/store_test.go @@ -36,6 +36,7 @@ var ( testSuccessfulResult = endpoint.Result{ Timestamp: now, Success: true, + State: "healthy", Hostname: "example.org", IP: "127.0.0.1", HTTPStatus: 200, @@ -61,6 +62,7 @@ var ( testUnsuccessfulResult = endpoint.Result{ Timestamp: now, Success: false, + State: "unhealthy", Hostname: "example.org", IP: "127.0.0.1", HTTPStatus: 200, diff --git a/watchdog/endpoint.go b/watchdog/endpoint.go index 9c89bafae..4cd133340 100644 --- a/watchdog/endpoint.go +++ b/watchdog/endpoint.go @@ -2,15 +2,25 @@ package watchdog import ( "context" + "fmt" "time" "github.com/TwiN/gatus/v5/config" "github.com/TwiN/gatus/v5/config/endpoint" + "github.com/TwiN/gatus/v5/config/state" "github.com/TwiN/gatus/v5/metrics" "github.com/TwiN/gatus/v5/storage/store" "github.com/TwiN/logr" ) +type maintenanceStatus int + +const ( + noMaintenance maintenanceStatus = iota + endpointMaintenance + globalMaintenance +) + // monitorEndpoint a single endpoint in a loop func monitorEndpoint(ep *endpoint.Endpoint, cfg *config.Config, extraLabels []string, ctx context.Context) { // Run it immediately on start @@ -47,6 +57,11 @@ func executeEndpoint(ep *endpoint.Endpoint, cfg *config.Config, extraLabels []st } logr.Debugf("[watchdog.executeEndpoint] Monitoring group=%s; endpoint=%s; key=%s", ep.Group, ep.Name, ep.Key()) result := ep.EvaluateHealth() + maintenanceState := GetMaintenanceStatus(ep, cfg) + if maintenanceState != noMaintenance && !result.Success { + result.State = state.DefaultMaintenanceStateName + } + // TODO#227 Evaluate result.Success based on set states' healthiness configuration once that config option is implemented if cfg.Metrics { metrics.PublishMetricsForEndpoint(ep, result, extraLabels) } @@ -56,19 +71,35 @@ func executeEndpoint(ep *endpoint.Endpoint, cfg *config.Config, extraLabels []st } else { logr.Infof("[watchdog.executeEndpoint] Monitored group=%s; endpoint=%s; key=%s; success=%v; errors=%d; duration=%s", ep.Group, ep.Name, ep.Key(), result.Success, len(result.Errors), result.Duration.Round(time.Millisecond)) } - inEndpointMaintenanceWindow := false + if maintenanceState == noMaintenance { + HandleAlerting(ep, result, cfg.Alerting) + } else { + logr.Debug(fmt.Sprintf("[watchdog.executeEndpoint] Not handling alerting because currently in %s maintenance window", GetMaintenanceStatusName(maintenanceState))) // TODO#227 Not sure if fmt.Sprintf is a good idea here since is not used elsewhere + } + logr.Debugf("[watchdog.executeEndpoint] Waiting for interval=%s before monitoring group=%s endpoint=%s (key=%s) again", ep.Interval, ep.Group, ep.Name, ep.Key()) +} + +func GetMaintenanceStatus(ep *endpoint.Endpoint, cfg *config.Config) maintenanceStatus { + if cfg.Maintenance.IsUnderMaintenance() { + return globalMaintenance + } for _, maintenanceWindow := range ep.MaintenanceWindows { if maintenanceWindow.IsUnderMaintenance() { - logr.Debug("[watchdog.executeEndpoint] Under endpoint maintenance window") - inEndpointMaintenanceWindow = true + return endpointMaintenance } } - if !cfg.Maintenance.IsUnderMaintenance() && !inEndpointMaintenanceWindow { - HandleAlerting(ep, result, cfg.Alerting) - } else { - logr.Debug("[watchdog.executeEndpoint] Not handling alerting because currently in the maintenance window") + return noMaintenance +} + +func GetMaintenanceStatusName(status maintenanceStatus) string { + switch status { + case globalMaintenance: + return "global" + case endpointMaintenance: + return "endpoint" + default: + return "no" } - logr.Debugf("[watchdog.executeEndpoint] Waiting for interval=%s before monitoring group=%s endpoint=%s (key=%s) again", ep.Interval, ep.Group, ep.Name, ep.Key()) } // UpdateEndpointStatus persists the endpoint result in the storage diff --git a/web/app/public/index.html b/web/app/public/index.html index 292029a99..cb5492278 100644 --- a/web/app/public/index.html +++ b/web/app/public/index.html @@ -2,10 +2,39 @@ + {{ .UI.Title }} - {{ .UI.Title }} diff --git a/web/app/src/App.vue b/web/app/src/App.vue index 1a63c8721..8a9456136 100644 --- a/web/app/src/App.vue +++ b/web/app/src/App.vue @@ -175,21 +175,13 @@ const tooltipIsPersistent = ref(false) let configInterval = null // Computed properties -const logo = computed(() => { - return window.config && window.config.logo && window.config.logo !== '{{ .UI.Logo }}' ? window.config.logo : "" -}) +const logo = computed(() => window.config?.logo ?? "") -const header = computed(() => { - return window.config && window.config.header && window.config.header !== '{{ .UI.Header }}' ? window.config.header : "Gatus" -}) +const header = computed(() => window.config?.header ?? "Gatus") -const link = computed(() => { - return window.config && window.config.link && window.config.link !== '{{ .UI.Link }}' ? window.config.link : null -}) +const link = computed(() => window.config?.link ?? null) -const buttons = computed(() => { - return window.config && window.config.buttons ? window.config.buttons : [] -}) +const buttons = computed(() => window.config?.buttons ?? []) // Methods const fetchConfig = async () => { diff --git a/web/app/src/components/EndpointCard.vue b/web/app/src/components/EndpointCard.vue index 62b91e2db..746cff6a0 100644 --- a/web/app/src/components/EndpointCard.vue +++ b/web/app/src/components/EndpointCard.vue @@ -39,14 +39,10 @@ :key="index" :class="[ 'flex-1 h-6 sm:h-8 rounded-sm transition-all', - result ? 'cursor-pointer' : '', - result ? ( - result.success - ? (selectedResultIndex === index ? 'bg-green-700' : 'bg-green-500 hover:bg-green-700') - : (selectedResultIndex === index ? 'bg-red-700' : 'bg-red-500 hover:bg-red-700') - ) : 'bg-gray-200 dark:bg-gray-700' + result ? 'cursor-pointer' : '' ]" - @mouseenter="result && handleMouseEnter(result, $event)" + :style="`background-color: ${getResultColor(result)}; filter: ${isHighlighted(index) ? 'brightness(75%)' : 'none'}`" + @mouseenter="result && handleMouseEnter(result, $event, index)" @mouseleave="result && handleMouseLeave(result, $event)" @click.stop="result && handleClick(result, $event, index)" /> @@ -67,6 +63,7 @@ import { useRouter } from 'vue-router' import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card' import StatusBadge from '@/components/StatusBadge.vue' import { generatePrettyTimeAgo } from '@/utils/time' +import { getResultColor } from '@/utils/color' const router = useRouter() @@ -90,6 +87,8 @@ const emit = defineEmits(['showTooltip']) // Track selected data point const selectedResultIndex = ref(null) +const lastHoverIndex = ref(null) + const latestResult = computed(() => { if (!props.endpoint.results || props.endpoint.results.length === 0) { return null @@ -98,8 +97,8 @@ const latestResult = computed(() => { }) const currentStatus = computed(() => { - if (!latestResult.value) return 'unknown' - return latestResult.value.success ? 'healthy' : 'unhealthy' + if (!latestResult.value) return null + return latestResult.value.state ?? (latestResult.value.success ? 'healthy' : 'unhealthy') }) const hostname = computed(() => { @@ -162,15 +161,21 @@ const newestResultTime = computed(() => { return generatePrettyTimeAgo(props.endpoint.results[props.endpoint.results.length - 1].timestamp) }) +const isHighlighted = (index) => { + return selectedResultIndex.value === index || lastHoverIndex.value === index +} + const navigateToDetails = () => { router.push(`/endpoints/${props.endpoint.key}`) } -const handleMouseEnter = (result, event) => { +const handleMouseEnter = (result, event, index) => { + lastHoverIndex.value = index emit('showTooltip', result, event, 'hover') } const handleMouseLeave = (result, event) => { + lastHoverIndex.value = null emit('showTooltip', null, event, 'hover') } diff --git a/web/app/src/components/ResponseTimeChart.vue b/web/app/src/components/ResponseTimeChart.vue index fd8680698..26303ba98 100644 --- a/web/app/src/components/ResponseTimeChart.vue +++ b/web/app/src/components/ResponseTimeChart.vue @@ -17,6 +17,7 @@ import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement import annotationPlugin from 'chartjs-plugin-annotation' import 'chartjs-adapter-date-fns' import { generatePrettyTimeDifference } from '@/utils/time' +import { getStateColor } from '@/utils/color' import Loading from './Loading.vue' ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend, Filler, TimeScale, annotationPlugin) @@ -48,10 +49,8 @@ const values = ref([]) const isDark = ref(document.documentElement.classList.contains('dark')) const hoveredEventIndex = ref(null) -// Helper function to get color for unhealthy events -const getEventColor = () => { - // Only UNHEALTHY events are displayed on the chart - return 'rgba(239, 68, 68, 0.8)' // Red +const getEventColor = (state) => { + return getStateColor(state) + 'CC' // Append 'CC' for 80% opacity } // Filter events based on selected duration and calculate durations @@ -76,8 +75,8 @@ const filteredEvents = computed(() => { return [] } - // Only include UNHEALTHY events and calculate their duration - const unhealthyEvents = [] + // Only include non healthy events and calculate their duration + const nonHealthyEvents = [] for (let i = 0; i < props.events.length; i++) { const event = props.events[i] if (event.type !== 'UNHEALTHY') continue @@ -97,14 +96,14 @@ const filteredEvents = computed(() => { isOngoing = true } - unhealthyEvents.push({ + nonHealthyEvents.push({ ...event, duration, isOngoing }) } - return unhealthyEvents + return nonHealthyEvents }) const chartData = computed(() => { @@ -196,7 +195,7 @@ const chartOptions = computed(() => { type: 'line', xMin: new Date(event.timestamp), xMax: new Date(event.timestamp), - borderColor: getEventColor(), + borderColor: getEventColor(event.state), borderWidth: 1, borderDash: [5, 5], enter() { @@ -207,8 +206,8 @@ const chartOptions = computed(() => { }, label: { display: () => hoveredEventIndex.value === index, - content: [event.isOngoing ? `Status: ONGOING` : `Status: RESOLVED`, `Unhealthy for ${event.duration}`, `Started at ${new Date(event.timestamp).toLocaleString()}`], - backgroundColor: getEventColor(), + content: [event.isOngoing ? `Status: ONGOING` : `Status: RESOLVED`, `In state ${event.state} for ${event.duration}`, `Started at ${new Date(event.timestamp).toLocaleString()}`], + backgroundColor: getEventColor(event.state), color: '#ffffff', font: { size: 11 diff --git a/web/app/src/components/StatusBadge.vue b/web/app/src/components/StatusBadge.vue index 6ed473817..171409c64 100644 --- a/web/app/src/components/StatusBadge.vue +++ b/web/app/src/components/StatusBadge.vue @@ -1,58 +1,31 @@ \ No newline at end of file diff --git a/web/app/src/components/SuiteCard.vue b/web/app/src/components/SuiteCard.vue index 7fbabd2a9..464f6c647 100644 --- a/web/app/src/components/SuiteCard.vue +++ b/web/app/src/components/SuiteCard.vue @@ -40,13 +40,9 @@ :class="[ 'flex-1 h-6 sm:h-8 rounded-sm transition-all', result ? 'cursor-pointer' : '', - result ? ( - result.success - ? (selectedResultIndex === index ? 'bg-green-700' : 'bg-green-500 hover:bg-green-700') - : (selectedResultIndex === index ? 'bg-red-700' : 'bg-red-500 hover:bg-red-700') - ) : 'bg-gray-200 dark:bg-gray-700' ]" - @mouseenter="result && handleMouseEnter(result, $event)" + :style="`background-color: ${getSuiteResultColor(result)}; filter: ${isHighlighted(index) ? 'brightness(75%)' : 'none'}`" + @mouseenter="result && handleMouseEnter(result, $event, index)" @mouseleave="result && handleMouseLeave(result, $event)" @click.stop="result && handleClick(result, $event, index)" /> @@ -67,6 +63,7 @@ import { useRouter } from 'vue-router' import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card' import StatusBadge from '@/components/StatusBadge.vue' import { generatePrettyTimeAgo } from '@/utils/time' +import { getResultColor } from '@/utils/color' const router = useRouter() @@ -86,6 +83,8 @@ const emit = defineEmits(['showTooltip']) // Track selected data point const selectedResultIndex = ref(null) +const lastHoverIndex = ref(null) + // Computed properties const displayResults = computed(() => { const results = [...(props.suite.results || [])] @@ -97,7 +96,7 @@ const displayResults = computed(() => { const currentStatus = computed(() => { if (!props.suite.results || props.suite.results.length === 0) { - return 'unknown' + return null } return props.suite.results[props.suite.results.length - 1].success ? 'healthy' : 'unhealthy' }) @@ -148,15 +147,21 @@ const newestResultTime = computed(() => { }) // Methods +const isHighlighted = (index) => { + return selectedResultIndex.value === index || lastHoverIndex.value === index +} + const navigateToDetails = () => { router.push(`/suites/${props.suite.key}`) } -const handleMouseEnter = (result, event) => { +const handleMouseEnter = (result, event, index) => { + lastHoverIndex.value = index emit('showTooltip', result, event, 'hover') } const handleMouseLeave = (result, event) => { + lastHoverIndex.value = null emit('showTooltip', null, event, 'hover') } @@ -173,6 +178,13 @@ const handleClick = (result, event, index) => { } } +const getSuiteResultColor = (result) => { + if (result && !result.state) { + result.state = result.success ? 'healthy' : 'unhealthy' + } + return getResultColor(result); +} + // Listen for clear selection event const handleClearSelection = () => { selectedResultIndex.value = null diff --git a/web/app/src/components/ui/badge/Badge.vue b/web/app/src/components/ui/badge/Badge.vue deleted file mode 100644 index d7835170f..000000000 --- a/web/app/src/components/ui/badge/Badge.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - \ No newline at end of file diff --git a/web/app/src/components/ui/badge/index.js b/web/app/src/components/ui/badge/index.js deleted file mode 100644 index 738ab441f..000000000 --- a/web/app/src/components/ui/badge/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default as Badge } from './Badge.vue' \ No newline at end of file diff --git a/web/app/src/utils/color.js b/web/app/src/utils/color.js new file mode 100644 index 000000000..ecc17bef0 --- /dev/null +++ b/web/app/src/utils/color.js @@ -0,0 +1,23 @@ +/** + * Get the color associated with a given result and its state. + * If the result is null or undefined, return the 'nodata' color. + * Otherwise, return the color corresponding to the state's value. + * + * @param {Object} result - The result object containing state information. + * @returns {string} - The color associated with the result's state. + */ +export const getResultColor = (result) => { + if (!result) return window.config?.localStateColors.unkown + return getStateColor(result.state) +} + +/** + * Get the color associated with a given state. + * If the state is not found in the configuration, return the 'unknown' color. + * + * @param {string} state - The state for which to get the color. + * @returns {string} - The color associated with the given state. + */ +export const getStateColor = (state) => { + return window.config?.stateColors[state] ?? window.config?.localStateColors.invalid +} \ No newline at end of file diff --git a/web/app/src/views/EndpointDetails.vue b/web/app/src/views/EndpointDetails.vue index dae4ab35e..6ca443c66 100644 --- a/web/app/src/views/EndpointDetails.vue +++ b/web/app/src/views/EndpointDetails.vue @@ -176,8 +176,9 @@
- - + + +
@@ -203,7 +204,7 @@ {{ .UI.Title }}
\ No newline at end of file + })();
\ No newline at end of file diff --git a/web/static/js/app.js b/web/static/js/app.js index 8899220aa..470d41e79 100644 --- a/web/static/js/app.js +++ b/web/static/js/app.js @@ -1 +1 @@ -(function(){"use strict";var e={434:function(e,t,s){var a=s(963),l=s(252),n=s(577),r=s(262),o=s.p+"img/logo.svg",i=s(201),u=s(507),d=s(970),c=s(135),g=s(3),m=s(512),p=s(388);function v(...e){return(0,p.m6)((0,m.W)(e))}const f=["disabled"];var w={__name:"Button",props:{variant:{type:String,default:"default"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1}},setup(e){const t=(0,g.j)("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"}});return(s,a)=>((0,l.wg)(),(0,l.iD)("button",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant,size:e.size}),s.$attrs.class??"")),disabled:e.disabled},[(0,l.WI)(s.$slots,"default")],10,f))}};const h=w;var x=h,b={__name:"Card",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("rounded-lg border bg-card text-card-foreground shadow-sm",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const y=b;var k=y,_={__name:"CardHeader",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("flex flex-col space-y-1.5 p-6",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const S=_;var D=S,U={__name:"CardTitle",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("h3",{class:(0,n.C_)((0,r.SU)(v)("text-2xl font-semibold leading-none tracking-tight",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const C=U;var z=C,W={__name:"CardContent",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("p-6 pt-0",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const H=W;var j=H;const R={id:"social"};function F(e,t){return(0,l.wg)(),(0,l.iD)("div",R,t[0]||(t[0]=[(0,l._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,l._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,l._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)]))}var T=s(744);const E={},q=(0,T.Z)(E,[["render",F],["__scopeId","data-v-788af9ce"]]);var $=q;const L=e=>{let t=(new Date).getTime()-new Date(e).getTime();if(t<500)return"now";if(t>2592e5){let e=(t/864e5).toFixed(0);return e+" day"+("1"!==e?"s":"")+" ago"}if(t>36e5){let e=(t/36e5).toFixed(0);return e+" hour"+("1"!==e?"s":"")+" ago"}if(t>6e4){let e=(t/6e4).toFixed(0);return e+" minute"+("1"!==e?"s":"")+" ago"}let s=(t/1e3).toFixed(0);return s+" second"+("1"!==s?"s":"")+" ago"},Z=(e,t)=>{const s=new Date(e)-new Date(t),a=Math.floor(s/1e3),l=Math.floor(a/60),n=Math.floor(l/60);if(n>0){const e=l%60,t=n+(1===n?" hour":" hours");return e>0?t+" "+e+(1===e?" minute":" minutes"):t}if(l>0){const e=a%60,t=l+(1===l?" minute":" minutes");return e>0?t+" "+e+(1===e?" second":" seconds"):t}return a+(1===a?" second":" seconds")},M=e=>{let t=new Date(e),s=t.getFullYear(),a=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),l=(t.getDate()<10?"0":"")+t.getDate(),n=(t.getHours()<10?"0":"")+t.getHours(),r=(t.getMinutes()<10?"0":"")+t.getMinutes(),o=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+a+"-"+l+" "+n+":"+r+":"+o},A={key:0,class:"space-y-2"},N={key:0,class:"flex items-center gap-2"},Y={class:"text-xs font-semibold"},I={class:"font-mono text-xs"},O={key:1},P={class:"font-mono text-xs"},K={key:0,class:"mt-1 space-y-0.5"},V={class:"truncate"},B={class:"text-muted-foreground"},G={key:0,class:"text-xs text-muted-foreground"},J={class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},X={class:"font-mono text-xs"},Q={key:2},ee={class:"font-mono text-xs space-y-0.5"},te={class:"break-all"},se={key:3},ae={class:"font-mono text-xs space-y-0.5"};var le={__name:"Tooltip",props:{event:{type:[Event,Object],default:null},result:{type:Object,default:null},isPersistent:{type:Boolean,default:!1}},setup(e){const t=(0,i.yj)(),s=e,a=(0,r.iH)(!0),o=(0,r.iH)(0),u=(0,r.iH)(0),d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,l.Fl)((()=>s.result&&void 0!==s.result.endpointResults)),m=(0,l.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.length:0)),p=(0,l.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.filter((e=>e.success)).length:0)),v=async()=>{if(!c.value||!d.value||a.value)return;await(0,l.Y3)();const e=c.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft;let r=e.bottom+s+8,i=e.left+n;const g=window.innerHeight-e.bottom,m=e.top;gt.height+20?e.top+s-t.height-8:m>g?s+10:s+window.innerHeight-t.height-10);const p=window.innerWidth-e.left;p{if(s.event&&s.event.type)if(await(0,l.Y3)(),"mouseenter"!==s.event.type&&"click"!==s.event.type||!d.value)"mouseleave"===s.event.type&&(s.isPersistent||(a.value=!0,c.value=null));else{const e=s.event.target;c.value=e,a.value=!1,await(0,l.Y3)(),await v()}},w=()=>{v()};return(0,l.bv)((()=>{window.addEventListener("resize",w)})),(0,l.Ah)((()=>{window.removeEventListener("resize",w)})),(0,l.YP)((()=>s.event),(e=>{e&&e.type&&("mouseenter"===e.type||"click"===e.type?(a.value=!1,(0,l.Y3)((()=>f()))):"mouseleave"===e.type&&(s.isPersistent||(a.value=!0)))}),{immediate:!0}),(0,l.YP)((()=>s.result),(()=>{a.value||(0,l.Y3)((()=>f()))})),(0,l.YP)((()=>[s.isPersistent,s.result]),(([e,t])=>{e||t?t&&(e||"mouseenter"===s.event?.type)&&(a.value=!1,(0,l.Y3)((()=>f()))):a.value=!0})),(0,l.YP)((()=>t.path),(()=>{a.value=!0,c.value=null})),(t,s)=>((0,l.wg)(),(0,l.iD)("div",{id:"tooltip",ref_key:"tooltip",ref:d,class:(0,n.C_)(["absolute z-50 px-3 py-2 text-sm rounded-md shadow-lg border transition-all duration-200","bg-popover text-popover-foreground border-border",a.value?"invisible opacity-0":"visible opacity-100"]),style:(0,n.j5)(`top: ${o.value}px; left: ${u.value}px;`)},[e.result?((0,l.wg)(),(0,l.iD)("div",A,[g.value?((0,l.wg)(),(0,l.iD)("div",N,[(0,l._)("span",{class:(0,n.C_)(["inline-block w-2 h-2 rounded-full",e.result.success?"bg-green-500":"bg-red-500"])},null,2),(0,l._)("span",Y,(0,n.zw)(e.result.success?"Suite Passed":"Suite Failed"),1)])):(0,l.kq)("",!0),(0,l._)("div",null,[s[0]||(s[0]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Timestamp",-1)),(0,l._)("div",I,(0,n.zw)((0,r.SU)(M)(e.result.timestamp)),1)]),g.value&&e.result.endpointResults?((0,l.wg)(),(0,l.iD)("div",O,[s[1]||(s[1]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Endpoints",-1)),(0,l._)("div",P,[(0,l._)("span",{class:(0,n.C_)(p.value===m.value?"text-green-500":"text-yellow-500")},(0,n.zw)(p.value)+"/"+(0,n.zw)(m.value)+" passed ",3)]),e.result.endpointResults.length>0?((0,l.wg)(),(0,l.iD)("div",K,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.endpointResults.slice(0,5),((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"flex items-center gap-1 text-xs"},[(0,l._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,l._)("span",V,(0,n.zw)(e.name),1),(0,l._)("span",B,"("+(0,n.zw)(Math.trunc(e.duration/1e6))+"ms)",1)])))),128)),e.result.endpointResults.length>5?((0,l.wg)(),(0,l.iD)("div",G," ... and "+(0,n.zw)(e.result.endpointResults.length-5)+" more ",1)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("div",J,(0,n.zw)(g.value?"Total Duration":"Response Time"),1),(0,l._)("div",X,(0,n.zw)(Math.trunc(e.result.duration/1e6))+"ms ",1)]),!g.value&&e.result.conditionResults&&e.result.conditionResults.length?((0,l.wg)(),(0,l.iD)("div",Q,[s[2]||(s[2]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Conditions",-1)),(0,l._)("div",ee,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.conditionResults,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"flex items-start gap-1"},[(0,l._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,l._)("span",te,(0,n.zw)(e.condition),1)])))),128))])])):(0,l.kq)("",!0),e.result.errors&&e.result.errors.length?((0,l.wg)(),(0,l.iD)("div",se,[s[3]||(s[3]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Errors",-1)),(0,l._)("div",ae,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"text-red-500"}," • "+(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)],6))}};const ne=le;var re=ne;const oe={class:"flex justify-center items-center"};var ie={__name:"Loading",props:{size:{type:String,default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)}},setup(e){const t=e,s=(0,l.Fl)((()=>{const e={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"};return e[t.size]||e.md}));return(e,t)=>((0,l.wg)(),(0,l.iD)("div",oe,[(0,l._)("img",{class:(0,n.C_)(["animate-spin rounded-full opacity-60 grayscale",s.value]),src:o,alt:"Gatus logo"},null,2)]))}};const ue=ie;var de=ue;const ce={id:"global",class:"bg-background text-foreground"},ge={key:0,class:"flex items-center justify-center min-h-screen"},me={key:1,class:"relative"},pe={class:"border-b bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/60"},ve={class:"container mx-auto px-4 py-4 max-w-7xl"},fe={class:"flex items-center justify-between"},we={class:"flex items-center gap-4"},he={class:"w-12 h-12 flex items-center justify-center"},xe=["src"],be={key:1,src:o,alt:"Gatus",class:"w-full h-full object-contain"},ye={class:"text-2xl font-bold tracking-tight"},ke={key:0,class:"text-sm text-muted-foreground"},_e={class:"flex items-center gap-2"},Se={key:0,class:"hidden md:flex items-center gap-1"},De=["href"],Ue={key:0,class:"md:hidden mt-4 pt-4 border-t space-y-1"},Ce=["href"],ze={class:"relative"},We={class:"border-t mt-auto"},He={class:"container mx-auto px-4 py-6 max-w-7xl"},je={class:"flex flex-col items-center gap-4"},Re={key:2,id:"login-container",class:"flex items-center justify-center min-h-screen p-4"},Fe={key:0,class:"mb-6"},Te={class:"p-3 rounded-md bg-destructive/10 border border-destructive/20"},Ee={class:"text-sm text-destructive text-center"},qe={key:0},$e={key:1};var Le={__name:"App",setup(e){const t=(0,i.yj)(),s=(0,r.iH)(!1),a=(0,r.iH)({oidc:!1,authenticated:!0}),g=(0,r.iH)([]),m=(0,r.iH)({}),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!1);let w=null;const h=(0,l.Fl)((()=>window.config&&window.config.logo&&"{{ .UI.Logo }}"!==window.config.logo?window.config.logo:"")),b=(0,l.Fl)((()=>window.config&&window.config.header&&"{{ .UI.Header }}"!==window.config.header?window.config.header:"Gatus")),y=(0,l.Fl)((()=>window.config&&window.config.link&&"{{ .UI.Link }}"!==window.config.link?window.config.link:null)),_=(0,l.Fl)((()=>window.config&&window.config.buttons?window.config.buttons:[])),S=async()=>{try{const e=await fetch("/api/v1/config",{credentials:"include"});if(200===e.status){const t=await e.json();a.value=t,g.value=t.announcements||[]}s.value=!0}catch(e){console.error("Failed to fetch config:",e),s.value=!0}},U=(e,t,s="hover")=>{"click"===s?e?(m.value={result:e,event:t},f.value=!0):(m.value={},f.value=!1):"hover"===s&&(f.value||(m.value={result:e,event:t}))},C=e=>{if(f.value){const t=document.getElementById("tooltip"),s=e.target.closest(".flex-1.h-6, .flex-1.h-8");!t||t.contains(e.target)||s||(m.value={},f.value=!1,window.dispatchEvent(new CustomEvent("clear-data-point-selection")))}};return(0,l.bv)((()=>{S(),w=setInterval(S,6e5),document.addEventListener("click",C)})),(0,l.Ah)((()=>{w&&(clearInterval(w),w=null),document.removeEventListener("click",C)})),(e,i)=>{const w=(0,l.up)("router-view");return(0,l.wg)(),(0,l.iD)("div",ce,[s.value?a.value&&a.value.oidc&&!a.value.authenticated?((0,l.wg)(),(0,l.iD)("div",Re,[(0,l.Wm)((0,r.SU)(k),{class:"w-full max-w-md"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"text-center"},{default:(0,l.w5)((()=>[i[5]||(i[5]=(0,l._)("img",{src:o,alt:"Gatus",class:"w-20 h-20 mx-auto mb-4"},null,-1)),(0,l.Wm)((0,r.SU)(z),{class:"text-3xl"},{default:(0,l.w5)((()=>i[4]||(i[4]=[(0,l.Uk)("Gatus",-1)]))),_:1,__:[4]}),i[6]||(i[6]=(0,l._)("p",{class:"text-muted-foreground mt-2"},"System Monitoring Dashboard",-1))])),_:1,__:[5,6]}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,r.SU)(t)&&(0,r.SU)(t).query.error?((0,l.wg)(),(0,l.iD)("div",Fe,[(0,l._)("div",Te,[(0,l._)("p",Ee,["access_denied"===(0,r.SU)(t).query.error?((0,l.wg)(),(0,l.iD)("span",qe," You do not have access to this status page ")):((0,l.wg)(),(0,l.iD)("span",$e,(0,n.zw)((0,r.SU)(t).query.error),1))])])])):(0,l.kq)("",!0),(0,l._)("a",{href:"/oidc/login",class:"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 bg-primary text-primary-foreground hover:bg-primary/90 h-11 px-8 w-full",onClick:i[2]||(i[2]=e=>v.value=!0)},[v.value?((0,l.wg)(),(0,l.j4)(de,{key:0,size:"xs"})):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Wm)((0,r.SU)(c.Z),{class:"mr-2 h-4 w-4"}),i[7]||(i[7]=(0,l.Uk)(" Login with OIDC ",-1))],64))])])),_:1})])),_:1})])):((0,l.wg)(),(0,l.iD)("div",me,[(0,l._)("header",pe,[(0,l._)("div",ve,[(0,l._)("div",fe,[(0,l._)("div",we,[((0,l.wg)(),(0,l.j4)((0,l.LL)(y.value?"a":"div"),{href:y.value,target:"_blank",class:"flex items-center gap-3 hover:opacity-80 transition-opacity"},{default:(0,l.w5)((()=>[(0,l._)("div",he,[h.value?((0,l.wg)(),(0,l.iD)("img",{key:0,src:h.value,alt:"Gatus",class:"w-full h-full object-contain"},null,8,xe)):((0,l.wg)(),(0,l.iD)("img",be))]),(0,l._)("div",null,[(0,l._)("h1",ye,(0,n.zw)(b.value),1),_.value&&_.value.length?((0,l.wg)(),(0,l.iD)("p",ke," System Monitoring Dashboard ")):(0,l.kq)("",!0)])])),_:1},8,["href"]))]),(0,l._)("div",_e,[_.value&&_.value.length?((0,l.wg)(),(0,l.iD)("nav",Se,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(_.value,(e=>((0,l.wg)(),(0,l.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors"},(0,n.zw)(e.name),9,De)))),128))])):(0,l.kq)("",!0),_.value&&_.value.length?((0,l.wg)(),(0,l.j4)((0,r.SU)(x),{key:1,variant:"ghost",size:"icon",class:"md:hidden",onClick:i[0]||(i[0]=e=>p.value=!p.value)},{default:(0,l.w5)((()=>[p.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(d.Z),{key:1,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(u.Z),{key:0,class:"h-5 w-5"}))])),_:1})):(0,l.kq)("",!0)])]),_.value&&_.value.length&&p.value?((0,l.wg)(),(0,l.iD)("nav",Ue,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(_.value,(e=>((0,l.wg)(),(0,l.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"block px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",onClick:i[1]||(i[1]=e=>p.value=!1)},(0,n.zw)(e.name),9,Ce)))),128))])):(0,l.kq)("",!0)])]),(0,l._)("main",ze,[(0,l.Wm)(w,{onShowTooltip:U,announcements:g.value},null,8,["announcements"])]),(0,l._)("footer",We,[(0,l._)("div",He,[(0,l._)("div",je,[i[3]||(i[3]=(0,l._)("div",{class:"text-sm text-muted-foreground text-center"},[(0,l.Uk)(" Powered by "),(0,l._)("a",{href:"https://gatus.io",target:"_blank",class:"font-medium text-emerald-800 hover:text-emerald-600"},"Gatus")],-1)),(0,l.Wm)($)])])])])):((0,l.wg)(),(0,l.iD)("div",ge,[(0,l.Wm)(de,{size:"lg"})])),(0,l.Wm)(re,{result:m.value.result,event:m.value.event,isPersistent:f.value},null,8,["result","event","isPersistent"])])}}};const Ze=Le;var Me=Ze,Ae=s(793),Ne=s(138),Ye=s(254),Ie=s(146),Oe=s(485),Pe=s(893),Ke=s(89),Ve=s(372),Be=s(981),Ge={__name:"Badge",props:{variant:{type:String,default:"default"}},setup(e){const t=(0,g.j)("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 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",success:"border-transparent bg-green-500 text-white",warning:"border-transparent bg-yellow-500 text-white"}},defaultVariants:{variant:"default"}});return(s,a)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant}),s.$attrs.class??""))},[(0,l.WI)(s.$slots,"default")],2))}};const Je=Ge;var Xe=Je,Qe={__name:"StatusBadge",props:{status:{type:String,required:!0,validator:e=>["healthy","unhealthy","degraded","unknown"].includes(e)}},setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"success";case"unhealthy":return"destructive";case"degraded":return"warning";default:return"secondary"}})),a=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"Healthy";case"unhealthy":return"Unhealthy";case"degraded":return"Degraded";default:return"Unknown"}})),o=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"bg-green-400";case"unhealthy":return"bg-red-400";case"degraded":return"bg-yellow-400";default:return"bg-gray-400"}}));return(e,t)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(Xe),{variant:s.value,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:(0,n.C_)(["w-2 h-2 rounded-full",o.value])},null,2),(0,l.Uk)(" "+(0,n.zw)(a.value),1)])),_:1},8,["variant"]))}};const et=Qe;var tt=et;const st={class:"flex items-start justify-between gap-2 sm:gap-3"},at={class:"flex-1 min-w-0 overflow-hidden"},lt=["title","aria-label"],nt={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground min-h-[1.25rem]"},rt=["title"],ot={key:1},it=["title"],ut={class:"flex-shrink-0 ml-2"},dt={class:"space-y-2"},ct={class:"flex items-center justify-between mb-1"},gt=["title"],mt={class:"flex gap-0.5"},pt=["onMouseenter","onMouseleave","onClick"],vt={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var ft={__name:"EndpointCard",props:{endpoint:{type:Object,required:!0},maxResults:{type:Number,default:50},showAverageResponseTime:{type:Boolean,default:!0}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=e,u=t,d=(0,r.iH)(null),c=(0,l.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?o.endpoint.results[o.endpoint.results.length-1]:null)),g=(0,l.Fl)((()=>c.value?c.value.success?"healthy":"unhealthy":"unknown")),m=(0,l.Fl)((()=>c.value?.hostname||null)),p=(0,l.Fl)((()=>{const e=[...o.endpoint.results||[]];while(e.length{if(!o.endpoint.results||0===o.endpoint.results.length)return"N/A";let e=0,t=0,s=1/0,a=0;for(const l of o.endpoint.results)if(l.duration){const n=l.duration/1e6;e+=n,t++,s=Math.min(s,n),a=Math.max(a,n)}if(0===t)return"N/A";if(o.showAverageResponseTime){const s=Math.round(e/t);return`~${s}ms`}{const e=Math.trunc(s),t=Math.trunc(a);return e===t?`${e}ms`:`${e}-${t}ms`}})),f=(0,l.Fl)((()=>{if(!o.endpoint.results||0===o.endpoint.results.length)return"";const e=Math.max(0,o.endpoint.results.length-o.maxResults);return L(o.endpoint.results[e].timestamp)})),w=(0,l.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?L(o.endpoint.results[o.endpoint.results.length-1].timestamp):"")),h=()=>{s.push(`/endpoints/${o.endpoint.key}`)},x=(e,t)=>{u("showTooltip",e,t,"hover")},b=(e,t)=>{u("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,u("showTooltip",null,t,"click")):(d.value=s,u("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,l.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,l.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{class:"endpoint h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"endpoint-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,l.w5)((()=>[(0,l._)("div",st,[(0,l._)("div",at,[(0,l.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,a.D2)(h,["enter"]),title:e.endpoint.name,role:"link",tabindex:"0","aria-label":`View details for ${e.endpoint.name}`},(0,n.zw)(e.endpoint.name),41,lt)])),_:1}),(0,l._)("div",nt,[e.endpoint.group?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"truncate",title:e.endpoint.group},(0,n.zw)(e.endpoint.group),9,rt)):(0,l.kq)("",!0),e.endpoint.group&&m.value?((0,l.wg)(),(0,l.iD)("span",ot,"•")):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",{key:2,class:"truncate",title:m.value},(0,n.zw)(m.value),9,it)):(0,l.kq)("",!0)])]),(0,l._)("div",ut,[(0,l.Wm)(tt,{status:g.value},null,8,["status"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),{class:"endpoint-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,l.w5)((()=>[(0,l._)("div",dt,[(0,l._)("div",null,[(0,l._)("div",ct,[s[0]||(s[0]=(0,l._)("div",{class:"flex-1"},null,-1)),(0,l._)("p",{class:"text-xs text-muted-foreground",title:e.showAverageResponseTime?"Average response time":"Minimum and maximum response time"},(0,n.zw)(v.value),9,gt)]),(0,l._)("div",mt,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(p.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,a.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,pt)))),128))]),(0,l._)("div",vt,[(0,l._)("span",null,(0,n.zw)(f.value),1),(0,l._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const wt=ft;var ht=wt;const xt={class:"flex items-start justify-between gap-2 sm:gap-3"},bt={class:"flex-1 min-w-0 overflow-hidden"},yt=["title","aria-label"],kt={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground"},_t=["title"],St={key:1},Dt={key:2},Ut={class:"flex-shrink-0 ml-2"},Ct={class:"space-y-2"},zt={class:"flex items-center justify-between mb-1"},Wt={class:"text-xs text-muted-foreground"},Ht={key:0,class:"text-xs text-muted-foreground"},jt={class:"flex gap-0.5"},Rt=["onMouseenter","onMouseleave","onClick"],Ft={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var Tt={__name:"SuiteCard",props:{suite:{type:Object,required:!0},maxResults:{type:Number,default:50}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=e,u=t,d=(0,r.iH)(null),c=(0,l.Fl)((()=>{const e=[...o.suite.results||[]];while(e.lengtho.suite.results&&0!==o.suite.results.length?o.suite.results[o.suite.results.length-1].success?"healthy":"unhealthy":"unknown")),m=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results[o.suite.results.length-1];return e.endpointResults?e.endpointResults.length:0})),p=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results.filter((e=>e.success)).length;return Math.round(e/o.suite.results.length*100)})),v=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return null;const e=o.suite.results.reduce(((e,t)=>e+(t.duration||0)),0);return Math.trunc(e/o.suite.results.length/1e6)})),f=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"N/A";const e=o.suite.results[0];return L(e.timestamp)})),w=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"Now";const e=o.suite.results[o.suite.results.length-1];return L(e.timestamp)})),h=()=>{s.push(`/suites/${o.suite.key}`)},x=(e,t)=>{u("showTooltip",e,t,"hover")},b=(e,t)=>{u("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,u("showTooltip",null,t,"click")):(d.value=s,u("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,l.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,l.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{class:"suite h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"suite-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,l.w5)((()=>[(0,l._)("div",xt,[(0,l._)("div",bt,[(0,l.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,a.D2)(h,["enter"]),title:e.suite.name,role:"link",tabindex:"0","aria-label":`View details for suite ${e.suite.name}`},(0,n.zw)(e.suite.name),41,yt)])),_:1}),(0,l._)("div",kt,[e.suite.group?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"truncate",title:e.suite.group},(0,n.zw)(e.suite.group),9,_t)):(0,l.kq)("",!0),e.suite.group&&m.value?((0,l.wg)(),(0,l.iD)("span",St,"•")):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",Dt,(0,n.zw)(m.value)+" endpoint"+(0,n.zw)(1!==m.value?"s":""),1)):(0,l.kq)("",!0)])]),(0,l._)("div",Ut,[(0,l.Wm)(tt,{status:g.value},null,8,["status"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),{class:"suite-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,l.w5)((()=>[(0,l._)("div",Ct,[(0,l._)("div",null,[(0,l._)("div",zt,[(0,l._)("p",Wt,"Success Rate: "+(0,n.zw)(p.value)+"%",1),null!==v.value?((0,l.wg)(),(0,l.iD)("p",Ht,(0,n.zw)(v.value)+"ms avg",1)):(0,l.kq)("",!0)]),(0,l._)("div",jt,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(c.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,a.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,Rt)))),128))]),(0,l._)("div",Ft,[(0,l._)("span",null,(0,n.zw)(f.value),1),(0,l._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const Et=(0,T.Z)(Tt,[["__scopeId","data-v-88e61ed6"]]);var qt=Et,$t=s(275);const Lt=["value"];var Zt={__name:"Input",props:{modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(e){return(t,s)=>((0,l.wg)(),(0,l.iD)("input",{class:(0,n.C_)((0,r.SU)(v)("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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.$attrs.class??"")),value:e.modelValue,onInput:s[0]||(s[0]=e=>t.$emit("update:modelValue",e.target.value))},null,42,Lt))}};const Mt=Zt;var At=Mt,Nt=s(368);const Yt=["aria-expanded","aria-label"],It={class:"truncate"},Ot={key:0,role:"listbox",class:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95"},Pt={class:"p-1"},Kt=["onClick","aria-selected"],Vt={class:"absolute left-1.5 sm:left-2 flex h-3.5 w-3.5 items-center justify-center"};var Bt={__name:"Select",props:{modelValue:{type:String,default:""},options:{type:Array,required:!0},placeholder:{type:String,default:"Select..."},class:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,a=t,o=(0,r.iH)(!1),i=(0,r.iH)(null),u=(0,r.iH)(-1),d=(0,l.Fl)((()=>s.options.find((e=>e.value===s.modelValue))||{label:s.placeholder,value:""})),c=e=>{a("update:modelValue",e.value),o.value=!1},g=()=>{if(o.value=!o.value,o.value){const e=s.options.findIndex((e=>e.value===s.modelValue));u.value=e>=0?e:0}else u.value=-1},m=e=>{i.value&&!i.value.contains(e.target)&&(o.value=!1,u.value=-1)},p=e=>{if(o.value)switch(e.key){case"ArrowDown":e.preventDefault(),u.value=Math.min(u.value+1,s.options.length-1);break;case"ArrowUp":e.preventDefault(),u.value=Math.max(u.value-1,0);break;case"Enter":case" ":e.preventDefault(),u.value>=0&&u.value{document.addEventListener("click",m)})),(0,l.Ah)((()=>{document.removeEventListener("click",m)})),(t,a)=>((0,l.wg)(),(0,l.iD)("div",{ref_key:"selectRef",ref:i,class:(0,n.C_)(["relative",s.class])},[(0,l._)("button",{onClick:g,onKeydown:p,"aria-expanded":o.value,"aria-haspopup":!0,"aria-label":d.value.label||s.placeholder,class:"flex h-9 sm:h-10 w-full items-center justify-between rounded-md border border-input bg-background px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm: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"},[(0,l._)("span",It,(0,n.zw)(d.value.label),1),(0,l.Wm)((0,r.SU)(Oe.Z),{class:"h-3 w-3 sm:h-4 sm:w-4 opacity-50 flex-shrink-0 ml-1"})],40,Yt),o.value?((0,l.wg)(),(0,l.iD)("div",Ot,[(0,l._)("div",Pt,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.options,((t,s)=>((0,l.wg)(),(0,l.iD)("div",{key:t.value,onClick:e=>c(t),class:(0,n.C_)(["relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-6 sm:pl-8 pr-2 text-xs sm:text-sm outline-none hover:bg-accent hover:text-accent-foreground",s===u.value&&"bg-accent text-accent-foreground"]),role:"option","aria-selected":e.modelValue===t.value},[(0,l._)("span",Vt,[e.modelValue===t.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Nt.Z),{key:0,class:"h-3 w-3 sm:h-4 sm:w-4"})):(0,l.kq)("",!0)]),(0,l.Uk)(" "+(0,n.zw)(t.label),1)],10,Kt)))),128))])])):(0,l.kq)("",!0)],2))}};const Gt=Bt;var Jt=Gt;const Xt={class:"flex flex-col lg:flex-row gap-3 lg:gap-4 p-3 sm:p-4 bg-card rounded-lg border"},Qt={class:"flex-1"},es={class:"relative"},ts={class:"flex flex-col sm:flex-row gap-3 sm:gap-4"},ss={class:"flex items-center gap-2 flex-1 sm:flex-initial"},as={class:"flex items-center gap-2 flex-1 sm:flex-initial"};var ls={__name:"SearchBar",emits:["search","update:showOnlyFailing","update:showRecentFailures","update:groupByGroup","update:sortBy","initializeCollapsedGroups"],setup(e,{emit:t}){const s=(0,r.iH)(""),a=(0,r.iH)(localStorage.getItem("gatus:filter-by")||"undefined"!==typeof window&&window.config?.defaultFilterBy||"none"),n=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"undefined"!==typeof window&&window.config?.defaultSortBy||"name"),o=[{label:"None",value:"none"},{label:"Failing",value:"failing"},{label:"Unstable",value:"unstable"}],i=[{label:"Name",value:"name"},{label:"Group",value:"group"},{label:"Health",value:"health"}],u=t,d=(e,t=!0)=>{a.value=e,t&&localStorage.setItem("gatus:filter-by",e),u("update:showOnlyFailing",!1),u("update:showRecentFailures",!1),"failing"===e?u("update:showOnlyFailing",!0):"unstable"===e&&u("update:showRecentFailures",!0)},c=(e,t=!0)=>{n.value=e,t&&localStorage.setItem("gatus:sort-by",e),u("update:sortBy",e),u("update:groupByGroup","group"===e),"group"===e&&u("initializeCollapsedGroups")};return(0,l.bv)((()=>{d(a.value,!1),c(n.value,!1)})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",Xt,[(0,l._)("div",Qt,[(0,l._)("div",es,[(0,l.Wm)((0,r.SU)($t.Z),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t[4]||(t[4]=(0,l._)("label",{for:"search-input",class:"sr-only"},"Search endpoints",-1)),(0,l.Wm)((0,r.SU)(At),{id:"search-input",modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),type:"text",placeholder:"Search endpoints...",class:"pl-10 text-sm sm:text-base",onInput:t[1]||(t[1]=t=>e.$emit("search",s.value))},null,8,["modelValue"])])]),(0,l._)("div",ts,[(0,l._)("div",ss,[t[5]||(t[5]=(0,l._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Filter by:",-1)),(0,l.Wm)((0,r.SU)(Jt),{modelValue:a.value,"onUpdate:modelValue":[t[2]||(t[2]=e=>a.value=e),d],options:o,placeholder:"None",class:"flex-1 sm:w-[140px] md:w-[160px]"},null,8,["modelValue"])]),(0,l._)("div",as,[t[6]||(t[6]=(0,l._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Sort by:",-1)),(0,l.Wm)((0,r.SU)(Jt),{modelValue:n.value,"onUpdate:modelValue":[t[3]||(t[3]=e=>n.value=e),c],options:i,placeholder:"Name",class:"flex-1 sm:w-[90px] md:w-[100px]"},null,8,["modelValue"])])])]))}};const ns=ls;var rs=ns,os=s(789),is=s(679);const us={id:"settings",class:"fixed bottom-4 left-4 z-50"},ds={class:"flex items-center gap-1 bg-background/95 backdrop-blur-sm border rounded-full shadow-md p-1"},cs=["aria-label","aria-expanded"],gs={class:"text-xs font-medium"},ms=["onClick"],ps=["aria-label"],vs={class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap"},fs="300",ws="theme",hs=31536e3;var xs={__name:"Settings",emits:["refreshData"],setup(e,{emit:t}){const s=t,o=[{value:"10",label:"10s"},{value:"30",label:"30s"},{value:"60",label:"1m"},{value:"120",label:"2m"},{value:"300",label:"5m"},{value:"600",label:"10m"}],i={REFRESH_INTERVAL:"gatus:refresh-interval"};function u(){const e=document.cookie.match(new RegExp(`${ws}=(dark|light);?`))?.[1];return"dark"===e||!e&&(window.matchMedia("(prefers-color-scheme: dark)").matches||document.documentElement.classList.contains("dark"))}function d(){const e=localStorage.getItem(i.REFRESH_INTERVAL),t=e&&parseInt(e),s=t&&t>=10&&o.some((t=>t.value===e));return s?e:fs}const c=(0,r.iH)(d()),g=(0,r.iH)(u()),m=(0,r.iH)(!1);let p=null;const v=e=>{const t=o.find((t=>t.value===e));return t?t.label:`${e}s`},f=e=>{localStorage.setItem(i.REFRESH_INTERVAL,e),p&&clearInterval(p),p=setInterval((()=>{w()}),1e3*e)},w=()=>{s("refreshData")},h=e=>{c.value=e,m.value=!1,w(),f(e)},x=e=>{const t=document.getElementById("settings");t&&!t.contains(e.target)&&(m.value=!1)},b=e=>{document.cookie=`${ws}=${e}; path=/; max-age=${hs}; samesite=strict`},y=()=>{const e=u()?"light":"dark";b(e),k()},k=()=>{const e=u();g.value=e,document.documentElement.classList.toggle("dark",e)};return(0,l.bv)((()=>{f(c.value),k(),document.addEventListener("click",x)})),(0,l.Ah)((()=>{p&&clearInterval(p),document.removeEventListener("click",x)})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",us,[(0,l._)("div",ds,[(0,l._)("button",{onClick:t[1]||(t[1]=e=>m.value=!m.value),"aria-label":`Refresh interval: ${v(c.value)}`,"aria-expanded":m.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-full hover:bg-accent transition-colors relative"},[(0,l.Wm)((0,r.SU)(Ye.Z),{class:"w-3.5 h-3.5 text-muted-foreground"}),(0,l._)("span",gs,(0,n.zw)(v(c.value)),1),m.value?((0,l.wg)(),(0,l.iD)("div",{key:0,onClick:t[0]||(t[0]=(0,a.iM)((()=>{}),["stop"])),class:"absolute bottom-full left-0 mb-2 bg-popover border rounded-lg shadow-lg overflow-hidden"},[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(o,(e=>(0,l._)("button",{key:e.value,onClick:t=>h(e.value),class:(0,n.C_)(["block w-full px-4 py-2 text-xs text-left hover:bg-accent transition-colors",c.value===e.value&&"bg-accent"])},(0,n.zw)(e.label),11,ms))),64))])):(0,l.kq)("",!0)],8,cs),t[2]||(t[2]=(0,l._)("div",{class:"h-5 w-px bg-border/50"},null,-1)),(0,l._)("button",{onClick:y,"aria-label":g.value?"Switch to light mode":"Switch to dark mode",class:"p-1.5 rounded-full hover:bg-accent transition-colors group relative"},[g.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(os.Z),{key:0,class:"h-3.5 w-3.5 transition-all"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(is.Z),{key:1,class:"h-3.5 w-3.5 transition-all"})),(0,l._)("div",vs,(0,n.zw)(g.value?"Light mode":"Dark mode"),1)],8,ps)])]))}};const bs=(0,T.Z)(xs,[["__scopeId","data-v-477a96cc"]]);var ys=bs,ks=s(691),_s=s(446),Ss=s(5),Ds=s(337),Us=s(441),Cs=s(424);const zs=e=>null===e||void 0===e?"":String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),Ws=new Us.TU.Renderer;Ws.link=(e,t,s)=>{const a="object"===typeof e&&null!==e?e:null,l=a?a.href:e,n=a?a.title:t,r=a?a.text:s,o=zs(l||""),i=n?` title="${zs(n)}"`:"",u=r||"";return`${u}`},Us.TU.use({renderer:Ws,breaks:!0,gfm:!0,headerIds:!1,mangle:!1});const Hs=e=>{if(!e)return"";const t=String(e),s=Us.TU.parse(t);return Cs.Z.sanitize(s,{ADD_ATTR:["target","rel"]})},js={key:0,class:"announcement-container mb-6"},Rs={class:"flex items-center justify-between"},Fs={class:"flex items-center gap-2"},Ts={class:"text-xs text-gray-500 dark:text-gray-400"},Es={key:0,class:"announcement-content p-4 transition-all duration-200 rounded-b-lg"},qs={class:"relative"},$s={class:"space-y-3"},Ls={class:"flex items-center gap-3 mb-2 relative"},Zs={class:"relative z-10 bg-white dark:bg-gray-800 px-2 py-1 rounded-md border border-gray-200 dark:border-gray-600"},Ms={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},As={class:"space-y-2 ml-7 relative"},Ns={key:0,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:{left:"-16px",top:"-2.5rem",height:"calc(50% + 2.5rem)"}},Ys={class:"flex items-center gap-3"},Is=["title"],Os={class:"flex-1 min-w-0"},Ps=["innerHTML"];var Ks={__name:"AnnouncementBanner",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),a=()=>{s.value=!s.value},o={outage:{icon:ks.Z,background:"bg-red-50 border-gray-200 dark:bg-red-900/50 dark:border-gray-600",border:"border-red-500",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:_s.Z,background:"bg-yellow-50 border-gray-200 dark:bg-yellow-900/50 dark:border-gray-600",border:"border-yellow-500",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ss.Z,background:"bg-blue-50 border-gray-200 dark:bg-blue-900/50 dark:border-gray-600",border:"border-blue-500",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ke.Z,background:"bg-green-50 border-gray-200 dark:bg-green-900/50 dark:border-gray-600",border:"border-green-500",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Ds.Z,background:"bg-gray-50 border-gray-200 dark:bg-gray-800/50 dark:border-gray-600",border:"border-gray-500",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},i=(0,l.Fl)((()=>t.announcements&&t.announcements.length>0?t.announcements[0]:null)),u=(0,l.Fl)((()=>{const e=i.value?.type||"none";return o[e]?.icon||Ds.Z})),d=(0,l.Fl)((()=>{const e=i.value?.type||"none";return o[e]?.iconColor||"text-gray-600 dark:text-gray-400"})),c=(0,l.Fl)((()=>{const e=i.value?.type||"none",t=o[e];return`border-l-4 ${t.border.replace("border-","border-l-")}`})),g=(0,l.Fl)((()=>{if(!t.announcements||0===t.announcements.length)return{};const e={};return t.announcements.forEach((t=>{const s=new Date(t.timestamp).toDateString();e[s]||(e[s]=[]),e[s].push(t)})),e})),m=e=>o[e]?.icon||Ds.Z,p=e=>o[e]||o.none,v=e=>{const t=new Date(e),s=new Date,a=new Date(s);return a.setDate(a.getDate()-1),t.toDateString()===s.toDateString()?"Today":t.toDateString()===a.toDateString()?"Yesterday":t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},f=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),w=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,o)=>e.announcements&&e.announcements.length?((0,l.wg)(),(0,l.iD)("div",js,[(0,l._)("div",{class:(0,n.C_)(["rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",c.value])},[(0,l._)("div",{class:(0,n.C_)(["announcement-header px-4 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",s.value?"rounded-lg":"rounded-t-lg border-b border-gray-200 dark:border-gray-600"]),onClick:a},[(0,l._)("div",Rs,[(0,l._)("div",Fs,[((0,l.wg)(),(0,l.j4)((0,l.LL)(u.value),{class:(0,n.C_)(["w-5 h-5",d.value])},null,8,["class"])),o[0]||(o[0]=(0,l._)("h2",{class:"text-base font-semibold text-gray-900 dark:text-gray-100"},"Announcements",-1)),(0,l._)("span",Ts," ("+(0,n.zw)(e.announcements.length)+") ",1)]),(0,l.Wm)((0,r.SU)(Oe.Z),{class:(0,n.C_)(["w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200",s.value?"-rotate-90":"rotate-0"])},null,8,["class"])])],2),s.value?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",Es,[(0,l._)("div",qs,[(0,l._)("div",$s,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"relative"},[(0,l._)("div",Ls,[(0,l._)("div",Zs,[(0,l._)("time",Ms,(0,n.zw)(v(t)),1)]),o[1]||(o[1]=(0,l._)("div",{class:"flex-1 border-t border-gray-200 dark:border-gray-600"},null,-1))]),(0,l._)("div",As,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((s,a)=>((0,l.wg)(),(0,l.iD)("div",{key:`${t}-${a}-${s.timestamp}`,class:"relative"},[(0,l._)("div",{class:(0,n.C_)(["absolute -left-[26px] w-5 h-5 rounded-full border bg-white dark:bg-gray-800 flex items-center justify-center z-10",a===e.length-1?"top-3":"top-1/2 -translate-y-1/2",p(s.type).border])},[((0,l.wg)(),(0,l.j4)((0,l.LL)(m(s.type)),{class:(0,n.C_)(["w-3 h-3",p(s.type).iconColor])},null,8,["class"]))],2),0===a?((0,l.wg)(),(0,l.iD)("div",Ns)):(0,l.kq)("",!0),a[]}},setup(e){const t=e,s=(0,r.iH)(!1),a={outage:{icon:ks.Z,background:"bg-red-50 dark:bg-red-900/20",borderColor:"border-red-500 dark:border-red-400",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:_s.Z,background:"bg-yellow-50 dark:bg-yellow-900/20",borderColor:"border-yellow-500 dark:border-yellow-400",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ss.Z,background:"bg-blue-50 dark:bg-blue-900/20",borderColor:"border-blue-500 dark:border-blue-400",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ke.Z,background:"bg-green-50 dark:bg-green-900/20",borderColor:"border-green-500 dark:border-green-400",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Ds.Z,background:"bg-gray-50 dark:bg-gray-800/20",borderColor:"border-gray-500 dark:border-gray-400",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},o=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},i=(0,l.Fl)((()=>{if(!t.announcements?.length)return{};const e={};let a=new Date;t.announcements.forEach((t=>{const s=new Date(t.timestamp),l=s.toDateString();e[l]=e[l]||[],e[l].push(t),s=n;t.setDate(t.getDate()-1))r[t.toDateString()]=e[t.toDateString()]||[];return r})),u=(0,l.Fl)((()=>{if(!t.announcements?.length)return!1;const e=new Date(o(new Date).getTime()-12096e5);return t.announcements.some((t=>new Date(t.timestamp)a[e]?.icon||Ds.Z,c=e=>a[e]||a.none,g=e=>{const t=new Date(e);return t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},m=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),p=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,a)=>e.announcements&&e.announcements.length?((0,l.wg)(),(0,l.iD)("div",Gs,[a[3]||(a[3]=(0,l._)("h2",{class:"text-2xl font-semibold text-foreground mb-6"},"Past Announcements",-1)),(0,l._)("div",Js,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(i.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t},[(0,l._)("div",Xs,[(0,l._)("h3",Qs,(0,n.zw)(g(t)),1)]),e.length>0?((0,l.wg)(),(0,l.iD)("div",ea,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((e,s)=>((0,l.wg)(),(0,l.iD)("div",{key:`${t}-${s}-${e.timestamp}`,class:(0,n.C_)(["border-l-4 p-4 transition-all duration-200",c(e.type).background,c(e.type).borderColor])},[(0,l._)("div",ta,[((0,l.wg)(),(0,l.j4)((0,l.LL)(d(e.type)),{class:(0,n.C_)(["w-5 h-5 flex-shrink-0 mt-0.5",c(e.type).iconColor])},null,8,["class"])),(0,l._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0 mt-0.5",c(e.type).text]),title:p(e.timestamp)},(0,n.zw)(m(e.timestamp)),11,sa),(0,l._)("div",aa,[(0,l._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(Hs)(e.message)},null,8,la)])])],2)))),128))])):((0,l.wg)(),(0,l.iD)("div",na,a[1]||(a[1]=[(0,l._)("p",{class:"text-sm italic text-muted-foreground/60"}," No incidents reported on this day ",-1)])))])))),128)),u.value&&!s.value?((0,l.wg)(),(0,l.iD)("div",ra,[(0,l._)("button",{onClick:a[0]||(a[0]=e=>s.value=!0),class:"inline-flex items-center gap-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-200 cursor-pointer group"},[(0,l.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4 group-hover:translate-y-0.5 transition-transform duration-200"}),a[2]||(a[2]=(0,l._)("span",{class:"group-hover:underline"},"View older announcements",-1))])])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0)}};const ia=oa;var ua=ia;const da={class:"dashboard-container bg-background"},ca={class:"container mx-auto px-4 py-8 max-w-7xl"},ga={class:"mb-6"},ma={class:"flex items-center justify-between mb-6"},pa={class:"text-4xl font-bold tracking-tight"},va={class:"text-muted-foreground mt-2"},fa={class:"flex items-center gap-4"},wa={key:0,class:"flex items-center justify-center py-20"},ha={key:1,class:"text-center py-20"},xa={class:"text-muted-foreground"},ba={key:2},ya={key:0,class:"space-y-6"},ka=["onClick"],_a={class:"flex items-center gap-3"},Sa={class:"text-xl font-semibold text-foreground"},Da={class:"flex items-center gap-2"},Ua={key:0,class:"bg-red-600 text-white px-2 py-1 rounded-full text-sm font-medium"},Ca={key:0,class:"endpoint-group-content p-4"},za={key:0,class:"mb-4"},Wa={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Ha={key:1},ja={key:0,class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},Ra={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Fa={key:1},Ta={key:0,class:"mb-6"},Ea={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},qa={key:1},$a={key:0,class:"text-lg font-semibold text-foreground mb-3"},La={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Za={key:2,class:"mt-8 flex items-center justify-center gap-2"},Ma={class:"flex gap-1"},Aa={key:3,class:"mt-12 pb-8"},Na=96,Ya=50;var Ia={__name:"Home",props:{announcements:{type:Array,default:()=>[]}},emits:["showTooltip"],setup(e,{emit:t}){const s=e,a=(0,l.Fl)((()=>s.announcements?s.announcements.filter((e=>!e.archived)):[])),o=(0,l.Fl)((()=>s.announcements?s.announcements.filter((e=>e.archived)):[])),i=t,u=(0,r.iH)([]),d=(0,r.iH)([]),c=(0,r.iH)(!1),g=(0,r.iH)(1),m=(0,r.iH)(""),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!0),w=(0,r.iH)(!1),h=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"name"),b=(0,r.iH)(new Set),y=(0,l.Fl)((()=>{let e=[...u.value];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success}))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,a=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&a?-1:s&&!a?1:e.name.localeCompare(t.name)})),e})),k=(0,l.Fl)((()=>{let e=[...d.value||[]];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,a=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&a?-1:s&&!a?1:e.name.localeCompare(t.name)})),e})),_=(0,l.Fl)((()=>Math.ceil((y.value.length+k.value.length)/Na))),S=(0,l.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]=[]),e[s].push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),D=(0,l.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].endpoints.push(t)})),k.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].suites.push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),U=(0,l.Fl)((()=>{if(w.value)return S.value;const e=(g.value-1)*Na,t=e+Na;return y.value.slice(e,t)})),C=(0,l.Fl)((()=>{if(w.value)return k.value;const e=(g.value-1)*Na,t=e+Na;return k.value.slice(e,t)})),z=(0,l.Fl)((()=>{const e=[],t=5;let s=Math.max(1,g.value-Math.floor(t/2)),a=Math.min(_.value,s+t-1);a-s{const e=0===u.value.length&&0===d.value.length;e&&(c.value=!0);try{const t=await fetch(`/api/v1/endpoints/statuses?page=1&pageSize=${Ya}`,{credentials:"include"});if(200===t.status){const e=await t.json();u.value=e}else console.error("[Home][fetchData] Error fetching endpoints:",await t.text());const s=await fetch(`/api/v1/suites/statuses?page=1&pageSize=${Ya}`,{credentials:"include"});if(200===s.status){const e=await s.json();d.value=e||[]}else console.error("[Home][fetchData] Error fetching suites:",await s.text()),d.value||(d.value=[])}catch(t){console.error("[Home][fetchData] Error:",t)}finally{e&&(c.value=!1)}},H=()=>{u.value=[],d.value=[],W()},j=e=>{m.value=e,g.value=1},R=e=>{g.value=e,window.scrollTo({top:0,behavior:"smooth"})},F=()=>{f.value=!f.value},T=(e,t,s="hover")=>{i("showTooltip",e,t,s)},E=e=>e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success})).length,q=e=>e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success)).length,$=e=>{b.value.has(e)?b.value.delete(e):b.value.add(e);const t=Array.from(b.value);localStorage.setItem("gatus:uncollapsed-groups",JSON.stringify(t)),localStorage.removeItem("gatus:collapsed-groups")},L=()=>{try{const e=localStorage.getItem("gatus:uncollapsed-groups");e&&(b.value=new Set(JSON.parse(e)))}catch(e){console.warn("Failed to parse saved uncollapsed groups:",e),localStorage.removeItem("gatus:uncollapsed-groups")}},Z=(0,l.Fl)((()=>window.config&&window.config.dashboardHeading&&"{{ .UI.DashboardHeading }}"!==window.config.dashboardHeading?window.config.dashboardHeading:"Health Dashboard")),M=(0,l.Fl)((()=>window.config&&window.config.dashboardSubheading&&"{{ .UI.DashboardSubheading }}"!==window.config.dashboardSubheading?window.config.dashboardSubheading:"Monitor the health of your endpoints in real-time"));return(0,l.bv)((()=>{W()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",da,[(0,l._)("div",ca,[(0,l._)("div",ga,[(0,l._)("div",ma,[(0,l._)("div",null,[(0,l._)("h1",pa,(0,n.zw)(Z.value),1),(0,l._)("p",va,(0,n.zw)(M.value),1)]),(0,l._)("div",fa,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:F,title:f.value?"Show min-max response time":"Show average response time"},{default:(0,l.w5)((()=>[f.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ae.Z),{key:0,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ne.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:H,title:"Refresh data"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ye.Z),{class:"h-5 w-5"})])),_:1})])]),(0,l.Wm)(Bs,{announcements:a.value},null,8,["announcements"]),(0,l.Wm)(rs,{onSearch:j,"onUpdate:showOnlyFailing":t[0]||(t[0]=e=>p.value=e),"onUpdate:showRecentFailures":t[1]||(t[1]=e=>v.value=e),"onUpdate:groupByGroup":t[2]||(t[2]=e=>w.value=e),"onUpdate:sortBy":t[3]||(t[3]=e=>h.value=e),onInitializeCollapsedGroups:L})]),c.value?((0,l.wg)(),(0,l.iD)("div",wa,[(0,l.Wm)(de,{size:"lg"})])):0===y.value.length&&0===k.value.length?((0,l.wg)(),(0,l.iD)("div",ha,[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[6]||(t[6]=(0,l._)("h3",{class:"text-lg font-semibold mb-2"},"No endpoints or suites found",-1)),(0,l._)("p",xa,(0,n.zw)(m.value||p.value||v.value?"Try adjusting your filters":"No endpoints or suites are configured"),1)])):((0,l.wg)(),(0,l.iD)("div",ba,[w.value?((0,l.wg)(),(0,l.iD)("div",ya,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(D.value,((e,s)=>((0,l.wg)(),(0,l.iD)("div",{key:s,class:"endpoint-group border rounded-lg overflow-hidden"},[(0,l._)("div",{onClick:e=>$(s),class:"endpoint-group-header flex items-center justify-between p-4 bg-card border-b cursor-pointer hover:bg-accent/50 transition-colors"},[(0,l._)("div",_a,[b.value.has(s)?((0,l.wg)(),(0,l.j4)((0,r.SU)(Oe.Z),{key:0,class:"h-5 w-5 text-muted-foreground"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Pe.Z),{key:1,class:"h-5 w-5 text-muted-foreground"})),(0,l._)("h2",Sa,(0,n.zw)(s),1)]),(0,l._)("div",Da,[E(e.endpoints)+q(e.suites)>0?((0,l.wg)(),(0,l.iD)("span",Ua,(0,n.zw)(E(e.endpoints)+q(e.suites)),1)):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ke.Z),{key:1,class:"h-6 w-6 text-green-600"}))])],8,ka),b.value.has(s)?((0,l.wg)(),(0,l.iD)("div",Ca,[e.suites.length>0?((0,l.wg)(),(0,l.iD)("div",za,[t[7]||(t[7]=(0,l._)("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},"Suites",-1)),(0,l._)("div",Wa,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.suites,(e=>((0,l.wg)(),(0,l.j4)(qt,{key:e.key,suite:e,maxResults:Ya,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,l.kq)("",!0),e.endpoints.length>0?((0,l.wg)(),(0,l.iD)("div",Ha,[e.suites.length>0?((0,l.wg)(),(0,l.iD)("h3",ja,"Endpoints")):(0,l.kq)("",!0),(0,l._)("div",Ra,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.endpoints,(e=>((0,l.wg)(),(0,l.j4)(ht,{key:e.key,endpoint:e,maxResults:Ya,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])))),128))])):((0,l.wg)(),(0,l.iD)("div",Fa,[k.value.length>0?((0,l.wg)(),(0,l.iD)("div",Ta,[t[8]||(t[8]=(0,l._)("h2",{class:"text-lg font-semibold text-foreground mb-3"},"Suites",-1)),(0,l._)("div",Ea,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(C.value,(e=>((0,l.wg)(),(0,l.j4)(qt,{key:e.key,suite:e,maxResults:Ya,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,l.kq)("",!0),y.value.length>0?((0,l.wg)(),(0,l.iD)("div",qa,[k.value.length>0?((0,l.wg)(),(0,l.iD)("h2",$a,"Endpoints")):(0,l.kq)("",!0),(0,l._)("div",La,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(U.value,(e=>((0,l.wg)(),(0,l.j4)(ht,{key:e.key,endpoint:e,maxResults:Ya,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,l.kq)("",!0)])),!w.value&&_.value>1?((0,l.wg)(),(0,l.iD)("div",Za,[(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:1===g.value,onClick:t[4]||(t[4]=e=>R(g.value-1))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ve.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"]),(0,l._)("div",Ma,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(z.value,(e=>((0,l.wg)(),(0,l.j4)((0,r.SU)(x),{key:e,variant:e===g.value?"default":"outline",size:"sm",onClick:t=>R(e)},{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)(e),1)])),_:2},1032,["variant","onClick"])))),128))]),(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:g.value===_.value,onClick:t[5]||(t[5]=e=>R(g.value+1))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"])])):(0,l.kq)("",!0)])),o.value.length>0?((0,l.wg)(),(0,l.iD)("div",Aa,[(0,l.Wm)(ua,{announcements:o.value},null,8,["announcements"])])):(0,l.kq)("",!0)]),(0,l.Wm)(ys,{onRefreshData:W})]))}};const Oa=Ia;var Pa=Oa,Ka=s(318),Va=s(779),Ba=s(141),Ga=s(478);const Ja={class:"flex items-center justify-between"},Xa={class:"text-sm text-muted-foreground"};var Qa={__name:"Pagination",props:{numberOfResultsPerPage:Number,currentPageProp:{type:Number,default:1}},emits:["page"],setup(e,{emit:t}){const s=e,a=t,o=(0,r.iH)(s.currentPageProp),i=(0,l.Fl)((()=>{let e=100;if("undefined"!==typeof window&&window.config&&window.config.maximumNumberOfResults){const t=parseInt(window.config.maximumNumberOfResults);isNaN(t)||(e=t)}return Math.ceil(e/s.numberOfResultsPerPage)})),u=()=>{o.value--,a("page",o.value)},d=()=>{o.value++,a("page",o.value)};return(e,t)=>((0,l.wg)(),(0,l.iD)("div",Ja,[(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value>=i.value,onClick:d,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ve.Z),{class:"h-4 w-4"}),t[0]||(t[0]=(0,l.Uk)(" Previous ",-1))])),_:1,__:[0]},8,["disabled"]),(0,l._)("span",Xa," Page "+(0,n.zw)(o.value)+" of "+(0,n.zw)(i.value),1),(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value<=1,onClick:u,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[t[1]||(t[1]=(0,l.Uk)(" Next ",-1)),(0,l.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"})])),_:1,__:[1]},8,["disabled"])]))}};const el=Qa;var tl=el,sl=s(334),al=s(148),ll=s(282);s(210);const nl={class:"relative w-full",style:{height:"300px"}},rl={key:0,class:"absolute inset-0 flex items-center justify-center bg-background/50"},ol={key:1,class:"absolute inset-0 flex items-center justify-center text-muted-foreground"};var il={__name:"ResponseTimeChart",props:{endpointKey:{type:String,required:!0},duration:{type:String,required:!0,validator:e=>["24h","7d","30d"].includes(e)},serverUrl:{type:String,default:".."},events:{type:Array,default:()=>[]}},setup(e){al.kL.register(al.uw,al.f$,al.od,al.jn,al.Dx,al.u,al.De,al.Gu,al.FB,ll.Z);const t=e,s=(0,r.iH)(!0),a=(0,r.iH)(null),o=(0,r.iH)([]),i=(0,r.iH)([]),u=(0,r.iH)(document.documentElement.classList.contains("dark")),d=(0,r.iH)(null),c=()=>"rgba(239, 68, 68, 0.8)",g=(0,l.Fl)((()=>{if(!t.events||0===t.events.length)return[];const e=new Date;let s;switch(t.duration){case"24h":s=new Date(e.getTime()-864e5);break;case"7d":s=new Date(e.getTime()-6048e5);break;case"30d":s=new Date(e.getTime()-2592e6);break;default:return[]}const a=[];for(let l=0;le)continue;let o=null,i=!1;if(l+1{if(0===o.value.length)return{labels:[],datasets:[]};const e=o.value.map((e=>new Date(e)));return{labels:e,datasets:[{label:"Response Time (ms)",data:i.value,borderColor:u.value?"rgb(96, 165, 250)":"rgb(59, 130, 246)",backgroundColor:u.value?"rgba(96, 165, 250, 0.1)":"rgba(59, 130, 246, 0.1)",borderWidth:2,pointRadius:2,pointHoverRadius:4,tension:.1,fill:!0}]}})),p=(0,l.Fl)((()=>{d.value;const e=i.value.length>0?Math.max(...i.value):0,s=e/2;return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{backgroundColor:u.value?"rgba(31, 41, 55, 0.95)":"rgba(255, 255, 255, 0.95)",titleColor:u.value?"#f9fafb":"#111827",bodyColor:u.value?"#d1d5db":"#374151",borderColor:u.value?"#4b5563":"#e5e7eb",borderWidth:1,padding:12,displayColors:!1,callbacks:{title:e=>{if(e.length>0){const t=new Date(e[0].parsed.x);return t.toLocaleString()}return""},label:e=>{const t=e.parsed.y;return`${t}ms`}}},annotation:{annotations:g.value.reduce(((e,t,a)=>{const l=new Date(t.timestamp).getTime();let n=0;if(o.value.length>0&&i.value.length>0){const e=o.value.reduce(((e,t,s)=>{const a=new Date(t).getTime(),n=Math.abs(a-l),r=Math.abs(new Date(o.value[e]).getTime()-l);return nd.value===a,content:[t.isOngoing?"Status: ONGOING":"Status: RESOLVED",`Unhealthy for ${t.duration}`,`Started at ${new Date(t.timestamp).toLocaleString()}`],backgroundColor:c(),color:"#ffffff",font:{size:11},padding:6,position:r}},e}),{})}},scales:{x:{type:"time",time:{unit:"24h"===t.duration?"hour":(t.duration,"day"),displayFormats:{hour:"MMM d, ha",day:"MMM d"}},grid:{color:u.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:u.value?"#9ca3af":"#6b7280",maxRotation:0,autoSkipPadding:20}},y:{beginAtZero:!0,grid:{color:u.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:u.value?"#9ca3af":"#6b7280",callback:e=>`${e}ms`}}}}})),v=async()=>{s.value=!0,a.value=null;try{const e=await fetch(`${t.serverUrl}/api/v1/endpoints/${t.endpointKey}/response-times/${t.duration}/history`,{credentials:"include"});if(200===e.status){const t=await e.json();o.value=t.timestamps||[],i.value=t.values||[]}else a.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",await e.text())}catch(e){a.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",e)}finally{s.value=!1}};return(0,l.YP)((()=>t.duration),(()=>{v()})),(0,l.bv)((()=>{v();const e=new MutationObserver((()=>{u.value=document.documentElement.classList.contains("dark")}));e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),(0,l.Ah)((()=>e.disconnect()))})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",nl,[s.value?((0,l.wg)(),(0,l.iD)("div",rl,[(0,l.Wm)(de)])):a.value?((0,l.wg)(),(0,l.iD)("div",ol,(0,n.zw)(a.value),1)):((0,l.wg)(),(0,l.j4)((0,r.SU)(sl.x1),{key:2,data:m.value,options:p.value},null,8,["data","options"]))]))}};const ul=il;var dl=ul;const cl={class:"dashboard-container bg-background"},gl={class:"container mx-auto px-4 py-8 max-w-7xl"},ml={class:"mb-6"},pl={key:0,class:"space-y-6"},vl={class:"flex items-start justify-between"},fl={class:"text-4xl font-bold tracking-tight"},wl={class:"flex items-center gap-3 text-muted-foreground mt-2"},hl={key:0},xl={key:1},bl={key:2},yl={class:"grid gap-6 md:grid-cols-2 lg:grid-cols-4"},kl={class:"text-2xl font-bold"},_l={class:"text-2xl font-bold"},Sl={class:"text-2xl font-bold"},Dl={class:"text-2xl font-bold"},Ul={class:"flex items-center justify-between"},Cl={class:"flex items-center gap-2"},zl={class:"space-y-4"},Wl={key:1,class:"pt-4 border-t"},Hl={key:0,class:"space-y-6"},jl={class:"flex items-center justify-between"},Rl={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Fl=["src","alt"],Tl={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},El={class:"text-sm text-muted-foreground mb-2"},ql=["src","alt"],$l={class:"text-center"},Ll=["src"],Zl={class:"space-y-4"},Ml={class:"mt-1"},Al={class:"flex-1"},Nl={class:"font-medium"},Yl={class:"text-sm text-muted-foreground"},Il={key:1,class:"flex items-center justify-center py-20"},Ol=50;var Pl={__name:"EndpointDetails",emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=(0,i.yj)(),u=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,r.iH)([]),m=(0,r.iH)(1),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)("24h"),w=(0,r.iH)(!1),h=(0,l.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?c.value.results[c.value.results.length-1]:null)),b=(0,l.Fl)((()=>h.value?h.value.success?"healthy":"unhealthy":"unknown")),y=(0,l.Fl)((()=>h.value?.hostname||null)),_=(0,l.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=0,t=0;for(const s of d.value.results)s.duration&&(e+=s.duration,t++);return 0===t?"N/A":`${Math.round(e/t/1e6)}ms`})),S=(0,l.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=1/0,t=0,s=!1;for(const n of d.value.results){const a=n.duration;a&&(e=Math.min(e,a),t=Math.max(t,a),s=!0)}if(!s)return"N/A";const a=Math.trunc(e/1e6),l=Math.trunc(t/1e6);return a===l?`${a}ms`:`${a}-${l}ms`})),U=(0,l.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?L(c.value.results[c.value.results.length-1].timestamp):"Never")),C=async()=>{w.value=!0;try{const e=await fetch(`/api/v1/endpoints/${o.params.key}/statuses?page=${m.value}&pageSize=${Ol}`,{credentials:"include"});if(200===e.status){const t=await e.json();d.value=t,1===m.value&&(c.value=t);let s=[];if(t.events&&t.events.length>0)for(let e=t.events.length-1;e>=0;e--){let a=t.events[e];if(e===t.events.length-1)"UNHEALTHY"===a.type?a.fancyText="Endpoint is unhealthy":"HEALTHY"===a.type?a.fancyText="Endpoint is healthy":"START"===a.type&&(a.fancyText="Monitoring started");else{let s=t.events[e+1];"HEALTHY"===a.type?a.fancyText="Endpoint became healthy":"UNHEALTHY"===a.type?a.fancyText=s?"Endpoint was unhealthy for "+Z(s.timestamp,a.timestamp):"Endpoint became unhealthy":"START"===a.type&&(a.fancyText="Monitoring started")}a.fancyTimeAgo=L(a.timestamp),s.push(a)}if(g.value=s,t.results&&t.results.length>0)for(let e=0;e0){p.value=!0;break}}else console.error("[Details][fetchData] Error:",await e.text())}catch(e){console.error("[Details][fetchData] Error:",e)}finally{w.value=!1}},W=()=>{s.push("/")},H=e=>{m.value=e,C()},R=(e,t,s="hover")=>{u("showTooltip",e,t,s)},F=e=>new Date(e).toLocaleString(),T=()=>`/api/v1/endpoints/${d.value.key}/health/badge.svg`,E=e=>`/api/v1/endpoints/${d.value.key}/uptimes/${e}/badge.svg`,q=e=>`/api/v1/endpoints/${d.value.key}/response-times/${e}/badge.svg`;return(0,l.bv)((()=>{C()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",cl,[(0,l._)("div",gl,[(0,l._)("div",ml,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",class:"mb-4",onClick:W},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ka.Z),{class:"h-4 w-4 mr-2"}),t[2]||(t[2]=(0,l.Uk)(" Back to Dashboard ",-1))])),_:1,__:[2]}),d.value&&d.value.name?((0,l.wg)(),(0,l.iD)("div",pl,[(0,l._)("div",vl,[(0,l._)("div",null,[(0,l._)("h1",fl,(0,n.zw)(d.value.name),1),(0,l._)("div",wl,[d.value.group?((0,l.wg)(),(0,l.iD)("span",hl,"Group: "+(0,n.zw)(d.value.group),1)):(0,l.kq)("",!0),d.value.group&&y.value?((0,l.wg)(),(0,l.iD)("span",xl,"•")):(0,l.kq)("",!0),y.value?((0,l.wg)(),(0,l.iD)("span",bl,(0,n.zw)(y.value),1)):(0,l.kq)("",!0)])]),(0,l.Wm)(tt,{status:b.value},null,8,["status"])]),(0,l._)("div",yl,[(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[3]||(t[3]=[(0,l.Uk)("Current Status",-1)]))),_:1,__:[3]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",kl,(0,n.zw)("healthy"===b.value?"Operational":"Issues Detected"),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[4]||(t[4]=[(0,l.Uk)("Avg Response Time",-1)]))),_:1,__:[4]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",_l,(0,n.zw)(_.value),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[5]||(t[5]=[(0,l.Uk)("Response Time Range",-1)]))),_:1,__:[5]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Sl,(0,n.zw)(S.value),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[6]||(t[6]=[(0,l.Uk)("Last Check",-1)]))),_:1,__:[6]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Dl,(0,n.zw)(U.value),1)])),_:1})])),_:1})]),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l._)("div",Ul,[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[7]||(t[7]=[(0,l.Uk)("Recent Checks",-1)]))),_:1,__:[7]}),(0,l._)("div",Cl,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:t[0]||(t[0]=e=>v.value=!v.value),title:v.value?"Show min-max response time":"Show average response time"},{default:(0,l.w5)((()=>[v.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ae.Z),{key:0,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ne.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:C,title:"Refresh data",disabled:w.value},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ye.Z),{class:(0,n.C_)(["h-4 w-4",w.value&&"animate-spin"])},null,8,["class"])])),_:1},8,["disabled"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",zl,[d.value?((0,l.wg)(),(0,l.j4)(ht,{key:0,endpoint:d.value,maxResults:Ol,showAverageResponseTime:v.value,onShowTooltip:R,class:"border-0 shadow-none bg-transparent p-0"},null,8,["endpoint","showAverageResponseTime"])):(0,l.kq)("",!0),d.value&&d.value.key?((0,l.wg)(),(0,l.iD)("div",Wl,[(0,l.Wm)(tl,{onPage:H,numberOfResultsPerPage:Ol,currentPageProp:m.value},null,8,["currentPageProp"])])):(0,l.kq)("",!0)])])),_:1})])),_:1}),p.value?((0,l.wg)(),(0,l.iD)("div",Hl,[(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l._)("div",jl,[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[8]||(t[8]=[(0,l.Uk)("Response Time Trend",-1)]))),_:1,__:[8]}),(0,l.wy)((0,l._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>f.value=e),class:"text-sm bg-background border rounded-md px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring"},t[9]||(t[9]=[(0,l._)("option",{value:"24h"},"24 hours",-1),(0,l._)("option",{value:"7d"},"7 days",-1),(0,l._)("option",{value:"30d"},"30 days",-1)]),512),[[a.bM,f.value]])])])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[d.value&&d.value.key?((0,l.wg)(),(0,l.j4)(dl,{key:0,endpointKey:d.value.key,duration:f.value,serverUrl:e.serverUrl,events:d.value.events||[]},null,8,["endpointKey","duration","serverUrl","events"])):(0,l.kq)("",!0)])),_:1})])),_:1}),(0,l._)("div",Rl,[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(["30d","7d","24h","1h"],(e=>(0,l.Wm)((0,r.SU)(k),{key:e},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground text-center"},{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1)])),_:2},1024)])),_:2},1024),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("img",{src:q(e),alt:`${e} response time`,class:"mx-auto mt-2"},null,8,Fl)])),_:2},1024)])),_:2},1024))),64))])])):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[10]||(t[10]=[(0,l.Uk)("Uptime Statistics",-1)]))),_:1,__:[10]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Tl,[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(["30d","7d","24h","1h"],(e=>(0,l._)("div",{key:e,class:"text-center"},[(0,l._)("p",El,(0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1),(0,l._)("img",{src:E(e),alt:`${e} uptime`,class:"mx-auto"},null,8,ql)]))),64))])])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[11]||(t[11]=[(0,l.Uk)("Current Health",-1)]))),_:1,__:[11]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",$l,[(0,l._)("img",{src:T(),alt:"health badge",class:"mx-auto"},null,8,Ll)])])),_:1})])),_:1}),g.value&&g.value.length>0?((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{key:1},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[12]||(t[12]=[(0,l.Uk)("Events",-1)]))),_:1,__:[12]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Zl,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,(e=>((0,l.wg)(),(0,l.iD)("div",{key:e.timestamp,class:"flex items-start gap-4 pb-4 border-b last:border-0"},[(0,l._)("div",Ml,["HEALTHY"===e.type?((0,l.wg)(),(0,l.j4)((0,r.SU)(Va.Z),{key:0,class:"h-5 w-5 text-green-500"})):"UNHEALTHY"===e.type?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ba.Z),{key:1,class:"h-5 w-5 text-red-500"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ga.Z),{key:2,class:"h-5 w-5 text-muted-foreground"}))]),(0,l._)("div",Al,[(0,l._)("p",Nl,(0,n.zw)(e.fancyText),1),(0,l._)("p",Yl,(0,n.zw)(F(e.timestamp))+" • "+(0,n.zw)(e.fancyTimeAgo),1)])])))),128))])])),_:1})])),_:1})):(0,l.kq)("",!0)])):((0,l.wg)(),(0,l.iD)("div",Il,[(0,l.Wm)(de,{size:"lg"})]))])]),(0,l.Wm)(ys,{onRefreshData:C})]))}};const Kl=Pl;var Vl=Kl,Bl=s(469),Gl=s(399),Jl=s(167);const Xl=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${Math.trunc(t)}ms`:`${(t/1e3).toFixed(2)}s`},Ql={class:"relative flex-shrink-0"},en={class:"flex-1 min-w-0 pt-1"},tn={class:"flex items-center justify-between gap-2 mb-1"},sn={class:"font-medium text-sm truncate"},an={class:"text-xs text-muted-foreground whitespace-nowrap"},ln={class:"flex flex-wrap gap-1"},nn={key:0,class:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-md"},rn={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-md"};var on={__name:"FlowStep",props:{step:{type:Object,required:!0},index:{type:Number,required:!0},isLast:{type:Boolean,default:!1},previousStep:{type:Object,default:null}},emits:["step-click"],setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.step.status){case"success":return Ke.Z;case"failed":return ks.Z;case"skipped":return Bl.Z;case"not-started":return Jl.Z;default:return Jl.Z}})),a=(0,l.Fl)((()=>{const e="border-2";if(t.step.isAlwaysRun)switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600 ring-2 ring-blue-200 dark:ring-blue-800`;case"failed":return`${e} bg-red-500 text-white border-red-600 ring-2 ring-blue-200 dark:ring-blue-800`;default:return`${e} bg-blue-500 text-white border-blue-600 ring-2 ring-blue-200 dark:ring-blue-800`}switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600`;case"failed":return`${e} bg-red-500 text-white border-red-600`;case"skipped":return`${e} bg-gray-400 text-white border-gray-500`;case"not-started":return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`;default:return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`}})),o=(0,l.Fl)((()=>{if(!t.previousStep)return"bg-gray-300 dark:bg-gray-600";if("skipped"===t.step.status)return"border-l-2 border-dashed border-gray-400 bg-transparent";switch(t.previousStep.status){case"success":return"bg-green-500";case"failed":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}})),i=(0,l.Fl)((()=>{const e=t.step.nextStepStatus;switch(t.step.status){case"success":return"skipped"===e?"bg-gray-300 dark:bg-gray-600":"bg-green-500";case"failed":return"skipped"===e?"border-l-2 border-dashed border-gray-400 bg-transparent":"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}}));return(t,u)=>((0,l.wg)(),(0,l.iD)("div",{class:"flex items-start gap-4 relative group hover:bg-accent/30 rounded-lg p-2 -m-2 transition-colors cursor-pointer",onClick:u[0]||(u[0]=e=>t.$emit("step-click"))},[(0,l._)("div",Ql,[e.index>0?((0,l.wg)(),(0,l.iD)("div",{key:0,class:(0,n.C_)([o.value,"absolute left-1/2 bottom-8 w-0.5 h-4 -translate-x-px"])},null,2)):(0,l.kq)("",!0),(0,l._)("div",{class:(0,n.C_)([a.value,"w-8 h-8 rounded-full flex items-center justify-center"])},[((0,l.wg)(),(0,l.j4)((0,l.LL)(s.value),{class:"w-4 h-4"}))],2),e.isLast?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",{key:1,class:(0,n.C_)([i.value,"absolute left-1/2 top-8 w-0.5 h-4 -translate-x-px"])},null,2))]),(0,l._)("div",en,[(0,l._)("div",tn,[(0,l._)("h4",sn,(0,n.zw)(e.step.name),1),(0,l._)("span",an,(0,n.zw)((0,r.SU)(Xl)(e.step.duration)),1)]),(0,l._)("div",ln,[e.step.isAlwaysRun?((0,l.wg)(),(0,l.iD)("span",nn,[(0,l.Wm)((0,r.SU)(Gl.Z),{class:"w-3 h-3"}),u[1]||(u[1]=(0,l.Uk)(" Always Run ",-1))])):(0,l.kq)("",!0),e.step.errors?.length?((0,l.wg)(),(0,l.iD)("span",rn,(0,n.zw)(e.step.errors.length)+" error"+(0,n.zw)(1!==e.step.errors.length?"s":""),1)):(0,l.kq)("",!0)])])]))}};const un=on;var dn=un;const cn={class:"space-y-4"},gn={class:"flex items-center gap-4"},mn={class:"flex-1 h-1 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},pn={class:"flex items-center justify-between text-xs text-muted-foreground"},vn={key:0},fn={class:"space-y-2"},wn={class:"mt-6 pt-4 border-t"},hn={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-xs"},xn={key:0,class:"flex items-center gap-2"},bn={class:"w-4 h-4 rounded-full bg-green-500 flex items-center justify-center"},yn={key:1,class:"flex items-center gap-2"},kn={class:"w-4 h-4 rounded-full bg-red-500 flex items-center justify-center"},_n={key:2,class:"flex items-center gap-2"},Sn={class:"w-4 h-4 rounded-full bg-gray-400 flex items-center justify-center"},Dn={key:3,class:"flex items-center gap-2"},Un={class:"w-4 h-4 rounded-full bg-blue-500 border-2 border-blue-200 dark:border-blue-800 flex items-center justify-center"};var Cn={__name:"SequentialFlowDiagram",props:{flowSteps:{type:Array,default:()=>[]},progressPercentage:{type:Number,default:0},completedSteps:{type:Number,default:0},totalSteps:{type:Number,default:0}},emits:["step-selected"],setup(e){const t=e,s=(0,l.Fl)((()=>t.completedSteps)),a=(0,l.Fl)((()=>t.totalSteps)),o=(0,l.Fl)((()=>t.flowSteps.reduce(((e,t)=>e+(t.duration||0)),0))),i=(0,l.Fl)((()=>t.flowSteps.some((e=>"success"===e.status)))),u=(0,l.Fl)((()=>t.flowSteps.some((e=>"failed"===e.status)))),d=(0,l.Fl)((()=>t.flowSteps.some((e=>"skipped"===e.status)))),c=(0,l.Fl)((()=>t.flowSteps.some((e=>!0===e.isAlwaysRun))));return(t,g)=>((0,l.wg)(),(0,l.iD)("div",cn,[(0,l._)("div",gn,[g[0]||(g[0]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground"},"Start",-1)),(0,l._)("div",mn,[(0,l._)("div",{class:"h-full bg-green-500 dark:bg-green-600 rounded-full transition-all duration-300 ease-out",style:(0,n.j5)({width:e.progressPercentage+"%"})},null,4)]),g[1]||(g[1]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground"},"End",-1))]),(0,l._)("div",pn,[(0,l._)("span",null,(0,n.zw)(s.value)+"/"+(0,n.zw)(a.value)+" steps successful",1),o.value>0?((0,l.wg)(),(0,l.iD)("span",vn,(0,n.zw)((0,r.SU)(Xl)(o.value))+" total",1)):(0,l.kq)("",!0)]),(0,l._)("div",fn,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.flowSteps,((s,a)=>((0,l.wg)(),(0,l.j4)(dn,{key:a,step:s,index:a,"is-last":a===e.flowSteps.length-1,"previous-step":a>0?e.flowSteps[a-1]:null,onStepClick:e=>t.$emit("step-selected",s,a)},null,8,["step","index","is-last","previous-step","onStepClick"])))),128))]),(0,l._)("div",wn,[g[6]||(g[6]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground mb-2"},"Status Legend",-1)),(0,l._)("div",hn,[i.value?((0,l.wg)(),(0,l.iD)("div",xn,[(0,l._)("div",bn,[(0,l.Wm)((0,r.SU)(Ke.Z),{class:"w-3 h-3 text-white"})]),g[2]||(g[2]=(0,l._)("span",{class:"text-muted-foreground"},"Success",-1))])):(0,l.kq)("",!0),u.value?((0,l.wg)(),(0,l.iD)("div",yn,[(0,l._)("div",kn,[(0,l.Wm)((0,r.SU)(ks.Z),{class:"w-3 h-3 text-white"})]),g[3]||(g[3]=(0,l._)("span",{class:"text-muted-foreground"},"Failed",-1))])):(0,l.kq)("",!0),d.value?((0,l.wg)(),(0,l.iD)("div",_n,[(0,l._)("div",Sn,[(0,l.Wm)((0,r.SU)(Bl.Z),{class:"w-3 h-3 text-white"})]),g[4]||(g[4]=(0,l._)("span",{class:"text-muted-foreground"},"Skipped",-1))])):(0,l.kq)("",!0),c.value?((0,l.wg)(),(0,l.iD)("div",Dn,[(0,l._)("div",Un,[(0,l.Wm)((0,r.SU)(Gl.Z),{class:"w-3 h-3 text-white"})]),g[5]||(g[5]=(0,l._)("span",{class:"text-muted-foreground"},"Always Run",-1))])):(0,l.kq)("",!0)])])]))}};const zn=Cn;var Wn=zn,Hn=s(293),jn=s(322),Rn=s(740);const Fn={class:"flex items-center justify-between p-4 border-b"},Tn={class:"text-lg font-semibold flex items-center gap-2"},En={class:"text-sm text-muted-foreground mt-1"},qn={class:"p-4 space-y-4 overflow-y-auto max-h-[60vh]"},$n={key:0,class:"flex flex-wrap gap-2"},Ln={class:"flex items-center gap-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/30 rounded-lg border border-blue-200 dark:border-blue-700"},Zn={key:1,class:"space-y-2"},Mn={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},An={class:"space-y-2"},Nn={key:2,class:"space-y-2"},Yn={class:"text-sm font-medium flex items-center gap-2"},In={class:"text-xs font-mono text-muted-foreground"},On={key:3,class:"space-y-2"},Pn={class:"text-sm font-medium flex items-center gap-2"},Kn={class:"grid grid-cols-2 gap-4 text-xs"},Vn={class:"font-mono mt-1"},Bn={key:4,class:"space-y-2"},Gn={class:"text-sm font-medium flex items-center gap-2"},Jn={class:"space-y-2 max-h-48 overflow-y-auto"},Xn={class:"flex-shrink-0 mt-0.5"},Qn={class:"flex-1 min-w-0 flex items-center justify-between gap-3"},er={key:5,class:"space-y-2"},tr={class:"text-sm font-medium flex items-center gap-2"},sr={class:"space-y-3 text-xs"},ar={key:0},lr={class:"font-mono mt-1 break-all"},nr={key:1},rr={class:"mt-1 font-medium"},or={key:2},ir={class:"mt-1"},ur={key:3},dr={class:"mt-1"},cr={key:6,class:"space-y-2"},gr={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},mr={class:"space-y-2 max-h-32 overflow-y-auto"};var pr={__name:"StepDetailsModal",props:{step:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["close"],setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.step.status){case"success":return Ke.Z;case"failed":return ks.Z;case"skipped":return Bl.Z;case"not-started":return Jl.Z;default:return Jl.Z}})),o=(0,l.Fl)((()=>{switch(t.step.status){case"success":return"text-green-600 dark:text-green-400";case"failed":return"text-red-600 dark:text-red-400";case"skipped":return"text-gray-600 dark:text-gray-400";default:return"text-blue-600 dark:text-blue-400"}}));return(t,i)=>((0,l.wg)(),(0,l.iD)("div",{class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:i[2]||(i[2]=e=>t.$emit("close"))},[(0,l._)("div",{class:"bg-background border rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",onClick:i[1]||(i[1]=(0,a.iM)((()=>{}),["stop"]))},[(0,l._)("div",Fn,[(0,l._)("div",null,[(0,l._)("h2",Tn,[((0,l.wg)(),(0,l.j4)((0,l.LL)(s.value),{class:(0,n.C_)([o.value,"w-5 h-5"])},null,8,["class"])),(0,l.Uk)(" "+(0,n.zw)(e.step.name),1)]),(0,l._)("p",En," Step "+(0,n.zw)(e.index+1)+" • "+(0,n.zw)((0,r.SU)(Xl)(e.step.duration)),1)]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:i[0]||(i[0]=e=>t.$emit("close"))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(d.Z),{class:"w-4 h-4"})])),_:1})]),(0,l._)("div",qn,[e.step.isAlwaysRun?((0,l.wg)(),(0,l.iD)("div",$n,[(0,l._)("div",Ln,[(0,l.Wm)((0,r.SU)(Gl.Z),{class:"w-4 h-4 text-blue-600 dark:text-blue-400"}),i[3]||(i[3]=(0,l._)("div",null,[(0,l._)("p",{class:"text-sm font-medium text-blue-900 dark:text-blue-200"},"Always Run"),(0,l._)("p",{class:"text-xs text-blue-600 dark:text-blue-400"},"This endpoint is configured to execute even after failures")],-1))])])):(0,l.kq)("",!0),e.step.errors?.length?((0,l.wg)(),(0,l.iD)("div",Zn,[(0,l._)("h3",Mn,[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Errors ("+(0,n.zw)(e.step.errors.length)+") ",1)]),(0,l._)("div",An,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0),e.step.result&&e.step.result.timestamp?((0,l.wg)(),(0,l.iD)("div",Nn,[(0,l._)("h3",Yn,[(0,l.Wm)((0,r.SU)(Hn.Z),{class:"w-4 h-4"}),i[4]||(i[4]=(0,l.Uk)(" Timestamp ",-1))]),(0,l._)("p",In,(0,n.zw)((0,r.SU)(M)(e.step.result.timestamp)),1)])):(0,l.kq)("",!0),e.step.result?((0,l.wg)(),(0,l.iD)("div",On,[(0,l._)("h3",Pn,[(0,l.Wm)((0,r.SU)(jn.Z),{class:"w-4 h-4"}),i[5]||(i[5]=(0,l.Uk)(" Response ",-1))]),(0,l._)("div",Kn,[(0,l._)("div",null,[i[6]||(i[6]=(0,l._)("span",{class:"text-muted-foreground"},"Duration:",-1)),(0,l._)("p",Vn,(0,n.zw)((0,r.SU)(Xl)(e.step.result.duration)),1)]),(0,l._)("div",null,[i[7]||(i[7]=(0,l._)("span",{class:"text-muted-foreground"},"Success:",-1)),(0,l._)("p",{class:(0,n.C_)(["mt-1",e.step.result.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.step.result.success?"Yes":"No"),3)])])])):(0,l.kq)("",!0),e.step.result?.conditionResults?.length?((0,l.wg)(),(0,l.iD)("div",Bn,[(0,l._)("h3",Gn,[(0,l.Wm)((0,r.SU)(Ke.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Condition Results ("+(0,n.zw)(e.step.result.conditionResults.length)+") ",1)]),(0,l._)("div",Jn,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.result.conditionResults,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex items-start gap-3 p-1 rounded-lg border",e.success?"bg-green-50 dark:bg-green-900/30 border-green-200 dark:border-green-700":"bg-red-50 dark:bg-red-900/30 border-red-200 dark:border-red-700"])},[(0,l._)("div",Xn,[e.success?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ke.Z),{key:0,class:"w-4 h-4 text-green-600 dark:text-green-400"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(ks.Z),{key:1,class:"w-4 h-4 text-red-600 dark:text-red-400"}))]),(0,l._)("div",Qn,[(0,l._)("p",{class:(0,n.C_)(["text-sm font-mono break-all",e.success?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"])},(0,n.zw)(e.condition),3),(0,l._)("span",{class:(0,n.C_)(["text-xs font-medium whitespace-nowrap",e.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.success?"Passed":"Failed"),3)])],2)))),128))])])):(0,l.kq)("",!0),e.step.endpoint?((0,l.wg)(),(0,l.iD)("div",er,[(0,l._)("h3",tr,[(0,l.Wm)((0,r.SU)(Rn.Z),{class:"w-4 h-4"}),i[8]||(i[8]=(0,l.Uk)(" Endpoint Configuration ",-1))]),(0,l._)("div",sr,[e.step.endpoint.url?((0,l.wg)(),(0,l.iD)("div",ar,[i[9]||(i[9]=(0,l._)("span",{class:"text-muted-foreground"},"URL:",-1)),(0,l._)("p",lr,(0,n.zw)(e.step.endpoint.url),1)])):(0,l.kq)("",!0),e.step.endpoint.method?((0,l.wg)(),(0,l.iD)("div",nr,[i[10]||(i[10]=(0,l._)("span",{class:"text-muted-foreground"},"Method:",-1)),(0,l._)("p",rr,(0,n.zw)(e.step.endpoint.method),1)])):(0,l.kq)("",!0),e.step.endpoint.interval?((0,l.wg)(),(0,l.iD)("div",or,[i[11]||(i[11]=(0,l._)("span",{class:"text-muted-foreground"},"Interval:",-1)),(0,l._)("p",ir,(0,n.zw)(e.step.endpoint.interval),1)])):(0,l.kq)("",!0),e.step.endpoint.timeout?((0,l.wg)(),(0,l.iD)("div",ur,[i[12]||(i[12]=(0,l._)("span",{class:"text-muted-foreground"},"Timeout:",-1)),(0,l._)("p",dr,(0,n.zw)(e.step.endpoint.timeout),1)])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0),e.step.result?.errors?.length?((0,l.wg)(),(0,l.iD)("div",cr,[(0,l._)("h3",gr,[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Result Errors ("+(0,n.zw)(e.step.result.errors.length)+") ",1)]),(0,l._)("div",mr,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.result.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])])]))}};const vr=pr;var fr=vr;const wr={class:"suite-details-container bg-background min-h-screen"},hr={class:"container mx-auto px-4 py-8 max-w-7xl"},xr={class:"mb-6"},br={class:"flex items-start justify-between"},yr={class:"text-3xl font-bold tracking-tight"},kr={class:"text-muted-foreground mt-2"},_r={key:0},Sr={key:1},Dr={class:"flex items-center gap-2"},Ur={key:0,class:"flex items-center justify-center py-20"},Cr={key:1,class:"text-center py-20"},zr={key:2,class:"space-y-6"},Wr={class:"space-y-4"},Hr={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},jr={class:"text-lg font-medium"},Rr={class:"text-lg font-medium"},Fr={class:"text-lg font-medium"},Tr={class:"text-lg font-medium"},Er={class:"mt-6"},qr={key:0,class:"mt-6"},$r={class:"space-y-2"},Lr={key:0,class:"space-y-2"},Zr=["onClick"],Mr={class:"flex items-center gap-3"},Ar={class:"text-sm font-medium"},Nr={class:"text-xs text-muted-foreground"},Yr={key:1,class:"text-center py-8 text-muted-foreground"};var Ir={__name:"SuiteDetails",setup(e){const t=(0,i.tv)(),s=(0,i.yj)(),a=(0,r.iH)(!1),o=(0,r.iH)(null),u=(0,r.iH)(null),d=(0,r.iH)(null),c=(0,r.iH)(0),g=(0,l.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?[...o.value.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))):[])),m=(0,l.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?u.value||g.value[0]:null)),p=async()=>{const e=!o.value;e&&(a.value=!0);try{const t=await fetch(`/api/v1/suites/${s.params.key}/statuses`,{credentials:"include"});if(200===t.status){const e=await t.json(),s=o.value;if(o.value=e,e.results&&e.results.length>0){const t=[...e.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))),a=!u.value||s?.results&&u.value.timestamp===[...s.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp)))[0]?.timestamp;a&&(u.value=t[0])}}else 404===t.status?o.value=null:console.error("[SuiteDetails][fetchData] Error:",await t.text())}catch(t){console.error("[SuiteDetails][fetchData] Error:",t)}finally{e&&(a.value=!1)}},v=()=>{p()},f=()=>{t.push("/")},w=e=>L(e),h=e=>{const t=new Date(e);return t.toLocaleString()},b=e=>{if(!e||!e.endpointResults||0===e.endpointResults.length)return 0;const t=e.endpointResults.filter((e=>e.success)).length;return Math.round(t/e.endpointResults.length*100)},y=(0,l.Fl)((()=>{if(!m.value||!m.value.endpointResults)return[];const e=m.value.endpointResults;return e.map(((t,s)=>{const a=o.value?.endpoints?.[s],l=e[s+1];let n=!1;for(let r=0;ry.value.filter((e=>"success"===e.status)).length)),S=(0,l.Fl)((()=>y.value.length?Math.round(_.value/y.value.length*100):0)),U=e=>e?e.conditionResults&&e.conditionResults.some((e=>e.condition.includes("SKIP")))?"skipped":e.success?"success":"failed":"not-started",C=(e,t)=>{d.value=e,c.value=t};return(0,l.bv)((()=>{p()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",wr,[(0,l._)("div",hr,[(0,l._)("div",xr,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"sm",onClick:f,class:"mb-4"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ka.Z),{class:"h-4 w-4 mr-2"}),t[1]||(t[1]=(0,l.Uk)(" Back to Dashboard ",-1))])),_:1,__:[1]}),(0,l._)("div",br,[(0,l._)("div",null,[(0,l._)("h1",yr,(0,n.zw)(o.value?.name||"Loading..."),1),(0,l._)("p",kr,[o.value?.group?((0,l.wg)(),(0,l.iD)("span",_r,(0,n.zw)(o.value.group)+" • ",1)):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",Sr,(0,n.zw)(u.value&&u.value.timestamp!==g.value[0]?.timestamp?"Ran":"Last run")+" "+(0,n.zw)(w(m.value.timestamp)),1)):(0,l.kq)("",!0)])]),(0,l._)("div",Dr,[m.value?((0,l.wg)(),(0,l.j4)(tt,{key:0,status:m.value.success?"healthy":"unhealthy"},null,8,["status"])):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:v,title:"Refresh"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ye.Z),{class:"h-5 w-5"})])),_:1})])])]),a.value?((0,l.wg)(),(0,l.iD)("div",Ur,[(0,l.Wm)(de,{size:"lg"})])):o.value?((0,l.wg)(),(0,l.iD)("div",zr,[m.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{key:0},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)(u.value?.timestamp===g.value[0]?.timestamp?"Latest Execution":`Execution at ${h(u.value.timestamp)}`),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Wr,[(0,l._)("div",Hr,[(0,l._)("div",null,[t[4]||(t[4]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Status",-1)),(0,l._)("p",jr,(0,n.zw)(m.value.success?"Success":"Failed"),1)]),(0,l._)("div",null,[t[5]||(t[5]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Duration",-1)),(0,l._)("p",Rr,(0,n.zw)((0,r.SU)(Xl)(m.value.duration)),1)]),(0,l._)("div",null,[t[6]||(t[6]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Endpoints",-1)),(0,l._)("p",Fr,(0,n.zw)(m.value.endpointResults?.length||0),1)]),(0,l._)("div",null,[t[7]||(t[7]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Success Rate",-1)),(0,l._)("p",Tr,(0,n.zw)(b(m.value))+"%",1)])]),(0,l._)("div",Er,[t[8]||(t[8]=(0,l._)("h3",{class:"text-lg font-semibold mb-4"},"Execution Flow",-1)),(0,l.Wm)(Wn,{"flow-steps":y.value,"progress-percentage":S.value,"completed-steps":_.value,"total-steps":y.value.length,onStepSelected:C},null,8,["flow-steps","progress-percentage","completed-steps","total-steps"])]),m.value.errors&&m.value.errors.length>0?((0,l.wg)(),(0,l.iD)("div",qr,[t[9]||(t[9]=(0,l._)("h3",{class:"text-lg font-semibold mb-3 text-red-500"},"Suite Errors",-1)),(0,l._)("div",$r,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(m.value.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 p-3 rounded-md text-sm"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])])),_:1})])),_:1})):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[10]||(t[10]=[(0,l.Uk)("Execution History",-1)]))),_:1,__:[10]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[g.value.length>0?((0,l.wg)(),(0,l.iD)("div",Lr,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors cursor-pointer",{"bg-accent":u.value&&u.value.timestamp===e.timestamp}]),onClick:t=>u.value=e},[(0,l._)("div",Mr,[(0,l.Wm)(tt,{status:e.success?"healthy":"unhealthy",size:"sm"},null,8,["status"]),(0,l._)("div",null,[(0,l._)("p",Ar,(0,n.zw)(h(e.timestamp)),1),(0,l._)("p",Nr,(0,n.zw)(e.endpointResults?.length||0)+" endpoints • "+(0,n.zw)((0,r.SU)(Xl)(e.duration)),1)])]),(0,l.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4 text-muted-foreground"})],10,Zr)))),128))])):((0,l.wg)(),(0,l.iD)("div",Yr," No execution history available "))])),_:1})])),_:1})])):((0,l.wg)(),(0,l.iD)("div",Cr,[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[2]||(t[2]=(0,l._)("h3",{class:"text-lg font-semibold mb-2"},"Suite not found",-1)),t[3]||(t[3]=(0,l._)("p",{class:"text-muted-foreground"},"The requested suite could not be found.",-1))]))]),(0,l.Wm)(ys,{onRefreshData:p}),d.value?((0,l.wg)(),(0,l.j4)(fr,{key:0,step:d.value,index:c.value,onClose:t[0]||(t[0]=e=>d.value=null)},null,8,["step","index"])):(0,l.kq)("",!0)]))}};const Or=(0,T.Z)(Ir,[["__scopeId","data-v-e2a91c9e"]]);var Pr=Or;const Kr=[{path:"/",name:"Home",component:Pa},{path:"/endpoints/:key",name:"EndpointDetails",component:Vl},{path:"/suites/:key",name:"SuiteDetails",component:Pr}],Vr=(0,i.p7)({history:(0,i.PO)("/"),routes:Kr});var Br=Vr;(0,a.ri)(Me).use(Br).mount("#app")}},t={};function s(a){var l=t[a];if(void 0!==l)return l.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,s),n.exports}s.m=e,function(){var e=[];s.O=function(t,a,l,n){if(!a){var r=1/0;for(d=0;d=n)&&Object.keys(s.O).every((function(e){return s.O[e](a[i])}))?a.splice(i--,1):(o=!1,n0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]}}(),function(){s.d=function(e,t){for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){s.p="/"}(),function(){var e={143:0};s.O.j=function(t){return 0===e[t]};var t=function(t,a){var l,n,r=a[0],o=a[1],i=a[2],u=0;if(r.some((function(t){return 0!==e[t]}))){for(l in o)s.o(o,l)&&(s.m[l]=o[l]);if(i)var d=i(s)}for(t&&t(a);u((0,a.wg)(),(0,a.iD)("button",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant,size:e.size}),s.$attrs.class??"")),disabled:e.disabled},[(0,a.WI)(s.$slots,"default")],10,f))}};const x=w;var h=x,b={__name:"Card",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("rounded-lg border bg-card text-card-foreground shadow-sm",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const y=b;var k=y,_={__name:"CardHeader",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("flex flex-col space-y-1.5 p-6",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const S=_;var D=S,U={__name:"CardTitle",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("h3",{class:(0,n.C_)((0,r.SU)(v)("text-2xl font-semibold leading-none tracking-tight",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const C=U;var z=C,W={__name:"CardContent",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("p-6 pt-0",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const j=W;var H=j;const F={id:"social"};function R(e,t){return(0,a.wg)(),(0,a.iD)("div",F,t[0]||(t[0]=[(0,a._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,a._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,a._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)]))}var $=s(744);const T={},q=(0,$.Z)(T,[["render",R],["__scopeId","data-v-788af9ce"]]);var E=q;const Z=e=>{let t=(new Date).getTime()-new Date(e).getTime();if(t<500)return"now";if(t>2592e5){let e=(t/864e5).toFixed(0);return e+" day"+("1"!==e?"s":"")+" ago"}if(t>36e5){let e=(t/36e5).toFixed(0);return e+" hour"+("1"!==e?"s":"")+" ago"}if(t>6e4){let e=(t/6e4).toFixed(0);return e+" minute"+("1"!==e?"s":"")+" ago"}let s=(t/1e3).toFixed(0);return s+" second"+("1"!==s?"s":"")+" ago"},L=(e,t)=>{const s=new Date(e)-new Date(t),l=Math.floor(s/1e3),a=Math.floor(l/60),n=Math.floor(a/60);if(n>0){const e=a%60,t=n+(1===n?" hour":" hours");return e>0?t+" "+e+(1===e?" minute":" minutes"):t}if(a>0){const e=l%60,t=a+(1===a?" minute":" minutes");return e>0?t+" "+e+(1===e?" second":" seconds"):t}return l+(1===l?" second":" seconds")},M=e=>{let t=new Date(e),s=t.getFullYear(),l=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),a=(t.getDate()<10?"0":"")+t.getDate(),n=(t.getHours()<10?"0":"")+t.getHours(),r=(t.getMinutes()<10?"0":"")+t.getMinutes(),o=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+l+"-"+a+" "+n+":"+r+":"+o},A={key:0,class:"space-y-2"},N={key:0,class:"flex items-center gap-2"},Y={class:"text-xs font-semibold"},I={class:"font-mono text-xs"},O={key:1},P={class:"font-mono text-xs"},K={key:0,class:"mt-1 space-y-0.5"},V={class:"truncate"},G={class:"text-muted-foreground"},B={key:0,class:"text-xs text-muted-foreground"},J={class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},X={class:"font-mono text-xs"},Q={key:2},ee={class:"font-mono text-xs space-y-0.5"},te={class:"break-all"},se={key:3},le={class:"font-mono text-xs space-y-0.5"};var ae={__name:"Tooltip",props:{event:{type:[Event,Object],default:null},result:{type:Object,default:null},isPersistent:{type:Boolean,default:!1}},setup(e){const t=(0,u.yj)(),s=e,l=(0,r.iH)(!0),o=(0,r.iH)(0),i=(0,r.iH)(0),d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,a.Fl)((()=>s.result&&void 0!==s.result.endpointResults)),m=(0,a.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.length:0)),p=(0,a.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.filter((e=>e.success)).length:0)),v=async()=>{if(!c.value||!d.value||l.value)return;await(0,a.Y3)();const e=c.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft;let r=e.bottom+s+8,u=e.left+n;const g=window.innerHeight-e.bottom,m=e.top;gt.height+20?e.top+s-t.height-8:m>g?s+10:s+window.innerHeight-t.height-10);const p=window.innerWidth-e.left;p{if(s.event&&s.event.type)if(await(0,a.Y3)(),"mouseenter"!==s.event.type&&"click"!==s.event.type||!d.value)"mouseleave"===s.event.type&&(s.isPersistent||(l.value=!0,c.value=null));else{const e=s.event.target;c.value=e,l.value=!1,await(0,a.Y3)(),await v()}},w=()=>{v()};return(0,a.bv)((()=>{window.addEventListener("resize",w)})),(0,a.Ah)((()=>{window.removeEventListener("resize",w)})),(0,a.YP)((()=>s.event),(e=>{e&&e.type&&("mouseenter"===e.type||"click"===e.type?(l.value=!1,(0,a.Y3)((()=>f()))):"mouseleave"===e.type&&(s.isPersistent||(l.value=!0)))}),{immediate:!0}),(0,a.YP)((()=>s.result),(()=>{l.value||(0,a.Y3)((()=>f()))})),(0,a.YP)((()=>[s.isPersistent,s.result]),(([e,t])=>{e||t?t&&(e||"mouseenter"===s.event?.type)&&(l.value=!1,(0,a.Y3)((()=>f()))):l.value=!0})),(0,a.YP)((()=>t.path),(()=>{l.value=!0,c.value=null})),(t,s)=>((0,a.wg)(),(0,a.iD)("div",{id:"tooltip",ref_key:"tooltip",ref:d,class:(0,n.C_)(["absolute z-50 px-3 py-2 text-sm rounded-md shadow-lg border transition-all duration-200","bg-popover text-popover-foreground border-border",l.value?"invisible opacity-0":"visible opacity-100"]),style:(0,n.j5)(`top: ${o.value}px; left: ${i.value}px;`)},[e.result?((0,a.wg)(),(0,a.iD)("div",A,[g.value?((0,a.wg)(),(0,a.iD)("div",N,[(0,a._)("span",{class:(0,n.C_)(["inline-block w-2 h-2 rounded-full",e.result.success?"bg-green-500":"bg-red-500"])},null,2),(0,a._)("span",Y,(0,n.zw)(e.result.success?"Suite Passed":"Suite Failed"),1)])):(0,a.kq)("",!0),(0,a._)("div",null,[s[0]||(s[0]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Timestamp",-1)),(0,a._)("div",I,(0,n.zw)((0,r.SU)(M)(e.result.timestamp)),1)]),g.value&&e.result.endpointResults?((0,a.wg)(),(0,a.iD)("div",O,[s[1]||(s[1]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Endpoints",-1)),(0,a._)("div",P,[(0,a._)("span",{class:(0,n.C_)(p.value===m.value?"text-green-500":"text-yellow-500")},(0,n.zw)(p.value)+"/"+(0,n.zw)(m.value)+" passed ",3)]),e.result.endpointResults.length>0?((0,a.wg)(),(0,a.iD)("div",K,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.endpointResults.slice(0,5),((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"flex items-center gap-1 text-xs"},[(0,a._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,a._)("span",V,(0,n.zw)(e.name),1),(0,a._)("span",G,"("+(0,n.zw)((e.duration/1e6).toFixed(0))+"ms)",1)])))),128)),e.result.endpointResults.length>5?((0,a.wg)(),(0,a.iD)("div",B," ... and "+(0,n.zw)(e.result.endpointResults.length-5)+" more ",1)):(0,a.kq)("",!0)])):(0,a.kq)("",!0)])):(0,a.kq)("",!0),(0,a._)("div",null,[(0,a._)("div",J,(0,n.zw)(g.value?"Total Duration":"Response Time"),1),(0,a._)("div",X,(0,n.zw)((g.value,(e.result.duration/1e6).toFixed(0)))+"ms ",1)]),!g.value&&e.result.conditionResults&&e.result.conditionResults.length?((0,a.wg)(),(0,a.iD)("div",Q,[s[2]||(s[2]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Conditions",-1)),(0,a._)("div",ee,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.conditionResults,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"flex items-start gap-1"},[(0,a._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,a._)("span",te,(0,n.zw)(e.condition),1)])))),128))])])):(0,a.kq)("",!0),e.result.errors&&e.result.errors.length?((0,a.wg)(),(0,a.iD)("div",se,[s[3]||(s[3]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Errors",-1)),(0,a._)("div",le,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"text-red-500"}," • "+(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])):(0,a.kq)("",!0)],6))}};const ne=ae;var re=ne;const oe={class:"flex justify-center items-center"};var ue={__name:"Loading",props:{size:{type:String,default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)}},setup(e){const t=e,s=(0,a.Fl)((()=>{const e={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"};return e[t.size]||e.md}));return(e,t)=>((0,a.wg)(),(0,a.iD)("div",oe,[(0,a._)("img",{class:(0,n.C_)(["animate-spin rounded-full opacity-60 grayscale",s.value]),src:o,alt:"Gatus logo"},null,2)]))}};const ie=ue;var de=ie;const ce={id:"global",class:"bg-background text-foreground"},ge={key:0,class:"flex items-center justify-center min-h-screen"},me={key:1,class:"relative"},pe={class:"border-b bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/60"},ve={class:"container mx-auto px-4 py-4 max-w-7xl"},fe={class:"flex items-center justify-between"},we={class:"flex items-center gap-4"},xe={class:"w-12 h-12 flex items-center justify-center"},he=["src"],be={key:1,src:o,alt:"Gatus",class:"w-full h-full object-contain"},ye={class:"text-2xl font-bold tracking-tight"},ke={key:0,class:"text-sm text-muted-foreground"},_e={class:"flex items-center gap-2"},Se={key:0,class:"hidden md:flex items-center gap-1"},De=["href"],Ue={key:0,class:"md:hidden mt-4 pt-4 border-t space-y-1"},Ce=["href"],ze={class:"relative"},We={class:"border-t mt-auto"},je={class:"container mx-auto px-4 py-6 max-w-7xl"},He={class:"flex flex-col items-center gap-4"},Fe={key:2,id:"login-container",class:"flex items-center justify-center min-h-screen p-4"},Re={key:0,class:"mb-6"},$e={class:"p-3 rounded-md bg-destructive/10 border border-destructive/20"},Te={class:"text-sm text-destructive text-center"},qe={key:0},Ee={key:1};var Ze={__name:"App",setup(e){const t=(0,u.yj)(),s=(0,r.iH)(!1),l=(0,r.iH)({oidc:!1,authenticated:!0}),g=(0,r.iH)([]),m=(0,r.iH)({}),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!1);let w=null;const x=(0,a.Fl)((()=>window.config?.logo??"")),b=(0,a.Fl)((()=>window.config?.header??"Gatus")),y=(0,a.Fl)((()=>window.config?.link??null)),_=(0,a.Fl)((()=>window.config?.buttons??[])),S=async()=>{try{const e=await fetch("/api/v1/config",{credentials:"include"});if(200===e.status){const t=await e.json();l.value=t,g.value=t.announcements||[]}s.value=!0}catch(e){console.error("Failed to fetch config:",e),s.value=!0}},U=(e,t,s="hover")=>{"click"===s?e?(m.value={result:e,event:t},f.value=!0):(m.value={},f.value=!1):"hover"===s&&(f.value||(m.value={result:e,event:t}))},C=e=>{if(f.value){const t=document.getElementById("tooltip"),s=e.target.closest(".flex-1.h-6, .flex-1.h-8");!t||t.contains(e.target)||s||(m.value={},f.value=!1,window.dispatchEvent(new CustomEvent("clear-data-point-selection")))}};return(0,a.bv)((()=>{S(),w=setInterval(S,6e5),document.addEventListener("click",C)})),(0,a.Ah)((()=>{w&&(clearInterval(w),w=null),document.removeEventListener("click",C)})),(e,u)=>{const w=(0,a.up)("router-view");return(0,a.wg)(),(0,a.iD)("div",ce,[s.value?l.value&&l.value.oidc&&!l.value.authenticated?((0,a.wg)(),(0,a.iD)("div",Fe,[(0,a.Wm)((0,r.SU)(k),{class:"w-full max-w-md"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"text-center"},{default:(0,a.w5)((()=>[u[5]||(u[5]=(0,a._)("img",{src:o,alt:"Gatus",class:"w-20 h-20 mx-auto mb-4"},null,-1)),(0,a.Wm)((0,r.SU)(z),{class:"text-3xl"},{default:(0,a.w5)((()=>u[4]||(u[4]=[(0,a.Uk)("Gatus",-1)]))),_:1,__:[4]}),u[6]||(u[6]=(0,a._)("p",{class:"text-muted-foreground mt-2"},"System Monitoring Dashboard",-1))])),_:1,__:[5,6]}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,r.SU)(t)&&(0,r.SU)(t).query.error?((0,a.wg)(),(0,a.iD)("div",Re,[(0,a._)("div",$e,[(0,a._)("p",Te,["access_denied"===(0,r.SU)(t).query.error?((0,a.wg)(),(0,a.iD)("span",qe," You do not have access to this status page ")):((0,a.wg)(),(0,a.iD)("span",Ee,(0,n.zw)((0,r.SU)(t).query.error),1))])])])):(0,a.kq)("",!0),(0,a._)("a",{href:"/oidc/login",class:"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 bg-primary text-primary-foreground hover:bg-primary/90 h-11 px-8 w-full",onClick:u[2]||(u[2]=e=>v.value=!0)},[v.value?((0,a.wg)(),(0,a.j4)(de,{key:0,size:"xs"})):((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a.Wm)((0,r.SU)(c.Z),{class:"mr-2 h-4 w-4"}),u[7]||(u[7]=(0,a.Uk)(" Login with OIDC ",-1))],64))])])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",me,[(0,a._)("header",pe,[(0,a._)("div",ve,[(0,a._)("div",fe,[(0,a._)("div",we,[((0,a.wg)(),(0,a.j4)((0,a.LL)(y.value?"a":"div"),{href:y.value,target:"_blank",class:"flex items-center gap-3 hover:opacity-80 transition-opacity"},{default:(0,a.w5)((()=>[(0,a._)("div",xe,[x.value?((0,a.wg)(),(0,a.iD)("img",{key:0,src:x.value,alt:"Gatus",class:"w-full h-full object-contain"},null,8,he)):((0,a.wg)(),(0,a.iD)("img",be))]),(0,a._)("div",null,[(0,a._)("h1",ye,(0,n.zw)(b.value),1),_.value&&_.value.length?((0,a.wg)(),(0,a.iD)("p",ke," System Monitoring Dashboard ")):(0,a.kq)("",!0)])])),_:1},8,["href"]))]),(0,a._)("div",_e,[_.value&&_.value.length?((0,a.wg)(),(0,a.iD)("nav",Se,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(_.value,(e=>((0,a.wg)(),(0,a.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors"},(0,n.zw)(e.name),9,De)))),128))])):(0,a.kq)("",!0),_.value&&_.value.length?((0,a.wg)(),(0,a.j4)((0,r.SU)(h),{key:1,variant:"ghost",size:"icon",class:"md:hidden",onClick:u[0]||(u[0]=e=>p.value=!p.value)},{default:(0,a.w5)((()=>[p.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(d.Z),{key:1,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(i.Z),{key:0,class:"h-5 w-5"}))])),_:1})):(0,a.kq)("",!0)])]),_.value&&_.value.length&&p.value?((0,a.wg)(),(0,a.iD)("nav",Ue,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(_.value,(e=>((0,a.wg)(),(0,a.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"block px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",onClick:u[1]||(u[1]=e=>p.value=!1)},(0,n.zw)(e.name),9,Ce)))),128))])):(0,a.kq)("",!0)])]),(0,a._)("main",ze,[(0,a.Wm)(w,{onShowTooltip:U,announcements:g.value},null,8,["announcements"])]),(0,a._)("footer",We,[(0,a._)("div",je,[(0,a._)("div",He,[u[3]||(u[3]=(0,a._)("div",{class:"text-sm text-muted-foreground text-center"},[(0,a.Uk)(" Powered by "),(0,a._)("a",{href:"https://gatus.io",target:"_blank",class:"font-medium text-emerald-800 hover:text-emerald-600"},"Gatus")],-1)),(0,a.Wm)(E)])])])])):((0,a.wg)(),(0,a.iD)("div",ge,[(0,a.Wm)(de,{size:"lg"})])),(0,a.Wm)(re,{result:m.value.result,event:m.value.event,isPersistent:f.value},null,8,["result","event","isPersistent"])])}}};const Le=Ze;var Me=Le,Ae=s(793),Ne=s(138),Ye=s(254),Ie=s(146),Oe=s(485),Pe=s(893),Ke=s(89),Ve=s(372),Ge=s(981);const Be=e=>e?Je(e.state):window.config?.localStateColors.nodata,Je=e=>window.config?.stateColors[e]??window.config?.localStateColors.unknown;var Xe={__name:"StatusBadge",props:{status:{type:String,required:!0}},setup(e){const t=e,s=(0,a.Fl)((()=>t.status?t.status.charAt(0).toUpperCase()+t.status.slice(1).replace(/_/g," "):"Unknown")),l=(0,a.Fl)((()=>Je(t.status)));return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:"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 border-transparent bg-primary text-primary-foreground hover:bg-primary/80 flex items-center gap-1 text-white",style:(0,n.j5)(`background-color: ${l.value};`)},[(0,a._)("span",{style:(0,n.j5)(`background-color: ${l.value}; filter: brightness(115%)`),class:"w-2 h-2 rounded-full"},null,4),(0,a.Uk)(" "+(0,n.zw)(s.value),1)],4))}};const Qe=Xe;var et=Qe;const tt={class:"flex items-start justify-between gap-2 sm:gap-3"},st={class:"flex-1 min-w-0 overflow-hidden"},lt=["title","aria-label"],at={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground min-h-[1.25rem]"},nt=["title"],rt={key:1},ot=["title"],ut={class:"flex-shrink-0 ml-2"},it={class:"space-y-2"},dt={class:"flex items-center justify-between mb-1"},ct=["title"],gt={class:"flex gap-0.5"},mt=["onMouseenter","onMouseleave","onClick"],pt={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var vt={__name:"EndpointCard",props:{endpoint:{type:Object,required:!0},maxResults:{type:Number,default:50},showAverageResponseTime:{type:Boolean,default:!0}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=e,i=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,a.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?o.endpoint.results[o.endpoint.results.length-1]:null)),m=(0,a.Fl)((()=>g.value?g.value.state??(g.value.success?"healthy":"unhealthy"):null)),p=(0,a.Fl)((()=>g.value?.hostname||null)),v=(0,a.Fl)((()=>{const e=[...o.endpoint.results||[]];while(e.length{if(!o.endpoint.results||0===o.endpoint.results.length)return"N/A";let e=0,t=0,s=1/0,l=0;for(const a of o.endpoint.results)if(a.duration){const n=a.duration/1e6;e+=n,t++,s=Math.min(s,n),l=Math.max(l,n)}if(0===t)return"N/A";if(o.showAverageResponseTime){const s=Math.round(e/t);return`~${s}ms`}{const e=Math.round(s),t=Math.round(l);return e===t?`${e}ms`:`${e}-${t}ms`}})),w=(0,a.Fl)((()=>{if(!o.endpoint.results||0===o.endpoint.results.length)return"";const e=Math.max(0,o.endpoint.results.length-o.maxResults);return Z(o.endpoint.results[e].timestamp)})),x=(0,a.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?Z(o.endpoint.results[o.endpoint.results.length-1].timestamp):"")),h=e=>d.value===e||c.value===e,b=()=>{s.push(`/endpoints/${o.endpoint.key}`)},y=(e,t,s)=>{c.value=s,i("showTooltip",e,t,"hover")},_=(e,t)=>{c.value=null,i("showTooltip",null,t,"hover")},S=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,i("showTooltip",null,t,"click")):(d.value=s,i("showTooltip",e,t,"click"))},U=()=>{d.value=null};return(0,a.bv)((()=>{window.addEventListener("clear-data-point-selection",U)})),(0,a.Ah)((()=>{window.removeEventListener("clear-data-point-selection",U)})),(t,s)=>((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{class:"endpoint h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"endpoint-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,a.w5)((()=>[(0,a._)("div",tt,[(0,a._)("div",st,[(0,a.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,a.w5)((()=>[(0,a._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:b,onKeydown:(0,l.D2)(b,["enter"]),title:e.endpoint.name,role:"link",tabindex:"0","aria-label":`View details for ${e.endpoint.name}`},(0,n.zw)(e.endpoint.name),41,lt)])),_:1}),(0,a._)("div",at,[e.endpoint.group?((0,a.wg)(),(0,a.iD)("span",{key:0,class:"truncate",title:e.endpoint.group},(0,n.zw)(e.endpoint.group),9,nt)):(0,a.kq)("",!0),e.endpoint.group&&p.value?((0,a.wg)(),(0,a.iD)("span",rt,"•")):(0,a.kq)("",!0),p.value?((0,a.wg)(),(0,a.iD)("span",{key:2,class:"truncate",title:p.value},(0,n.zw)(p.value),9,ot)):(0,a.kq)("",!0)])]),(0,a._)("div",ut,[(0,a.Wm)(et,{status:m.value},null,8,["status"])])])])),_:1}),(0,a.Wm)((0,r.SU)(H),{class:"endpoint-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,a.w5)((()=>[(0,a._)("div",it,[(0,a._)("div",null,[(0,a._)("div",dt,[s[0]||(s[0]=(0,a._)("div",{class:"flex-1"},null,-1)),(0,a._)("p",{class:"text-xs text-muted-foreground",title:e.showAverageResponseTime?"Average response time":"Minimum and maximum response time"},(0,n.zw)(f.value),9,ct)]),(0,a._)("div",gt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(v.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":""]),style:(0,n.j5)(`background-color: ${(0,r.SU)(Be)(e)}; filter: ${h(t)?"brightness(75%)":"none"}`),onMouseenter:s=>e&&y(e,s,t),onMouseleave:t=>e&&_(e,t),onClick:(0,l.iM)((s=>e&&S(e,s,t)),["stop"])},null,46,mt)))),128))]),(0,a._)("div",pt,[(0,a._)("span",null,(0,n.zw)(w.value),1),(0,a._)("span",null,(0,n.zw)(x.value),1)])])])])),_:1})])),_:1}))}};const ft=vt;var wt=ft;const xt={class:"flex items-start justify-between gap-2 sm:gap-3"},ht={class:"flex-1 min-w-0 overflow-hidden"},bt=["title","aria-label"],yt={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground"},kt=["title"],_t={key:1},St={key:2},Dt={class:"flex-shrink-0 ml-2"},Ut={class:"space-y-2"},Ct={class:"flex items-center justify-between mb-1"},zt={class:"text-xs text-muted-foreground"},Wt={key:0,class:"text-xs text-muted-foreground"},jt={class:"flex gap-0.5"},Ht=["onMouseenter","onMouseleave","onClick"],Ft={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var Rt={__name:"SuiteCard",props:{suite:{type:Object,required:!0},maxResults:{type:Number,default:50}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=e,i=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,a.Fl)((()=>{const e=[...o.suite.results||[]];while(e.lengtho.suite.results&&0!==o.suite.results.length?o.suite.results[o.suite.results.length-1].success?"healthy":"unhealthy":null)),p=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results[o.suite.results.length-1];return e.endpointResults?e.endpointResults.length:0})),v=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results.filter((e=>e.success)).length;return Math.round(e/o.suite.results.length*100)})),f=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return null;const e=o.suite.results.reduce(((e,t)=>e+(t.duration||0)),0);return Math.round(e/o.suite.results.length/1e6)})),w=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"N/A";const e=o.suite.results[0];return Z(e.timestamp)})),x=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"Now";const e=o.suite.results[o.suite.results.length-1];return Z(e.timestamp)})),h=e=>d.value===e||c.value===e,b=()=>{s.push(`/suites/${o.suite.key}`)},y=(e,t,s)=>{c.value=s,i("showTooltip",e,t,"hover")},_=(e,t)=>{c.value=null,i("showTooltip",null,t,"hover")},S=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,i("showTooltip",null,t,"click")):(d.value=s,i("showTooltip",e,t,"click"))},U=e=>(e&&!e.state&&(e.state=e.success?"healthy":"unhealthy"),Be(e)),C=()=>{d.value=null};return(0,a.bv)((()=>{window.addEventListener("clear-data-point-selection",C)})),(0,a.Ah)((()=>{window.removeEventListener("clear-data-point-selection",C)})),(t,s)=>((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{class:"suite h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"suite-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,a.w5)((()=>[(0,a._)("div",xt,[(0,a._)("div",ht,[(0,a.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,a.w5)((()=>[(0,a._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:b,onKeydown:(0,l.D2)(b,["enter"]),title:e.suite.name,role:"link",tabindex:"0","aria-label":`View details for suite ${e.suite.name}`},(0,n.zw)(e.suite.name),41,bt)])),_:1}),(0,a._)("div",yt,[e.suite.group?((0,a.wg)(),(0,a.iD)("span",{key:0,class:"truncate",title:e.suite.group},(0,n.zw)(e.suite.group),9,kt)):(0,a.kq)("",!0),e.suite.group&&p.value?((0,a.wg)(),(0,a.iD)("span",_t,"•")):(0,a.kq)("",!0),p.value?((0,a.wg)(),(0,a.iD)("span",St,(0,n.zw)(p.value)+" endpoint"+(0,n.zw)(1!==p.value?"s":""),1)):(0,a.kq)("",!0)])]),(0,a._)("div",Dt,[(0,a.Wm)(et,{status:m.value},null,8,["status"])])])])),_:1}),(0,a.Wm)((0,r.SU)(H),{class:"suite-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,a.w5)((()=>[(0,a._)("div",Ut,[(0,a._)("div",null,[(0,a._)("div",Ct,[(0,a._)("p",zt,"Success Rate: "+(0,n.zw)(v.value)+"%",1),f.value?((0,a.wg)(),(0,a.iD)("p",Wt,(0,n.zw)(f.value)+"ms avg",1)):(0,a.kq)("",!0)]),(0,a._)("div",jt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":""]),style:(0,n.j5)(`background-color: ${U(e)}; filter: ${h(t)?"brightness(75%)":"none"}`),onMouseenter:s=>e&&y(e,s,t),onMouseleave:t=>e&&_(e,t),onClick:(0,l.iM)((s=>e&&S(e,s,t)),["stop"])},null,46,Ht)))),128))]),(0,a._)("div",Ft,[(0,a._)("span",null,(0,n.zw)(w.value),1),(0,a._)("span",null,(0,n.zw)(x.value),1)])])])])),_:1})])),_:1}))}};const $t=(0,$.Z)(Rt,[["__scopeId","data-v-49521099"]]);var Tt=$t,qt=s(275);const Et=["value"];var Zt={__name:"Input",props:{modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(e){return(t,s)=>((0,a.wg)(),(0,a.iD)("input",{class:(0,n.C_)((0,r.SU)(v)("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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.$attrs.class??"")),value:e.modelValue,onInput:s[0]||(s[0]=e=>t.$emit("update:modelValue",e.target.value))},null,42,Et))}};const Lt=Zt;var Mt=Lt,At=s(368);const Nt=["aria-expanded","aria-label"],Yt={class:"truncate"},It={key:0,role:"listbox",class:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95"},Ot={class:"p-1"},Pt=["onClick","aria-selected"],Kt={class:"absolute left-1.5 sm:left-2 flex h-3.5 w-3.5 items-center justify-center"};var Vt={__name:"Select",props:{modelValue:{type:String,default:""},options:{type:Array,required:!0},placeholder:{type:String,default:"Select..."},class:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,l=t,o=(0,r.iH)(!1),u=(0,r.iH)(null),i=(0,r.iH)(-1),d=(0,a.Fl)((()=>s.options.find((e=>e.value===s.modelValue))||{label:s.placeholder,value:""})),c=e=>{l("update:modelValue",e.value),o.value=!1},g=()=>{if(o.value=!o.value,o.value){const e=s.options.findIndex((e=>e.value===s.modelValue));i.value=e>=0?e:0}else i.value=-1},m=e=>{u.value&&!u.value.contains(e.target)&&(o.value=!1,i.value=-1)},p=e=>{if(o.value)switch(e.key){case"ArrowDown":e.preventDefault(),i.value=Math.min(i.value+1,s.options.length-1);break;case"ArrowUp":e.preventDefault(),i.value=Math.max(i.value-1,0);break;case"Enter":case" ":e.preventDefault(),i.value>=0&&i.value{document.addEventListener("click",m)})),(0,a.Ah)((()=>{document.removeEventListener("click",m)})),(t,l)=>((0,a.wg)(),(0,a.iD)("div",{ref_key:"selectRef",ref:u,class:(0,n.C_)(["relative",s.class])},[(0,a._)("button",{onClick:g,onKeydown:p,"aria-expanded":o.value,"aria-haspopup":!0,"aria-label":d.value.label||s.placeholder,class:"flex h-9 sm:h-10 w-full items-center justify-between rounded-md border border-input bg-background px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm: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"},[(0,a._)("span",Yt,(0,n.zw)(d.value.label),1),(0,a.Wm)((0,r.SU)(Oe.Z),{class:"h-3 w-3 sm:h-4 sm:w-4 opacity-50 flex-shrink-0 ml-1"})],40,Nt),o.value?((0,a.wg)(),(0,a.iD)("div",It,[(0,a._)("div",Ot,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.options,((t,s)=>((0,a.wg)(),(0,a.iD)("div",{key:t.value,onClick:e=>c(t),class:(0,n.C_)(["relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-6 sm:pl-8 pr-2 text-xs sm:text-sm outline-none hover:bg-accent hover:text-accent-foreground",s===i.value&&"bg-accent text-accent-foreground"]),role:"option","aria-selected":e.modelValue===t.value},[(0,a._)("span",Kt,[e.modelValue===t.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(At.Z),{key:0,class:"h-3 w-3 sm:h-4 sm:w-4"})):(0,a.kq)("",!0)]),(0,a.Uk)(" "+(0,n.zw)(t.label),1)],10,Pt)))),128))])])):(0,a.kq)("",!0)],2))}};const Gt=Vt;var Bt=Gt;const Jt={class:"flex flex-col lg:flex-row gap-3 lg:gap-4 p-3 sm:p-4 bg-card rounded-lg border"},Xt={class:"flex-1"},Qt={class:"relative"},es={class:"flex flex-col sm:flex-row gap-3 sm:gap-4"},ts={class:"flex items-center gap-2 flex-1 sm:flex-initial"},ss={class:"flex items-center gap-2 flex-1 sm:flex-initial"};var ls={__name:"SearchBar",emits:["search","update:showOnlyFailing","update:showRecentFailures","update:groupByGroup","update:sortBy","initializeCollapsedGroups"],setup(e,{emit:t}){const s=(0,r.iH)(""),l=(0,r.iH)(localStorage.getItem("gatus:filter-by")||"undefined"!==typeof window&&window.config?.defaultFilterBy||"none"),n=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"undefined"!==typeof window&&window.config?.defaultSortBy||"name"),o=[{label:"None",value:"none"},{label:"Failing",value:"failing"},{label:"Unstable",value:"unstable"}],u=[{label:"Name",value:"name"},{label:"Group",value:"group"},{label:"Health",value:"health"}],i=t,d=(e,t=!0)=>{l.value=e,t&&localStorage.setItem("gatus:filter-by",e),i("update:showOnlyFailing",!1),i("update:showRecentFailures",!1),"failing"===e?i("update:showOnlyFailing",!0):"unstable"===e&&i("update:showRecentFailures",!0)},c=(e,t=!0)=>{n.value=e,t&&localStorage.setItem("gatus:sort-by",e),i("update:sortBy",e),i("update:groupByGroup","group"===e),"group"===e&&i("initializeCollapsedGroups")};return(0,a.bv)((()=>{d(l.value,!1),c(n.value,!1)})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",Jt,[(0,a._)("div",Xt,[(0,a._)("div",Qt,[(0,a.Wm)((0,r.SU)(qt.Z),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t[4]||(t[4]=(0,a._)("label",{for:"search-input",class:"sr-only"},"Search endpoints",-1)),(0,a.Wm)((0,r.SU)(Mt),{id:"search-input",modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),type:"text",placeholder:"Search endpoints...",class:"pl-10 text-sm sm:text-base",onInput:t[1]||(t[1]=t=>e.$emit("search",s.value))},null,8,["modelValue"])])]),(0,a._)("div",es,[(0,a._)("div",ts,[t[5]||(t[5]=(0,a._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Filter by:",-1)),(0,a.Wm)((0,r.SU)(Bt),{modelValue:l.value,"onUpdate:modelValue":[t[2]||(t[2]=e=>l.value=e),d],options:o,placeholder:"None",class:"flex-1 sm:w-[140px] md:w-[160px]"},null,8,["modelValue"])]),(0,a._)("div",ss,[t[6]||(t[6]=(0,a._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Sort by:",-1)),(0,a.Wm)((0,r.SU)(Bt),{modelValue:n.value,"onUpdate:modelValue":[t[3]||(t[3]=e=>n.value=e),c],options:u,placeholder:"Name",class:"flex-1 sm:w-[90px] md:w-[100px]"},null,8,["modelValue"])])])]))}};const as=ls;var ns=as,rs=s(789),os=s(679);const us={id:"settings",class:"fixed bottom-4 left-4 z-50"},is={class:"flex items-center gap-1 bg-background/95 backdrop-blur-sm border rounded-full shadow-md p-1"},ds=["aria-label","aria-expanded"],cs={class:"text-xs font-medium"},gs=["onClick"],ms=["aria-label"],ps={class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap"},vs="300",fs="theme",ws=31536e3;var xs={__name:"Settings",emits:["refreshData"],setup(e,{emit:t}){const s=t,o=[{value:"10",label:"10s"},{value:"30",label:"30s"},{value:"60",label:"1m"},{value:"120",label:"2m"},{value:"300",label:"5m"},{value:"600",label:"10m"}],u={REFRESH_INTERVAL:"gatus:refresh-interval"};function i(){const e=document.cookie.match(new RegExp(`${fs}=(dark|light);?`))?.[1];return"dark"===e||!e&&(window.matchMedia("(prefers-color-scheme: dark)").matches||document.documentElement.classList.contains("dark"))}function d(){const e=localStorage.getItem(u.REFRESH_INTERVAL),t=e&&parseInt(e),s=t&&t>=10&&o.some((t=>t.value===e));return s?e:vs}const c=(0,r.iH)(d()),g=(0,r.iH)(i()),m=(0,r.iH)(!1);let p=null;const v=e=>{const t=o.find((t=>t.value===e));return t?t.label:`${e}s`},f=e=>{localStorage.setItem(u.REFRESH_INTERVAL,e),p&&clearInterval(p),p=setInterval((()=>{w()}),1e3*e)},w=()=>{s("refreshData")},x=e=>{c.value=e,m.value=!1,w(),f(e)},h=e=>{const t=document.getElementById("settings");t&&!t.contains(e.target)&&(m.value=!1)},b=e=>{document.cookie=`${fs}=${e}; path=/; max-age=${ws}; samesite=strict`},y=()=>{const e=i()?"light":"dark";b(e),k()},k=()=>{const e=i();g.value=e,document.documentElement.classList.toggle("dark",e)};return(0,a.bv)((()=>{f(c.value),k(),document.addEventListener("click",h)})),(0,a.Ah)((()=>{p&&clearInterval(p),document.removeEventListener("click",h)})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",us,[(0,a._)("div",is,[(0,a._)("button",{onClick:t[1]||(t[1]=e=>m.value=!m.value),"aria-label":`Refresh interval: ${v(c.value)}`,"aria-expanded":m.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-full hover:bg-accent transition-colors relative"},[(0,a.Wm)((0,r.SU)(Ye.Z),{class:"w-3.5 h-3.5 text-muted-foreground"}),(0,a._)("span",cs,(0,n.zw)(v(c.value)),1),m.value?((0,a.wg)(),(0,a.iD)("div",{key:0,onClick:t[0]||(t[0]=(0,l.iM)((()=>{}),["stop"])),class:"absolute bottom-full left-0 mb-2 bg-popover border rounded-lg shadow-lg overflow-hidden"},[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(o,(e=>(0,a._)("button",{key:e.value,onClick:t=>x(e.value),class:(0,n.C_)(["block w-full px-4 py-2 text-xs text-left hover:bg-accent transition-colors",c.value===e.value&&"bg-accent"])},(0,n.zw)(e.label),11,gs))),64))])):(0,a.kq)("",!0)],8,ds),t[2]||(t[2]=(0,a._)("div",{class:"h-5 w-px bg-border/50"},null,-1)),(0,a._)("button",{onClick:y,"aria-label":g.value?"Switch to light mode":"Switch to dark mode",class:"p-1.5 rounded-full hover:bg-accent transition-colors group relative"},[g.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(rs.Z),{key:0,class:"h-3.5 w-3.5 transition-all"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(os.Z),{key:1,class:"h-3.5 w-3.5 transition-all"})),(0,a._)("div",ps,(0,n.zw)(g.value?"Light mode":"Dark mode"),1)],8,ms)])]))}};const hs=(0,$.Z)(xs,[["__scopeId","data-v-477a96cc"]]);var bs=hs,ys=s(691),ks=s(446),_s=s(5),Ss=s(337),Ds=s(441),Us=s(424);const Cs=e=>null===e||void 0===e?"":String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),zs=new Ds.TU.Renderer;zs.link=(e,t,s)=>{const l="object"===typeof e&&null!==e?e:null,a=l?l.href:e,n=l?l.title:t,r=l?l.text:s,o=Cs(a||""),u=n?` title="${Cs(n)}"`:"",i=r||"";return`${i}`},Ds.TU.use({renderer:zs,breaks:!0,gfm:!0,headerIds:!1,mangle:!1});const Ws=e=>{if(!e)return"";const t=String(e),s=Ds.TU.parse(t);return Us.Z.sanitize(s,{ADD_ATTR:["target","rel"]})},js={key:0,class:"announcement-container mb-6"},Hs={class:"flex items-center justify-between"},Fs={class:"flex items-center gap-2"},Rs={class:"text-xs text-gray-500 dark:text-gray-400"},$s={key:0,class:"announcement-content p-4 transition-all duration-200 rounded-b-lg"},Ts={class:"relative"},qs={class:"space-y-3"},Es={class:"flex items-center gap-3 mb-2 relative"},Zs={class:"relative z-10 bg-white dark:bg-gray-800 px-2 py-1 rounded-md border border-gray-200 dark:border-gray-600"},Ls={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},Ms={class:"space-y-2 ml-7 relative"},As={key:0,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:{left:"-16px",top:"-2.5rem",height:"calc(50% + 2.5rem)"}},Ns={class:"flex items-center gap-3"},Ys=["title"],Is={class:"flex-1 min-w-0"},Os=["innerHTML"];var Ps={__name:"AnnouncementBanner",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),l=()=>{s.value=!s.value},o={outage:{icon:ys.Z,background:"bg-red-50 border-gray-200 dark:bg-red-900/50 dark:border-gray-600",border:"border-red-500",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:ks.Z,background:"bg-yellow-50 border-gray-200 dark:bg-yellow-900/50 dark:border-gray-600",border:"border-yellow-500",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:_s.Z,background:"bg-blue-50 border-gray-200 dark:bg-blue-900/50 dark:border-gray-600",border:"border-blue-500",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ke.Z,background:"bg-green-50 border-gray-200 dark:bg-green-900/50 dark:border-gray-600",border:"border-green-500",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Ss.Z,background:"bg-gray-50 border-gray-200 dark:bg-gray-800/50 dark:border-gray-600",border:"border-gray-500",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},u=(0,a.Fl)((()=>t.announcements&&t.announcements.length>0?t.announcements[0]:null)),i=(0,a.Fl)((()=>{const e=u.value?.type||"none";return o[e]?.icon||Ss.Z})),d=(0,a.Fl)((()=>{const e=u.value?.type||"none";return o[e]?.iconColor||"text-gray-600 dark:text-gray-400"})),c=(0,a.Fl)((()=>{const e=u.value?.type||"none",t=o[e];return`border-l-4 ${t.border.replace("border-","border-l-")}`})),g=(0,a.Fl)((()=>{if(!t.announcements||0===t.announcements.length)return{};const e={};return t.announcements.forEach((t=>{const s=new Date(t.timestamp).toDateString();e[s]||(e[s]=[]),e[s].push(t)})),e})),m=e=>o[e]?.icon||Ss.Z,p=e=>o[e]||o.none,v=e=>{const t=new Date(e),s=new Date,l=new Date(s);return l.setDate(l.getDate()-1),t.toDateString()===s.toDateString()?"Today":t.toDateString()===l.toDateString()?"Yesterday":t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},f=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),w=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,o)=>e.announcements&&e.announcements.length?((0,a.wg)(),(0,a.iD)("div",js,[(0,a._)("div",{class:(0,n.C_)(["rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",c.value])},[(0,a._)("div",{class:(0,n.C_)(["announcement-header px-4 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",s.value?"rounded-lg":"rounded-t-lg border-b border-gray-200 dark:border-gray-600"]),onClick:l},[(0,a._)("div",Hs,[(0,a._)("div",Fs,[((0,a.wg)(),(0,a.j4)((0,a.LL)(i.value),{class:(0,n.C_)(["w-5 h-5",d.value])},null,8,["class"])),o[0]||(o[0]=(0,a._)("h2",{class:"text-base font-semibold text-gray-900 dark:text-gray-100"},"Announcements",-1)),(0,a._)("span",Rs," ("+(0,n.zw)(e.announcements.length)+") ",1)]),(0,a.Wm)((0,r.SU)(Oe.Z),{class:(0,n.C_)(["w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200",s.value?"-rotate-90":"rotate-0"])},null,8,["class"])])],2),s.value?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",$s,[(0,a._)("div",Ts,[(0,a._)("div",qs,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"relative"},[(0,a._)("div",Es,[(0,a._)("div",Zs,[(0,a._)("time",Ls,(0,n.zw)(v(t)),1)]),o[1]||(o[1]=(0,a._)("div",{class:"flex-1 border-t border-gray-200 dark:border-gray-600"},null,-1))]),(0,a._)("div",Ms,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,((s,l)=>((0,a.wg)(),(0,a.iD)("div",{key:`${t}-${l}-${s.timestamp}`,class:"relative"},[(0,a._)("div",{class:(0,n.C_)(["absolute -left-[26px] w-5 h-5 rounded-full border bg-white dark:bg-gray-800 flex items-center justify-center z-10",l===e.length-1?"top-3":"top-1/2 -translate-y-1/2",p(s.type).border])},[((0,a.wg)(),(0,a.j4)((0,a.LL)(m(s.type)),{class:(0,n.C_)(["w-3 h-3",p(s.type).iconColor])},null,8,["class"]))],2),0===l?((0,a.wg)(),(0,a.iD)("div",As)):(0,a.kq)("",!0),l[]}},setup(e){const t=e,s=(0,r.iH)(!1),l={outage:{icon:ys.Z,background:"bg-red-50 dark:bg-red-900/20",borderColor:"border-red-500 dark:border-red-400",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:ks.Z,background:"bg-yellow-50 dark:bg-yellow-900/20",borderColor:"border-yellow-500 dark:border-yellow-400",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:_s.Z,background:"bg-blue-50 dark:bg-blue-900/20",borderColor:"border-blue-500 dark:border-blue-400",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ke.Z,background:"bg-green-50 dark:bg-green-900/20",borderColor:"border-green-500 dark:border-green-400",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Ss.Z,background:"bg-gray-50 dark:bg-gray-800/20",borderColor:"border-gray-500 dark:border-gray-400",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},o=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},u=(0,a.Fl)((()=>{if(!t.announcements?.length)return{};const e={};let l=new Date;t.announcements.forEach((t=>{const s=new Date(t.timestamp),a=s.toDateString();e[a]=e[a]||[],e[a].push(t),s=n;t.setDate(t.getDate()-1))r[t.toDateString()]=e[t.toDateString()]||[];return r})),i=(0,a.Fl)((()=>{if(!t.announcements?.length)return!1;const e=new Date(o(new Date).getTime()-12096e5);return t.announcements.some((t=>new Date(t.timestamp)l[e]?.icon||Ss.Z,c=e=>l[e]||l.none,g=e=>{const t=new Date(e);return t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},m=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),p=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,l)=>e.announcements&&e.announcements.length?((0,a.wg)(),(0,a.iD)("div",Gs,[l[3]||(l[3]=(0,a._)("h2",{class:"text-2xl font-semibold text-foreground mb-6"},"Past Announcements",-1)),(0,a._)("div",Bs,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(u.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t},[(0,a._)("div",Js,[(0,a._)("h3",Xs,(0,n.zw)(g(t)),1)]),e.length>0?((0,a.wg)(),(0,a.iD)("div",Qs,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,((e,s)=>((0,a.wg)(),(0,a.iD)("div",{key:`${t}-${s}-${e.timestamp}`,class:(0,n.C_)(["border-l-4 p-4 transition-all duration-200",c(e.type).background,c(e.type).borderColor])},[(0,a._)("div",el,[((0,a.wg)(),(0,a.j4)((0,a.LL)(d(e.type)),{class:(0,n.C_)(["w-5 h-5 flex-shrink-0 mt-0.5",c(e.type).iconColor])},null,8,["class"])),(0,a._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0 mt-0.5",c(e.type).text]),title:p(e.timestamp)},(0,n.zw)(m(e.timestamp)),11,tl),(0,a._)("div",sl,[(0,a._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(Ws)(e.message)},null,8,ll)])])],2)))),128))])):((0,a.wg)(),(0,a.iD)("div",al,l[1]||(l[1]=[(0,a._)("p",{class:"text-sm italic text-muted-foreground/60"}," No incidents reported on this day ",-1)])))])))),128)),i.value&&!s.value?((0,a.wg)(),(0,a.iD)("div",nl,[(0,a._)("button",{onClick:l[0]||(l[0]=e=>s.value=!0),class:"inline-flex items-center gap-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-200 cursor-pointer group"},[(0,a.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4 group-hover:translate-y-0.5 transition-transform duration-200"}),l[2]||(l[2]=(0,a._)("span",{class:"group-hover:underline"},"View older announcements",-1))])])):(0,a.kq)("",!0)])])):(0,a.kq)("",!0)}};const ol=rl;var ul=ol;const il={class:"dashboard-container bg-background"},dl={class:"container mx-auto px-4 py-8 max-w-7xl"},cl={class:"mb-6"},gl={class:"flex items-center justify-between mb-6"},ml={class:"text-4xl font-bold tracking-tight"},pl={class:"text-muted-foreground mt-2"},vl={class:"flex items-center gap-4"},fl={key:0,class:"flex items-center justify-center py-20"},wl={key:1,class:"text-center py-20"},xl={class:"text-muted-foreground"},hl={key:2},bl={key:0,class:"space-y-6"},yl=["onClick"],kl={class:"flex items-center gap-3"},_l={class:"text-xl font-semibold text-foreground"},Sl={class:"flex items-center gap-2"},Dl={key:0,class:"bg-red-600 text-white px-2 py-1 rounded-full text-sm font-medium"},Ul={key:0,class:"endpoint-group-content p-4"},Cl={key:0,class:"mb-4"},zl={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Wl={key:1},jl={key:0,class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},Hl={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Fl={key:1},Rl={key:0,class:"mb-6"},$l={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Tl={key:1},ql={key:0,class:"text-lg font-semibold text-foreground mb-3"},El={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Zl={key:2,class:"mt-8 flex items-center justify-center gap-2"},Ll={class:"flex gap-1"},Ml={key:3,class:"mt-12 pb-8"},Al=96,Nl=50;var Yl={__name:"Home",props:{announcements:{type:Array,default:()=>[]}},emits:["showTooltip"],setup(e,{emit:t}){const s=e,l=(0,a.Fl)((()=>s.announcements?s.announcements.filter((e=>!e.archived)):[])),o=(0,a.Fl)((()=>s.announcements?s.announcements.filter((e=>e.archived)):[])),u=t,i=(0,r.iH)([]),d=(0,r.iH)([]),c=(0,r.iH)(!1),g=(0,r.iH)(1),m=(0,r.iH)(""),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!0),w=(0,r.iH)(!1),x=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"name"),b=(0,r.iH)(new Set),y=(0,a.Fl)((()=>{let e=[...i.value];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success}))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===x.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,l=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&l?-1:s&&!l?1:e.name.localeCompare(t.name)})),e})),k=(0,a.Fl)((()=>{let e=[...d.value||[]];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===x.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,l=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&l?-1:s&&!l?1:e.name.localeCompare(t.name)})),e})),_=(0,a.Fl)((()=>Math.ceil((y.value.length+k.value.length)/Al))),S=(0,a.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]=[]),e[s].push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),D=(0,a.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].endpoints.push(t)})),k.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].suites.push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),U=(0,a.Fl)((()=>{if(w.value)return S.value;const e=(g.value-1)*Al,t=e+Al;return y.value.slice(e,t)})),C=(0,a.Fl)((()=>{if(w.value)return k.value;const e=(g.value-1)*Al,t=e+Al;return k.value.slice(e,t)})),z=(0,a.Fl)((()=>{const e=[],t=5;let s=Math.max(1,g.value-Math.floor(t/2)),l=Math.min(_.value,s+t-1);l-s{const e=0===i.value.length&&0===d.value.length;e&&(c.value=!0);try{const t=await fetch(`/api/v1/endpoints/statuses?page=1&pageSize=${Nl}`,{credentials:"include"});if(200===t.status){const e=await t.json();i.value=e}else console.error("[Home][fetchData] Error fetching endpoints:",await t.text());const s=await fetch(`/api/v1/suites/statuses?page=1&pageSize=${Nl}`,{credentials:"include"});if(200===s.status){const e=await s.json();d.value=e||[]}else console.error("[Home][fetchData] Error fetching suites:",await s.text()),d.value||(d.value=[])}catch(t){console.error("[Home][fetchData] Error:",t)}finally{e&&(c.value=!1)}},j=()=>{i.value=[],d.value=[],W()},H=e=>{m.value=e,g.value=1},F=e=>{g.value=e,window.scrollTo({top:0,behavior:"smooth"})},R=()=>{f.value=!f.value},$=(e,t,s="hover")=>{u("showTooltip",e,t,s)},T=e=>e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success})).length,q=e=>e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success)).length,E=e=>{b.value.has(e)?b.value.delete(e):b.value.add(e);const t=Array.from(b.value);localStorage.setItem("gatus:uncollapsed-groups",JSON.stringify(t)),localStorage.removeItem("gatus:collapsed-groups")},Z=()=>{try{const e=localStorage.getItem("gatus:uncollapsed-groups");e&&(b.value=new Set(JSON.parse(e)))}catch(e){console.warn("Failed to parse saved uncollapsed groups:",e),localStorage.removeItem("gatus:uncollapsed-groups")}},L=(0,a.Fl)((()=>window.config?.dashboardHeading??"Health Dashboard")),M=(0,a.Fl)((()=>window.config?.dashboardSubheading??"Monitor the health of your endpoints in real-time"));return(0,a.bv)((()=>{W()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",il,[(0,a._)("div",dl,[(0,a._)("div",cl,[(0,a._)("div",gl,[(0,a._)("div",null,[(0,a._)("h1",ml,(0,n.zw)(L.value),1),(0,a._)("p",pl,(0,n.zw)(M.value),1)]),(0,a._)("div",vl,[(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:R,title:f.value?"Show min-max response time":"Show average response time"},{default:(0,a.w5)((()=>[f.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ae.Z),{key:0,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ne.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:j,title:"Refresh data"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ye.Z),{class:"h-5 w-5"})])),_:1})])]),(0,a.Wm)(Vs,{announcements:l.value},null,8,["announcements"]),(0,a.Wm)(ns,{onSearch:H,"onUpdate:showOnlyFailing":t[0]||(t[0]=e=>p.value=e),"onUpdate:showRecentFailures":t[1]||(t[1]=e=>v.value=e),"onUpdate:groupByGroup":t[2]||(t[2]=e=>w.value=e),"onUpdate:sortBy":t[3]||(t[3]=e=>x.value=e),onInitializeCollapsedGroups:Z})]),c.value?((0,a.wg)(),(0,a.iD)("div",fl,[(0,a.Wm)(de,{size:"lg"})])):0===y.value.length&&0===k.value.length?((0,a.wg)(),(0,a.iD)("div",wl,[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[6]||(t[6]=(0,a._)("h3",{class:"text-lg font-semibold mb-2"},"No endpoints or suites found",-1)),(0,a._)("p",xl,(0,n.zw)(m.value||p.value||v.value?"Try adjusting your filters":"No endpoints or suites are configured"),1)])):((0,a.wg)(),(0,a.iD)("div",hl,[w.value?((0,a.wg)(),(0,a.iD)("div",bl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(D.value,((e,s)=>((0,a.wg)(),(0,a.iD)("div",{key:s,class:"endpoint-group border rounded-lg overflow-hidden"},[(0,a._)("div",{onClick:e=>E(s),class:"endpoint-group-header flex items-center justify-between p-4 bg-card border-b cursor-pointer hover:bg-accent/50 transition-colors"},[(0,a._)("div",kl,[b.value.has(s)?((0,a.wg)(),(0,a.j4)((0,r.SU)(Oe.Z),{key:0,class:"h-5 w-5 text-muted-foreground"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Pe.Z),{key:1,class:"h-5 w-5 text-muted-foreground"})),(0,a._)("h2",_l,(0,n.zw)(s),1)]),(0,a._)("div",Sl,[T(e.endpoints)+q(e.suites)>0?((0,a.wg)(),(0,a.iD)("span",Dl,(0,n.zw)(T(e.endpoints)+q(e.suites)),1)):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ke.Z),{key:1,class:"h-6 w-6 text-green-600"}))])],8,yl),b.value.has(s)?((0,a.wg)(),(0,a.iD)("div",Ul,[e.suites.length>0?((0,a.wg)(),(0,a.iD)("div",Cl,[t[7]||(t[7]=(0,a._)("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},"Suites",-1)),(0,a._)("div",zl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.suites,(e=>((0,a.wg)(),(0,a.j4)(Tt,{key:e.key,suite:e,maxResults:Nl,onShowTooltip:$},null,8,["suite"])))),128))])])):(0,a.kq)("",!0),e.endpoints.length>0?((0,a.wg)(),(0,a.iD)("div",Wl,[e.suites.length>0?((0,a.wg)(),(0,a.iD)("h3",jl,"Endpoints")):(0,a.kq)("",!0),(0,a._)("div",Hl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.endpoints,(e=>((0,a.wg)(),(0,a.j4)(wt,{key:e.key,endpoint:e,maxResults:Nl,showAverageResponseTime:f.value,onShowTooltip:$},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,a.kq)("",!0)])):(0,a.kq)("",!0)])))),128))])):((0,a.wg)(),(0,a.iD)("div",Fl,[k.value.length>0?((0,a.wg)(),(0,a.iD)("div",Rl,[t[8]||(t[8]=(0,a._)("h2",{class:"text-lg font-semibold text-foreground mb-3"},"Suites",-1)),(0,a._)("div",$l,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(C.value,(e=>((0,a.wg)(),(0,a.j4)(Tt,{key:e.key,suite:e,maxResults:Nl,onShowTooltip:$},null,8,["suite"])))),128))])])):(0,a.kq)("",!0),y.value.length>0?((0,a.wg)(),(0,a.iD)("div",Tl,[k.value.length>0?((0,a.wg)(),(0,a.iD)("h2",ql,"Endpoints")):(0,a.kq)("",!0),(0,a._)("div",El,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(U.value,(e=>((0,a.wg)(),(0,a.j4)(wt,{key:e.key,endpoint:e,maxResults:Nl,showAverageResponseTime:f.value,onShowTooltip:$},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,a.kq)("",!0)])),!w.value&&_.value>1?((0,a.wg)(),(0,a.iD)("div",Zl,[(0,a.Wm)((0,r.SU)(h),{variant:"outline",size:"icon",disabled:1===g.value,onClick:t[4]||(t[4]=e=>F(g.value-1))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ve.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"]),(0,a._)("div",Ll,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(z.value,(e=>((0,a.wg)(),(0,a.j4)((0,r.SU)(h),{key:e,variant:e===g.value?"default":"outline",size:"sm",onClick:t=>F(e)},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e),1)])),_:2},1032,["variant","onClick"])))),128))]),(0,a.Wm)((0,r.SU)(h),{variant:"outline",size:"icon",disabled:g.value===_.value,onClick:t[5]||(t[5]=e=>F(g.value+1))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"])])):(0,a.kq)("",!0)])),o.value.length>0?((0,a.wg)(),(0,a.iD)("div",Ml,[(0,a.Wm)(ul,{announcements:o.value},null,8,["announcements"])])):(0,a.kq)("",!0)]),(0,a.Wm)(bs,{onRefreshData:W})]))}};const Il=Yl;var Ol=Il,Pl=s(318),Kl=s(779),Vl=s(866),Gl=s(141),Bl=s(478);const Jl={class:"flex items-center justify-between"},Xl={class:"text-sm text-muted-foreground"};var Ql={__name:"Pagination",props:{numberOfResultsPerPage:Number,currentPageProp:{type:Number,default:1}},emits:["page"],setup(e,{emit:t}){const s=e,l=t,o=(0,r.iH)(s.currentPageProp),u=(0,a.Fl)((()=>{let e=100;if("undefined"!==typeof window&&window.config&&window.config.maximumNumberOfResults){const t=parseInt(window.config.maximumNumberOfResults);isNaN(t)||(e=t)}return Math.ceil(e/s.numberOfResultsPerPage)})),i=()=>{o.value--,l("page",o.value)},d=()=>{o.value++,l("page",o.value)};return(e,t)=>((0,a.wg)(),(0,a.iD)("div",Jl,[(0,a.Wm)((0,r.SU)(h),{variant:"outline",size:"sm",disabled:o.value>=u.value,onClick:d,class:"flex items-center gap-1"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ve.Z),{class:"h-4 w-4"}),t[0]||(t[0]=(0,a.Uk)(" Previous ",-1))])),_:1,__:[0]},8,["disabled"]),(0,a._)("span",Xl," Page "+(0,n.zw)(o.value)+" of "+(0,n.zw)(u.value),1),(0,a.Wm)((0,r.SU)(h),{variant:"outline",size:"sm",disabled:o.value<=1,onClick:i,class:"flex items-center gap-1"},{default:(0,a.w5)((()=>[t[1]||(t[1]=(0,a.Uk)(" Next ",-1)),(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1,__:[1]},8,["disabled"])]))}};const ea=Ql;var ta=ea,sa=s(334),la=s(148),aa=s(282);s(210);const na={class:"relative w-full",style:{height:"300px"}},ra={key:0,class:"absolute inset-0 flex items-center justify-center bg-background/50"},oa={key:1,class:"absolute inset-0 flex items-center justify-center text-muted-foreground"};var ua={__name:"ResponseTimeChart",props:{endpointKey:{type:String,required:!0},duration:{type:String,required:!0,validator:e=>["24h","7d","30d"].includes(e)},serverUrl:{type:String,default:".."},events:{type:Array,default:()=>[]}},setup(e){la.kL.register(la.uw,la.f$,la.od,la.jn,la.Dx,la.u,la.De,la.Gu,la.FB,aa.Z);const t=e,s=(0,r.iH)(!0),l=(0,r.iH)(null),o=(0,r.iH)([]),u=(0,r.iH)([]),i=(0,r.iH)(document.documentElement.classList.contains("dark")),d=(0,r.iH)(null),c=e=>Je(e)+"CC",g=(0,a.Fl)((()=>{if(!t.events||0===t.events.length)return[];const e=new Date;let s;switch(t.duration){case"24h":s=new Date(e.getTime()-864e5);break;case"7d":s=new Date(e.getTime()-6048e5);break;case"30d":s=new Date(e.getTime()-2592e6);break;default:return[]}const l=[];for(let a=0;ae)continue;let o=null,u=!1;if(a+1{if(0===o.value.length)return{labels:[],datasets:[]};const e=o.value.map((e=>new Date(e)));return{labels:e,datasets:[{label:"Response Time (ms)",data:u.value,borderColor:i.value?"rgb(96, 165, 250)":"rgb(59, 130, 246)",backgroundColor:i.value?"rgba(96, 165, 250, 0.1)":"rgba(59, 130, 246, 0.1)",borderWidth:2,pointRadius:2,pointHoverRadius:4,tension:.1,fill:!0}]}})),p=(0,a.Fl)((()=>{d.value;const e=u.value.length>0?Math.max(...u.value):0,s=e/2;return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{backgroundColor:i.value?"rgba(31, 41, 55, 0.95)":"rgba(255, 255, 255, 0.95)",titleColor:i.value?"#f9fafb":"#111827",bodyColor:i.value?"#d1d5db":"#374151",borderColor:i.value?"#4b5563":"#e5e7eb",borderWidth:1,padding:12,displayColors:!1,callbacks:{title:e=>{if(e.length>0){const t=new Date(e[0].parsed.x);return t.toLocaleString()}return""},label:e=>{const t=e.parsed.y;return`${t}ms`}}},annotation:{annotations:g.value.reduce(((e,t,l)=>{const a=new Date(t.timestamp).getTime();let n=0;if(o.value.length>0&&u.value.length>0){const e=o.value.reduce(((e,t,s)=>{const l=new Date(t).getTime(),n=Math.abs(l-a),r=Math.abs(new Date(o.value[e]).getTime()-a);return nd.value===l,content:[t.isOngoing?"Status: ONGOING":"Status: RESOLVED",`In state ${t.state} for ${t.duration}`,`Started at ${new Date(t.timestamp).toLocaleString()}`],backgroundColor:c(t.state),color:"#ffffff",font:{size:11},padding:6,position:r}},e}),{})}},scales:{x:{type:"time",time:{unit:"24h"===t.duration?"hour":(t.duration,"day"),displayFormats:{hour:"MMM d, ha",day:"MMM d"}},grid:{color:i.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:i.value?"#9ca3af":"#6b7280",maxRotation:0,autoSkipPadding:20}},y:{beginAtZero:!0,grid:{color:i.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:i.value?"#9ca3af":"#6b7280",callback:e=>`${e}ms`}}}}})),v=async()=>{s.value=!0,l.value=null;try{const e=await fetch(`${t.serverUrl}/api/v1/endpoints/${t.endpointKey}/response-times/${t.duration}/history`,{credentials:"include"});if(200===e.status){const t=await e.json();o.value=t.timestamps||[],u.value=t.values||[]}else l.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",await e.text())}catch(e){l.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",e)}finally{s.value=!1}};return(0,a.YP)((()=>t.duration),(()=>{v()})),(0,a.bv)((()=>{v();const e=new MutationObserver((()=>{i.value=document.documentElement.classList.contains("dark")}));e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),(0,a.Ah)((()=>e.disconnect()))})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",na,[s.value?((0,a.wg)(),(0,a.iD)("div",ra,[(0,a.Wm)(de)])):l.value?((0,a.wg)(),(0,a.iD)("div",oa,(0,n.zw)(l.value),1)):((0,a.wg)(),(0,a.j4)((0,r.SU)(sa.x1),{key:2,data:m.value,options:p.value},null,8,["data","options"]))]))}};const ia=ua;var da=ia;const ca={class:"dashboard-container bg-background"},ga={class:"container mx-auto px-4 py-8 max-w-7xl"},ma={class:"mb-6"},pa={key:0,class:"space-y-6"},va={class:"flex items-start justify-between"},fa={class:"text-4xl font-bold tracking-tight"},wa={class:"flex items-center gap-3 text-muted-foreground mt-2"},xa={key:0},ha={key:1},ba={key:2},ya={class:"grid gap-6 md:grid-cols-2 lg:grid-cols-4"},ka={class:"text-2xl font-bold"},_a={class:"text-2xl font-bold"},Sa={class:"text-2xl font-bold"},Da={class:"text-2xl font-bold"},Ua={class:"flex items-center justify-between"},Ca={class:"flex items-center gap-2"},za={class:"space-y-4"},Wa={key:1,class:"pt-4 border-t"},ja={key:0,class:"space-y-6"},Ha={class:"flex items-center justify-between"},Fa={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Ra=["src","alt"],$a={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Ta={class:"text-sm text-muted-foreground mb-2"},qa=["src","alt"],Ea={class:"text-center"},Za=["src"],La={class:"space-y-4"},Ma={class:"mt-1"},Aa={class:"flex-1"},Na={class:"font-medium"},Ya={class:"text-sm text-muted-foreground"},Ia={key:1,class:"flex items-center justify-center py-20"},Oa=50;var Pa={__name:"EndpointDetails",emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=(0,u.yj)(),i=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,r.iH)([]),m=(0,r.iH)(1),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)("24h"),w=(0,r.iH)(!1),x=(0,a.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?c.value.results[c.value.results.length-1]:null)),b=(0,a.Fl)((()=>x.value?x.value.state:null)),y=(0,a.Fl)((()=>x.value?.hostname||null)),_=(0,a.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=0,t=0;for(const s of d.value.results)s.duration&&(e+=s.duration,t++);return 0===t?"N/A":`${Math.round(e/t/1e6)}ms`})),S=(0,a.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=1/0,t=0,s=!1;for(const n of d.value.results){const l=n.duration;l&&(e=Math.min(e,l),t=Math.max(t,l),s=!0)}if(!s)return"N/A";const l=Math.round(e/1e6),a=Math.round(t/1e6);return l===a?`${l}ms`:`${l}-${a}ms`})),U=(0,a.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?Z(c.value.results[c.value.results.length-1].timestamp):"Never")),C=async()=>{w.value=!0;try{const t=await fetch(`/api/v1/endpoints/${o.params.key}/statuses?page=${m.value}&pageSize=${Oa}`,{credentials:"include"});if(200===t.status){const s=await t.json();d.value=s,1===m.value&&(c.value=s);let l=[];if(s.events&&s.events.length>0)for(let t=s.events.length-1;t>=0;t--){let a=s.events[t];if("START"===a.type)a.fancyText="Monitoring started";else{a.fancyText="Endpoint ";let l=a.state??("HEALTHY"===a.type?"healthy":"unhealthy");if(t===s.events.length-1)a.fancyText+=`state is ${l}`;else{var e=s.events[t+1];a.fancyText+=`state was ${l} for ${L(e.timestamp,a.timestamp)}`}}a.fancyTimeAgo=Z(a.timestamp),l.push(a)}if(g.value=l,s.results&&s.results.length>0)for(let e=0;e0){p.value=!0;break}}else console.error("[Details][fetchData] Error:",await t.text())}catch(t){console.error("[Details][fetchData] Error:",t)}finally{w.value=!1}},W=()=>{s.push("/")},j=e=>{m.value=e,C()},F=(e,t,s="hover")=>{i("showTooltip",e,t,s)},R=e=>new Date(e).toLocaleString(),$=()=>`/api/v1/endpoints/${d.value.key}/health/badge.svg`,T=e=>`/api/v1/endpoints/${d.value.key}/uptimes/${e}/badge.svg`,q=e=>`/api/v1/endpoints/${d.value.key}/response-times/${e}/badge.svg`;return(0,a.bv)((()=>{C()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",ca,[(0,a._)("div",ga,[(0,a._)("div",ma,[(0,a.Wm)((0,r.SU)(h),{variant:"ghost",class:"mb-4",onClick:W},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Pl.Z),{class:"h-4 w-4 mr-2"}),t[2]||(t[2]=(0,a.Uk)(" Back to Dashboard ",-1))])),_:1,__:[2]}),d.value&&d.value.name?((0,a.wg)(),(0,a.iD)("div",pa,[(0,a._)("div",va,[(0,a._)("div",null,[(0,a._)("h1",fa,(0,n.zw)(d.value.name),1),(0,a._)("div",wa,[d.value.group?((0,a.wg)(),(0,a.iD)("span",xa,"Group: "+(0,n.zw)(d.value.group),1)):(0,a.kq)("",!0),d.value.group&&y.value?((0,a.wg)(),(0,a.iD)("span",ha,"•")):(0,a.kq)("",!0),y.value?((0,a.wg)(),(0,a.iD)("span",ba,(0,n.zw)(y.value),1)):(0,a.kq)("",!0)])]),(0,a.Wm)(et,{status:b.value},null,8,["status"])]),(0,a._)("div",ya,[(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[3]||(t[3]=[(0,a.Uk)("Current Status",-1)]))),_:1,__:[3]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",ka,(0,n.zw)("healthy"===b.value?"Operational":"Issues Detected"),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[4]||(t[4]=[(0,a.Uk)("Avg Response Time",-1)]))),_:1,__:[4]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",_a,(0,n.zw)(_.value),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[5]||(t[5]=[(0,a.Uk)("Response Time Range",-1)]))),_:1,__:[5]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",Sa,(0,n.zw)(S.value),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[6]||(t[6]=[(0,a.Uk)("Last Check",-1)]))),_:1,__:[6]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",Da,(0,n.zw)(U.value),1)])),_:1})])),_:1})]),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a._)("div",Ua,[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[7]||(t[7]=[(0,a.Uk)("Recent Checks",-1)]))),_:1,__:[7]}),(0,a._)("div",Ca,[(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:t[0]||(t[0]=e=>v.value=!v.value),title:v.value?"Show min-max response time":"Show average response time"},{default:(0,a.w5)((()=>[v.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ae.Z),{key:0,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ne.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:C,title:"Refresh data",disabled:w.value},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ye.Z),{class:(0,n.C_)(["h-4 w-4",w.value&&"animate-spin"])},null,8,["class"])])),_:1},8,["disabled"])])])])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",za,[d.value?((0,a.wg)(),(0,a.j4)(wt,{key:0,endpoint:d.value,maxResults:Oa,showAverageResponseTime:v.value,onShowTooltip:F,class:"border-0 shadow-none bg-transparent p-0"},null,8,["endpoint","showAverageResponseTime"])):(0,a.kq)("",!0),d.value&&d.value.key?((0,a.wg)(),(0,a.iD)("div",Wa,[(0,a.Wm)(ta,{onPage:j,numberOfResultsPerPage:Oa,currentPageProp:m.value},null,8,["currentPageProp"])])):(0,a.kq)("",!0)])])),_:1})])),_:1}),p.value?((0,a.wg)(),(0,a.iD)("div",ja,[(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a._)("div",Ha,[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[8]||(t[8]=[(0,a.Uk)("Response Time Trend",-1)]))),_:1,__:[8]}),(0,a.wy)((0,a._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>f.value=e),class:"text-sm bg-background border rounded-md px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring"},t[9]||(t[9]=[(0,a._)("option",{value:"24h"},"24 hours",-1),(0,a._)("option",{value:"7d"},"7 days",-1),(0,a._)("option",{value:"30d"},"30 days",-1)]),512),[[l.bM,f.value]])])])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[d.value&&d.value.key?((0,a.wg)(),(0,a.j4)(da,{key:0,endpointKey:d.value.key,duration:f.value,serverUrl:e.serverUrl,events:d.value.events||[]},null,8,["endpointKey","duration","serverUrl","events"])):(0,a.kq)("",!0)])),_:1})])),_:1}),(0,a._)("div",Fa,[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(["30d","7d","24h","1h"],(e=>(0,a.Wm)((0,r.SU)(k),{key:e},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground text-center"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1)])),_:2},1024)])),_:2},1024),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("img",{src:q(e),alt:`${e} response time`,class:"mx-auto mt-2"},null,8,Ra)])),_:2},1024)])),_:2},1024))),64))])])):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[10]||(t[10]=[(0,a.Uk)("Uptime Statistics",-1)]))),_:1,__:[10]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",$a,[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(["30d","7d","24h","1h"],(e=>(0,a._)("div",{key:e,class:"text-center"},[(0,a._)("p",Ta,(0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1),(0,a._)("img",{src:T(e),alt:`${e} uptime`,class:"mx-auto"},null,8,qa)]))),64))])])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[11]||(t[11]=[(0,a.Uk)("Current Health",-1)]))),_:1,__:[11]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",Ea,[(0,a._)("img",{src:$(),alt:"health badge",class:"mx-auto"},null,8,Za)])])),_:1})])),_:1}),g.value&&g.value.length>0?((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{key:1},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[12]||(t[12]=[(0,a.Uk)("Events",-1)]))),_:1,__:[12]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",La,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,(e=>((0,a.wg)(),(0,a.iD)("div",{key:e.timestamp,class:"flex items-start gap-4 pb-4 border-b last:border-0"},[(0,a._)("div",Ma,["HEALTHY"===e.type?((0,a.wg)(),(0,a.j4)((0,r.SU)(Kl.Z),{key:0,class:"h-5 w-5",style:(0,n.j5)({color:(0,r.SU)(Je)(e.state)})},null,8,["style"])):"UNHEALTHY"===e.type&&"unhealthy"!=e.state?((0,a.wg)(),(0,a.j4)((0,r.SU)(Vl.Z),{key:1,class:"h-5 w-5",style:(0,n.j5)({color:(0,r.SU)(Je)(e.state)})},null,8,["style"])):"UNHEALTHY"===e.type?((0,a.wg)(),(0,a.j4)((0,r.SU)(Gl.Z),{key:2,class:"h-5 w-5",style:(0,n.j5)({color:(0,r.SU)(Je)(e.state)})},null,8,["style"])):((0,a.wg)(),(0,a.j4)((0,r.SU)(Bl.Z),{key:3,class:"h-5 w-5 text-muted-foreground"}))]),(0,a._)("div",Aa,[(0,a._)("p",Na,(0,n.zw)(e.fancyText),1),(0,a._)("p",Ya,(0,n.zw)(R(e.timestamp))+" • "+(0,n.zw)(e.fancyTimeAgo),1)])])))),128))])])),_:1})])),_:1})):(0,a.kq)("",!0)])):((0,a.wg)(),(0,a.iD)("div",Ia,[(0,a.Wm)(de,{size:"lg"})]))])]),(0,a.Wm)(bs,{onRefreshData:C})]))}};const Ka=Pa;var Va=Ka,Ga=s(469),Ba=s(399),Ja=s(167);const Xa=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},Qa={class:"relative flex-shrink-0"},en={class:"flex-1 min-w-0 pt-1"},tn={class:"flex items-center justify-between gap-2 mb-1"},sn={class:"font-medium text-sm truncate"},ln={class:"text-xs text-muted-foreground whitespace-nowrap"},an={class:"flex flex-wrap gap-1"},nn={key:0,class:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-md"},rn={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-md"};var on={__name:"FlowStep",props:{step:{type:Object,required:!0},index:{type:Number,required:!0},isLast:{type:Boolean,default:!1},previousStep:{type:Object,default:null}},emits:["step-click"],setup(e){const t=e,s=(0,a.Fl)((()=>{switch(t.step.status){case"success":return Ke.Z;case"failed":return ys.Z;case"skipped":return Ga.Z;case"not-started":return Ja.Z;default:return Ja.Z}})),l=(0,a.Fl)((()=>{const e="border-2";if(t.step.isAlwaysRun)switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600 ring-2 ring-blue-200 dark:ring-blue-800`;case"failed":return`${e} bg-red-500 text-white border-red-600 ring-2 ring-blue-200 dark:ring-blue-800`;default:return`${e} bg-blue-500 text-white border-blue-600 ring-2 ring-blue-200 dark:ring-blue-800`}switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600`;case"failed":return`${e} bg-red-500 text-white border-red-600`;case"skipped":return`${e} bg-gray-400 text-white border-gray-500`;case"not-started":return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`;default:return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`}})),o=(0,a.Fl)((()=>{if(!t.previousStep)return"bg-gray-300 dark:bg-gray-600";if("skipped"===t.step.status)return"border-l-2 border-dashed border-gray-400 bg-transparent";switch(t.previousStep.status){case"success":return"bg-green-500";case"failed":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}})),u=(0,a.Fl)((()=>{const e=t.step.nextStepStatus;switch(t.step.status){case"success":return"skipped"===e?"bg-gray-300 dark:bg-gray-600":"bg-green-500";case"failed":return"skipped"===e?"border-l-2 border-dashed border-gray-400 bg-transparent":"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}}));return(t,i)=>((0,a.wg)(),(0,a.iD)("div",{class:"flex items-start gap-4 relative group hover:bg-accent/30 rounded-lg p-2 -m-2 transition-colors cursor-pointer",onClick:i[0]||(i[0]=e=>t.$emit("step-click"))},[(0,a._)("div",Qa,[e.index>0?((0,a.wg)(),(0,a.iD)("div",{key:0,class:(0,n.C_)([o.value,"absolute left-1/2 bottom-8 w-0.5 h-4 -translate-x-px"])},null,2)):(0,a.kq)("",!0),(0,a._)("div",{class:(0,n.C_)([l.value,"w-8 h-8 rounded-full flex items-center justify-center"])},[((0,a.wg)(),(0,a.j4)((0,a.LL)(s.value),{class:"w-4 h-4"}))],2),e.isLast?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",{key:1,class:(0,n.C_)([u.value,"absolute left-1/2 top-8 w-0.5 h-4 -translate-x-px"])},null,2))]),(0,a._)("div",en,[(0,a._)("div",tn,[(0,a._)("h4",sn,(0,n.zw)(e.step.name),1),(0,a._)("span",ln,(0,n.zw)((0,r.SU)(Xa)(e.step.duration)),1)]),(0,a._)("div",an,[e.step.isAlwaysRun?((0,a.wg)(),(0,a.iD)("span",nn,[(0,a.Wm)((0,r.SU)(Ba.Z),{class:"w-3 h-3"}),i[1]||(i[1]=(0,a.Uk)(" Always Run ",-1))])):(0,a.kq)("",!0),e.step.errors?.length?((0,a.wg)(),(0,a.iD)("span",rn,(0,n.zw)(e.step.errors.length)+" error"+(0,n.zw)(1!==e.step.errors.length?"s":""),1)):(0,a.kq)("",!0)])])]))}};const un=on;var dn=un;const cn={class:"space-y-4"},gn={class:"flex items-center gap-4"},mn={class:"flex-1 h-1 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},pn={class:"flex items-center justify-between text-xs text-muted-foreground"},vn={key:0},fn={class:"space-y-2"},wn={class:"mt-6 pt-4 border-t"},xn={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-xs"},hn={key:0,class:"flex items-center gap-2"},bn={class:"w-4 h-4 rounded-full bg-green-500 flex items-center justify-center"},yn={key:1,class:"flex items-center gap-2"},kn={class:"w-4 h-4 rounded-full bg-red-500 flex items-center justify-center"},_n={key:2,class:"flex items-center gap-2"},Sn={class:"w-4 h-4 rounded-full bg-gray-400 flex items-center justify-center"},Dn={key:3,class:"flex items-center gap-2"},Un={class:"w-4 h-4 rounded-full bg-blue-500 border-2 border-blue-200 dark:border-blue-800 flex items-center justify-center"};var Cn={__name:"SequentialFlowDiagram",props:{flowSteps:{type:Array,default:()=>[]},progressPercentage:{type:Number,default:0},completedSteps:{type:Number,default:0},totalSteps:{type:Number,default:0}},emits:["step-selected"],setup(e){const t=e,s=(0,a.Fl)((()=>t.completedSteps)),l=(0,a.Fl)((()=>t.totalSteps)),o=(0,a.Fl)((()=>t.flowSteps.reduce(((e,t)=>e+(t.duration||0)),0))),u=(0,a.Fl)((()=>t.flowSteps.some((e=>"success"===e.status)))),i=(0,a.Fl)((()=>t.flowSteps.some((e=>"failed"===e.status)))),d=(0,a.Fl)((()=>t.flowSteps.some((e=>"skipped"===e.status)))),c=(0,a.Fl)((()=>t.flowSteps.some((e=>!0===e.isAlwaysRun))));return(t,g)=>((0,a.wg)(),(0,a.iD)("div",cn,[(0,a._)("div",gn,[g[0]||(g[0]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground"},"Start",-1)),(0,a._)("div",mn,[(0,a._)("div",{class:"h-full bg-green-500 dark:bg-green-600 rounded-full transition-all duration-300 ease-out",style:(0,n.j5)({width:e.progressPercentage+"%"})},null,4)]),g[1]||(g[1]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground"},"End",-1))]),(0,a._)("div",pn,[(0,a._)("span",null,(0,n.zw)(s.value)+"/"+(0,n.zw)(l.value)+" steps successful",1),o.value>0?((0,a.wg)(),(0,a.iD)("span",vn,(0,n.zw)((0,r.SU)(Xa)(o.value))+" total",1)):(0,a.kq)("",!0)]),(0,a._)("div",fn,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.flowSteps,((s,l)=>((0,a.wg)(),(0,a.j4)(dn,{key:l,step:s,index:l,"is-last":l===e.flowSteps.length-1,"previous-step":l>0?e.flowSteps[l-1]:null,onStepClick:e=>t.$emit("step-selected",s,l)},null,8,["step","index","is-last","previous-step","onStepClick"])))),128))]),(0,a._)("div",wn,[g[6]||(g[6]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground mb-2"},"Status Legend",-1)),(0,a._)("div",xn,[u.value?((0,a.wg)(),(0,a.iD)("div",hn,[(0,a._)("div",bn,[(0,a.Wm)((0,r.SU)(Ke.Z),{class:"w-3 h-3 text-white"})]),g[2]||(g[2]=(0,a._)("span",{class:"text-muted-foreground"},"Success",-1))])):(0,a.kq)("",!0),i.value?((0,a.wg)(),(0,a.iD)("div",yn,[(0,a._)("div",kn,[(0,a.Wm)((0,r.SU)(ys.Z),{class:"w-3 h-3 text-white"})]),g[3]||(g[3]=(0,a._)("span",{class:"text-muted-foreground"},"Failed",-1))])):(0,a.kq)("",!0),d.value?((0,a.wg)(),(0,a.iD)("div",_n,[(0,a._)("div",Sn,[(0,a.Wm)((0,r.SU)(Ga.Z),{class:"w-3 h-3 text-white"})]),g[4]||(g[4]=(0,a._)("span",{class:"text-muted-foreground"},"Skipped",-1))])):(0,a.kq)("",!0),c.value?((0,a.wg)(),(0,a.iD)("div",Dn,[(0,a._)("div",Un,[(0,a.Wm)((0,r.SU)(Ba.Z),{class:"w-3 h-3 text-white"})]),g[5]||(g[5]=(0,a._)("span",{class:"text-muted-foreground"},"Always Run",-1))])):(0,a.kq)("",!0)])])]))}};const zn=Cn;var Wn=zn,jn=s(293),Hn=s(322),Fn=s(740);const Rn={class:"flex items-center justify-between p-4 border-b"},$n={class:"text-lg font-semibold flex items-center gap-2"},Tn={class:"text-sm text-muted-foreground mt-1"},qn={class:"p-4 space-y-4 overflow-y-auto max-h-[60vh]"},En={key:0,class:"flex flex-wrap gap-2"},Zn={class:"flex items-center gap-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/30 rounded-lg border border-blue-200 dark:border-blue-700"},Ln={key:1,class:"space-y-2"},Mn={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},An={class:"space-y-2"},Nn={key:2,class:"space-y-2"},Yn={class:"text-sm font-medium flex items-center gap-2"},In={class:"text-xs font-mono text-muted-foreground"},On={key:3,class:"space-y-2"},Pn={class:"text-sm font-medium flex items-center gap-2"},Kn={class:"grid grid-cols-2 gap-4 text-xs"},Vn={class:"font-mono mt-1"},Gn={key:4,class:"space-y-2"},Bn={class:"text-sm font-medium flex items-center gap-2"},Jn={class:"space-y-2 max-h-48 overflow-y-auto"},Xn={class:"flex-shrink-0 mt-0.5"},Qn={class:"flex-1 min-w-0 flex items-center justify-between gap-3"},er={key:5,class:"space-y-2"},tr={class:"text-sm font-medium flex items-center gap-2"},sr={class:"space-y-3 text-xs"},lr={key:0},ar={class:"font-mono mt-1 break-all"},nr={key:1},rr={class:"mt-1 font-medium"},or={key:2},ur={class:"mt-1"},ir={key:3},dr={class:"mt-1"},cr={key:6,class:"space-y-2"},gr={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},mr={class:"space-y-2 max-h-32 overflow-y-auto"};var pr={__name:"StepDetailsModal",props:{step:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["close"],setup(e){const t=e,s=(0,a.Fl)((()=>{switch(t.step.status){case"success":return Ke.Z;case"failed":return ys.Z;case"skipped":return Ga.Z;case"not-started":return Ja.Z;default:return Ja.Z}})),o=(0,a.Fl)((()=>{switch(t.step.status){case"success":return"text-green-600 dark:text-green-400";case"failed":return"text-red-600 dark:text-red-400";case"skipped":return"text-gray-600 dark:text-gray-400";default:return"text-blue-600 dark:text-blue-400"}}));return(t,u)=>((0,a.wg)(),(0,a.iD)("div",{class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:u[2]||(u[2]=e=>t.$emit("close"))},[(0,a._)("div",{class:"bg-background border rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",onClick:u[1]||(u[1]=(0,l.iM)((()=>{}),["stop"]))},[(0,a._)("div",Rn,[(0,a._)("div",null,[(0,a._)("h2",$n,[((0,a.wg)(),(0,a.j4)((0,a.LL)(s.value),{class:(0,n.C_)([o.value,"w-5 h-5"])},null,8,["class"])),(0,a.Uk)(" "+(0,n.zw)(e.step.name),1)]),(0,a._)("p",Tn," Step "+(0,n.zw)(e.index+1)+" • "+(0,n.zw)((0,r.SU)(Xa)(e.step.duration)),1)]),(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:u[0]||(u[0]=e=>t.$emit("close"))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(d.Z),{class:"w-4 h-4"})])),_:1})]),(0,a._)("div",qn,[e.step.isAlwaysRun?((0,a.wg)(),(0,a.iD)("div",En,[(0,a._)("div",Zn,[(0,a.Wm)((0,r.SU)(Ba.Z),{class:"w-4 h-4 text-blue-600 dark:text-blue-400"}),u[3]||(u[3]=(0,a._)("div",null,[(0,a._)("p",{class:"text-sm font-medium text-blue-900 dark:text-blue-200"},"Always Run"),(0,a._)("p",{class:"text-xs text-blue-600 dark:text-blue-400"},"This endpoint is configured to execute even after failures")],-1))])])):(0,a.kq)("",!0),e.step.errors?.length?((0,a.wg)(),(0,a.iD)("div",Ln,[(0,a._)("h3",Mn,[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Errors ("+(0,n.zw)(e.step.errors.length)+") ",1)]),(0,a._)("div",An,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0),e.step.result&&e.step.result.timestamp?((0,a.wg)(),(0,a.iD)("div",Nn,[(0,a._)("h3",Yn,[(0,a.Wm)((0,r.SU)(jn.Z),{class:"w-4 h-4"}),u[4]||(u[4]=(0,a.Uk)(" Timestamp ",-1))]),(0,a._)("p",In,(0,n.zw)((0,r.SU)(M)(e.step.result.timestamp)),1)])):(0,a.kq)("",!0),e.step.result?((0,a.wg)(),(0,a.iD)("div",On,[(0,a._)("h3",Pn,[(0,a.Wm)((0,r.SU)(Hn.Z),{class:"w-4 h-4"}),u[5]||(u[5]=(0,a.Uk)(" Response ",-1))]),(0,a._)("div",Kn,[(0,a._)("div",null,[u[6]||(u[6]=(0,a._)("span",{class:"text-muted-foreground"},"Duration:",-1)),(0,a._)("p",Vn,(0,n.zw)((0,r.SU)(Xa)(e.step.result.duration)),1)]),(0,a._)("div",null,[u[7]||(u[7]=(0,a._)("span",{class:"text-muted-foreground"},"Success:",-1)),(0,a._)("p",{class:(0,n.C_)(["mt-1",e.step.result.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.step.result.success?"Yes":"No"),3)])])])):(0,a.kq)("",!0),e.step.result?.conditionResults?.length?((0,a.wg)(),(0,a.iD)("div",Gn,[(0,a._)("h3",Bn,[(0,a.Wm)((0,r.SU)(Ke.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Condition Results ("+(0,n.zw)(e.step.result.conditionResults.length)+") ",1)]),(0,a._)("div",Jn,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.result.conditionResults,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex items-start gap-3 p-1 rounded-lg border",e.success?"bg-green-50 dark:bg-green-900/30 border-green-200 dark:border-green-700":"bg-red-50 dark:bg-red-900/30 border-red-200 dark:border-red-700"])},[(0,a._)("div",Xn,[e.success?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ke.Z),{key:0,class:"w-4 h-4 text-green-600 dark:text-green-400"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(ys.Z),{key:1,class:"w-4 h-4 text-red-600 dark:text-red-400"}))]),(0,a._)("div",Qn,[(0,a._)("p",{class:(0,n.C_)(["text-sm font-mono break-all",e.success?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"])},(0,n.zw)(e.condition),3),(0,a._)("span",{class:(0,n.C_)(["text-xs font-medium whitespace-nowrap",e.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.success?"Passed":"Failed"),3)])],2)))),128))])])):(0,a.kq)("",!0),e.step.endpoint?((0,a.wg)(),(0,a.iD)("div",er,[(0,a._)("h3",tr,[(0,a.Wm)((0,r.SU)(Fn.Z),{class:"w-4 h-4"}),u[8]||(u[8]=(0,a.Uk)(" Endpoint Configuration ",-1))]),(0,a._)("div",sr,[e.step.endpoint.url?((0,a.wg)(),(0,a.iD)("div",lr,[u[9]||(u[9]=(0,a._)("span",{class:"text-muted-foreground"},"URL:",-1)),(0,a._)("p",ar,(0,n.zw)(e.step.endpoint.url),1)])):(0,a.kq)("",!0),e.step.endpoint.method?((0,a.wg)(),(0,a.iD)("div",nr,[u[10]||(u[10]=(0,a._)("span",{class:"text-muted-foreground"},"Method:",-1)),(0,a._)("p",rr,(0,n.zw)(e.step.endpoint.method),1)])):(0,a.kq)("",!0),e.step.endpoint.interval?((0,a.wg)(),(0,a.iD)("div",or,[u[11]||(u[11]=(0,a._)("span",{class:"text-muted-foreground"},"Interval:",-1)),(0,a._)("p",ur,(0,n.zw)(e.step.endpoint.interval),1)])):(0,a.kq)("",!0),e.step.endpoint.timeout?((0,a.wg)(),(0,a.iD)("div",ir,[u[12]||(u[12]=(0,a._)("span",{class:"text-muted-foreground"},"Timeout:",-1)),(0,a._)("p",dr,(0,n.zw)(e.step.endpoint.timeout),1)])):(0,a.kq)("",!0)])])):(0,a.kq)("",!0),e.step.result?.errors?.length?((0,a.wg)(),(0,a.iD)("div",cr,[(0,a._)("h3",gr,[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Result Errors ("+(0,n.zw)(e.step.result.errors.length)+") ",1)]),(0,a._)("div",mr,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.result.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])])]))}};const vr=pr;var fr=vr;const wr={class:"suite-details-container bg-background min-h-screen"},xr={class:"container mx-auto px-4 py-8 max-w-7xl"},hr={class:"mb-6"},br={class:"flex items-start justify-between"},yr={class:"text-3xl font-bold tracking-tight"},kr={class:"text-muted-foreground mt-2"},_r={key:0},Sr={key:1},Dr={class:"flex items-center gap-2"},Ur={key:0,class:"flex items-center justify-center py-20"},Cr={key:1,class:"text-center py-20"},zr={key:2,class:"space-y-6"},Wr={class:"space-y-4"},jr={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Hr={class:"text-lg font-medium"},Fr={class:"text-lg font-medium"},Rr={class:"text-lg font-medium"},$r={class:"text-lg font-medium"},Tr={class:"mt-6"},qr={key:0,class:"mt-6"},Er={class:"space-y-2"},Zr={key:0,class:"space-y-2"},Lr=["onClick"],Mr={class:"flex items-center gap-3"},Ar={class:"text-sm font-medium"},Nr={class:"text-xs text-muted-foreground"},Yr={key:1,class:"text-center py-8 text-muted-foreground"};var Ir={__name:"SuiteDetails",setup(e){const t=(0,u.tv)(),s=(0,u.yj)(),l=(0,r.iH)(!1),o=(0,r.iH)(null),i=(0,r.iH)(null),d=(0,r.iH)(null),c=(0,r.iH)(0),g=(0,a.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?[...o.value.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))):[])),m=(0,a.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?i.value||g.value[0]:null)),p=async()=>{const e=!o.value;e&&(l.value=!0);try{const t=await fetch(`/api/v1/suites/${s.params.key}/statuses`,{credentials:"include"});if(200===t.status){const e=await t.json(),s=o.value;if(o.value=e,e.results&&e.results.length>0){const t=[...e.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))),l=!i.value||s?.results&&i.value.timestamp===[...s.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp)))[0]?.timestamp;l&&(i.value=t[0])}}else 404===t.status?o.value=null:console.error("[SuiteDetails][fetchData] Error:",await t.text())}catch(t){console.error("[SuiteDetails][fetchData] Error:",t)}finally{e&&(l.value=!1)}},v=()=>{p()},f=()=>{t.push("/")},w=e=>Z(e),x=e=>{const t=new Date(e);return t.toLocaleString()},b=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},y=e=>{if(!e||!e.endpointResults||0===e.endpointResults.length)return 0;const t=e.endpointResults.filter((e=>e.success)).length;return Math.round(t/e.endpointResults.length*100)},_=(0,a.Fl)((()=>{if(!m.value||!m.value.endpointResults)return[];const e=m.value.endpointResults;return e.map(((t,s)=>{const l=o.value?.endpoints?.[s],a=e[s+1];let n=!1;for(let r=0;r_.value.filter((e=>"success"===e.status)).length)),U=(0,a.Fl)((()=>_.value.length?Math.round(S.value/_.value.length*100):0)),C=e=>e?e.conditionResults&&e.conditionResults.some((e=>e.condition.includes("SKIP")))?"skipped":e.success?"success":"failed":"not-started",W=(e,t)=>{d.value=e,c.value=t};return(0,a.bv)((()=>{p()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",wr,[(0,a._)("div",xr,[(0,a._)("div",hr,[(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"sm",onClick:f,class:"mb-4"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Pl.Z),{class:"h-4 w-4 mr-2"}),t[1]||(t[1]=(0,a.Uk)(" Back to Dashboard ",-1))])),_:1,__:[1]}),(0,a._)("div",br,[(0,a._)("div",null,[(0,a._)("h1",yr,(0,n.zw)(o.value?.name||"Loading..."),1),(0,a._)("p",kr,[o.value?.group?((0,a.wg)(),(0,a.iD)("span",_r,(0,n.zw)(o.value.group)+" • ",1)):(0,a.kq)("",!0),m.value?((0,a.wg)(),(0,a.iD)("span",Sr,(0,n.zw)(i.value&&i.value.timestamp!==g.value[0]?.timestamp?"Ran":"Last run")+" "+(0,n.zw)(w(m.value.timestamp)),1)):(0,a.kq)("",!0)])]),(0,a._)("div",Dr,[m.value?((0,a.wg)(),(0,a.j4)(et,{key:0,status:m.value.success?"healthy":"unhealthy"},null,8,["status"])):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(h),{variant:"ghost",size:"icon",onClick:v,title:"Refresh"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ye.Z),{class:"h-5 w-5"})])),_:1})])])]),l.value?((0,a.wg)(),(0,a.iD)("div",Ur,[(0,a.Wm)(de,{size:"lg"})])):o.value?((0,a.wg)(),(0,a.iD)("div",zr,[m.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{key:0},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(i.value?.timestamp===g.value[0]?.timestamp?"Latest Execution":`Execution at ${x(i.value.timestamp)}`),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[(0,a._)("div",Wr,[(0,a._)("div",jr,[(0,a._)("div",null,[t[4]||(t[4]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Status",-1)),(0,a._)("p",Hr,(0,n.zw)(m.value.success?"Success":"Failed"),1)]),(0,a._)("div",null,[t[5]||(t[5]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Duration",-1)),(0,a._)("p",Fr,(0,n.zw)(b(m.value.duration)),1)]),(0,a._)("div",null,[t[6]||(t[6]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Endpoints",-1)),(0,a._)("p",Rr,(0,n.zw)(m.value.endpointResults?.length||0),1)]),(0,a._)("div",null,[t[7]||(t[7]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Success Rate",-1)),(0,a._)("p",$r,(0,n.zw)(y(m.value))+"%",1)])]),(0,a._)("div",Tr,[t[8]||(t[8]=(0,a._)("h3",{class:"text-lg font-semibold mb-4"},"Execution Flow",-1)),(0,a.Wm)(Wn,{"flow-steps":_.value,"progress-percentage":U.value,"completed-steps":S.value,"total-steps":_.value.length,onStepSelected:W},null,8,["flow-steps","progress-percentage","completed-steps","total-steps"])]),m.value.errors&&m.value.errors.length>0?((0,a.wg)(),(0,a.iD)("div",qr,[t[9]||(t[9]=(0,a._)("h3",{class:"text-lg font-semibold mb-3 text-red-500"},"Suite Errors",-1)),(0,a._)("div",Er,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(m.value.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 p-3 rounded-md text-sm"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])])),_:1})])),_:1})):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[10]||(t[10]=[(0,a.Uk)("Execution History",-1)]))),_:1,__:[10]})])),_:1}),(0,a.Wm)((0,r.SU)(H),null,{default:(0,a.w5)((()=>[g.value.length>0?((0,a.wg)(),(0,a.iD)("div",Zr,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors cursor-pointer",{"bg-accent":i.value&&i.value.timestamp===e.timestamp}]),onClick:t=>i.value=e},[(0,a._)("div",Mr,[(0,a.Wm)(et,{status:e.success?"healthy":"unhealthy",size:"sm"},null,8,["status"]),(0,a._)("div",null,[(0,a._)("p",Ar,(0,n.zw)(x(e.timestamp)),1),(0,a._)("p",Nr,(0,n.zw)(e.endpointResults?.length||0)+" endpoints • "+(0,n.zw)(b(e.duration)),1)])]),(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4 text-muted-foreground"})],10,Lr)))),128))])):((0,a.wg)(),(0,a.iD)("div",Yr," No execution history available "))])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",Cr,[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[2]||(t[2]=(0,a._)("h3",{class:"text-lg font-semibold mb-2"},"Suite not found",-1)),t[3]||(t[3]=(0,a._)("p",{class:"text-muted-foreground"},"The requested suite could not be found.",-1))]))]),(0,a.Wm)(bs,{onRefreshData:p}),d.value?((0,a.wg)(),(0,a.j4)(fr,{key:0,step:d.value,index:c.value,onClose:t[0]||(t[0]=e=>d.value=null)},null,8,["step","index"])):(0,a.kq)("",!0)]))}};const Or=(0,$.Z)(Ir,[["__scopeId","data-v-3b91eea2"]]);var Pr=Or;const Kr=[{path:"/",name:"Home",component:Ol},{path:"/endpoints/:key",name:"EndpointDetails",component:Va},{path:"/suites/:key",name:"SuiteDetails",component:Pr}],Vr=(0,u.p7)({history:(0,u.PO)("/"),routes:Kr});var Gr=Vr;(0,l.ri)(Me).use(Gr).mount("#app")}},t={};function s(l){var a=t[l];if(void 0!==a)return a.exports;var n=t[l]={exports:{}};return e[l](n,n.exports,s),n.exports}s.m=e,function(){var e=[];s.O=function(t,l,a,n){if(!l){var r=1/0;for(d=0;d=n)&&Object.keys(s.O).every((function(e){return s.O[e](l[u])}))?l.splice(u--,1):(o=!1,n0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[l,a,n]}}(),function(){s.d=function(e,t){for(var l in t)s.o(t,l)&&!s.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){s.p="/"}(),function(){var e={143:0};s.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,r=l[0],o=l[1],u=l[2],i=0;if(r.some((function(t){return 0!==e[t]}))){for(a in o)s.o(o,a)&&(s.m[a]=o[a]);if(u)var d=u(s)}for(t&&t(l);i0&&0===--this._on&&(r=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){let e,n;for(this._active=!1,e=0,n=this.effects.length;e0)return;if(h){let t=h;h=void 0;while(t){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let t;while(u){let n=u;u=void 0;while(n){const i=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(e){t||(t=e)}n=i}}if(t)throw t}function m(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function b(t){let e,n=t.depsTail,i=n;while(i){const t=i.prevDep;-1===i.version?(i===n&&(n=t),v(i),w(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=t}t.deps=e,t.depsTail=n}function x(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(y(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function y(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===D)return;if(t.globalVersion=D,!t.isSSR&&128&t.flags&&(!t.deps&&!t._dirty||!x(t)))return;t.flags|=2;const e=t.dep,n=o,r=k;o=t,k=!0;try{m(t);const s=t.fn(t._value);(0===e.version||(0,i.aU)(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{o=n,k=r,b(t),t.flags&=-3}}function v(t,e=!1){const{dep:n,prevSub:i,nextSub:r}=t;if(i&&(i.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let t=n.computed.deps;t;t=t.nextDep)v(t,!0)}e||--n.sc||!n.map||n.map.delete(n.key)}function w(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let k=!0;const _=[];function M(){_.push(k),k=!1}function S(){const t=_.pop();k=void 0===t||t}function T(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=o;o=void 0;try{e()}finally{o=t}}}let D=0;class C{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class A{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!o||!k||o===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==o)e=this.activeLink=new C(o,this),o.deps?(e.prevDep=o.depsTail,o.depsTail.nextDep=e,o.depsTail=e):o.deps=o.depsTail=e,O(e);else if(-1===e.version&&(e.version=this.version,e.nextDep)){const t=e.nextDep;t.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=t),e.prevDep=o.depsTail,e.nextDep=void 0,o.depsTail.nextDep=e,o.depsTail=e,o.deps===e&&(o.deps=t)}return e}trigger(t){this.version++,D++,this.notify(t)}notify(t){p();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{g()}}}function O(t){if(t.dep.sc++,4&t.sub.flags){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)O(t)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const P=new WeakMap,E=Symbol(""),R=Symbol(""),I=Symbol("");function L(t,e,n){if(k&&o){let e=P.get(t);e||P.set(t,e=new Map);let i=e.get(n);i||(e.set(n,i=new A),i.map=e,i.key=n),i.track()}}function z(t,e,n,r,o,s){const a=P.get(t);if(!a)return void D++;const l=t=>{t&&t.trigger()};if(p(),"clear"===e)a.forEach(l);else{const o=(0,i.kJ)(t),s=o&&(0,i.S0)(n);if(o&&"length"===n){const t=Number(r);a.forEach(((e,n)=>{("length"===n||n===I||!(0,i.yk)(n)&&n>=t)&&l(e)}))}else switch((void 0!==n||a.has(void 0))&&l(a.get(n)),s&&l(a.get(I)),e){case"add":o?s&&l(a.get("length")):(l(a.get(E)),(0,i._N)(t)&&l(a.get(R)));break;case"delete":o||(l(a.get(E)),(0,i._N)(t)&&l(a.get(R)));break;case"set":(0,i._N)(t)&&l(a.get(E));break}}g()}function N(t){const e=Mt(t);return e===t?e:(L(e,"iterate",I),kt(t)?e:e.map(Tt))}function F(t){return L(t=Mt(t),"iterate",I),t}const j={__proto__:null,[Symbol.iterator](){return H(this,Symbol.iterator,Tt)},concat(...t){return N(this).concat(...t.map((t=>(0,i.kJ)(t)?N(t):t)))},entries(){return H(this,"entries",(t=>(t[1]=Tt(t[1]),t)))},every(t,e){return $(this,"every",t,e,void 0,arguments)},filter(t,e){return $(this,"filter",t,e,(t=>t.map(Tt)),arguments)},find(t,e){return $(this,"find",t,e,Tt,arguments)},findIndex(t,e){return $(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return $(this,"findLast",t,e,Tt,arguments)},findLastIndex(t,e){return $(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return $(this,"forEach",t,e,void 0,arguments)},includes(...t){return Y(this,"includes",t)},indexOf(...t){return Y(this,"indexOf",t)},join(t){return N(this).join(t)},lastIndexOf(...t){return Y(this,"lastIndexOf",t)},map(t,e){return $(this,"map",t,e,void 0,arguments)},pop(){return V(this,"pop")},push(...t){return V(this,"push",t)},reduce(t,...e){return B(this,"reduce",t,e)},reduceRight(t,...e){return B(this,"reduceRight",t,e)},shift(){return V(this,"shift")},some(t,e){return $(this,"some",t,e,void 0,arguments)},splice(...t){return V(this,"splice",t)},toReversed(){return N(this).toReversed()},toSorted(t){return N(this).toSorted(t)},toSpliced(...t){return N(this).toSpliced(...t)},unshift(...t){return V(this,"unshift",t)},values(){return H(this,"values",Tt)}};function H(t,e,n){const i=F(t),r=i[e]();return i===t||kt(t)||(r._next=r.next,r.next=()=>{const t=r._next();return t.value&&(t.value=n(t.value)),t}),r}const W=Array.prototype;function $(t,e,n,i,r,o){const s=F(t),a=s!==t&&!kt(t),l=s[e];if(l!==W[e]){const e=l.apply(t,o);return a?Tt(e):e}let c=n;s!==t&&(a?c=function(e,i){return n.call(this,Tt(e),i,t)}:n.length>2&&(c=function(e,i){return n.call(this,e,i,t)}));const u=l.call(s,c,i);return a&&r?r(u):u}function B(t,e,n,i){const r=F(t);let o=n;return r!==t&&(kt(t)?n.length>3&&(o=function(e,i,r){return n.call(this,e,i,r,t)}):o=function(e,i,r){return n.call(this,e,Tt(i),r,t)}),r[e](o,...i)}function Y(t,e,n){const i=Mt(t);L(i,"iterate",I);const r=i[e](...n);return-1!==r&&!1!==r||!_t(n[0])?r:(n[0]=Mt(n[0]),i[e](...n))}function V(t,e,n=[]){M(),p();const i=Mt(t)[e].apply(t,n);return g(),S(),i}const U=(0,i.fY)("__proto__,__v_isRef,__isVue"),q=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(i.yk));function X(t){(0,i.yk)(t)||(t=String(t));const e=Mt(this);return L(e,"has",t),e.hasOwnProperty(t)}class G{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,n){if("__v_skip"===e)return t["__v_skip"];const r=this._isReadonly,o=this._isShallow;if("__v_isReactive"===e)return!r;if("__v_isReadonly"===e)return r;if("__v_isShallow"===e)return o;if("__v_raw"===e)return n===(r?o?ft:dt:o?ht:ut).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const s=(0,i.kJ)(t);if(!r){let t;if(s&&(t=j[e]))return t;if("hasOwnProperty"===e)return X}const a=Reflect.get(t,e,Ct(t)?t:n);return((0,i.yk)(e)?q.has(e):U(e))?a:(r||L(t,"get",e),o?a:Ct(a)?s&&(0,i.S0)(e)?a:a.value:(0,i.Kn)(a)?r?xt(a):mt(a):a)}}class Z extends G{constructor(t=!1){super(!1,t)}set(t,e,n,r){let o=t[e];if(!this._isShallow){const e=wt(o);if(kt(n)||wt(n)||(o=Mt(o),n=Mt(n)),!(0,i.kJ)(t)&&Ct(o)&&!Ct(n))return!e&&(o.value=n,!0)}const s=(0,i.kJ)(t)&&(0,i.S0)(e)?Number(e)t,nt=t=>Reflect.getPrototypeOf(t);function it(t,e,n){return function(...r){const o=this["__v_raw"],s=Mt(o),a=(0,i._N)(s),l="entries"===t||t===Symbol.iterator&&a,c="keys"===t&&a,u=o[t](...r),h=n?et:e?Dt:Tt;return!e&&L(s,"iterate",c?R:E),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:l?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function rt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ot(t,e){const n={get(n){const r=this["__v_raw"],o=Mt(r),s=Mt(n);t||((0,i.aU)(n,s)&&L(o,"get",n),L(o,"get",s));const{has:a}=nt(o),l=e?et:t?Dt:Tt;return a.call(o,n)?l(r.get(n)):a.call(o,s)?l(r.get(s)):void(r!==o&&r.get(n))},get size(){const e=this["__v_raw"];return!t&&L(Mt(e),"iterate",E),Reflect.get(e,"size",e)},has(e){const n=this["__v_raw"],r=Mt(n),o=Mt(e);return t||((0,i.aU)(e,o)&&L(r,"has",e),L(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)},forEach(n,i){const r=this,o=r["__v_raw"],s=Mt(o),a=e?et:t?Dt:Tt;return!t&&L(s,"iterate",E),o.forEach(((t,e)=>n.call(i,a(t),a(e),r)))}};(0,i.l7)(n,t?{add:rt("add"),set:rt("set"),delete:rt("delete"),clear:rt("clear")}:{add(t){e||kt(t)||wt(t)||(t=Mt(t));const n=Mt(this),i=nt(n),r=i.has.call(n,t);return r||(n.add(t),z(n,"add",t,t)),this},set(t,n){e||kt(n)||wt(n)||(n=Mt(n));const r=Mt(this),{has:o,get:s}=nt(r);let a=o.call(r,t);a||(t=Mt(t),a=o.call(r,t));const l=s.call(r,t);return r.set(t,n),a?(0,i.aU)(n,l)&&z(r,"set",t,n,l):z(r,"add",t,n),this},delete(t){const e=Mt(this),{has:n,get:i}=nt(e);let r=n.call(e,t);r||(t=Mt(t),r=n.call(e,t));const o=i?i.call(e,t):void 0,s=e.delete(t);return r&&z(e,"delete",t,void 0,o),s},clear(){const t=Mt(this),e=0!==t.size,n=void 0,i=t.clear();return e&&z(t,"clear",void 0,void 0,n),i}});const r=["keys","values","entries",Symbol.iterator];return r.forEach((i=>{n[i]=it(i,t,e)})),n}function st(t,e){const n=ot(t,e);return(e,r,o)=>"__v_isReactive"===r?!t:"__v_isReadonly"===r?t:"__v_raw"===r?e:Reflect.get((0,i.RI)(n,r)&&r in e?n:e,r,o)}const at={get:st(!1,!1)},lt={get:st(!1,!0)},ct={get:st(!0,!1)};const ut=new WeakMap,ht=new WeakMap,dt=new WeakMap,ft=new WeakMap;function pt(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gt(t){return t["__v_skip"]||!Object.isExtensible(t)?0:pt((0,i.W7)(t))}function mt(t){return wt(t)?t:yt(t,!1,J,at,ut)}function bt(t){return yt(t,!1,tt,lt,ht)}function xt(t){return yt(t,!0,K,ct,dt)}function yt(t,e,n,r,o){if(!(0,i.Kn)(t))return t;if(t["__v_raw"]&&(!e||!t["__v_isReactive"]))return t;const s=gt(t);if(0===s)return t;const a=o.get(t);if(a)return a;const l=new Proxy(t,2===s?r:n);return o.set(t,l),l}function vt(t){return wt(t)?vt(t["__v_raw"]):!(!t||!t["__v_isReactive"])}function wt(t){return!(!t||!t["__v_isReadonly"])}function kt(t){return!(!t||!t["__v_isShallow"])}function _t(t){return!!t&&!!t["__v_raw"]}function Mt(t){const e=t&&t["__v_raw"];return e?Mt(e):t}function St(t){return!(0,i.RI)(t,"__v_skip")&&Object.isExtensible(t)&&(0,i.Nj)(t,"__v_skip",!0),t}const Tt=t=>(0,i.Kn)(t)?mt(t):t,Dt=t=>(0,i.Kn)(t)?xt(t):t;function Ct(t){return!!t&&!0===t["__v_isRef"]}function At(t){return Pt(t,!1)}function Ot(t){return Pt(t,!0)}function Pt(t,e){return Ct(t)?t:new Et(t,e)}class Et{constructor(t,e){this.dep=new A,this["__v_isRef"]=!0,this["__v_isShallow"]=!1,this._rawValue=e?t:Mt(t),this._value=e?t:Tt(t),this["__v_isShallow"]=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,n=this["__v_isShallow"]||kt(t)||wt(t);t=n?t:Mt(t),(0,i.aU)(t,e)&&(this._rawValue=t,this._value=n?t:Tt(t),this.dep.trigger())}}function Rt(t){return Ct(t)?t.value:t}const It={get:(t,e,n)=>"__v_raw"===e?t:Rt(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return Ct(r)&&!Ct(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function Lt(t){return vt(t)?t:new Proxy(t,It)}class zt{constructor(t,e,n){this.fn=t,this.setter=e,this._value=void 0,this.dep=new A(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D-1,this.next=void 0,this.effect=this,this["__v_isReadonly"]=!e,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||o===this))return f(this,!0),!0}get value(){const t=this.dep.track();return y(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Nt(t,e,n=!1){let r,o;(0,i.mf)(t)?r=t:(r=t.get,o=t.set);const s=new zt(r,o,n);return s}const Ft={},jt=new WeakMap;let Ht;function Wt(t,e=!1,n=Ht){if(n){let e=jt.get(n);e||jt.set(n,e=[]),e.push(t)}else 0}function $t(t,e,n=i.kT){const{immediate:r,deep:o,once:s,scheduler:l,augmentJob:u,call:h}=n,d=t=>o?t:kt(t)||!1===o||0===o?Bt(t,1):Bt(t);let f,p,g,m,b=!1,x=!1;if(Ct(t)?(p=()=>t.value,b=kt(t)):vt(t)?(p=()=>d(t),b=!0):(0,i.kJ)(t)?(x=!0,b=t.some((t=>vt(t)||kt(t))),p=()=>t.map((t=>Ct(t)?t.value:vt(t)?d(t):(0,i.mf)(t)?h?h(t,2):t():void 0))):p=(0,i.mf)(t)?e?h?()=>h(t,2):t:()=>{if(g){M();try{g()}finally{S()}}const e=Ht;Ht=f;try{return h?h(t,3,[m]):t(m)}finally{Ht=e}}:i.dG,e&&o){const t=p,e=!0===o?1/0:o;p=()=>Bt(t(),e)}const y=a(),v=()=>{f.stop(),y&&y.active&&(0,i.Od)(y.effects,f)};if(s&&e){const t=e;e=(...e)=>{t(...e),v()}}let w=x?new Array(t.length).fill(Ft):Ft;const k=t=>{if(1&f.flags&&(f.dirty||t))if(e){const t=f.run();if(o||b||(x?t.some(((t,e)=>(0,i.aU)(t,w[e]))):(0,i.aU)(t,w))){g&&g();const n=Ht;Ht=f;try{const i=[t,w===Ft?void 0:x&&w[0]===Ft?[]:w,m];w=t,h?h(e,3,i):e(...i)}finally{Ht=n}}}else f.run()};return u&&u(k),f=new c(p),f.scheduler=l?()=>l(k,!1):k,m=t=>Wt(t,!1,f),g=f.onStop=()=>{const t=jt.get(f);if(t){if(h)h(t,4);else for(const e of t)e();jt.delete(f)}},e?r?k(!0):w=f.run():l?l(k.bind(null,!0),!0):f.run(),v.pause=f.pause.bind(f),v.resume=f.resume.bind(f),v.stop=v,v}function Bt(t,e=1/0,n){if(e<=0||!(0,i.Kn)(t)||t["__v_skip"])return t;if(n=n||new Set,n.has(t))return t;if(n.add(t),e--,Ct(t))Bt(t.value,e,n);else if((0,i.kJ)(t))for(let i=0;i{Bt(t,e,n)}));else if((0,i.PO)(t)){for(const i in t)Bt(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Bt(t[i],e,n)}return t}},252:function(t,e,n){n.d(e,{$d:function(){return s},Ah:function(){return at},FN:function(){return vn},Fl:function(){return Fn},HY:function(){return He},JJ:function(){return Vt},Ko:function(){return xt},LL:function(){return gt},Q6:function(){return W},U2:function(){return j},Uk:function(){return cn},Us:function(){return fe},WI:function(){return yt},Wm:function(){return on},Y3:function(){return m},Y8:function(){return L},YP:function(){return Me},_:function(){return rn},aZ:function(){return $},bv:function(){return it},f3:function(){return Ut},h:function(){return jn},i8:function(){return Hn},iD:function(){return Qe},ic:function(){return ot},j4:function(){return Je},kq:function(){return un},nJ:function(){return N},nK:function(){return H},up:function(){return ft},w5:function(){return C},wg:function(){return Ue},wy:function(){return A}});var i=n(262),r=n(577);function o(t,e,n,i){try{return i?t(...i):t()}catch(r){a(r,e,n)}}function s(t,e,n,i){if((0,r.mf)(t)){const s=o(t,e,n,i);return s&&(0,r.tI)(s)&&s.catch((t=>{a(t,e,n)})),s}if((0,r.kJ)(t)){const r=[];for(let o=0;o>>1,r=c[i],o=_(r);o=_(n)?c.push(t):c.splice(b(e),0,t),t.flags|=1,y()}}function y(){g||(g=p.then(M))}function v(t){(0,r.kJ)(t)?h.push(...t):d&&-1===t.id?d.splice(f+1,0,t):1&t.flags||(h.push(t),t.flags|=1),y()}function w(t,e,n=u+1){for(0;n_(t)-_(e)));if(h.length=0,d)return void d.push(...t);for(d=t,f=0;fnull==t.id?2&t.flags?-1:1/0:t.id;function M(t){r.dG;try{for(u=0;u{i._d&&Ge(-1);const r=D(e);let o;try{o=t(...n)}finally{D(r),i._d&&Ge(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function A(t,e){if(null===S)return t;const n=Ln(S),o=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport;const R=Symbol("_leaveCb"),I=Symbol("_enterCb");function L(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return it((()=>{t.isMounted=!0})),st((()=>{t.isUnmounting=!0})),t}const z=[Function,Array],N={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:z,onEnter:z,onAfterEnter:z,onEnterCancelled:z,onBeforeLeave:z,onLeave:z,onAfterLeave:z,onLeaveCancelled:z,onBeforeAppear:z,onAppear:z,onAfterAppear:z,onAppearCancelled:z};function F(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function j(t,e,n,i,o){const{appear:a,mode:l,persisted:c=!1,onBeforeEnter:u,onEnter:h,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:p,onLeave:g,onAfterLeave:m,onLeaveCancelled:b,onBeforeAppear:x,onAppear:y,onAfterAppear:v,onAppearCancelled:w}=e,k=String(t.key),_=F(n,t),M=(t,e)=>{t&&s(t,i,9,e)},S=(t,e)=>{const n=e[1];M(t,e),(0,r.kJ)(t)?t.every((t=>t.length<=1))&&n():t.length<=1&&n()},T={mode:l,persisted:c,beforeEnter(e){let i=u;if(!n.isMounted){if(!a)return;i=x||u}e[R]&&e[R](!0);const r=_[k];r&&tn(t,r)&&r.el[R]&&r.el[R](),M(i,[e])},enter(t){let e=h,i=d,r=f;if(!n.isMounted){if(!a)return;e=y||h,i=v||d,r=w||f}let o=!1;const s=t[I]=e=>{o||(o=!0,M(e?r:i,[t]),T.delayedLeave&&T.delayedLeave(),t[I]=void 0)};e?S(e,[t,s]):s()},leave(e,i){const r=String(t.key);if(e[I]&&e[I](!0),n.isUnmounting)return i();M(p,[e]);let o=!1;const s=e[R]=n=>{o||(o=!0,i(),M(n?b:m,[e]),e[R]=void 0,_[r]===t&&delete _[r])};_[r]=t,g?S(g,[e,s]):s()},clone(t){const r=j(t,e,n,i,o);return o&&o(r),r}};return T}function H(t,e){6&t.shapeFlag&&t.component?(t.transition=e,H(t.component.subTree,e)):128&t.shapeFlag?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function W(t,e=!1,n){let i=[],r=0;for(let o=0;o1)for(let o=0;o0&&0===--this._on&&(r=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){let e,n;for(this._active=!1,e=0,n=this.effects.length;e0)return;if(h){let t=h;h=void 0;while(t){const e=t.next;t.next=void 0,t.flags&=-9,t=e}}let t;while(u){let n=u;u=void 0;while(n){const i=n.next;if(n.next=void 0,n.flags&=-9,1&n.flags)try{n.trigger()}catch(e){t||(t=e)}n=i}}if(t)throw t}function m(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function b(t){let e,n=t.depsTail,i=n;while(i){const t=i.prevDep;-1===i.version?(i===n&&(n=t),v(i),w(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=t}t.deps=e,t.depsTail=n}function y(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function x(t){if(4&t.flags&&!(16&t.flags))return;if(t.flags&=-17,t.globalVersion===D)return;if(t.globalVersion=D,!t.isSSR&&128&t.flags&&(!t.deps&&!t._dirty||!y(t)))return;t.flags|=2;const e=t.dep,n=o,r=k;o=t,k=!0;try{m(t);const s=t.fn(t._value);(0===e.version||(0,i.aU)(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{o=n,k=r,b(t),t.flags&=-3}}function v(t,e=!1){const{dep:n,prevSub:i,nextSub:r}=t;if(i&&(i.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let t=n.computed.deps;t;t=t.nextDep)v(t,!0)}e||--n.sc||!n.map||n.map.delete(n.key)}function w(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let k=!0;const _=[];function M(){_.push(k),k=!1}function S(){const t=_.pop();k=void 0===t||t}function T(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const t=o;o=void 0;try{e()}finally{o=t}}}let D=0;class C{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class A{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!o||!k||o===this.computed)return;let e=this.activeLink;if(void 0===e||e.sub!==o)e=this.activeLink=new C(o,this),o.deps?(e.prevDep=o.depsTail,o.depsTail.nextDep=e,o.depsTail=e):o.deps=o.depsTail=e,O(e);else if(-1===e.version&&(e.version=this.version,e.nextDep)){const t=e.nextDep;t.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=t),e.prevDep=o.depsTail,e.nextDep=void 0,o.depsTail.nextDep=e,o.depsTail=e,o.deps===e&&(o.deps=t)}return e}trigger(t){this.version++,D++,this.notify(t)}notify(t){p();try{0;for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{g()}}}function O(t){if(t.dep.sc++,4&t.sub.flags){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let t=e.deps;t;t=t.nextDep)O(t)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const P=new WeakMap,E=Symbol(""),R=Symbol(""),I=Symbol("");function L(t,e,n){if(k&&o){let e=P.get(t);e||P.set(t,e=new Map);let i=e.get(n);i||(e.set(n,i=new A),i.map=e,i.key=n),i.track()}}function z(t,e,n,r,o,s){const a=P.get(t);if(!a)return void D++;const l=t=>{t&&t.trigger()};if(p(),"clear"===e)a.forEach(l);else{const o=(0,i.kJ)(t),s=o&&(0,i.S0)(n);if(o&&"length"===n){const t=Number(r);a.forEach(((e,n)=>{("length"===n||n===I||!(0,i.yk)(n)&&n>=t)&&l(e)}))}else switch((void 0!==n||a.has(void 0))&&l(a.get(n)),s&&l(a.get(I)),e){case"add":o?s&&l(a.get("length")):(l(a.get(E)),(0,i._N)(t)&&l(a.get(R)));break;case"delete":o||(l(a.get(E)),(0,i._N)(t)&&l(a.get(R)));break;case"set":(0,i._N)(t)&&l(a.get(E));break}}g()}function N(t){const e=Mt(t);return e===t?e:(L(e,"iterate",I),kt(t)?e:e.map(Tt))}function F(t){return L(t=Mt(t),"iterate",I),t}const j={__proto__:null,[Symbol.iterator](){return H(this,Symbol.iterator,Tt)},concat(...t){return N(this).concat(...t.map((t=>(0,i.kJ)(t)?N(t):t)))},entries(){return H(this,"entries",(t=>(t[1]=Tt(t[1]),t)))},every(t,e){return $(this,"every",t,e,void 0,arguments)},filter(t,e){return $(this,"filter",t,e,(t=>t.map(Tt)),arguments)},find(t,e){return $(this,"find",t,e,Tt,arguments)},findIndex(t,e){return $(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return $(this,"findLast",t,e,Tt,arguments)},findLastIndex(t,e){return $(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return $(this,"forEach",t,e,void 0,arguments)},includes(...t){return Y(this,"includes",t)},indexOf(...t){return Y(this,"indexOf",t)},join(t){return N(this).join(t)},lastIndexOf(...t){return Y(this,"lastIndexOf",t)},map(t,e){return $(this,"map",t,e,void 0,arguments)},pop(){return V(this,"pop")},push(...t){return V(this,"push",t)},reduce(t,...e){return B(this,"reduce",t,e)},reduceRight(t,...e){return B(this,"reduceRight",t,e)},shift(){return V(this,"shift")},some(t,e){return $(this,"some",t,e,void 0,arguments)},splice(...t){return V(this,"splice",t)},toReversed(){return N(this).toReversed()},toSorted(t){return N(this).toSorted(t)},toSpliced(...t){return N(this).toSpliced(...t)},unshift(...t){return V(this,"unshift",t)},values(){return H(this,"values",Tt)}};function H(t,e,n){const i=F(t),r=i[e]();return i===t||kt(t)||(r._next=r.next,r.next=()=>{const t=r._next();return t.value&&(t.value=n(t.value)),t}),r}const W=Array.prototype;function $(t,e,n,i,r,o){const s=F(t),a=s!==t&&!kt(t),l=s[e];if(l!==W[e]){const e=l.apply(t,o);return a?Tt(e):e}let c=n;s!==t&&(a?c=function(e,i){return n.call(this,Tt(e),i,t)}:n.length>2&&(c=function(e,i){return n.call(this,e,i,t)}));const u=l.call(s,c,i);return a&&r?r(u):u}function B(t,e,n,i){const r=F(t);let o=n;return r!==t&&(kt(t)?n.length>3&&(o=function(e,i,r){return n.call(this,e,i,r,t)}):o=function(e,i,r){return n.call(this,e,Tt(i),r,t)}),r[e](o,...i)}function Y(t,e,n){const i=Mt(t);L(i,"iterate",I);const r=i[e](...n);return-1!==r&&!1!==r||!_t(n[0])?r:(n[0]=Mt(n[0]),i[e](...n))}function V(t,e,n=[]){M(),p();const i=Mt(t)[e].apply(t,n);return g(),S(),i}const U=(0,i.fY)("__proto__,__v_isRef,__isVue"),q=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(i.yk));function X(t){(0,i.yk)(t)||(t=String(t));const e=Mt(this);return L(e,"has",t),e.hasOwnProperty(t)}class G{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,n){if("__v_skip"===e)return t["__v_skip"];const r=this._isReadonly,o=this._isShallow;if("__v_isReactive"===e)return!r;if("__v_isReadonly"===e)return r;if("__v_isShallow"===e)return o;if("__v_raw"===e)return n===(r?o?ft:dt:o?ht:ut).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const s=(0,i.kJ)(t);if(!r){let t;if(s&&(t=j[e]))return t;if("hasOwnProperty"===e)return X}const a=Reflect.get(t,e,Ct(t)?t:n);return((0,i.yk)(e)?q.has(e):U(e))?a:(r||L(t,"get",e),o?a:Ct(a)?s&&(0,i.S0)(e)?a:a.value:(0,i.Kn)(a)?r?yt(a):mt(a):a)}}class Z extends G{constructor(t=!1){super(!1,t)}set(t,e,n,r){let o=t[e];if(!this._isShallow){const e=wt(o);if(kt(n)||wt(n)||(o=Mt(o),n=Mt(n)),!(0,i.kJ)(t)&&Ct(o)&&!Ct(n))return!e&&(o.value=n,!0)}const s=(0,i.kJ)(t)&&(0,i.S0)(e)?Number(e)t,nt=t=>Reflect.getPrototypeOf(t);function it(t,e,n){return function(...r){const o=this["__v_raw"],s=Mt(o),a=(0,i._N)(s),l="entries"===t||t===Symbol.iterator&&a,c="keys"===t&&a,u=o[t](...r),h=n?et:e?Dt:Tt;return!e&&L(s,"iterate",c?R:E),{next(){const{value:t,done:e}=u.next();return e?{value:t,done:e}:{value:l?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function rt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ot(t,e){const n={get(n){const r=this["__v_raw"],o=Mt(r),s=Mt(n);t||((0,i.aU)(n,s)&&L(o,"get",n),L(o,"get",s));const{has:a}=nt(o),l=e?et:t?Dt:Tt;return a.call(o,n)?l(r.get(n)):a.call(o,s)?l(r.get(s)):void(r!==o&&r.get(n))},get size(){const e=this["__v_raw"];return!t&&L(Mt(e),"iterate",E),Reflect.get(e,"size",e)},has(e){const n=this["__v_raw"],r=Mt(n),o=Mt(e);return t||((0,i.aU)(e,o)&&L(r,"has",e),L(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)},forEach(n,i){const r=this,o=r["__v_raw"],s=Mt(o),a=e?et:t?Dt:Tt;return!t&&L(s,"iterate",E),o.forEach(((t,e)=>n.call(i,a(t),a(e),r)))}};(0,i.l7)(n,t?{add:rt("add"),set:rt("set"),delete:rt("delete"),clear:rt("clear")}:{add(t){e||kt(t)||wt(t)||(t=Mt(t));const n=Mt(this),i=nt(n),r=i.has.call(n,t);return r||(n.add(t),z(n,"add",t,t)),this},set(t,n){e||kt(n)||wt(n)||(n=Mt(n));const r=Mt(this),{has:o,get:s}=nt(r);let a=o.call(r,t);a||(t=Mt(t),a=o.call(r,t));const l=s.call(r,t);return r.set(t,n),a?(0,i.aU)(n,l)&&z(r,"set",t,n,l):z(r,"add",t,n),this},delete(t){const e=Mt(this),{has:n,get:i}=nt(e);let r=n.call(e,t);r||(t=Mt(t),r=n.call(e,t));const o=i?i.call(e,t):void 0,s=e.delete(t);return r&&z(e,"delete",t,void 0,o),s},clear(){const t=Mt(this),e=0!==t.size,n=void 0,i=t.clear();return e&&z(t,"clear",void 0,void 0,n),i}});const r=["keys","values","entries",Symbol.iterator];return r.forEach((i=>{n[i]=it(i,t,e)})),n}function st(t,e){const n=ot(t,e);return(e,r,o)=>"__v_isReactive"===r?!t:"__v_isReadonly"===r?t:"__v_raw"===r?e:Reflect.get((0,i.RI)(n,r)&&r in e?n:e,r,o)}const at={get:st(!1,!1)},lt={get:st(!1,!0)},ct={get:st(!0,!1)};const ut=new WeakMap,ht=new WeakMap,dt=new WeakMap,ft=new WeakMap;function pt(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gt(t){return t["__v_skip"]||!Object.isExtensible(t)?0:pt((0,i.W7)(t))}function mt(t){return wt(t)?t:xt(t,!1,J,at,ut)}function bt(t){return xt(t,!1,tt,lt,ht)}function yt(t){return xt(t,!0,K,ct,dt)}function xt(t,e,n,r,o){if(!(0,i.Kn)(t))return t;if(t["__v_raw"]&&(!e||!t["__v_isReactive"]))return t;const s=gt(t);if(0===s)return t;const a=o.get(t);if(a)return a;const l=new Proxy(t,2===s?r:n);return o.set(t,l),l}function vt(t){return wt(t)?vt(t["__v_raw"]):!(!t||!t["__v_isReactive"])}function wt(t){return!(!t||!t["__v_isReadonly"])}function kt(t){return!(!t||!t["__v_isShallow"])}function _t(t){return!!t&&!!t["__v_raw"]}function Mt(t){const e=t&&t["__v_raw"];return e?Mt(e):t}function St(t){return!(0,i.RI)(t,"__v_skip")&&Object.isExtensible(t)&&(0,i.Nj)(t,"__v_skip",!0),t}const Tt=t=>(0,i.Kn)(t)?mt(t):t,Dt=t=>(0,i.Kn)(t)?yt(t):t;function Ct(t){return!!t&&!0===t["__v_isRef"]}function At(t){return Pt(t,!1)}function Ot(t){return Pt(t,!0)}function Pt(t,e){return Ct(t)?t:new Et(t,e)}class Et{constructor(t,e){this.dep=new A,this["__v_isRef"]=!0,this["__v_isShallow"]=!1,this._rawValue=e?t:Mt(t),this._value=e?t:Tt(t),this["__v_isShallow"]=e}get value(){return this.dep.track(),this._value}set value(t){const e=this._rawValue,n=this["__v_isShallow"]||kt(t)||wt(t);t=n?t:Mt(t),(0,i.aU)(t,e)&&(this._rawValue=t,this._value=n?t:Tt(t),this.dep.trigger())}}function Rt(t){return Ct(t)?t.value:t}const It={get:(t,e,n)=>"__v_raw"===e?t:Rt(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return Ct(r)&&!Ct(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function Lt(t){return vt(t)?t:new Proxy(t,It)}class zt{constructor(t,e,n){this.fn=t,this.setter=e,this._value=void 0,this.dep=new A(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=D-1,this.next=void 0,this.effect=this,this["__v_isReadonly"]=!e,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||o===this))return f(this,!0),!0}get value(){const t=this.dep.track();return x(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Nt(t,e,n=!1){let r,o;(0,i.mf)(t)?r=t:(r=t.get,o=t.set);const s=new zt(r,o,n);return s}const Ft={},jt=new WeakMap;let Ht;function Wt(t,e=!1,n=Ht){if(n){let e=jt.get(n);e||jt.set(n,e=[]),e.push(t)}else 0}function $t(t,e,n=i.kT){const{immediate:r,deep:o,once:s,scheduler:l,augmentJob:u,call:h}=n,d=t=>o?t:kt(t)||!1===o||0===o?Bt(t,1):Bt(t);let f,p,g,m,b=!1,y=!1;if(Ct(t)?(p=()=>t.value,b=kt(t)):vt(t)?(p=()=>d(t),b=!0):(0,i.kJ)(t)?(y=!0,b=t.some((t=>vt(t)||kt(t))),p=()=>t.map((t=>Ct(t)?t.value:vt(t)?d(t):(0,i.mf)(t)?h?h(t,2):t():void 0))):p=(0,i.mf)(t)?e?h?()=>h(t,2):t:()=>{if(g){M();try{g()}finally{S()}}const e=Ht;Ht=f;try{return h?h(t,3,[m]):t(m)}finally{Ht=e}}:i.dG,e&&o){const t=p,e=!0===o?1/0:o;p=()=>Bt(t(),e)}const x=a(),v=()=>{f.stop(),x&&x.active&&(0,i.Od)(x.effects,f)};if(s&&e){const t=e;e=(...e)=>{t(...e),v()}}let w=y?new Array(t.length).fill(Ft):Ft;const k=t=>{if(1&f.flags&&(f.dirty||t))if(e){const t=f.run();if(o||b||(y?t.some(((t,e)=>(0,i.aU)(t,w[e]))):(0,i.aU)(t,w))){g&&g();const n=Ht;Ht=f;try{const i=[t,w===Ft?void 0:y&&w[0]===Ft?[]:w,m];w=t,h?h(e,3,i):e(...i)}finally{Ht=n}}}else f.run()};return u&&u(k),f=new c(p),f.scheduler=l?()=>l(k,!1):k,m=t=>Wt(t,!1,f),g=f.onStop=()=>{const t=jt.get(f);if(t){if(h)h(t,4);else for(const e of t)e();jt.delete(f)}},e?r?k(!0):w=f.run():l?l(k.bind(null,!0),!0):f.run(),v.pause=f.pause.bind(f),v.resume=f.resume.bind(f),v.stop=v,v}function Bt(t,e=1/0,n){if(e<=0||!(0,i.Kn)(t)||t["__v_skip"])return t;if(n=n||new Set,n.has(t))return t;if(n.add(t),e--,Ct(t))Bt(t.value,e,n);else if((0,i.kJ)(t))for(let i=0;i{Bt(t,e,n)}));else if((0,i.PO)(t)){for(const i in t)Bt(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Bt(t[i],e,n)}return t}},252:function(t,e,n){n.d(e,{$d:function(){return s},Ah:function(){return at},FN:function(){return vn},Fl:function(){return Fn},HY:function(){return He},JJ:function(){return Vt},Ko:function(){return yt},LL:function(){return gt},Q6:function(){return W},U2:function(){return j},Uk:function(){return cn},Us:function(){return fe},WI:function(){return xt},Wm:function(){return on},Y3:function(){return m},Y8:function(){return L},YP:function(){return Me},_:function(){return rn},aZ:function(){return $},bv:function(){return it},f3:function(){return Ut},h:function(){return jn},i8:function(){return Hn},iD:function(){return Qe},ic:function(){return ot},j4:function(){return Je},kq:function(){return un},nJ:function(){return N},nK:function(){return H},up:function(){return ft},w5:function(){return C},wg:function(){return Ue},wy:function(){return A}});var i=n(262),r=n(577);function o(t,e,n,i){try{return i?t(...i):t()}catch(r){a(r,e,n)}}function s(t,e,n,i){if((0,r.mf)(t)){const s=o(t,e,n,i);return s&&(0,r.tI)(s)&&s.catch((t=>{a(t,e,n)})),s}if((0,r.kJ)(t)){const r=[];for(let o=0;o>>1,r=c[i],o=_(r);o=_(n)?c.push(t):c.splice(b(e),0,t),t.flags|=1,x()}}function x(){g||(g=p.then(M))}function v(t){(0,r.kJ)(t)?h.push(...t):d&&-1===t.id?d.splice(f+1,0,t):1&t.flags||(h.push(t),t.flags|=1),x()}function w(t,e,n=u+1){for(0;n_(t)-_(e)));if(h.length=0,d)return void d.push(...t);for(d=t,f=0;fnull==t.id?2&t.flags?-1:1/0:t.id;function M(t){r.dG;try{for(u=0;u{i._d&&Ge(-1);const r=D(e);let o;try{o=t(...n)}finally{D(r),i._d&&Ge(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function A(t,e){if(null===S)return t;const n=Ln(S),o=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport;const R=Symbol("_leaveCb"),I=Symbol("_enterCb");function L(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return it((()=>{t.isMounted=!0})),st((()=>{t.isUnmounting=!0})),t}const z=[Function,Array],N={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:z,onEnter:z,onAfterEnter:z,onEnterCancelled:z,onBeforeLeave:z,onLeave:z,onAfterLeave:z,onLeaveCancelled:z,onBeforeAppear:z,onAppear:z,onAfterAppear:z,onAppearCancelled:z};function F(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function j(t,e,n,i,o){const{appear:a,mode:l,persisted:c=!1,onBeforeEnter:u,onEnter:h,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:p,onLeave:g,onAfterLeave:m,onLeaveCancelled:b,onBeforeAppear:y,onAppear:x,onAfterAppear:v,onAppearCancelled:w}=e,k=String(t.key),_=F(n,t),M=(t,e)=>{t&&s(t,i,9,e)},S=(t,e)=>{const n=e[1];M(t,e),(0,r.kJ)(t)?t.every((t=>t.length<=1))&&n():t.length<=1&&n()},T={mode:l,persisted:c,beforeEnter(e){let i=u;if(!n.isMounted){if(!a)return;i=y||u}e[R]&&e[R](!0);const r=_[k];r&&tn(t,r)&&r.el[R]&&r.el[R](),M(i,[e])},enter(t){let e=h,i=d,r=f;if(!n.isMounted){if(!a)return;e=x||h,i=v||d,r=w||f}let o=!1;const s=t[I]=e=>{o||(o=!0,M(e?r:i,[t]),T.delayedLeave&&T.delayedLeave(),t[I]=void 0)};e?S(e,[t,s]):s()},leave(e,i){const r=String(t.key);if(e[I]&&e[I](!0),n.isUnmounting)return i();M(p,[e]);let o=!1;const s=e[R]=n=>{o||(o=!0,i(),M(n?b:m,[e]),e[R]=void 0,_[r]===t&&delete _[r])};_[r]=t,g?S(g,[e,s]):s()},clone(t){const r=j(t,e,n,i,o);return o&&o(r),r}};return T}function H(t,e){6&t.shapeFlag&&t.component?(t.transition=e,H(t.component.subTree,e)):128&t.shapeFlag?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function W(t,e=!1,n){let i=[],r=0;for(let o=0;o1)for(let o=0;o(0,r.l7)({name:t.name},e,{setup:t}))():t}function B(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function Y(t,e,n,s,a=!1){if((0,r.kJ)(t))return void t.forEach(((t,i)=>Y(t,e&&((0,r.kJ)(e)?e[i]:e),n,s,a)));if(V(s)&&!a)return void(512&s.shapeFlag&&s.type.__asyncResolved&&s.component.subTree.component&&Y(t,e,n,s.component.subTree));const l=4&s.shapeFlag?Ln(s.component):s.el,c=a?null:l,{i:u,r:h}=t;const d=e&&e.r,f=u.refs===r.kT?u.refs={}:u.refs,p=u.setupState,g=(0,i.IU)(p),m=p===r.kT?()=>!1:t=>(0,r.RI)(g,t);if(null!=d&&d!==h&&((0,r.HD)(d)?(f[d]=null,m(d)&&(p[d]=null)):(0,i.dq)(d)&&(d.value=null)),(0,r.mf)(h))o(h,u,12,[c,f]);else{const e=(0,r.HD)(h),o=(0,i.dq)(h);if(e||o){const i=()=>{if(t.f){const n=e?m(h)?p[h]:f[h]:h.value;a?(0,r.kJ)(n)&&(0,r.Od)(n,l):(0,r.kJ)(n)?n.includes(l)||n.push(l):e?(f[h]=[l],m(h)&&(p[h]=f[h])):(h.value=[l],t.k&&(f[t.k]=h.value))}else e?(f[h]=c,m(h)&&(p[h]=c)):o&&(h.value=c,t.k&&(f[t.k]=c))};c?(i.id=-1,de(i,n)):i()}else 0}}(0,r.E9)().requestIdleCallback,(0,r.E9)().cancelIdleCallback;const V=t=>!!t.type.__asyncLoader -/*! #__NO_SIDE_EFFECTS__ */;const U=t=>t.type.__isKeepAlive;RegExp,RegExp;function q(t,e){return(0,r.kJ)(t)?t.some((t=>q(t,e))):(0,r.HD)(t)?t.split(",").includes(e):!!(0,r.Kj)(t)&&(t.lastIndex=0,t.test(e))}function X(t,e){Z(t,"a",e)}function G(t,e){Z(t,"da",e)}function Z(t,e,n=yn){const i=t.__wdc||(t.__wdc=()=>{let e=n;while(e){if(e.isDeactivated)return;e=e.parent}return t()});if(tt(e,i,n),n){let t=n.parent;while(t&&t.parent)U(t.parent.vnode)&&Q(i,e,n,t),t=t.parent}}function Q(t,e,n,i){const o=tt(e,t,i,!0);at((()=>{(0,r.Od)(i[e],o)}),n)}function J(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function K(t){return 128&t.shapeFlag?t.ssContent:t}function tt(t,e,n=yn,r=!1){if(n){const o=n[t]||(n[t]=[]),a=e.__weh||(e.__weh=(...r)=>{(0,i.Jd)();const o=_n(n),a=s(e,n,t,r);return o(),(0,i.lk)(),a});return r?o.unshift(a):o.push(a),a}}const et=t=>(e,n=yn)=>{Cn&&"sp"!==t||tt(t,((...t)=>e(...t)),n)},nt=et("bm"),it=et("m"),rt=et("bu"),ot=et("u"),st=et("bum"),at=et("um"),lt=et("sp"),ct=et("rtg"),ut=et("rtc");function ht(t,e=yn){tt("ec",t,e)}const dt="components";function ft(t,e){return mt(dt,t,!0,e)||t}const pt=Symbol.for("v-ndc");function gt(t){return(0,r.HD)(t)?mt(dt,t,!1)||t:t||pt}function mt(t,e,n=!0,i=!1){const o=S||yn;if(o){const n=o.type;if(t===dt){const t=zn(n,!1);if(t&&(t===e||t===(0,r._A)(e)||t===(0,r.kC)((0,r._A)(e))))return n}const s=bt(o[t]||n[t],e)||bt(o.appContext[t],e);return!s&&i?n:s}}function bt(t,e){return t&&(t[e]||t[(0,r._A)(e)]||t[(0,r.kC)((0,r._A)(e))])}function xt(t,e,n,o){let s;const a=n&&n[o],l=(0,r.kJ)(t);if(l||(0,r.HD)(t)){const n=l&&(0,i.PG)(t);let r=!1,o=!1;n&&(r=!(0,i.yT)(t),o=(0,i.$y)(t),t=(0,i.XB)(t)),s=new Array(t.length);for(let l=0,c=t.length;le(t,n,void 0,a&&a[n])));else{const n=Object.keys(t);s=new Array(n.length);for(let i=0,r=n.length;i!Ke(t)||t.type!==$e&&!(t.type===He&&!vt(t.children))))?t:null}const wt=t=>t?Sn(t)?Ln(t):wt(t.parent):null,kt=(0,r.l7)(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>wt(t.parent),$root:t=>wt(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Pt(t),$forceUpdate:t=>t.f||(t.f=()=>{x(t.update)}),$nextTick:t=>t.n||(t.n=m.bind(t.proxy)),$watch:t=>Te.bind(t)}),_t=(t,e)=>t!==r.kT&&!t.__isScriptSetup&&(0,r.RI)(t,e),Mt={get({_:t},e){if("__v_skip"===e)return!0;const{ctx:n,setupState:o,data:s,props:a,accessCache:l,type:c,appContext:u}=t;let h;if("$"!==e[0]){const i=l[e];if(void 0!==i)switch(i){case 1:return o[e];case 2:return s[e];case 4:return n[e];case 3:return a[e]}else{if(_t(o,e))return l[e]=1,o[e];if(s!==r.kT&&(0,r.RI)(s,e))return l[e]=2,s[e];if((h=t.propsOptions[0])&&(0,r.RI)(h,e))return l[e]=3,a[e];if(n!==r.kT&&(0,r.RI)(n,e))return l[e]=4,n[e];Tt&&(l[e]=0)}}const d=kt[e];let f,p;return d?("$attrs"===e&&(0,i.j)(t.attrs,"get",""),d(t)):(f=c.__cssModules)&&(f=f[e])?f:n!==r.kT&&(0,r.RI)(n,e)?(l[e]=4,n[e]):(p=u.config.globalProperties,(0,r.RI)(p,e)?p[e]:void 0)},set({_:t},e,n){const{data:i,setupState:o,ctx:s}=t;return _t(o,e)?(o[e]=n,!0):i!==r.kT&&(0,r.RI)(i,e)?(i[e]=n,!0):!(0,r.RI)(t.props,e)&&(("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=n,!0))},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:o,propsOptions:s}},a){let l;return!!n[a]||t!==r.kT&&(0,r.RI)(t,a)||_t(e,a)||(l=s[0])&&(0,r.RI)(l,a)||(0,r.RI)(i,a)||(0,r.RI)(kt,a)||(0,r.RI)(o.config.globalProperties,a)},defineProperty(t,e,n){return null!=n.get?t._.accessCache[e]=0:(0,r.RI)(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function St(t){return(0,r.kJ)(t)?t.reduce(((t,e)=>(t[e]=null,t)),{}):t}let Tt=!0;function Dt(t){const e=Pt(t),n=t.proxy,o=t.ctx;Tt=!1,e.beforeCreate&&At(e.beforeCreate,t,"bc");const{data:s,computed:a,methods:l,watch:c,provide:u,inject:h,created:d,beforeMount:f,mounted:p,beforeUpdate:g,updated:m,activated:b,deactivated:x,beforeDestroy:y,beforeUnmount:v,destroyed:w,unmounted:k,render:_,renderTracked:M,renderTriggered:S,errorCaptured:T,serverPrefetch:D,expose:C,inheritAttrs:A,components:O,directives:P,filters:E}=e,R=null;if(h&&Ct(h,o,R),l)for(const i in l){const t=l[i];(0,r.mf)(t)&&(o[i]=t.bind(n))}if(s){0;const e=s.call(n,n);0,(0,r.Kn)(e)&&(t.data=(0,i.qj)(e))}if(Tt=!0,a)for(const i in a){const t=a[i],e=(0,r.mf)(t)?t.bind(n,n):(0,r.mf)(t.get)?t.get.bind(n,n):r.dG;0;const s=!(0,r.mf)(t)&&(0,r.mf)(t.set)?t.set.bind(n):r.dG,l=Fn({get:e,set:s});Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>l.value,set:t=>l.value=t})}if(c)for(const i in c)Ot(c[i],o,n,i);if(u){const t=(0,r.mf)(u)?u.call(n):u;Reflect.ownKeys(t).forEach((e=>{Vt(e,t[e])}))}function I(t,e){(0,r.kJ)(e)?e.forEach((e=>t(e.bind(n)))):e&&t(e.bind(n))}if(d&&At(d,t,"c"),I(nt,f),I(it,p),I(rt,g),I(ot,m),I(X,b),I(G,x),I(ht,T),I(ut,M),I(ct,S),I(st,v),I(at,k),I(lt,D),(0,r.kJ)(C))if(C.length){const e=t.exposed||(t.exposed={});C.forEach((t=>{Object.defineProperty(e,t,{get:()=>n[t],set:e=>n[t]=e,enumerable:!0})}))}else t.exposed||(t.exposed={});_&&t.render===r.dG&&(t.render=_),null!=A&&(t.inheritAttrs=A),O&&(t.components=O),P&&(t.directives=P),D&&B(t)}function Ct(t,e,n=r.dG){(0,r.kJ)(t)&&(t=zt(t));for(const o in t){const n=t[o];let s;s=(0,r.Kn)(n)?"default"in n?Ut(n.from||o,n.default,!0):Ut(n.from||o):Ut(n),(0,i.dq)(s)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:t=>s.value=t}):e[o]=s}}function At(t,e,n){s((0,r.kJ)(t)?t.map((t=>t.bind(e.proxy))):t.bind(e.proxy),e,n)}function Ot(t,e,n,i){let o=i.includes(".")?De(n,i):()=>n[i];if((0,r.HD)(t)){const n=e[t];(0,r.mf)(n)&&Me(o,n)}else if((0,r.mf)(t))Me(o,t.bind(n));else if((0,r.Kn)(t))if((0,r.kJ)(t))t.forEach((t=>Ot(t,e,n,i)));else{const i=(0,r.mf)(t.handler)?t.handler.bind(n):e[t.handler];(0,r.mf)(i)&&Me(o,i,t)}else 0}function Pt(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:o,optionsCache:s,config:{optionMergeStrategies:a}}=t.appContext,l=s.get(e);let c;return l?c=l:o.length||n||i?(c={},o.length&&o.forEach((t=>Et(c,t,a,!0))),Et(c,e,a)):c=e,(0,r.Kn)(e)&&s.set(e,c),c}function Et(t,e,n,i=!1){const{mixins:r,extends:o}=e;o&&Et(t,o,n,!0),r&&r.forEach((e=>Et(t,e,n,!0)));for(const s in e)if(i&&"expose"===s);else{const i=Rt[s]||n&&n[s];t[s]=i?i(t[s],e[s]):e[s]}return t}const Rt={data:It,props:jt,emits:jt,methods:Ft,computed:Ft,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:Ft,directives:Ft,watch:Ht,provide:It,inject:Lt};function It(t,e){return e?t?function(){return(0,r.l7)((0,r.mf)(t)?t.call(this,this):t,(0,r.mf)(e)?e.call(this,this):e)}:e:t}function Lt(t,e){return Ft(zt(t),zt(e))}function zt(t){if((0,r.kJ)(t)){const e={};for(let n=0;n1)return n&&(0,r.mf)(e)?e.call(i&&i.proxy):e}else 0}const qt={},Xt=()=>Object.create(qt),Gt=t=>Object.getPrototypeOf(t)===qt;function Zt(t,e,n,r=!1){const o={},s=Xt();t.propsDefaults=Object.create(null),Jt(t,e,o,s);for(const i in t.propsOptions[0])i in o||(o[i]=void 0);n?t.props=r?o:(0,i.Um)(o):t.type.props?t.props=o:t.props=s,t.attrs=s}function Qt(t,e,n,o){const{props:s,attrs:a,vnode:{patchFlag:l}}=t,c=(0,i.IU)(s),[u]=t.propsOptions;let h=!1;if(!(o||l>0)||16&l){let i;Jt(t,e,s,a)&&(h=!0);for(const o in c)e&&((0,r.RI)(e,o)||(i=(0,r.rs)(o))!==o&&(0,r.RI)(e,i))||(u?!n||void 0===n[o]&&void 0===n[i]||(s[o]=Kt(u,c,o,void 0,t,!0)):delete s[o]);if(a!==c)for(const t in a)e&&(0,r.RI)(e,t)||(delete a[t],h=!0)}else if(8&l){const n=t.vnode.dynamicProps;for(let i=0;i{c=!0;const[n,i]=ee(t,e,!0);(0,r.l7)(a,n),i&&l.push(...i)};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return(0,r.Kn)(t)&&i.set(t,r.Z6),r.Z6;if((0,r.kJ)(s))for(let h=0;h"_"===t||"__"===t||"_ctx"===t||"$stable"===t,re=t=>(0,r.kJ)(t)?t.map(hn):[hn(t)],oe=(t,e,n)=>{if(e._n)return e;const i=C(((...t)=>re(e(...t))),n);return i._c=!1,i},se=(t,e,n)=>{const i=t._ctx;for(const o in t){if(ie(o))continue;const n=t[o];if((0,r.mf)(n))e[o]=oe(o,n,i);else if(null!=n){0;const t=re(n);e[o]=()=>t}}},ae=(t,e)=>{const n=re(e);t.slots.default=()=>n},le=(t,e,n)=>{for(const i in e)!n&&ie(i)||(t[i]=e[i])},ce=(t,e,n)=>{const i=t.slots=Xt();if(32&t.vnode.shapeFlag){const t=e.__;t&&(0,r.Nj)(i,"__",t,!0);const o=e._;o?(le(i,e,n),n&&(0,r.Nj)(i,"_",o,!0)):se(e,i)}else e&&ae(t,e)},ue=(t,e,n)=>{const{vnode:i,slots:o}=t;let s=!0,a=r.kT;if(32&i.shapeFlag){const t=e._;t?n&&1===t?s=!1:le(o,e,n):(s=!e.$stable,se(e,o)),a=e}else e&&(ae(t,e),a={default:1});if(s)for(const r in o)ie(r)||null!=a[r]||delete o[r]};function he(){"boolean"!==typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&((0,r.E9)().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const de=je;function fe(t){return pe(t)}function pe(t,e){he();const n=(0,r.E9)();n.__VUE__=!0;const{insert:o,remove:s,patchProp:a,createElement:l,createText:c,createComment:u,setText:h,setElementText:d,parentNode:f,nextSibling:p,setScopeId:g=r.dG,insertStaticContent:m}=t,b=(t,e,n,i=null,r=null,o=null,s,a=null,l=!!e.dynamicChildren)=>{if(t===e)return;t&&!tn(t,e)&&(i=K(t),X(t,r,o,!0),t=null),-2===e.patchFlag&&(l=!1,e.dynamicChildren=null);const{type:c,ref:u,shapeFlag:h}=e;switch(c){case We:y(t,e,n,i);break;case $e:v(t,e,n,i);break;case Be:null==t&&_(e,n,i,s);break;case He:L(t,e,n,i,r,o,s,a,l);break;default:1&h?T(t,e,n,i,r,o,s,a,l):6&h?z(t,e,n,i,r,o,s,a,l):(64&h||128&h)&&c.process(t,e,n,i,r,o,s,a,l,nt)}null!=u&&r?Y(u,t&&t.ref,o,e||t,!e):null==u&&t&&null!=t.ref&&Y(t.ref,null,o,t,!0)},y=(t,e,n,i)=>{if(null==t)o(e.el=c(e.children),n,i);else{const n=e.el=t.el;e.children!==t.children&&h(n,e.children)}},v=(t,e,n,i)=>{null==t?o(e.el=u(e.children||""),n,i):e.el=t.el},_=(t,e,n,i)=>{[t.el,t.anchor]=m(t.children,e,n,i,t.el,t.anchor)},M=({el:t,anchor:e},n,i)=>{let r;while(t&&t!==e)r=p(t),o(t,n,i),t=r;o(e,n,i)},S=({el:t,anchor:e})=>{let n;while(t&&t!==e)n=p(t),s(t),t=n;s(e)},T=(t,e,n,i,r,o,s,a,l)=>{"svg"===e.type?s="svg":"math"===e.type&&(s="mathml"),null==t?D(e,n,i,r,o,s,a,l):E(t,e,r,o,s,a,l)},D=(t,e,n,i,s,c,u,h)=>{let f,p;const{props:g,shapeFlag:m,transition:b,dirs:x}=t;if(f=t.el=l(t.type,c,g&&g.is,g),8&m?d(f,t.children):16&m&&A(t.children,f,null,i,s,ge(t,c),u,h),x&&O(t,null,i,"created"),C(f,t,t.scopeId,u,i),g){for(const t in g)"value"===t||(0,r.Gg)(t)||a(f,t,null,g[t],c,i);"value"in g&&a(f,"value",null,g.value,c),(p=g.onVnodeBeforeMount)&&gn(p,i,t)}x&&O(t,null,i,"beforeMount");const y=be(s,b);y&&b.beforeEnter(f),o(f,e,n),((p=g&&g.onVnodeMounted)||y||x)&&de((()=>{p&&gn(p,i,t),y&&b.enter(f),x&&O(t,null,i,"mounted")}),s)},C=(t,e,n,i,r)=>{if(n&&g(t,n),i)for(let o=0;o{for(let c=l;c{const c=e.el=t.el;let{patchFlag:u,dynamicChildren:h,dirs:f}=e;u|=16&t.patchFlag;const p=t.props||r.kT,g=e.props||r.kT;let m;if(n&&me(n,!1),(m=g.onVnodeBeforeUpdate)&&gn(m,n,e,t),f&&O(e,t,n,"beforeUpdate"),n&&me(n,!0),(p.innerHTML&&null==g.innerHTML||p.textContent&&null==g.textContent)&&d(c,""),h?R(t.dynamicChildren,h,c,n,i,ge(e,o),s):l||W(t,e,c,null,n,i,ge(e,o),s,!1),u>0){if(16&u)I(c,p,g,n,o);else if(2&u&&p.class!==g.class&&a(c,"class",null,g.class,o),4&u&&a(c,"style",p.style,g.style,o),8&u){const t=e.dynamicProps;for(let e=0;e{m&&gn(m,n,e,t),f&&O(e,t,n,"updated")}),i)},R=(t,e,n,i,r,o,s)=>{for(let a=0;a{if(e!==n){if(e!==r.kT)for(const s in e)(0,r.Gg)(s)||s in n||a(t,s,e[s],null,o,i);for(const s in n){if((0,r.Gg)(s))continue;const l=n[s],c=e[s];l!==c&&"value"!==s&&a(t,s,c,l,o,i)}"value"in n&&a(t,"value",e.value,n.value,o)}},L=(t,e,n,i,r,s,a,l,u)=>{const h=e.el=t?t.el:c(""),d=e.anchor=t?t.anchor:c("");let{patchFlag:f,dynamicChildren:p,slotScopeIds:g}=e;g&&(l=l?l.concat(g):g),null==t?(o(h,n,i),o(d,n,i),A(e.children||[],n,d,r,s,a,l,u)):f>0&&64&f&&p&&t.dynamicChildren?(R(t.dynamicChildren,p,n,r,s,a,l),(null!=e.key||r&&e===r.subTree)&&xe(t,e,!0)):W(t,e,n,d,r,s,a,l,u)},z=(t,e,n,i,r,o,s,a,l)=>{e.slotScopeIds=a,null==t?512&e.shapeFlag?r.ctx.activate(e,n,i,s,l):N(e,n,i,r,o,s,l):F(t,e,l)},N=(t,e,n,i,r,o,s)=>{const a=t.component=xn(t,i,r);if(U(t)&&(a.ctx.renderer=nt),An(a,!1,s),a.asyncDep){if(r&&r.registerDep(a,j,s),!t.el){const i=a.subTree=on($e);v(null,i,e,n),t.placeholder=i.el}}else j(a,t,e,n,r,o,s)},F=(t,e,n)=>{const i=e.component=t.component;if(Le(t,e,n)){if(i.asyncDep&&!i.asyncResolved)return void H(i,e,n);i.next=e,i.update()}else e.el=t.el,i.vnode=e},j=(t,e,n,o,s,a,l)=>{const c=()=>{if(t.isMounted){let{next:e,bu:n,u:i,parent:o,vnode:u}=t;{const n=ve(t);if(n)return e&&(e.el=u.el,H(t,e,l)),void n.asyncDep.then((()=>{t.isUnmounted||c()}))}let h,d=e;0,me(t,!1),e?(e.el=u.el,H(t,e,l)):e=u,n&&(0,r.ir)(n),(h=e.props&&e.props.onVnodeBeforeUpdate)&&gn(h,o,e,u),me(t,!0);const p=Ee(t);0;const g=t.subTree;t.subTree=p,b(g,p,f(g.el),K(g),t,s,a),e.el=p.el,null===d&&Ne(t,p.el),i&&de(i,s),(h=e.props&&e.props.onVnodeUpdated)&&de((()=>gn(h,o,e,u)),s)}else{let i;const{el:l,props:c}=e,{bm:u,m:h,parent:d,root:f,type:p}=t,g=V(e);if(me(t,!1),u&&(0,r.ir)(u),!g&&(i=c&&c.onVnodeBeforeMount)&&gn(i,d,e),me(t,!0),l&&rt){const e=()=>{t.subTree=Ee(t),rt(l,t.subTree,t,s,null)};g&&p.__asyncHydrate?p.__asyncHydrate(l,t,e):e()}else{f.ce&&!1!==f.ce._def.shadowRoot&&f.ce._injectChildStyle(p);const i=t.subTree=Ee(t);0,b(null,i,n,o,t,s,a),e.el=i.el}if(h&&de(h,s),!g&&(i=c&&c.onVnodeMounted)){const t=e;de((()=>gn(i,d,t)),s)}(256&e.shapeFlag||d&&V(d.vnode)&&256&d.vnode.shapeFlag)&&t.a&&de(t.a,s),t.isMounted=!0,e=n=o=null}};t.scope.on();const u=t.effect=new i.qq(c);t.scope.off();const h=t.update=u.run.bind(u),d=t.job=u.runIfDirty.bind(u);d.i=t,d.id=t.uid,u.scheduler=()=>x(d),me(t,!0),h()},H=(t,e,n)=>{e.component=t;const r=t.vnode.props;t.vnode=e,t.next=null,Qt(t,e.props,r,n),ue(t,e.children,n),(0,i.Jd)(),w(t),(0,i.lk)()},W=(t,e,n,i,r,o,s,a,l=!1)=>{const c=t&&t.children,u=t?t.shapeFlag:0,h=e.children,{patchFlag:f,shapeFlag:p}=e;if(f>0){if(128&f)return void B(c,h,n,i,r,o,s,a,l);if(256&f)return void $(c,h,n,i,r,o,s,a,l)}8&p?(16&u&&J(c,r,o),h!==c&&d(n,h)):16&u?16&p?B(c,h,n,i,r,o,s,a,l):J(c,r,o,!0):(8&u&&d(n,""),16&p&&A(h,n,i,r,o,s,a,l))},$=(t,e,n,i,o,s,a,l,c)=>{t=t||r.Z6,e=e||r.Z6;const u=t.length,h=e.length,d=Math.min(u,h);let f;for(f=0;fh?J(t,o,s,!0,!1,d):A(e,n,i,o,s,a,l,c,d)},B=(t,e,n,i,o,s,a,l,c)=>{let u=0;const h=e.length;let d=t.length-1,f=h-1;while(u<=d&&u<=f){const i=t[u],r=e[u]=c?dn(e[u]):hn(e[u]);if(!tn(i,r))break;b(i,r,n,null,o,s,a,l,c),u++}while(u<=d&&u<=f){const i=t[d],r=e[f]=c?dn(e[f]):hn(e[f]);if(!tn(i,r))break;b(i,r,n,null,o,s,a,l,c),d--,f--}if(u>d){if(u<=f){const t=f+1,r=tf)while(u<=d)X(t[u],o,s,!0),u++;else{const p=u,g=u,m=new Map;for(u=g;u<=f;u++){const t=e[u]=c?dn(e[u]):hn(e[u]);null!=t.key&&m.set(t.key,u)}let x,y=0;const v=f-g+1;let w=!1,k=0;const _=new Array(v);for(u=0;u=v){X(i,o,s,!0);continue}let r;if(null!=i.key)r=m.get(i.key);else for(x=g;x<=f;x++)if(0===_[x-g]&&tn(i,e[x])){r=x;break}void 0===r?X(i,o,s,!0):(_[r-g]=u+1,r>=k?k=r:w=!0,b(i,e[r],n,null,o,s,a,l,c),y++)}const M=w?ye(_):r.Z6;for(x=M.length-1,u=v-1;u>=0;u--){const t=g+u,r=e[t],d=e[t+1],f=t+1{const{el:a,type:l,transition:c,children:u,shapeFlag:h}=t;if(6&h)return void q(t.component.subTree,e,n,i);if(128&h)return void t.suspense.move(e,n,i);if(64&h)return void l.move(t,e,n,nt);if(l===He){o(a,e,n);for(let t=0;tc.enter(a)),r);else{const{leave:i,delayLeave:r,afterLeave:l}=c,u=()=>{t.ctx.isUnmounted?s(a):o(a,e,n)},h=()=>{i(a,(()=>{u(),l&&l()}))};r?r(a,u,h):h()}else o(a,e,n)},X=(t,e,n,r=!1,o=!1)=>{const{type:s,props:a,ref:l,children:c,dynamicChildren:u,shapeFlag:h,patchFlag:d,dirs:f,cacheIndex:p}=t;if(-2===d&&(o=!1),null!=l&&((0,i.Jd)(),Y(l,null,n,t,!0),(0,i.lk)()),null!=p&&(e.renderCache[p]=void 0),256&h)return void e.ctx.deactivate(t);const g=1&h&&f,m=!V(t);let b;if(m&&(b=a&&a.onVnodeBeforeUnmount)&&gn(b,e,t),6&h)Q(t.component,n,r);else{if(128&h)return void t.suspense.unmount(n,r);g&&O(t,null,e,"beforeUnmount"),64&h?t.type.remove(t,e,n,nt,r):u&&!u.hasOnce&&(s!==He||d>0&&64&d)?J(u,e,n,!1,!0):(s===He&&384&d||!o&&16&h)&&J(c,e,n),r&&G(t)}(m&&(b=a&&a.onVnodeUnmounted)||g)&&de((()=>{b&&gn(b,e,t),g&&O(t,null,e,"unmounted")}),n)},G=t=>{const{type:e,el:n,anchor:i,transition:r}=t;if(e===He)return void Z(n,i);if(e===Be)return void S(t);const o=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&t.shapeFlag&&r&&!r.persisted){const{leave:e,delayLeave:i}=r,s=()=>e(n,o);i?i(t.el,o,s):s()}else o()},Z=(t,e)=>{let n;while(t!==e)n=p(t),s(t),t=n;s(e)},Q=(t,e,n)=>{const{bum:i,scope:o,job:s,subTree:a,um:l,m:c,a:u,parent:h,slots:{__:d}}=t;we(c),we(u),i&&(0,r.ir)(i),h&&(0,r.kJ)(d)&&d.forEach((t=>{h.renderCache[t]=void 0})),o.stop(),s&&(s.flags|=8,X(a,t,e,n)),l&&de(l,e),de((()=>{t.isUnmounted=!0}),e),e&&e.pendingBranch&&!e.isUnmounted&&t.asyncDep&&!t.asyncResolved&&t.suspenseId===e.pendingId&&(e.deps--,0===e.deps&&e.resolve())},J=(t,e,n,i=!1,r=!1,o=0)=>{for(let s=o;s{if(6&t.shapeFlag)return K(t.component.subTree);if(128&t.shapeFlag)return t.suspense.next();const e=p(t.anchor||t.el),n=e&&e[P];return n?p(n):e};let tt=!1;const et=(t,e,n)=>{null==t?e._vnode&&X(e._vnode,null,null,!0):b(e._vnode||null,t,e,null,null,null,n),e._vnode=t,tt||(tt=!0,w(),k(),tt=!1)},nt={p:b,um:X,m:q,r:G,mt:N,mc:A,pc:W,pbc:R,n:K,o:t};let it,rt;return e&&([it,rt]=e(nt)),{render:et,hydrate:it,createApp:Bt(et,it)}}function ge({type:t,props:e},n){return"svg"===n&&"foreignObject"===t||"mathml"===n&&"annotation-xml"===t&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function me({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function be(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function xe(t,e,n=!1){const i=t.children,o=e.children;if((0,r.kJ)(i)&&(0,r.kJ)(o))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[o-1]),n[o]=i)}}o=n.length,s=n[o-1];while(o-- >0)n[o]=s,s=e[s];return n}function ve(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:ve(e)}function we(t){if(t)for(let e=0;e{{const t=Ut(ke);return t}};function Me(t,e,n){return Se(t,e,n)}function Se(t,e,n=r.kT){const{immediate:o,deep:a,flush:l,once:c}=n;const u=(0,r.l7)({},n);const h=e&&o||!e&&"post"!==l;let d;if(Cn)if("sync"===l){const t=_e();d=t.__watcherHandles||(t.__watcherHandles=[])}else if(!h){const t=()=>{};return t.stop=r.dG,t.resume=r.dG,t.pause=r.dG,t}const f=yn;u.call=(t,e,n)=>s(t,f,e,n);let p=!1;"post"===l?u.scheduler=t=>{de(t,f&&f.suspense)}:"sync"!==l&&(p=!0,u.scheduler=(t,e)=>{e?t():x(t)}),u.augmentJob=t=>{e&&(t.flags|=4),p&&(t.flags|=2,f&&(t.id=f.uid,t.i=f))};const g=(0,i.YP)(t,e,u);return Cn&&(d?d.push(g):h&&g()),g}function Te(t,e,n){const i=this.proxy,o=(0,r.HD)(t)?t.includes(".")?De(i,t):()=>i[t]:t.bind(i,i);let s;(0,r.mf)(e)?s=e:(s=e.handler,n=e);const a=_n(this),l=Se(o,s.bind(i),n);return a(),l}function De(t,e){const n=e.split(".");return()=>{let e=t;for(let t=0;t"modelValue"===e||"model-value"===e?t.modelModifiers:t[`${e}Modifiers`]||t[`${(0,r._A)(e)}Modifiers`]||t[`${(0,r.rs)(e)}Modifiers`];function Ae(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||r.kT;let o=n;const a=e.startsWith("update:"),l=a&&Ce(i,e.slice(7));let c;l&&(l.trim&&(o=n.map((t=>(0,r.HD)(t)?t.trim():t))),l.number&&(o=n.map(r.h5)));let u=i[c=(0,r.hR)(e)]||i[c=(0,r.hR)((0,r._A)(e))];!u&&a&&(u=i[c=(0,r.hR)((0,r.rs)(e))]),u&&s(u,t,6,o);const h=i[c+"Once"];if(h){if(t.emitted){if(t.emitted[c])return}else t.emitted={};t.emitted[c]=!0,s(h,t,6,o)}}function Oe(t,e,n=!1){const i=e.emitsCache,o=i.get(t);if(void 0!==o)return o;const s=t.emits;let a={},l=!1;if(!(0,r.mf)(t)){const i=t=>{const n=Oe(t,e,!0);n&&(l=!0,(0,r.l7)(a,n))};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||l?((0,r.kJ)(s)?s.forEach((t=>a[t]=null)):(0,r.l7)(a,s),(0,r.Kn)(t)&&i.set(t,a),a):((0,r.Kn)(t)&&i.set(t,null),null)}function Pe(t,e){return!(!t||!(0,r.F7)(e))&&(e=e.slice(2).replace(/Once$/,""),(0,r.RI)(t,e[0].toLowerCase()+e.slice(1))||(0,r.RI)(t,(0,r.rs)(e))||(0,r.RI)(t,e))}function Ee(t){const{type:e,vnode:n,proxy:i,withProxy:o,propsOptions:[s],slots:l,attrs:c,emit:u,render:h,renderCache:d,props:f,data:p,setupState:g,ctx:m,inheritAttrs:b}=t,x=D(t);let y,v;try{if(4&n.shapeFlag){const t=o||i,e=t;y=hn(h.call(e,t,d,f,g,p,m)),v=c}else{const t=e;0,y=hn(t.length>1?t(f,{attrs:c,slots:l,emit:u}):t(f,null)),v=e.props?c:Re(c)}}catch(k){Ye.length=0,a(k,t,1),y=on($e)}let w=y;if(v&&!1!==b){const t=Object.keys(v),{shapeFlag:e}=w;t.length&&7&e&&(s&&t.some(r.tR)&&(v=Ie(v,s)),w=ln(w,v,!1,!0))}return n.dirs&&(w=ln(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&H(w,n.transition),y=w,D(x),y}const Re=t=>{let e;for(const n in t)("class"===n||"style"===n||(0,r.F7)(n))&&((e||(e={}))[n]=t[n]);return e},Ie=(t,e)=>{const n={};for(const i in t)(0,r.tR)(i)&&i.slice(9)in e||(n[i]=t[i]);return n};function Le(t,e,n){const{props:i,children:r,component:o}=t,{props:s,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||i!==s&&(i?!s||ze(i,s,c):!!s);if(1024&l)return!0;if(16&l)return i?ze(i,s,c):!!s;if(8&l){const t=e.dynamicProps;for(let e=0;et.__isSuspense;function je(t,e){e&&e.pendingBranch?(0,r.kJ)(t)?e.effects.push(...t):e.effects.push(t):v(t)}const He=Symbol.for("v-fgt"),We=Symbol.for("v-txt"),$e=Symbol.for("v-cmt"),Be=Symbol.for("v-stc"),Ye=[];let Ve=null;function Ue(t=!1){Ye.push(Ve=t?null:[])}function qe(){Ye.pop(),Ve=Ye[Ye.length-1]||null}let Xe=1;function Ge(t,e=!1){Xe+=t,t<0&&Ve&&e&&(Ve.hasOnce=!0)}function Ze(t){return t.dynamicChildren=Xe>0?Ve||r.Z6:null,qe(),Xe>0&&Ve&&Ve.push(t),t}function Qe(t,e,n,i,r,o){return Ze(rn(t,e,n,i,r,o,!0))}function Je(t,e,n,i,r){return Ze(on(t,e,n,i,r,!0))}function Ke(t){return!!t&&!0===t.__v_isVNode}function tn(t,e){return t.type===e.type&&t.key===e.key}const en=({key:t})=>null!=t?t:null,nn=({ref:t,ref_key:e,ref_for:n})=>("number"===typeof t&&(t=""+t),null!=t?(0,r.HD)(t)||(0,i.dq)(t)||(0,r.mf)(t)?{i:S,r:t,k:e,f:!!n}:t:null);function rn(t,e=null,n=null,i=0,o=null,s=(t===He?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&en(e),ref:e&&nn(e),scopeId:T,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:S};return l?(fn(c,n),128&s&&t.normalize(c)):n&&(c.shapeFlag|=(0,r.HD)(n)?8:16),Xe>0&&!a&&Ve&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Ve.push(c),c}const on=sn;function sn(t,e=null,n=null,o=0,s=null,a=!1){if(t&&t!==pt||(t=$e),Ke(t)){const i=ln(t,e,!0);return n&&fn(i,n),Xe>0&&!a&&Ve&&(6&i.shapeFlag?Ve[Ve.indexOf(t)]=i:Ve.push(i)),i.patchFlag=-2,i}if(Nn(t)&&(t=t.__vccOpts),e){e=an(e);let{class:t,style:n}=e;t&&!(0,r.HD)(t)&&(e.class=(0,r.C_)(t)),(0,r.Kn)(n)&&((0,i.X3)(n)&&!(0,r.kJ)(n)&&(n=(0,r.l7)({},n)),e.style=(0,r.j5)(n))}const l=(0,r.HD)(t)?1:Fe(t)?128:E(t)?64:(0,r.Kn)(t)?4:(0,r.mf)(t)?2:0;return rn(t,e,n,o,s,l,a,!0)}function an(t){return t?(0,i.X3)(t)||Gt(t)?(0,r.l7)({},t):t:null}function ln(t,e,n=!1,i=!1){const{props:o,ref:s,patchFlag:a,children:l,transition:c}=t,u=e?pn(o||{},e):o,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&en(u),ref:e&&e.ref?n&&s?(0,r.kJ)(s)?s.concat(nn(e)):[s,nn(e)]:nn(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==He?-1===a?16:16|a:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:c,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ln(t.ssContent),ssFallback:t.ssFallback&&ln(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return c&&i&&H(h,c.clone(h)),h}function cn(t=" ",e=0){return on(We,null,t,e)}function un(t="",e=!1){return e?(Ue(),Je($e,null,t)):on($e,null,t)}function hn(t){return null==t||"boolean"===typeof t?on($e):(0,r.kJ)(t)?on(He,null,t.slice()):Ke(t)?dn(t):on(We,null,String(t))}function dn(t){return null===t.el&&-1!==t.patchFlag||t.memo?t:ln(t)}function fn(t,e){let n=0;const{shapeFlag:i}=t;if(null==e)e=null;else if((0,r.kJ)(e))n=16;else if("object"===typeof e){if(65&i){const n=e.default;return void(n&&(n._c&&(n._d=!1),fn(t,n()),n._c&&(n._d=!0)))}{n=32;const i=e._;i||Gt(e)?3===i&&S&&(1===S.slots._?e._=1:(e._=2,t.patchFlag|=1024)):e._ctx=S}}else(0,r.mf)(e)?(e={default:e,_ctx:S},n=32):(e=String(e),64&i?(n=16,e=[cn(e)]):n=8);t.children=e,t.shapeFlag|=n}function pn(...t){const e={};for(let n=0;nyn||S;let wn,kn;{const t=(0,r.E9)(),e=(e,n)=>{let i;return(i=t[e])||(i=t[e]=[]),i.push(n),t=>{i.length>1?i.forEach((e=>e(t))):i[0](t)}};wn=e("__VUE_INSTANCE_SETTERS__",(t=>yn=t)),kn=e("__VUE_SSR_SETTERS__",(t=>Cn=t))}const _n=t=>{const e=yn;return wn(t),t.scope.on(),()=>{t.scope.off(),wn(e)}},Mn=()=>{yn&&yn.scope.off(),wn(null)};function Sn(t){return 4&t.vnode.shapeFlag}let Tn,Dn,Cn=!1;function An(t,e=!1,n=!1){e&&kn(e);const{props:i,children:r}=t.vnode,o=Sn(t);Zt(t,i,o,e),ce(t,r,n||e);const s=o?On(t,e):void 0;return e&&kn(!1),s}function On(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Mt);const{setup:s}=n;if(s){(0,i.Jd)();const n=t.setupContext=s.length>1?In(t):null,l=_n(t),c=o(s,t,0,[t.props,n]),u=(0,r.tI)(c);if((0,i.lk)(),l(),!u&&!t.sp||V(t)||B(t),u){if(c.then(Mn,Mn),e)return c.then((n=>{Pn(t,n,e)})).catch((e=>{a(e,t,0)}));t.asyncDep=c}else Pn(t,c,e)}else En(t,e)}function Pn(t,e,n){(0,r.mf)(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:(0,r.Kn)(e)&&(t.setupState=(0,i.WL)(e)),En(t,n)}function En(t,e,n){const o=t.type;if(!t.render){if(!e&&Tn&&!o.render){const e=o.template||Pt(t).template;if(e){0;const{isCustomElement:n,compilerOptions:i}=t.appContext.config,{delimiters:s,compilerOptions:a}=o,l=(0,r.l7)((0,r.l7)({isCustomElement:n,delimiters:s},i),a);o.render=Tn(e,l)}}t.render=o.render||r.dG,Dn&&Dn(t)}{const e=_n(t);(0,i.Jd)();try{Dt(t)}finally{(0,i.lk)(),e()}}}const Rn={get(t,e){return(0,i.j)(t,"get",""),t[e]}};function In(t){const e=e=>{t.exposed=e||{}};return{attrs:new Proxy(t.attrs,Rn),slots:t.slots,emit:t.emit,expose:e}}function Ln(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy((0,i.WL)((0,i.Xl)(t.exposed)),{get(e,n){return n in e?e[n]:n in kt?kt[n](t):void 0},has(t,e){return e in t||e in kt}})):t.proxy}function zn(t,e=!0){return(0,r.mf)(t)?t.displayName||t.name:t.name||e&&t.__name}function Nn(t){return(0,r.mf)(t)&&"__vccOpts"in t}const Fn=(t,e)=>{const n=(0,i.Fl)(t,e,Cn);return n};function jn(t,e,n){const i=arguments.length;return 2===i?(0,r.Kn)(e)&&!(0,r.kJ)(e)?Ke(e)?on(t,null,[e]):on(t,e):on(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&Ke(n)&&(n=[n]),on(t,e,n))}const Hn="3.5.18"},963:function(t,e,n){n.d(e,{D2:function(){return J},bM:function(){return V},iM:function(){return Z},ri:function(){return nt}});var i=n(252),r=n(577);n(262); +/*! #__NO_SIDE_EFFECTS__ */;const U=t=>t.type.__isKeepAlive;RegExp,RegExp;function q(t,e){return(0,r.kJ)(t)?t.some((t=>q(t,e))):(0,r.HD)(t)?t.split(",").includes(e):!!(0,r.Kj)(t)&&(t.lastIndex=0,t.test(e))}function X(t,e){Z(t,"a",e)}function G(t,e){Z(t,"da",e)}function Z(t,e,n=xn){const i=t.__wdc||(t.__wdc=()=>{let e=n;while(e){if(e.isDeactivated)return;e=e.parent}return t()});if(tt(e,i,n),n){let t=n.parent;while(t&&t.parent)U(t.parent.vnode)&&Q(i,e,n,t),t=t.parent}}function Q(t,e,n,i){const o=tt(e,t,i,!0);at((()=>{(0,r.Od)(i[e],o)}),n)}function J(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function K(t){return 128&t.shapeFlag?t.ssContent:t}function tt(t,e,n=xn,r=!1){if(n){const o=n[t]||(n[t]=[]),a=e.__weh||(e.__weh=(...r)=>{(0,i.Jd)();const o=_n(n),a=s(e,n,t,r);return o(),(0,i.lk)(),a});return r?o.unshift(a):o.push(a),a}}const et=t=>(e,n=xn)=>{Cn&&"sp"!==t||tt(t,((...t)=>e(...t)),n)},nt=et("bm"),it=et("m"),rt=et("bu"),ot=et("u"),st=et("bum"),at=et("um"),lt=et("sp"),ct=et("rtg"),ut=et("rtc");function ht(t,e=xn){tt("ec",t,e)}const dt="components";function ft(t,e){return mt(dt,t,!0,e)||t}const pt=Symbol.for("v-ndc");function gt(t){return(0,r.HD)(t)?mt(dt,t,!1)||t:t||pt}function mt(t,e,n=!0,i=!1){const o=S||xn;if(o){const n=o.type;if(t===dt){const t=zn(n,!1);if(t&&(t===e||t===(0,r._A)(e)||t===(0,r.kC)((0,r._A)(e))))return n}const s=bt(o[t]||n[t],e)||bt(o.appContext[t],e);return!s&&i?n:s}}function bt(t,e){return t&&(t[e]||t[(0,r._A)(e)]||t[(0,r.kC)((0,r._A)(e))])}function yt(t,e,n,o){let s;const a=n&&n[o],l=(0,r.kJ)(t);if(l||(0,r.HD)(t)){const n=l&&(0,i.PG)(t);let r=!1,o=!1;n&&(r=!(0,i.yT)(t),o=(0,i.$y)(t),t=(0,i.XB)(t)),s=new Array(t.length);for(let l=0,c=t.length;le(t,n,void 0,a&&a[n])));else{const n=Object.keys(t);s=new Array(n.length);for(let i=0,r=n.length;i!Ke(t)||t.type!==$e&&!(t.type===He&&!vt(t.children))))?t:null}const wt=t=>t?Sn(t)?Ln(t):wt(t.parent):null,kt=(0,r.l7)(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>wt(t.parent),$root:t=>wt(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Pt(t),$forceUpdate:t=>t.f||(t.f=()=>{y(t.update)}),$nextTick:t=>t.n||(t.n=m.bind(t.proxy)),$watch:t=>Te.bind(t)}),_t=(t,e)=>t!==r.kT&&!t.__isScriptSetup&&(0,r.RI)(t,e),Mt={get({_:t},e){if("__v_skip"===e)return!0;const{ctx:n,setupState:o,data:s,props:a,accessCache:l,type:c,appContext:u}=t;let h;if("$"!==e[0]){const i=l[e];if(void 0!==i)switch(i){case 1:return o[e];case 2:return s[e];case 4:return n[e];case 3:return a[e]}else{if(_t(o,e))return l[e]=1,o[e];if(s!==r.kT&&(0,r.RI)(s,e))return l[e]=2,s[e];if((h=t.propsOptions[0])&&(0,r.RI)(h,e))return l[e]=3,a[e];if(n!==r.kT&&(0,r.RI)(n,e))return l[e]=4,n[e];Tt&&(l[e]=0)}}const d=kt[e];let f,p;return d?("$attrs"===e&&(0,i.j)(t.attrs,"get",""),d(t)):(f=c.__cssModules)&&(f=f[e])?f:n!==r.kT&&(0,r.RI)(n,e)?(l[e]=4,n[e]):(p=u.config.globalProperties,(0,r.RI)(p,e)?p[e]:void 0)},set({_:t},e,n){const{data:i,setupState:o,ctx:s}=t;return _t(o,e)?(o[e]=n,!0):i!==r.kT&&(0,r.RI)(i,e)?(i[e]=n,!0):!(0,r.RI)(t.props,e)&&(("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=n,!0))},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:o,propsOptions:s}},a){let l;return!!n[a]||t!==r.kT&&(0,r.RI)(t,a)||_t(e,a)||(l=s[0])&&(0,r.RI)(l,a)||(0,r.RI)(i,a)||(0,r.RI)(kt,a)||(0,r.RI)(o.config.globalProperties,a)},defineProperty(t,e,n){return null!=n.get?t._.accessCache[e]=0:(0,r.RI)(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function St(t){return(0,r.kJ)(t)?t.reduce(((t,e)=>(t[e]=null,t)),{}):t}let Tt=!0;function Dt(t){const e=Pt(t),n=t.proxy,o=t.ctx;Tt=!1,e.beforeCreate&&At(e.beforeCreate,t,"bc");const{data:s,computed:a,methods:l,watch:c,provide:u,inject:h,created:d,beforeMount:f,mounted:p,beforeUpdate:g,updated:m,activated:b,deactivated:y,beforeDestroy:x,beforeUnmount:v,destroyed:w,unmounted:k,render:_,renderTracked:M,renderTriggered:S,errorCaptured:T,serverPrefetch:D,expose:C,inheritAttrs:A,components:O,directives:P,filters:E}=e,R=null;if(h&&Ct(h,o,R),l)for(const i in l){const t=l[i];(0,r.mf)(t)&&(o[i]=t.bind(n))}if(s){0;const e=s.call(n,n);0,(0,r.Kn)(e)&&(t.data=(0,i.qj)(e))}if(Tt=!0,a)for(const i in a){const t=a[i],e=(0,r.mf)(t)?t.bind(n,n):(0,r.mf)(t.get)?t.get.bind(n,n):r.dG;0;const s=!(0,r.mf)(t)&&(0,r.mf)(t.set)?t.set.bind(n):r.dG,l=Fn({get:e,set:s});Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>l.value,set:t=>l.value=t})}if(c)for(const i in c)Ot(c[i],o,n,i);if(u){const t=(0,r.mf)(u)?u.call(n):u;Reflect.ownKeys(t).forEach((e=>{Vt(e,t[e])}))}function I(t,e){(0,r.kJ)(e)?e.forEach((e=>t(e.bind(n)))):e&&t(e.bind(n))}if(d&&At(d,t,"c"),I(nt,f),I(it,p),I(rt,g),I(ot,m),I(X,b),I(G,y),I(ht,T),I(ut,M),I(ct,S),I(st,v),I(at,k),I(lt,D),(0,r.kJ)(C))if(C.length){const e=t.exposed||(t.exposed={});C.forEach((t=>{Object.defineProperty(e,t,{get:()=>n[t],set:e=>n[t]=e,enumerable:!0})}))}else t.exposed||(t.exposed={});_&&t.render===r.dG&&(t.render=_),null!=A&&(t.inheritAttrs=A),O&&(t.components=O),P&&(t.directives=P),D&&B(t)}function Ct(t,e,n=r.dG){(0,r.kJ)(t)&&(t=zt(t));for(const o in t){const n=t[o];let s;s=(0,r.Kn)(n)?"default"in n?Ut(n.from||o,n.default,!0):Ut(n.from||o):Ut(n),(0,i.dq)(s)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:t=>s.value=t}):e[o]=s}}function At(t,e,n){s((0,r.kJ)(t)?t.map((t=>t.bind(e.proxy))):t.bind(e.proxy),e,n)}function Ot(t,e,n,i){let o=i.includes(".")?De(n,i):()=>n[i];if((0,r.HD)(t)){const n=e[t];(0,r.mf)(n)&&Me(o,n)}else if((0,r.mf)(t))Me(o,t.bind(n));else if((0,r.Kn)(t))if((0,r.kJ)(t))t.forEach((t=>Ot(t,e,n,i)));else{const i=(0,r.mf)(t.handler)?t.handler.bind(n):e[t.handler];(0,r.mf)(i)&&Me(o,i,t)}else 0}function Pt(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:o,optionsCache:s,config:{optionMergeStrategies:a}}=t.appContext,l=s.get(e);let c;return l?c=l:o.length||n||i?(c={},o.length&&o.forEach((t=>Et(c,t,a,!0))),Et(c,e,a)):c=e,(0,r.Kn)(e)&&s.set(e,c),c}function Et(t,e,n,i=!1){const{mixins:r,extends:o}=e;o&&Et(t,o,n,!0),r&&r.forEach((e=>Et(t,e,n,!0)));for(const s in e)if(i&&"expose"===s);else{const i=Rt[s]||n&&n[s];t[s]=i?i(t[s],e[s]):e[s]}return t}const Rt={data:It,props:jt,emits:jt,methods:Ft,computed:Ft,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:Ft,directives:Ft,watch:Ht,provide:It,inject:Lt};function It(t,e){return e?t?function(){return(0,r.l7)((0,r.mf)(t)?t.call(this,this):t,(0,r.mf)(e)?e.call(this,this):e)}:e:t}function Lt(t,e){return Ft(zt(t),zt(e))}function zt(t){if((0,r.kJ)(t)){const e={};for(let n=0;n1)return n&&(0,r.mf)(e)?e.call(i&&i.proxy):e}else 0}const qt={},Xt=()=>Object.create(qt),Gt=t=>Object.getPrototypeOf(t)===qt;function Zt(t,e,n,r=!1){const o={},s=Xt();t.propsDefaults=Object.create(null),Jt(t,e,o,s);for(const i in t.propsOptions[0])i in o||(o[i]=void 0);n?t.props=r?o:(0,i.Um)(o):t.type.props?t.props=o:t.props=s,t.attrs=s}function Qt(t,e,n,o){const{props:s,attrs:a,vnode:{patchFlag:l}}=t,c=(0,i.IU)(s),[u]=t.propsOptions;let h=!1;if(!(o||l>0)||16&l){let i;Jt(t,e,s,a)&&(h=!0);for(const o in c)e&&((0,r.RI)(e,o)||(i=(0,r.rs)(o))!==o&&(0,r.RI)(e,i))||(u?!n||void 0===n[o]&&void 0===n[i]||(s[o]=Kt(u,c,o,void 0,t,!0)):delete s[o]);if(a!==c)for(const t in a)e&&(0,r.RI)(e,t)||(delete a[t],h=!0)}else if(8&l){const n=t.vnode.dynamicProps;for(let i=0;i{c=!0;const[n,i]=ee(t,e,!0);(0,r.l7)(a,n),i&&l.push(...i)};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return(0,r.Kn)(t)&&i.set(t,r.Z6),r.Z6;if((0,r.kJ)(s))for(let h=0;h"_"===t||"__"===t||"_ctx"===t||"$stable"===t,re=t=>(0,r.kJ)(t)?t.map(hn):[hn(t)],oe=(t,e,n)=>{if(e._n)return e;const i=C(((...t)=>re(e(...t))),n);return i._c=!1,i},se=(t,e,n)=>{const i=t._ctx;for(const o in t){if(ie(o))continue;const n=t[o];if((0,r.mf)(n))e[o]=oe(o,n,i);else if(null!=n){0;const t=re(n);e[o]=()=>t}}},ae=(t,e)=>{const n=re(e);t.slots.default=()=>n},le=(t,e,n)=>{for(const i in e)!n&&ie(i)||(t[i]=e[i])},ce=(t,e,n)=>{const i=t.slots=Xt();if(32&t.vnode.shapeFlag){const t=e.__;t&&(0,r.Nj)(i,"__",t,!0);const o=e._;o?(le(i,e,n),n&&(0,r.Nj)(i,"_",o,!0)):se(e,i)}else e&&ae(t,e)},ue=(t,e,n)=>{const{vnode:i,slots:o}=t;let s=!0,a=r.kT;if(32&i.shapeFlag){const t=e._;t?n&&1===t?s=!1:le(o,e,n):(s=!e.$stable,se(e,o)),a=e}else e&&(ae(t,e),a={default:1});if(s)for(const r in o)ie(r)||null!=a[r]||delete o[r]};function he(){"boolean"!==typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&((0,r.E9)().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const de=je;function fe(t){return pe(t)}function pe(t,e){he();const n=(0,r.E9)();n.__VUE__=!0;const{insert:o,remove:s,patchProp:a,createElement:l,createText:c,createComment:u,setText:h,setElementText:d,parentNode:f,nextSibling:p,setScopeId:g=r.dG,insertStaticContent:m}=t,b=(t,e,n,i=null,r=null,o=null,s,a=null,l=!!e.dynamicChildren)=>{if(t===e)return;t&&!tn(t,e)&&(i=K(t),X(t,r,o,!0),t=null),-2===e.patchFlag&&(l=!1,e.dynamicChildren=null);const{type:c,ref:u,shapeFlag:h}=e;switch(c){case We:x(t,e,n,i);break;case $e:v(t,e,n,i);break;case Be:null==t&&_(e,n,i,s);break;case He:L(t,e,n,i,r,o,s,a,l);break;default:1&h?T(t,e,n,i,r,o,s,a,l):6&h?z(t,e,n,i,r,o,s,a,l):(64&h||128&h)&&c.process(t,e,n,i,r,o,s,a,l,nt)}null!=u&&r?Y(u,t&&t.ref,o,e||t,!e):null==u&&t&&null!=t.ref&&Y(t.ref,null,o,t,!0)},x=(t,e,n,i)=>{if(null==t)o(e.el=c(e.children),n,i);else{const n=e.el=t.el;e.children!==t.children&&h(n,e.children)}},v=(t,e,n,i)=>{null==t?o(e.el=u(e.children||""),n,i):e.el=t.el},_=(t,e,n,i)=>{[t.el,t.anchor]=m(t.children,e,n,i,t.el,t.anchor)},M=({el:t,anchor:e},n,i)=>{let r;while(t&&t!==e)r=p(t),o(t,n,i),t=r;o(e,n,i)},S=({el:t,anchor:e})=>{let n;while(t&&t!==e)n=p(t),s(t),t=n;s(e)},T=(t,e,n,i,r,o,s,a,l)=>{"svg"===e.type?s="svg":"math"===e.type&&(s="mathml"),null==t?D(e,n,i,r,o,s,a,l):E(t,e,r,o,s,a,l)},D=(t,e,n,i,s,c,u,h)=>{let f,p;const{props:g,shapeFlag:m,transition:b,dirs:y}=t;if(f=t.el=l(t.type,c,g&&g.is,g),8&m?d(f,t.children):16&m&&A(t.children,f,null,i,s,ge(t,c),u,h),y&&O(t,null,i,"created"),C(f,t,t.scopeId,u,i),g){for(const t in g)"value"===t||(0,r.Gg)(t)||a(f,t,null,g[t],c,i);"value"in g&&a(f,"value",null,g.value,c),(p=g.onVnodeBeforeMount)&&gn(p,i,t)}y&&O(t,null,i,"beforeMount");const x=be(s,b);x&&b.beforeEnter(f),o(f,e,n),((p=g&&g.onVnodeMounted)||x||y)&&de((()=>{p&&gn(p,i,t),x&&b.enter(f),y&&O(t,null,i,"mounted")}),s)},C=(t,e,n,i,r)=>{if(n&&g(t,n),i)for(let o=0;o{for(let c=l;c{const c=e.el=t.el;let{patchFlag:u,dynamicChildren:h,dirs:f}=e;u|=16&t.patchFlag;const p=t.props||r.kT,g=e.props||r.kT;let m;if(n&&me(n,!1),(m=g.onVnodeBeforeUpdate)&&gn(m,n,e,t),f&&O(e,t,n,"beforeUpdate"),n&&me(n,!0),(p.innerHTML&&null==g.innerHTML||p.textContent&&null==g.textContent)&&d(c,""),h?R(t.dynamicChildren,h,c,n,i,ge(e,o),s):l||W(t,e,c,null,n,i,ge(e,o),s,!1),u>0){if(16&u)I(c,p,g,n,o);else if(2&u&&p.class!==g.class&&a(c,"class",null,g.class,o),4&u&&a(c,"style",p.style,g.style,o),8&u){const t=e.dynamicProps;for(let e=0;e{m&&gn(m,n,e,t),f&&O(e,t,n,"updated")}),i)},R=(t,e,n,i,r,o,s)=>{for(let a=0;a{if(e!==n){if(e!==r.kT)for(const s in e)(0,r.Gg)(s)||s in n||a(t,s,e[s],null,o,i);for(const s in n){if((0,r.Gg)(s))continue;const l=n[s],c=e[s];l!==c&&"value"!==s&&a(t,s,c,l,o,i)}"value"in n&&a(t,"value",e.value,n.value,o)}},L=(t,e,n,i,r,s,a,l,u)=>{const h=e.el=t?t.el:c(""),d=e.anchor=t?t.anchor:c("");let{patchFlag:f,dynamicChildren:p,slotScopeIds:g}=e;g&&(l=l?l.concat(g):g),null==t?(o(h,n,i),o(d,n,i),A(e.children||[],n,d,r,s,a,l,u)):f>0&&64&f&&p&&t.dynamicChildren?(R(t.dynamicChildren,p,n,r,s,a,l),(null!=e.key||r&&e===r.subTree)&&ye(t,e,!0)):W(t,e,n,d,r,s,a,l,u)},z=(t,e,n,i,r,o,s,a,l)=>{e.slotScopeIds=a,null==t?512&e.shapeFlag?r.ctx.activate(e,n,i,s,l):N(e,n,i,r,o,s,l):F(t,e,l)},N=(t,e,n,i,r,o,s)=>{const a=t.component=yn(t,i,r);if(U(t)&&(a.ctx.renderer=nt),An(a,!1,s),a.asyncDep){if(r&&r.registerDep(a,j,s),!t.el){const i=a.subTree=on($e);v(null,i,e,n),t.placeholder=i.el}}else j(a,t,e,n,r,o,s)},F=(t,e,n)=>{const i=e.component=t.component;if(Le(t,e,n)){if(i.asyncDep&&!i.asyncResolved)return void H(i,e,n);i.next=e,i.update()}else e.el=t.el,i.vnode=e},j=(t,e,n,o,s,a,l)=>{const c=()=>{if(t.isMounted){let{next:e,bu:n,u:i,parent:o,vnode:u}=t;{const n=ve(t);if(n)return e&&(e.el=u.el,H(t,e,l)),void n.asyncDep.then((()=>{t.isUnmounted||c()}))}let h,d=e;0,me(t,!1),e?(e.el=u.el,H(t,e,l)):e=u,n&&(0,r.ir)(n),(h=e.props&&e.props.onVnodeBeforeUpdate)&&gn(h,o,e,u),me(t,!0);const p=Ee(t);0;const g=t.subTree;t.subTree=p,b(g,p,f(g.el),K(g),t,s,a),e.el=p.el,null===d&&Ne(t,p.el),i&&de(i,s),(h=e.props&&e.props.onVnodeUpdated)&&de((()=>gn(h,o,e,u)),s)}else{let i;const{el:l,props:c}=e,{bm:u,m:h,parent:d,root:f,type:p}=t,g=V(e);if(me(t,!1),u&&(0,r.ir)(u),!g&&(i=c&&c.onVnodeBeforeMount)&&gn(i,d,e),me(t,!0),l&&rt){const e=()=>{t.subTree=Ee(t),rt(l,t.subTree,t,s,null)};g&&p.__asyncHydrate?p.__asyncHydrate(l,t,e):e()}else{f.ce&&!1!==f.ce._def.shadowRoot&&f.ce._injectChildStyle(p);const i=t.subTree=Ee(t);0,b(null,i,n,o,t,s,a),e.el=i.el}if(h&&de(h,s),!g&&(i=c&&c.onVnodeMounted)){const t=e;de((()=>gn(i,d,t)),s)}(256&e.shapeFlag||d&&V(d.vnode)&&256&d.vnode.shapeFlag)&&t.a&&de(t.a,s),t.isMounted=!0,e=n=o=null}};t.scope.on();const u=t.effect=new i.qq(c);t.scope.off();const h=t.update=u.run.bind(u),d=t.job=u.runIfDirty.bind(u);d.i=t,d.id=t.uid,u.scheduler=()=>y(d),me(t,!0),h()},H=(t,e,n)=>{e.component=t;const r=t.vnode.props;t.vnode=e,t.next=null,Qt(t,e.props,r,n),ue(t,e.children,n),(0,i.Jd)(),w(t),(0,i.lk)()},W=(t,e,n,i,r,o,s,a,l=!1)=>{const c=t&&t.children,u=t?t.shapeFlag:0,h=e.children,{patchFlag:f,shapeFlag:p}=e;if(f>0){if(128&f)return void B(c,h,n,i,r,o,s,a,l);if(256&f)return void $(c,h,n,i,r,o,s,a,l)}8&p?(16&u&&J(c,r,o),h!==c&&d(n,h)):16&u?16&p?B(c,h,n,i,r,o,s,a,l):J(c,r,o,!0):(8&u&&d(n,""),16&p&&A(h,n,i,r,o,s,a,l))},$=(t,e,n,i,o,s,a,l,c)=>{t=t||r.Z6,e=e||r.Z6;const u=t.length,h=e.length,d=Math.min(u,h);let f;for(f=0;fh?J(t,o,s,!0,!1,d):A(e,n,i,o,s,a,l,c,d)},B=(t,e,n,i,o,s,a,l,c)=>{let u=0;const h=e.length;let d=t.length-1,f=h-1;while(u<=d&&u<=f){const i=t[u],r=e[u]=c?dn(e[u]):hn(e[u]);if(!tn(i,r))break;b(i,r,n,null,o,s,a,l,c),u++}while(u<=d&&u<=f){const i=t[d],r=e[f]=c?dn(e[f]):hn(e[f]);if(!tn(i,r))break;b(i,r,n,null,o,s,a,l,c),d--,f--}if(u>d){if(u<=f){const t=f+1,r=tf)while(u<=d)X(t[u],o,s,!0),u++;else{const p=u,g=u,m=new Map;for(u=g;u<=f;u++){const t=e[u]=c?dn(e[u]):hn(e[u]);null!=t.key&&m.set(t.key,u)}let y,x=0;const v=f-g+1;let w=!1,k=0;const _=new Array(v);for(u=0;u=v){X(i,o,s,!0);continue}let r;if(null!=i.key)r=m.get(i.key);else for(y=g;y<=f;y++)if(0===_[y-g]&&tn(i,e[y])){r=y;break}void 0===r?X(i,o,s,!0):(_[r-g]=u+1,r>=k?k=r:w=!0,b(i,e[r],n,null,o,s,a,l,c),x++)}const M=w?xe(_):r.Z6;for(y=M.length-1,u=v-1;u>=0;u--){const t=g+u,r=e[t],d=e[t+1],f=t+1{const{el:a,type:l,transition:c,children:u,shapeFlag:h}=t;if(6&h)return void q(t.component.subTree,e,n,i);if(128&h)return void t.suspense.move(e,n,i);if(64&h)return void l.move(t,e,n,nt);if(l===He){o(a,e,n);for(let t=0;tc.enter(a)),r);else{const{leave:i,delayLeave:r,afterLeave:l}=c,u=()=>{t.ctx.isUnmounted?s(a):o(a,e,n)},h=()=>{i(a,(()=>{u(),l&&l()}))};r?r(a,u,h):h()}else o(a,e,n)},X=(t,e,n,r=!1,o=!1)=>{const{type:s,props:a,ref:l,children:c,dynamicChildren:u,shapeFlag:h,patchFlag:d,dirs:f,cacheIndex:p}=t;if(-2===d&&(o=!1),null!=l&&((0,i.Jd)(),Y(l,null,n,t,!0),(0,i.lk)()),null!=p&&(e.renderCache[p]=void 0),256&h)return void e.ctx.deactivate(t);const g=1&h&&f,m=!V(t);let b;if(m&&(b=a&&a.onVnodeBeforeUnmount)&&gn(b,e,t),6&h)Q(t.component,n,r);else{if(128&h)return void t.suspense.unmount(n,r);g&&O(t,null,e,"beforeUnmount"),64&h?t.type.remove(t,e,n,nt,r):u&&!u.hasOnce&&(s!==He||d>0&&64&d)?J(u,e,n,!1,!0):(s===He&&384&d||!o&&16&h)&&J(c,e,n),r&&G(t)}(m&&(b=a&&a.onVnodeUnmounted)||g)&&de((()=>{b&&gn(b,e,t),g&&O(t,null,e,"unmounted")}),n)},G=t=>{const{type:e,el:n,anchor:i,transition:r}=t;if(e===He)return void Z(n,i);if(e===Be)return void S(t);const o=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&t.shapeFlag&&r&&!r.persisted){const{leave:e,delayLeave:i}=r,s=()=>e(n,o);i?i(t.el,o,s):s()}else o()},Z=(t,e)=>{let n;while(t!==e)n=p(t),s(t),t=n;s(e)},Q=(t,e,n)=>{const{bum:i,scope:o,job:s,subTree:a,um:l,m:c,a:u,parent:h,slots:{__:d}}=t;we(c),we(u),i&&(0,r.ir)(i),h&&(0,r.kJ)(d)&&d.forEach((t=>{h.renderCache[t]=void 0})),o.stop(),s&&(s.flags|=8,X(a,t,e,n)),l&&de(l,e),de((()=>{t.isUnmounted=!0}),e),e&&e.pendingBranch&&!e.isUnmounted&&t.asyncDep&&!t.asyncResolved&&t.suspenseId===e.pendingId&&(e.deps--,0===e.deps&&e.resolve())},J=(t,e,n,i=!1,r=!1,o=0)=>{for(let s=o;s{if(6&t.shapeFlag)return K(t.component.subTree);if(128&t.shapeFlag)return t.suspense.next();const e=p(t.anchor||t.el),n=e&&e[P];return n?p(n):e};let tt=!1;const et=(t,e,n)=>{null==t?e._vnode&&X(e._vnode,null,null,!0):b(e._vnode||null,t,e,null,null,null,n),e._vnode=t,tt||(tt=!0,w(),k(),tt=!1)},nt={p:b,um:X,m:q,r:G,mt:N,mc:A,pc:W,pbc:R,n:K,o:t};let it,rt;return e&&([it,rt]=e(nt)),{render:et,hydrate:it,createApp:Bt(et,it)}}function ge({type:t,props:e},n){return"svg"===n&&"foreignObject"===t||"mathml"===n&&"annotation-xml"===t&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function me({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function be(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function ye(t,e,n=!1){const i=t.children,o=e.children;if((0,r.kJ)(i)&&(0,r.kJ)(o))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[o-1]),n[o]=i)}}o=n.length,s=n[o-1];while(o-- >0)n[o]=s,s=e[s];return n}function ve(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:ve(e)}function we(t){if(t)for(let e=0;e{{const t=Ut(ke);return t}};function Me(t,e,n){return Se(t,e,n)}function Se(t,e,n=r.kT){const{immediate:o,deep:a,flush:l,once:c}=n;const u=(0,r.l7)({},n);const h=e&&o||!e&&"post"!==l;let d;if(Cn)if("sync"===l){const t=_e();d=t.__watcherHandles||(t.__watcherHandles=[])}else if(!h){const t=()=>{};return t.stop=r.dG,t.resume=r.dG,t.pause=r.dG,t}const f=xn;u.call=(t,e,n)=>s(t,f,e,n);let p=!1;"post"===l?u.scheduler=t=>{de(t,f&&f.suspense)}:"sync"!==l&&(p=!0,u.scheduler=(t,e)=>{e?t():y(t)}),u.augmentJob=t=>{e&&(t.flags|=4),p&&(t.flags|=2,f&&(t.id=f.uid,t.i=f))};const g=(0,i.YP)(t,e,u);return Cn&&(d?d.push(g):h&&g()),g}function Te(t,e,n){const i=this.proxy,o=(0,r.HD)(t)?t.includes(".")?De(i,t):()=>i[t]:t.bind(i,i);let s;(0,r.mf)(e)?s=e:(s=e.handler,n=e);const a=_n(this),l=Se(o,s.bind(i),n);return a(),l}function De(t,e){const n=e.split(".");return()=>{let e=t;for(let t=0;t"modelValue"===e||"model-value"===e?t.modelModifiers:t[`${e}Modifiers`]||t[`${(0,r._A)(e)}Modifiers`]||t[`${(0,r.rs)(e)}Modifiers`];function Ae(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||r.kT;let o=n;const a=e.startsWith("update:"),l=a&&Ce(i,e.slice(7));let c;l&&(l.trim&&(o=n.map((t=>(0,r.HD)(t)?t.trim():t))),l.number&&(o=n.map(r.h5)));let u=i[c=(0,r.hR)(e)]||i[c=(0,r.hR)((0,r._A)(e))];!u&&a&&(u=i[c=(0,r.hR)((0,r.rs)(e))]),u&&s(u,t,6,o);const h=i[c+"Once"];if(h){if(t.emitted){if(t.emitted[c])return}else t.emitted={};t.emitted[c]=!0,s(h,t,6,o)}}function Oe(t,e,n=!1){const i=e.emitsCache,o=i.get(t);if(void 0!==o)return o;const s=t.emits;let a={},l=!1;if(!(0,r.mf)(t)){const i=t=>{const n=Oe(t,e,!0);n&&(l=!0,(0,r.l7)(a,n))};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||l?((0,r.kJ)(s)?s.forEach((t=>a[t]=null)):(0,r.l7)(a,s),(0,r.Kn)(t)&&i.set(t,a),a):((0,r.Kn)(t)&&i.set(t,null),null)}function Pe(t,e){return!(!t||!(0,r.F7)(e))&&(e=e.slice(2).replace(/Once$/,""),(0,r.RI)(t,e[0].toLowerCase()+e.slice(1))||(0,r.RI)(t,(0,r.rs)(e))||(0,r.RI)(t,e))}function Ee(t){const{type:e,vnode:n,proxy:i,withProxy:o,propsOptions:[s],slots:l,attrs:c,emit:u,render:h,renderCache:d,props:f,data:p,setupState:g,ctx:m,inheritAttrs:b}=t,y=D(t);let x,v;try{if(4&n.shapeFlag){const t=o||i,e=t;x=hn(h.call(e,t,d,f,g,p,m)),v=c}else{const t=e;0,x=hn(t.length>1?t(f,{attrs:c,slots:l,emit:u}):t(f,null)),v=e.props?c:Re(c)}}catch(k){Ye.length=0,a(k,t,1),x=on($e)}let w=x;if(v&&!1!==b){const t=Object.keys(v),{shapeFlag:e}=w;t.length&&7&e&&(s&&t.some(r.tR)&&(v=Ie(v,s)),w=ln(w,v,!1,!0))}return n.dirs&&(w=ln(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&H(w,n.transition),x=w,D(y),x}const Re=t=>{let e;for(const n in t)("class"===n||"style"===n||(0,r.F7)(n))&&((e||(e={}))[n]=t[n]);return e},Ie=(t,e)=>{const n={};for(const i in t)(0,r.tR)(i)&&i.slice(9)in e||(n[i]=t[i]);return n};function Le(t,e,n){const{props:i,children:r,component:o}=t,{props:s,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||i!==s&&(i?!s||ze(i,s,c):!!s);if(1024&l)return!0;if(16&l)return i?ze(i,s,c):!!s;if(8&l){const t=e.dynamicProps;for(let e=0;et.__isSuspense;function je(t,e){e&&e.pendingBranch?(0,r.kJ)(t)?e.effects.push(...t):e.effects.push(t):v(t)}const He=Symbol.for("v-fgt"),We=Symbol.for("v-txt"),$e=Symbol.for("v-cmt"),Be=Symbol.for("v-stc"),Ye=[];let Ve=null;function Ue(t=!1){Ye.push(Ve=t?null:[])}function qe(){Ye.pop(),Ve=Ye[Ye.length-1]||null}let Xe=1;function Ge(t,e=!1){Xe+=t,t<0&&Ve&&e&&(Ve.hasOnce=!0)}function Ze(t){return t.dynamicChildren=Xe>0?Ve||r.Z6:null,qe(),Xe>0&&Ve&&Ve.push(t),t}function Qe(t,e,n,i,r,o){return Ze(rn(t,e,n,i,r,o,!0))}function Je(t,e,n,i,r){return Ze(on(t,e,n,i,r,!0))}function Ke(t){return!!t&&!0===t.__v_isVNode}function tn(t,e){return t.type===e.type&&t.key===e.key}const en=({key:t})=>null!=t?t:null,nn=({ref:t,ref_key:e,ref_for:n})=>("number"===typeof t&&(t=""+t),null!=t?(0,r.HD)(t)||(0,i.dq)(t)||(0,r.mf)(t)?{i:S,r:t,k:e,f:!!n}:t:null);function rn(t,e=null,n=null,i=0,o=null,s=(t===He?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&en(e),ref:e&&nn(e),scopeId:T,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:S};return l?(fn(c,n),128&s&&t.normalize(c)):n&&(c.shapeFlag|=(0,r.HD)(n)?8:16),Xe>0&&!a&&Ve&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Ve.push(c),c}const on=sn;function sn(t,e=null,n=null,o=0,s=null,a=!1){if(t&&t!==pt||(t=$e),Ke(t)){const i=ln(t,e,!0);return n&&fn(i,n),Xe>0&&!a&&Ve&&(6&i.shapeFlag?Ve[Ve.indexOf(t)]=i:Ve.push(i)),i.patchFlag=-2,i}if(Nn(t)&&(t=t.__vccOpts),e){e=an(e);let{class:t,style:n}=e;t&&!(0,r.HD)(t)&&(e.class=(0,r.C_)(t)),(0,r.Kn)(n)&&((0,i.X3)(n)&&!(0,r.kJ)(n)&&(n=(0,r.l7)({},n)),e.style=(0,r.j5)(n))}const l=(0,r.HD)(t)?1:Fe(t)?128:E(t)?64:(0,r.Kn)(t)?4:(0,r.mf)(t)?2:0;return rn(t,e,n,o,s,l,a,!0)}function an(t){return t?(0,i.X3)(t)||Gt(t)?(0,r.l7)({},t):t:null}function ln(t,e,n=!1,i=!1){const{props:o,ref:s,patchFlag:a,children:l,transition:c}=t,u=e?pn(o||{},e):o,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&en(u),ref:e&&e.ref?n&&s?(0,r.kJ)(s)?s.concat(nn(e)):[s,nn(e)]:nn(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==He?-1===a?16:16|a:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:c,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ln(t.ssContent),ssFallback:t.ssFallback&&ln(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return c&&i&&H(h,c.clone(h)),h}function cn(t=" ",e=0){return on(We,null,t,e)}function un(t="",e=!1){return e?(Ue(),Je($e,null,t)):on($e,null,t)}function hn(t){return null==t||"boolean"===typeof t?on($e):(0,r.kJ)(t)?on(He,null,t.slice()):Ke(t)?dn(t):on(We,null,String(t))}function dn(t){return null===t.el&&-1!==t.patchFlag||t.memo?t:ln(t)}function fn(t,e){let n=0;const{shapeFlag:i}=t;if(null==e)e=null;else if((0,r.kJ)(e))n=16;else if("object"===typeof e){if(65&i){const n=e.default;return void(n&&(n._c&&(n._d=!1),fn(t,n()),n._c&&(n._d=!0)))}{n=32;const i=e._;i||Gt(e)?3===i&&S&&(1===S.slots._?e._=1:(e._=2,t.patchFlag|=1024)):e._ctx=S}}else(0,r.mf)(e)?(e={default:e,_ctx:S},n=32):(e=String(e),64&i?(n=16,e=[cn(e)]):n=8);t.children=e,t.shapeFlag|=n}function pn(...t){const e={};for(let n=0;nxn||S;let wn,kn;{const t=(0,r.E9)(),e=(e,n)=>{let i;return(i=t[e])||(i=t[e]=[]),i.push(n),t=>{i.length>1?i.forEach((e=>e(t))):i[0](t)}};wn=e("__VUE_INSTANCE_SETTERS__",(t=>xn=t)),kn=e("__VUE_SSR_SETTERS__",(t=>Cn=t))}const _n=t=>{const e=xn;return wn(t),t.scope.on(),()=>{t.scope.off(),wn(e)}},Mn=()=>{xn&&xn.scope.off(),wn(null)};function Sn(t){return 4&t.vnode.shapeFlag}let Tn,Dn,Cn=!1;function An(t,e=!1,n=!1){e&&kn(e);const{props:i,children:r}=t.vnode,o=Sn(t);Zt(t,i,o,e),ce(t,r,n||e);const s=o?On(t,e):void 0;return e&&kn(!1),s}function On(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Mt);const{setup:s}=n;if(s){(0,i.Jd)();const n=t.setupContext=s.length>1?In(t):null,l=_n(t),c=o(s,t,0,[t.props,n]),u=(0,r.tI)(c);if((0,i.lk)(),l(),!u&&!t.sp||V(t)||B(t),u){if(c.then(Mn,Mn),e)return c.then((n=>{Pn(t,n,e)})).catch((e=>{a(e,t,0)}));t.asyncDep=c}else Pn(t,c,e)}else En(t,e)}function Pn(t,e,n){(0,r.mf)(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:(0,r.Kn)(e)&&(t.setupState=(0,i.WL)(e)),En(t,n)}function En(t,e,n){const o=t.type;if(!t.render){if(!e&&Tn&&!o.render){const e=o.template||Pt(t).template;if(e){0;const{isCustomElement:n,compilerOptions:i}=t.appContext.config,{delimiters:s,compilerOptions:a}=o,l=(0,r.l7)((0,r.l7)({isCustomElement:n,delimiters:s},i),a);o.render=Tn(e,l)}}t.render=o.render||r.dG,Dn&&Dn(t)}{const e=_n(t);(0,i.Jd)();try{Dt(t)}finally{(0,i.lk)(),e()}}}const Rn={get(t,e){return(0,i.j)(t,"get",""),t[e]}};function In(t){const e=e=>{t.exposed=e||{}};return{attrs:new Proxy(t.attrs,Rn),slots:t.slots,emit:t.emit,expose:e}}function Ln(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy((0,i.WL)((0,i.Xl)(t.exposed)),{get(e,n){return n in e?e[n]:n in kt?kt[n](t):void 0},has(t,e){return e in t||e in kt}})):t.proxy}function zn(t,e=!0){return(0,r.mf)(t)?t.displayName||t.name:t.name||e&&t.__name}function Nn(t){return(0,r.mf)(t)&&"__vccOpts"in t}const Fn=(t,e)=>{const n=(0,i.Fl)(t,e,Cn);return n};function jn(t,e,n){const i=arguments.length;return 2===i?(0,r.Kn)(e)&&!(0,r.kJ)(e)?Ke(e)?on(t,null,[e]):on(t,e):on(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&Ke(n)&&(n=[n]),on(t,e,n))}const Hn="3.5.18"},963:function(t,e,n){n.d(e,{D2:function(){return J},bM:function(){return V},iM:function(){return Z},ri:function(){return nt}});var i=n(252),r=n(577);n(262); /** * @vue/runtime-dom v3.5.18 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -let o;const s="undefined"!==typeof window&&window.trustedTypes;if(s)try{o=s.createPolicy("vue",{createHTML:t=>t})}catch(ot){}const a=o?t=>o.createHTML(t):t=>t,l="http://www.w3.org/2000/svg",c="http://www.w3.org/1998/Math/MathML",u="undefined"!==typeof document?document:null,h=u&&u.createElement("template"),d={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r="svg"===e?u.createElementNS(l,t):"mathml"===e?u.createElementNS(c,t):n?u.createElement(t,{is:n}):u.createElement(t);return"select"===t&&i&&null!=i.multiple&&r.setAttribute("multiple",i.multiple),r},createText:t=>u.createTextNode(t),createComment:t=>u.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>u.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,o){const s=n?n.previousSibling:e.lastChild;if(r&&(r===o||r.nextSibling)){while(1)if(e.insertBefore(r.cloneNode(!0),n),r===o||!(r=r.nextSibling))break}else{h.innerHTML=a("svg"===i?`${t}`:"mathml"===i?`${t}`:t);const r=h.content;if("svg"===i||"mathml"===i){const t=r.firstChild;while(t.firstChild)r.appendChild(t.firstChild);r.removeChild(t)}e.insertBefore(r,n)}return[s?s.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},f=Symbol("_vtc"),p={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};i.nJ;function g(t,e,n){const i=t[f];i&&(e=(e?[e,...i]:[...i]).join(" ")),null==e?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const m=Symbol("_vod"),b=Symbol("_vsh");const x=Symbol("");const y=/(^|;)\s*display\s*:/;function v(t,e,n){const i=t.style,o=(0,r.HD)(n);let s=!1;if(n&&!o){if(e)if((0,r.HD)(e))for(const t of e.split(";")){const e=t.slice(0,t.indexOf(":")).trim();null==n[e]&&k(i,e,"")}else for(const t in e)null==n[t]&&k(i,t,"");for(const t in n)"display"===t&&(s=!0),k(i,t,n[t])}else if(o){if(e!==n){const t=i[x];t&&(n+=";"+t),i.cssText=n,s=y.test(n)}}else e&&t.removeAttribute("style");m in t&&(t[m]=s?i.display:"",t[b]&&(i.display="none"))}const w=/\s*!important$/;function k(t,e,n){if((0,r.kJ)(n))n.forEach((n=>k(t,e,n)));else if(null==n&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=S(t,e);w.test(n)?t.setProperty((0,r.rs)(i),n.replace(w,""),"important"):t[i]=n}}const _=["Webkit","Moz","ms"],M={};function S(t,e){const n=M[e];if(n)return n;let i=(0,r._A)(e);if("filter"!==i&&i in t)return M[e]=i;i=(0,r.kC)(i);for(let r=0;r<_.length;r++){const n=_[r]+i;if(n in t)return M[e]=n}return e}const T="http://www.w3.org/1999/xlink";function D(t,e,n,i,o,s=(0,r.Pq)(e)){i&&e.startsWith("xlink:")?null==n?t.removeAttributeNS(T,e.slice(6,e.length)):t.setAttributeNS(T,e,n):null==n||s&&!(0,r.yA)(n)?t.removeAttribute(e):t.setAttribute(e,s?"":(0,r.yk)(n)?String(n):n)}function C(t,e,n,i,o){if("innerHTML"===e||"textContent"===e)return void(null!=n&&(t[e]="innerHTML"===e?a(n):n));const s=t.tagName;if("value"===e&&"PROGRESS"!==s&&!s.includes("-")){const i="OPTION"===s?t.getAttribute("value")||"":t.value,r=null==n?"checkbox"===t.type?"on":"":String(n);return i===r&&"_value"in t||(t.value=r),null==n&&t.removeAttribute(e),void(t._value=n)}let l=!1;if(""===n||null==n){const i=typeof t[e];"boolean"===i?n=(0,r.yA)(n):null==n&&"string"===i?(n="",l=!0):"number"===i&&(n=0,l=!0)}try{t[e]=n}catch(ot){0}l&&t.removeAttribute(o||e)}function A(t,e,n,i){t.addEventListener(e,n,i)}function O(t,e,n,i){t.removeEventListener(e,n,i)}const P=Symbol("_vei");function E(t,e,n,i,r=null){const o=t[P]||(t[P]={}),s=o[e];if(i&&s)s.value=i;else{const[n,a]=I(e);if(i){const s=o[e]=F(i,r);A(t,n,s,a)}else s&&(O(t,n,s,a),o[e]=void 0)}}const R=/(?:Once|Passive|Capture)$/;function I(t){let e;if(R.test(t)){let n;e={};while(n=t.match(R))t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}const n=":"===t[2]?t.slice(3):(0,r.rs)(t.slice(2));return[n,e]}let L=0;const z=Promise.resolve(),N=()=>L||(z.then((()=>L=0)),L=Date.now());function F(t,e){const n=t=>{if(t._vts){if(t._vts<=n.attached)return}else t._vts=Date.now();(0,i.$d)(j(t,n.value),e,5,[t])};return n.value=t,n.attached=N(),n}function j(t,e){if((0,r.kJ)(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map((t=>e=>!e._stopped&&t&&t(e)))}return e}const H=t=>111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,W=(t,e,n,i,o,s)=>{const a="svg"===o;"class"===e?g(t,i,a):"style"===e?v(t,n,i):(0,r.F7)(e)?(0,r.tR)(e)||E(t,e,n,i,s):("."===e[0]?(e=e.slice(1),1):"^"===e[0]?(e=e.slice(1),0):$(t,e,i,a))?(C(t,e,i),t.tagName.includes("-")||"value"!==e&&"checked"!==e&&"selected"!==e||D(t,e,i,a,s,"value"!==e)):!t._isVueCE||!/[A-Z]/.test(e)&&(0,r.HD)(i)?("true-value"===e?t._trueValue=i:"false-value"===e&&(t._falseValue=i),D(t,e,i,a)):C(t,(0,r._A)(e),i,s,e)};function $(t,e,n,i){if(i)return"innerHTML"===e||"textContent"===e||!!(e in t&&H(e)&&(0,r.mf)(n));if("spellcheck"===e||"draggable"===e||"translate"===e||"autocorrect"===e)return!1;if("form"===e)return!1;if("list"===e&&"INPUT"===t.tagName)return!1;if("type"===e&&"TEXTAREA"===t.tagName)return!1;if("width"===e||"height"===e){const e=t.tagName;if("IMG"===e||"VIDEO"===e||"CANVAS"===e||"SOURCE"===e)return!1}return(!H(e)||!(0,r.HD)(n))&&e in t} +let o;const s="undefined"!==typeof window&&window.trustedTypes;if(s)try{o=s.createPolicy("vue",{createHTML:t=>t})}catch(ot){}const a=o?t=>o.createHTML(t):t=>t,l="http://www.w3.org/2000/svg",c="http://www.w3.org/1998/Math/MathML",u="undefined"!==typeof document?document:null,h=u&&u.createElement("template"),d={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r="svg"===e?u.createElementNS(l,t):"mathml"===e?u.createElementNS(c,t):n?u.createElement(t,{is:n}):u.createElement(t);return"select"===t&&i&&null!=i.multiple&&r.setAttribute("multiple",i.multiple),r},createText:t=>u.createTextNode(t),createComment:t=>u.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>u.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,o){const s=n?n.previousSibling:e.lastChild;if(r&&(r===o||r.nextSibling)){while(1)if(e.insertBefore(r.cloneNode(!0),n),r===o||!(r=r.nextSibling))break}else{h.innerHTML=a("svg"===i?`${t}`:"mathml"===i?`${t}`:t);const r=h.content;if("svg"===i||"mathml"===i){const t=r.firstChild;while(t.firstChild)r.appendChild(t.firstChild);r.removeChild(t)}e.insertBefore(r,n)}return[s?s.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},f=Symbol("_vtc"),p={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};i.nJ;function g(t,e,n){const i=t[f];i&&(e=(e?[e,...i]:[...i]).join(" ")),null==e?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const m=Symbol("_vod"),b=Symbol("_vsh");const y=Symbol("");const x=/(^|;)\s*display\s*:/;function v(t,e,n){const i=t.style,o=(0,r.HD)(n);let s=!1;if(n&&!o){if(e)if((0,r.HD)(e))for(const t of e.split(";")){const e=t.slice(0,t.indexOf(":")).trim();null==n[e]&&k(i,e,"")}else for(const t in e)null==n[t]&&k(i,t,"");for(const t in n)"display"===t&&(s=!0),k(i,t,n[t])}else if(o){if(e!==n){const t=i[y];t&&(n+=";"+t),i.cssText=n,s=x.test(n)}}else e&&t.removeAttribute("style");m in t&&(t[m]=s?i.display:"",t[b]&&(i.display="none"))}const w=/\s*!important$/;function k(t,e,n){if((0,r.kJ)(n))n.forEach((n=>k(t,e,n)));else if(null==n&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=S(t,e);w.test(n)?t.setProperty((0,r.rs)(i),n.replace(w,""),"important"):t[i]=n}}const _=["Webkit","Moz","ms"],M={};function S(t,e){const n=M[e];if(n)return n;let i=(0,r._A)(e);if("filter"!==i&&i in t)return M[e]=i;i=(0,r.kC)(i);for(let r=0;r<_.length;r++){const n=_[r]+i;if(n in t)return M[e]=n}return e}const T="http://www.w3.org/1999/xlink";function D(t,e,n,i,o,s=(0,r.Pq)(e)){i&&e.startsWith("xlink:")?null==n?t.removeAttributeNS(T,e.slice(6,e.length)):t.setAttributeNS(T,e,n):null==n||s&&!(0,r.yA)(n)?t.removeAttribute(e):t.setAttribute(e,s?"":(0,r.yk)(n)?String(n):n)}function C(t,e,n,i,o){if("innerHTML"===e||"textContent"===e)return void(null!=n&&(t[e]="innerHTML"===e?a(n):n));const s=t.tagName;if("value"===e&&"PROGRESS"!==s&&!s.includes("-")){const i="OPTION"===s?t.getAttribute("value")||"":t.value,r=null==n?"checkbox"===t.type?"on":"":String(n);return i===r&&"_value"in t||(t.value=r),null==n&&t.removeAttribute(e),void(t._value=n)}let l=!1;if(""===n||null==n){const i=typeof t[e];"boolean"===i?n=(0,r.yA)(n):null==n&&"string"===i?(n="",l=!0):"number"===i&&(n=0,l=!0)}try{t[e]=n}catch(ot){0}l&&t.removeAttribute(o||e)}function A(t,e,n,i){t.addEventListener(e,n,i)}function O(t,e,n,i){t.removeEventListener(e,n,i)}const P=Symbol("_vei");function E(t,e,n,i,r=null){const o=t[P]||(t[P]={}),s=o[e];if(i&&s)s.value=i;else{const[n,a]=I(e);if(i){const s=o[e]=F(i,r);A(t,n,s,a)}else s&&(O(t,n,s,a),o[e]=void 0)}}const R=/(?:Once|Passive|Capture)$/;function I(t){let e;if(R.test(t)){let n;e={};while(n=t.match(R))t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}const n=":"===t[2]?t.slice(3):(0,r.rs)(t.slice(2));return[n,e]}let L=0;const z=Promise.resolve(),N=()=>L||(z.then((()=>L=0)),L=Date.now());function F(t,e){const n=t=>{if(t._vts){if(t._vts<=n.attached)return}else t._vts=Date.now();(0,i.$d)(j(t,n.value),e,5,[t])};return n.value=t,n.attached=N(),n}function j(t,e){if((0,r.kJ)(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map((t=>e=>!e._stopped&&t&&t(e)))}return e}const H=t=>111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,W=(t,e,n,i,o,s)=>{const a="svg"===o;"class"===e?g(t,i,a):"style"===e?v(t,n,i):(0,r.F7)(e)?(0,r.tR)(e)||E(t,e,n,i,s):("."===e[0]?(e=e.slice(1),1):"^"===e[0]?(e=e.slice(1),0):$(t,e,i,a))?(C(t,e,i),t.tagName.includes("-")||"value"!==e&&"checked"!==e&&"selected"!==e||D(t,e,i,a,s,"value"!==e)):!t._isVueCE||!/[A-Z]/.test(e)&&(0,r.HD)(i)?("true-value"===e?t._trueValue=i:"false-value"===e&&(t._falseValue=i),D(t,e,i,a)):C(t,(0,r._A)(e),i,s,e)};function $(t,e,n,i){if(i)return"innerHTML"===e||"textContent"===e||!!(e in t&&H(e)&&(0,r.mf)(n));if("spellcheck"===e||"draggable"===e||"translate"===e||"autocorrect"===e)return!1;if("form"===e)return!1;if("list"===e&&"INPUT"===t.tagName)return!1;if("type"===e&&"TEXTAREA"===t.tagName)return!1;if("width"===e||"height"===e){const e=t.tagName;if("IMG"===e||"VIDEO"===e||"CANVAS"===e||"SOURCE"===e)return!1}return(!H(e)||!(0,r.HD)(n))&&e in t} /*! #__NO_SIDE_EFFECTS__ */ "undefined"!==typeof HTMLElement&&HTMLElement;Symbol("_moveCb"),Symbol("_enterCb");const B=t=>{const e=t.props["onUpdate:modelValue"]||!1;return(0,r.kJ)(e)?t=>(0,r.ir)(e,t):e};const Y=Symbol("_assign");const V={deep:!0,created(t,{value:e,modifiers:{number:n}},o){const s=(0,r.DM)(e);A(t,"change",(()=>{const e=Array.prototype.filter.call(t.options,(t=>t.selected)).map((t=>n?(0,r.h5)(q(t)):q(t)));t[Y](t.multiple?s?new Set(e):e:e[0]),t._assigning=!0,(0,i.Y3)((()=>{t._assigning=!1}))})),t[Y]=B(o)},mounted(t,{value:e}){U(t,e)},beforeUpdate(t,e,n){t[Y]=B(n)},updated(t,{value:e}){t._assigning||U(t,e)}};function U(t,e){const n=t.multiple,i=(0,r.kJ)(e);if(!n||i||(0,r.DM)(e)){for(let o=0,s=t.options.length;oString(t)===String(a))):(0,r.hq)(e,a)>-1}else s.selected=e.has(a);else if((0,r.WV)(q(s),e))return void(t.selectedIndex!==o&&(t.selectedIndex=o))}n||-1===t.selectedIndex||(t.selectedIndex=-1)}}function q(t){return"_value"in t?t._value:t.value}const X=["ctrl","shift","alt","meta"],G={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&0!==t.button,middle:t=>"button"in t&&1!==t.button,right:t=>"button"in t&&2!==t.button,exact:(t,e)=>X.some((n=>t[`${n}Key`]&&!e.includes(n)))},Z=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(n,...i)=>{for(let t=0;t{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=n=>{if(!("key"in n))return;const i=(0,r.rs)(n.key);return e.some((t=>t===i||Q[t]===i))?t(n):void 0})},K=(0,r.l7)({patchProp:W},d);let tt;function et(){return tt||(tt=(0,i.Us)(K))}const nt=(...t)=>{const e=et().createApp(...t);const{mount:n}=e;return e.mount=t=>{const i=rt(t);if(!i)return;const o=e._component;(0,r.mf)(o)||o.render||o.template||(o.template=i.innerHTML),1===i.nodeType&&(i.textContent="");const s=n(i,!1,it(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},e};function it(t){return t instanceof SVGElement?"svg":"function"===typeof MathMLElement&&t instanceof MathMLElement?"mathml":void 0}function rt(t){if((0,r.HD)(t)){const e=document.querySelector(t);return e}return t}},577:function(t,e,n){ /** @@ -20,7 +20,7 @@ let o;const s="undefined"!==typeof window&&window.trustedTypes;if(s)try{o=s.crea * @license MIT **/ /*! #__NO_SIDE_EFFECTS__ */ -function i(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return t=>t in e}n.d(e,{C_:function(){return Q},DM:function(){return m},E9:function(){return B},F7:function(){return l},Gg:function(){return A},HD:function(){return v},He:function(){return W},Kj:function(){return x},Kn:function(){return k},NO:function(){return a},Nj:function(){return j},Od:function(){return h},PO:function(){return D},Pq:function(){return K},RI:function(){return f},S0:function(){return C},W7:function(){return T},WV:function(){return nt},Z6:function(){return o},_A:function(){return E},_N:function(){return g},aU:function(){return N},dG:function(){return s},fY:function(){return i},h5:function(){return H},hR:function(){return z},hq:function(){return it},ir:function(){return F},j5:function(){return U},kC:function(){return L},kJ:function(){return p},kT:function(){return r},l7:function(){return u},mf:function(){return y},rs:function(){return I},tI:function(){return _},tR:function(){return c},yA:function(){return tt},yk:function(){return w},yl:function(){return V},zw:function(){return ot}});const r={},o=[],s=()=>{},a=()=>!1,l=t=>111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),c=t=>t.startsWith("onUpdate:"),u=Object.assign,h=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(t,e)=>d.call(t,e),p=Array.isArray,g=t=>"[object Map]"===S(t),m=t=>"[object Set]"===S(t),b=t=>"[object Date]"===S(t),x=t=>"[object RegExp]"===S(t),y=t=>"function"===typeof t,v=t=>"string"===typeof t,w=t=>"symbol"===typeof t,k=t=>null!==t&&"object"===typeof t,_=t=>(k(t)||y(t))&&y(t.then)&&y(t.catch),M=Object.prototype.toString,S=t=>M.call(t),T=t=>S(t).slice(8,-1),D=t=>"[object Object]"===S(t),C=t=>v(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,A=i(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),O=t=>{const e=Object.create(null);return n=>{const i=e[n];return i||(e[n]=t(n))}},P=/-(\w)/g,E=O((t=>t.replace(P,((t,e)=>e?e.toUpperCase():"")))),R=/\B([A-Z])/g,I=O((t=>t.replace(R,"-$1").toLowerCase())),L=O((t=>t.charAt(0).toUpperCase()+t.slice(1))),z=O((t=>{const e=t?`on${L(t)}`:"";return e})),N=(t,e)=>!Object.is(t,e),F=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},H=t=>{const e=parseFloat(t);return isNaN(e)?t:e},W=t=>{const e=v(t)?Number(t):NaN;return isNaN(e)?t:e};let $;const B=()=>$||($="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{});const Y="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",V=i(Y);function U(t){if(p(t)){const e={};for(let n=0;n{if(t){const n=t.split(X);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function Q(t){let e="";if(v(t))e=t;else if(p(t))for(let n=0;nnt(t,e)))}const rt=t=>!(!t||!0!==t["__v_isRef"]),ot=t=>v(t)?t:null==t?"":p(t)||k(t)&&(t.toString===M||!y(t.toString))?rt(t)?ot(t.value):JSON.stringify(t,st,2):String(t),st=(t,e)=>rt(e)?st(t,e.value):g(e)?{[`Map(${e.size})`]:[...e.entries()].reduce(((t,[e,n],i)=>(t[at(e,i)+" =>"]=n,t)),{})}:m(e)?{[`Set(${e.size})`]:[...e.values()].map((t=>at(t)))}:w(e)?at(e):!k(e)||p(e)||D(e)?e:String(e),at=(t,e="")=>{var n;return w(t)?`Symbol(${null!=(n=t.description)?n:e})`:t}},264:function(t,e,n){n.d(e,{Z:function(){return h}});var i=n(252); +function i(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return t=>t in e}n.d(e,{C_:function(){return Q},DM:function(){return m},E9:function(){return B},F7:function(){return l},Gg:function(){return A},HD:function(){return v},He:function(){return W},Kj:function(){return y},Kn:function(){return k},NO:function(){return a},Nj:function(){return j},Od:function(){return h},PO:function(){return D},Pq:function(){return K},RI:function(){return f},S0:function(){return C},W7:function(){return T},WV:function(){return nt},Z6:function(){return o},_A:function(){return E},_N:function(){return g},aU:function(){return N},dG:function(){return s},fY:function(){return i},h5:function(){return H},hR:function(){return z},hq:function(){return it},ir:function(){return F},j5:function(){return U},kC:function(){return L},kJ:function(){return p},kT:function(){return r},l7:function(){return u},mf:function(){return x},rs:function(){return I},tI:function(){return _},tR:function(){return c},yA:function(){return tt},yk:function(){return w},yl:function(){return V},zw:function(){return ot}});const r={},o=[],s=()=>{},a=()=>!1,l=t=>111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),c=t=>t.startsWith("onUpdate:"),u=Object.assign,h=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(t,e)=>d.call(t,e),p=Array.isArray,g=t=>"[object Map]"===S(t),m=t=>"[object Set]"===S(t),b=t=>"[object Date]"===S(t),y=t=>"[object RegExp]"===S(t),x=t=>"function"===typeof t,v=t=>"string"===typeof t,w=t=>"symbol"===typeof t,k=t=>null!==t&&"object"===typeof t,_=t=>(k(t)||x(t))&&x(t.then)&&x(t.catch),M=Object.prototype.toString,S=t=>M.call(t),T=t=>S(t).slice(8,-1),D=t=>"[object Object]"===S(t),C=t=>v(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,A=i(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),O=t=>{const e=Object.create(null);return n=>{const i=e[n];return i||(e[n]=t(n))}},P=/-(\w)/g,E=O((t=>t.replace(P,((t,e)=>e?e.toUpperCase():"")))),R=/\B([A-Z])/g,I=O((t=>t.replace(R,"-$1").toLowerCase())),L=O((t=>t.charAt(0).toUpperCase()+t.slice(1))),z=O((t=>{const e=t?`on${L(t)}`:"";return e})),N=(t,e)=>!Object.is(t,e),F=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},H=t=>{const e=parseFloat(t);return isNaN(e)?t:e},W=t=>{const e=v(t)?Number(t):NaN;return isNaN(e)?t:e};let $;const B=()=>$||($="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{});const Y="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",V=i(Y);function U(t){if(p(t)){const e={};for(let n=0;n{if(t){const n=t.split(X);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function Q(t){let e="";if(v(t))e=t;else if(p(t))for(let n=0;nnt(t,e)))}const rt=t=>!(!t||!0!==t["__v_isRef"]),ot=t=>v(t)?t:null==t?"":p(t)||k(t)&&(t.toString===M||!x(t.toString))?rt(t)?ot(t.value):JSON.stringify(t,st,2):String(t),st=(t,e)=>rt(e)?st(t,e.value):g(e)?{[`Map(${e.size})`]:[...e.entries()].reduce(((t,[e,n],i)=>(t[at(e,i)+" =>"]=n,t)),{})}:m(e)?{[`Set(${e.size})`]:[...e.values()].map((t=>at(t)))}:w(e)?at(e):!k(e)||p(e)||D(e)?e:String(e),at=(t,e="")=>{var n;return w(t)?`Symbol(${null!=(n=t.description)?n:e})`:t}},264:function(t,e,n){n.d(e,{Z:function(){return h}});var i=n(252); /** * @license lucide-vue-next v0.539.0 - ISC * @@ -95,7 +95,13 @@ const u=({name:t,iconNode:e,absoluteStrokeWidth:n,"absolute-stroke-width":o,stro * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r=(0,i.Z)("circle-arrow-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]])},779:function(t,e,n){n.d(e,{Z:function(){return r}});var i=n(264); + */const r=(0,i.Z)("circle-arrow-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]])},866:function(t,e,n){n.d(e,{Z:function(){return r}});var i=n(264); +/** + * @license lucide-vue-next v0.539.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r=(0,i.Z)("circle-arrow-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]])},779:function(t,e,n){n.d(e,{Z:function(){return r}});var i=n(264); /** * @license lucide-vue-next v0.539.0 - ISC * @@ -221,46 +227,46 @@ const u=({name:t,iconNode:e,absoluteStrokeWidth:n,"absolute-stroke-width":o,stro * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r=(0,i.Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},744:function(t,e){e.Z=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n}},148:function(t,e,n){n.d(e,{De:function(){return Vn},Dx:function(){return Xn},FB:function(){return Ii},FK:function(){return c},Gu:function(){return zn},IQ:function(){return N},ST:function(){return I},W_:function(){return Rt},f$:function(){return _i},jI:function(){return R},jn:function(){return nn},kL:function(){return $e},od:function(){return on},u:function(){return pi},uw:function(){return yi}});var i=n(411); + */const r=(0,i.Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},744:function(t,e){e.Z=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n}},148:function(t,e,n){n.d(e,{De:function(){return Vn},Dx:function(){return Xn},FB:function(){return Ii},FK:function(){return c},Gu:function(){return zn},IQ:function(){return N},ST:function(){return I},W_:function(){return Rt},f$:function(){return _i},jI:function(){return R},jn:function(){return nn},kL:function(){return $e},od:function(){return on},u:function(){return pi},uw:function(){return xi}});var i=n(411); /*! * Chart.js v4.5.1 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License - */class r{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const r=e.listeners[i],o=e.duration;r.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=i.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var o=new r;const s="transparent",a={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=(0,i.c)(t||s),o=r.valid&&(0,i.c)(e||s);return o&&o.valid?o.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class l{constructor(t,e,n,r){const o=e[n];r=(0,i.a)([t.to,r,o,t.from]);const s=(0,i.a)([t.from,o,r]);this._active=!0,this._fn=t.fn||a[t.type||typeof s],this._easing=i.e[t.easing]||i.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,s=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,i.a)([t.to,e,r,t.from]),this._from=(0,i.a)([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let i=0;i{const o=t[r];if(!(0,i.i)(o))return;const s={};for(const t of e)s[t]=o[t];((0,i.b)(o.properties)&&o.properties||[r]).forEach((t=>{t!==r&&n.has(t)||n.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=h(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&u(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if("$"===c.charAt(0))continue;if("options"===c){i.push(...this._animateOptions(t,e));continue}const u=e[c];let h=r[c];const d=n.get(c);if(h){if(d&&h.active()){h.update(d,u,s);continue}h.cancel()}d&&d.duration?(r[c]=h=new l(d,t,c,u),i.push(h)):t[c]=u}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(o.add(this._chart,n),!0):void 0}}function u(t,e){const n=[],i=Object.keys(e);for(let r=0;r0||!n&&e<0)return r.index}return null}function _(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=i,l=o.axis,c=s.axis,u=y(o,s,i),h=e.length;let d;for(let f=0;fn[t].axis===e)).shift()}function S(t,e){return(0,i.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function T(t,e,n){return(0,i.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function D(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const C=t=>"reset"===t||"none"===t,A=(t,e)=>e?t:Object.assign({},t),O=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:g(n,!0),values:null};class P{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=x(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&D(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,o=e.xAxisID=(0,i.v)(n.xAxisID,M(t,"x")),s=e.yAxisID=(0,i.v)(n.yAxisID,M(t,"y")),a=e.rAxisID=(0,i.v)(n.rAxisID,M(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,o,s,a),u=e.vAxisID=r(l,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,i.u)(this._data,this),t._stacked&&D(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if((0,i.i)(e)){const t=this._cachedMeta;this._data=b(e,t)}else if(n!==e){if(n){(0,i.u)(n,this);const t=this._cachedMeta;D(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,i.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=x(e.vScale,e),e.stack!==n.stack&&(i=!0,D(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&(_(this,e._parsed),e._stacked=x(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:s}=n,a=o.axis;let l,c,u,h=0===t&&e===r.length||n._sorted,d=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,u=r;else{u=(0,i.b)(r[t])?this.parseArrayData(n,r,t,e):(0,i.i)(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const o=()=>null===c[a]||d&&c[a]e||h=0;--d)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,o,s;for(r=0,o=e.length;r=0&&tthis.getContext(n,r,e),g=c.resolveNamedOptions(d,f,p,h);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(A(g,l))),g}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),o=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(o,this.getContext(t,n,e))}const l=new c(i,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||C(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),o=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:o}}updateElement(t,e,n,i){C(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!C(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[s,a,l]of this._syncList)this[s](a,l);this._syncList=[];const i=n.length,r=e.length,o=Math.min(r,i);o&&this.parse(0,o),r>i?this._insertElements(i,r-i,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s(0,i.p)(t,l,c,!0)?1:Math.max(e,e*n,r,r*n),g=(t,e,r)=>(0,i.p)(t,l,c,!0)?-1:Math.min(e,e*n,r,r*n),m=p(0,u,d),b=p(i.H,h,f),x=g(i.P,u,d),y=g(i.P+i.H,h,f);r=(m-x)/2,o=(b-y)/2,s=-(m+x)/2,a=-(b+y)/2}return{ratioX:r,ratioY:o,offsetX:s,offsetY:a}}class R extends P{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:r,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,a)=>{const l=t.getDatasetMeta(0),c=l.controller.getStyle(a);return{text:e,fillStyle:c.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(a),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:i,pointStyle:n,borderRadius:o&&(s||c.borderRadius),index:a}})):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,s,a=t=>+n[t];if((0,i.i)(n[t])){const{key:t="value"}=this._parsing;a=e=>+(0,i.f)(n[e],t)}for(o=t,s=t+e;o0&&!isNaN(t)?i.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=(0,i.o)(e._parsed[t],n.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,o,s,a;if(!t)for(i=0,r=n.data.datasets.length;i0&&this.getParsed(e-1);for(let w=0;w=x){p.skip=!0;continue}const y=this.getParsed(w),k=(0,i.k)(y[f]),_=p[d]=s.getPixelForValue(y[d],w),M=p[f]=o||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,y,l):y[f],w);p.skip=isNaN(_)||isNaN(M)||k,p.stop=w>0&&Math.abs(y[d]-v[d])>m,g&&(p.parsed=y,p.raw=c.data[w]),h&&(p.options=u||this.resolveDataElementOptions(w,n.active?"active":r)),b||this.updateElement(n,w,p,r),v=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function L(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class z{static override(t){Object.assign(z.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return L()}parse(){return L()}format(){return L()}add(){return L()}diff(){return L()}startOf(){return L()}endOf(){return L()}}var N={_date:z};function F(t,e,n,r){const{controller:o,data:s,_sorted:a}=t,l=o._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&"r"!==e&&a&&s.length){const a=l._reversePixels?i.A:i.B;if(!r){const r=a(s,e,n);if(c){const{vScale:e}=o._cachedMeta,{_parsed:n}=t,s=n.slice(0,r.lo+1).reverse().findIndex((t=>!(0,i.k)(t[e.axis])));r.lo-=Math.max(0,s);const a=n.slice(r.hi).findIndex((t=>!(0,i.k)(t[e.axis])));r.hi+=Math.max(0,a)}return r}if(o._sharedOptions){const t=s[0],i="function"===typeof t.getRange&&t.getRange(e);if(i){const t=a(s,e,n-i),r=a(s,e,n+i);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function j(t,e,n,i,r){const o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let a=0,l=o.length;a{t[s]&&t[s](e[n],r)&&(o.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))})),i&&!a?[]:o}var U={evaluateInteractionItems:j,modes:{index(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?W(t,o,s,r,a):Y(t,o,s,!1,r,a),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=l[0].index,n=t.data[e];n&&!n.skip&&c.push({element:n,datasetIndex:t.index,index:e})})),c):[]},dataset(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?W(t,o,s,r,a):Y(t,o,s,!1,r,a);if(l.length>0){const e=l[0].datasetIndex,n=t.getDatasetMeta(e).data;l=[];for(let t=0;tt.pos===e))}function G(t,e){return t.filter((t=>-1===q.indexOf(t.pos)&&t.box.axis===e))}function Z(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function Q(t){const e=[];let n,i,r,o,s,a;for(n=0,i=(t||[]).length;nt.box.fullSize)),!0),i=Z(X(e,"left"),!0),r=Z(X(e,"right")),o=Z(X(e,"top"),!0),s=Z(X(e,"bottom")),a=G(e,"x"),l=G(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:X(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}function et(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function nt(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function it(t,e,n,r){const{pos:o,box:s}=n,a=t.maxPadding;if(!(0,i.i)(o)){n.size&&(t[o]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?s.height:s.width),n.size=e.size/e.count,t[o]+=n.size}s.getPadding&&nt(a,s.getPadding());const l=Math.max(0,e.outerWidth-et(a,t,"left","right")),c=Math.max(0,e.outerHeight-et(a,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:h}:{same:h,other:u}}function rt(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function ot(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function st(t,e,n,i){const r=[];let o,s,a,l,c,u;for(o=0,s=t.length,c=0;o{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const h=c.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),f=Object.assign({},o);nt(f,(0,i.E)(r));const p=Object.assign({maxPadding:f,w:s,h:a,x:o.left,y:o.top},o),g=K(c.concat(u),d);st(l.fullSize,p,d,g),st(c,p,d,g),st(u,p,d,g)&&st(c,p,d,g),rt(p),lt(l.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,lt(l.rightAndBottom,p,d,g),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},(0,i.F)(l.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class ut{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ht extends ut{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const dt="$chartjs",ft={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pt=t=>null===t||""===t;function gt(t,e){const n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[dt]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",pt(o)){const e=(0,i.J)(t,"width");void 0!==e&&(t.width=e)}if(pt(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,i.J)(t,"height");void 0!==e&&(t.height=e)}return t}const mt=!!i.K&&{passive:!0};function bt(t,e,n){t&&t.addEventListener(e,n,mt)}function xt(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,mt)}function yt(t,e){const n=ft[t.type]||t.type,{x:r,y:o}=(0,i.z)(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==o?o:null}}function vt(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function wt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||vt(n.addedNodes,i),e=e&&!vt(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function kt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||vt(n.removedNodes,i),e=e&&!vt(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const _t=new Map;let Mt=0;function St(){const t=window.devicePixelRatio;t!==Mt&&(Mt=t,_t.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function Tt(t,e){_t.size||window.addEventListener("resize",St),_t.set(t,e)}function Dt(t){_t.delete(t),_t.size||window.removeEventListener("resize",St)}function Ct(t,e,n){const r=t.canvas,o=r&&(0,i.I)(r);if(!o)return;const s=(0,i.L)(((t,e)=>{const i=o.clientWidth;n(t,e),i{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)}));return a.observe(o),Tt(t,s),a}function At(t,e,n){n&&n.disconnect(),"resize"===e&&Dt(t)}function Ot(t,e,n){const r=t.canvas,o=(0,i.L)((e=>{null!==t.ctx&&n(yt(e,t))}),t);return bt(r,e,o),o}class Pt extends ut{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(gt(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[dt])return!1;const n=e[dt].initial;["height","width"].forEach((t=>{const r=n[t];(0,i.k)(r)?e.removeAttribute(t):e.setAttribute(t,r)}));const r=n.style||{};return Object.keys(r).forEach((t=>{e.style[t]=r[t]})),e.width=e.width,delete e[dt],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:wt,detach:kt,resize:Ct},o=r[e]||Ot;i[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;const r={attach:At,detach:At,resize:At},o=r[e]||xt;o(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return(0,i.G)(t,e,n,r)}isAttached(t){const e=t&&(0,i.I)(t);return!(!e||!e.isConnected)}}function Et(t){return!(0,i.M)()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ht:Pt}class Rt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return(0,i.x)(this.x)&&(0,i.x)(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function It(t,e){const n=t.options.ticks,r=Lt(t),o=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?Nt(e):[],a=s.length,l=s[0],c=s[a-1],u=[];if(a>o)return Ft(e,u,s,a/o),u;const h=zt(s,e,o);if(a>0){let t,n;const r=a>1?Math.round((c-l)/(a-1)):null;for(jt(e,u,h,(0,i.k)(r)?0:l-r,l),t=0,n=a-1;to)return t}return Math.max(o,1)}function Nt(t){const e=[];let n,i;for(n=0,i=t.length;n"left"===t?"right":"right"===t?"left":t,$t=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,Bt=(t,e)=>Math.min(e||t,t);function Yt(t,e){const n=[],i=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Ut(t,e){(0,i.F)(t,(t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;rr?r:n,r=o&&n>r?n:r,{min:(0,i.O)(n,(0,i.O)(r,n)),max:(0,i.O)(r,(0,i.O)(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){const e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,i.Q)(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,i.R)(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,f=(0,i.S)(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/n:f/(n-1),h+6>s&&(s=f/(n-(t.offset?.5:1)),a=this.maxHeight-qt(t.grid)-e.padding-Xt(t.title,this.chart.options.font),l=Math.sqrt(h*h+d*d),c=(0,i.U)(Math.min(Math.asin((0,i.S)((u.highest.height+6)/s,-1,1)),Math.asin((0,i.S)(a/l,-1,1))-Math.asin((0,i.S)(d/l,-1,1)))),c=Math.max(r,Math.min(o,c))),this.labelRotation=c}afterCalculateLabelRotation(){(0,i.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,i.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=Xt(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=qt(o)+s):(t.height=this.maxHeight,t.width=qt(o)+s),n.display&&this.ticks.length){const{first:e,last:r,widest:o,highest:s}=this._getLabelSizes(),l=2*n.padding,c=(0,i.t)(this.labelRotation),u=Math.cos(c),h=Math.sin(c);if(a){const e=n.mirror?0:h*o.width+u*s.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=n.mirror?0:u*o.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,r,h,u)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;a?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===r?h=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+o,this.paddingBottom=i+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,i.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e({width:s[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(_),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,i.W)(this._alignToPixels?(0,i.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*r?a/n:l/r:l*r0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),u=this.ticks,h=u.length+(l?1:0),d=qt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(t){return(0,i.X)(n,t,g)};let x,y,v,w,k,_,M,S,T,D,C,A;if("top"===s)x=b(this.bottom),_=this.bottom-d,S=x-m,D=b(t.top)+m,A=t.bottom;else if("bottom"===s)x=b(this.top),D=t.top,A=b(t.bottom)-m,_=x+m,S=this.top+d;else if("left"===s)x=b(this.right),k=this.right-d,M=x-m,T=b(t.left)+m,C=t.right;else if("right"===s)x=b(this.left),T=t.left,C=b(t.right)-m,k=x+m,M=this.left+d;else if("x"===e){if("center"===s)x=b((t.top+t.bottom)/2+.5);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];x=b(this.chart.scales[t].getPixelForValue(e))}D=t.top,A=t.bottom,_=x+m,S=_+d}else if("y"===e){if("center"===s)x=b((t.left+t.right)/2);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];x=b(this.chart.scales[t].getPixelForValue(e))}k=x-m,M=k-d,T=t.left,C=t.right}const O=(0,i.v)(r.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/O));for(y=0;y0&&(s-=r/2);break}d={left:s,top:o,width:r+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:v,font:S,textOffset:C,options:{rotation:g,color:n,strokeColor:l,strokeWidth:u,textAlign:f,textBaseline:A,translation:[w,k],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options,n=-(0,i.t)(this.labelRotation);if(n)return"top"===t?"left":"right";let r="center";return"start"===e.align?r="left":"end"===e.align?r="right":"inner"===e.align&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,o=this._getLabelSizes(),s=t+r,a=o.widest.width;let l,c;return"left"===e?i?(c=this.right+r,"near"===n?l="left":"center"===n?(l="center",c+=a/2):(l="right",c+=a)):(c=this.right-s,"near"===n?l="right":"center"===n?(l="center",c-=a/2):(l="left",c=this.left)):"right"===e?i?(c=this.left+r,"near"===n?l="right":"center"===n?(l="center",c-=a/2):(l="left",c-=a)):(c=this.left+s,"near"===n?l="left":"center"===n?(l="center",c+=a/2):(l="right",c=this.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks,i=n.findIndex((e=>e.value===t));if(i>=0){const t=e.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,o=i.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,o;for(r=0,o=e.length;r{const r=n.split("."),o=r.pop(),s=[t].concat(r).join("."),a=e[n].split("."),l=a.pop(),c=a.join(".");i.d.route(s,o,c,l)}))}function ie(t){return"id"in t&&"defaults"in t}class re{constructor(){this.controllers=new te(P,"datasets",!0),this.elements=new te(Rt,"elements"),this.plugins=new te(Object,"plugins"),this.scales=new te(Kt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):(0,i.F)(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const r=(0,i.a5)(t);(0,i.Q)(n["before"+r],[],n),e[t](n),(0,i.Q)(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function ae(t){const e={},n=[],i=Object.keys(oe.plugins.items);for(let o=0;o1&&pe(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function be(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function xe(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(n.length)return be(t,"x",n[0])||be(t,"y",n[0])}return{}}function ye(t,e){const n=i.a3[t.type]||{scales:{}},r=e.scales||{},o=he(t.type,e),s=Object.create(null);return Object.keys(r).forEach((e=>{const a=r[e];if(!(0,i.i)(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=me(e,a,xe(e,t),i.d.scales[a.type]),c=fe(l,o),u=n.scales||{};s[e]=(0,i.ab)(Object.create(null),[{axis:l},a,u[l],u[c]])})),t.data.datasets.forEach((n=>{const o=n.type||t.type,a=n.indexAxis||he(o,e),l=i.a3[o]||{},c=l.scales||{};Object.keys(c).forEach((t=>{const e=de(t,a),o=n[e+"AxisID"]||e;s[o]=s[o]||Object.create(null),(0,i.ab)(s[o],[{axis:e},r[o],c[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];(0,i.ab)(e,[i.d.scales[e.type],i.d.scale])})),s}function ve(t){const e=t.options||(t.options={});e.plugins=(0,i.v)(e.plugins,{}),e.scales=ye(t,e)}function we(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function ke(t){return t=t||{},t.data=we(t.data),ve(t),t}const _e=new Map,Me=new Set;function Se(t,e){let n=_e.get(t);return n||(n=e(),_e.set(t,n),Me.add(n)),n}const Te=(t,e,n)=>{const r=(0,i.f)(e,n);void 0!==r&&t.add(r)};class De{constructor(t){this._config=ke(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=we(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ve(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Se(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Se(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Se(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id,n=this.type;return Se(`${n}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:r,type:o}=this,s=this._cachedScopes(t,n),a=s.get(e);if(a)return a;const l=new Set;e.forEach((e=>{t&&(l.add(t),e.forEach((e=>Te(l,t,e)))),e.forEach((t=>Te(l,r,t))),e.forEach((t=>Te(l,i.a3[o]||{},t))),e.forEach((t=>Te(l,i.d,t))),e.forEach((t=>Te(l,i.a6,t)))}));const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),Me.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,i.a3[e]||{},i.d.datasets[e]||{},{type:e},i.d,i.a6]}resolveNamedOptions(t,e,n,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Ce(this._resolverCache,t,r);let l=s;if(Oe(s,e)){o.$shared=!1,n=(0,i.a7)(n)?n():n;const e=this.createResolver(t,n,a);l=(0,i.a8)(s,n,e)}for(const i of e)o[i]=l[i];return o}createResolver(t,e,n=[""],r){const{resolver:o}=Ce(this._resolverCache,t,n);return(0,i.i)(e)?(0,i.a8)(o,e,void 0,r):o}}function Ce(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=n.join();let s=r.get(o);if(!s){const t=(0,i.a9)(e,n);s={resolver:t,subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},r.set(o,s)}return s}const Ae=t=>(0,i.i)(t)&&Object.getOwnPropertyNames(t).some((e=>(0,i.a7)(t[e])));function Oe(t,e){const{isScriptable:n,isIndexable:r}=(0,i.aa)(t);for(const o of e){const e=n(o),s=r(o),a=(s||e)&&t[o];if(e&&((0,i.a7)(a)||Ae(a))||s&&(0,i.b)(a))return!0}return!1}var Pe="4.5.1";const Ee=["top","bottom","left","right","chartArea"];function Re(t,e){return"top"===t||"bottom"===t||-1===Ee.indexOf(t)&&"x"===e}function Ie(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Le(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),(0,i.Q)(n&&n.onComplete,[t],e)}function ze(t){const e=t.chart,n=e.options.animation;(0,i.Q)(n&&n.onProgress,[t],e)}function Ne(t){return(0,i.M)()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Fe={},je=t=>{const e=Ne(t);return Object.values(Fe).filter((t=>t.canvas===e)).pop()};function He(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const o=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=o)}}}function We(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}class $e{static defaults=i.d;static instances=Fe;static overrides=i.a3;static registry=oe;static version=Pe;static getChart=je;static register(...t){oe.add(...t),Be()}static unregister(...t){oe.remove(...t),Be()}constructor(t,e){const n=this.config=new De(e),r=Ne(t),s=je(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Et(r)),this.platform.updateConfig(n);const l=this.platform.acquireContext(r,a.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;this.id=(0,i.ac)(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new se,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,i.ad)((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],Fe[this.id]=this,l&&c?(o.listen(this,"complete",Le),o.listen(this,"progress",ze),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:o}=this;return(0,i.k)(t)?e&&o?o:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return oe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,i.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,i.af)(this.canvas,this.ctx),this}stop(){return o.stop(this),this}resize(t,e){o.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,(0,i.ae)(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),(0,i.Q)(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options,e=t.scales||{};(0,i.F)(e,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const n=e[t],i=me(t,n),r="r"===i,o="x"===i;return{options:n,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),(0,i.F)(o,(e=>{const o=e.options,s=o.id,a=me(s,o),l=(0,i.v)(o.type,e.dtype);void 0!==o.position&&Re(o.position,a)===Re(e.dposition)||(o.position=e.dposition),r[s]=!0;let c=null;if(s in n&&n[s].type===l)c=n[s];else{const t=oe.getScale(l);c=new t({id:s,type:l,ctx:this.ctx,chart:this}),n[c.id]=c}c.init(o,t)})),(0,i.F)(r,((t,e)=>{t||delete n[e]})),(0,i.F)(n,(t=>{ct.configure(this,t,t.options),ct.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let i=0,c=this.data.datasets.length;i{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ie("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){(0,i.F)(this.scales,(t=>{ct.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(0,i.ag)(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e){const e="_removeElements"===n?-r:r;He(t,i,e)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),r=n(0);for(let o=1;ot.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ct.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],(0,i.F)(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=(0,i.ah)(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&(0,i.Y)(e,r),t.controller.draw(),r&&(0,i.$)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,i.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=U.modes[e];return"function"===typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=(0,i.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"===typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);(0,i.h)(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(o,{visible:n}),this.update((e=>e.datasetIndex===t?r:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),o.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,n,i),t[n]=i},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};(0,i.F)(this.options.events,(t=>n(t,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",r),n("detach",o)};o=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){(0,i.F)(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},(0,i.F)(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),s=0,a=t.length;s{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),r=!(0,i.ai)(n,e);r&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=n?t:r(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,n,s),l=(0,i.aj)(t),c=We(t,this._lastEvent,n,l);n&&(this._lastEvent=null,(0,i.Q)(o.onHover,[t,a,this],this),l&&(0,i.Q)(o.onClick,[t,a,this],this));const u=!(0,i.ai)(a,r);return(u||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function Be(){return(0,i.F)($e.instances,(t=>t._plugins.invalidate()))}function Ye(t,e,n=e){t.lineCap=(0,i.v)(n.borderCapStyle,e.borderCapStyle),t.setLineDash((0,i.v)(n.borderDash,e.borderDash)),t.lineDashOffset=(0,i.v)(n.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,i.v)(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,i.v)(n.borderWidth,e.borderWidth),t.strokeStyle=(0,i.v)(n.borderColor,e.borderColor)}function Ve(t,e,n){t.lineTo(n.x,n.y)}function Ue(t){return t.stepped?i.at:t.tension||"monotone"===t.cubicInterpolationMode?i.au:Ve}function qe(t,e,n={}){const i=t.length,{start:r=0,end:o=i-1}=n,{start:s,end:a}=e,l=Math.max(r,s),c=Math.min(o,a),u=ra&&o>a;return{count:i,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(h=r[x(0)],t.moveTo(h.x,h.y)),u=0;u<=a;++u){if(h=r[x(u)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===d?(np&&(p=n),m=(b*m+e)/++b):(y(),t.lineTo(e,n),d=i,b=0,f=p=n),g=n}y()}function Ze(t){const e=t.options,n=e.borderDash&&e.borderDash.length,i=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!n;return i?Ge:Xe}function Qe(t){return t.stepped?i.aq:t.tension||"monotone"===t.cubicInterpolationMode?i.ar:i.as}function Je(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),Ye(t,e.options),t.stroke(r)}function Ke(t,e,n,i){const{segments:r,options:o}=e,s=Ze(e);for(const a of r)Ye(t,o,a.style),t.beginPath(),s(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const tn="function"===typeof Path2D;function en(t,e,n,i){tn&&!e.options.segment?Je(t,e,n,i):Ke(t,e,n,i)}class nn extends Rt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;(0,i.an)(this._points,n,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,i.ao)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],o=this.points,s=(0,i.ap)(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],l=Qe(n);let c,u;for(c=0,u=s.length;c{e=cn(t,e,r);const s=r[t],a=r[e];null!==i?(o.push({x:s.x,y:i}),o.push({x:a.x,y:i})):null!==n&&(o.push({x:n,y:s.y}),o.push({x:n,y:a.y}))})),o}function cn(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function un(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function hn(t,e){let n=[],r=!1;return(0,i.b)(t)?(r=!0,n=t):n=ln(t,e),n.length?new nn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function dn(t){return t&&!1!==t.fill}function fn(t,e,n){const r=t[e];let o=r.fill;const s=[e];let a;if(!n)return o;while(!1!==o&&-1===s.indexOf(o)){if(!(0,i.g)(o))return o;if(a=t[o],!a)return!1;if(a.visible)return o;s.push(o),o=a.fill}return!1}function pn(t,e,n){const r=xn(t);if((0,i.i)(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return(0,i.g)(o)&&Math.floor(o)===o?gn(r[0],e,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function gn(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}function mn(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:(0,i.i)(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function bn(t,e,n){let r;return r="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:(0,i.i)(t)?t.value:e.getBaseValue(),r}function xn(t){const e=t.options,n=e.fill;let r=(0,i.v)(n&&n.target,n);return void 0===r&&(r=!!e.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}function yn(t){const{scale:e,index:n,line:i}=t,r=[],o=i.segments,s=i.points,a=vn(e,n);a.push(hn({x:null,y:e.bottom},i));for(let l=0;l=0;--s){const e=r[s].$filler;e&&(e.line.updateControlPoints(o,e.axis),i&&e.fill&&An(t.ctx,e,o))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const e=i[r].$filler;dn(e)&&An(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;dn(i)&&"beforeDatasetDraw"===n.drawTime&&An(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Nn=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},Fn=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class jn extends Rt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=(0,i.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,r=(0,i.a0)(n.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Nn(n,o);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+s;let u=t;r.textAlign="left",r.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=n+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(u+=c,l[l.length-(f>0?0:1)]=0,d+=c,h++),a[f]={left:0,top:d,row:h,width:p,height:i},l[l.length-1]+=p+s})),u}_fitCols(t,e,n,i){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let u=s,h=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:m}=Hn(n,e,r,t,i);o>0&&d+m+2*s>c&&(u+=h+s,l.push({width:h,height:d}),f+=h+s,p++,h=d=0),a[o]={left:f,top:d,col:p,width:g,height:m},h=Math.max(h,g),d+=m+s})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:o}}=this,s=(0,i.aA)(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+r}else{let o=0,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,i.Y)(t,this),this._draw(),(0,i.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:o,labels:s}=t,a=i.d.color,l=(0,i.aA)(t.rtl,this.left,this.width),c=(0,i.a0)(s.font),{padding:u}=s,h=c.size,d=h/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Nn(s,h),b=function(t,e,n){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;r.save();const o=(0,i.v)(n.lineWidth,1);if(r.fillStyle=(0,i.v)(n.fillStyle,a),r.lineCap=(0,i.v)(n.lineCap,"butt"),r.lineDashOffset=(0,i.v)(n.lineDashOffset,0),r.lineJoin=(0,i.v)(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=(0,i.v)(n.strokeStyle,a),r.setLineDash((0,i.v)(n.lineDash,[])),s.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},c=l.xPlus(t,p/2),u=e+d;(0,i.aE)(r,a,c,u,s.pointStyleWidth&&p)}else{const s=e+Math.max((h-g)/2,0),a=l.leftForLtr(t,p),c=(0,i.ay)(n.borderRadius);r.beginPath(),Object.values(c).some((t=>0!==t))?(0,i.aw)(r,{x:a,y:s,w:p,h:g,radius:c}):r.rect(a,s,p,g),r.fill(),0!==o&&r.stroke()}r.restore()},x=function(t,e,n){(0,i.Z)(r,n.text,t,e+m/2,c,{strikethrough:n.hidden,textAlign:l.textAlign(n.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();f=y?{x:(0,i.a2)(o,this.left+u,this.right-n[0]),y:this.top+u+v,line:0}:{x:this.left+u,y:(0,i.a2)(o,this.top+v+u,this.bottom-e[0].height),line:0},(0,i.aB)(this.ctx,t.textDirection);const w=m+u;this.legendItems.forEach(((a,h)=>{r.strokeStyle=a.fontColor,r.fillStyle=a.fontColor;const g=r.measureText(a.text).width,m=l.textAlign(a.textAlign||(a.textAlign=s.textAlign)),k=p+d+g;let _=f.x,M=f.y;l.setWidth(this.width),y?h>0&&_+k+u>this.right&&(M=f.y+=w,f.line++,_=f.x=(0,i.a2)(o,this.left+u,this.right-n[f.line])):h>0&&M+w>this.bottom&&(_=f.x=_+e[f.line].width+u,f.line++,M=f.y=(0,i.a2)(o,this.top+v+u,this.bottom-e[f.line].height));const S=l.x(_);if(b(S,M,a),_=(0,i.aC)(m,_+p+d,y?_+k:this.right,t.rtl),x(l.x(_),M,a),y)f.x+=k+u;else if("string"!==typeof a.text){const t=c.lineHeight;f.y+=Bn(a,t)+u}else f.y+=w})),(0,i.aD)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=(0,i.a0)(e.font),r=(0,i.E)(e.padding);if(!e.display)return;const o=(0,i.aA)(t.rtl,this.left,this.width),s=this.ctx,a=e.position,l=n.size/2,c=r.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,h=(0,i.a2)(t.align,h,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=c+(0,i.a2)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=(0,i.a2)(a,h,h+d);s.textAlign=o.textAlign((0,i.a1)(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,(0,i.Z)(s,e.text,f,u,n)}_computeTitleHeight(){const t=this.options.title,e=(0,i.a0)(t.font),n=(0,i.E)(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,o;if((0,i.ak)(t,this.left,this.right)&&(0,i.ak)(e,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;nt.length>e.length?t:e))),e+n.size/2+i.measureText(r).width}function $n(t,e,n){let i=t;return"string"!==typeof e.text&&(i=Bn(e,n)),i}function Bn(t,e){const n=t.text?t.text.length:0;return e*n}function Yn(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}var Vn={id:"legend",_element:jn,start(t,e,n){const i=t.legend=new jn({ctx:t.ctx,options:n,chart:t});ct.configure(t,i,n),ct.addBox(t,i)},stop(t){ct.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;ct.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const c=t.controller.getStyle(n?0:void 0),u=(0,i.E)(c.borderWidth);return{text:e[t.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Un extends Rt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=(0,i.b)(n.text)?n.text.length:1;this._padding=(0,i.E)(n.padding);const o=r*(0,i.a0)(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:r,right:o,options:s}=this,a=s.align;let l,c,u,h=0;return this.isHorizontal()?(c=(0,i.a2)(a,n,o),u=e+t,l=o-n):("left"===s.position?(c=n+t,u=(0,i.a2)(a,r,e),h=-.5*i.P):(c=o-t,u=(0,i.a2)(a,e,r),h=.5*i.P),l=r-e),{titleX:c,titleY:u,maxWidth:l,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=(0,i.a0)(e.font),r=n.lineHeight,o=r/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);(0,i.Z)(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:(0,i.a1)(e.align),textBaseline:"middle",translation:[s,a]})}}function qn(t,e){const n=new Un({ctx:t.ctx,options:e,chart:t});ct.configure(t,n,e),ct.addBox(t,n),t.titleBlock=n}var Xn={id:"title",_element:Un,start(t,e,n){qn(t,n)},stop(t){const e=t.titleBlock;ct.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;ct.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const Gn={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,o=0;for(e=0,n=t.length;et+e))/i.size;return{x:s,y:r/o}},nearest(t,e){if(!t.length)return!1;let n,r,o,s=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n-1?t.split("\n"):t}function Jn(t,e){const{element:n,datasetIndex:i,index:r}=e,o=t.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Kn(t,e){const n=t.chart.ctx,{body:r,footer:o,title:s}=t,{boxWidth:a,boxHeight:l}=e,c=(0,i.a0)(e.bodyFont),u=(0,i.a0)(e.titleFont),h=(0,i.a0)(e.footerFont),d=s.length,f=o.length,p=r.length,g=(0,i.E)(e.padding);let m=g.height,b=0,x=r.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){const t=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;m+=p*t+(x-p)*c.lineHeight+(x-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);let y=0;const v=function(t){b=Math.max(b,n.measureText(t).width+y)};return n.save(),n.font=u.string,(0,i.F)(t.title,v),n.font=c.string,(0,i.F)(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?a+2+e.boxPadding:0,(0,i.F)(r,(t=>{(0,i.F)(t.before,v),(0,i.F)(t.lines,v),(0,i.F)(t.after,v)})),y=0,n.font=h.string,(0,i.F)(t.footer,v),n.restore(),b+=g.width,{width:b,height:m}}function ti(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function ei(t,e,n,i){const{x:r,width:o}=i,s=n.caretSize+n.caretPadding;return"left"===t&&r+o+s>e.width||("right"===t&&r-o-s<0||void 0)}function ni(t,e,n,i){const{x:r,width:o}=n,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),ei(c,t,e,n)&&(c="center"),c}function ii(t,e,n){const i=n.yAlign||e.yAlign||ti(t,n);return{xAlign:n.xAlign||e.xAlign||ni(t,e,n,i),yAlign:i}}function ri(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}function oi(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}function si(t,e,n,r){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:c}=n,u=o+s,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:p}=(0,i.ay)(a);let g=ri(e,l);const m=oi(e,c,u);return"center"===c?"left"===l?g+=u:"right"===l&&(g-=u):"left"===l?g-=Math.max(h,f)+o:"right"===l&&(g+=Math.max(d,p)+o),{x:(0,i.S)(g,0,r.width-e.width),y:(0,i.S)(m,0,r.height-e.height)}}function ai(t,e,n){const r=(0,i.E)(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function li(t){return Zn([],Qn(t))}function ci(t,e,n){return(0,i.j)(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ui(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const hi={beforeTitle:i.aG,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex{const e={before:[],lines:[],after:[]},i=ui(n,t);Zn(e.before,Qn(di(i,"beforeLabel",this,t))),Zn(e.lines,di(i,"label",this,t)),Zn(e.after,Qn(di(i,"afterLabel",this,t))),r.push(e)})),r}getAfterBody(t,e){return li(di(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=di(n,"beforeFooter",this,t),r=di(n,"footer",this,t),o=di(n,"afterFooter",this,t);let s=[];return s=Zn(s,Qn(i)),s=Zn(s,Qn(r)),s=Zn(s,Qn(o)),s}_createItems(t){const e=this._active,n=this.chart.data,r=[],o=[],s=[];let a,l,c=[];for(a=0,l=e.length;at.filter(e,i,r,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),(0,i.F)(c,(e=>{const n=ui(t.callbacks,e);r.push(di(n,"labelColor",this,e)),o.push(di(n,"labelPointStyle",this,e)),s.push(di(n,"labelTextColor",this,e))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,o=[];if(i.length){const t=Gn[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=Kn(this,n),s=Object.assign({},t,e),a=ii(this.chart,n,s),l=si(n,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=(0,i.ay)(a),{x:d,y:f}=t,{width:p,height:g}=e;let m,b,x,y,v,w;return"center"===o?(v=f+g/2,"left"===r?(m=d,b=m-s,y=v+s,w=v-s):(m=d+p,b=m+s,y=v-s,w=v+s),x=m):(b="left"===r?d+Math.max(l,u)+s:"right"===r?d+p-Math.max(c,h)-s:this.caretX,"top"===o?(y=f,v=y-s,m=b-s,x=b+s):(y=f+g,v=y+s,m=b+s,x=b-s),w=y),{x1:m,x2:b,x3:x,y1:y,y2:v,y3:w}}drawTitle(t,e,n){const r=this.title,o=r.length;let s,a,l;if(o){const c=(0,i.aA)(n.rtl,this.x,this.width);for(t.x=ai(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",s=(0,i.a0)(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,l=0;l0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,i.aw)(t,{x:e,y:p,w:c,h:l,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),(0,i.aw)(t,{x:n,y:p+1,w:c-2,h:l-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(n,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,h=(0,i.a0)(n.bodyFont);let d=h.lineHeight,f=0;const p=(0,i.aA)(n.rtl,this.x,this.width),g=function(n){e.fillText(n,p.x(t.x+f),t.y+d/2),t.y+=d+o},m=p.textAlign(s);let b,x,y,v,w,k,_;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=ai(this,m,n),e.fillStyle=n.bodyColor,(0,i.F)(this.beforeBody,g),f=a&&"right"!==m?"center"===s?c/2+u:c+2+u:0,v=0,k=r.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Gn[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=Kn(this,t),s=Object.assign({},n,this._size),a=ii(e,t,s),l=si(t,s,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=(0,i.E)(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,r,e),(0,i.aB)(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,i.aD)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),o=!(0,i.ai)(n,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,n),a=this._positionChanged(s,t),l=e||!(0,i.ai)(s,o)||a;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,o=Gn[r.position].call(this,t,e);return!1!==o&&(n!==o.x||i!==o.y)}}var pi={id:"tooltip",_element:fi,positioners:Gn,afterInit(t,e,n){n&&(t.tooltip=new fi({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:hi},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const gi=(t,e,n,i)=>("string"===typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function mi(t,e,n,i){const r=t.indexOf(e);if(-1===r)return gi(t,e,n,i);const o=t.lastIndexOf(e);return r!==o?n:r}const bi=(t,e)=>null===t?null:(0,i.S)(Math.round(t),0,e);function xi(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function vi(t,e){const n=[],r=1e-14,{bounds:o,step:s,min:a,max:l,precision:c,count:u,maxTicks:h,maxDigits:d,includeBounds:f}=t,p=s||1,g=h-1,{min:m,max:b}=e,x=!(0,i.k)(a),y=!(0,i.k)(l),v=!(0,i.k)(u),w=(b-m)/(d+1);let k,_,M,S,T=(0,i.aI)((b-m)/g/p)*p;if(Tg&&(T=(0,i.aI)(S*T/g/p)*p),(0,i.k)(c)||(k=Math.pow(10,c),T=Math.ceil(T*k)/k),"ticks"===o?(_=Math.floor(m/T)*T,M=Math.ceil(b/T)*T):(_=m,M=b),x&&y&&s&&(0,i.aJ)((l-a)/s,T/1e3)?(S=Math.round(Math.min((l-a)/T,h)),T=(l-a)/S,_=a,M=l):v?(_=x?a:_,M=y?l:M,S=u-1,T=(M-_)/S):(S=(M-_)/T,S=(0,i.aK)(S,Math.round(S),T/1e3)?Math.round(S):Math.ceil(S));const D=Math.max((0,i.aL)(T),(0,i.aL)(_));k=Math.pow(10,(0,i.k)(c)?D:c),_=Math.round(_*k)/k,M=Math.round(M*k)/k;let C=0;for(x&&(f&&_!==a?(n.push({value:a}),_l)break;n.push({value:t})}return y&&f&&M!==l?n.length&&(0,i.aK)(n[n.length-1].value,l,wi(l,w,t))?n[n.length-1].value=l:n.push({value:l}):y&&M!==l||n.push({value:M}),n}function wi(t,e,{horizontal:n,minRotation:r}){const o=(0,i.t)(r),s=(n?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class ki extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,i.k)(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const s=t=>r=e?r:t,a=t=>o=n?o:t;if(t){const t=(0,i.s)(r),e=(0,i.s)(o);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(r===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||s(r-e)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},o=this._range||this,s=vi(r,o);return"ticks"===t.bounds&&(0,i.aH)(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}}class _i extends ki{static id="linear";static defaults={ticks:{callback:i.aM.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?t:0,this.max=(0,i.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=(0,i.t)(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}i.aM.formatters.logarithmic;i.aM.formatters.numeric;const Mi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Si=Object.keys(Mi);function Ti(t,e){return t-e}function Di(t,e){if((0,i.k)(e))return null;const n=t._adapter,{parser:r,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"===typeof r&&(a=r(a)),(0,i.g)(a)||(a="string"===typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!(0,i.x)(s)&&!0!==s?n.startOf(a,o):n.startOf(a,"isoWeek",s)),+a)}function Ci(t,e,n,i){const r=Si.length;for(let o=Si.indexOf(t);o=Si.indexOf(n);o--){const n=Si[o];if(Mi[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return Si[n?Si.indexOf(n):0]}function Oi(t){for(let e=Si.indexOf(t)+1,n=Si.length;e=e?n[r]:n[o];t[s]=!0}}else t[e]=!0}function Ei(t,e,n,i){const r=t._adapter,o=+r.startOf(e[0].value,i),s=e[e.length-1].value;let a,l;for(a=o;a<=s;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function Ri(t,e,n){const i=[],r={},o=e.length;let s,a;for(s=0;s+t.value)))}initOffsets(t=[]){let e,n,r=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),r=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),o=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;r=(0,i.S)(r,0,s),o=(0,i.S)(o,0,s),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const t=this._adapter,e=this.min,n=this.max,r=this.options,o=r.time,s=o.unit||Ci(o.minUnit,e,n,this._getLabelCapacity(e)),a=(0,i.v)(r.ticks.stepSize,1),l="week"===s&&o.isoWeekday,c=(0,i.x)(l)||!0===l,u={};let h,d,f=e;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":s),t.diff(n,e,s)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+s);const p="data"===r.ticks.source&&this.getDataTimestamps();for(h=f,d=0;h+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options,i=n.time.displayFormats,r=this._unit,o=e||i[r];return this._adapter.format(t,o)}_tickFormatFunction(t,e,n,r){const o=this.options,s=o.ticks.callback;if(s)return(0,i.Q)(s,[t,e,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],h=c&&a[c],d=n[e],f=c&&h&&d&&d.major;return this._adapter.format(t,r||(f?h:u))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e0?s:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;ti({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=i.r.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var o=new r;const s="transparent",a={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=(0,i.c)(t||s),o=r.valid&&(0,i.c)(e||s);return o&&o.valid?o.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class l{constructor(t,e,n,r){const o=e[n];r=(0,i.a)([t.to,r,o,t.from]);const s=(0,i.a)([t.from,o,r]);this._active=!0,this._fn=t.fn||a[t.type||typeof s],this._easing=i.e[t.easing]||i.e.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const r=this._target[this._prop],o=n-this._start,s=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=(0,i.a)([t.to,e,r,t.from]),this._from=(0,i.a)([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let i=0;i{const o=t[r];if(!(0,i.i)(o))return;const s={};for(const t of e)s[t]=o[t];((0,i.b)(o.properties)&&o.properties||[r]).forEach((t=>{t!==r&&n.has(t)||n.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=h(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&u(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if("$"===c.charAt(0))continue;if("options"===c){i.push(...this._animateOptions(t,e));continue}const u=e[c];let h=r[c];const d=n.get(c);if(h){if(d&&h.active()){h.update(d,u,s);continue}h.cancel()}d&&d.duration?(r[c]=h=new l(d,t,c,u),i.push(h)):t[c]=u}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(o.add(this._chart,n),!0):void 0}}function u(t,e){const n=[],i=Object.keys(e);for(let r=0;r0||!n&&e<0)return r.index}return null}function _(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=i,l=o.axis,c=s.axis,u=x(o,s,i),h=e.length;let d;for(let f=0;fn[t].axis===e)).shift()}function S(t,e){return(0,i.j)(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function T(t,e,n){return(0,i.j)(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function D(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const C=t=>"reset"===t||"none"===t,A=(t,e)=>e?t:Object.assign({},t),O=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:g(n,!0),values:null};class P{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=y(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&D(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),r=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,o=e.xAxisID=(0,i.v)(n.xAxisID,M(t,"x")),s=e.yAxisID=(0,i.v)(n.yAxisID,M(t,"y")),a=e.rAxisID=(0,i.v)(n.rAxisID,M(t,"r")),l=e.indexAxis,c=e.iAxisID=r(l,o,s,a),u=e.vAxisID=r(l,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&(0,i.u)(this._data,this),t._stacked&&D(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if((0,i.i)(e)){const t=this._cachedMeta;this._data=b(e,t)}else if(n!==e){if(n){(0,i.u)(n,this);const t=this._cachedMeta;D(t),t._parsed=[]}e&&Object.isExtensible(e)&&(0,i.l)(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=y(e.vScale,e),e.stack!==n.stack&&(i=!0,D(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&(_(this,e._parsed),e._stacked=y(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:r}=this,{iScale:o,_stacked:s}=n,a=o.axis;let l,c,u,h=0===t&&e===r.length||n._sorted,d=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=r,n._sorted=!0,u=r;else{u=(0,i.b)(r[t])?this.parseArrayData(n,r,t,e):(0,i.i)(r[t])?this.parseObjectData(n,r,t,e):this.parsePrimitiveData(n,r,t,e);const o=()=>null===c[a]||d&&c[a]e||h=0;--d)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let r,o,s;for(r=0,o=e.length;r=0&&tthis.getContext(n,r,e),g=c.resolveNamedOptions(d,f,p,h);return g.$shared&&(g.$shared=l,o[s]=Object.freeze(A(g,l))),g}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),o=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(o,this.getContext(t,n,e))}const l=new c(i,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||C(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),o=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:o}}updateElement(t,e,n,i){C(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!C(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[s,a,l]of this._syncList)this[s](a,l);this._syncList=[];const i=n.length,r=e.length,o=Math.min(r,i);o&&this.parse(0,o),r>i?this._insertElements(i,r-i,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s(0,i.p)(t,l,c,!0)?1:Math.max(e,e*n,r,r*n),g=(t,e,r)=>(0,i.p)(t,l,c,!0)?-1:Math.min(e,e*n,r,r*n),m=p(0,u,d),b=p(i.H,h,f),y=g(i.P,u,d),x=g(i.P+i.H,h,f);r=(m-y)/2,o=(b-x)/2,s=-(m+y)/2,a=-(b+x)/2}return{ratioX:r,ratioY:o,offsetX:s,offsetY:a}}class R extends P{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:n,textAlign:i,color:r,useBorderRadius:o,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,a)=>{const l=t.getDatasetMeta(0),c=l.controller.getStyle(a);return{text:e,fillStyle:c.backgroundColor,fontColor:r,hidden:!t.getDataVisibility(a),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:i,pointStyle:n,borderRadius:o&&(s||c.borderRadius),index:a}})):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{let o,s,a=t=>+n[t];if((0,i.i)(n[t])){const{key:t="value"}=this._parsing;a=e=>+(0,i.f)(n[e],t)}for(o=t,s=t+e;o0&&!isNaN(t)?i.T*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,r=n.data.labels||[],o=(0,i.o)(e._parsed[t],n.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,o,s,a;if(!t)for(i=0,r=n.data.datasets.length;i0&&this.getParsed(e-1);for(let w=0;w=y){p.skip=!0;continue}const x=this.getParsed(w),k=(0,i.k)(x[f]),_=p[d]=s.getPixelForValue(x[d],w),M=p[f]=o||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,x,l):x[f],w);p.skip=isNaN(_)||isNaN(M)||k,p.stop=w>0&&Math.abs(x[d]-v[d])>m,g&&(p.parsed=x,p.raw=c.data[w]),h&&(p.options=u||this.resolveDataElementOptions(w,n.active?"active":r)),b||this.updateElement(n,w,p,r),v=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function L(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class z{static override(t){Object.assign(z.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return L()}parse(){return L()}format(){return L()}add(){return L()}diff(){return L()}startOf(){return L()}endOf(){return L()}}var N={_date:z};function F(t,e,n,r){const{controller:o,data:s,_sorted:a}=t,l=o._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(l&&e===l.axis&&"r"!==e&&a&&s.length){const a=l._reversePixels?i.A:i.B;if(!r){const r=a(s,e,n);if(c){const{vScale:e}=o._cachedMeta,{_parsed:n}=t,s=n.slice(0,r.lo+1).reverse().findIndex((t=>!(0,i.k)(t[e.axis])));r.lo-=Math.max(0,s);const a=n.slice(r.hi).findIndex((t=>!(0,i.k)(t[e.axis])));r.hi+=Math.max(0,a)}return r}if(o._sharedOptions){const t=s[0],i="function"===typeof t.getRange&&t.getRange(e);if(i){const t=a(s,e,n-i),r=a(s,e,n+i);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function j(t,e,n,i,r){const o=t.getSortedVisibleDatasetMetas(),s=n[e];for(let a=0,l=o.length;a{t[s]&&t[s](e[n],r)&&(o.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))})),i&&!a?[]:o}var U={evaluateInteractionItems:j,modes:{index(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"x",a=n.includeInvisible||!1,l=n.intersect?W(t,o,s,r,a):Y(t,o,s,!1,r,a),c=[];return l.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=l[0].index,n=t.data[e];n&&!n.skip&&c.push({element:n,datasetIndex:t.index,index:e})})),c):[]},dataset(t,e,n,r){const o=(0,i.z)(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let l=n.intersect?W(t,o,s,r,a):Y(t,o,s,!1,r,a);if(l.length>0){const e=l[0].datasetIndex,n=t.getDatasetMeta(e).data;l=[];for(let t=0;tt.pos===e))}function G(t,e){return t.filter((t=>-1===q.indexOf(t.pos)&&t.box.axis===e))}function Z(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function Q(t){const e=[];let n,i,r,o,s,a;for(n=0,i=(t||[]).length;nt.box.fullSize)),!0),i=Z(X(e,"left"),!0),r=Z(X(e,"right")),o=Z(X(e,"top"),!0),s=Z(X(e,"bottom")),a=G(e,"x"),l=G(e,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:X(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}function et(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function nt(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function it(t,e,n,r){const{pos:o,box:s}=n,a=t.maxPadding;if(!(0,i.i)(o)){n.size&&(t[o]-=n.size);const e=r[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?s.height:s.width),n.size=e.size/e.count,t[o]+=n.size}s.getPadding&&nt(a,s.getPadding());const l=Math.max(0,e.outerWidth-et(a,t,"left","right")),c=Math.max(0,e.outerHeight-et(a,t,"top","bottom")),u=l!==t.w,h=c!==t.h;return t.w=l,t.h=c,n.horizontal?{same:u,other:h}:{same:h,other:u}}function rt(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function ot(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function st(t,e,n,i){const r=[];let o,s,a,l,c,u;for(o=0,s=t.length,c=0;o{"function"===typeof t.beforeLayout&&t.beforeLayout()}));const h=c.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),f=Object.assign({},o);nt(f,(0,i.E)(r));const p=Object.assign({maxPadding:f,w:s,h:a,x:o.left,y:o.top},o),g=K(c.concat(u),d);st(l.fullSize,p,d,g),st(c,p,d,g),st(u,p,d,g)&&st(c,p,d,g),rt(p),lt(l.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,lt(l.rightAndBottom,p,d,g),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},(0,i.F)(l.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class ut{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ht extends ut{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const dt="$chartjs",ft={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pt=t=>null===t||""===t;function gt(t,e){const n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[dt]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",pt(o)){const e=(0,i.J)(t,"width");void 0!==e&&(t.width=e)}if(pt(r))if(""===t.style.height)t.height=t.width/(e||2);else{const e=(0,i.J)(t,"height");void 0!==e&&(t.height=e)}return t}const mt=!!i.K&&{passive:!0};function bt(t,e,n){t&&t.addEventListener(e,n,mt)}function yt(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,mt)}function xt(t,e){const n=ft[t.type]||t.type,{x:r,y:o}=(0,i.z)(t,e);return{type:n,chart:e,native:t,x:void 0!==r?r:null,y:void 0!==o?o:null}}function vt(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function wt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||vt(n.addedNodes,i),e=e&&!vt(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function kt(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||vt(n.removedNodes,i),e=e&&!vt(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const _t=new Map;let Mt=0;function St(){const t=window.devicePixelRatio;t!==Mt&&(Mt=t,_t.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function Tt(t,e){_t.size||window.addEventListener("resize",St),_t.set(t,e)}function Dt(t){_t.delete(t),_t.size||window.removeEventListener("resize",St)}function Ct(t,e,n){const r=t.canvas,o=r&&(0,i.I)(r);if(!o)return;const s=(0,i.L)(((t,e)=>{const i=o.clientWidth;n(t,e),i{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)}));return a.observe(o),Tt(t,s),a}function At(t,e,n){n&&n.disconnect(),"resize"===e&&Dt(t)}function Ot(t,e,n){const r=t.canvas,o=(0,i.L)((e=>{null!==t.ctx&&n(xt(e,t))}),t);return bt(r,e,o),o}class Pt extends ut{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(gt(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[dt])return!1;const n=e[dt].initial;["height","width"].forEach((t=>{const r=n[t];(0,i.k)(r)?e.removeAttribute(t):e.setAttribute(t,r)}));const r=n.style||{};return Object.keys(r).forEach((t=>{e.style[t]=r[t]})),e.width=e.width,delete e[dt],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:wt,detach:kt,resize:Ct},o=r[e]||Ot;i[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];if(!i)return;const r={attach:At,detach:At,resize:At},o=r[e]||yt;o(t,e,i),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return(0,i.G)(t,e,n,r)}isAttached(t){const e=t&&(0,i.I)(t);return!(!e||!e.isConnected)}}function Et(t){return!(0,i.M)()||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ht:Pt}class Rt{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return(0,i.x)(this.x)&&(0,i.x)(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function It(t,e){const n=t.options.ticks,r=Lt(t),o=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?Nt(e):[],a=s.length,l=s[0],c=s[a-1],u=[];if(a>o)return Ft(e,u,s,a/o),u;const h=zt(s,e,o);if(a>0){let t,n;const r=a>1?Math.round((c-l)/(a-1)):null;for(jt(e,u,h,(0,i.k)(r)?0:l-r,l),t=0,n=a-1;to)return t}return Math.max(o,1)}function Nt(t){const e=[];let n,i;for(n=0,i=t.length;n"left"===t?"right":"right"===t?"left":t,$t=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,Bt=(t,e)=>Math.min(e||t,t);function Yt(t,e){const n=[],i=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Ut(t,e){(0,i.F)(t,(t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;rr?r:n,r=o&&n>r?n:r,{min:(0,i.O)(n,(0,i.O)(r,n)),max:(0,i.O)(r,(0,i.O)(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){const e=this._labelItems||(this._labelItems=this._computeLabelItems(t));return e}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,i.Q)(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,i.R)(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const u=this._getLabelSizes(),h=u.widest.width,d=u.highest.height,f=(0,i.S)(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/n:f/(n-1),h+6>s&&(s=f/(n-(t.offset?.5:1)),a=this.maxHeight-qt(t.grid)-e.padding-Xt(t.title,this.chart.options.font),l=Math.sqrt(h*h+d*d),c=(0,i.U)(Math.min(Math.asin((0,i.S)((u.highest.height+6)/s,-1,1)),Math.asin((0,i.S)(a/l,-1,1))-Math.asin((0,i.S)(d/l,-1,1)))),c=Math.max(r,Math.min(o,c))),this.labelRotation=c}afterCalculateLabelRotation(){(0,i.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,i.Q)(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=Xt(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=qt(o)+s):(t.height=this.maxHeight,t.width=qt(o)+s),n.display&&this.ticks.length){const{first:e,last:r,widest:o,highest:s}=this._getLabelSizes(),l=2*n.padding,c=(0,i.t)(this.labelRotation),u=Math.cos(c),h=Math.sin(c);if(a){const e=n.mirror?0:h*o.width+u*s.height;t.height=Math.min(this.maxHeight,t.height+e+l)}else{const e=n.mirror?0:u*o.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+l)}this._calculatePadding(e,r,h,u)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;a?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===r?h=e.width:"end"===r?u=t.width:"inner"!==r&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+o,this.paddingBottom=i+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,i.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e({width:s[t]||0,height:a[t]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(_),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return(0,i.W)(this._alignToPixels?(0,i.X)(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*r?a/n:l/r:l*r0}_computeGridLineItems(t){const e=this.axis,n=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),u=this.ticks,h=u.length+(l?1:0),d=qt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(t){return(0,i.X)(n,t,g)};let y,x,v,w,k,_,M,S,T,D,C,A;if("top"===s)y=b(this.bottom),_=this.bottom-d,S=y-m,D=b(t.top)+m,A=t.bottom;else if("bottom"===s)y=b(this.top),D=t.top,A=b(t.bottom)-m,_=y+m,S=this.top+d;else if("left"===s)y=b(this.right),k=this.right-d,M=y-m,T=b(t.left)+m,C=t.right;else if("right"===s)y=b(this.left),T=t.left,C=b(t.right)-m,k=y+m,M=this.left+d;else if("x"===e){if("center"===s)y=b((t.top+t.bottom)/2+.5);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];y=b(this.chart.scales[t].getPixelForValue(e))}D=t.top,A=t.bottom,_=y+m,S=_+d}else if("y"===e){if("center"===s)y=b((t.left+t.right)/2);else if((0,i.i)(s)){const t=Object.keys(s)[0],e=s[t];y=b(this.chart.scales[t].getPixelForValue(e))}k=y-m,M=k-d,T=t.left,C=t.right}const O=(0,i.v)(r.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/O));for(x=0;x0&&(s-=r/2);break}d={left:s,top:o,width:r+e.width,height:n+e.height,color:t.backdropColor}}m.push({label:v,font:S,textOffset:C,options:{rotation:g,color:n,strokeColor:l,strokeWidth:u,textAlign:f,textBaseline:A,translation:[w,k],backdrop:d}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options,n=-(0,i.t)(this.labelRotation);if(n)return"top"===t?"left":"right";let r="center";return"start"===e.align?r="left":"end"===e.align?r="right":"inner"===e.align&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,o=this._getLabelSizes(),s=t+r,a=o.widest.width;let l,c;return"left"===e?i?(c=this.right+r,"near"===n?l="left":"center"===n?(l="center",c+=a/2):(l="right",c+=a)):(c=this.right-s,"near"===n?l="right":"center"===n?(l="center",c-=a/2):(l="left",c=this.left)):"right"===e?i?(c=this.left+r,"near"===n?l="right":"center"===n?(l="center",c-=a/2):(l="left",c-=a)):(c=this.left+s,"near"===n?l="left":"center"===n?(l="center",c+=a/2):(l="right",c=this.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks,i=n.findIndex((e=>e.value===t));if(i>=0){const t=e.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,o=i.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,o;for(r=0,o=e.length;r{const r=n.split("."),o=r.pop(),s=[t].concat(r).join("."),a=e[n].split("."),l=a.pop(),c=a.join(".");i.d.route(s,o,c,l)}))}function ie(t){return"id"in t&&"defaults"in t}class re{constructor(){this.controllers=new te(P,"datasets",!0),this.elements=new te(Rt,"elements"),this.plugins=new te(Object,"plugins"),this.scales=new te(Kt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const r=n||this._getRegistryForType(e);n||r.isForType(e)||r===this.plugins&&e.id?this._exec(t,r,e):(0,i.F)(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const r=(0,i.a5)(t);(0,i.Q)(n["before"+r],[],n),e[t](n),(0,i.Q)(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function ae(t){const e={},n=[],i=Object.keys(oe.plugins.items);for(let o=0;o1&&pe(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function be(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function ye(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(n.length)return be(t,"x",n[0])||be(t,"y",n[0])}return{}}function xe(t,e){const n=i.a3[t.type]||{scales:{}},r=e.scales||{},o=he(t.type,e),s=Object.create(null);return Object.keys(r).forEach((e=>{const a=r[e];if(!(0,i.i)(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const l=me(e,a,ye(e,t),i.d.scales[a.type]),c=fe(l,o),u=n.scales||{};s[e]=(0,i.ab)(Object.create(null),[{axis:l},a,u[l],u[c]])})),t.data.datasets.forEach((n=>{const o=n.type||t.type,a=n.indexAxis||he(o,e),l=i.a3[o]||{},c=l.scales||{};Object.keys(c).forEach((t=>{const e=de(t,a),o=n[e+"AxisID"]||e;s[o]=s[o]||Object.create(null),(0,i.ab)(s[o],[{axis:e},r[o],c[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];(0,i.ab)(e,[i.d.scales[e.type],i.d.scale])})),s}function ve(t){const e=t.options||(t.options={});e.plugins=(0,i.v)(e.plugins,{}),e.scales=xe(t,e)}function we(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function ke(t){return t=t||{},t.data=we(t.data),ve(t),t}const _e=new Map,Me=new Set;function Se(t,e){let n=_e.get(t);return n||(n=e(),_e.set(t,n),Me.add(n)),n}const Te=(t,e,n)=>{const r=(0,i.f)(e,n);void 0!==r&&t.add(r)};class De{constructor(t){this._config=ke(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=we(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ve(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Se(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Se(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Se(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id,n=this.type;return Se(`${n}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:r,type:o}=this,s=this._cachedScopes(t,n),a=s.get(e);if(a)return a;const l=new Set;e.forEach((e=>{t&&(l.add(t),e.forEach((e=>Te(l,t,e)))),e.forEach((t=>Te(l,r,t))),e.forEach((t=>Te(l,i.a3[o]||{},t))),e.forEach((t=>Te(l,i.d,t))),e.forEach((t=>Te(l,i.a6,t)))}));const c=Array.from(l);return 0===c.length&&c.push(Object.create(null)),Me.has(e)&&s.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,i.a3[e]||{},i.d.datasets[e]||{},{type:e},i.d,i.a6]}resolveNamedOptions(t,e,n,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Ce(this._resolverCache,t,r);let l=s;if(Oe(s,e)){o.$shared=!1,n=(0,i.a7)(n)?n():n;const e=this.createResolver(t,n,a);l=(0,i.a8)(s,n,e)}for(const i of e)o[i]=l[i];return o}createResolver(t,e,n=[""],r){const{resolver:o}=Ce(this._resolverCache,t,n);return(0,i.i)(e)?(0,i.a8)(o,e,void 0,r):o}}function Ce(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const o=n.join();let s=r.get(o);if(!s){const t=(0,i.a9)(e,n);s={resolver:t,subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},r.set(o,s)}return s}const Ae=t=>(0,i.i)(t)&&Object.getOwnPropertyNames(t).some((e=>(0,i.a7)(t[e])));function Oe(t,e){const{isScriptable:n,isIndexable:r}=(0,i.aa)(t);for(const o of e){const e=n(o),s=r(o),a=(s||e)&&t[o];if(e&&((0,i.a7)(a)||Ae(a))||s&&(0,i.b)(a))return!0}return!1}var Pe="4.5.1";const Ee=["top","bottom","left","right","chartArea"];function Re(t,e){return"top"===t||"bottom"===t||-1===Ee.indexOf(t)&&"x"===e}function Ie(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function Le(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),(0,i.Q)(n&&n.onComplete,[t],e)}function ze(t){const e=t.chart,n=e.options.animation;(0,i.Q)(n&&n.onProgress,[t],e)}function Ne(t){return(0,i.M)()&&"string"===typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Fe={},je=t=>{const e=Ne(t);return Object.values(Fe).filter((t=>t.canvas===e)).pop()};function He(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const o=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=o)}}}function We(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}class $e{static defaults=i.d;static instances=Fe;static overrides=i.a3;static registry=oe;static version=Pe;static getChart=je;static register(...t){oe.add(...t),Be()}static unregister(...t){oe.remove(...t),Be()}constructor(t,e){const n=this.config=new De(e),r=Ne(t),s=je(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Et(r)),this.platform.updateConfig(n);const l=this.platform.acquireContext(r,a.aspectRatio),c=l&&l.canvas,u=c&&c.height,h=c&&c.width;this.id=(0,i.ac)(),this.ctx=l,this.canvas=c,this.width=h,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new se,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,i.ad)((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],Fe[this.id]=this,l&&c?(o.listen(this,"complete",Le),o.listen(this,"progress",ze),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:o}=this;return(0,i.k)(t)?e&&o?o:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return oe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,i.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,i.af)(this.canvas,this.ctx),this}stop(){return o.stop(this),this}resize(t,e){o.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,(0,i.ae)(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),(0,i.Q)(n.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options,e=t.scales||{};(0,i.F)(e,((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const n=e[t],i=me(t,n),r="r"===i,o="x"===i;return{options:n,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),(0,i.F)(o,(e=>{const o=e.options,s=o.id,a=me(s,o),l=(0,i.v)(o.type,e.dtype);void 0!==o.position&&Re(o.position,a)===Re(e.dposition)||(o.position=e.dposition),r[s]=!0;let c=null;if(s in n&&n[s].type===l)c=n[s];else{const t=oe.getScale(l);c=new t({id:s,type:l,ctx:this.ctx,chart:this}),n[c.id]=c}c.init(o,t)})),(0,i.F)(r,((t,e)=>{t||delete n[e]})),(0,i.F)(n,(t=>{ct.configure(this,t,t.options),ct.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let i=0,c=this.data.datasets.length;i{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ie("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){(0,i.F)(this.scales,(t=>{ct.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(0,i.ag)(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e){const e="_removeElements"===n?-r:r;He(t,i,e)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),r=n(0);for(let o=1;ot.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ct.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],(0,i.F)(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=(0,i.ah)(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(r&&(0,i.Y)(e,r),t.controller.draw(),r&&(0,i.$)(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return(0,i.C)(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=U.modes[e];return"function"===typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=(0,i.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"===typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){const n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const r=n?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);(0,i.h)(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(o,{visible:n}),this.update((e=>e.datasetIndex===t?r:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),o.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,n,i),t[n]=i},r=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};(0,i.F)(this.options.events,(t=>n(t,r)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",r),n("detach",o)};o=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){(0,i.F)(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},(0,i.F)(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),s=0,a=t.length;s{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),r=!(0,i.ai)(n,e);r&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=n?t:r(t,e);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,n,s),l=(0,i.aj)(t),c=We(t,this._lastEvent,n,l);n&&(this._lastEvent=null,(0,i.Q)(o.onHover,[t,a,this],this),l&&(0,i.Q)(o.onClick,[t,a,this],this));const u=!(0,i.ai)(a,r);return(u||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=c,u}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function Be(){return(0,i.F)($e.instances,(t=>t._plugins.invalidate()))}function Ye(t,e,n=e){t.lineCap=(0,i.v)(n.borderCapStyle,e.borderCapStyle),t.setLineDash((0,i.v)(n.borderDash,e.borderDash)),t.lineDashOffset=(0,i.v)(n.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,i.v)(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,i.v)(n.borderWidth,e.borderWidth),t.strokeStyle=(0,i.v)(n.borderColor,e.borderColor)}function Ve(t,e,n){t.lineTo(n.x,n.y)}function Ue(t){return t.stepped?i.at:t.tension||"monotone"===t.cubicInterpolationMode?i.au:Ve}function qe(t,e,n={}){const i=t.length,{start:r=0,end:o=i-1}=n,{start:s,end:a}=e,l=Math.max(r,s),c=Math.min(o,a),u=ra&&o>a;return{count:i,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,x=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(h=r[y(0)],t.moveTo(h.x,h.y)),u=0;u<=a;++u){if(h=r[y(u)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===d?(np&&(p=n),m=(b*m+e)/++b):(x(),t.lineTo(e,n),d=i,b=0,f=p=n),g=n}x()}function Ze(t){const e=t.options,n=e.borderDash&&e.borderDash.length,i=!t._decimated&&!t._loop&&!e.tension&&"monotone"!==e.cubicInterpolationMode&&!e.stepped&&!n;return i?Ge:Xe}function Qe(t){return t.stepped?i.aq:t.tension||"monotone"===t.cubicInterpolationMode?i.ar:i.as}function Je(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),Ye(t,e.options),t.stroke(r)}function Ke(t,e,n,i){const{segments:r,options:o}=e,s=Ze(e);for(const a of r)Ye(t,o,a.style),t.beginPath(),s(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const tn="function"===typeof Path2D;function en(t,e,n,i){tn&&!e.options.segment?Je(t,e,n,i):Ke(t,e,n,i)}class nn extends Rt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const r=n.spanGaps?this._loop:this._fullLoop;(0,i.an)(this._points,n,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,i.ao)(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,r=t[e],o=this.points,s=(0,i.ap)(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],l=Qe(n);let c,u;for(c=0,u=s.length;c{e=cn(t,e,r);const s=r[t],a=r[e];null!==i?(o.push({x:s.x,y:i}),o.push({x:a.x,y:i})):null!==n&&(o.push({x:n,y:s.y}),o.push({x:n,y:a.y}))})),o}function cn(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function un(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function hn(t,e){let n=[],r=!1;return(0,i.b)(t)?(r=!0,n=t):n=ln(t,e),n.length?new nn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function dn(t){return t&&!1!==t.fill}function fn(t,e,n){const r=t[e];let o=r.fill;const s=[e];let a;if(!n)return o;while(!1!==o&&-1===s.indexOf(o)){if(!(0,i.g)(o))return o;if(a=t[o],!a)return!1;if(a.visible)return o;s.push(o),o=a.fill}return!1}function pn(t,e,n){const r=yn(t);if((0,i.i)(r))return!isNaN(r.value)&&r;let o=parseFloat(r);return(0,i.g)(o)&&Math.floor(o)===o?gn(r[0],e,o,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function gn(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}function mn(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:(0,i.i)(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function bn(t,e,n){let r;return r="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:(0,i.i)(t)?t.value:e.getBaseValue(),r}function yn(t){const e=t.options,n=e.fill;let r=(0,i.v)(n&&n.target,n);return void 0===r&&(r=!!e.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}function xn(t){const{scale:e,index:n,line:i}=t,r=[],o=i.segments,s=i.points,a=vn(e,n);a.push(hn({x:null,y:e.bottom},i));for(let l=0;l=0;--s){const e=r[s].$filler;e&&(e.line.updateControlPoints(o,e.axis),i&&e.fill&&An(t.ctx,e,o))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const e=i[r].$filler;dn(e)&&An(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;dn(i)&&"beforeDatasetDraw"===n.drawTime&&An(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Nn=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},Fn=(t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class jn extends Rt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=(0,i.Q)(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,r=(0,i.a0)(n.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Nn(n,o);let c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+s;let u=t;r.textAlign="left",r.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=n+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(u+=c,l[l.length-(f>0?0:1)]=0,d+=c,h++),a[f]={left:0,top:d,row:h,width:p,height:i},l[l.length-1]+=p+s})),u}_fitCols(t,e,n,i){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let u=s,h=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:m}=Hn(n,e,r,t,i);o>0&&d+m+2*s>c&&(u+=h+s,l.push({width:h,height:d}),f+=h+s,p++,h=d=0),a[o]={left:f,top:d,col:p,width:g,height:m},h=Math.max(h,g),d+=m+s})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:o}}=this,s=(0,i.aA)(o,this.left,this.width);if(this.isHorizontal()){let o=0,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o]);for(const l of e)o!==l.row&&(o=l.row,a=(0,i.a2)(n,this.left+r,this.right-this.lineWidths[o])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+r}else{let o=0,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const l of e)l.col!==o&&(o=l.col,a=(0,i.a2)(n,this.top+t+r,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;(0,i.Y)(t,this),this._draw(),(0,i.$)(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:o,labels:s}=t,a=i.d.color,l=(0,i.aA)(t.rtl,this.left,this.width),c=(0,i.a0)(s.font),{padding:u}=s,h=c.size,d=h/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Nn(s,h),b=function(t,e,n){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;r.save();const o=(0,i.v)(n.lineWidth,1);if(r.fillStyle=(0,i.v)(n.fillStyle,a),r.lineCap=(0,i.v)(n.lineCap,"butt"),r.lineDashOffset=(0,i.v)(n.lineDashOffset,0),r.lineJoin=(0,i.v)(n.lineJoin,"miter"),r.lineWidth=o,r.strokeStyle=(0,i.v)(n.strokeStyle,a),r.setLineDash((0,i.v)(n.lineDash,[])),s.usePointStyle){const a={radius:g*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},c=l.xPlus(t,p/2),u=e+d;(0,i.aE)(r,a,c,u,s.pointStyleWidth&&p)}else{const s=e+Math.max((h-g)/2,0),a=l.leftForLtr(t,p),c=(0,i.ay)(n.borderRadius);r.beginPath(),Object.values(c).some((t=>0!==t))?(0,i.aw)(r,{x:a,y:s,w:p,h:g,radius:c}):r.rect(a,s,p,g),r.fill(),0!==o&&r.stroke()}r.restore()},y=function(t,e,n){(0,i.Z)(r,n.text,t,e+m/2,c,{strikethrough:n.hidden,textAlign:l.textAlign(n.textAlign)})},x=this.isHorizontal(),v=this._computeTitleHeight();f=x?{x:(0,i.a2)(o,this.left+u,this.right-n[0]),y:this.top+u+v,line:0}:{x:this.left+u,y:(0,i.a2)(o,this.top+v+u,this.bottom-e[0].height),line:0},(0,i.aB)(this.ctx,t.textDirection);const w=m+u;this.legendItems.forEach(((a,h)=>{r.strokeStyle=a.fontColor,r.fillStyle=a.fontColor;const g=r.measureText(a.text).width,m=l.textAlign(a.textAlign||(a.textAlign=s.textAlign)),k=p+d+g;let _=f.x,M=f.y;l.setWidth(this.width),x?h>0&&_+k+u>this.right&&(M=f.y+=w,f.line++,_=f.x=(0,i.a2)(o,this.left+u,this.right-n[f.line])):h>0&&M+w>this.bottom&&(_=f.x=_+e[f.line].width+u,f.line++,M=f.y=(0,i.a2)(o,this.top+v+u,this.bottom-e[f.line].height));const S=l.x(_);if(b(S,M,a),_=(0,i.aC)(m,_+p+d,x?_+k:this.right,t.rtl),y(l.x(_),M,a),x)f.x+=k+u;else if("string"!==typeof a.text){const t=c.lineHeight;f.y+=Bn(a,t)+u}else f.y+=w})),(0,i.aD)(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=(0,i.a0)(e.font),r=(0,i.E)(e.padding);if(!e.display)return;const o=(0,i.aA)(t.rtl,this.left,this.width),s=this.ctx,a=e.position,l=n.size/2,c=r.top+l;let u,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,h=(0,i.a2)(t.align,h,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=c+(0,i.a2)(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=(0,i.a2)(a,h,h+d);s.textAlign=o.textAlign((0,i.a1)(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,(0,i.Z)(s,e.text,f,u,n)}_computeTitleHeight(){const t=this.options.title,e=(0,i.a0)(t.font),n=(0,i.E)(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,o;if((0,i.ak)(t,this.left,this.right)&&(0,i.ak)(e,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;nt.length>e.length?t:e))),e+n.size/2+i.measureText(r).width}function $n(t,e,n){let i=t;return"string"!==typeof e.text&&(i=Bn(e,n)),i}function Bn(t,e){const n=t.text?t.text.length:0;return e*n}function Yn(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}var Vn={id:"legend",_element:jn,start(t,e,n){const i=t.legend=new jn({ctx:t.ctx,options:n,chart:t});ct.configure(t,i,n),ct.addBox(t,i)},stop(t){ct.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;ct.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:s,useBorderRadius:a,borderRadius:l}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const c=t.controller.getStyle(n?0:void 0),u=(0,i.E)(c.borderWidth);return{text:e[t.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:o||c.textAlign,borderRadius:a&&(l||c.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Un extends Rt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const r=(0,i.b)(n.text)?n.text.length:1;this._padding=(0,i.E)(n.padding);const o=r*(0,i.a0)(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:r,right:o,options:s}=this,a=s.align;let l,c,u,h=0;return this.isHorizontal()?(c=(0,i.a2)(a,n,o),u=e+t,l=o-n):("left"===s.position?(c=n+t,u=(0,i.a2)(a,r,e),h=-.5*i.P):(c=o-t,u=(0,i.a2)(a,e,r),h=.5*i.P),l=r-e),{titleX:c,titleY:u,maxWidth:l,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=(0,i.a0)(e.font),r=n.lineHeight,o=r/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);(0,i.Z)(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:(0,i.a1)(e.align),textBaseline:"middle",translation:[s,a]})}}function qn(t,e){const n=new Un({ctx:t.ctx,options:e,chart:t});ct.configure(t,n,e),ct.addBox(t,n),t.titleBlock=n}var Xn={id:"title",_element:Un,start(t,e,n){qn(t,n)},stop(t){const e=t.titleBlock;ct.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;ct.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const Gn={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,o=0;for(e=0,n=t.length;et+e))/i.size;return{x:s,y:r/o}},nearest(t,e){if(!t.length)return!1;let n,r,o,s=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(n=0,r=t.length;n-1?t.split("\n"):t}function Jn(t,e){const{element:n,datasetIndex:i,index:r}=e,o=t.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Kn(t,e){const n=t.chart.ctx,{body:r,footer:o,title:s}=t,{boxWidth:a,boxHeight:l}=e,c=(0,i.a0)(e.bodyFont),u=(0,i.a0)(e.titleFont),h=(0,i.a0)(e.footerFont),d=s.length,f=o.length,p=r.length,g=(0,i.E)(e.padding);let m=g.height,b=0,y=r.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(y+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const t=e.displayColors?Math.max(l,c.lineHeight):c.lineHeight;m+=p*t+(y-p)*c.lineHeight+(y-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);let x=0;const v=function(t){b=Math.max(b,n.measureText(t).width+x)};return n.save(),n.font=u.string,(0,i.F)(t.title,v),n.font=c.string,(0,i.F)(t.beforeBody.concat(t.afterBody),v),x=e.displayColors?a+2+e.boxPadding:0,(0,i.F)(r,(t=>{(0,i.F)(t.before,v),(0,i.F)(t.lines,v),(0,i.F)(t.after,v)})),x=0,n.font=h.string,(0,i.F)(t.footer,v),n.restore(),b+=g.width,{width:b,height:m}}function ti(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function ei(t,e,n,i){const{x:r,width:o}=i,s=n.caretSize+n.caretPadding;return"left"===t&&r+o+s>e.width||("right"===t&&r-o-s<0||void 0)}function ni(t,e,n,i){const{x:r,width:o}=n,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),ei(c,t,e,n)&&(c="center"),c}function ii(t,e,n){const i=n.yAlign||e.yAlign||ti(t,n);return{xAlign:n.xAlign||e.xAlign||ni(t,e,n,i),yAlign:i}}function ri(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}function oi(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}function si(t,e,n,r){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:l,yAlign:c}=n,u=o+s,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:p}=(0,i.ay)(a);let g=ri(e,l);const m=oi(e,c,u);return"center"===c?"left"===l?g+=u:"right"===l&&(g-=u):"left"===l?g-=Math.max(h,f)+o:"right"===l&&(g+=Math.max(d,p)+o),{x:(0,i.S)(g,0,r.width-e.width),y:(0,i.S)(m,0,r.height-e.height)}}function ai(t,e,n){const r=(0,i.E)(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-r.right:t.x+r.left}function li(t){return Zn([],Qn(t))}function ci(t,e,n){return(0,i.j)(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ui(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const hi={beforeTitle:i.aG,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex{const e={before:[],lines:[],after:[]},i=ui(n,t);Zn(e.before,Qn(di(i,"beforeLabel",this,t))),Zn(e.lines,di(i,"label",this,t)),Zn(e.after,Qn(di(i,"afterLabel",this,t))),r.push(e)})),r}getAfterBody(t,e){return li(di(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=di(n,"beforeFooter",this,t),r=di(n,"footer",this,t),o=di(n,"afterFooter",this,t);let s=[];return s=Zn(s,Qn(i)),s=Zn(s,Qn(r)),s=Zn(s,Qn(o)),s}_createItems(t){const e=this._active,n=this.chart.data,r=[],o=[],s=[];let a,l,c=[];for(a=0,l=e.length;at.filter(e,i,r,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),(0,i.F)(c,(e=>{const n=ui(t.callbacks,e);r.push(di(n,"labelColor",this,e)),o.push(di(n,"labelPointStyle",this,e)),s.push(di(n,"labelTextColor",this,e))})),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=c,c}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,o=[];if(i.length){const t=Gn[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const e=this._size=Kn(this,n),s=Object.assign({},t,e),a=ii(this.chart,n,s),l=si(n,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:h}=(0,i.ay)(a),{x:d,y:f}=t,{width:p,height:g}=e;let m,b,y,x,v,w;return"center"===o?(v=f+g/2,"left"===r?(m=d,b=m-s,x=v+s,w=v-s):(m=d+p,b=m+s,x=v-s,w=v+s),y=m):(b="left"===r?d+Math.max(l,u)+s:"right"===r?d+p-Math.max(c,h)-s:this.caretX,"top"===o?(x=f,v=x-s,m=b-s,y=b+s):(x=f+g,v=x+s,m=b+s,y=b-s),w=x),{x1:m,x2:b,x3:y,y1:x,y2:v,y3:w}}drawTitle(t,e,n){const r=this.title,o=r.length;let s,a,l;if(o){const c=(0,i.aA)(n.rtl,this.x,this.width);for(t.x=ai(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",s=(0,i.a0)(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,l=0;l0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,(0,i.aw)(t,{x:e,y:p,w:c,h:l,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),(0,i.aw)(t,{x:n,y:p+1,w:c-2,h:l-2,radius:a}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,p,c,l),t.strokeRect(e,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(n,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,h=(0,i.a0)(n.bodyFont);let d=h.lineHeight,f=0;const p=(0,i.aA)(n.rtl,this.x,this.width),g=function(n){e.fillText(n,p.x(t.x+f),t.y+d/2),t.y+=d+o},m=p.textAlign(s);let b,y,x,v,w,k,_;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=ai(this,m,n),e.fillStyle=n.bodyColor,(0,i.F)(this.beforeBody,g),f=a&&"right"!==m?"center"===s?c/2+u:c+2+u:0,v=0,k=r.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Gn[t.position].call(this,this._active,this._eventPosition);if(!n)return;const o=this._size=Kn(this,t),s=Object.assign({},n,this._size),a=ii(e,t,s),l=si(t,s,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=(0,i.E)(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,r,e),(0,i.aB)(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),(0,i.aD)(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,r=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),o=!(0,i.ai)(n,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,n),a=this._positionChanged(s,t),l=e||!(0,i.ai)(s,o)||a;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const o=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,o=Gn[r.position].call(this,t,e);return!1!==o&&(n!==o.x||i!==o.y)}}var pi={id:"tooltip",_element:fi,positioners:Gn,afterInit(t,e,n){n&&(t.tooltip=new fi({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:hi},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const gi=(t,e,n,i)=>("string"===typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function mi(t,e,n,i){const r=t.indexOf(e);if(-1===r)return gi(t,e,n,i);const o=t.lastIndexOf(e);return r!==o?n:r}const bi=(t,e)=>null===t?null:(0,i.S)(Math.round(t),0,e);function yi(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function vi(t,e){const n=[],r=1e-14,{bounds:o,step:s,min:a,max:l,precision:c,count:u,maxTicks:h,maxDigits:d,includeBounds:f}=t,p=s||1,g=h-1,{min:m,max:b}=e,y=!(0,i.k)(a),x=!(0,i.k)(l),v=!(0,i.k)(u),w=(b-m)/(d+1);let k,_,M,S,T=(0,i.aI)((b-m)/g/p)*p;if(Tg&&(T=(0,i.aI)(S*T/g/p)*p),(0,i.k)(c)||(k=Math.pow(10,c),T=Math.ceil(T*k)/k),"ticks"===o?(_=Math.floor(m/T)*T,M=Math.ceil(b/T)*T):(_=m,M=b),y&&x&&s&&(0,i.aJ)((l-a)/s,T/1e3)?(S=Math.round(Math.min((l-a)/T,h)),T=(l-a)/S,_=a,M=l):v?(_=y?a:_,M=x?l:M,S=u-1,T=(M-_)/S):(S=(M-_)/T,S=(0,i.aK)(S,Math.round(S),T/1e3)?Math.round(S):Math.ceil(S));const D=Math.max((0,i.aL)(T),(0,i.aL)(_));k=Math.pow(10,(0,i.k)(c)?D:c),_=Math.round(_*k)/k,M=Math.round(M*k)/k;let C=0;for(y&&(f&&_!==a?(n.push({value:a}),_l)break;n.push({value:t})}return x&&f&&M!==l?n.length&&(0,i.aK)(n[n.length-1].value,l,wi(l,w,t))?n[n.length-1].value=l:n.push({value:l}):x&&M!==l||n.push({value:M}),n}function wi(t,e,{horizontal:n,minRotation:r}){const o=(0,i.t)(r),s=(n?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class ki extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return(0,i.k)(t)||("number"===typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:o}=this;const s=t=>r=e?r:t,a=t=>o=n?o:t;if(t){const t=(0,i.s)(r),e=(0,i.s)(o);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(r===o){let e=0===o?1:Math.abs(.05*o);a(o+e),t||s(r-e)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const r={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},o=this._range||this,s=vi(r,o);return"ticks"===t.bounds&&(0,i.aH)(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return(0,i.o)(t,this.chart.options.locale,this.options.ticks.format)}}class _i extends ki{static id="linear";static defaults={ticks:{callback:i.aM.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=(0,i.g)(t)?t:0,this.max=(0,i.g)(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=(0,i.t)(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/r))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}i.aM.formatters.logarithmic;i.aM.formatters.numeric;const Mi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Si=Object.keys(Mi);function Ti(t,e){return t-e}function Di(t,e){if((0,i.k)(e))return null;const n=t._adapter,{parser:r,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"===typeof r&&(a=r(a)),(0,i.g)(a)||(a="string"===typeof r?n.parse(a,r):n.parse(a)),null===a?null:(o&&(a="week"!==o||!(0,i.x)(s)&&!0!==s?n.startOf(a,o):n.startOf(a,"isoWeek",s)),+a)}function Ci(t,e,n,i){const r=Si.length;for(let o=Si.indexOf(t);o=Si.indexOf(n);o--){const n=Si[o];if(Mi[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return Si[n?Si.indexOf(n):0]}function Oi(t){for(let e=Si.indexOf(t)+1,n=Si.length;e=e?n[r]:n[o];t[s]=!0}}else t[e]=!0}function Ei(t,e,n,i){const r=t._adapter,o=+r.startOf(e[0].value,i),s=e[e.length-1].value;let a,l;for(a=o;a<=s;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function Ri(t,e,n){const i=[],r={},o=e.length;let s,a;for(s=0;s+t.value)))}initOffsets(t=[]){let e,n,r=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),r=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),o=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;r=(0,i.S)(r,0,s),o=(0,i.S)(o,0,s),this._offsets={start:r,end:o,factor:1/(r+1+o)}}_generate(){const t=this._adapter,e=this.min,n=this.max,r=this.options,o=r.time,s=o.unit||Ci(o.minUnit,e,n,this._getLabelCapacity(e)),a=(0,i.v)(r.ticks.stepSize,1),l="week"===s&&o.isoWeekday,c=(0,i.x)(l)||!0===l,u={};let h,d,f=e;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":s),t.diff(n,e,s)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+s);const p="data"===r.ticks.source&&this.getDataTimestamps();for(h=f,d=0;h+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options,i=n.time.displayFormats,r=this._unit,o=e||i[r];return this._adapter.format(t,o)}_tickFormatFunction(t,e,n,r){const o=this.options,s=o.ticks.callback;if(s)return(0,i.Q)(s,[t,e,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],h=c&&a[c],d=n[e],f=c&&h&&d&&d.major;return this._adapter.format(t,r||(f?h:u))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e0?s:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;tMath.max(Math.min(t,n),e);function o(t){return r(i(2.55*t),0,255)}function s(t){return r(i(255*t),0,255)}function a(t){return r(i(t/2.55)/100,0,1)}function l(t){return r(i(100*t),0,100)}const c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},u=[..."0123456789ABCDEF"],h=t=>u[15&t],d=t=>u[(240&t)>>4]+u[15&t],f=t=>(240&t)>>4===(15&t),p=t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a);function g(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*c[t[1]],g:255&17*c[t[2]],b:255&17*c[t[3]],a:5===n?17*c[t[4]]:255}:7!==n&&9!==n||(e={r:c[t[1]]<<4|c[t[2]],g:c[t[3]]<<4|c[t[4]],b:c[t[5]]<<4|c[t[6]],a:9===n?c[t[7]]<<4|c[t[8]]:255})),e}const m=(t,e)=>t<255?e(t):"";function b(t){var e=p(t)?h:d;return t?"#"+e(t.r)+e(t.g)+e(t.b)+m(t.a,e):void 0}const x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function v(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function w(t,e,n){const i=y(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function k(t,e,n,i,r){return t===r?(e-n)/i+(e.5?u/(2-o-s):u/(o+s),l=k(n,i,r,u,o),l=60*l+.5),[0|l,c||0,a]}function M(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(s)}function S(t,e,n){return M(y,t,e,n)}function T(t,e,n){return M(w,t,e,n)}function D(t,e,n){return M(v,t,e,n)}function C(t){return(t%360+360)%360}function A(t){const e=x.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?o(+e[5]):s(+e[5]));const r=C(+e[2]),a=+e[3]/100,l=+e[4]/100;return n="hwb"===e[1]?T(r,a,l):"hsv"===e[1]?D(r,a,l):S(r,a,l),{r:n[0],g:n[1],b:n[2],a:i}}function O(t,e){var n=_(t);n[0]=C(n[0]+e),n=S(n),t.r=n[0],t.g=n[1],t.b=n[2]}function P(t){if(!t)return;const e=_(t),n=e[0],i=l(e[1]),r=l(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${a(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const E={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},R={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function I(){const t={},e=Object.keys(R),n=Object.keys(E);let i,r,o,s,a;for(i=0;i>16&255,o>>8&255,255&o]}return t}let L;function z(t){L||(L=I(),L.transparent=[0,0,0,0]);const e=L[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const N=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function F(t){const e=N.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?o(t):r(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?o(n):r(n,0,255)),i=255&(e[4]?o(i):r(i,0,255)),s=255&(e[6]?o(s):r(s,0,255)),{r:n,g:i,b:s,a:a}}}function j(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const H=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,W=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $(t,e,n){const i=W(a(t.r)),r=W(a(t.g)),o=W(a(t.b));return{r:s(H(i+n*(W(a(e.r))-i))),g:s(H(r+n*(W(a(e.g))-r))),b:s(H(o+n*(W(a(e.b))-o))),a:t.a+n*(e.a-t.a)}}function B(t,e,n){if(t){let i=_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=S(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Y(t,e){return t?Object.assign(e||{},t):t}function V(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=s(t[3]))):(e=Y(t,{r:0,g:0,b:0,a:1}),e.a=s(e.a)),e}function U(t){return"r"===t.charAt(0)?F(t):A(t)}class q{constructor(t){if(t instanceof q)return t;const e=typeof t;let n;"object"===e?n=V(t):"string"===e&&(n=g(t)||z(t)||U(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Y(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=V(t)}rgbString(){return this._valid?j(this._rgb):void 0}hexString(){return this._valid?b(this._rgb):void 0}hslString(){return this._valid?P(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=n.a-i.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=$(this._rgb,t._rgb,e)),this}clone(){return new q(this.rgb)}alpha(t){return this._rgb.a=s(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=i(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return B(this._rgb,2,t),this}darken(t){return B(this._rgb,2,-t),this}saturate(t){return B(this._rgb,1,t),this}desaturate(t){return B(this._rgb,1,-t),this}rotate(t){return O(this._rgb,t),this}} +function i(t){return t+.5|0}n.d(e,{$:function(){return Ve},A:function(){return Jt},B:function(){return Qt},C:function(){return Be},D:function(){return $t},E:function(){return an},F:function(){return ot},G:function(){return ti},H:function(){return Dt},I:function(){return Bn},J:function(){return ii},K:function(){return ni},L:function(){return oe},M:function(){return $n},N:function(){return It},O:function(){return tt},P:function(){return kt},Q:function(){return rt},R:function(){return un},S:function(){return qt},T:function(){return _t},U:function(){return Ht},V:function(){return Ne},W:function(){return Xt},X:function(){return je},Y:function(){return Ye},Z:function(){return Qe},_:function(){return ie},a:function(){return cn},a0:function(){return ln},a1:function(){return ae},a2:function(){return le},a3:function(){return Oe},a4:function(){return ut},a5:function(){return bt},a6:function(){return Pe},a7:function(){return xt},a8:function(){return fn},a9:function(){return dn},aA:function(){return ci},aB:function(){return ui},aC:function(){return ce},aD:function(){return hi},aE:function(){return $e},aF:function(){return Bt},aG:function(){return X},aH:function(){return Ft},aI:function(){return Rt},aJ:function(){return Nt},aK:function(){return Et},aL:function(){return Wt},aM:function(){return Ce},aN:function(){return Ot},aO:function(){return Fe},aP:function(){return Kt},aQ:function(){return Zt},aa:function(){return pn},ab:function(){return ht},ac:function(){return G},ad:function(){return se},ae:function(){return ei},af:function(){return He},ag:function(){return vt},ah:function(){return Ti},ai:function(){return st},aj:function(){return wt},ak:function(){return Gt},al:function(){return Vt},am:function(){return rn},an:function(){return Wn},ao:function(){return xi},ap:function(){return mi},aq:function(){return oi},ar:function(){return si},as:function(){return ri},at:function(){return Ue},au:function(){return qe},av:function(){return We},aw:function(){return Je},ax:function(){return on},ay:function(){return sn},az:function(){return gi},b:function(){return Q},b4:function(){return Tt},b5:function(){return Ct},b6:function(){return At},c:function(){return be},d:function(){return Le},e:function(){return ge},f:function(){return mt},g:function(){return K},h:function(){return yt},i:function(){return J},j:function(){return hn},k:function(){return Z},l:function(){return ee},m:function(){return nt},n:function(){return it},o:function(){return Se},p:function(){return Ut},q:function(){return ue},r:function(){return re},s:function(){return Pt},t:function(){return jt},u:function(){return ne},v:function(){return et},w:function(){return he},x:function(){return zt},y:function(){return Pn},z:function(){return Qn}});const r=(t,e,n)=>Math.max(Math.min(t,n),e);function o(t){return r(i(2.55*t),0,255)}function s(t){return r(i(255*t),0,255)}function a(t){return r(i(t/2.55)/100,0,1)}function l(t){return r(i(100*t),0,100)}const c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},u=[..."0123456789ABCDEF"],h=t=>u[15&t],d=t=>u[(240&t)>>4]+u[15&t],f=t=>(240&t)>>4===(15&t),p=t=>f(t.r)&&f(t.g)&&f(t.b)&&f(t.a);function g(t){var e,n=t.length;return"#"===t[0]&&(4===n||5===n?e={r:255&17*c[t[1]],g:255&17*c[t[2]],b:255&17*c[t[3]],a:5===n?17*c[t[4]]:255}:7!==n&&9!==n||(e={r:c[t[1]]<<4|c[t[2]],g:c[t[3]]<<4|c[t[4]],b:c[t[5]]<<4|c[t[6]],a:9===n?c[t[7]]<<4|c[t[8]]:255})),e}const m=(t,e)=>t<255?e(t):"";function b(t){var e=p(t)?h:d;return t?"#"+e(t.r)+e(t.g)+e(t.b)+m(t.a,e):void 0}const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function x(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function v(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function w(t,e,n){const i=x(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function k(t,e,n,i,r){return t===r?(e-n)/i+(e.5?u/(2-o-s):u/(o+s),l=k(n,i,r,u,o),l=60*l+.5),[0|l,c||0,a]}function M(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(s)}function S(t,e,n){return M(x,t,e,n)}function T(t,e,n){return M(w,t,e,n)}function D(t,e,n){return M(v,t,e,n)}function C(t){return(t%360+360)%360}function A(t){const e=y.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?o(+e[5]):s(+e[5]));const r=C(+e[2]),a=+e[3]/100,l=+e[4]/100;return n="hwb"===e[1]?T(r,a,l):"hsv"===e[1]?D(r,a,l):S(r,a,l),{r:n[0],g:n[1],b:n[2],a:i}}function O(t,e){var n=_(t);n[0]=C(n[0]+e),n=S(n),t.r=n[0],t.g=n[1],t.b=n[2]}function P(t){if(!t)return;const e=_(t),n=e[0],i=l(e[1]),r=l(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${a(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const E={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},R={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function I(){const t={},e=Object.keys(R),n=Object.keys(E);let i,r,o,s,a;for(i=0;i>16&255,o>>8&255,255&o]}return t}let L;function z(t){L||(L=I(),L.transparent=[0,0,0,0]);const e=L[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const N=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function F(t){const e=N.exec(t);let n,i,s,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?o(t):r(255*t,0,255)}return n=+e[1],i=+e[3],s=+e[5],n=255&(e[2]?o(n):r(n,0,255)),i=255&(e[4]?o(i):r(i,0,255)),s=255&(e[6]?o(s):r(s,0,255)),{r:n,g:i,b:s,a:a}}}function j(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const H=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,W=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $(t,e,n){const i=W(a(t.r)),r=W(a(t.g)),o=W(a(t.b));return{r:s(H(i+n*(W(a(e.r))-i))),g:s(H(r+n*(W(a(e.g))-r))),b:s(H(o+n*(W(a(e.b))-o))),a:t.a+n*(e.a-t.a)}}function B(t,e,n){if(t){let i=_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=S(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Y(t,e){return t?Object.assign(e||{},t):t}function V(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=s(t[3]))):(e=Y(t,{r:0,g:0,b:0,a:1}),e.a=s(e.a)),e}function U(t){return"r"===t.charAt(0)?F(t):A(t)}class q{constructor(t){if(t instanceof q)return t;const e=typeof t;let n;"object"===e?n=V(t):"string"===e&&(n=g(t)||z(t)||U(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Y(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=V(t)}rgbString(){return this._valid?j(this._rgb):void 0}hexString(){return this._valid?b(this._rgb):void 0}hslString(){return this._valid?P(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=n.a-i.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=$(this._rgb,t._rgb,e)),this}clone(){return new q(this.rgb)}alpha(t){return this._rgb.a=s(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=i(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return B(this._rgb,2,t),this}darken(t){return B(this._rgb,2,-t),this}saturate(t){return B(this._rgb,1,t),this}desaturate(t){return B(this._rgb,1,-t),this}rotate(t){return O(this._rgb,t),this}} /*! * Chart.js v4.5.1 * https://www.chartjs.org * (c) 2025 Chart.js Contributors * Released under the MIT License */ -function X(){}const G=(()=>{let t=0;return()=>t++})();function Z(t){return null===t||void 0===t}function Q(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function J(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function K(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function tt(t,e){return K(t)?t:e}function et(t,e){return"undefined"===typeof t?e:t}const nt=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,it=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rt(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)}function ot(t,e,n,i){let r,o,s;if(Q(t))if(o=t.length,i)for(r=o-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;rt,x:t=>t.x,y:t=>t.y};function pt(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function gt(t){const e=pt(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}function mt(t,e){const n=ft[e]||(ft[e]=gt(e));return n(t)}function bt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const xt=t=>"undefined"!==typeof t,yt=t=>"function"===typeof t,vt=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function wt(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const kt=Math.PI,_t=2*kt,Mt=_t+kt,St=Number.POSITIVE_INFINITY,Tt=kt/180,Dt=kt/2,Ct=kt/4,At=2*kt/3,Ot=Math.log10,Pt=Math.sign;function Et(t,e,n){return Math.abs(t-e)t-e)).pop(),e}function Lt(t){return"symbol"===typeof t||"object"===typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function zt(t){return!Lt(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Nt(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Ft(t,e,n){let i,r,o;for(i=0,r=t.length;il&&c=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Zt(t,e,n){n=n||(n=>t[n]1)i=o+r>>1,n(i)?o=i:r=i;return{lo:o,hi:r}}const Qt=(t,e,n,i)=>Zt(t,n,i?i=>{const r=t[i][e];return rt[i][e]Zt(t,n,(i=>t[i][e]>=n));function Kt(t,e,n){let i=0,r=t.length;while(ii&&t[r-1]>n)r--;return i>0||r{const n="_onData"+bt(e),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const r=i.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"===typeof t[n]&&t[n](...e)})),r}})})))}function ne(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(te.forEach((e=>{delete t[e]})),delete t._chartjs)}function ie(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const re=function(){return"undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame}();function oe(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,re.call(window,(()=>{i=!1,t.apply(e,n)})))}}function se(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const ae=t=>"start"===t?"left":"end"===t?"right":"center",le=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,ce=(t,e,n,i)=>{const r=i?"left":"right";return t===r?n:"center"===t?(e+n)/2:e};function ue(t,e,n){const i=e.length;let r=0,o=i;if(t._sorted){const{iScale:s,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=s.axis,{min:h,max:d,minDefined:f,maxDefined:p}=s.getUserBounds();if(f){if(r=Math.min(Qt(l,u,h).lo,n?i:Qt(e,u,s.getPixelForValue(h)).lo),c){const t=l.slice(0,r+1).reverse().findIndex((t=>!Z(t[a.axis])));r-=Math.max(0,t)}r=qt(r,0,i-1)}if(p){let t=Math.max(Qt(l,s.axis,d,!0).hi+1,n?0:Qt(e,u,s.getPixelForValue(d),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!Z(t[a.axis])));t+=Math.max(0,e)}o=qt(t,r,i)-r}else o=i-r}return{start:r,count:o}}function he(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),o}const de=t=>0===t||1===t,fe=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/n),pe=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/n)+1,ge={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Dt),easeOutSine:t=>Math.sin(t*Dt),easeInOutSine:t=>-.5*(Math.cos(kt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>de(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>de(t)?t:fe(t,.075,.3),easeOutElastic:t=>de(t)?t:pe(t,.075,.3),easeInOutElastic(t){const e=.1125,n=.45;return de(t)?t:t<.5?.5*fe(2*t,e,n):.5+.5*pe(2*t-1,e,n)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ge.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*ge.easeInBounce(2*t):.5*ge.easeOutBounce(2*t-1)+.5};function me(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function be(t){return me(t)?t:new q(t)}function xe(t){return me(t)?t:new q(t).saturate(.5).darken(.1).hexString()}const ye=["x","y","borderWidth","radius","tension"],ve=["color","borderColor","backgroundColor"];function we(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:ve},numbers:{type:"number",properties:ye}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})}function ke(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _e=new Map;function Me(t,e){e=e||{};const n=t+JSON.stringify(e);let i=_e.get(n);return i||(i=new Intl.NumberFormat(t,e),_e.set(n,i)),i}function Se(t,e,n){return Me(e,n).format(t)}const Te={values(t){return Q(t)?t:""+t},numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=De(t,n)}const s=Ot(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Se(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Ot(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Te.numeric.call(this,t,e,n):""}};function De(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Ce={formatters:Te};function Ae(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ce.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}const Oe=Object.create(null),Pe=Object.create(null);function Ee(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>xe(e.backgroundColor),this.hoverBorderColor=(t,e)=>xe(e.borderColor),this.hoverColor=(t,e)=>xe(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Re(this,t,e)}get(t){return Ee(this,t)}describe(t,e){return Re(Pe,t,e)}override(t,e){return Re(Oe,t,e)}route(t,e,n,i){const r=Ee(this,t),o=Ee(this,n),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[i];return J(t)?Object.assign({},e,t):et(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Le=new Ie({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[we,ke,Ae]);function ze(t){return!t||Z(t.size)||Z(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ne(t,e,n,i,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),o>i&&(i=o),i}function Fe(t,e,n,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let s=0;const a=n.length;let l,c,u,h,d;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function Be(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,Xe(t,o),l=0;l+t||0;function rn(t,e){const n={},i=J(e),r=i?Object.keys(e):e,o=J(t)?i?n=>et(t[n],t[e[n]]):e=>t[e]:()=>t;for(const s of r)n[s]=nn(o(s));return n}function on(t){return rn(t,{top:"y",right:"x",bottom:"y",left:"x"})}function sn(t){return rn(t,["topLeft","topRight","bottomLeft","bottomRight"])}function an(t){const e=on(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ln(t,e){t=t||{},e=e||Le.font;let n=et(t.size,e.size);"string"===typeof n&&(n=parseInt(n,10));let i=et(t.style,e.style);i&&!(""+i).match(tn)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:et(t.family,e.family),lineHeight:en(et(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:et(t.weight,e.weight),string:""};return r.string=ze(r),r}function cn(t,e,n,i){let r,o,s,a=!0;for(r=0,o=t.length;rn&&0===t?0:t+e;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function hn(t,e){return Object.assign(Object.create(t),e)}function dn(t,e=[""],n,i,r=(()=>t[0])){const o=n||t;"undefined"===typeof i&&(i=Cn("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:r,override:n=>dn([n,...t],e,o,i)};return new Proxy(s,{deleteProperty(e,n){return delete e[n],delete e._keys,delete t[0][n],!0},get(n,i){return bn(n,i,(()=>Dn(i,e,t,n)))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return An(t).includes(e)},ownKeys(t){return An(t)},set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function fn(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:pn(t,i),setContext:e=>fn(t,e,n,i),override:r=>fn(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty(e,n){return delete e[n],delete t[n],!0},get(t,e,n){return bn(t,e,(()=>xn(t,e,n)))},getOwnPropertyDescriptor(e,n){return e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,n){return Reflect.has(t,n)},ownKeys(){return Reflect.ownKeys(t)},set(e,n,i){return t[n]=i,delete e[n],!0}})}function pn(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:yt(n)?n:()=>n,isIndexable:yt(i)?i:()=>i}}const gn=(t,e)=>t?t+bt(e):e,mn=(t,e)=>J(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function bn(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function xn(t,e,n){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=t;let a=i[e];return yt(a)&&s.isScriptable(e)&&(a=yn(e,a,t,n)),Q(a)&&a.length&&(a=vn(e,a,t,s.isIndexable)),mn(e,a)&&(a=fn(a,r,o&&o[e],s)),a}function yn(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,s||i);return a.delete(t),mn(t,l)&&(l=Mn(r._scopes,r,t,l)),l}function vn(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=n;if("undefined"!==typeof o.index&&i(t))return e[o.index%e.length];if(J(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Mn(i,r,t,l);e.push(fn(n,o,s&&s[t],a))}}return e}function wn(t,e,n){return yt(t)?t(e,n):t}const kn=(t,e)=>!0===t?e:"string"===typeof t?mt(e,t):void 0;function _n(t,e,n,i,r){for(const o of e){const e=kn(n,o);if(e){t.add(e);const o=wn(e._fallback,n,r);if("undefined"!==typeof o&&o!==n&&o!==i)return o}else if(!1===e&&"undefined"!==typeof i&&n!==i)return null}return!1}function Mn(t,e,n,i){const r=e._rootScopes,o=wn(e._fallback,n,i),s=[...t,...r],a=new Set;a.add(i);let l=Sn(a,s,n,o||n,i);return null!==l&&(("undefined"===typeof o||o===n||(l=Sn(a,s,o,l,i),null!==l))&&dn(Array.from(a),[""],r,o,(()=>Tn(e,n,i))))}function Sn(t,e,n,i,r){while(n)n=_n(t,e,n,i,r);return n}function Tn(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Q(r)&&J(n)?n:r||{}}function Dn(t,e,n,i){let r;for(const o of e)if(r=Cn(gn(o,t),n),"undefined"!==typeof r)return mn(t,r)?Mn(n,i,t,r):r}function Cn(t,e){for(const n of e){if(!n)continue;const e=n[t];if("undefined"!==typeof e)return e}}function An(t){let e=t._keys;return e||(e=t._keys=On(t._scopes)),e}function On(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}function Pn(t,e,n,i){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(i);let a,l,c,u;for(a=0,l=i;ae"x"===t?"y":"x";function Ln(t,e,n,i){const r=t.skip?e:t,o=e,s=n.skip?e:n,a=Bt(o,r),l=Bt(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,d=i*u;return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function zn(t,e,n){const i=t.length;let r,o,s,a,l,c=Rn(t,0);for(let u=0;u!t.skip))),"monotone"===e.cubicInterpolationMode)Fn(t,r);else{let n=i?t[t.length-1]:t[0];for(o=0,s=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);function Un(t,e){return Vn(t).getPropertyValue(e)}const qn=["top","right","bottom","left"];function Xn(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const o=qn[r];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Gn=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Zn(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:o}=i;let s,a,l=!1;if(Gn(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:s,y:a,box:l}}function Qn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=Vn(n),o="border-box"===r.boxSizing,s=Xn(r,"padding"),a=Xn(r,"border","width"),{x:l,y:c,box:u}=Zn(t,n),h=s.left+(u&&a.left),d=s.top+(u&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}function Jn(t,e,n){let i,r;if(void 0===e||void 0===n){const o=t&&Bn(t);if(o){const t=o.getBoundingClientRect(),s=Vn(o),a=Xn(s,"border","width"),l=Xn(s,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=Yn(s.maxWidth,o,"clientWidth"),r=Yn(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||St,maxHeight:r||St}}const Kn=t=>Math.round(10*t)/10;function ti(t,e,n,i){const r=Vn(t),o=Xn(r,"margin"),s=Yn(r.maxWidth,t,"clientWidth")||St,a=Yn(r.maxHeight,t,"clientHeight")||St,l=Jn(t,e,n);let{width:c,height:u}=l;if("content-box"===r.boxSizing){const t=Xn(r,"border","width"),e=Xn(r,"padding");c-=e.width+t.width,u-=e.height+t.height}c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=Kn(Math.min(c,s,l.maxWidth)),u=Kn(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Kn(c/2));const h=void 0!==e||void 0!==n;return h&&i&&l.height&&u>l.height&&(u=l.height,c=Kn(Math.floor(u*i))),{width:c,height:u}}function ei(t,e,n){const i=e||1,r=Kn(t.height*i),o=Kn(t.width*i);t.height=Kn(t.height),t.width=Kn(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=i,s.height=r,s.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const ni=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};$n()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function ii(t,e){const n=Un(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ri(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function oi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function si(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=ri(t,r,n),a=ri(r,o,n),l=ri(o,e,n),c=ri(s,a,n),u=ri(a,l,n);return ri(c,u,n)}const ai=function(t,e){return{x(n){return t+t+e-n},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},li=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ci(t,e,n){return t?ai(e,n):li()}function ui(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function hi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function di(t){return"angle"===t?{between:Ut,compare:Yt,normalize:Vt}:{between:Gt,compare:(t,e)=>t-e,normalize:t=>t}}function fi({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:r}}function pi(t,e,n){const{property:i,start:r,end:o}=n,{between:s,normalize:a}=di(i),l=e.length;let c,u,{start:h,end:d,loop:f}=t;if(f){for(h+=l,d+=l,c=0,u=l;cl(r,b,g)&&0!==a(r,b),w=()=>0===a(o,g)||l(o,b,g),k=()=>x||v(),_=()=>!x||w();for(let M=u,S=u;M<=h;++M)m=e[M%s],m.skip||(g=c(m[i]),g!==b&&(x=l(g,r,o),null===y&&k()&&(y=0===a(g,r)?M:S),null!==y&&_()&&(p.push(fi({start:y,end:M,loop:d,count:s,style:f})),y=null),S=M,b=g));return null!==y&&p.push(fi({start:y,end:h,loop:d,count:s,style:f})),p}function mi(t,e){const n=[],i=t.segments;for(let r=0;rr&&t[o%e].skip)o--;return o%=e,{start:r,end:o}}function xi(t,e,n,i){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=n;++s){const n=t[s%r];n.skip||n.stop?l.skip||(i=!1,o.push({start:e%r,end:(s-1)%r,loop:i}),e=a=n.stop?s:null):(a=s,l.skip&&(e=s)),l=n}return null!==a&&o.push({start:e%r,end:a%r,loop:i}),o}function yi(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=bi(n,r,o,i);if(!0===i)return vi(t,[{start:s,end:a,loop:o}],n,e);const l=a{let i;const r=d[t];return i="string"===typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function p(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}const g={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},m={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},b={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},x={date:p({formats:g,defaultWidth:"full"}),time:p({formats:m,defaultWidth:"full"}),dateTime:p({formats:b,defaultWidth:"full"})},y={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v=(t,e,n,i)=>y[t];function w(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let r;if("formatting"===i&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=n?.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=n?.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}const o=t.argumentCallback?t.argumentCallback(e):e;return r[o]}}const k={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},M={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},S={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},T={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},D={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},C=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},A={ordinalNumber:C,era:w({values:k,defaultWidth:"wide"}),quarter:w({values:_,defaultWidth:"wide",argumentCallback:t=>t-1}),month:w({values:M,defaultWidth:"wide"}),day:w({values:S,defaultWidth:"wide"}),dayPeriod:w({values:T,defaultWidth:"wide",formattingValues:D,defaultFormattingWidth:"wide"})};function O(t){return(e,n={})=>{const i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const s=o[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?E(a,(t=>t.test(s))):P(a,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(s.length);return{value:c,rest:u}}}function P(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function E(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const r=i[0],o=e.match(t.parsePattern);if(!o)return null;let s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=e.slice(r.length);return{value:s,rest:a}}}const I=/^(\d+)(th|st|nd|rd)?/i,L=/\d+/i,z={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},N={any:[/^b/i,/^(a|c)/i]},F={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},j={any:[/1/i,/2/i,/3/i,/4/i]},H={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},W={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},B={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Y={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},V={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},U={ordinalNumber:R({matchPattern:I,parsePattern:L,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:z,defaultMatchWidth:"wide",parsePatterns:N,defaultParseWidth:"any"}),quarter:O({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:j,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:H,defaultMatchWidth:"wide",parsePatterns:W,defaultParseWidth:"any"}),day:O({matchPatterns:$,defaultMatchWidth:"wide",parsePatterns:B,defaultParseWidth:"any"}),dayPeriod:O({matchPatterns:Y,defaultMatchWidth:"any",parsePatterns:V,defaultParseWidth:"any"})},q={code:"en-US",formatDistance:f,formatLong:x,formatRelative:v,localize:A,match:U,options:{weekStartsOn:0,firstWeekContainsDate:1}};const X=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Z=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return X(t,e);let o;switch(i){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",X(i,e)).replace("{{time}}",G(r,e))},Q={p:G,P:Z},J=/^D+$/,K=/^Y+$/,tt=["D","DD","YY","YYYY"];function et(t){return J.test(t)}function nt(t){return K.test(t)}function it(t,e,n){const i=rt(t,e,n);if(console.warn(i),tt.includes(t))throw new RangeError(i)}function rt(t,e,n){const i="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}let ot={};function st(){return ot}function at(){return Object.assign({},st())}function lt(t,e){const n=ct(e)?new e(0):u(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function ct(t){return"function"===typeof t&&t.prototype?.constructor===t}const ut=10;class ht{subPriority=0;validate(t,e){return!0}}class dt extends ht{constructor(t,e,n,i,r){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class ft extends ht{priority=ut;subPriority=-1;constructor(t,e){super(),this.context=t||(t=>u(e,t))}set(t,e){return e.timestampIsSet?t:u(t,lt(t,this.context))}}class pt{run(t,e,n,i){const r=this.parse(t,e,n,i);return r?{setter:new dt(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,n){return!0}}class gt extends pt{priority=140;parse(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}set(t,e,n){return e.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const mt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},bt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function xt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function yt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function vt(t,e){const n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};const i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,c=n[5]?parseInt(n[5],10):0;return{value:i*(r*a+o*s+c*l),rest:e.slice(n[0].length)}}function wt(t){return yt(mt.anyDigitsSigned,t)}function kt(t,e){switch(t){case 1:return yt(mt.singleDigit,e);case 2:return yt(mt.twoDigits,e);case 3:return yt(mt.threeDigits,e);case 4:return yt(mt.fourDigits,e);default:return yt(new RegExp("^\\d{1,"+t+"}"),e)}}function _t(t,e){switch(t){case 1:return yt(mt.singleDigitSigned,e);case 2:return yt(mt.twoDigitsSigned,e);case 3:return yt(mt.threeDigitsSigned,e);case 4:return yt(mt.fourDigitsSigned,e);default:return yt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Mt(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function St(t,e){const n=e>0,i=n?e:1-e;let r;if(i<=50)r=t||100;else{const e=i+50,n=100*Math.trunc(e/100),o=t>=e%100;r=t+n-(o?100:0)}return n?r:1-r}function Tt(t){return t%400===0||t%4===0&&t%100!==0}class Dt extends pt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return xt(kt(4,t),i);case"yo":return xt(n.ordinalNumber(t,{unit:"year"}),i);default:return xt(kt(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){const i=t.getFullYear();if(n.isTwoDigitYear){const e=St(n.year,i);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const r="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}function Ct(t,e){const n=st(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=h(t,e?.in),o=r.getDay(),s=(o=+a?i+1:+n>=+c?i:i-1}class Ot extends pt{priority=130;parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return xt(kt(4,t),i);case"Yo":return xt(n.ordinalNumber(t,{unit:"year"}),i);default:return xt(kt(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,i){const r=At(t,i);if(n.isTwoDigitYear){const e=St(n.year,r);return t.setFullYear(e,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Ct(t,i)}const o="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(o,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Ct(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}function Pt(t,e){return Ct(t,{...e,weekStartsOn:1})}class Et extends pt{priority=130;parse(t,e){return _t("R"===e?4:e.length,t)}set(t,e,n){const i=u(t,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Pt(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Rt extends pt{priority=130;parse(t,e){return _t("u"===e?4:e.length,t)}set(t,e,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class It extends pt{priority=120;parse(t,e,n){switch(e){case"Q":case"QQ":return kt(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Lt extends pt{priority=120;parse(t,e,n){switch(e){case"q":case"qq":return kt(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class zt extends pt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"M":return xt(yt(mt.month,t),i);case"MM":return xt(kt(2,t),i);case"Mo":return xt(n.ordinalNumber(t,{unit:"month"}),i);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}}class Nt extends pt{priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"L":return xt(yt(mt.month,t),i);case"LL":return xt(kt(2,t),i);case"Lo":return xt(n.ordinalNumber(t,{unit:"month"}),i);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Ft(t,e){const n=st(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=At(t,e),o=u(e?.in||t,0);o.setFullYear(r,0,i),o.setHours(0,0,0,0);const s=Ct(o,e);return s}function jt(t,e){const n=h(t,e?.in),i=+Ct(n,e)-+Ft(n,e);return Math.round(i/r)+1}function Ht(t,e,n){const i=h(t,n?.in),r=jt(i,n)-e;return i.setDate(i.getDate()-7*r),h(i,n?.in)}class Wt extends pt{priority=100;parse(t,e,n){switch(e){case"w":return yt(mt.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,i){return Ct(Ht(t,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function $t(t,e){const n=h(t,e?.in),i=n.getFullYear(),r=u(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const o=Pt(r),s=u(n,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);const a=Pt(s);return n.getTime()>=o.getTime()?i+1:n.getTime()>=a.getTime()?i:i-1}function Bt(t,e){const n=$t(t,e),i=u(e?.in||t,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Pt(i)}function Yt(t,e){const n=h(t,e?.in),i=+Pt(n)-+Bt(n);return Math.round(i/r)+1}function Vt(t,e,n){const i=h(t,n?.in),r=Yt(i,n)-e;return i.setDate(i.getDate()-7*r),i}class Ut extends pt{priority=100;parse(t,e,n){switch(e){case"I":return yt(mt.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return Pt(Vt(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const qt=[31,28,31,30,31,30,31,31,30,31,30,31],Xt=[31,29,31,30,31,30,31,31,30,31,30,31];class Gt extends pt{priority=90;subPriority=1;parse(t,e,n){switch(e){case"d":return yt(mt.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return kt(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=Tt(n),r=t.getMonth();return i?e>=1&&e<=Xt[r]:e>=1&&e<=qt[r]}set(t,e,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Zt extends pt{priority=90;subpriority=1;parse(t,e,n){switch(e){case"D":case"DD":return yt(mt.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return kt(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=Tt(n);return i?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Qt(t,e,n){const i=h(t,n?.in);return isNaN(e)?u(n?.in||t,NaN):e?(i.setDate(i.getDate()+e),i):i}function Jt(t,e,n){const i=st(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=h(t,n?.in),s=o.getDay(),a=e%7,l=(a+7)%7,c=7-r,u=e<0||e>6?e-(s+c)%7:(l+c)%7-(s+c)%7;return Qt(o,u,n)}class Kt extends pt{priority=90;parse(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class te extends pt{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return xt(kt(e.length,t),r);case"eo":return xt(n.ordinalNumber(t,{unit:"day"}),r);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class ee extends pt{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return xt(kt(e.length,t),r);case"co":return xt(n.ordinalNumber(t,{unit:"day"}),r);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function ne(t,e){const n=h(t,e?.in).getDay();return 0===n?7:n}function ie(t,e,n){const i=h(t,n?.in),r=ne(i,n),o=e-r;return Qt(i,o,n)}class re extends pt{priority=90;parse(t,e,n){const i=t=>0===t?7:t;switch(e){case"i":case"ii":return kt(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return xt(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return xt(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return xt(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return xt(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return t=ie(t,n),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class oe extends pt{priority=80;parse(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class se extends pt{priority=80;parse(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class ae extends pt{priority=80;parse(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class le extends pt{priority=70;parse(t,e,n){switch(e){case"h":return yt(mt.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):i||12!==n?t.setHours(n,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class ce extends pt{priority=70;parse(t,e,n){switch(e){case"H":return yt(mt.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class ue extends pt{priority=70;parse(t,e,n){switch(e){case"K":return yt(mt.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):t.setHours(n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class he extends pt{priority=70;parse(t,e,n){switch(e){case"k":return yt(mt.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){const i=n<=24?n%24:n;return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class de extends pt{priority=60;parse(t,e,n){switch(e){case"m":return yt(mt.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]}class fe extends pt{priority=50;parse(t,e,n){switch(e){case"s":return yt(mt.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]}class pe extends pt{priority=30;parse(t,e){const n=t=>Math.trunc(t*Math.pow(10,3-e.length));return xt(kt(e.length,t),n)}set(t,e,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]}function ge(t){const e=h(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}class me extends pt{priority=10;parse(t,e){switch(e){case"X":return vt(bt.basicOptionalMinutes,t);case"XX":return vt(bt.basic,t);case"XXXX":return vt(bt.basicOptionalSeconds,t);case"XXXXX":return vt(bt.extendedOptionalSeconds,t);case"XXX":default:return vt(bt.extended,t)}}set(t,e,n){return e.timestampIsSet?t:u(t,t.getTime()-ge(t)-n)}incompatibleTokens=["t","T","x"]}class be extends pt{priority=10;parse(t,e){switch(e){case"x":return vt(bt.basicOptionalMinutes,t);case"xx":return vt(bt.basic,t);case"xxxx":return vt(bt.basicOptionalSeconds,t);case"xxxxx":return vt(bt.extendedOptionalSeconds,t);case"xxx":default:return vt(bt.extended,t)}}set(t,e,n){return e.timestampIsSet?t:u(t,t.getTime()-ge(t)-n)}incompatibleTokens=["t","T","X"]}class xe extends pt{priority=40;parse(t){return wt(t)}set(t,e,n){return[u(t,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"}class ye extends pt{priority=20;parse(t){return wt(t)}set(t,e,n){return[u(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const ve={G:new gt,y:new Dt,Y:new Ot,R:new Et,u:new Rt,Q:new It,q:new Lt,M:new zt,L:new Nt,w:new Wt,I:new Ut,d:new Gt,D:new Zt,E:new Kt,e:new te,c:new ee,i:new re,a:new oe,b:new se,B:new ae,h:new le,H:new ce,K:new ue,k:new he,m:new de,s:new fe,S:new pe,X:new me,x:new be,t:new xe,T:new ye},we=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ke=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_e=/^'([^]*?)'?$/,Me=/''/g,Se=/\S/,Te=/[a-zA-Z]/;function De(t,e,n,i){const r=()=>u(i?.in||n,NaN),o=at(),s=i?.locale??o.locale??q,a=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?r():h(n,i?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},d=[new ft(i?.in,n)],f=e.match(ke).map((t=>{const e=t[0];if(e in Q){const n=Q[e];return n(t,s.formatLong)}return t})).join("").match(we),p=[];for(let u of f){!i?.useAdditionalWeekYearTokens&&nt(u)&&it(u,e,t),!i?.useAdditionalDayOfYearTokens&&et(u)&&it(u,e,t);const n=u[0],o=ve[n];if(o){const{incompatibleTokens:e}=o;if(Array.isArray(e)){const t=p.find((t=>e.includes(t.token)||t.token===n));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${u}\` at the same time`)}else if("*"===o.incompatibleTokens&&p.length>0)throw new RangeError(`The format string mustn't contain \`${u}\` and any other token at the same time`);p.push({token:n,fullToken:u});const i=o.run(t,u,s.match,c);if(!i)return r();d.push(i.setter),t=i.rest}else{if(n.match(Te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===u?u="'":"'"===n&&(u=Ce(u)),0!==t.indexOf(u))return r();t=t.slice(u.length)}}if(t.length>0&&Se.test(t))return r();const g=d.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,n)=>n.indexOf(t)===e)).map((t=>d.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let m=h(n,i?.in);if(isNaN(+m))return r();const b={};for(const u of g){if(!u.validate(m,c))return r();const t=u.set(m,b,c);Array.isArray(t)?(m=t[0],Object.assign(b,t[1])):m=t}return m}function Ce(t){return t.match(_e)[1].replace(Me,"'")}function Ae(t,e){const n=()=>u(e?.in,NaN),i=e?.additionalDigits??2,r=Ie(t);let o;if(r.date){const t=Le(r.date,i);o=ze(t.restDateString,t.year)}if(!o||isNaN(+o))return n();const s=+o;let a,l=0;if(r.time&&(l=Fe(r.time),isNaN(l)))return n();if(!r.timezone){const t=new Date(s+l),n=h(0,e?.in);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}return a=He(r.timezone),isNaN(a)?n():h(s+l+a,e?.in)}const Oe={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Pe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ee=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ie(t){const e={},n=t.split(Oe.dateTimeDelimiter);let i;if(n.length>2)return e;if(/:/.test(n[0])?i=n[0]:(e.date=n[0],i=n[1],Oe.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Oe.timeZoneDelimiter)[0],i=t.substr(e.date.length,t.length))),i){const t=Oe.timezone.exec(i);t?(e.time=i.replace(t[1],""),e.timezone=t[1]):e.time=i}return e}function Le(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=t.match(n);if(!i)return{year:NaN,restDateString:""};const r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:t.slice((i[1]||i[2]).length)}}function ze(t,e){if(null===e)return new Date(NaN);const n=t.match(Pe);if(!n)return new Date(NaN);const i=!!n[4],r=Ne(n[1]),o=Ne(n[2])-1,s=Ne(n[3]),a=Ne(n[4]),l=Ne(n[5])-1;if(i)return Ue(e,a,l)?We(e,a,l):new Date(NaN);{const t=new Date(0);return Ye(e,o,s)&&Ve(e,r)?(t.setUTCFullYear(e,o,Math.max(r,s)),t):new Date(NaN)}}function Ne(t){return t?parseInt(t):1}function Fe(t){const e=t.match(Ee);if(!e)return NaN;const n=je(e[1]),i=je(e[2]),r=je(e[3]);return qe(n,i,r)?n*a+i*s+1e3*r:NaN}function je(t){return t&&parseFloat(t.replace(",","."))||0}function He(t){if("Z"===t)return 0;const e=t.match(Re);if(!e)return 0;const n="+"===e[1]?-1:1,i=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return Xe(i,r)?n*(i*a+r*s):NaN}function We(t,e,n){const i=new Date(0);i.setUTCFullYear(t,0,4);const r=i.getUTCDay()||7,o=7*(e-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}const $e=[31,null,31,30,31,30,31,31,30,31,30,31];function Be(t){return t%400===0||t%4===0&&t%100!==0}function Ye(t,e,n){return e>=0&&e<=11&&n>=1&&n<=($e[e]||(Be(t)?29:28))}function Ve(t,e){return e>=1&&e<=(Be(t)?366:365)}function Ue(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function qe(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Xe(t,e){return e>=0&&e<=59}function Ge(t){return t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}function Ze(t){return!(!Ge(t)&&"number"!==typeof t||isNaN(+h(t)))}function Qe(t,...e){const n=u.bind(null,t||e.find((t=>"object"===typeof t)));return e.map(n)}function Je(t,e){const n=h(t,e?.in);return n.setHours(0,0,0,0),n}function Ke(t,e,n){const[i,r]=Qe(n?.in,t,e),s=Je(i),a=Je(r),l=+s-ge(s),c=+a-ge(a);return Math.round((l-c)/o)}function tn(t,e){const n=h(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function en(t,e){const n=h(t,e?.in),i=Ke(n,tn(n)),r=i+1;return r}function nn(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const rn={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return nn("yy"===e?i%100:i,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):nn(n+1,2)},d(t,e){return nn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h(t,e){return nn(t.getHours()%12||12,e.length)},H(t,e){return nn(t.getHours(),e.length)},m(t,e){return nn(t.getMinutes(),e.length)},s(t,e){return nn(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),r=Math.trunc(i*Math.pow(10,n-3));return nn(r,e.length)}},on={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sn={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),i=e>0?e:1-e;return n.ordinalNumber(i,{unit:"year"})}return rn.y(t,e)},Y:function(t,e,n,i){const r=At(t,i),o=r>0?r:1-r;if("YY"===e){const t=o%100;return nn(t,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):nn(o,e.length)},R:function(t,e){const n=$t(t);return nn(n,e.length)},u:function(t,e){const n=t.getFullYear();return nn(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return nn(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return nn(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return rn.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return nn(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const r=jt(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):nn(r,e.length)},I:function(t,e,n){const i=Yt(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):nn(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):rn.d(t,e)},D:function(t,e,n){const i=en(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):nn(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return nn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return nn(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return nn(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours(),r=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let r;switch(r=12===i?on.noon:0===i?on.midnight:i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let r;switch(r=i>=17?on.evening:i>=12?on.afternoon:i>=4?on.morning:on.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return rn.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):rn.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):nn(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):nn(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):rn.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):rn.s(t,e)},S:function(t,e){return rn.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return ln(i);case"XXXX":case"XX":return cn(i);case"XXXXX":case"XXX":default:return cn(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return ln(i);case"xxxx":case"xx":return cn(i);case"xxxxx":case"xxx":default:return cn(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+an(i,":");case"OOOO":default:return"GMT"+cn(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+an(i,":");case"zzzz":default:return"GMT"+cn(i,":")}},t:function(t,e,n){const i=Math.trunc(+t/1e3);return nn(i,e.length)},T:function(t,e,n){return nn(+t,e.length)}};function an(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+nn(o,2)}function ln(t,e){if(t%60===0){const e=t>0?"-":"+";return e+nn(Math.abs(t)/60,2)}return cn(t,e)}function cn(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=nn(Math.trunc(i/60),2),o=nn(i%60,2);return n+r+e+o}const un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dn=/^'([^]*?)'?$/,fn=/''/g,pn=/[a-zA-Z]/;function gn(t,e,n){const i=st(),r=n?.locale??i.locale??q,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=h(t,n?.in);if(!Ze(a))throw new RangeError("Invalid time value");let l=e.match(hn).map((t=>{const e=t[0];if("p"===e||"P"===e){const n=Q[e];return n(t,r.formatLong)}return t})).join("").match(un).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:mn(t)};if(sn[e])return{isToken:!0,value:t};if(e.match(pn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!n?.useAdditionalWeekYearTokens&&nt(o)||!n?.useAdditionalDayOfYearTokens&&et(o))&&it(o,e,String(t));const s=sn[o[0]];return s(a,o,r.localize,c)})).join("")}function mn(t){const e=t.match(dn);return e?e[1].replace(fn,"'"):t}function bn(t,e,n){return u(n?.in||t,+h(t)+e)}function xn(t,e,n){return bn(t,1e3*e,n)}function yn(t,e,n){const i=h(t,n?.in);return i.setTime(i.getTime()+e*s),i}function vn(t,e,n){return bn(t,e*a,n)}function wn(t,e,n){return Qt(t,7*e,n)}function kn(t,e,n){const i=h(t,n?.in);if(isNaN(e))return u(n?.in||t,NaN);if(!e)return i;const r=i.getDate(),o=u(n?.in||t,i.getTime());o.setMonth(i.getMonth()+e+1,0);const s=o.getDate();return r>=s?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function _n(t,e,n){return kn(t,3*e,n)}function Mn(t,e,n){return kn(t,12*e,n)}function Sn(t,e){return+h(t)-+h(e)}function Tn(t){return e=>{const n=t?Math[t]:Math.trunc,i=n(e);return 0===i?0:i}}function Dn(t,e,n){const i=Sn(t,e)/1e3;return Tn(n?.roundingMethod)(i)}function Cn(t,e,n){const i=Sn(t,e)/s;return Tn(n?.roundingMethod)(i)}function An(t,e,n){const[i,r]=Qe(n?.in,t,e),o=(+i-+r)/a;return Tn(n?.roundingMethod)(o)}function On(t,e,n){const[i,r]=Qe(n?.in,t,e),o=Pn(i,r),s=Math.abs(Ke(i,r));i.setDate(i.getDate()-o*s);const a=Number(Pn(i,r)===-o),l=o*(s-a);return 0===l?0:l}function Pn(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function En(t,e,n){const i=On(t,e,n)/7;return Tn(n?.roundingMethod)(i)}function Rn(t,e){const n=+h(t)-+h(e);return n<0?-1:n>0?1:n}function In(t,e,n){const[i,r]=Qe(n?.in,t,e),o=i.getFullYear()-r.getFullYear(),s=i.getMonth()-r.getMonth();return 12*o+s}function Ln(t,e){const n=h(t,e?.in);return n.setHours(23,59,59,999),n}function zn(t,e){const n=h(t,e?.in),i=n.getMonth();return n.setFullYear(n.getFullYear(),i+1,0),n.setHours(23,59,59,999),n}function Nn(t,e){const n=h(t,e?.in);return+Ln(n,e)===+zn(n,e)}function Fn(t,e,n){const[i,r,o]=Qe(n?.in,t,t,e),s=Rn(r,o),a=Math.abs(In(r,o));if(a<1)return 0;1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*a);let l=Rn(r,o)===-s;Nn(i)&&1===a&&1===Rn(i,o)&&(l=!1);const c=s*(a-+l);return 0===c?0:c}function jn(t,e,n){const i=Fn(t,e,n)/3;return Tn(n?.roundingMethod)(i)}function Hn(t,e,n){const[i,r]=Qe(n?.in,t,e);return i.getFullYear()-r.getFullYear()}function Wn(t,e,n){const[i,r]=Qe(n?.in,t,e),o=Rn(i,r),s=Math.abs(Hn(i,r));i.setFullYear(1584),r.setFullYear(1584);const a=Rn(i,r)===-o,l=o*(s-+a);return 0===l?0:l}function $n(t,e){const n=h(t,e?.in);return n.setMilliseconds(0),n}function Bn(t,e){const n=h(t,e?.in);return n.setSeconds(0,0),n}function Yn(t,e){const n=h(t,e?.in);return n.setMinutes(0,0,0),n}function Vn(t,e){const n=h(t,e?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Un(t,e){const n=h(t,e?.in),i=n.getMonth(),r=i-i%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function qn(t,e){const n=h(t,e?.in);return n.setMilliseconds(999),n}function Xn(t,e){const n=h(t,e?.in);return n.setSeconds(59,999),n}function Gn(t,e){const n=h(t,e?.in);return n.setMinutes(59,59,999),n}function Zn(t,e){const n=st(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=h(t,e?.in),o=r.getDay(),s=6+(o{let t=0;return()=>t++})();function Z(t){return null===t||void 0===t}function Q(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function J(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function K(t){return("number"===typeof t||t instanceof Number)&&isFinite(+t)}function tt(t,e){return K(t)?t:e}function et(t,e){return"undefined"===typeof t?e:t}const nt=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e,it=(t,e)=>"string"===typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rt(t,e,n){if(t&&"function"===typeof t.call)return t.apply(n,e)}function ot(t,e,n,i){let r,o,s;if(Q(t))if(o=t.length,i)for(r=o-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;rt,x:t=>t.x,y:t=>t.y};function pt(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function gt(t){const e=pt(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}function mt(t,e){const n=ft[e]||(ft[e]=gt(e));return n(t)}function bt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const yt=t=>"undefined"!==typeof t,xt=t=>"function"===typeof t,vt=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function wt(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const kt=Math.PI,_t=2*kt,Mt=_t+kt,St=Number.POSITIVE_INFINITY,Tt=kt/180,Dt=kt/2,Ct=kt/4,At=2*kt/3,Ot=Math.log10,Pt=Math.sign;function Et(t,e,n){return Math.abs(t-e)t-e)).pop(),e}function Lt(t){return"symbol"===typeof t||"object"===typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function zt(t){return!Lt(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Nt(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Ft(t,e,n){let i,r,o;for(i=0,r=t.length;il&&c=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Zt(t,e,n){n=n||(n=>t[n]1)i=o+r>>1,n(i)?o=i:r=i;return{lo:o,hi:r}}const Qt=(t,e,n,i)=>Zt(t,n,i?i=>{const r=t[i][e];return rt[i][e]Zt(t,n,(i=>t[i][e]>=n));function Kt(t,e,n){let i=0,r=t.length;while(ii&&t[r-1]>n)r--;return i>0||r{const n="_onData"+bt(e),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const r=i.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"===typeof t[n]&&t[n](...e)})),r}})})))}function ne(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(te.forEach((e=>{delete t[e]})),delete t._chartjs)}function ie(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const re=function(){return"undefined"===typeof window?function(t){return t()}:window.requestAnimationFrame}();function oe(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,re.call(window,(()=>{i=!1,t.apply(e,n)})))}}function se(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const ae=t=>"start"===t?"left":"end"===t?"right":"center",le=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2,ce=(t,e,n,i)=>{const r=i?"left":"right";return t===r?n:"center"===t?(e+n)/2:e};function ue(t,e,n){const i=e.length;let r=0,o=i;if(t._sorted){const{iScale:s,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=s.axis,{min:h,max:d,minDefined:f,maxDefined:p}=s.getUserBounds();if(f){if(r=Math.min(Qt(l,u,h).lo,n?i:Qt(e,u,s.getPixelForValue(h)).lo),c){const t=l.slice(0,r+1).reverse().findIndex((t=>!Z(t[a.axis])));r-=Math.max(0,t)}r=qt(r,0,i-1)}if(p){let t=Math.max(Qt(l,s.axis,d,!0).hi+1,n?0:Qt(e,u,s.getPixelForValue(d),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!Z(t[a.axis])));t+=Math.max(0,e)}o=qt(t,r,i)-r}else o=i-r}return{start:r,count:o}}function he(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),o}const de=t=>0===t||1===t,fe=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/n),pe=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/n)+1,ge={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Dt),easeOutSine:t=>Math.sin(t*Dt),easeInOutSine:t=>-.5*(Math.cos(kt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>de(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>de(t)?t:fe(t,.075,.3),easeOutElastic:t=>de(t)?t:pe(t,.075,.3),easeInOutElastic(t){const e=.1125,n=.45;return de(t)?t:t<.5?.5*fe(2*t,e,n):.5+.5*pe(2*t-1,e,n)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ge.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*ge.easeInBounce(2*t):.5*ge.easeOutBounce(2*t-1)+.5};function me(t){if(t&&"object"===typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function be(t){return me(t)?t:new q(t)}function ye(t){return me(t)?t:new q(t).saturate(.5).darken(.1).hexString()}const xe=["x","y","borderWidth","radius","tension"],ve=["color","borderColor","backgroundColor"];function we(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:ve},numbers:{type:"number",properties:xe}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})}function ke(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _e=new Map;function Me(t,e){e=e||{};const n=t+JSON.stringify(e);let i=_e.get(n);return i||(i=new Intl.NumberFormat(t,e),_e.set(n,i)),i}function Se(t,e,n){return Me(e,n).format(t)}const Te={values(t){return Q(t)?t:""+t},numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,o=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=De(t,n)}const s=Ot(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Se(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Ot(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Te.numeric.call(this,t,e,n):""}};function De(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Ce={formatters:Te};function Ae(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ce.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}const Oe=Object.create(null),Pe=Object.create(null);function Ee(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ye(e.backgroundColor),this.hoverBorderColor=(t,e)=>ye(e.borderColor),this.hoverColor=(t,e)=>ye(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Re(this,t,e)}get(t){return Ee(this,t)}describe(t,e){return Re(Pe,t,e)}override(t,e){return Re(Oe,t,e)}route(t,e,n,i){const r=Ee(this,t),o=Ee(this,n),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[i];return J(t)?Object.assign({},e,t):et(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Le=new Ie({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[we,ke,Ae]);function ze(t){return!t||Z(t.size)||Z(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ne(t,e,n,i,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),o>i&&(i=o),i}function Fe(t,e,n,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let s=0;const a=n.length;let l,c,u,h,d;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function Be(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,Xe(t,o),l=0;l+t||0;function rn(t,e){const n={},i=J(e),r=i?Object.keys(e):e,o=J(t)?i?n=>et(t[n],t[e[n]]):e=>t[e]:()=>t;for(const s of r)n[s]=nn(o(s));return n}function on(t){return rn(t,{top:"y",right:"x",bottom:"y",left:"x"})}function sn(t){return rn(t,["topLeft","topRight","bottomLeft","bottomRight"])}function an(t){const e=on(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ln(t,e){t=t||{},e=e||Le.font;let n=et(t.size,e.size);"string"===typeof n&&(n=parseInt(n,10));let i=et(t.style,e.style);i&&!(""+i).match(tn)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:et(t.family,e.family),lineHeight:en(et(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:et(t.weight,e.weight),string:""};return r.string=ze(r),r}function cn(t,e,n,i){let r,o,s,a=!0;for(r=0,o=t.length;rn&&0===t?0:t+e;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function hn(t,e){return Object.assign(Object.create(t),e)}function dn(t,e=[""],n,i,r=(()=>t[0])){const o=n||t;"undefined"===typeof i&&(i=Cn("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:r,override:n=>dn([n,...t],e,o,i)};return new Proxy(s,{deleteProperty(e,n){return delete e[n],delete e._keys,delete t[0][n],!0},get(n,i){return bn(n,i,(()=>Dn(i,e,t,n)))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return An(t).includes(e)},ownKeys(t){return An(t)},set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function fn(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:pn(t,i),setContext:e=>fn(t,e,n,i),override:r=>fn(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty(e,n){return delete e[n],delete t[n],!0},get(t,e,n){return bn(t,e,(()=>yn(t,e,n)))},getOwnPropertyDescriptor(e,n){return e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,n){return Reflect.has(t,n)},ownKeys(){return Reflect.ownKeys(t)},set(e,n,i){return t[n]=i,delete e[n],!0}})}function pn(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:xt(n)?n:()=>n,isIndexable:xt(i)?i:()=>i}}const gn=(t,e)=>t?t+bt(e):e,mn=(t,e)=>J(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function bn(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function yn(t,e,n){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=t;let a=i[e];return xt(a)&&s.isScriptable(e)&&(a=xn(e,a,t,n)),Q(a)&&a.length&&(a=vn(e,a,t,s.isIndexable)),mn(e,a)&&(a=fn(a,r,o&&o[e],s)),a}function xn(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,s||i);return a.delete(t),mn(t,l)&&(l=Mn(r._scopes,r,t,l)),l}function vn(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=n;if("undefined"!==typeof o.index&&i(t))return e[o.index%e.length];if(J(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Mn(i,r,t,l);e.push(fn(n,o,s&&s[t],a))}}return e}function wn(t,e,n){return xt(t)?t(e,n):t}const kn=(t,e)=>!0===t?e:"string"===typeof t?mt(e,t):void 0;function _n(t,e,n,i,r){for(const o of e){const e=kn(n,o);if(e){t.add(e);const o=wn(e._fallback,n,r);if("undefined"!==typeof o&&o!==n&&o!==i)return o}else if(!1===e&&"undefined"!==typeof i&&n!==i)return null}return!1}function Mn(t,e,n,i){const r=e._rootScopes,o=wn(e._fallback,n,i),s=[...t,...r],a=new Set;a.add(i);let l=Sn(a,s,n,o||n,i);return null!==l&&(("undefined"===typeof o||o===n||(l=Sn(a,s,o,l,i),null!==l))&&dn(Array.from(a),[""],r,o,(()=>Tn(e,n,i))))}function Sn(t,e,n,i,r){while(n)n=_n(t,e,n,i,r);return n}function Tn(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Q(r)&&J(n)?n:r||{}}function Dn(t,e,n,i){let r;for(const o of e)if(r=Cn(gn(o,t),n),"undefined"!==typeof r)return mn(t,r)?Mn(n,i,t,r):r}function Cn(t,e){for(const n of e){if(!n)continue;const e=n[t];if("undefined"!==typeof e)return e}}function An(t){let e=t._keys;return e||(e=t._keys=On(t._scopes)),e}function On(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}function Pn(t,e,n,i){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(i);let a,l,c,u;for(a=0,l=i;ae"x"===t?"y":"x";function Ln(t,e,n,i){const r=t.skip?e:t,o=e,s=n.skip?e:n,a=Bt(o,r),l=Bt(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,d=i*u;return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function zn(t,e,n){const i=t.length;let r,o,s,a,l,c=Rn(t,0);for(let u=0;u!t.skip))),"monotone"===e.cubicInterpolationMode)Fn(t,r);else{let n=i?t[t.length-1]:t[0];for(o=0,s=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);function Un(t,e){return Vn(t).getPropertyValue(e)}const qn=["top","right","bottom","left"];function Xn(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const o=qn[r];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Gn=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Zn(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:o}=i;let s,a,l=!1;if(Gn(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:s,y:a,box:l}}function Qn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=Vn(n),o="border-box"===r.boxSizing,s=Xn(r,"padding"),a=Xn(r,"border","width"),{x:l,y:c,box:u}=Zn(t,n),h=s.left+(u&&a.left),d=s.top+(u&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}function Jn(t,e,n){let i,r;if(void 0===e||void 0===n){const o=t&&Bn(t);if(o){const t=o.getBoundingClientRect(),s=Vn(o),a=Xn(s,"border","width"),l=Xn(s,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=Yn(s.maxWidth,o,"clientWidth"),r=Yn(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||St,maxHeight:r||St}}const Kn=t=>Math.round(10*t)/10;function ti(t,e,n,i){const r=Vn(t),o=Xn(r,"margin"),s=Yn(r.maxWidth,t,"clientWidth")||St,a=Yn(r.maxHeight,t,"clientHeight")||St,l=Jn(t,e,n);let{width:c,height:u}=l;if("content-box"===r.boxSizing){const t=Xn(r,"border","width"),e=Xn(r,"padding");c-=e.width+t.width,u-=e.height+t.height}c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=Kn(Math.min(c,s,l.maxWidth)),u=Kn(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Kn(c/2));const h=void 0!==e||void 0!==n;return h&&i&&l.height&&u>l.height&&(u=l.height,c=Kn(Math.floor(u*i))),{width:c,height:u}}function ei(t,e,n){const i=e||1,r=Kn(t.height*i),o=Kn(t.width*i);t.height=Kn(t.height),t.width=Kn(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=i,s.height=r,s.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const ni=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};$n()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function ii(t,e){const n=Un(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function ri(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function oi(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function si(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=ri(t,r,n),a=ri(r,o,n),l=ri(o,e,n),c=ri(s,a,n),u=ri(a,l,n);return ri(c,u,n)}const ai=function(t,e){return{x(n){return t+t+e-n},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}},li=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ci(t,e,n){return t?ai(e,n):li()}function ui(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function hi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function di(t){return"angle"===t?{between:Ut,compare:Yt,normalize:Vt}:{between:Gt,compare:(t,e)=>t-e,normalize:t=>t}}function fi({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:r}}function pi(t,e,n){const{property:i,start:r,end:o}=n,{between:s,normalize:a}=di(i),l=e.length;let c,u,{start:h,end:d,loop:f}=t;if(f){for(h+=l,d+=l,c=0,u=l;cl(r,b,g)&&0!==a(r,b),w=()=>0===a(o,g)||l(o,b,g),k=()=>y||v(),_=()=>!y||w();for(let M=u,S=u;M<=h;++M)m=e[M%s],m.skip||(g=c(m[i]),g!==b&&(y=l(g,r,o),null===x&&k()&&(x=0===a(g,r)?M:S),null!==x&&_()&&(p.push(fi({start:x,end:M,loop:d,count:s,style:f})),x=null),S=M,b=g));return null!==x&&p.push(fi({start:x,end:h,loop:d,count:s,style:f})),p}function mi(t,e){const n=[],i=t.segments;for(let r=0;rr&&t[o%e].skip)o--;return o%=e,{start:r,end:o}}function yi(t,e,n,i){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=n;++s){const n=t[s%r];n.skip||n.stop?l.skip||(i=!1,o.push({start:e%r,end:(s-1)%r,loop:i}),e=a=n.stop?s:null):(a=s,l.skip&&(e=s)),l=n}return null!==a&&o.push({start:e%r,end:a%r,loop:i}),o}function xi(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=bi(n,r,o,i);if(!0===i)return vi(t,[{start:s,end:a,loop:o}],n,e);const l=a{let i;const r=d[t];return i="string"===typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function p(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth,i=t.formats[n]||t.formats[t.defaultWidth];return i}}const g={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},m={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},b={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},y={date:p({formats:g,defaultWidth:"full"}),time:p({formats:m,defaultWidth:"full"}),dateTime:p({formats:b,defaultWidth:"full"})},x={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},v=(t,e,n,i)=>x[t];function w(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let r;if("formatting"===i&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=n?.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=n?.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}const o=t.argumentCallback?t.argumentCallback(e):e;return r[o]}}const k={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},M={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},S={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},T={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},D={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},C=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},A={ordinalNumber:C,era:w({values:k,defaultWidth:"wide"}),quarter:w({values:_,defaultWidth:"wide",argumentCallback:t=>t-1}),month:w({values:M,defaultWidth:"wide"}),day:w({values:S,defaultWidth:"wide"}),dayPeriod:w({values:T,defaultWidth:"wide",formattingValues:D,defaultFormattingWidth:"wide"})};function O(t){return(e,n={})=>{const i=n.width,r=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;const s=o[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?E(a,(t=>t.test(s))):P(a,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(s.length);return{value:c,rest:u}}}function P(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function E(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const r=i[0],o=e.match(t.parsePattern);if(!o)return null;let s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=e.slice(r.length);return{value:s,rest:a}}}const I=/^(\d+)(th|st|nd|rd)?/i,L=/\d+/i,z={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},N={any:[/^b/i,/^(a|c)/i]},F={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},j={any:[/1/i,/2/i,/3/i,/4/i]},H={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},W={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},B={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Y={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},V={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},U={ordinalNumber:R({matchPattern:I,parsePattern:L,valueCallback:t=>parseInt(t,10)}),era:O({matchPatterns:z,defaultMatchWidth:"wide",parsePatterns:N,defaultParseWidth:"any"}),quarter:O({matchPatterns:F,defaultMatchWidth:"wide",parsePatterns:j,defaultParseWidth:"any",valueCallback:t=>t+1}),month:O({matchPatterns:H,defaultMatchWidth:"wide",parsePatterns:W,defaultParseWidth:"any"}),day:O({matchPatterns:$,defaultMatchWidth:"wide",parsePatterns:B,defaultParseWidth:"any"}),dayPeriod:O({matchPatterns:Y,defaultMatchWidth:"any",parsePatterns:V,defaultParseWidth:"any"})},q={code:"en-US",formatDistance:f,formatLong:y,formatRelative:v,localize:A,match:U,options:{weekStartsOn:0,firstWeekContainsDate:1}};const X=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Z=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return X(t,e);let o;switch(i){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",X(i,e)).replace("{{time}}",G(r,e))},Q={p:G,P:Z},J=/^D+$/,K=/^Y+$/,tt=["D","DD","YY","YYYY"];function et(t){return J.test(t)}function nt(t){return K.test(t)}function it(t,e,n){const i=rt(t,e,n);if(console.warn(i),tt.includes(t))throw new RangeError(i)}function rt(t,e,n){const i="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}let ot={};function st(){return ot}function at(){return Object.assign({},st())}function lt(t,e){const n=ct(e)?new e(0):u(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function ct(t){return"function"===typeof t&&t.prototype?.constructor===t}const ut=10;class ht{subPriority=0;validate(t,e){return!0}}class dt extends ht{constructor(t,e,n,i,r){super(),this.value=t,this.validateValue=e,this.setValue=n,this.priority=i,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,n){return this.setValue(t,e,this.value,n)}}class ft extends ht{priority=ut;subPriority=-1;constructor(t,e){super(),this.context=t||(t=>u(e,t))}set(t,e){return e.timestampIsSet?t:u(t,lt(t,this.context))}}class pt{run(t,e,n,i){const r=this.parse(t,e,n,i);return r?{setter:new dt(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,n){return!0}}class gt extends pt{priority=140;parse(t,e,n){switch(e){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"});case"GGGGG":return n.era(t,{width:"narrow"});case"GGGG":default:return n.era(t,{width:"wide"})||n.era(t,{width:"abbreviated"})||n.era(t,{width:"narrow"})}}set(t,e,n){return e.era=n,t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const mt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},bt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function yt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function xt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function vt(t,e){const n=e.match(t);if(!n)return null;if("Z"===n[0])return{value:0,rest:e.slice(1)};const i="+"===n[1]?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,c=n[5]?parseInt(n[5],10):0;return{value:i*(r*a+o*s+c*l),rest:e.slice(n[0].length)}}function wt(t){return xt(mt.anyDigitsSigned,t)}function kt(t,e){switch(t){case 1:return xt(mt.singleDigit,e);case 2:return xt(mt.twoDigits,e);case 3:return xt(mt.threeDigits,e);case 4:return xt(mt.fourDigits,e);default:return xt(new RegExp("^\\d{1,"+t+"}"),e)}}function _t(t,e){switch(t){case 1:return xt(mt.singleDigitSigned,e);case 2:return xt(mt.twoDigitsSigned,e);case 3:return xt(mt.threeDigitsSigned,e);case 4:return xt(mt.fourDigitsSigned,e);default:return xt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Mt(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function St(t,e){const n=e>0,i=n?e:1-e;let r;if(i<=50)r=t||100;else{const e=i+50,n=100*Math.trunc(e/100),o=t>=e%100;r=t+n-(o?100:0)}return n?r:1-r}function Tt(t){return t%400===0||t%4===0&&t%100!==0}class Dt extends pt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return yt(kt(4,t),i);case"yo":return yt(n.ordinalNumber(t,{unit:"year"}),i);default:return yt(kt(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n){const i=t.getFullYear();if(n.isTwoDigitYear){const e=St(n.year,i);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const r="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}function Ct(t,e){const n=st(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=h(t,e?.in),o=r.getDay(),s=(o=+a?i+1:+n>=+c?i:i-1}class Ot extends pt{priority=130;parse(t,e,n){const i=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return yt(kt(4,t),i);case"Yo":return yt(n.ordinalNumber(t,{unit:"year"}),i);default:return yt(kt(e.length,t),i)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,n,i){const r=At(t,i);if(n.isTwoDigitYear){const e=St(n.year,r);return t.setFullYear(e,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Ct(t,i)}const o="era"in e&&1!==e.era?1-n.year:n.year;return t.setFullYear(o,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Ct(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}function Pt(t,e){return Ct(t,{...e,weekStartsOn:1})}class Et extends pt{priority=130;parse(t,e){return _t("R"===e?4:e.length,t)}set(t,e,n){const i=u(t,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Pt(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Rt extends pt{priority=130;parse(t,e){return _t("u"===e?4:e.length,t)}set(t,e,n){return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class It extends pt{priority=120;parse(t,e,n){switch(e){case"Q":case"QQ":return kt(e.length,t);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(t,{width:"wide",context:"formatting"})||n.quarter(t,{width:"abbreviated",context:"formatting"})||n.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Lt extends pt{priority=120;parse(t,e,n){switch(e){case"q":case"qq":return kt(e.length,t);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(t,{width:"wide",context:"standalone"})||n.quarter(t,{width:"abbreviated",context:"standalone"})||n.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,n){return t.setMonth(3*(n-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class zt extends pt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"M":return yt(xt(mt.month,t),i);case"MM":return yt(kt(2,t),i);case"Mo":return yt(n.ordinalNumber(t,{unit:"month"}),i);case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(t,{width:"wide",context:"formatting"})||n.month(t,{width:"abbreviated",context:"formatting"})||n.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}}class Nt extends pt{priority=110;parse(t,e,n){const i=t=>t-1;switch(e){case"L":return yt(xt(mt.month,t),i);case"LL":return yt(kt(2,t),i);case"Lo":return yt(n.ordinalNumber(t,{unit:"month"}),i);case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(t,{width:"wide",context:"standalone"})||n.month(t,{width:"abbreviated",context:"standalone"})||n.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,n){return t.setMonth(n,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Ft(t,e){const n=st(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=At(t,e),o=u(e?.in||t,0);o.setFullYear(r,0,i),o.setHours(0,0,0,0);const s=Ct(o,e);return s}function jt(t,e){const n=h(t,e?.in),i=+Ct(n,e)-+Ft(n,e);return Math.round(i/r)+1}function Ht(t,e,n){const i=h(t,n?.in),r=jt(i,n)-e;return i.setDate(i.getDate()-7*r),h(i,n?.in)}class Wt extends pt{priority=100;parse(t,e,n){switch(e){case"w":return xt(mt.week,t);case"wo":return n.ordinalNumber(t,{unit:"week"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n,i){return Ct(Ht(t,n,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function $t(t,e){const n=h(t,e?.in),i=n.getFullYear(),r=u(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);const o=Pt(r),s=u(n,0);s.setFullYear(i,0,4),s.setHours(0,0,0,0);const a=Pt(s);return n.getTime()>=o.getTime()?i+1:n.getTime()>=a.getTime()?i:i-1}function Bt(t,e){const n=$t(t,e),i=u(e?.in||t,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),Pt(i)}function Yt(t,e){const n=h(t,e?.in),i=+Pt(n)-+Bt(n);return Math.round(i/r)+1}function Vt(t,e,n){const i=h(t,n?.in),r=Yt(i,n)-e;return i.setDate(i.getDate()-7*r),i}class Ut extends pt{priority=100;parse(t,e,n){switch(e){case"I":return xt(mt.week,t);case"Io":return n.ordinalNumber(t,{unit:"week"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,n){return Pt(Vt(t,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const qt=[31,28,31,30,31,30,31,31,30,31,30,31],Xt=[31,29,31,30,31,30,31,31,30,31,30,31];class Gt extends pt{priority=90;subPriority=1;parse(t,e,n){switch(e){case"d":return xt(mt.date,t);case"do":return n.ordinalNumber(t,{unit:"date"});default:return kt(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=Tt(n),r=t.getMonth();return i?e>=1&&e<=Xt[r]:e>=1&&e<=qt[r]}set(t,e,n){return t.setDate(n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Zt extends pt{priority=90;subpriority=1;parse(t,e,n){switch(e){case"D":case"DD":return xt(mt.dayOfYear,t);case"Do":return n.ordinalNumber(t,{unit:"date"});default:return kt(e.length,t)}}validate(t,e){const n=t.getFullYear(),i=Tt(n);return i?e>=1&&e<=366:e>=1&&e<=365}set(t,e,n){return t.setMonth(0,n),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Qt(t,e,n){const i=h(t,n?.in);return isNaN(e)?u(n?.in||t,NaN):e?(i.setDate(i.getDate()+e),i):i}function Jt(t,e,n){const i=st(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=h(t,n?.in),s=o.getDay(),a=e%7,l=(a+7)%7,c=7-r,u=e<0||e>6?e-(s+c)%7:(l+c)%7-(s+c)%7;return Qt(o,u,n)}class Kt extends pt{priority=90;parse(t,e,n){switch(e){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class te extends pt{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return yt(kt(e.length,t),r);case"eo":return yt(n.ordinalNumber(t,{unit:"day"}),r);case"eee":return n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeeee":return n.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class ee extends pt{priority=90;parse(t,e,n,i){const r=t=>{const e=7*Math.floor((t-1)/7);return(t+i.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return yt(kt(e.length,t),r);case"co":return yt(n.ordinalNumber(t,{unit:"day"}),r);case"ccc":return n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"ccccc":return n.day(t,{width:"narrow",context:"standalone"});case"cccccc":return n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(t,{width:"wide",context:"standalone"})||n.day(t,{width:"abbreviated",context:"standalone"})||n.day(t,{width:"short",context:"standalone"})||n.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,n,i){return t=Jt(t,n,i),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function ne(t,e){const n=h(t,e?.in).getDay();return 0===n?7:n}function ie(t,e,n){const i=h(t,n?.in),r=ne(i,n),o=e-r;return Qt(i,o,n)}class re extends pt{priority=90;parse(t,e,n){const i=t=>0===t?7:t;switch(e){case"i":case"ii":return kt(e.length,t);case"io":return n.ordinalNumber(t,{unit:"day"});case"iii":return yt(n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiii":return yt(n.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return yt(n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return yt(n.day(t,{width:"wide",context:"formatting"})||n.day(t,{width:"abbreviated",context:"formatting"})||n.day(t,{width:"short",context:"formatting"})||n.day(t,{width:"narrow",context:"formatting"}),i)}}validate(t,e){return e>=1&&e<=7}set(t,e,n){return t=ie(t,n),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class oe extends pt{priority=80;parse(t,e,n){switch(e){case"a":case"aa":case"aaa":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class se extends pt{priority=80;parse(t,e,n){switch(e){case"b":case"bb":case"bbb":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class ae extends pt{priority=80;parse(t,e,n){switch(e){case"B":case"BB":case"BBB":return n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(t,{width:"wide",context:"formatting"})||n.dayPeriod(t,{width:"abbreviated",context:"formatting"})||n.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,n){return t.setHours(Mt(n),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class le extends pt{priority=70;parse(t,e,n){switch(e){case"h":return xt(mt.hour12h,t);case"ho":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):i||12!==n?t.setHours(n,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class ce extends pt{priority=70;parse(t,e,n){switch(e){case"H":return xt(mt.hour23h,t);case"Ho":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,n){return t.setHours(n,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class ue extends pt{priority=70;parse(t,e,n){switch(e){case"K":return xt(mt.hour11h,t);case"Ko":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,n){const i=t.getHours()>=12;return i&&n<12?t.setHours(n+12,0,0,0):t.setHours(n,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class he extends pt{priority=70;parse(t,e,n){switch(e){case"k":return xt(mt.hour24h,t);case"ko":return n.ordinalNumber(t,{unit:"hour"});default:return kt(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,n){const i=n<=24?n%24:n;return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class de extends pt{priority=60;parse(t,e,n){switch(e){case"m":return xt(mt.minute,t);case"mo":return n.ordinalNumber(t,{unit:"minute"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setMinutes(n,0,0),t}incompatibleTokens=["t","T"]}class fe extends pt{priority=50;parse(t,e,n){switch(e){case"s":return xt(mt.second,t);case"so":return n.ordinalNumber(t,{unit:"second"});default:return kt(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,n){return t.setSeconds(n,0),t}incompatibleTokens=["t","T"]}class pe extends pt{priority=30;parse(t,e){const n=t=>Math.trunc(t*Math.pow(10,3-e.length));return yt(kt(e.length,t),n)}set(t,e,n){return t.setMilliseconds(n),t}incompatibleTokens=["t","T"]}function ge(t){const e=h(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}class me extends pt{priority=10;parse(t,e){switch(e){case"X":return vt(bt.basicOptionalMinutes,t);case"XX":return vt(bt.basic,t);case"XXXX":return vt(bt.basicOptionalSeconds,t);case"XXXXX":return vt(bt.extendedOptionalSeconds,t);case"XXX":default:return vt(bt.extended,t)}}set(t,e,n){return e.timestampIsSet?t:u(t,t.getTime()-ge(t)-n)}incompatibleTokens=["t","T","x"]}class be extends pt{priority=10;parse(t,e){switch(e){case"x":return vt(bt.basicOptionalMinutes,t);case"xx":return vt(bt.basic,t);case"xxxx":return vt(bt.basicOptionalSeconds,t);case"xxxxx":return vt(bt.extendedOptionalSeconds,t);case"xxx":default:return vt(bt.extended,t)}}set(t,e,n){return e.timestampIsSet?t:u(t,t.getTime()-ge(t)-n)}incompatibleTokens=["t","T","X"]}class ye extends pt{priority=40;parse(t){return wt(t)}set(t,e,n){return[u(t,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"}class xe extends pt{priority=20;parse(t){return wt(t)}set(t,e,n){return[u(t,n),{timestampIsSet:!0}]}incompatibleTokens="*"}const ve={G:new gt,y:new Dt,Y:new Ot,R:new Et,u:new Rt,Q:new It,q:new Lt,M:new zt,L:new Nt,w:new Wt,I:new Ut,d:new Gt,D:new Zt,E:new Kt,e:new te,c:new ee,i:new re,a:new oe,b:new se,B:new ae,h:new le,H:new ce,K:new ue,k:new he,m:new de,s:new fe,S:new pe,X:new me,x:new be,t:new ye,T:new xe},we=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ke=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_e=/^'([^]*?)'?$/,Me=/''/g,Se=/\S/,Te=/[a-zA-Z]/;function De(t,e,n,i){const r=()=>u(i?.in||n,NaN),o=at(),s=i?.locale??o.locale??q,a=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,l=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?r():h(n,i?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},d=[new ft(i?.in,n)],f=e.match(ke).map((t=>{const e=t[0];if(e in Q){const n=Q[e];return n(t,s.formatLong)}return t})).join("").match(we),p=[];for(let u of f){!i?.useAdditionalWeekYearTokens&&nt(u)&&it(u,e,t),!i?.useAdditionalDayOfYearTokens&&et(u)&&it(u,e,t);const n=u[0],o=ve[n];if(o){const{incompatibleTokens:e}=o;if(Array.isArray(e)){const t=p.find((t=>e.includes(t.token)||t.token===n));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${u}\` at the same time`)}else if("*"===o.incompatibleTokens&&p.length>0)throw new RangeError(`The format string mustn't contain \`${u}\` and any other token at the same time`);p.push({token:n,fullToken:u});const i=o.run(t,u,s.match,c);if(!i)return r();d.push(i.setter),t=i.rest}else{if(n.match(Te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===u?u="'":"'"===n&&(u=Ce(u)),0!==t.indexOf(u))return r();t=t.slice(u.length)}}if(t.length>0&&Se.test(t))return r();const g=d.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,n)=>n.indexOf(t)===e)).map((t=>d.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let m=h(n,i?.in);if(isNaN(+m))return r();const b={};for(const u of g){if(!u.validate(m,c))return r();const t=u.set(m,b,c);Array.isArray(t)?(m=t[0],Object.assign(b,t[1])):m=t}return m}function Ce(t){return t.match(_e)[1].replace(Me,"'")}function Ae(t,e){const n=()=>u(e?.in,NaN),i=e?.additionalDigits??2,r=Ie(t);let o;if(r.date){const t=Le(r.date,i);o=ze(t.restDateString,t.year)}if(!o||isNaN(+o))return n();const s=+o;let a,l=0;if(r.time&&(l=Fe(r.time),isNaN(l)))return n();if(!r.timezone){const t=new Date(s+l),n=h(0,e?.in);return n.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),n.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),n}return a=He(r.timezone),isNaN(a)?n():h(s+l+a,e?.in)}const Oe={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Pe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ee=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ie(t){const e={},n=t.split(Oe.dateTimeDelimiter);let i;if(n.length>2)return e;if(/:/.test(n[0])?i=n[0]:(e.date=n[0],i=n[1],Oe.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Oe.timeZoneDelimiter)[0],i=t.substr(e.date.length,t.length))),i){const t=Oe.timezone.exec(i);t?(e.time=i.replace(t[1],""),e.timezone=t[1]):e.time=i}return e}function Le(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=t.match(n);if(!i)return{year:NaN,restDateString:""};const r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:t.slice((i[1]||i[2]).length)}}function ze(t,e){if(null===e)return new Date(NaN);const n=t.match(Pe);if(!n)return new Date(NaN);const i=!!n[4],r=Ne(n[1]),o=Ne(n[2])-1,s=Ne(n[3]),a=Ne(n[4]),l=Ne(n[5])-1;if(i)return Ue(e,a,l)?We(e,a,l):new Date(NaN);{const t=new Date(0);return Ye(e,o,s)&&Ve(e,r)?(t.setUTCFullYear(e,o,Math.max(r,s)),t):new Date(NaN)}}function Ne(t){return t?parseInt(t):1}function Fe(t){const e=t.match(Ee);if(!e)return NaN;const n=je(e[1]),i=je(e[2]),r=je(e[3]);return qe(n,i,r)?n*a+i*s+1e3*r:NaN}function je(t){return t&&parseFloat(t.replace(",","."))||0}function He(t){if("Z"===t)return 0;const e=t.match(Re);if(!e)return 0;const n="+"===e[1]?-1:1,i=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return Xe(i,r)?n*(i*a+r*s):NaN}function We(t,e,n){const i=new Date(0);i.setUTCFullYear(t,0,4);const r=i.getUTCDay()||7,o=7*(e-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}const $e=[31,null,31,30,31,30,31,31,30,31,30,31];function Be(t){return t%400===0||t%4===0&&t%100!==0}function Ye(t,e,n){return e>=0&&e<=11&&n>=1&&n<=($e[e]||(Be(t)?29:28))}function Ve(t,e){return e>=1&&e<=(Be(t)?366:365)}function Ue(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function qe(t,e,n){return 24===t?0===e&&0===n:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Xe(t,e){return e>=0&&e<=59}function Ge(t){return t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}function Ze(t){return!(!Ge(t)&&"number"!==typeof t||isNaN(+h(t)))}function Qe(t,...e){const n=u.bind(null,t||e.find((t=>"object"===typeof t)));return e.map(n)}function Je(t,e){const n=h(t,e?.in);return n.setHours(0,0,0,0),n}function Ke(t,e,n){const[i,r]=Qe(n?.in,t,e),s=Je(i),a=Je(r),l=+s-ge(s),c=+a-ge(a);return Math.round((l-c)/o)}function tn(t,e){const n=h(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function en(t,e){const n=h(t,e?.in),i=Ke(n,tn(n)),r=i+1;return r}function nn(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const rn={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return nn("yy"===e?i%100:i,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):nn(n+1,2)},d(t,e){return nn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h(t,e){return nn(t.getHours()%12||12,e.length)},H(t,e){return nn(t.getHours(),e.length)},m(t,e){return nn(t.getMinutes(),e.length)},s(t,e){return nn(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),r=Math.trunc(i*Math.pow(10,n-3));return nn(r,e.length)}},on={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sn={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),i=e>0?e:1-e;return n.ordinalNumber(i,{unit:"year"})}return rn.y(t,e)},Y:function(t,e,n,i){const r=At(t,i),o=r>0?r:1-r;if("YY"===e){const t=o%100;return nn(t,2)}return"Yo"===e?n.ordinalNumber(o,{unit:"year"}):nn(o,e.length)},R:function(t,e){const n=$t(t);return nn(n,e.length)},u:function(t,e){const n=t.getFullYear();return nn(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return nn(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return nn(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return rn.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return nn(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const r=jt(t,i);return"wo"===e?n.ordinalNumber(r,{unit:"week"}):nn(r,e.length)},I:function(t,e,n){const i=Yt(t);return"Io"===e?n.ordinalNumber(i,{unit:"week"}):nn(i,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):rn.d(t,e)},D:function(t,e,n){const i=en(t);return"Do"===e?n.ordinalNumber(i,{unit:"dayOfYear"}):nn(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return nn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return nn(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return nn(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours(),r=i/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let r;switch(r=12===i?on.noon:0===i?on.midnight:i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let r;switch(r=i>=17?on.evening:i>=12?on.afternoon:i>=4?on.morning:on.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return rn.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):rn.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):nn(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):nn(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):rn.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):rn.s(t,e)},S:function(t,e){return rn.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return ln(i);case"XXXX":case"XX":return cn(i);case"XXXXX":case"XXX":default:return cn(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return ln(i);case"xxxx":case"xx":return cn(i);case"xxxxx":case"xxx":default:return cn(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+an(i,":");case"OOOO":default:return"GMT"+cn(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+an(i,":");case"zzzz":default:return"GMT"+cn(i,":")}},t:function(t,e,n){const i=Math.trunc(+t/1e3);return nn(i,e.length)},T:function(t,e,n){return nn(+t,e.length)}};function an(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+nn(o,2)}function ln(t,e){if(t%60===0){const e=t>0?"-":"+";return e+nn(Math.abs(t)/60,2)}return cn(t,e)}function cn(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),r=nn(Math.trunc(i/60),2),o=nn(i%60,2);return n+r+e+o}const un=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dn=/^'([^]*?)'?$/,fn=/''/g,pn=/[a-zA-Z]/;function gn(t,e,n){const i=st(),r=n?.locale??i.locale??q,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=h(t,n?.in);if(!Ze(a))throw new RangeError("Invalid time value");let l=e.match(hn).map((t=>{const e=t[0];if("p"===e||"P"===e){const n=Q[e];return n(t,r.formatLong)}return t})).join("").match(un).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:mn(t)};if(sn[e])return{isToken:!0,value:t};if(e.match(pn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(!n?.useAdditionalWeekYearTokens&&nt(o)||!n?.useAdditionalDayOfYearTokens&&et(o))&&it(o,e,String(t));const s=sn[o[0]];return s(a,o,r.localize,c)})).join("")}function mn(t){const e=t.match(dn);return e?e[1].replace(fn,"'"):t}function bn(t,e,n){return u(n?.in||t,+h(t)+e)}function yn(t,e,n){return bn(t,1e3*e,n)}function xn(t,e,n){const i=h(t,n?.in);return i.setTime(i.getTime()+e*s),i}function vn(t,e,n){return bn(t,e*a,n)}function wn(t,e,n){return Qt(t,7*e,n)}function kn(t,e,n){const i=h(t,n?.in);if(isNaN(e))return u(n?.in||t,NaN);if(!e)return i;const r=i.getDate(),o=u(n?.in||t,i.getTime());o.setMonth(i.getMonth()+e+1,0);const s=o.getDate();return r>=s?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function _n(t,e,n){return kn(t,3*e,n)}function Mn(t,e,n){return kn(t,12*e,n)}function Sn(t,e){return+h(t)-+h(e)}function Tn(t){return e=>{const n=t?Math[t]:Math.trunc,i=n(e);return 0===i?0:i}}function Dn(t,e,n){const i=Sn(t,e)/1e3;return Tn(n?.roundingMethod)(i)}function Cn(t,e,n){const i=Sn(t,e)/s;return Tn(n?.roundingMethod)(i)}function An(t,e,n){const[i,r]=Qe(n?.in,t,e),o=(+i-+r)/a;return Tn(n?.roundingMethod)(o)}function On(t,e,n){const[i,r]=Qe(n?.in,t,e),o=Pn(i,r),s=Math.abs(Ke(i,r));i.setDate(i.getDate()-o*s);const a=Number(Pn(i,r)===-o),l=o*(s-a);return 0===l?0:l}function Pn(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function En(t,e,n){const i=On(t,e,n)/7;return Tn(n?.roundingMethod)(i)}function Rn(t,e){const n=+h(t)-+h(e);return n<0?-1:n>0?1:n}function In(t,e,n){const[i,r]=Qe(n?.in,t,e),o=i.getFullYear()-r.getFullYear(),s=i.getMonth()-r.getMonth();return 12*o+s}function Ln(t,e){const n=h(t,e?.in);return n.setHours(23,59,59,999),n}function zn(t,e){const n=h(t,e?.in),i=n.getMonth();return n.setFullYear(n.getFullYear(),i+1,0),n.setHours(23,59,59,999),n}function Nn(t,e){const n=h(t,e?.in);return+Ln(n,e)===+zn(n,e)}function Fn(t,e,n){const[i,r,o]=Qe(n?.in,t,t,e),s=Rn(r,o),a=Math.abs(In(r,o));if(a<1)return 0;1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-s*a);let l=Rn(r,o)===-s;Nn(i)&&1===a&&1===Rn(i,o)&&(l=!1);const c=s*(a-+l);return 0===c?0:c}function jn(t,e,n){const i=Fn(t,e,n)/3;return Tn(n?.roundingMethod)(i)}function Hn(t,e,n){const[i,r]=Qe(n?.in,t,e);return i.getFullYear()-r.getFullYear()}function Wn(t,e,n){const[i,r]=Qe(n?.in,t,e),o=Rn(i,r),s=Math.abs(Hn(i,r));i.setFullYear(1584),r.setFullYear(1584);const a=Rn(i,r)===-o,l=o*(s-+a);return 0===l?0:l}function $n(t,e){const n=h(t,e?.in);return n.setMilliseconds(0),n}function Bn(t,e){const n=h(t,e?.in);return n.setSeconds(0,0),n}function Yn(t,e){const n=h(t,e?.in);return n.setMinutes(0,0,0),n}function Vn(t,e){const n=h(t,e?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Un(t,e){const n=h(t,e?.in),i=n.getMonth(),r=i-i%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function qn(t,e){const n=h(t,e?.in);return n.setMilliseconds(999),n}function Xn(t,e){const n=h(t,e?.in);return n.setSeconds(59,999),n}function Gn(t,e){const n=h(t,e?.in);return n.setMinutes(59,59,999),n}function Zn(t,e){const n=st(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=h(t,e?.in),o=r.getDay(),s=6+(on.intersect?t.inRange(e.x,e.y):a(t,e,n.axis)))}function u(t,e,n){let i=Number.POSITIVE_INFINITY;return c(t,e,n).reduce(((t,o)=>{const s=o.getCenterPoint(),a=l(e,s,n.axis),c=(0,r.aF)(e,a);return ct._index-e._index)).slice(0,1)}function h(t,e,n){const i=Math.cos(n),r=Math.sin(n),o=e.x,s=e.y;return{x:o+i*(t.x-o)-r*(t.y-s),y:s+r*(t.x-o)+i*(t.y-s)}}const d=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,f=.001,p=(t,e,n)=>Math.min(n,Math.max(e,t)),g=(t,e)=>t.value>=t.start-e&&t.value<=t.end+e;function m(t,e,n){for(const i of Object.keys(t))t[i]=p(t[i],e,n);return t}function b(t,e,n,i){return!(!t||!e||n<=0)&&Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(n+i,2)}function x(t,{x:e,y:n,x2:i,y2:r},o,{borderWidth:s,hitTolerance:a}){const l=(s+a)/2,c=t.x>=e-l-f&&t.x<=i+l+f,u=t.y>=n-l-f&&t.y<=r+l+f;return"x"===o?c:("y"===o||c)&&u}function y(t,{rect:e,center:n},i,{rotation:o,borderWidth:s,hitTolerance:a}){const l=h(t,n,(0,r.t)(-o));return x(l,e,i,{borderWidth:s,hitTolerance:a})}function v(t,e){const{centerX:n,centerY:i}=t.getProps(["centerX","centerY"],e);return{x:n,y:i}}function w(t,e,n,i=!0){const r=n.split(".");let o=0;for(const s of e.split(".")){const a=r[o++];if(parseInt(s,10)"string"===typeof t&&t.endsWith("%"),_=t=>parseFloat(t)/100,M=t=>p(_(t),0,1),S=(t,e)=>({x:t,y:e,x2:t,y2:e,width:0,height:0}),T={box:t=>S(t.centerX,t.centerY),doughnutLabel:t=>S(t.centerX,t.centerY),ellipse:t=>({centerX:t.centerX,centerY:t.centerX,radius:0,width:0,height:0}),label:t=>S(t.centerX,t.centerY),line:t=>S(t.x,t.y),point:t=>({centerX:t.centerX,centerY:t.centerY,radius:0,width:0,height:0}),polygon:t=>S(t.centerX,t.centerY)};function D(t,e){return"start"===e?0:"end"===e?t:k(e)?M(e)*t:t/2}function C(t,e,n=!0){return"number"===typeof e?e:k(e)?(n?M(e):_(e))*t:t}function A(t,e){const{x:n,width:i}=t,r=e.textAlign;return"center"===r?n+i/2:"end"===r||"right"===r?n+i:n}function O(t,e,{borderWidth:n,position:i,xAdjust:o,yAdjust:s},a){const l=(0,r.i)(a),c=e.width+(l?a.width:0)+n,u=e.height+(l?a.height:0)+n,h=P(i),d=L(t.x,c,o,h.x),f=L(t.y,u,s,h.y);return{x:d,y:f,x2:d+c,y2:f+u,width:c,height:u,centerX:d+c/2,centerY:f+u/2}}function P(t,e="center"){return(0,r.i)(t)?{x:(0,r.v)(t.x,e),y:(0,r.v)(t.y,e)}:(t=(0,r.v)(t,e),{x:t,y:t})}const E=(t,e)=>t&&t.autoFit&&e<1;function R(t,e){const n=t.font,i=(0,r.b)(n)?n:[n];return E(t,e)?i.map((function(t){const n=(0,r.a0)(t);return n.size=Math.floor(t.size*e),n.lineHeight=t.lineHeight,(0,r.a0)(n)})):i.map((t=>(0,r.a0)(t)))}function I(t){return t&&((0,r.h)(t.xValue)||(0,r.h)(t.yValue))}function L(t,e,n=0,i){return t-D(e,i)+n}function z(t,e,n){const i=n.init;if(i)return!0===i?F(e,n):j(t,e,n)}function N(t,e,n){let i=!1;return e.forEach((e=>{(0,r.a7)(t[e])?(i=!0,n[e]=t[e]):(0,r.h)(n[e])&&delete n[e]})),i}function F(t,e){const n=e.type||"line";return T[n](t)}function j(t,e,n){const i=(0,r.Q)(n.init,[{chart:t,properties:e,options:n}]);return!0===i?F(e,n):(0,r.i)(i)?i:void 0}const H=new Map,W=t=>isNaN(t)||t<=0,$=t=>t.reduce((function(t,e){return t+=e.string,t}),"");function B(t){if(t&&"object"===typeof t){const e=t.toString();return"[object HTMLImageElement]"===e||"[object HTMLCanvasElement]"===e}}function Y(t,{x:e,y:n},i){i&&(t.translate(e,n),t.rotate((0,r.t)(i)),t.translate(-e,-n))}function V(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle||"butt",t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle||"miter",t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,!0}function U(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY}function q(t,e){const n=e.content;if(B(n)){const t={width:C(n.width,e.width),height:C(n.height,e.height)};return t}const i=R(e),o=e.textStrokeWidth,s=(0,r.b)(n)?n:[n],a=s.join()+$(i)+o+(t._measureText?"-spriting":"");return H.has(a)||H.set(a,K(t,s,i,o)),H.get(a)}function X(t,e,n){const{x:i,y:o,width:s,height:a}=e;t.save(),U(t,n);const l=V(t,n);t.fillStyle=n.backgroundColor,t.beginPath(),(0,r.aw)(t,{x:i,y:o,w:s,h:a,radius:m((0,r.ay)(n.borderRadius),0,Math.min(s,a)/2)}),t.closePath(),t.fill(),l&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore()}function G(t,e,n,i){const o=n.content;if(B(o))return t.save(),t.globalAlpha=nt(n.opacity,o.style.opacity),t.drawImage(o,e.x,e.y,e.width,e.height),void t.restore();const s=(0,r.b)(o)?o:[o],a=R(n,i),l=n.color,c=(0,r.b)(l)?l:[l],u=A(e,n),h=e.y+n.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=n.textAlign,Z(t,n)&&tt(t,{x:u,y:h},s,a),et(t,{x:u,y:h},s,{fonts:a,colors:c}),t.restore()}function Z(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,!0}function Q(t,e,n,i){const{radius:o,options:s}=e,a=s.pointStyle,l=s.rotation;let c=(l||0)*r.b4;if(B(a))return t.save(),t.translate(n,i),t.rotate(c),t.drawImage(a,-a.width/2,-a.height/2,a.width,a.height),void t.restore();W(o)||J(t,{x:n,y:i,radius:o,rotation:l,style:a,rad:c})}function J(t,{x:e,y:n,radius:i,rotation:o,style:s,rad:a}){let l,c,u,h;switch(t.beginPath(),s){default:t.arc(e,n,i,0,r.T),t.closePath();break;case"triangle":t.moveTo(e+Math.sin(a)*i,n-Math.cos(a)*i),a+=r.b6,t.lineTo(e+Math.sin(a)*i,n-Math.cos(a)*i),a+=r.b6,t.lineTo(e+Math.sin(a)*i,n-Math.cos(a)*i),t.closePath();break;case"rectRounded":h=.516*i,u=i-h,l=Math.cos(a+r.b5)*u,c=Math.sin(a+r.b5)*u,t.arc(e-l,n-c,h,a-r.P,a-r.H),t.arc(e+c,n-l,h,a-r.H,a),t.arc(e+l,n+c,h,a,a+r.H),t.arc(e-c,n+l,h,a+r.H,a+r.P),t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*i,t.rect(e-u,n-u,2*u,2*u);break}a+=r.b5;case"rectRot":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+c,n-l),t.lineTo(e+l,n+c),t.lineTo(e-c,n+l),t.closePath();break;case"crossRot":a+=r.b5;case"cross":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l);break;case"star":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l),a+=r.b5,l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l);break;case"line":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c);break;case"dash":t.moveTo(e,n),t.lineTo(e+Math.cos(a)*i,n+Math.sin(a)*i);break}t.fill()}function K(t,e,n,i){t.save();const r=e.length;let o=0,s=i;for(let a=0;a0||0===o.borderWidth)&&(t.moveTo(c.x,c.y),t.lineTo(u.x,u.y)),t.moveTo(d.x,d.y),t.lineTo(f.x,f.y);const p=h({x:n,y:i},e.getCenterPoint(),(0,r.t)(-e.rotation));t.lineTo(p.x,p.y),t.stroke(),t.restore()}function ot(t,e){const{x:n,y:i,x2:r,y2:o}=t,s=st(t,e);let a,l;return"left"===e||"right"===e?(a={x:n+s,y:i},l={x:a.x,y:o}):(a={x:n,y:i+s},l={x:r,y:a.y}),{separatorStart:a,separatorEnd:l}}function st(t,e){const{width:n,height:i,options:r}=t,o=r.callout.margin+r.borderWidth/2;return"right"===e?n+o:"bottom"===e?i+o:-o}function at(t,e,n){const{y:i,width:r,height:o,options:s}=t,a=s.callout.start,l=lt(e,s.callout);let c,u;return"left"===e||"right"===e?(c={x:n.x,y:i+C(o,a)},u={x:c.x+l,y:c.y}):(c={x:n.x+C(r,a),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function lt(t,e){const n=e.side;return"left"===t||"top"===t?-n:n}function ct(t,e){const n=e.position;return it.includes(n)?n:ut(t,e)}function ut(t,e){const{x:n,y:i,x2:o,y2:s,width:a,height:l,pointX:c,pointY:u,centerX:d,centerY:f,rotation:p}=t,g={x:d,y:f},m=e.start,b=C(a,m),x=C(l,m),y=[n,n+b,n+b,o],v=[i+x,s,i,s],w=[];for(let k=0;k<4;k++){const t=h({x:y[k],y:v[k]},g,(0,r.t)(p));w.push({position:it[k],distance:(0,r.aF)(t,{x:c,y:u})})}return w.sort(((t,e)=>t.distance-e.distance))[0].position}function ht(t,e,n){const{pointX:i,pointY:r}=t,o=e.margin;let s=i,a=r;return"left"===n?s+=o:"right"===n?s-=o:"top"===n?a+=o:"bottom"===n&&(a-=o),t.inRange(s,a)}const dt={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function ft(t,e,n){return e="number"===typeof e?e:t.parse(e),(0,r.g)(e)?t.getPixelForValue(e):n}function pt(t,e,n){const i=e[n];if(i||"scaleID"===n)return i;const r=n.charAt(0),o=Object.values(t).filter((t=>t.axis&&t.axis===r));return o.length?o[0].id:r}function gt(t,e){if(t){const n=t.options.reverse,i=ft(t,e.min,n?e.end:e.start),r=ft(t,e.max,n?e.start:e.end);return{start:i,end:r}}}function mt(t,e){const{chartArea:n,scales:i}=t,r=i[pt(i,e,"xScaleID")],o=i[pt(i,e,"yScaleID")];let s=n.width/2,a=n.height/2;return r&&(s=ft(r,e.xValue,r.left+r.width/2)),o&&(a=ft(o,e.yValue,o.top+o.height/2)),{x:s,y:a}}function bt(t,e){const n=t.scales,i=n[pt(n,e,"xScaleID")],r=n[pt(n,e,"yScaleID")];if(!i&&!r)return{};let{left:o,right:s}=i||t.chartArea,{top:a,bottom:l}=r||t.chartArea;const c=kt(i,{min:e.xMin,max:e.xMax,start:o,end:s});o=c.start,s=c.end;const u=kt(r,{min:e.yMin,max:e.yMax,start:l,end:a});return a=u.start,l=u.end,{x:o,y:a,x2:s,y2:l,width:s-o,height:l-a,centerX:o+(s-o)/2,centerY:a+(l-a)/2}}function xt(t,e){if(!I(e)){const n=bt(t,e);let i=e.radius;i&&!isNaN(i)||(i=Math.min(n.width,n.height)/2,e.radius=i);const r=2*i,o=n.centerX+e.xAdjust,s=n.centerY+e.yAdjust;return{x:o-i,y:s-i,x2:o+i,y2:s+i,centerX:o,centerY:s,width:r,height:r,radius:i}}return wt(t,e)}function yt(t,e){const{scales:n,chartArea:i}=t,r=n[e.scaleID],o={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?_t(r,o,e):Mt(n,o,e),o}function vt(t,e){const n=bt(t,e);return n.initProperties=z(t,n,e),n.elements=[{type:"label",optionScope:"label",properties:Ct(t,n,e),initProperties:n.initProperties}],n}function wt(t,e){const n=mt(t,e),i=2*e.radius;return{x:n.x-e.radius+e.xAdjust,y:n.y-e.radius+e.yAdjust,x2:n.x+e.radius+e.xAdjust,y2:n.y+e.radius+e.yAdjust,centerX:n.x+e.xAdjust,centerY:n.y+e.yAdjust,radius:e.radius,width:i,height:i}}function kt(t,e){const n=gt(t,e)||e;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function _t(t,e,n){const i=ft(t,n.value,NaN),r=ft(t,n.endValue,i);t.isHorizontal()?(e.x=i,e.x2=r):(e.y=i,e.y2=r)}function Mt(t,e,n){for(const i of Object.keys(dt)){const r=t[pt(t,n,i)];if(r){const{min:t,max:o,start:s,end:a,startProp:l,endProp:c}=dt[i],u=gt(r,{min:n[t],max:n[o],start:r[s],end:r[a]});e[l]=u.start,e[c]=u.end}}}function St({properties:t,options:e},n,i,r){const{x:o,x2:s,width:a}=t;return Dt({start:o,end:s,size:a,borderWidth:e.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:e.label.xAdjust,size:n.width})}function Tt({properties:t,options:e},n,i,r){const{y:o,y2:s,height:a}=t;return Dt({start:o,end:s,size:a,borderWidth:e.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:e.label.yAdjust,size:n.height})}function Dt(t,e){const{start:n,end:i,borderWidth:r}=t,{position:o,padding:{start:s,end:a},adjust:l}=e,c=i-r-n-s-a-e.size;return n+r/2+l+D(c,o)}function Ct(t,e,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const o=P(i.position),s=(0,r.E)(i.padding),a=q(t.ctx,i),l=St({properties:e,options:n},a,o,s),c=Tt({properties:e,options:n},a,o,s),u=a.width+s.width,h=a.height+s.height;return{x:l,y:c,x2:l+u,y2:c+h,width:u,height:h,centerX:l+u/2,centerY:c+h/2,rotation:i.rotation}}const At=["enter","leave"],Ot=At.concat("click");function Pt(t,e,n){e.listened=N(n,Ot,e.listeners),e.moveListened=!1,At.forEach((t=>{(0,r.a7)(n[t])&&(e.moveListened=!0)})),e.listened&&e.moveListened||e.annotations.forEach((t=>{!e.listened&&(0,r.a7)(t.click)&&(e.listened=!0),e.moveListened||At.forEach((n=>{(0,r.a7)(t[n])&&(e.listened=!0,e.moveListened=!0)}))}))}function Et(t,e,n){if(t.listened)switch(e.type){case"mousemove":case"mouseout":return Rt(t,e,n);case"click":return Lt(t,e,n)}}function Rt(t,e,n){if(!t.moveListened)return;let i;i="mousemove"===e.type?s(t.visibleElements,e,n.interaction):[];const r=t.hovered;t.hovered=i;const o={state:t,event:e};let a=It(o,"leave",r,i);return It(o,"enter",i,r)||a}function It({state:t,event:e},n,i,r){let o;for(const s of i)r.indexOf(s)<0&&(o=zt(s.options[n]||t.listeners[n],s,e)||o);return o}function Lt(t,e,n){const i=t.listeners,r=s(t.visibleElements,e,n.interaction);let o;for(const s of r)o=zt(s.options.click||i.click,s,e)||o;return o}function zt(t,e,n){return!0===(0,r.Q)(t,[e.$context,n])}const Nt=["afterDraw","beforeDraw"];function Ft(t,e,n){const i=e.visibleElements;e.hooked=N(n,Nt,e.hooks),e.hooked||i.forEach((t=>{e.hooked||Nt.forEach((n=>{(0,r.a7)(t.options[n])&&(e.hooked=!0)}))}))}function jt(t,e,n){if(t.hooked){const i=e.options[n]||t.hooks[n];return(0,r.Q)(i,[e.$context])}}function Ht(t,e,n){const i=Ut(t.scales,e,n);let o=$t(e,i,"min","suggestedMin");o=$t(e,i,"max","suggestedMax")||o,o&&(0,r.a7)(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function Wt(t,e){for(const n of t)Yt(n,e)}function $t(t,e,n,i){if((0,r.g)(e[n])&&!Bt(t.options,n,i)){const i=t[n]!==e[n];return t[n]=e[n],i}}function Bt(t,e,n){return(0,r.h)(t[e])||(0,r.h)(t[n])}function Yt(t,e){for(const n of["scaleID","xScaleID","yScaleID"]){const i=pt(e,t,n);i&&!e[i]&&Vt(t,n)&&console.warn(`No scale found with id '${i}' for annotation '${t.id}'`)}}function Vt(t,e){if("scaleID"===e)return!0;const n=e.charAt(0);for(const i of["Min","Max","Value"])if((0,r.h)(t[n+i]))return!0;return!1}function Ut(t,e,n){const i=e.axis,o=e.id,s=i+"ScaleID",a={min:(0,r.v)(e.min,Number.NEGATIVE_INFINITY),max:(0,r.v)(e.max,Number.POSITIVE_INFINITY)};for(const r of n)r.scaleID===o?qt(r,e,["value","endValue"],a):pt(t,r,s)===o&&qt(r,e,[i+"Min",i+"Max",i+"Value"],a);return a}function qt(t,e,n,i){for(const o of n){const n=t[o];if((0,r.h)(n)){const t=e.parse(n);i.min=Math.min(i.min,t),i.max=Math.max(i.max,t)}}}class Xt extends i.W_{inRange(t,e,n,i){const{x:o,y:s}=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-this.options.rotation));return x({x:o,y:s},this.getProps(["x","y","x2","y2"],i),n,this.options)}getCenterPoint(t){return v(this,t)}draw(t){t.save(),Y(t,this.getCenterPoint(),this.options.rotation),X(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return vt(t,e)}}Xt.id="boxAnnotation",Xt.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Xt.defaultRoutes={borderColor:"color",backgroundColor:"color"},Xt.descriptors={label:{_fallback:!0}};class Gt extends i.W_{inRange(t,e,n,i){return y({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],i),center:this.getCenterPoint(i)},n,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options;e.display&&e.content&&(ee(t,this),t.save(),Y(t,this.getCenterPoint(),this.rotation),G(t,this,e,this._fitRatio),t.restore())}resolveElementProperties(t,e){const n=Zt(t,e);if(!n)return{};const{controllerMeta:i,point:r,radius:o}=Jt(t,e,n);let s=q(t.ctx,e);const a=Kt(s,o);E(e,a)&&(s={width:s.width*a,height:s.height*a});const{position:l,xAdjust:c,yAdjust:u}=e,h=O(r,s,{borderWidth:0,position:l,xAdjust:c,yAdjust:u});return{initProperties:z(t,h,e),...h,...i,rotation:e.rotation,_fitRatio:a}}}function Zt(t,e){return t.getSortedVisibleDatasetMetas().reduce((function(n,r){const o=r.controller;return o instanceof i.jI&&Qt(t,e,r.data)&&(!n||o.innerRadius=90?r:n}),void 0)}function Qt(t,e,n){if(!e.autoHide)return!0;for(let i=0;ih,b=m?r+p:s-p,x=te(b,u,h,g),y={_centerX:u,_centerY:h,_radius:g,_counterclockwise:m,...x};return{controllerMeta:y,point:f,radius:Math.min(a,Math.min(d.right-d.left,d.bottom-d.top)/2)}}function Kt({width:t,height:e},n){const i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return 2*n/i}function te(t,e,n,i){const o=Math.pow(n-t,2),s=Math.pow(i,2),a=-2*e,l=Math.pow(e,2)+o-s,c=Math.pow(a,2)-4*l;if(c<=0)return{_startAngle:0,_endAngle:r.T};const u=(-a-Math.sqrt(c))/2,h=(-a+Math.sqrt(c))/2;return{_startAngle:(0,r.D)({x:e,y:n},{x:u,y:t}).angle,_endAngle:(0,r.D)({x:e,y:n},{x:h,y:t}).angle}}function ee(t,e){const{_centerX:n,_centerY:i,_radius:r,_startAngle:o,_endAngle:s,_counterclockwise:a,options:l}=e;t.save();const c=V(t,l);t.fillStyle=l.backgroundColor,t.beginPath(),t.arc(n,i,r,o,s,a),t.closePath(),t.fill(),c&&t.stroke(),t.restore()}Gt.id="doughnutLabelAnnotation",Gt.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},Gt.defaultRoutes={};class ne extends i.W_{inRange(t,e,n,i){return y({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],i),center:this.getCenterPoint(i)},n,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options,n=!(0,r.h)(this._visible)||this._visible;e.display&&e.content&&n&&(t.save(),Y(t,this.getCenterPoint(),this.rotation),rt(t,this),X(t,this,e),G(t,ie(this),e),t.restore())}resolveElementProperties(t,e){let n;if(I(e))n=mt(t,e);else{const{centerX:i,centerY:r}=bt(t,e);n={x:i,y:r}}const i=(0,r.E)(e.padding),o=q(t.ctx,e),s=O(n,o,e,i);return{initProperties:z(t,s,e),pointX:n.x,pointY:n.y,...s,rotation:e.rotation}}}function ie({x:t,y:e,width:n,height:i,options:o}){const s=o.borderWidth/2,a=(0,r.E)(o.padding);return{x:t+a.left+s,y:e+a.top+s,width:n-a.left-a.right-o.borderWidth,height:i-a.top-a.bottom-o.borderWidth}}ne.id="labelAnnotation",ne.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ne.defaultRoutes={borderColor:"color"};const re=(t,e,n)=>({x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}),oe=(t,e,n)=>re(e,n,Math.abs((t-e.y)/(n.y-e.y))).x,se=(t,e,n)=>re(e,n,Math.abs((t-e.x)/(n.x-e.x))).y,ae=t=>t*t,le=(t,e,{x:n,y:i,x2:r,y2:o},s)=>"y"===s?{start:Math.min(i,o),end:Math.max(i,o),value:e}:{start:Math.min(n,r),end:Math.max(n,r),value:t},ce=(t,e,n,i)=>(1-i)*(1-i)*t+2*(1-i)*i*e+i*i*n,ue=(t,e,n,i)=>({x:ce(t.x,e.x,n.x,i),y:ce(t.y,e.y,n.y,i)}),he=(t,e,n,i)=>2*(1-i)*(e-t)+2*i*(n-e),de=(t,e,n,i)=>-Math.atan2(he(t.x,e.x,n.x,i),he(t.y,e.y,n.y,i))+.5*r.P;class fe extends i.W_{inRange(t,e,n,i){const r=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n){const n={mouseX:t,mouseY:e},{path:o,ctx:s}=this;if(o){V(s,this.options),s.lineWidth+=this.options.hitTolerance;const{chart:r}=this.$context,a=t*r.currentDevicePixelRatio,l=e*r.currentDevicePixelRatio,c=s.isPointInStroke(o,a,l)||ve(this,n,i);return s.restore(),c}const a=ae(r);return ye(this,n,a,i)||ve(this,n,i)}return ge(this,{mouseX:t,mouseY:e},n,{hitSize:r,useFinalPosition:i})}getCenterPoint(t){return v(this,t)}draw(t){const{x:e,y:n,x2:i,y2:r,cp:o,options:s}=this;if(t.save(),!V(t,s))return t.restore();U(t,s);const a=Math.sqrt(Math.pow(i-e,2)+Math.pow(r-n,2));if(s.curve&&o)return Ie(t,this,o,a),t.restore();const{startOpts:l,endOpts:c,startAdjust:u,endAdjust:h}=Ae(this),d=Math.atan2(r-n,i-e);t.translate(e,n),t.rotate(d),t.beginPath(),t.moveTo(0+u,0),t.lineTo(a-h,0),t.shadowColor=s.borderShadowColor,t.stroke(),Pe(t,0,u,l),Pe(t,a,-h,c),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const n=yt(t,e),{x:i,y:o,x2:s,y2:a}=n,l=me(n,t.chartArea),c=l?xe({x:i,y:o},{x:s,y:a},t.chartArea):{x:i,y:o,x2:s,y2:a,width:Math.abs(s-i),height:Math.abs(a-o)};if(c.centerX=(s+i)/2,c.centerY=(a+o)/2,c.initProperties=z(t,c,e),e.curve){const t={x:c.x,y:c.y},n={x:c.x2,y:c.y2};c.cp=Ee(c,e,(0,r.aF)(t,n))}const u=we(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}fe.id="lineAnnotation";const pe={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};function ge(t,{mouseX:e,mouseY:n},i,{hitSize:r,useFinalPosition:o}){const s=le(e,n,t.getProps(["x","y","x2","y2"],o),i);return g(s,r)||ve(t,{mouseX:e,mouseY:n},o,i)}function me({x:t,y:e,x2:n,y2:i},{top:r,right:o,bottom:s,left:a}){return!(to&&n>o||es&&i>s)}function be({x:t,y:e},n,{top:i,right:r,bottom:o,left:s}){return tr&&(e=se(r,{x:t,y:e},n),t=r),eo&&(t=oe(o,{x:t,y:e},n),e=o),{x:t,y:e}}function xe(t,e,n){const{x:i,y:r}=be(t,e,n),{x:o,y:s}=be(e,t,n);return{x:i,y:r,x2:o,y2:s,width:Math.abs(o-i),height:Math.abs(s-r)}}function ye(t,{mouseX:e,mouseY:n},i=f,r){const{x:o,y:s,x2:a,y2:l}=t.getProps(["x","y","x2","y2"],r),c=a-o,u=l-s,h=ae(c)+ae(u),d=0===h?-1:((e-o)*c+(n-s)*u)/h;let p,g;return d<0?(p=o,g=s):d>1?(p=a,g=l):(p=o+d*c,g=s+d*u),ae(e-p)+ae(n-g)<=i}function ve(t,{mouseX:e,mouseY:n},i,r){const o=t.label;return o.options.display&&o.inRange(e,n,r,i)}function we(t,e,n){const i=n.borderWidth,o=(0,r.E)(n.padding),s=q(t.ctx,n),a=s.width+o.width+i,l=s.height+o.height+i;return _e(e,n,{width:a,height:l,padding:o},t.chartArea)}function ke(t){const{x:e,y:n,x2:i,y2:o}=t,s=Math.atan2(o-n,i-e);return s>r.P/2?s-r.P:s0&&(r.w/2+o.left-i.x)/s,c=a>0&&(r.h/2+o.top-i.y)/a;return p(Math.max(l,c),0,.25)}function De(t,e){const{x:n,x2:i,y:r,y2:o}=t,s=Math.min(r,o)-e.top,a=Math.min(n,i)-e.left,l=e.bottom-Math.max(r,o),c=e.right-Math.max(n,i);return{x:Math.min(a,c),y:Math.min(s,l),dx:a<=c?1:-1,dy:s<=l?1:-1}}function Ce(t,e){const{size:n,min:i,max:r,padding:o}=e,s=n/2;return n>r-i?(r+i)/2:(i>=t-o-s&&(t=i+o+s),r<=t+o+s&&(t=r-o-s),t)}function Ae(t){const e=t.options,n=e.arrowHeads&&e.arrowHeads.start,i=e.arrowHeads&&e.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:Oe(t,n),endAdjust:Oe(t,i)}}function Oe(t,e){if(!e||!e.display)return 0;const{length:n,width:i}=e,r=t.options.borderWidth/2,o={x:n,y:i+r},s={x:0,y:r};return Math.abs(oe(0,o,s))}function Pe(t,e,n,i){if(!i||!i.display)return;const{length:r,width:o,fill:s,backgroundColor:a,borderColor:l}=i,c=Math.abs(e-r)+n;t.beginPath(),U(t,i),V(t,i),t.moveTo(c,-o),t.lineTo(e+n,0),t.lineTo(c,o),!0===s?(t.fillStyle=a||l,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=i.borderShadowColor,t.stroke()}function Ee(t,e,n){const{x:i,y:r,x2:o,y2:s,centerX:a,centerY:l}=t,c=Math.atan2(s-r,o-i),u=P(e.controlPoint,0),d={x:a+C(n,u.x,!1),y:l+C(n,u.y,!1)};return h(d,{x:a,y:l},c)}function Re(t,{x:e,y:n},{angle:i,adjust:r},o){o&&o.display&&(t.save(),t.translate(e,n),t.rotate(i),Pe(t,0,-r,o),t.restore())}function Ie(t,e,n,i){const{x:o,y:s,x2:a,y2:l,options:c}=e,{startOpts:u,endOpts:h,startAdjust:d,endAdjust:f}=Ae(e),p={x:o,y:s},g={x:a,y:l},m=de(p,n,g,0),b=de(p,n,g,1)-r.P,x=ue(p,n,g,d/i),y=ue(p,n,g,1-f/i),v=new Path2D;t.beginPath(),v.moveTo(x.x,x.y),v.quadraticCurveTo(n.x,n.y,y.x,y.y),t.shadowColor=c.borderShadowColor,t.stroke(v),e.path=v,e.ctx=t,Re(t,x,{angle:m,adjust:d},u),Re(t,y,{angle:b,adjust:f},h)}fe.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},pe),fill:!1,length:12,start:Object.assign({},pe),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ne.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},fe.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},fe.defaultRoutes={borderColor:"color"};class Le extends i.W_{inRange(t,e,n,i){const o=this.options.rotation,s=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n)return ze({x:t,y:e},this.getProps(["width","height","centerX","centerY"],i),o,s);const{x:a,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],i),d="y"===n?{start:l,end:u}:{start:a,end:c},p=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-o));return p[n]>=d.start-s-f&&p[n]<=d.end+s+f}getCenterPoint(t){return v(this,t)}draw(t){const{width:e,height:n,centerX:i,centerY:o,options:s}=this;t.save(),Y(t,this.getCenterPoint(),s.rotation),U(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const a=V(t,s);t.ellipse(i,o,n/2,e/2,r.P/2,0,2*r.P),t.fill(),a&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return vt(t,e)}}function ze(t,e,n,i){const{width:o,height:s,centerX:a,centerY:l}=e,c=o/2,u=s/2;if(c<=0||u<=0)return!1;const h=(0,r.t)(n||0),d=Math.cos(h),f=Math.sin(h),p=Math.pow(d*(t.x-a)+f*(t.y-l),2),g=Math.pow(f*(t.x-a)-d*(t.y-l),2);return p/Math.pow(c+i,2)+g/Math.pow(u+i,2)<=1.0001}Le.id="ellipseAnnotation",Le.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},Xt.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Le.defaultRoutes={borderColor:"color",backgroundColor:"color"},Le.descriptors={label:{_fallback:!0}};class Ne extends i.W_{inRange(t,e,n,i){const{x:r,y:o,x2:s,y2:a,width:l}=this.getProps(["x","y","x2","y2","width"],i),c=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n)return b({x:t,y:e},this.getCenterPoint(i),l/2,c);const u="y"===n?{start:o,end:a,value:e}:{start:r,end:s,value:t};return g(u,c)}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options,n=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,U(t,e);const i=V(t,e);Q(t,this,this.centerX,this.centerY),i&&!B(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=n}resolveElementProperties(t,e){const n=xt(t,e);return n.initProperties=z(t,n,e),n}}Ne.id="pointAnnotation",Ne.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Ne.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Fe extends i.W_{inRange(t,e,n,i){if("x"!==n&&"y"!==n)return this.options.radius>=.1&&this.elements.length>1&&He(this.elements,t,e,i);const o=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-this.options.rotation)),s=this.elements.map((t=>"y"===n?t.bY:t.bX)),a=Math.min(...s),l=Math.max(...s);return o[n]>=a&&o[n]<=l}getCenterPoint(t){return v(this,t)}draw(t){const{elements:e,options:n}=this;t.save(),t.beginPath(),t.fillStyle=n.backgroundColor,U(t,n);const i=V(t,n);let r=!0;for(const o of e)r?(t.moveTo(o.x,o.y),r=!1):t.lineTo(o.x,o.y);t.closePath(),t.fill(),i&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const n=xt(t,e),{sides:i,rotation:o}=e,s=[],a=2*r.P/i;let l=o*r.b4;for(let r=0;rn!==o.bY>n&&e<(o.bX-t.bX)*(n-t.bY)/(o.bY-t.bY)+t.bX&&(r=!r),o=t}return r}Fe.id="polygonAnnotation",Fe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Fe.defaultRoutes={borderColor:"color",backgroundColor:"color"};const We={box:Xt,doughnutLabel:Gt,ellipse:Le,label:ne,line:fe,point:Ne,polygon:Fe};Object.keys(We).forEach((t=>{r.d.describe(`elements.${We[t].id}`,{_fallback:"plugins.annotation.common"})}));const $e={update:Object.assign},Be=Ot.concat(Nt),Ye=(t,e)=>(0,r.i)(e)?Ke(t,e):t,Ve=t=>"color"===t||"font"===t;function Ue(t="line"){return We[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function qe(t,e,n,i){const o=Ge(t,n.animations,i),s=e.annotations,a=en(e.elements,s);for(let l=0;lYe(t,o))):n[i]=Ye(s,o)}return n}function tn(t,e,n,i){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,get elements(){return n.filter((t=>t&&t.options))},id:i.id,type:"annotation"}))}function en(t,e){const n=e.length,i=t.length;if(in&&t.splice(n,i-n);return t}var nn="3.1.0";const rn=new Map,on=t=>"doughnutLabel"!==t.type,sn=Ot.concat(Nt);var an={id:"annotation",version:nn,beforeRegister(){w("chart.js","4.0",i.kL.version)},afterRegister(){i.kL.register(We)},afterUnregister(){i.kL.unregister(We)},beforeInit(t){rn.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(t,e,n){const i=rn.get(t),o=i.annotations=[];let s=n.annotations;(0,r.i)(s)?Object.keys(s).forEach((t=>{const e=s[t];(0,r.i)(e)&&(e.id=t,o.push(e))})):(0,r.b)(s)&&o.push(...s),Wt(o.filter(on),t.scales)},afterDataLimits(t,e){const n=rn.get(t);Ht(t,e.scale,n.annotations.filter(on).filter((t=>t.display&&t.adjustScaleRange)))},afterUpdate(t,e,n){const i=rn.get(t);Pt(t,i,n),qe(t,i,n,e.mode),i.visibleElements=i.elements.filter((t=>!t.skip&&t.options.display)),Ft(t,i,n)},beforeDatasetsDraw(t,e,n){ln(t,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(t,e,n){ln(t,"afterDatasetsDraw",n.clip)},beforeDatasetDraw(t,e,n){ln(t,e.index,n.clip)},beforeDraw(t,e,n){ln(t,"beforeDraw",n.clip)},afterDraw(t,e,n){ln(t,"afterDraw",n.clip)},beforeEvent(t,e,n){const i=rn.get(t);Et(i,e.event,n)&&(e.changed=!0)},afterDestroy(t){rn.delete(t)},getAnnotations(t){const e=rn.get(t);return e?e.elements:[]},_getAnnotationElementsAtEventForMode(t,e,n){return s(t,e,n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:t=>!sn.includes(t)&&"init"!==t,annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${We[Ue(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Ve,_fallback:!0},_indexable:Ve}},additionalOptionScopes:[""]};function ln(t,e,n){const{ctx:i,chartArea:o}=t,s=rn.get(t);n&&(0,r.Y)(i,o);const a=cn(s.visibleElements,e).sort(((t,e)=>t.element.options.z-e.element.options.z));for(const r of a)un(i,o,s,r);n&&(0,r.$)(i)}function cn(t,e){const n=[];for(const i of t)if(i.options.drawTime===e&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const t of i.elements)t.options.display&&t.options.drawTime===e&&n.push({element:t});return n}function un(t,e,n,i){const r=i.element;i.main?(jt(n,r,"beforeDraw"),r.draw(t,e),jt(n,r,"afterDraw")):r.draw(t,e)}},3:function(t,e,n){n.d(e,{j:function(){return s}});var i=n(512);const r=t=>"boolean"===typeof t?`${t}`:0===t?"0":t,o=i.W,s=(t,e)=>n=>{var i;if(null==(null===e||void 0===e?void 0:e.variants))return o(t,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className);const{variants:s,defaultVariants:a}=e,l=Object.keys(s).map((t=>{const e=null===n||void 0===n?void 0:n[t],i=null===a||void 0===a?void 0:a[t];if(null===e)return null;const o=r(e)||r(i);return s[t][o]})),c=n&&Object.entries(n).reduce(((t,e)=>{let[n,i]=e;return void 0===i||(t[n]=i),t}),{}),u=null===e||void 0===e||null===(i=e.compoundVariants)||void 0===i?void 0:i.reduce(((t,e)=>{let{class:n,className:i,...r}=e;return Object.entries(r).every((t=>{let[e,n]=t;return Array.isArray(n)?n.includes({...a,...c}[e]):{...a,...c}[e]===n}))?[...t,n,i]:t}),[]);return o(t,l,u,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className)}},512:function(t,e,n){function i(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;en.intersect?t.inRange(e.x,e.y):a(t,e,n.axis)))}function u(t,e,n){let i=Number.POSITIVE_INFINITY;return c(t,e,n).reduce(((t,o)=>{const s=o.getCenterPoint(),a=l(e,s,n.axis),c=(0,r.aF)(e,a);return ct._index-e._index)).slice(0,1)}function h(t,e,n){const i=Math.cos(n),r=Math.sin(n),o=e.x,s=e.y;return{x:o+i*(t.x-o)-r*(t.y-s),y:s+r*(t.x-o)+i*(t.y-s)}}const d=(t,e)=>e>t||t.length>e.length&&t.slice(0,e.length)===e,f=.001,p=(t,e,n)=>Math.min(n,Math.max(e,t)),g=(t,e)=>t.value>=t.start-e&&t.value<=t.end+e;function m(t,e,n){for(const i of Object.keys(t))t[i]=p(t[i],e,n);return t}function b(t,e,n,i){return!(!t||!e||n<=0)&&Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(n+i,2)}function y(t,{x:e,y:n,x2:i,y2:r},o,{borderWidth:s,hitTolerance:a}){const l=(s+a)/2,c=t.x>=e-l-f&&t.x<=i+l+f,u=t.y>=n-l-f&&t.y<=r+l+f;return"x"===o?c:("y"===o||c)&&u}function x(t,{rect:e,center:n},i,{rotation:o,borderWidth:s,hitTolerance:a}){const l=h(t,n,(0,r.t)(-o));return y(l,e,i,{borderWidth:s,hitTolerance:a})}function v(t,e){const{centerX:n,centerY:i}=t.getProps(["centerX","centerY"],e);return{x:n,y:i}}function w(t,e,n,i=!0){const r=n.split(".");let o=0;for(const s of e.split(".")){const a=r[o++];if(parseInt(s,10)"string"===typeof t&&t.endsWith("%"),_=t=>parseFloat(t)/100,M=t=>p(_(t),0,1),S=(t,e)=>({x:t,y:e,x2:t,y2:e,width:0,height:0}),T={box:t=>S(t.centerX,t.centerY),doughnutLabel:t=>S(t.centerX,t.centerY),ellipse:t=>({centerX:t.centerX,centerY:t.centerX,radius:0,width:0,height:0}),label:t=>S(t.centerX,t.centerY),line:t=>S(t.x,t.y),point:t=>({centerX:t.centerX,centerY:t.centerY,radius:0,width:0,height:0}),polygon:t=>S(t.centerX,t.centerY)};function D(t,e){return"start"===e?0:"end"===e?t:k(e)?M(e)*t:t/2}function C(t,e,n=!0){return"number"===typeof e?e:k(e)?(n?M(e):_(e))*t:t}function A(t,e){const{x:n,width:i}=t,r=e.textAlign;return"center"===r?n+i/2:"end"===r||"right"===r?n+i:n}function O(t,e,{borderWidth:n,position:i,xAdjust:o,yAdjust:s},a){const l=(0,r.i)(a),c=e.width+(l?a.width:0)+n,u=e.height+(l?a.height:0)+n,h=P(i),d=L(t.x,c,o,h.x),f=L(t.y,u,s,h.y);return{x:d,y:f,x2:d+c,y2:f+u,width:c,height:u,centerX:d+c/2,centerY:f+u/2}}function P(t,e="center"){return(0,r.i)(t)?{x:(0,r.v)(t.x,e),y:(0,r.v)(t.y,e)}:(t=(0,r.v)(t,e),{x:t,y:t})}const E=(t,e)=>t&&t.autoFit&&e<1;function R(t,e){const n=t.font,i=(0,r.b)(n)?n:[n];return E(t,e)?i.map((function(t){const n=(0,r.a0)(t);return n.size=Math.floor(t.size*e),n.lineHeight=t.lineHeight,(0,r.a0)(n)})):i.map((t=>(0,r.a0)(t)))}function I(t){return t&&((0,r.h)(t.xValue)||(0,r.h)(t.yValue))}function L(t,e,n=0,i){return t-D(e,i)+n}function z(t,e,n){const i=n.init;if(i)return!0===i?F(e,n):j(t,e,n)}function N(t,e,n){let i=!1;return e.forEach((e=>{(0,r.a7)(t[e])?(i=!0,n[e]=t[e]):(0,r.h)(n[e])&&delete n[e]})),i}function F(t,e){const n=e.type||"line";return T[n](t)}function j(t,e,n){const i=(0,r.Q)(n.init,[{chart:t,properties:e,options:n}]);return!0===i?F(e,n):(0,r.i)(i)?i:void 0}const H=new Map,W=t=>isNaN(t)||t<=0,$=t=>t.reduce((function(t,e){return t+=e.string,t}),"");function B(t){if(t&&"object"===typeof t){const e=t.toString();return"[object HTMLImageElement]"===e||"[object HTMLCanvasElement]"===e}}function Y(t,{x:e,y:n},i){i&&(t.translate(e,n),t.rotate((0,r.t)(i)),t.translate(-e,-n))}function V(t,e){if(e&&e.borderWidth)return t.lineCap=e.borderCapStyle||"butt",t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle||"miter",t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor,!0}function U(t,e){t.shadowColor=e.backgroundShadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY}function q(t,e){const n=e.content;if(B(n)){const t={width:C(n.width,e.width),height:C(n.height,e.height)};return t}const i=R(e),o=e.textStrokeWidth,s=(0,r.b)(n)?n:[n],a=s.join()+$(i)+o+(t._measureText?"-spriting":"");return H.has(a)||H.set(a,K(t,s,i,o)),H.get(a)}function X(t,e,n){const{x:i,y:o,width:s,height:a}=e;t.save(),U(t,n);const l=V(t,n);t.fillStyle=n.backgroundColor,t.beginPath(),(0,r.aw)(t,{x:i,y:o,w:s,h:a,radius:m((0,r.ay)(n.borderRadius),0,Math.min(s,a)/2)}),t.closePath(),t.fill(),l&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore()}function G(t,e,n,i){const o=n.content;if(B(o))return t.save(),t.globalAlpha=nt(n.opacity,o.style.opacity),t.drawImage(o,e.x,e.y,e.width,e.height),void t.restore();const s=(0,r.b)(o)?o:[o],a=R(n,i),l=n.color,c=(0,r.b)(l)?l:[l],u=A(e,n),h=e.y+n.textStrokeWidth/2;t.save(),t.textBaseline="middle",t.textAlign=n.textAlign,Z(t,n)&&tt(t,{x:u,y:h},s,a),et(t,{x:u,y:h},s,{fonts:a,colors:c}),t.restore()}function Z(t,e){if(e.textStrokeWidth>0)return t.lineJoin="round",t.miterLimit=2,t.lineWidth=e.textStrokeWidth,t.strokeStyle=e.textStrokeColor,!0}function Q(t,e,n,i){const{radius:o,options:s}=e,a=s.pointStyle,l=s.rotation;let c=(l||0)*r.b4;if(B(a))return t.save(),t.translate(n,i),t.rotate(c),t.drawImage(a,-a.width/2,-a.height/2,a.width,a.height),void t.restore();W(o)||J(t,{x:n,y:i,radius:o,rotation:l,style:a,rad:c})}function J(t,{x:e,y:n,radius:i,rotation:o,style:s,rad:a}){let l,c,u,h;switch(t.beginPath(),s){default:t.arc(e,n,i,0,r.T),t.closePath();break;case"triangle":t.moveTo(e+Math.sin(a)*i,n-Math.cos(a)*i),a+=r.b6,t.lineTo(e+Math.sin(a)*i,n-Math.cos(a)*i),a+=r.b6,t.lineTo(e+Math.sin(a)*i,n-Math.cos(a)*i),t.closePath();break;case"rectRounded":h=.516*i,u=i-h,l=Math.cos(a+r.b5)*u,c=Math.sin(a+r.b5)*u,t.arc(e-l,n-c,h,a-r.P,a-r.H),t.arc(e+c,n-l,h,a-r.H,a),t.arc(e+l,n+c,h,a,a+r.H),t.arc(e-c,n+l,h,a+r.H,a+r.P),t.closePath();break;case"rect":if(!o){u=Math.SQRT1_2*i,t.rect(e-u,n-u,2*u,2*u);break}a+=r.b5;case"rectRot":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+c,n-l),t.lineTo(e+l,n+c),t.lineTo(e-c,n+l),t.closePath();break;case"crossRot":a+=r.b5;case"cross":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l);break;case"star":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l),a+=r.b5,l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c),t.moveTo(e+c,n-l),t.lineTo(e-c,n+l);break;case"line":l=Math.cos(a)*i,c=Math.sin(a)*i,t.moveTo(e-l,n-c),t.lineTo(e+l,n+c);break;case"dash":t.moveTo(e,n),t.lineTo(e+Math.cos(a)*i,n+Math.sin(a)*i);break}t.fill()}function K(t,e,n,i){t.save();const r=e.length;let o=0,s=i;for(let a=0;a0||0===o.borderWidth)&&(t.moveTo(c.x,c.y),t.lineTo(u.x,u.y)),t.moveTo(d.x,d.y),t.lineTo(f.x,f.y);const p=h({x:n,y:i},e.getCenterPoint(),(0,r.t)(-e.rotation));t.lineTo(p.x,p.y),t.stroke(),t.restore()}function ot(t,e){const{x:n,y:i,x2:r,y2:o}=t,s=st(t,e);let a,l;return"left"===e||"right"===e?(a={x:n+s,y:i},l={x:a.x,y:o}):(a={x:n,y:i+s},l={x:r,y:a.y}),{separatorStart:a,separatorEnd:l}}function st(t,e){const{width:n,height:i,options:r}=t,o=r.callout.margin+r.borderWidth/2;return"right"===e?n+o:"bottom"===e?i+o:-o}function at(t,e,n){const{y:i,width:r,height:o,options:s}=t,a=s.callout.start,l=lt(e,s.callout);let c,u;return"left"===e||"right"===e?(c={x:n.x,y:i+C(o,a)},u={x:c.x+l,y:c.y}):(c={x:n.x+C(r,a),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function lt(t,e){const n=e.side;return"left"===t||"top"===t?-n:n}function ct(t,e){const n=e.position;return it.includes(n)?n:ut(t,e)}function ut(t,e){const{x:n,y:i,x2:o,y2:s,width:a,height:l,pointX:c,pointY:u,centerX:d,centerY:f,rotation:p}=t,g={x:d,y:f},m=e.start,b=C(a,m),y=C(l,m),x=[n,n+b,n+b,o],v=[i+y,s,i,s],w=[];for(let k=0;k<4;k++){const t=h({x:x[k],y:v[k]},g,(0,r.t)(p));w.push({position:it[k],distance:(0,r.aF)(t,{x:c,y:u})})}return w.sort(((t,e)=>t.distance-e.distance))[0].position}function ht(t,e,n){const{pointX:i,pointY:r}=t,o=e.margin;let s=i,a=r;return"left"===n?s+=o:"right"===n?s-=o:"top"===n?a+=o:"bottom"===n&&(a-=o),t.inRange(s,a)}const dt={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function ft(t,e,n){return e="number"===typeof e?e:t.parse(e),(0,r.g)(e)?t.getPixelForValue(e):n}function pt(t,e,n){const i=e[n];if(i||"scaleID"===n)return i;const r=n.charAt(0),o=Object.values(t).filter((t=>t.axis&&t.axis===r));return o.length?o[0].id:r}function gt(t,e){if(t){const n=t.options.reverse,i=ft(t,e.min,n?e.end:e.start),r=ft(t,e.max,n?e.start:e.end);return{start:i,end:r}}}function mt(t,e){const{chartArea:n,scales:i}=t,r=i[pt(i,e,"xScaleID")],o=i[pt(i,e,"yScaleID")];let s=n.width/2,a=n.height/2;return r&&(s=ft(r,e.xValue,r.left+r.width/2)),o&&(a=ft(o,e.yValue,o.top+o.height/2)),{x:s,y:a}}function bt(t,e){const n=t.scales,i=n[pt(n,e,"xScaleID")],r=n[pt(n,e,"yScaleID")];if(!i&&!r)return{};let{left:o,right:s}=i||t.chartArea,{top:a,bottom:l}=r||t.chartArea;const c=kt(i,{min:e.xMin,max:e.xMax,start:o,end:s});o=c.start,s=c.end;const u=kt(r,{min:e.yMin,max:e.yMax,start:l,end:a});return a=u.start,l=u.end,{x:o,y:a,x2:s,y2:l,width:s-o,height:l-a,centerX:o+(s-o)/2,centerY:a+(l-a)/2}}function yt(t,e){if(!I(e)){const n=bt(t,e);let i=e.radius;i&&!isNaN(i)||(i=Math.min(n.width,n.height)/2,e.radius=i);const r=2*i,o=n.centerX+e.xAdjust,s=n.centerY+e.yAdjust;return{x:o-i,y:s-i,x2:o+i,y2:s+i,centerX:o,centerY:s,width:r,height:r,radius:i}}return wt(t,e)}function xt(t,e){const{scales:n,chartArea:i}=t,r=n[e.scaleID],o={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?_t(r,o,e):Mt(n,o,e),o}function vt(t,e){const n=bt(t,e);return n.initProperties=z(t,n,e),n.elements=[{type:"label",optionScope:"label",properties:Ct(t,n,e),initProperties:n.initProperties}],n}function wt(t,e){const n=mt(t,e),i=2*e.radius;return{x:n.x-e.radius+e.xAdjust,y:n.y-e.radius+e.yAdjust,x2:n.x+e.radius+e.xAdjust,y2:n.y+e.radius+e.yAdjust,centerX:n.x+e.xAdjust,centerY:n.y+e.yAdjust,radius:e.radius,width:i,height:i}}function kt(t,e){const n=gt(t,e)||e;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function _t(t,e,n){const i=ft(t,n.value,NaN),r=ft(t,n.endValue,i);t.isHorizontal()?(e.x=i,e.x2=r):(e.y=i,e.y2=r)}function Mt(t,e,n){for(const i of Object.keys(dt)){const r=t[pt(t,n,i)];if(r){const{min:t,max:o,start:s,end:a,startProp:l,endProp:c}=dt[i],u=gt(r,{min:n[t],max:n[o],start:r[s],end:r[a]});e[l]=u.start,e[c]=u.end}}}function St({properties:t,options:e},n,i,r){const{x:o,x2:s,width:a}=t;return Dt({start:o,end:s,size:a,borderWidth:e.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:e.label.xAdjust,size:n.width})}function Tt({properties:t,options:e},n,i,r){const{y:o,y2:s,height:a}=t;return Dt({start:o,end:s,size:a,borderWidth:e.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:e.label.yAdjust,size:n.height})}function Dt(t,e){const{start:n,end:i,borderWidth:r}=t,{position:o,padding:{start:s,end:a},adjust:l}=e,c=i-r-n-s-a-e.size;return n+r/2+l+D(c,o)}function Ct(t,e,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const o=P(i.position),s=(0,r.E)(i.padding),a=q(t.ctx,i),l=St({properties:e,options:n},a,o,s),c=Tt({properties:e,options:n},a,o,s),u=a.width+s.width,h=a.height+s.height;return{x:l,y:c,x2:l+u,y2:c+h,width:u,height:h,centerX:l+u/2,centerY:c+h/2,rotation:i.rotation}}const At=["enter","leave"],Ot=At.concat("click");function Pt(t,e,n){e.listened=N(n,Ot,e.listeners),e.moveListened=!1,At.forEach((t=>{(0,r.a7)(n[t])&&(e.moveListened=!0)})),e.listened&&e.moveListened||e.annotations.forEach((t=>{!e.listened&&(0,r.a7)(t.click)&&(e.listened=!0),e.moveListened||At.forEach((n=>{(0,r.a7)(t[n])&&(e.listened=!0,e.moveListened=!0)}))}))}function Et(t,e,n){if(t.listened)switch(e.type){case"mousemove":case"mouseout":return Rt(t,e,n);case"click":return Lt(t,e,n)}}function Rt(t,e,n){if(!t.moveListened)return;let i;i="mousemove"===e.type?s(t.visibleElements,e,n.interaction):[];const r=t.hovered;t.hovered=i;const o={state:t,event:e};let a=It(o,"leave",r,i);return It(o,"enter",i,r)||a}function It({state:t,event:e},n,i,r){let o;for(const s of i)r.indexOf(s)<0&&(o=zt(s.options[n]||t.listeners[n],s,e)||o);return o}function Lt(t,e,n){const i=t.listeners,r=s(t.visibleElements,e,n.interaction);let o;for(const s of r)o=zt(s.options.click||i.click,s,e)||o;return o}function zt(t,e,n){return!0===(0,r.Q)(t,[e.$context,n])}const Nt=["afterDraw","beforeDraw"];function Ft(t,e,n){const i=e.visibleElements;e.hooked=N(n,Nt,e.hooks),e.hooked||i.forEach((t=>{e.hooked||Nt.forEach((n=>{(0,r.a7)(t.options[n])&&(e.hooked=!0)}))}))}function jt(t,e,n){if(t.hooked){const i=e.options[n]||t.hooks[n];return(0,r.Q)(i,[e.$context])}}function Ht(t,e,n){const i=Ut(t.scales,e,n);let o=$t(e,i,"min","suggestedMin");o=$t(e,i,"max","suggestedMax")||o,o&&(0,r.a7)(e.handleTickRangeOptions)&&e.handleTickRangeOptions()}function Wt(t,e){for(const n of t)Yt(n,e)}function $t(t,e,n,i){if((0,r.g)(e[n])&&!Bt(t.options,n,i)){const i=t[n]!==e[n];return t[n]=e[n],i}}function Bt(t,e,n){return(0,r.h)(t[e])||(0,r.h)(t[n])}function Yt(t,e){for(const n of["scaleID","xScaleID","yScaleID"]){const i=pt(e,t,n);i&&!e[i]&&Vt(t,n)&&console.warn(`No scale found with id '${i}' for annotation '${t.id}'`)}}function Vt(t,e){if("scaleID"===e)return!0;const n=e.charAt(0);for(const i of["Min","Max","Value"])if((0,r.h)(t[n+i]))return!0;return!1}function Ut(t,e,n){const i=e.axis,o=e.id,s=i+"ScaleID",a={min:(0,r.v)(e.min,Number.NEGATIVE_INFINITY),max:(0,r.v)(e.max,Number.POSITIVE_INFINITY)};for(const r of n)r.scaleID===o?qt(r,e,["value","endValue"],a):pt(t,r,s)===o&&qt(r,e,[i+"Min",i+"Max",i+"Value"],a);return a}function qt(t,e,n,i){for(const o of n){const n=t[o];if((0,r.h)(n)){const t=e.parse(n);i.min=Math.min(i.min,t),i.max=Math.max(i.max,t)}}}class Xt extends i.W_{inRange(t,e,n,i){const{x:o,y:s}=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-this.options.rotation));return y({x:o,y:s},this.getProps(["x","y","x2","y2"],i),n,this.options)}getCenterPoint(t){return v(this,t)}draw(t){t.save(),Y(t,this.getCenterPoint(),this.options.rotation),X(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return vt(t,e)}}Xt.id="boxAnnotation",Xt.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance:0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Xt.defaultRoutes={borderColor:"color",backgroundColor:"color"},Xt.descriptors={label:{_fallback:!0}};class Gt extends i.W_{inRange(t,e,n,i){return x({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],i),center:this.getCenterPoint(i)},n,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options;e.display&&e.content&&(ee(t,this),t.save(),Y(t,this.getCenterPoint(),this.rotation),G(t,this,e,this._fitRatio),t.restore())}resolveElementProperties(t,e){const n=Zt(t,e);if(!n)return{};const{controllerMeta:i,point:r,radius:o}=Jt(t,e,n);let s=q(t.ctx,e);const a=Kt(s,o);E(e,a)&&(s={width:s.width*a,height:s.height*a});const{position:l,xAdjust:c,yAdjust:u}=e,h=O(r,s,{borderWidth:0,position:l,xAdjust:c,yAdjust:u});return{initProperties:z(t,h,e),...h,...i,rotation:e.rotation,_fitRatio:a}}}function Zt(t,e){return t.getSortedVisibleDatasetMetas().reduce((function(n,r){const o=r.controller;return o instanceof i.jI&&Qt(t,e,r.data)&&(!n||o.innerRadius=90?r:n}),void 0)}function Qt(t,e,n){if(!e.autoHide)return!0;for(let i=0;ih,b=m?r+p:s-p,y=te(b,u,h,g),x={_centerX:u,_centerY:h,_radius:g,_counterclockwise:m,...y};return{controllerMeta:x,point:f,radius:Math.min(a,Math.min(d.right-d.left,d.bottom-d.top)/2)}}function Kt({width:t,height:e},n){const i=Math.sqrt(Math.pow(t,2)+Math.pow(e,2));return 2*n/i}function te(t,e,n,i){const o=Math.pow(n-t,2),s=Math.pow(i,2),a=-2*e,l=Math.pow(e,2)+o-s,c=Math.pow(a,2)-4*l;if(c<=0)return{_startAngle:0,_endAngle:r.T};const u=(-a-Math.sqrt(c))/2,h=(-a+Math.sqrt(c))/2;return{_startAngle:(0,r.D)({x:e,y:n},{x:u,y:t}).angle,_endAngle:(0,r.D)({x:e,y:n},{x:h,y:t}).angle}}function ee(t,e){const{_centerX:n,_centerY:i,_radius:r,_startAngle:o,_endAngle:s,_counterclockwise:a,options:l}=e;t.save();const c=V(t,l);t.fillStyle=l.backgroundColor,t.beginPath(),t.arc(n,i,r,o,s,a),t.closePath(),t.fill(),c&&t.stroke(),t.restore()}Gt.id="doughnutLabelAnnotation",Gt.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},Gt.defaultRoutes={};class ne extends i.W_{inRange(t,e,n,i){return x({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],i),center:this.getCenterPoint(i)},n,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options,n=!(0,r.h)(this._visible)||this._visible;e.display&&e.content&&n&&(t.save(),Y(t,this.getCenterPoint(),this.rotation),rt(t,this),X(t,this,e),G(t,ie(this),e),t.restore())}resolveElementProperties(t,e){let n;if(I(e))n=mt(t,e);else{const{centerX:i,centerY:r}=bt(t,e);n={x:i,y:r}}const i=(0,r.E)(e.padding),o=q(t.ctx,e),s=O(n,o,e,i);return{initProperties:z(t,s,e),pointX:n.x,pointY:n.y,...s,rotation:e.rotation}}}function ie({x:t,y:e,width:n,height:i,options:o}){const s=o.borderWidth/2,a=(0,r.E)(o.padding);return{x:t+a.left+s,y:e+a.top+s,width:n-a.left-a.right-o.borderWidth,height:i-a.top-a.bottom-o.borderWidth}}ne.id="labelAnnotation",ne.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,hitTolerance:0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ne.defaultRoutes={borderColor:"color"};const re=(t,e,n)=>({x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}),oe=(t,e,n)=>re(e,n,Math.abs((t-e.y)/(n.y-e.y))).x,se=(t,e,n)=>re(e,n,Math.abs((t-e.x)/(n.x-e.x))).y,ae=t=>t*t,le=(t,e,{x:n,y:i,x2:r,y2:o},s)=>"y"===s?{start:Math.min(i,o),end:Math.max(i,o),value:e}:{start:Math.min(n,r),end:Math.max(n,r),value:t},ce=(t,e,n,i)=>(1-i)*(1-i)*t+2*(1-i)*i*e+i*i*n,ue=(t,e,n,i)=>({x:ce(t.x,e.x,n.x,i),y:ce(t.y,e.y,n.y,i)}),he=(t,e,n,i)=>2*(1-i)*(e-t)+2*i*(n-e),de=(t,e,n,i)=>-Math.atan2(he(t.x,e.x,n.x,i),he(t.y,e.y,n.y,i))+.5*r.P;class fe extends i.W_{inRange(t,e,n,i){const r=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n){const n={mouseX:t,mouseY:e},{path:o,ctx:s}=this;if(o){V(s,this.options),s.lineWidth+=this.options.hitTolerance;const{chart:r}=this.$context,a=t*r.currentDevicePixelRatio,l=e*r.currentDevicePixelRatio,c=s.isPointInStroke(o,a,l)||ve(this,n,i);return s.restore(),c}const a=ae(r);return xe(this,n,a,i)||ve(this,n,i)}return ge(this,{mouseX:t,mouseY:e},n,{hitSize:r,useFinalPosition:i})}getCenterPoint(t){return v(this,t)}draw(t){const{x:e,y:n,x2:i,y2:r,cp:o,options:s}=this;if(t.save(),!V(t,s))return t.restore();U(t,s);const a=Math.sqrt(Math.pow(i-e,2)+Math.pow(r-n,2));if(s.curve&&o)return Ie(t,this,o,a),t.restore();const{startOpts:l,endOpts:c,startAdjust:u,endAdjust:h}=Ae(this),d=Math.atan2(r-n,i-e);t.translate(e,n),t.rotate(d),t.beginPath(),t.moveTo(0+u,0),t.lineTo(a-h,0),t.shadowColor=s.borderShadowColor,t.stroke(),Pe(t,0,u,l),Pe(t,a,-h,c),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const n=xt(t,e),{x:i,y:o,x2:s,y2:a}=n,l=me(n,t.chartArea),c=l?ye({x:i,y:o},{x:s,y:a},t.chartArea):{x:i,y:o,x2:s,y2:a,width:Math.abs(s-i),height:Math.abs(a-o)};if(c.centerX=(s+i)/2,c.centerY=(a+o)/2,c.initProperties=z(t,c,e),e.curve){const t={x:c.x,y:c.y},n={x:c.x2,y:c.y2};c.cp=Ee(c,e,(0,r.aF)(t,n))}const u=we(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}fe.id="lineAnnotation";const pe={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};function ge(t,{mouseX:e,mouseY:n},i,{hitSize:r,useFinalPosition:o}){const s=le(e,n,t.getProps(["x","y","x2","y2"],o),i);return g(s,r)||ve(t,{mouseX:e,mouseY:n},o,i)}function me({x:t,y:e,x2:n,y2:i},{top:r,right:o,bottom:s,left:a}){return!(to&&n>o||es&&i>s)}function be({x:t,y:e},n,{top:i,right:r,bottom:o,left:s}){return tr&&(e=se(r,{x:t,y:e},n),t=r),eo&&(t=oe(o,{x:t,y:e},n),e=o),{x:t,y:e}}function ye(t,e,n){const{x:i,y:r}=be(t,e,n),{x:o,y:s}=be(e,t,n);return{x:i,y:r,x2:o,y2:s,width:Math.abs(o-i),height:Math.abs(s-r)}}function xe(t,{mouseX:e,mouseY:n},i=f,r){const{x:o,y:s,x2:a,y2:l}=t.getProps(["x","y","x2","y2"],r),c=a-o,u=l-s,h=ae(c)+ae(u),d=0===h?-1:((e-o)*c+(n-s)*u)/h;let p,g;return d<0?(p=o,g=s):d>1?(p=a,g=l):(p=o+d*c,g=s+d*u),ae(e-p)+ae(n-g)<=i}function ve(t,{mouseX:e,mouseY:n},i,r){const o=t.label;return o.options.display&&o.inRange(e,n,r,i)}function we(t,e,n){const i=n.borderWidth,o=(0,r.E)(n.padding),s=q(t.ctx,n),a=s.width+o.width+i,l=s.height+o.height+i;return _e(e,n,{width:a,height:l,padding:o},t.chartArea)}function ke(t){const{x:e,y:n,x2:i,y2:o}=t,s=Math.atan2(o-n,i-e);return s>r.P/2?s-r.P:s0&&(r.w/2+o.left-i.x)/s,c=a>0&&(r.h/2+o.top-i.y)/a;return p(Math.max(l,c),0,.25)}function De(t,e){const{x:n,x2:i,y:r,y2:o}=t,s=Math.min(r,o)-e.top,a=Math.min(n,i)-e.left,l=e.bottom-Math.max(r,o),c=e.right-Math.max(n,i);return{x:Math.min(a,c),y:Math.min(s,l),dx:a<=c?1:-1,dy:s<=l?1:-1}}function Ce(t,e){const{size:n,min:i,max:r,padding:o}=e,s=n/2;return n>r-i?(r+i)/2:(i>=t-o-s&&(t=i+o+s),r<=t+o+s&&(t=r-o-s),t)}function Ae(t){const e=t.options,n=e.arrowHeads&&e.arrowHeads.start,i=e.arrowHeads&&e.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:Oe(t,n),endAdjust:Oe(t,i)}}function Oe(t,e){if(!e||!e.display)return 0;const{length:n,width:i}=e,r=t.options.borderWidth/2,o={x:n,y:i+r},s={x:0,y:r};return Math.abs(oe(0,o,s))}function Pe(t,e,n,i){if(!i||!i.display)return;const{length:r,width:o,fill:s,backgroundColor:a,borderColor:l}=i,c=Math.abs(e-r)+n;t.beginPath(),U(t,i),V(t,i),t.moveTo(c,-o),t.lineTo(e+n,0),t.lineTo(c,o),!0===s?(t.fillStyle=a||l,t.closePath(),t.fill(),t.shadowColor="transparent"):t.shadowColor=i.borderShadowColor,t.stroke()}function Ee(t,e,n){const{x:i,y:r,x2:o,y2:s,centerX:a,centerY:l}=t,c=Math.atan2(s-r,o-i),u=P(e.controlPoint,0),d={x:a+C(n,u.x,!1),y:l+C(n,u.y,!1)};return h(d,{x:a,y:l},c)}function Re(t,{x:e,y:n},{angle:i,adjust:r},o){o&&o.display&&(t.save(),t.translate(e,n),t.rotate(i),Pe(t,0,-r,o),t.restore())}function Ie(t,e,n,i){const{x:o,y:s,x2:a,y2:l,options:c}=e,{startOpts:u,endOpts:h,startAdjust:d,endAdjust:f}=Ae(e),p={x:o,y:s},g={x:a,y:l},m=de(p,n,g,0),b=de(p,n,g,1)-r.P,y=ue(p,n,g,d/i),x=ue(p,n,g,1-f/i),v=new Path2D;t.beginPath(),v.moveTo(y.x,y.y),v.quadraticCurveTo(n.x,n.y,x.x,x.y),t.shadowColor=c.borderShadowColor,t.stroke(v),e.path=v,e.ctx=t,Re(t,y,{angle:m,adjust:d},u),Re(t,x,{angle:b,adjust:f},h)}fe.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},pe),fill:!1,length:12,start:Object.assign({},pe),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance:0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ne.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,hitTolerance:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},fe.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},fe.defaultRoutes={borderColor:"color"};class Le extends i.W_{inRange(t,e,n,i){const o=this.options.rotation,s=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n)return ze({x:t,y:e},this.getProps(["width","height","centerX","centerY"],i),o,s);const{x:a,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],i),d="y"===n?{start:l,end:u}:{start:a,end:c},p=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-o));return p[n]>=d.start-s-f&&p[n]<=d.end+s+f}getCenterPoint(t){return v(this,t)}draw(t){const{width:e,height:n,centerX:i,centerY:o,options:s}=this;t.save(),Y(t,this.getCenterPoint(),s.rotation),U(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const a=V(t,s);t.ellipse(i,o,n/2,e/2,r.P/2,0,2*r.P),t.fill(),a&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return vt(t,e)}}function ze(t,e,n,i){const{width:o,height:s,centerX:a,centerY:l}=e,c=o/2,u=s/2;if(c<=0||u<=0)return!1;const h=(0,r.t)(n||0),d=Math.cos(h),f=Math.sin(h),p=Math.pow(d*(t.x-a)+f*(t.y-l),2),g=Math.pow(f*(t.x-a)-d*(t.y-l),2);return p/Math.pow(c+i,2)+g/Math.pow(u+i,2)<=1.0001}Le.id="ellipseAnnotation",Le.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},Xt.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Le.defaultRoutes={borderColor:"color",backgroundColor:"color"},Le.descriptors={label:{_fallback:!0}};class Ne extends i.W_{inRange(t,e,n,i){const{x:r,y:o,x2:s,y2:a,width:l}=this.getProps(["x","y","x2","y2","width"],i),c=(this.options.borderWidth+this.options.hitTolerance)/2;if("x"!==n&&"y"!==n)return b({x:t,y:e},this.getCenterPoint(i),l/2,c);const u="y"===n?{start:o,end:a,value:e}:{start:r,end:s,value:t};return g(u,c)}getCenterPoint(t){return v(this,t)}draw(t){const e=this.options,n=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,U(t,e);const i=V(t,e);Q(t,this,this.centerX,this.centerY),i&&!B(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=n}resolveElementProperties(t,e){const n=yt(t,e);return n.initProperties=z(t,n,e),n}}Ne.id="pointAnnotation",Ne.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Ne.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Fe extends i.W_{inRange(t,e,n,i){if("x"!==n&&"y"!==n)return this.options.radius>=.1&&this.elements.length>1&&He(this.elements,t,e,i);const o=h({x:t,y:e},this.getCenterPoint(i),(0,r.t)(-this.options.rotation)),s=this.elements.map((t=>"y"===n?t.bY:t.bX)),a=Math.min(...s),l=Math.max(...s);return o[n]>=a&&o[n]<=l}getCenterPoint(t){return v(this,t)}draw(t){const{elements:e,options:n}=this;t.save(),t.beginPath(),t.fillStyle=n.backgroundColor,U(t,n);const i=V(t,n);let r=!0;for(const o of e)r?(t.moveTo(o.x,o.y),r=!1):t.lineTo(o.x,o.y);t.closePath(),t.fill(),i&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const n=yt(t,e),{sides:i,rotation:o}=e,s=[],a=2*r.P/i;let l=o*r.b4;for(let r=0;rn!==o.bY>n&&e<(o.bX-t.bX)*(n-t.bY)/(o.bY-t.bY)+t.bX&&(r=!r),o=t}return r}Fe.id="polygonAnnotation",Fe.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Fe.defaultRoutes={borderColor:"color",backgroundColor:"color"};const We={box:Xt,doughnutLabel:Gt,ellipse:Le,label:ne,line:fe,point:Ne,polygon:Fe};Object.keys(We).forEach((t=>{r.d.describe(`elements.${We[t].id}`,{_fallback:"plugins.annotation.common"})}));const $e={update:Object.assign},Be=Ot.concat(Nt),Ye=(t,e)=>(0,r.i)(e)?Ke(t,e):t,Ve=t=>"color"===t||"font"===t;function Ue(t="line"){return We[t]?t:(console.warn(`Unknown annotation type: '${t}', defaulting to 'line'`),"line")}function qe(t,e,n,i){const o=Ge(t,n.animations,i),s=e.annotations,a=en(e.elements,s);for(let l=0;lYe(t,o))):n[i]=Ye(s,o)}return n}function tn(t,e,n,i){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,get elements(){return n.filter((t=>t&&t.options))},id:i.id,type:"annotation"}))}function en(t,e){const n=e.length,i=t.length;if(in&&t.splice(n,i-n);return t}var nn="3.1.0";const rn=new Map,on=t=>"doughnutLabel"!==t.type,sn=Ot.concat(Nt);var an={id:"annotation",version:nn,beforeRegister(){w("chart.js","4.0",i.kL.version)},afterRegister(){i.kL.register(We)},afterUnregister(){i.kL.unregister(We)},beforeInit(t){rn.set(t,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(t,e,n){const i=rn.get(t),o=i.annotations=[];let s=n.annotations;(0,r.i)(s)?Object.keys(s).forEach((t=>{const e=s[t];(0,r.i)(e)&&(e.id=t,o.push(e))})):(0,r.b)(s)&&o.push(...s),Wt(o.filter(on),t.scales)},afterDataLimits(t,e){const n=rn.get(t);Ht(t,e.scale,n.annotations.filter(on).filter((t=>t.display&&t.adjustScaleRange)))},afterUpdate(t,e,n){const i=rn.get(t);Pt(t,i,n),qe(t,i,n,e.mode),i.visibleElements=i.elements.filter((t=>!t.skip&&t.options.display)),Ft(t,i,n)},beforeDatasetsDraw(t,e,n){ln(t,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(t,e,n){ln(t,"afterDatasetsDraw",n.clip)},beforeDatasetDraw(t,e,n){ln(t,e.index,n.clip)},beforeDraw(t,e,n){ln(t,"beforeDraw",n.clip)},afterDraw(t,e,n){ln(t,"afterDraw",n.clip)},beforeEvent(t,e,n){const i=rn.get(t);Et(i,e.event,n)&&(e.changed=!0)},afterDestroy(t){rn.delete(t)},getAnnotations(t){const e=rn.get(t);return e?e.elements:[]},_getAnnotationElementsAtEventForMode(t,e,n){return s(t,e,n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:t=>!sn.includes(t)&&"init"!==t,annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${We[Ue(e.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:Ve,_fallback:!0},_indexable:Ve}},additionalOptionScopes:[""]};function ln(t,e,n){const{ctx:i,chartArea:o}=t,s=rn.get(t);n&&(0,r.Y)(i,o);const a=cn(s.visibleElements,e).sort(((t,e)=>t.element.options.z-e.element.options.z));for(const r of a)un(i,o,s,r);n&&(0,r.$)(i)}function cn(t,e){const n=[];for(const i of t)if(i.options.drawTime===e&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const t of i.elements)t.options.display&&t.options.drawTime===e&&n.push({element:t});return n}function un(t,e,n,i){const r=i.element;i.main?(jt(n,r,"beforeDraw"),r.draw(t,e),jt(n,r,"afterDraw")):r.draw(t,e)}},3:function(t,e,n){n.d(e,{j:function(){return s}});var i=n(512);const r=t=>"boolean"===typeof t?`${t}`:0===t?"0":t,o=i.W,s=(t,e)=>n=>{var i;if(null==(null===e||void 0===e?void 0:e.variants))return o(t,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className);const{variants:s,defaultVariants:a}=e,l=Object.keys(s).map((t=>{const e=null===n||void 0===n?void 0:n[t],i=null===a||void 0===a?void 0:a[t];if(null===e)return null;const o=r(e)||r(i);return s[t][o]})),c=n&&Object.entries(n).reduce(((t,e)=>{let[n,i]=e;return void 0===i||(t[n]=i),t}),{}),u=null===e||void 0===e||null===(i=e.compoundVariants)||void 0===i?void 0:i.reduce(((t,e)=>{let{class:n,className:i,...r}=e;return Object.entries(r).every((t=>{let[e,n]=t;return Array.isArray(n)?n.includes({...a,...c}[e]):{...a,...c}[e]===n}))?[...t,n,i]:t}),[]);return o(t,l,u,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className)}},512:function(t,e,n){function i(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e2?n-2:0),r=2;r1?e-1:0),i=1;i1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:x;r&&r(t,null);let i=e.length;while(i--){let r=e[i];if("string"===typeof r){const t=n(r);t!==r&&(o(e)||(e[i]=t),r=t)}t[r]=!0}return t}function O(t){for(let e=0;e/gm),U=c(/\$\{[\w\W]*/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=c(/^aria-[\-\w]+$/),G=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=c(/^html$/i),K=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:K,DATA_ATTR:q,DOCTYPE_NAME:J,ERB_EXPR:V,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:Z,MUSTACHE_EXPR:Y,TMPLIT_EXPR:U});const et={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nt=function(){return"undefined"===typeof window?null:window},it=function(t,e){if("object"!==typeof t||"function"!==typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(t){return t},createScriptURL(t){return t}})}catch(o){return console.warn("TrustedTypes policy "+r+" could not be created."),null}},rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ot(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt();const e=t=>ot(t);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==et.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:c,Element:h,NodeFilter:d,NamedNodeMap:D=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:O,trustedTypes:Y}=t,V=h.prototype,U=E(V,"cloneNode"),q=E(V,"remove"),X=E(V,"nextSibling"),Z=E(V,"childNodes"),Q=E(V,"parentNode");if("function"===typeof a){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let K,st="";const{implementation:at,createNodeIterator:lt,createDocumentFragment:ct,getElementsByTagName:ut}=n,{importNode:ht}=r;let dt=rt();e.isSupported="function"===typeof i&&"function"===typeof Q&&at&&void 0!==at.createHTMLDocument;const{MUSTACHE_EXPR:ft,ERB_EXPR:pt,TMPLIT_EXPR:gt,DATA_ATTR:mt,ARIA_ATTR:bt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:yt,CUSTOM_ELEMENT:vt}=tt;let{IS_ALLOWED_URI:wt}=tt,kt=null;const _t=A({},[...R,...I,...L,...N,...j]);let Mt=null;const St=A({},[...H,...W,...$,...B]);let Tt=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Ct=null;const At=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ot=!0,Pt=!0,Et=!1,Rt=!0,It=!1,Lt=!0,zt=!1,Nt=!1,Ft=!1,jt=!1,Ht=!1,Wt=!1,$t=!0,Bt=!1;const Yt="user-content-";let Vt=!0,Ut=!1,qt={},Xt=null;const Gt=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=A({},["audio","video","img","source","image","track"]);let Jt=null;const Kt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),te="http://www.w3.org/1998/Math/MathML",ee="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml";let ie=ne,re=!1,oe=null;const se=A({},[te,ee,ne],y);let ae=A({},["mi","mo","mn","ms","mtext"]),le=A({},["annotation-xml"]);const ce=A({},["title","style","font","a","script"]);let ue=null;const he=["application/xhtml+xml","text/html"],de="text/html";let fe=null,pe=null;const ge=n.createElement("form"),me=function(t){return t instanceof RegExp||t instanceof Function},be=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pe||pe!==t){if(t&&"object"===typeof t||(t={}),t=P(t),ue=-1===he.indexOf(t.PARSER_MEDIA_TYPE)?de:t.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===ue?y:x,kt=M(t,"ALLOWED_TAGS")?A({},t.ALLOWED_TAGS,fe):_t,Mt=M(t,"ALLOWED_ATTR")?A({},t.ALLOWED_ATTR,fe):St,oe=M(t,"ALLOWED_NAMESPACES")?A({},t.ALLOWED_NAMESPACES,y):se,Jt=M(t,"ADD_URI_SAFE_ATTR")?A(P(Kt),t.ADD_URI_SAFE_ATTR,fe):Kt,Zt=M(t,"ADD_DATA_URI_TAGS")?A(P(Qt),t.ADD_DATA_URI_TAGS,fe):Qt,Xt=M(t,"FORBID_CONTENTS")?A({},t.FORBID_CONTENTS,fe):Gt,Dt=M(t,"FORBID_TAGS")?A({},t.FORBID_TAGS,fe):P({}),Ct=M(t,"FORBID_ATTR")?A({},t.FORBID_ATTR,fe):P({}),qt=!!M(t,"USE_PROFILES")&&t.USE_PROFILES,Ot=!1!==t.ALLOW_ARIA_ATTR,Pt=!1!==t.ALLOW_DATA_ATTR,Et=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Rt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Lt=!1!==t.SAFE_FOR_XML,zt=t.WHOLE_DOCUMENT||!1,jt=t.RETURN_DOM||!1,Ht=t.RETURN_DOM_FRAGMENT||!1,Wt=t.RETURN_TRUSTED_TYPE||!1,Ft=t.FORCE_BODY||!1,$t=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Vt=!1!==t.KEEP_CONTENT,Ut=t.IN_PLACE||!1,wt=t.ALLOWED_URI_REGEXP||G,ie=t.NAMESPACE||ne,ae=t.MATHML_TEXT_INTEGRATION_POINTS||ae,le=t.HTML_INTEGRATION_POINTS||le,Tt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Tt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Tt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Tt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Pt=!1),Ht&&(jt=!0),qt&&(kt=A({},j),Mt=[],!0===qt.html&&(A(kt,R),A(Mt,H)),!0===qt.svg&&(A(kt,I),A(Mt,W),A(Mt,B)),!0===qt.svgFilters&&(A(kt,L),A(Mt,W),A(Mt,B)),!0===qt.mathMl&&(A(kt,N),A(Mt,$),A(Mt,B))),t.ADD_TAGS&&("function"===typeof t.ADD_TAGS?At.tagCheck=t.ADD_TAGS:(kt===_t&&(kt=P(kt)),A(kt,t.ADD_TAGS,fe))),t.ADD_ATTR&&("function"===typeof t.ADD_ATTR?At.attributeCheck=t.ADD_ATTR:(Mt===St&&(Mt=P(Mt)),A(Mt,t.ADD_ATTR,fe))),t.ADD_URI_SAFE_ATTR&&A(Jt,t.ADD_URI_SAFE_ATTR,fe),t.FORBID_CONTENTS&&(Xt===Gt&&(Xt=P(Xt)),A(Xt,t.FORBID_CONTENTS,fe)),Vt&&(kt["#text"]=!0),zt&&A(kt,["html","head","body"]),kt.table&&(A(kt,["tbody"]),delete Dt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!==typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=t.TRUSTED_TYPES_POLICY,st=K.createHTML("")}else void 0===K&&(K=it(Y,o)),null!==K&&"string"===typeof st&&(st=K.createHTML(""));l&&l(t),pe=t}},xe=A({},[...I,...L,...z]),ye=A({},[...N,...F]),ve=function(t){let e=Q(t);e&&e.tagName||(e={namespaceURI:ie,tagName:"template"});const n=x(t.tagName),i=x(e.tagName);return!!oe[t.namespaceURI]&&(t.namespaceURI===ee?e.namespaceURI===ne?"svg"===n:e.namespaceURI===te?"svg"===n&&("annotation-xml"===i||ae[i]):Boolean(xe[n]):t.namespaceURI===te?e.namespaceURI===ne?"math"===n:e.namespaceURI===ee?"math"===n&&le[i]:Boolean(ye[n]):t.namespaceURI===ne?!(e.namespaceURI===ee&&!le[i])&&(!(e.namespaceURI===te&&!ae[i])&&(!ye[n]&&(ce[n]||!xe[n]))):!("application/xhtml+xml"!==ue||!oe[t.namespaceURI]))},we=function(t){m(e.removed,{element:t});try{Q(t).removeChild(t)}catch(n){q(t)}},ke=function(t,n){try{m(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(i){m(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t)if(jt||Ht)try{we(n)}catch(i){}else try{n.setAttribute(t,"")}catch(i){}},_e=function(t){let e=null,i=null;if(Ft)t=""+t;else{const e=v(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===ue&&ie===ne&&(t=''+t+"");const r=K?K.createHTML(t):t;if(ie===ne)try{e=(new O).parseFromString(r,ue)}catch(s){}if(!e||!e.documentElement){e=at.createDocument(ie,"template",null);try{e.documentElement.innerHTML=re?st:r}catch(s){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(n.createTextNode(i),o.childNodes[0]||null),ie===ne?ut.call(e,zt?"html":"body")[0]:zt?e.documentElement:o},Me=function(t){return lt.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof C&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof D)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore||"function"!==typeof t.hasChildNodes)},Te=function(t){return"function"===typeof c&&t instanceof c};function De(t,n,i){f(t,(t=>{t.call(e,n,i,pe)}))}const Ce=function(t){let n=null;if(De(dt.beforeSanitizeElements,t,null),Se(t))return we(t),!0;const i=fe(t.nodeName);if(De(dt.uponSanitizeElement,t,{tagName:i,allowedTags:kt}),Lt&&t.hasChildNodes()&&!Te(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return we(t),!0;if(t.nodeType===et.progressingInstruction)return we(t),!0;if(Lt&&t.nodeType===et.comment&&S(/<[/\w]/g,t.data))return we(t),!0;if(!(At.tagCheck instanceof Function&&At.tagCheck(i))&&(!kt[i]||Dt[i])){if(!Dt[i]&&Oe(i)){if(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,i))return!1;if(Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(i))return!1}if(Vt&&!Xt[i]){const e=Q(t)||t.parentNode,n=Z(t)||t.childNodes;if(n&&e){const i=n.length;for(let r=i-1;r>=0;--r){const i=U(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,X(t))}}}return we(t),!0}return t instanceof h&&!ve(t)?(we(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===et.text&&(n=t.textContent,f([ft,pt,gt],(t=>{n=w(n,t," ")})),t.textContent!==n&&(m(e.removed,{element:t.cloneNode()}),t.textContent=n)),De(dt.afterSanitizeElements,t,null),!1):(we(t),!0)},Ae=function(t,e,i){if($t&&("id"===e||"name"===e)&&(i in n||i in ge))return!1;if(Pt&&!Ct[e]&&S(mt,e));else if(Ot&&S(bt,e));else if(At.attributeCheck instanceof Function&&At.attributeCheck(e,t));else if(!Mt[e]||Ct[e]){if(!(Oe(t)&&(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,t)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(t))&&(Tt.attributeNameCheck instanceof RegExp&&S(Tt.attributeNameCheck,e)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(e,t))||"is"===e&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,i)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(i))))return!1}else if(Jt[e]);else if(S(wt,w(i,yt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==k(i,"data:")||!Zt[t]){if(Et&&!S(xt,w(i,yt,"")));else if(i)return!1}else;return!0},Oe=function(t){return"annotation-xml"!==t&&v(t,vt)},Pe=function(t){De(dt.beforeSanitizeAttributes,t,null);const{attributes:n}=t;if(!n||Se(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Mt,forceKeepAttr:void 0};let r=n.length;while(r--){const s=n[r],{name:a,namespaceURI:l,value:c}=s,u=fe(a),h=c;let d="value"===a?h:_(h);if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,De(dt.uponSanitizeAttribute,t,i),d=i.attrValue,!Bt||"id"!==u&&"name"!==u||(ke(a,t),d=Yt+d),Lt&&S(/((--!?|])>)|<\/(style|title|textarea)/i,d)){ke(a,t);continue}if("attributename"===u&&v(d,"href")){ke(a,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ke(a,t);continue}if(!Rt&&S(/\/>/i,d)){ke(a,t);continue}It&&f([ft,pt,gt],(t=>{d=w(d,t," ")}));const p=fe(t.nodeName);if(Ae(p,u,d)){if(K&&"object"===typeof Y&&"function"===typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(p,u)){case"TrustedHTML":d=K.createHTML(d);break;case"TrustedScriptURL":d=K.createScriptURL(d);break}if(d!==h)try{l?t.setAttributeNS(l,a,d):t.setAttribute(a,d),Se(t)?we(t):g(e.removed)}catch(o){ke(a,t)}}else ke(a,t)}De(dt.afterSanitizeAttributes,t,null)},Ee=function t(e){let n=null;const i=Me(e);De(dt.beforeSanitizeShadowDOM,e,null);while(n=i.nextNode())De(dt.uponSanitizeShadowNode,n,null),Ce(n),Pe(n),n.content instanceof s&&t(n.content);De(dt.afterSanitizeShadowDOM,e,null)};return e.sanitize=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,l=null;if(re=!t,re&&(t="\x3c!--\x3e"),"string"!==typeof t&&!Te(t)){if("function"!==typeof t.toString)throw T("toString is not a function");if(t=t.toString(),"string"!==typeof t)throw T("dirty is not a string, aborting")}if(!e.isSupported)return t;if(Nt||be(n),e.removed=[],"string"===typeof t&&(Ut=!1),Ut){if(t.nodeName){const e=fe(t.nodeName);if(!kt[e]||Dt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)i=_e("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),o.nodeType===et.element&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!jt&&!It&&!zt&&-1===t.indexOf("<"))return K&&Wt?K.createHTML(t):t;if(i=_e(t),!i)return jt?null:Wt?st:""}i&&Ft&&we(i.firstChild);const u=Me(Ut?t:i);while(a=u.nextNode())Ce(a),Pe(a),a.content instanceof s&&Ee(a.content);if(Ut)return t;if(jt){if(Ht){l=ct.call(i.ownerDocument);while(i.firstChild)l.appendChild(i.firstChild)}else l=i;return(Mt.shadowroot||Mt.shadowrootmode)&&(l=ht.call(r,l,!0)),l}let h=zt?i.outerHTML:i.innerHTML;return zt&&kt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(J,i.ownerDocument.doctype.name)&&(h="\n"+h),It&&f([ft,pt,gt],(t=>{h=w(h,t," ")})),K&&Wt?K.createHTML(h):h},e.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};be(t),Nt=!0},e.clearConfig=function(){pe=null,Nt=!1},e.isValidAttribute=function(t,e,n){pe||be({});const i=fe(t),r=fe(e);return Ae(i,r,n)},e.addHook=function(t,e){"function"===typeof e&&m(dt[t],e)},e.removeHook=function(t,e){if(void 0!==e){const n=p(dt[t],e);return-1===n?void 0:b(dt[t],n,1)[0]}return g(dt[t])},e.removeHooks=function(t){dt[t]=[]},e.removeAllHooks=function(){dt=rt()},e}var st=ot()},441:function(t,e,n){function i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.d(e,{TU:function(){return Pt}});var r=i();function o(t){r=t}var s={exec:()=>null};function a(t,e=""){let n="string"==typeof t?t:t.source,i={replace:(t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(c.caret,"$1"),n=n.replace(t,r),i},getRegex:()=>new RegExp(n,e)};return i}var l=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^(?:[ \t]*(?:\n|$))+/,h=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,d=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,g=/(?:[*+-]|\d{1,9}[.)])/,m=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,b=a(m).replace(/bull/g,g).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),x=a(m).replace(/bull/g,g).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,g).getRegex(),M="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S=/|$))/,T=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",S).replace("tag",M).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D=a(y).replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),C=a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",D).getRegex(),A={blockquote:C,code:h,def:k,fences:d,heading:p,hr:f,html:T,lheading:b,list:_,newline:u,paragraph:D,table:s,text:v},O=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),P={...A,lheading:x,table:O,paragraph:a(y).replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",O).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex()},E={...A,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",S).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(y).replace("hr",f).replace("heading"," *#{1,6} *[^\n]").replace("lheading",b).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,L=/^( {2,}|\\)\n(?!\s*$)/,z=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",l?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),V=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,U=a(V,"u").replace(/punct/g,N).getRegex(),q=a(V,"u").replace(/punct/g,W).getRegex(),X="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G=a(X,"gu").replace(/notPunctSpace/g,j).replace(/punctSpace/g,F).replace(/punct/g,N).getRegex(),Z=a(X,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,$).replace(/punct/g,W).getRegex(),Q=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,j).replace(/punctSpace/g,F).replace(/punct/g,N).getRegex(),J=a(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),K=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tt=a(S).replace("(?:--\x3e|$)","--\x3e").getRegex(),et=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",tt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,it=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rt=a(/^!?\[(label)\]\[(ref)\]/).replace("label",nt).replace("ref",w).getRegex(),ot=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",w).getRegex(),st=a("reflink|nolink(?!\\()","g").replace("reflink",rt).replace("nolink",ot).getRegex(),at=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,lt={_backpedal:s,anyPunctuation:J,autolink:K,blockSkip:Y,br:L,code:I,del:s,emStrongLDelim:U,emStrongRDelimAst:G,emStrongRDelimUnd:Q,escape:R,link:it,nolink:ot,punctuation:H,reflink:rt,reflinkSearch:st,tag:et,text:z,url:s},ct={...lt,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",nt).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt).getRegex()},ut={...lt,emStrongRDelimAst:Z,emStrongLDelim:q,url:a(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",at).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:a(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},gt=t=>pt[t];function mt(t,e){if(e){if(c.escapeTest.test(t))return t.replace(c.escapeReplace,gt)}else if(c.escapeTestNoEncode.test(t))return t.replace(c.escapeReplaceNoEncode,gt);return t}function bt(t){try{t=encodeURI(t).replace(c.percentDecode,"%")}catch{return null}return t}function xt(t,e){let n=t.replace(c.findPipe,((t,e,n)=>{let i=!1,r=e;for(;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"})),i=n.split(c.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length0?-2:-1}function wt(t,e,n,i,r){let o=e.href,s=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function kt(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(null===i)return e;let r=i[1];return e.split("\n").map((t=>{let e=t.match(n.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=r.length?t.slice(r.length):t})).join("\n")}var _t=class{options;rules;lexer;constructor(t){this.options=t||r}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:yt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=kt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=yt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:yt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=yt(e[0],"\n").split("\n"),n="",i="",r=[];for(;t.length>0;){let e,o=!1,s=[];for(e=0;e1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let n=!1,i="",a="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):u?h=e[1].length+1:(h=e[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=l.slice(h),h+=e[1].length),u&&this.rules.other.blankLine.test(c)&&(i+=c+"\n",t=t.substring(c.length+1),n=!0),!n){let e=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),o=this.rules.other.headingBeginRegex(h),s=this.rules.other.htmlBeginRegex(h);for(;t;){let d,f=t.split("\n",1)[0];if(c=f,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),r.test(c)||o.test(c)||s.test(c)||e.test(c)||n.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=h||!c.trim())a+="\n"+d.slice(h);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||r.test(l)||o.test(l)||n.test(l))break;a+="\n"+c}!u&&!c.trim()&&(u=!0),i+=f+"\n",t=t.substring(f.length+1),l=d.slice(h)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let d,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(a),f&&(d="[ ] "!==f[0],a=a.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:i,task:!!f,checked:d,loose:!1,text:a,tokens:[]}),r.raw+=i}let a=r.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),r.raw=r.raw.trimEnd();for(let t=0;t"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));r.loose=n}if(r.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=yt(t.slice(0,-1),"\\");if((t.length-e.length)%2===0)return}else{let t=vt(e[2],"()");if(-2===t)return;if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),wt(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[t.toLowerCase()];if(!i){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return wt(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!n||this.rules.inline.punctuation.exec(n))){let n,r,o=[...i[0]].length-1,s=o,a=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+o);null!=(i=l.exec(e));){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(r=[...n].length,i[3]||i[4]){s+=r;continue}if((i[5]||i[6])&&o%3&&!((o+r)%3)){a+=r;continue}if(s-=r,s>0)continue;r=Math.min(r,r+s+a);let e=[...i[0]][0].length,l=t.slice(0,o+i.index+e+r);if(Math.min(o,r)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Mt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||r,this.options.tokenizer=this.options.tokenizer||new _t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:c,block:dt.normal,inline:ft.normal};this.options.pedantic?(e.block=dt.pedantic,e.inline=ft.pedantic):this.options.gfm&&(e.block=dt.gfm,this.options.breaks?e.inline=ft.breaks:e.inline=ft.gfm),this.tokenizer.rules=e}static get rules(){return{block:dt,inline:ft}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(c.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(i=n.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0))))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let n=e.at(-1);1===i.raw.length&&void 0!==n?n.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.at(-1).src=n.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let r=t;if(this.options.extensions?.startBlock){let e,n=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach((t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(n=Math.min(n,e))})),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(this.state.top&&(i=this.tokenizer.paragraph(r))){let o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(i),n=r.length!==t.length,t=t.substring(i.raw.length)}else if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let n=e.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i)}else if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i=t,r=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(i));)n=r[2]?r[2].length:0,i=i.slice(0,r.index+n)+"["+"a".repeat(r[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,s="";for(;t;){let n;if(o||(s=""),o=!1,this.options.extensions?.inline?.some((i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0))))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);let i=e.at(-1);"text"===n.type&&"text"===i?.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,i,s)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let r=t;if(this.options.extensions?.startInline){let e,n=1/0,i=t.slice(1);this.options.extensions.startInline.forEach((t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(n=Math.min(n,e))})),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),o=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=n.raw,i.text+=n.text):e.push(n)}else if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},St=class{options;parser;constructor(t){this.options=t||r}space(t){return""}code({text:t,lang:e,escaped:n}){let i=(e||"").match(c.notSpaceStart)?.[0],r=t.replace(c.endingNewline,"")+"\n";return i?'
'+(n?r:mt(r,!0))+"
\n":"
"+(n?r:mt(r,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){let e=t.ordered,n=t.start,i="";for(let s=0;s\n"+i+"\n"}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+mt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",n="";for(let r=0;r${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${mt(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),r=bt(t);if(null===r)return i;t=r;let o='
    ",o}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=bt(t);if(null===r)return mt(n);t=r;let o=`${n}{let r=t[i].flat(1/0);n=n.concat(this.walkTokens(r,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=n.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){let e=this.defaults.renderer||new St(this.defaults);for(let n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let i=n,r=t.renderer[i],o=e[i];e[i]=(...t)=>{let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new _t(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let i=n,r=t.tokenizer[i],o=e[i];e[i]=(...t)=>{let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ct;for(let n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let i=n,r=t.hooks[i],o=e[i];Ct.passThroughHooks.has(n)?e[i]=t=>{if(this.defaults.async&&Ct.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await r.call(e,t);return o.call(e,n)})();let i=r.call(e,t);return o.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let n=await r.apply(e,t);return!1===n&&(n=await o.apply(e,t)),n})();let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(i.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Mt.lex(t,e??this.defaults)}parser(t,e){return Dt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let i={...n},r={...this.defaults,...i},o=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===i.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let n=r.hooks?await r.hooks.preprocess(e):e,i=await(r.hooks?await r.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(n,r),o=r.hooks?await r.hooks.processAllTokens(i):i;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let s=await(r.hooks?await r.hooks.provideParser():t?Dt.parse:Dt.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(s):s})().catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let n=(r.hooks?r.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(e,r);r.hooks&&(n=r.hooks.processAllTokens(n)),r.walkTokens&&this.walkTokens(n,r.walkTokens);let i=(r.hooks?r.hooks.provideParser():t?Dt.parse:Dt.parseInline)(n,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(s){return o(s)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+mt(n.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}},Ot=new At;function Pt(t,e){return Ot.parse(t,e)}Pt.options=Pt.setOptions=function(t){return Ot.setOptions(t),Pt.defaults=Ot.defaults,o(Pt.defaults),Pt},Pt.getDefaults=i,Pt.defaults=r,Pt.use=function(...t){return Ot.use(...t),Pt.defaults=Ot.defaults,o(Pt.defaults),Pt},Pt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Pt.parseInline=Ot.parseInline,Pt.Parser=Dt,Pt.parser=Dt.parse,Pt.Renderer=St,Pt.TextRenderer=Tt,Pt.Lexer=Mt,Pt.lexer=Mt.lex,Pt.Tokenizer=_t,Pt.Hooks=Ct,Pt.parse=Pt;Pt.options,Pt.setOptions,Pt.use,Pt.walkTokens,Pt.parseInline,Dt.parse,Mt.lex},388:function(t,e,n){n.d(e,{m6:function(){return gt}});const i="-",r=t=>{const e=l(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t,s=t=>{const n=t.split(i);return""===n[0]&&1!==n.length&&n.shift(),o(n,e)||a(t)},c=(t,e)=>{const i=n[t]||[];return e&&r[t]?[...i,...r[t]]:i};return{getClassGroupId:s,getConflictingClassGroupIds:c}},o=(t,e)=>{if(0===t.length)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?o(t.slice(1),r):void 0;if(s)return s;if(0===e.validators.length)return;const a=t.join(i);return e.validators.find((({validator:t})=>t(a)))?.classGroupId},s=/^\[(.+)\]$/,a=t=>{if(s.test(t)){const e=s.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},l=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const r in n)c(n[r],i,r,e);return i},c=(t,e,n,i)=>{t.forEach((t=>{if("string"!==typeof t){if("function"===typeof t)return h(t)?void c(t(i),e,n,i):void e.validators.push({validator:t,classGroupId:n});Object.entries(t).forEach((([t,r])=>{c(r,u(e,t),n,i)}))}else{const i=""===t?e:u(e,t);i.classGroupId=n}}))},u=(t,e)=>{let n=t;return e.split(i).forEach((t=>{n.nextPart.has(t)||n.nextPart.set(t,{nextPart:new Map,validators:[]}),n=n.nextPart.get(t)})),n},h=t=>t.isThemeGetter,d=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(r,o)=>{n.set(r,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(t){let e=n.get(t);return void 0!==e?e:void 0!==(e=i.get(t))?(r(t,e),e):void 0},set(t,e){n.has(t)?n.set(t,e):r(t,e)}}},f="!",p=":",g=p.length,m=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=t=>{const e=[];let n,i=0,r=0,o=0;for(let u=0;uo?n-o:void 0;return{modifiers:e,hasImportantModifier:l,baseClassName:a,maybePostfixModifierPosition:c}};if(e){const t=e+p,n=i;i=e=>e.startsWith(t)?n(e.substring(t.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:e,maybePostfixModifierPosition:void 0}}if(n){const t=i;i=e=>n({className:e,parseClassName:t})}return i},b=t=>t.endsWith(f)?t.substring(0,t.length-1):t.startsWith(f)?t.substring(1):t,x=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map((t=>[t,!0]))),n=t=>{if(t.length<=1)return t;const n=[];let i=[];return t.forEach((t=>{const r="["===t[0]||e[t];r?(n.push(...i.sort(),t),i=[]):i.push(t)})),n.push(...i.sort()),n};return n},y=t=>({cache:d(t.cacheSize),parseClassName:m(t),sortModifiers:x(t),...r(t)}),v=/\s+/,w=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:o}=e,s=[],a=t.trim().split(v);let l="";for(let c=a.length-1;c>=0;c-=1){const t=a[c],{isExternal:e,modifiers:u,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:p}=n(t);if(e){l=t+(l.length>0?" "+l:l);continue}let g=!!p,m=i(g?d.substring(0,p):d);if(!m){if(!g){l=t+(l.length>0?" "+l:l);continue}if(m=i(d),!m){l=t+(l.length>0?" "+l:l);continue}g=!1}const b=o(u).join(":"),x=h?b+f:b,y=x+m;if(s.includes(y))continue;s.push(y);const v=r(m,g);for(let n=0;n0?" "+l:l)}return l};function k(){let t,e,n=0,i="";while(n{if("string"===typeof t)return t;let e,n="";for(let i=0;ie(t)),t());return n=y(l),i=n.cache.get,r=n.cache.set,o=a,a(s)}function a(t){const e=i(t);if(e)return e;const o=w(t,n);return r(t,o),o}return function(){return o(k.apply(null,arguments))}}const S=t=>{const e=e=>e[t]||[];return e.isThemeGetter=!0,e},T=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,D=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C=/^\d+\/\d+$/,A=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O=/\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$/,P=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=t=>C.test(t),L=t=>!!t&&!Number.isNaN(Number(t)),z=t=>!!t&&Number.isInteger(Number(t)),N=t=>t.endsWith("%")&&L(t.slice(0,-1)),F=t=>A.test(t),j=()=>!0,H=t=>O.test(t)&&!P.test(t),W=()=>!1,$=t=>E.test(t),B=t=>R.test(t),Y=t=>!U(t)&&!J(t),V=t=>ot(t,ct,W),U=t=>T.test(t),q=t=>ot(t,ut,H),X=t=>ot(t,ht,L),G=t=>ot(t,at,W),Z=t=>ot(t,lt,B),Q=t=>ot(t,ft,$),J=t=>D.test(t),K=t=>st(t,ut),tt=t=>st(t,dt),et=t=>st(t,at),nt=t=>st(t,ct),it=t=>st(t,lt),rt=t=>st(t,ft,!0),ot=(t,e,n)=>{const i=T.exec(t);return!!i&&(i[1]?e(i[1]):n(i[2]))},st=(t,e,n=!1)=>{const i=D.exec(t);return!!i&&(i[1]?e(i[1]):n)},at=t=>"position"===t||"percentage"===t,lt=t=>"image"===t||"url"===t,ct=t=>"length"===t||"size"===t||"bg-size"===t,ut=t=>"length"===t,ht=t=>"number"===t,dt=t=>"family-name"===t,ft=t=>"shadow"===t,pt=(Symbol.toStringTag,()=>{const t=S("color"),e=S("font"),n=S("text"),i=S("font-weight"),r=S("tracking"),o=S("leading"),s=S("breakpoint"),a=S("container"),l=S("spacing"),c=S("radius"),u=S("shadow"),h=S("inset-shadow"),d=S("text-shadow"),f=S("drop-shadow"),p=S("blur"),g=S("perspective"),m=S("aspect"),b=S("ease"),x=S("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...v(),J,U],k=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],M=()=>[J,U,l],T=()=>[I,"full","auto",...M()],D=()=>[z,"none","subgrid",J,U],C=()=>["auto",{span:["full",z,J,U]},z,J,U],A=()=>[z,"auto",J,U],O=()=>["auto","min","max","fr",J,U],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...M()],H=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],W=()=>[t,J,U],$=()=>[...v(),et,G,{position:[J,U]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ot=()=>["auto","cover","contain",nt,V,{size:[J,U]}],st=()=>[N,K,q],at=()=>["","none","full",c,J,U],lt=()=>["",L,K,q],ct=()=>["solid","dashed","dotted","double"],ut=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>[L,N,et,G],dt=()=>["","none",p,J,U],ft=()=>["none",L,J,U],pt=()=>["none",L,J,U],gt=()=>[L,J,U],mt=()=>[I,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[F],breakpoint:[F],color:[j],container:[F],"drop-shadow":[F],ease:["in","out","in-out"],font:[Y],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[F],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[F],shadow:[F],spacing:["px",L],text:[F],"text-shadow":[F],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,U,J,m]}],container:["container"],columns:[{columns:[L,U,J,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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"],sr:["sr-only","not-sr-only"],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:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[z,"auto",J,U]}],basis:[{basis:[I,"full","auto",a,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,I,"auto","initial","none",U]}],grow:[{grow:["",L,J,U]}],shrink:[{shrink:["",L,J,U]}],order:[{order:[z,"first","last","none",J,U]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,K,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,J,X]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",N,U]}],"font-family":[{font:[tt,U,e]}],"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-fractions"],tracking:[{tracking:[r,J,U]}],"line-clamp":[{"line-clamp":[L,"none",J,X]}],leading:[{leading:[o,...M()]}],"list-image":[{"list-image":["none",J,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",J,q]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[L,"auto",J,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ot()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},z,J,U],radial:["",J,U],conic:[z,J,U]},it,Z]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:st()}],"gradient-via-pos":[{via:st()}],"gradient-to-pos":[{to:st()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:at()}],"rounded-s":[{"rounded-s":at()}],"rounded-e":[{"rounded-e":at()}],"rounded-t":[{"rounded-t":at()}],"rounded-r":[{"rounded-r":at()}],"rounded-b":[{"rounded-b":at()}],"rounded-l":[{"rounded-l":at()}],"rounded-ss":[{"rounded-ss":at()}],"rounded-se":[{"rounded-se":at()}],"rounded-ee":[{"rounded-ee":at()}],"rounded-es":[{"rounded-es":at()}],"rounded-tl":[{"rounded-tl":at()}],"rounded-tr":[{"rounded-tr":at()}],"rounded-br":[{"rounded-br":at()}],"rounded-bl":[{"rounded-bl":at()}],"border-w":[{border:lt()}],"border-w-x":[{"border-x":lt()}],"border-w-y":[{"border-y":lt()}],"border-w-s":[{"border-s":lt()}],"border-w-e":[{"border-e":lt()}],"border-w-t":[{"border-t":lt()}],"border-w-r":[{"border-r":lt()}],"border-w-b":[{"border-b":lt()}],"border-w-l":[{"border-l":lt()}],"divide-x":[{"divide-x":lt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":lt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ct(),"hidden","none"]}],"divide-style":[{divide:[...ct(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...ct(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,J,U]}],"outline-w":[{outline:["",L,K,q]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",u,rt,Q]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,rt,Q]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:lt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[L,q]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":lt()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",d,rt,Q]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[L,J,U]}],"mix-blend":[{"mix-blend":[...ut(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ut()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":ht()}],"mask-image-linear-to-pos":[{"mask-linear-to":ht()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ht()}],"mask-image-t-to-pos":[{"mask-t-to":ht()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ht()}],"mask-image-r-to-pos":[{"mask-r-to":ht()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ht()}],"mask-image-b-to-pos":[{"mask-b-to":ht()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ht()}],"mask-image-l-to-pos":[{"mask-l-to":ht()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ht()}],"mask-image-x-to-pos":[{"mask-x-to":ht()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ht()}],"mask-image-y-to-pos":[{"mask-y-to":ht()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[J,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":ht()}],"mask-image-radial-to-pos":[{"mask-radial-to":ht()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":ht()}],"mask-image-conic-to-pos":[{"mask-conic-to":ht()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ot()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,U]}],filter:[{filter:["","none",J,U]}],blur:[{blur:dt()}],brightness:[{brightness:[L,J,U]}],contrast:[{contrast:[L,J,U]}],"drop-shadow":[{"drop-shadow":["","none",f,rt,Q]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",L,J,U]}],"hue-rotate":[{"hue-rotate":[L,J,U]}],invert:[{invert:["",L,J,U]}],saturate:[{saturate:[L,J,U]}],sepia:[{sepia:["",L,J,U]}],"backdrop-filter":[{"backdrop-filter":["","none",J,U]}],"backdrop-blur":[{"backdrop-blur":dt()}],"backdrop-brightness":[{"backdrop-brightness":[L,J,U]}],"backdrop-contrast":[{"backdrop-contrast":[L,J,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,J,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,J,U]}],"backdrop-invert":[{"backdrop-invert":["",L,J,U]}],"backdrop-opacity":[{"backdrop-opacity":[L,J,U]}],"backdrop-saturate":[{"backdrop-saturate":[L,J,U]}],"backdrop-sepia":[{"backdrop-sepia":["",L,J,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",J,U]}],ease:[{ease:["linear","initial",b,J,U]}],delay:[{delay:[L,J,U]}],animate:[{animate:["none",x,J,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,U]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:ft()}],"rotate-x":[{"rotate-x":ft()}],"rotate-y":[{"rotate-y":ft()}],"rotate-z":[{"rotate-z":ft()}],scale:[{scale:pt()}],"scale-x":[{"scale-x":pt()}],"scale-y":[{"scale-y":pt()}],"scale-z":[{"scale-z":pt()}],"scale-3d":["scale-3d"],skew:[{skew:gt()}],"skew-x":[{"skew-x":gt()}],"skew-y":[{"skew-y":gt()}],transform:[{transform:[J,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:mt()}],"translate-x":[{"translate-x":mt()}],"translate-y":[{"translate-y":mt()}],"translate-z":[{"translate-z":mt()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",J,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",J,U]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[L,K,q,X]}],stroke:[{stroke:["none",...W()]}],"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-x","border-w-y","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-x","border-color-y","border-color-s","border-color-e","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),gt=M(pt)},334:function(t,e,n){n.d(e,{x1:function(){return x}});var i=n(148),r=n(252),o=n(262);const s={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},a={ariaLabel:{type:String},ariaDescribedby:{type:String}},l={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...s,...a},c="2"===r.i8[0]?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function u(t){return(0,o.X3)(t)?(0,o.IU)(t):t}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return(0,o.X3)(e)?new Proxy(t,{}):t}function d(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function f(t,e){t.labels=e}function p(t,e,n){const i=[];t.datasets=e.map((e=>{const r=t.datasets.find((t=>t[n]===e[n]));return r&&e.data&&!i.includes(r)?(i.push(r),Object.assign(r,e),r):{...e}}))}function g(t,e){const n={labels:[],datasets:[]};return f(n,t.labels),p(n,t.datasets,e),n}const m=(0,r.aZ)({props:l,setup(t,e){let{expose:n,slots:s}=e;const a=(0,o.iH)(null),l=(0,o.XI)(null);n({chart:l});const c=()=>{if(!a.value)return;const{type:e,data:n,options:r,plugins:o,datasetIdKey:s}=t,c=g(n,s),u=h(c,n);l.value=new i.kL(a.value,{type:e,data:u,options:{...r},plugins:o})},m=()=>{const e=(0,o.IU)(l.value);e&&(t.destroyDelay>0?setTimeout((()=>{e.destroy(),l.value=null}),t.destroyDelay):(e.destroy(),l.value=null))},b=e=>{e.update(t.updateMode)};return(0,r.bv)(c),(0,r.Ah)(m),(0,r.YP)([()=>t.options,()=>t.data],((e,n)=>{let[i,s]=e,[a,c]=n;const h=(0,o.IU)(l.value);if(!h)return;let g=!1;if(i){const t=u(i),e=u(a);t&&t!==e&&(d(h,t),g=!0)}if(s){const e=u(s.labels),n=u(c.labels),i=u(s.datasets),r=u(c.datasets);e!==n&&(f(h.config.data,e),g=!0),i&&i!==r&&(p(h.config.data,i,t.datasetIdKey),g=!0)}g&&(0,r.Y3)((()=>{b(h)}))}),{deep:!0}),()=>(0,r.h)("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:a},[(0,r.h)("p",{},[s.default?s.default():""])])}});function b(t,e){return i.kL.register(e),(0,r.aZ)({props:s,setup(e,n){let{expose:i}=n;const s=(0,o.XI)(null),a=t=>{s.value=t?.chart};return i({chart:s}),()=>(0,r.h)(m,c({ref:a},{type:t,...e}))}})}const x=b("line",i.ST)},201:function(t,e,n){n.d(e,{PO:function(){return lt},p7:function(){return re},tv:function(){return se},yj:function(){return ae}});var i=n(252),r=n(262); +const{entries:i,setPrototypeOf:r,isFrozen:o,getPrototypeOf:s,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:h,construct:d}="undefined"!==typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),h||(h=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r1?e-1:0),i=1;i1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:y;r&&r(t,null);let i=e.length;while(i--){let r=e[i];if("string"===typeof r){const t=n(r);t!==r&&(o(e)||(e[i]=t),r=t)}t[r]=!0}return t}function O(t){for(let e=0;e/gm),U=c(/\$\{[\w\W]*/gm),q=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),X=c(/^aria-[\-\w]+$/),G=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=c(/^(?:\w+script|data):/i),Q=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=c(/^html$/i),K=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:X,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:K,DATA_ATTR:q,DOCTYPE_NAME:J,ERB_EXPR:V,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:Z,MUSTACHE_EXPR:Y,TMPLIT_EXPR:U});const et={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nt=function(){return"undefined"===typeof window?null:window},it=function(t,e){if("object"!==typeof t||"function"!==typeof t.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML(t){return t},createScriptURL(t){return t}})}catch(o){return console.warn("TrustedTypes policy "+r+" could not be created."),null}},rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ot(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt();const e=t=>ot(t);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==et.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:c,Element:h,NodeFilter:d,NamedNodeMap:D=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:O,trustedTypes:Y}=t,V=h.prototype,U=E(V,"cloneNode"),q=E(V,"remove"),X=E(V,"nextSibling"),Z=E(V,"childNodes"),Q=E(V,"parentNode");if("function"===typeof a){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let K,st="";const{implementation:at,createNodeIterator:lt,createDocumentFragment:ct,getElementsByTagName:ut}=n,{importNode:ht}=r;let dt=rt();e.isSupported="function"===typeof i&&"function"===typeof Q&&at&&void 0!==at.createHTMLDocument;const{MUSTACHE_EXPR:ft,ERB_EXPR:pt,TMPLIT_EXPR:gt,DATA_ATTR:mt,ARIA_ATTR:bt,IS_SCRIPT_OR_DATA:yt,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:vt}=tt;let{IS_ALLOWED_URI:wt}=tt,kt=null;const _t=A({},[...R,...I,...L,...N,...j]);let Mt=null;const St=A({},[...H,...W,...$,...B]);let Tt=Object.seal(u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Ct=null;const At=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ot=!0,Pt=!0,Et=!1,Rt=!0,It=!1,Lt=!0,zt=!1,Nt=!1,Ft=!1,jt=!1,Ht=!1,Wt=!1,$t=!0,Bt=!1;const Yt="user-content-";let Vt=!0,Ut=!1,qt={},Xt=null;const Gt=A({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=A({},["audio","video","img","source","image","track"]);let Jt=null;const Kt=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),te="http://www.w3.org/1998/Math/MathML",ee="http://www.w3.org/2000/svg",ne="http://www.w3.org/1999/xhtml";let ie=ne,re=!1,oe=null;const se=A({},[te,ee,ne],x);let ae=A({},["mi","mo","mn","ms","mtext"]),le=A({},["annotation-xml"]);const ce=A({},["title","style","font","a","script"]);let ue=null;const he=["application/xhtml+xml","text/html"],de="text/html";let fe=null,pe=null;const ge=n.createElement("form"),me=function(t){return t instanceof RegExp||t instanceof Function},be=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pe||pe!==t){if(t&&"object"===typeof t||(t={}),t=P(t),ue=-1===he.indexOf(t.PARSER_MEDIA_TYPE)?de:t.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===ue?x:y,kt=M(t,"ALLOWED_TAGS")?A({},t.ALLOWED_TAGS,fe):_t,Mt=M(t,"ALLOWED_ATTR")?A({},t.ALLOWED_ATTR,fe):St,oe=M(t,"ALLOWED_NAMESPACES")?A({},t.ALLOWED_NAMESPACES,x):se,Jt=M(t,"ADD_URI_SAFE_ATTR")?A(P(Kt),t.ADD_URI_SAFE_ATTR,fe):Kt,Zt=M(t,"ADD_DATA_URI_TAGS")?A(P(Qt),t.ADD_DATA_URI_TAGS,fe):Qt,Xt=M(t,"FORBID_CONTENTS")?A({},t.FORBID_CONTENTS,fe):Gt,Dt=M(t,"FORBID_TAGS")?A({},t.FORBID_TAGS,fe):P({}),Ct=M(t,"FORBID_ATTR")?A({},t.FORBID_ATTR,fe):P({}),qt=!!M(t,"USE_PROFILES")&&t.USE_PROFILES,Ot=!1!==t.ALLOW_ARIA_ATTR,Pt=!1!==t.ALLOW_DATA_ATTR,Et=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Rt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,It=t.SAFE_FOR_TEMPLATES||!1,Lt=!1!==t.SAFE_FOR_XML,zt=t.WHOLE_DOCUMENT||!1,jt=t.RETURN_DOM||!1,Ht=t.RETURN_DOM_FRAGMENT||!1,Wt=t.RETURN_TRUSTED_TYPE||!1,Ft=t.FORCE_BODY||!1,$t=!1!==t.SANITIZE_DOM,Bt=t.SANITIZE_NAMED_PROPS||!1,Vt=!1!==t.KEEP_CONTENT,Ut=t.IN_PLACE||!1,wt=t.ALLOWED_URI_REGEXP||G,ie=t.NAMESPACE||ne,ae=t.MATHML_TEXT_INTEGRATION_POINTS||ae,le=t.HTML_INTEGRATION_POINTS||le,Tt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Tt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&me(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Tt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Tt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(Pt=!1),Ht&&(jt=!0),qt&&(kt=A({},j),Mt=[],!0===qt.html&&(A(kt,R),A(Mt,H)),!0===qt.svg&&(A(kt,I),A(Mt,W),A(Mt,B)),!0===qt.svgFilters&&(A(kt,L),A(Mt,W),A(Mt,B)),!0===qt.mathMl&&(A(kt,N),A(Mt,$),A(Mt,B))),t.ADD_TAGS&&("function"===typeof t.ADD_TAGS?At.tagCheck=t.ADD_TAGS:(kt===_t&&(kt=P(kt)),A(kt,t.ADD_TAGS,fe))),t.ADD_ATTR&&("function"===typeof t.ADD_ATTR?At.attributeCheck=t.ADD_ATTR:(Mt===St&&(Mt=P(Mt)),A(Mt,t.ADD_ATTR,fe))),t.ADD_URI_SAFE_ATTR&&A(Jt,t.ADD_URI_SAFE_ATTR,fe),t.FORBID_CONTENTS&&(Xt===Gt&&(Xt=P(Xt)),A(Xt,t.FORBID_CONTENTS,fe)),Vt&&(kt["#text"]=!0),zt&&A(kt,["html","head","body"]),kt.table&&(A(kt,["tbody"]),delete Dt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!==typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!==typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=t.TRUSTED_TYPES_POLICY,st=K.createHTML("")}else void 0===K&&(K=it(Y,o)),null!==K&&"string"===typeof st&&(st=K.createHTML(""));l&&l(t),pe=t}},ye=A({},[...I,...L,...z]),xe=A({},[...N,...F]),ve=function(t){let e=Q(t);e&&e.tagName||(e={namespaceURI:ie,tagName:"template"});const n=y(t.tagName),i=y(e.tagName);return!!oe[t.namespaceURI]&&(t.namespaceURI===ee?e.namespaceURI===ne?"svg"===n:e.namespaceURI===te?"svg"===n&&("annotation-xml"===i||ae[i]):Boolean(ye[n]):t.namespaceURI===te?e.namespaceURI===ne?"math"===n:e.namespaceURI===ee?"math"===n&&le[i]:Boolean(xe[n]):t.namespaceURI===ne?!(e.namespaceURI===ee&&!le[i])&&(!(e.namespaceURI===te&&!ae[i])&&(!xe[n]&&(ce[n]||!ye[n]))):!("application/xhtml+xml"!==ue||!oe[t.namespaceURI]))},we=function(t){m(e.removed,{element:t});try{Q(t).removeChild(t)}catch(n){q(t)}},ke=function(t,n){try{m(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(i){m(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t)if(jt||Ht)try{we(n)}catch(i){}else try{n.setAttribute(t,"")}catch(i){}},_e=function(t){let e=null,i=null;if(Ft)t=""+t;else{const e=v(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===ue&&ie===ne&&(t=''+t+"");const r=K?K.createHTML(t):t;if(ie===ne)try{e=(new O).parseFromString(r,ue)}catch(s){}if(!e||!e.documentElement){e=at.createDocument(ie,"template",null);try{e.documentElement.innerHTML=re?st:r}catch(s){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(n.createTextNode(i),o.childNodes[0]||null),ie===ne?ut.call(e,zt?"html":"body")[0]:zt?e.documentElement:o},Me=function(t){return lt.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Se=function(t){return t instanceof C&&("string"!==typeof t.nodeName||"string"!==typeof t.textContent||"function"!==typeof t.removeChild||!(t.attributes instanceof D)||"function"!==typeof t.removeAttribute||"function"!==typeof t.setAttribute||"string"!==typeof t.namespaceURI||"function"!==typeof t.insertBefore||"function"!==typeof t.hasChildNodes)},Te=function(t){return"function"===typeof c&&t instanceof c};function De(t,n,i){f(t,(t=>{t.call(e,n,i,pe)}))}const Ce=function(t){let n=null;if(De(dt.beforeSanitizeElements,t,null),Se(t))return we(t),!0;const i=fe(t.nodeName);if(De(dt.uponSanitizeElement,t,{tagName:i,allowedTags:kt}),Lt&&t.hasChildNodes()&&!Te(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return we(t),!0;if(t.nodeType===et.progressingInstruction)return we(t),!0;if(Lt&&t.nodeType===et.comment&&S(/<[/\w]/g,t.data))return we(t),!0;if(!(At.tagCheck instanceof Function&&At.tagCheck(i))&&(!kt[i]||Dt[i])){if(!Dt[i]&&Oe(i)){if(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,i))return!1;if(Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(i))return!1}if(Vt&&!Xt[i]){const e=Q(t)||t.parentNode,n=Z(t)||t.childNodes;if(n&&e){const i=n.length;for(let r=i-1;r>=0;--r){const i=U(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,X(t))}}}return we(t),!0}return t instanceof h&&!ve(t)?(we(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(It&&t.nodeType===et.text&&(n=t.textContent,f([ft,pt,gt],(t=>{n=w(n,t," ")})),t.textContent!==n&&(m(e.removed,{element:t.cloneNode()}),t.textContent=n)),De(dt.afterSanitizeElements,t,null),!1):(we(t),!0)},Ae=function(t,e,i){if($t&&("id"===e||"name"===e)&&(i in n||i in ge))return!1;if(Pt&&!Ct[e]&&S(mt,e));else if(Ot&&S(bt,e));else if(At.attributeCheck instanceof Function&&At.attributeCheck(e,t));else if(!Mt[e]||Ct[e]){if(!(Oe(t)&&(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,t)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(t))&&(Tt.attributeNameCheck instanceof RegExp&&S(Tt.attributeNameCheck,e)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(e,t))||"is"===e&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&S(Tt.tagNameCheck,i)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(i))))return!1}else if(Jt[e]);else if(S(wt,w(i,xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==k(i,"data:")||!Zt[t]){if(Et&&!S(yt,w(i,xt,"")));else if(i)return!1}else;return!0},Oe=function(t){return"annotation-xml"!==t&&v(t,vt)},Pe=function(t){De(dt.beforeSanitizeAttributes,t,null);const{attributes:n}=t;if(!n||Se(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Mt,forceKeepAttr:void 0};let r=n.length;while(r--){const s=n[r],{name:a,namespaceURI:l,value:c}=s,u=fe(a),h=c;let d="value"===a?h:_(h);if(i.attrName=u,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,De(dt.uponSanitizeAttribute,t,i),d=i.attrValue,!Bt||"id"!==u&&"name"!==u||(ke(a,t),d=Yt+d),Lt&&S(/((--!?|])>)|<\/(style|title|textarea)/i,d)){ke(a,t);continue}if("attributename"===u&&v(d,"href")){ke(a,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ke(a,t);continue}if(!Rt&&S(/\/>/i,d)){ke(a,t);continue}It&&f([ft,pt,gt],(t=>{d=w(d,t," ")}));const p=fe(t.nodeName);if(Ae(p,u,d)){if(K&&"object"===typeof Y&&"function"===typeof Y.getAttributeType)if(l);else switch(Y.getAttributeType(p,u)){case"TrustedHTML":d=K.createHTML(d);break;case"TrustedScriptURL":d=K.createScriptURL(d);break}if(d!==h)try{l?t.setAttributeNS(l,a,d):t.setAttribute(a,d),Se(t)?we(t):g(e.removed)}catch(o){ke(a,t)}}else ke(a,t)}De(dt.afterSanitizeAttributes,t,null)},Ee=function t(e){let n=null;const i=Me(e);De(dt.beforeSanitizeShadowDOM,e,null);while(n=i.nextNode())De(dt.uponSanitizeShadowNode,n,null),Ce(n),Pe(n),n.content instanceof s&&t(n.content);De(dt.afterSanitizeShadowDOM,e,null)};return e.sanitize=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,l=null;if(re=!t,re&&(t="\x3c!--\x3e"),"string"!==typeof t&&!Te(t)){if("function"!==typeof t.toString)throw T("toString is not a function");if(t=t.toString(),"string"!==typeof t)throw T("dirty is not a string, aborting")}if(!e.isSupported)return t;if(Nt||be(n),e.removed=[],"string"===typeof t&&(Ut=!1),Ut){if(t.nodeName){const e=fe(t.nodeName);if(!kt[e]||Dt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)i=_e("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),o.nodeType===et.element&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!jt&&!It&&!zt&&-1===t.indexOf("<"))return K&&Wt?K.createHTML(t):t;if(i=_e(t),!i)return jt?null:Wt?st:""}i&&Ft&&we(i.firstChild);const u=Me(Ut?t:i);while(a=u.nextNode())Ce(a),Pe(a),a.content instanceof s&&Ee(a.content);if(Ut)return t;if(jt){if(Ht){l=ct.call(i.ownerDocument);while(i.firstChild)l.appendChild(i.firstChild)}else l=i;return(Mt.shadowroot||Mt.shadowrootmode)&&(l=ht.call(r,l,!0)),l}let h=zt?i.outerHTML:i.innerHTML;return zt&&kt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(J,i.ownerDocument.doctype.name)&&(h="\n"+h),It&&f([ft,pt,gt],(t=>{h=w(h,t," ")})),K&&Wt?K.createHTML(h):h},e.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};be(t),Nt=!0},e.clearConfig=function(){pe=null,Nt=!1},e.isValidAttribute=function(t,e,n){pe||be({});const i=fe(t),r=fe(e);return Ae(i,r,n)},e.addHook=function(t,e){"function"===typeof e&&m(dt[t],e)},e.removeHook=function(t,e){if(void 0!==e){const n=p(dt[t],e);return-1===n?void 0:b(dt[t],n,1)[0]}return g(dt[t])},e.removeHooks=function(t){dt[t]=[]},e.removeAllHooks=function(){dt=rt()},e}var st=ot()},441:function(t,e,n){function i(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.d(e,{TU:function(){return Pt}});var r=i();function o(t){r=t}var s={exec:()=>null};function a(t,e=""){let n="string"==typeof t?t:t.source,i={replace:(t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(c.caret,"$1"),n=n.replace(t,r),i},getRegex:()=>new RegExp(n,e)};return i}var l=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^(?:[ \t]*(?:\n|$))+/,h=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,d=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,f=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,g=/(?:[*+-]|\d{1,9}[.)])/,m=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,b=a(m).replace(/bull/g,g).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),y=a(m).replace(/bull/g,g).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),x=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,v=/^[^\n]+/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_=a(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,g).getRegex(),M="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S=/|$))/,T=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",S).replace("tag",M).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D=a(x).replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),C=a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",D).getRegex(),A={blockquote:C,code:h,def:k,fences:d,heading:p,hr:f,html:T,lheading:b,list:_,newline:u,paragraph:D,table:s,text:v},O=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex(),P={...A,lheading:y,table:O,paragraph:a(x).replace("hr",f).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",O).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",M).getRegex()},E={...A,html:a("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",S).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(x).replace("hr",f).replace("heading"," *#{1,6} *[^\n]").replace("lheading",b).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,L=/^( {2,}|\\)\n(?!\s*$)/,z=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",l?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),V=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,U=a(V,"u").replace(/punct/g,N).getRegex(),q=a(V,"u").replace(/punct/g,W).getRegex(),X="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G=a(X,"gu").replace(/notPunctSpace/g,j).replace(/punctSpace/g,F).replace(/punct/g,N).getRegex(),Z=a(X,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,$).replace(/punct/g,W).getRegex(),Q=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,j).replace(/punctSpace/g,F).replace(/punct/g,N).getRegex(),J=a(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),K=a(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),tt=a(S).replace("(?:--\x3e|$)","--\x3e").getRegex(),et=a("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",tt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,it=a(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rt=a(/^!?\[(label)\]\[(ref)\]/).replace("label",nt).replace("ref",w).getRegex(),ot=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",w).getRegex(),st=a("reflink|nolink(?!\\()","g").replace("reflink",rt).replace("nolink",ot).getRegex(),at=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,lt={_backpedal:s,anyPunctuation:J,autolink:K,blockSkip:Y,br:L,code:I,del:s,emStrongLDelim:U,emStrongRDelimAst:G,emStrongRDelimUnd:Q,escape:R,link:it,nolink:ot,punctuation:H,reflink:rt,reflinkSearch:st,tag:et,text:z,url:s},ct={...lt,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",nt).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt).getRegex()},ut={...lt,emStrongRDelimAst:Z,emStrongLDelim:q,url:a(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",at).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:a(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},gt=t=>pt[t];function mt(t,e){if(e){if(c.escapeTest.test(t))return t.replace(c.escapeReplace,gt)}else if(c.escapeTestNoEncode.test(t))return t.replace(c.escapeReplaceNoEncode,gt);return t}function bt(t){try{t=encodeURI(t).replace(c.percentDecode,"%")}catch{return null}return t}function yt(t,e){let n=t.replace(c.findPipe,((t,e,n)=>{let i=!1,r=e;for(;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"})),i=n.split(c.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length0?-2:-1}function wt(t,e,n,i,r){let o=e.href,s=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function kt(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(null===i)return e;let r=i[1];return e.split("\n").map((t=>{let e=t.match(n.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=r.length?t.slice(r.length):t})).join("\n")}var _t=class{options;rules;lexer;constructor(t){this.options=t||r}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:xt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],n=kt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=xt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:xt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=xt(e[0],"\n").split("\n"),n="",i="",r=[];for(;t.length>0;){let e,o=!1,s=[];for(e=0;e1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let n=!1,i="",a="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],u=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):u?h=e[1].length+1:(h=e[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=l.slice(h),h+=e[1].length),u&&this.rules.other.blankLine.test(c)&&(i+=c+"\n",t=t.substring(c.length+1),n=!0),!n){let e=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),o=this.rules.other.headingBeginRegex(h),s=this.rules.other.htmlBeginRegex(h);for(;t;){let d,f=t.split("\n",1)[0];if(c=f,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),r.test(c)||o.test(c)||s.test(c)||e.test(c)||n.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=h||!c.trim())a+="\n"+d.slice(h);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||r.test(l)||o.test(l)||n.test(l))break;a+="\n"+c}!u&&!c.trim()&&(u=!0),i+=f+"\n",t=t.substring(f.length+1),l=d.slice(h)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let d,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(a),f&&(d="[ ] "!==f[0],a=a.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:i,task:!!f,checked:d,loose:!1,text:a,tokens:[]}),r.raw+=i}let a=r.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),r.raw=r.raw.trimEnd();for(let t=0;t"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));r.loose=n}if(r.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=xt(t.slice(0,-1),"\\");if((t.length-e.length)%2===0)return}else{let t=vt(e[2],"()");if(-2===t)return;if(t>-1){let n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),wt(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[t.toLowerCase()];if(!i){let t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return wt(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!n||this.rules.inline.punctuation.exec(n))){let n,r,o=[...i[0]].length-1,s=o,a=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+o);null!=(i=l.exec(e));){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(r=[...n].length,i[3]||i[4]){s+=r;continue}if((i[5]||i[6])&&o%3&&!((o+r)%3)){a+=r;continue}if(s-=r,s>0)continue;r=Math.min(r,r+s+a);let e=[...i[0]][0].length,l=t.slice(0,o+i.index+e+r);if(Math.min(o,r)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Mt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||r,this.options.tokenizer=this.options.tokenizer||new _t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:c,block:dt.normal,inline:ft.normal};this.options.pedantic?(e.block=dt.pedantic,e.inline=ft.pedantic):this.options.gfm&&(e.block=dt.gfm,this.options.breaks?e.inline=ft.breaks:e.inline=ft.gfm),this.tokenizer.rules=e}static get rules(){return{block:dt,inline:ft}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(c.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(i=n.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0))))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let n=e.at(-1);1===i.raw.length&&void 0!==n?n.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.at(-1).src=n.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let r=t;if(this.options.extensions?.startBlock){let e,n=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach((t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(n=Math.min(n,e))})),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(this.state.top&&(i=this.tokenizer.paragraph(r))){let o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(i),n=r.length!==t.length,t=t.substring(i.raw.length)}else if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let n=e.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(i)}else if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i=t,r=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(i));)n=r[2]?r[2].length:0,i=i.slice(0,r.index+n)+"["+"a".repeat(r[0].length-n-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,s="";for(;t;){let n;if(o||(s=""),o=!1,this.options.extensions?.inline?.some((i=>!!(n=i.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0))))continue;if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length);let i=e.at(-1);"text"===n.type&&"text"===i?.type?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,i,s)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}let r=t;if(this.options.extensions?.startInline){let e,n=1/0,i=t.slice(1);this.options.extensions.startInline.forEach((t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(n=Math.min(n,e))})),n<1/0&&n>=0&&(r=t.substring(0,n+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),o=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=n.raw,i.text+=n.text):e.push(n)}else if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},St=class{options;parser;constructor(t){this.options=t||r}space(t){return""}code({text:t,lang:e,escaped:n}){let i=(e||"").match(c.notSpaceStart)?.[0],r=t.replace(c.endingNewline,"")+"\n";return i?'
    '+(n?r:mt(r,!0))+"
    \n":"
    "+(n?r:mt(r,!0))+"
    \n"}blockquote({tokens:t}){return`
    \n${this.parser.parse(t)}
    \n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
    \n"}list(t){let e=t.ordered,n=t.start,i="";for(let s=0;s\n"+i+"\n"}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+mt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",n="";for(let r=0;r${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${mt(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),r=bt(t);if(null===r)return i;t=r;let o='
    ",o}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=bt(t);if(null===r)return mt(n);t=r;let o=`${n}{let r=t[i].flat(1/0);n=n.concat(this.walkTokens(r,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=n.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){let e=this.defaults.renderer||new St(this.defaults);for(let n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let i=n,r=t.renderer[i],o=e[i];e[i]=(...t)=>{let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new _t(this.defaults);for(let n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let i=n,r=t.tokenizer[i],o=e[i];e[i]=(...t)=>{let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ct;for(let n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let i=n,r=t.hooks[i],o=e[i];Ct.passThroughHooks.has(n)?e[i]=t=>{if(this.defaults.async&&Ct.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await r.call(e,t);return o.call(e,n)})();let i=r.call(e,t);return o.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let n=await r.apply(e,t);return!1===n&&(n=await o.apply(e,t)),n})();let n=r.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(i.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Mt.lex(t,e??this.defaults)}parser(t,e){return Dt.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let i={...n},r={...this.defaults,...i},o=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===i.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let n=r.hooks?await r.hooks.preprocess(e):e,i=await(r.hooks?await r.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(n,r),o=r.hooks?await r.hooks.processAllTokens(i):i;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let s=await(r.hooks?await r.hooks.provideParser():t?Dt.parse:Dt.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(s):s})().catch(o);try{r.hooks&&(e=r.hooks.preprocess(e));let n=(r.hooks?r.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(e,r);r.hooks&&(n=r.hooks.processAllTokens(n)),r.walkTokens&&this.walkTokens(n,r.walkTokens);let i=(r.hooks?r.hooks.provideParser():t?Dt.parse:Dt.parseInline)(n,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(s){return o(s)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+mt(n.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}},Ot=new At;function Pt(t,e){return Ot.parse(t,e)}Pt.options=Pt.setOptions=function(t){return Ot.setOptions(t),Pt.defaults=Ot.defaults,o(Pt.defaults),Pt},Pt.getDefaults=i,Pt.defaults=r,Pt.use=function(...t){return Ot.use(...t),Pt.defaults=Ot.defaults,o(Pt.defaults),Pt},Pt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Pt.parseInline=Ot.parseInline,Pt.Parser=Dt,Pt.parser=Dt.parse,Pt.Renderer=St,Pt.TextRenderer=Tt,Pt.Lexer=Mt,Pt.lexer=Mt.lex,Pt.Tokenizer=_t,Pt.Hooks=Ct,Pt.parse=Pt;Pt.options,Pt.setOptions,Pt.use,Pt.walkTokens,Pt.parseInline,Dt.parse,Mt.lex},388:function(t,e,n){n.d(e,{m6:function(){return gt}});const i="-",r=t=>{const e=l(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t,s=t=>{const n=t.split(i);return""===n[0]&&1!==n.length&&n.shift(),o(n,e)||a(t)},c=(t,e)=>{const i=n[t]||[];return e&&r[t]?[...i,...r[t]]:i};return{getClassGroupId:s,getConflictingClassGroupIds:c}},o=(t,e)=>{if(0===t.length)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?o(t.slice(1),r):void 0;if(s)return s;if(0===e.validators.length)return;const a=t.join(i);return e.validators.find((({validator:t})=>t(a)))?.classGroupId},s=/^\[(.+)\]$/,a=t=>{if(s.test(t)){const e=s.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},l=t=>{const{theme:e,classGroups:n}=t,i={nextPart:new Map,validators:[]};for(const r in n)c(n[r],i,r,e);return i},c=(t,e,n,i)=>{t.forEach((t=>{if("string"!==typeof t){if("function"===typeof t)return h(t)?void c(t(i),e,n,i):void e.validators.push({validator:t,classGroupId:n});Object.entries(t).forEach((([t,r])=>{c(r,u(e,t),n,i)}))}else{const i=""===t?e:u(e,t);i.classGroupId=n}}))},u=(t,e)=>{let n=t;return e.split(i).forEach((t=>{n.nextPart.has(t)||n.nextPart.set(t,{nextPart:new Map,validators:[]}),n=n.nextPart.get(t)})),n},h=t=>t.isThemeGetter,d=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(r,o)=>{n.set(r,o),e++,e>t&&(e=0,i=n,n=new Map)};return{get(t){let e=n.get(t);return void 0!==e?e:void 0!==(e=i.get(t))?(r(t,e),e):void 0},set(t,e){n.has(t)?n.set(t,e):r(t,e)}}},f="!",p=":",g=p.length,m=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=t=>{const e=[];let n,i=0,r=0,o=0;for(let u=0;uo?n-o:void 0;return{modifiers:e,hasImportantModifier:l,baseClassName:a,maybePostfixModifierPosition:c}};if(e){const t=e+p,n=i;i=e=>e.startsWith(t)?n(e.substring(t.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:e,maybePostfixModifierPosition:void 0}}if(n){const t=i;i=e=>n({className:e,parseClassName:t})}return i},b=t=>t.endsWith(f)?t.substring(0,t.length-1):t.startsWith(f)?t.substring(1):t,y=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map((t=>[t,!0]))),n=t=>{if(t.length<=1)return t;const n=[];let i=[];return t.forEach((t=>{const r="["===t[0]||e[t];r?(n.push(...i.sort(),t),i=[]):i.push(t)})),n.push(...i.sort()),n};return n},x=t=>({cache:d(t.cacheSize),parseClassName:m(t),sortModifiers:y(t),...r(t)}),v=/\s+/,w=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:o}=e,s=[],a=t.trim().split(v);let l="";for(let c=a.length-1;c>=0;c-=1){const t=a[c],{isExternal:e,modifiers:u,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:p}=n(t);if(e){l=t+(l.length>0?" "+l:l);continue}let g=!!p,m=i(g?d.substring(0,p):d);if(!m){if(!g){l=t+(l.length>0?" "+l:l);continue}if(m=i(d),!m){l=t+(l.length>0?" "+l:l);continue}g=!1}const b=o(u).join(":"),y=h?b+f:b,x=y+m;if(s.includes(x))continue;s.push(x);const v=r(m,g);for(let n=0;n0?" "+l:l)}return l};function k(){let t,e,n=0,i="";while(n{if("string"===typeof t)return t;let e,n="";for(let i=0;ie(t)),t());return n=x(l),i=n.cache.get,r=n.cache.set,o=a,a(s)}function a(t){const e=i(t);if(e)return e;const o=w(t,n);return r(t,o),o}return function(){return o(k.apply(null,arguments))}}const S=t=>{const e=e=>e[t]||[];return e.isThemeGetter=!0,e},T=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,D=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C=/^\d+\/\d+$/,A=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O=/\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$/,P=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=t=>C.test(t),L=t=>!!t&&!Number.isNaN(Number(t)),z=t=>!!t&&Number.isInteger(Number(t)),N=t=>t.endsWith("%")&&L(t.slice(0,-1)),F=t=>A.test(t),j=()=>!0,H=t=>O.test(t)&&!P.test(t),W=()=>!1,$=t=>E.test(t),B=t=>R.test(t),Y=t=>!U(t)&&!J(t),V=t=>ot(t,ct,W),U=t=>T.test(t),q=t=>ot(t,ut,H),X=t=>ot(t,ht,L),G=t=>ot(t,at,W),Z=t=>ot(t,lt,B),Q=t=>ot(t,ft,$),J=t=>D.test(t),K=t=>st(t,ut),tt=t=>st(t,dt),et=t=>st(t,at),nt=t=>st(t,ct),it=t=>st(t,lt),rt=t=>st(t,ft,!0),ot=(t,e,n)=>{const i=T.exec(t);return!!i&&(i[1]?e(i[1]):n(i[2]))},st=(t,e,n=!1)=>{const i=D.exec(t);return!!i&&(i[1]?e(i[1]):n)},at=t=>"position"===t||"percentage"===t,lt=t=>"image"===t||"url"===t,ct=t=>"length"===t||"size"===t||"bg-size"===t,ut=t=>"length"===t,ht=t=>"number"===t,dt=t=>"family-name"===t,ft=t=>"shadow"===t,pt=(Symbol.toStringTag,()=>{const t=S("color"),e=S("font"),n=S("text"),i=S("font-weight"),r=S("tracking"),o=S("leading"),s=S("breakpoint"),a=S("container"),l=S("spacing"),c=S("radius"),u=S("shadow"),h=S("inset-shadow"),d=S("text-shadow"),f=S("drop-shadow"),p=S("blur"),g=S("perspective"),m=S("aspect"),b=S("ease"),y=S("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...v(),J,U],k=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],M=()=>[J,U,l],T=()=>[I,"full","auto",...M()],D=()=>[z,"none","subgrid",J,U],C=()=>["auto",{span:["full",z,J,U]},z,J,U],A=()=>[z,"auto",J,U],O=()=>["auto","min","max","fr",J,U],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...M()],H=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],W=()=>[t,J,U],$=()=>[...v(),et,G,{position:[J,U]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ot=()=>["auto","cover","contain",nt,V,{size:[J,U]}],st=()=>[N,K,q],at=()=>["","none","full",c,J,U],lt=()=>["",L,K,q],ct=()=>["solid","dashed","dotted","double"],ut=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>[L,N,et,G],dt=()=>["","none",p,J,U],ft=()=>["none",L,J,U],pt=()=>["none",L,J,U],gt=()=>[L,J,U],mt=()=>[I,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[F],breakpoint:[F],color:[j],container:[F],"drop-shadow":[F],ease:["in","out","in-out"],font:[Y],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[F],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[F],shadow:[F],spacing:["px",L],text:[F],"text-shadow":[F],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,U,J,m]}],container:["container"],columns:[{columns:[L,U,J,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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"],sr:["sr-only","not-sr-only"],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:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[z,"auto",J,U]}],basis:[{basis:[I,"full","auto",a,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,I,"auto","initial","none",U]}],grow:[{grow:["",L,J,U]}],shrink:[{shrink:["",L,J,U]}],order:[{order:[z,"first","last","none",J,U]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[a,"screen",...H()]}],"min-w":[{"min-w":[a,"screen","none",...H()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,K,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,J,X]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",N,U]}],"font-family":[{font:[tt,U,e]}],"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-fractions"],tracking:[{tracking:[r,J,U]}],"line-clamp":[{"line-clamp":[L,"none",J,X]}],leading:[{leading:[o,...M()]}],"list-image":[{"list-image":["none",J,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",J,q]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[L,"auto",J,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ot()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},z,J,U],radial:["",J,U],conic:[z,J,U]},it,Z]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:st()}],"gradient-via-pos":[{via:st()}],"gradient-to-pos":[{to:st()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:at()}],"rounded-s":[{"rounded-s":at()}],"rounded-e":[{"rounded-e":at()}],"rounded-t":[{"rounded-t":at()}],"rounded-r":[{"rounded-r":at()}],"rounded-b":[{"rounded-b":at()}],"rounded-l":[{"rounded-l":at()}],"rounded-ss":[{"rounded-ss":at()}],"rounded-se":[{"rounded-se":at()}],"rounded-ee":[{"rounded-ee":at()}],"rounded-es":[{"rounded-es":at()}],"rounded-tl":[{"rounded-tl":at()}],"rounded-tr":[{"rounded-tr":at()}],"rounded-br":[{"rounded-br":at()}],"rounded-bl":[{"rounded-bl":at()}],"border-w":[{border:lt()}],"border-w-x":[{"border-x":lt()}],"border-w-y":[{"border-y":lt()}],"border-w-s":[{"border-s":lt()}],"border-w-e":[{"border-e":lt()}],"border-w-t":[{"border-t":lt()}],"border-w-r":[{"border-r":lt()}],"border-w-b":[{"border-b":lt()}],"border-w-l":[{"border-l":lt()}],"divide-x":[{"divide-x":lt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":lt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ct(),"hidden","none"]}],"divide-style":[{divide:[...ct(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...ct(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,J,U]}],"outline-w":[{outline:["",L,K,q]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",u,rt,Q]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",h,rt,Q]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:lt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[L,q]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":lt()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",d,rt,Q]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[L,J,U]}],"mix-blend":[{"mix-blend":[...ut(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ut()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":ht()}],"mask-image-linear-to-pos":[{"mask-linear-to":ht()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ht()}],"mask-image-t-to-pos":[{"mask-t-to":ht()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ht()}],"mask-image-r-to-pos":[{"mask-r-to":ht()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ht()}],"mask-image-b-to-pos":[{"mask-b-to":ht()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ht()}],"mask-image-l-to-pos":[{"mask-l-to":ht()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ht()}],"mask-image-x-to-pos":[{"mask-x-to":ht()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ht()}],"mask-image-y-to-pos":[{"mask-y-to":ht()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[J,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":ht()}],"mask-image-radial-to-pos":[{"mask-radial-to":ht()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":ht()}],"mask-image-conic-to-pos":[{"mask-conic-to":ht()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ot()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,U]}],filter:[{filter:["","none",J,U]}],blur:[{blur:dt()}],brightness:[{brightness:[L,J,U]}],contrast:[{contrast:[L,J,U]}],"drop-shadow":[{"drop-shadow":["","none",f,rt,Q]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",L,J,U]}],"hue-rotate":[{"hue-rotate":[L,J,U]}],invert:[{invert:["",L,J,U]}],saturate:[{saturate:[L,J,U]}],sepia:[{sepia:["",L,J,U]}],"backdrop-filter":[{"backdrop-filter":["","none",J,U]}],"backdrop-blur":[{"backdrop-blur":dt()}],"backdrop-brightness":[{"backdrop-brightness":[L,J,U]}],"backdrop-contrast":[{"backdrop-contrast":[L,J,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,J,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,J,U]}],"backdrop-invert":[{"backdrop-invert":["",L,J,U]}],"backdrop-opacity":[{"backdrop-opacity":[L,J,U]}],"backdrop-saturate":[{"backdrop-saturate":[L,J,U]}],"backdrop-sepia":[{"backdrop-sepia":["",L,J,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",J,U]}],ease:[{ease:["linear","initial",b,J,U]}],delay:[{delay:[L,J,U]}],animate:[{animate:["none",y,J,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,U]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:ft()}],"rotate-x":[{"rotate-x":ft()}],"rotate-y":[{"rotate-y":ft()}],"rotate-z":[{"rotate-z":ft()}],scale:[{scale:pt()}],"scale-x":[{"scale-x":pt()}],"scale-y":[{"scale-y":pt()}],"scale-z":[{"scale-z":pt()}],"scale-3d":["scale-3d"],skew:[{skew:gt()}],"skew-x":[{"skew-x":gt()}],"skew-y":[{"skew-y":gt()}],transform:[{transform:[J,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:mt()}],"translate-x":[{"translate-x":mt()}],"translate-y":[{"translate-y":mt()}],"translate-z":[{"translate-z":mt()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",J,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",J,U]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[L,K,q,X]}],stroke:[{stroke:["none",...W()]}],"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-x","border-w-y","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-x","border-color-y","border-color-s","border-color-e","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),gt=M(pt)},334:function(t,e,n){n.d(e,{x1:function(){return y}});var i=n(148),r=n(252),o=n(262);const s={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},a={ariaLabel:{type:String},ariaDescribedby:{type:String}},l={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...s,...a},c="2"===r.i8[0]?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function u(t){return(0,o.X3)(t)?(0,o.IU)(t):t}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return(0,o.X3)(e)?new Proxy(t,{}):t}function d(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function f(t,e){t.labels=e}function p(t,e,n){const i=[];t.datasets=e.map((e=>{const r=t.datasets.find((t=>t[n]===e[n]));return r&&e.data&&!i.includes(r)?(i.push(r),Object.assign(r,e),r):{...e}}))}function g(t,e){const n={labels:[],datasets:[]};return f(n,t.labels),p(n,t.datasets,e),n}const m=(0,r.aZ)({props:l,setup(t,e){let{expose:n,slots:s}=e;const a=(0,o.iH)(null),l=(0,o.XI)(null);n({chart:l});const c=()=>{if(!a.value)return;const{type:e,data:n,options:r,plugins:o,datasetIdKey:s}=t,c=g(n,s),u=h(c,n);l.value=new i.kL(a.value,{type:e,data:u,options:{...r},plugins:o})},m=()=>{const e=(0,o.IU)(l.value);e&&(t.destroyDelay>0?setTimeout((()=>{e.destroy(),l.value=null}),t.destroyDelay):(e.destroy(),l.value=null))},b=e=>{e.update(t.updateMode)};return(0,r.bv)(c),(0,r.Ah)(m),(0,r.YP)([()=>t.options,()=>t.data],((e,n)=>{let[i,s]=e,[a,c]=n;const h=(0,o.IU)(l.value);if(!h)return;let g=!1;if(i){const t=u(i),e=u(a);t&&t!==e&&(d(h,t),g=!0)}if(s){const e=u(s.labels),n=u(c.labels),i=u(s.datasets),r=u(c.datasets);e!==n&&(f(h.config.data,e),g=!0),i&&i!==r&&(p(h.config.data,i,t.datasetIdKey),g=!0)}g&&(0,r.Y3)((()=>{b(h)}))}),{deep:!0}),()=>(0,r.h)("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:a},[(0,r.h)("p",{},[s.default?s.default():""])])}});function b(t,e){return i.kL.register(e),(0,r.aZ)({props:s,setup(e,n){let{expose:i}=n;const s=(0,o.XI)(null),a=t=>{s.value=t?.chart};return i({chart:s}),()=>(0,r.h)(m,c({ref:a},{type:t,...e}))}})}const y=b("line",i.ST)},201:function(t,e,n){n.d(e,{PO:function(){return lt},p7:function(){return re},tv:function(){return se},yj:function(){return ae}});var i=n(252),r=n(262); /*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT */ -const o="undefined"!==typeof document;function s(t){return"object"===typeof t||"displayName"in t||"props"in t||"__vccOpts"in t}function a(t){return t.__esModule||"Module"===t[Symbol.toStringTag]||t.default&&s(t.default)}const l=Object.assign;function c(t,e){const n={};for(const i in e){const r=e[i];n[i]=h(r)?r.map(t):t(r)}return n}const u=()=>{},h=Array.isArray;const d=/#/g,f=/&/g,p=/\//g,g=/=/g,m=/\?/g,b=/\+/g,x=/%5B/g,y=/%5D/g,v=/%5E/g,w=/%60/g,k=/%7B/g,_=/%7C/g,M=/%7D/g,S=/%20/g;function T(t){return encodeURI(""+t).replace(_,"|").replace(x,"[").replace(y,"]")}function D(t){return T(t).replace(k,"{").replace(M,"}").replace(v,"^")}function C(t){return T(t).replace(b,"%2B").replace(S,"+").replace(d,"%23").replace(f,"%26").replace(w,"`").replace(k,"{").replace(M,"}").replace(v,"^")}function A(t){return C(t).replace(g,"%3D")}function O(t){return T(t).replace(d,"%23").replace(m,"%3F")}function P(t){return null==t?"":O(t).replace(p,"%2F")}function E(t){try{return decodeURIComponent(""+t)}catch(e){}return""+t}const R=/\/$/,I=t=>t.replace(R,"");function L(t,e,n="/"){let i,r={},o="",s="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),r=t(o)),a>-1&&(i=i||e.slice(0,a),s=e.slice(a,e.length)),i=B(null!=i?i:e,n),{fullPath:i+(o&&"?")+o+s,path:i,query:r,hash:E(s)}}function z(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function N(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function F(t,e,n){const i=e.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&j(e.matched[i],n.matched[r])&&H(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function j(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function H(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!W(t[n],e[n]))return!1;return!0}function W(t,e){return h(t)?$(t,e):h(e)?$(e,t):t===e}function $(t,e){return h(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):1===t.length&&t[0]===e}function B(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),r=i[i.length-1];".."!==r&&"."!==r||i.push("");let o,s,a=n.length-1;for(o=0;o1&&a--}return n.slice(0,a).join("/")+"/"+i.slice(o).join("/")}const Y={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var V,U;(function(t){t["pop"]="pop",t["push"]="push"})(V||(V={})),function(t){t["back"]="back",t["forward"]="forward",t["unknown"]=""}(U||(U={}));function q(t){if(!t)if(o){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),I(t)}const X=/^[^#]+#/;function G(t,e){return t.replace(X,"#")+e}function Z(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const Q=()=>({left:window.scrollX,top:window.scrollY});function J(t){let e;if("el"in t){const n=t.el,i="string"===typeof n&&n.startsWith("#");0;const r="string"===typeof n?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;e=Z(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.scrollX,null!=e.top?e.top:window.scrollY)}function K(t,e){const n=history.state?history.state.position-e:-1;return n+t}const tt=new Map;function et(t,e){tt.set(t,e)}function nt(t){const e=tt.get(t);return tt.delete(t),e}let it=()=>location.protocol+"//"+location.host;function rt(t,e){const{pathname:n,search:i,hash:r}=e,o=t.indexOf("#");if(o>-1){let e=r.includes(t.slice(o))?t.slice(o).length:1,n=r.slice(e);return"/"!==n[0]&&(n="/"+n),N(n,"")}const s=N(n,t);return s+i+r}function ot(t,e,n,i){let r=[],o=[],s=null;const a=({state:o})=>{const a=rt(t,location),l=n.value,c=e.value;let u=0;if(o){if(n.value=a,e.value=o,s&&s===l)return void(s=null);u=c?o.position-c.position:0}else i(a);r.forEach((t=>{t(n.value,l,{delta:u,type:V.pop,direction:u?u>0?U.forward:U.back:U.unknown})}))};function c(){s=n.value}function u(t){r.push(t);const e=()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)};return o.push(e),e}function h(){const{history:t}=window;t.state&&t.replaceState(l({},t.state,{scroll:Q()}),"")}function d(){for(const t of o)t();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:c,listen:u,destroy:d}}function st(t,e,n,i=!1,r=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:r?Q():null}}function at(t){const{history:e,location:n}=window,i={value:rt(t,n)},r={value:e.state};function o(i,o,s){const a=t.indexOf("#"),l=a>-1?(n.host&&document.querySelector("base")?t:t.slice(a))+i:it()+t+i;try{e[s?"replaceState":"pushState"](o,"",l),r.value=o}catch(c){console.error(c),n[s?"replace":"assign"](l)}}function s(t,n){const s=l({},e.state,st(r.value.back,t,r.value.forward,!0),n,{position:r.value.position});o(t,s,!0),i.value=t}function a(t,n){const s=l({},r.value,e.state,{forward:t,scroll:Q()});o(s.current,s,!0);const a=l({},st(i.value,t,null),{position:s.position+1},n);o(t,a,!1),i.value=t}return r.value||o(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:i,state:r,push:a,replace:s}}function lt(t){t=q(t);const e=at(t),n=ot(t,e.state,e.location,e.replace);function i(t,e=!0){e||n.pauseListeners(),history.go(t)}const r=l({location:"",base:t,go:i,createHref:G.bind(null,t)},e,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function ct(t){return"string"===typeof t||t&&"object"===typeof t}function ut(t){return"string"===typeof t||"symbol"===typeof t}const ht=Symbol("");var dt;(function(t){t[t["aborted"]=4]="aborted",t[t["cancelled"]=8]="cancelled",t[t["duplicated"]=16]="duplicated"})(dt||(dt={}));function ft(t,e){return l(new Error,{type:t,[ht]:!0},e)}function pt(t,e){return t instanceof Error&&ht in t&&(null==e||!!(t.type&e))}const gt="[^/]+?",mt={sensitive:!1,strict:!1,start:!0,end:!0},bt=/[.+*?^${}()[\]/\\]/g;function xt(t,e){const n=l({},mt,e),i=[];let r=n.start?"^":"";const o=[];for(const l of t){const t=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let e=0;ee.length?1===e.length&&80===e[0]?1:-1:0}function vt(t,e){let n=0;const i=t.score,r=e.score;while(n0&&e[e.length-1]<0}const kt={type:0,value:""},_t=/[a-zA-Z0-9_]/;function Mt(t){if(!t)return[[]];if("/"===t)return[[kt]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(t){throw new Error(`ERR (${n})/"${c}": ${t}`)}let n=0,i=n;const r=[];let o;function s(){o&&r.push(o),o=[]}let a,l=0,c="",u="";function h(){c&&(0===n?o.push({type:0,value:c}):1===n||2===n||3===n?(o.length>1&&("*"===a||"+"===a)&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):e("Invalid state to consume buffer"),c="")}function d(){c+=a}while(l{s(p)}:u}function s(t){if(ut(t)){const e=i.get(t);e&&(i.delete(t),n.splice(n.indexOf(e),1),e.children.forEach(s),e.alias.forEach(s))}else{const e=n.indexOf(t);e>-1&&(n.splice(e,1),t.record.name&&i.delete(t.record.name),t.children.forEach(s),t.alias.forEach(s))}}function a(){return n}function c(t){const e=Rt(t,n);n.splice(e,0,t),t.record.name&&!Ot(t)&&i.set(t.record.name,t)}function h(t,e){let r,o,s,a={};if("name"in t&&t.name){if(r=i.get(t.name),!r)throw ft(1,{location:t});0,s=r.record.name,a=l(Dt(e.params,r.keys.filter((t=>!t.optional)).concat(r.parent?r.parent.keys.filter((t=>t.optional)):[]).map((t=>t.name))),t.params&&Dt(t.params,r.keys.map((t=>t.name)))),o=r.stringify(a)}else if(null!=t.path)o=t.path,r=n.find((t=>t.re.test(o))),r&&(a=r.parse(o),s=r.record.name);else{if(r=e.name?i.get(e.name):n.find((t=>t.re.test(e.path))),!r)throw ft(1,{location:t,currentLocation:e});s=r.record.name,a=l({},e.params,t.params),o=r.stringify(a)}const c=[];let u=r;while(u)c.unshift(u.record),u=u.parent;return{name:s,path:o,params:a,matched:c,meta:Pt(c)}}function d(){n.length=0,i.clear()}return e=Et({strict:!1,end:!0,sensitive:!1},e),t.forEach((t=>o(t))),{addRoute:o,resolve:h,removeRoute:s,clearRoutes:d,getRoutes:a,getRecordMatcher:r}}function Dt(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function Ct(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:At(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function At(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]="object"===typeof n?n[i]:n;return e}function Ot(t){while(t){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Pt(t){return t.reduce(((t,e)=>l(t,e.meta)),{})}function Et(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function Rt(t,e){let n=0,i=e.length;while(n!==i){const r=n+i>>1,o=vt(t,e[r]);o<0?i=r:n=r+1}const r=It(t);return r&&(i=e.lastIndexOf(r,i-1)),i}function It(t){let e=t;while(e=e.parent)if(Lt(e)&&0===vt(t,e))return e}function Lt({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function zt(t){const e={};if(""===t||"?"===t)return e;const n="?"===t[0],i=(n?t.slice(1):t).split("&");for(let r=0;rt&&C(t))):[i&&C(i)];r.forEach((t=>{void 0!==t&&(e+=(e.length?"&":"")+n,null!=t&&(e+="="+t))}))}return e}function Ft(t){const e={};for(const n in t){const i=t[n];void 0!==i&&(e[n]=h(i)?i.map((t=>null==t?null:""+t)):null==i?i:""+i)}return e}const jt=Symbol(""),Ht=Symbol(""),Wt=Symbol(""),$t=Symbol(""),Bt=Symbol("");function Yt(){let t=[];function e(e){return t.push(e),()=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Vt(t,e,n,i,r,o=(t=>t())){const s=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise(((a,l)=>{const c=t=>{!1===t?l(ft(4,{from:n,to:e})):t instanceof Error?l(t):ct(t)?l(ft(2,{from:e,to:t})):(s&&i.enterCallbacks[r]===s&&"function"===typeof t&&s.push(t),a())},u=o((()=>t.call(i&&i.instances[r],e,n,c)));let h=Promise.resolve(u);t.length<3&&(h=h.then(c)),h.catch((t=>l(t)))}))}function Ut(t,e,n,i,r=(t=>t())){const o=[];for(const l of t){0;for(const t in l.components){let c=l.components[t];if("beforeRouteEnter"===e||l.instances[t])if(s(c)){const s=c.__vccOpts||c,a=s[e];a&&o.push(Vt(a,n,i,l,t,r))}else{let s=c();0,o.push((()=>s.then((o=>{if(!o)throw new Error(`Couldn't resolve component "${t}" at "${l.path}"`);const s=a(o)?o.default:o;l.mods[t]=o,l.components[t]=s;const c=s.__vccOpts||s,u=c[e];return u&&Vt(u,n,i,l,t,r)()}))))}}}return o}function qt(t){const e=(0,i.f3)(Wt),n=(0,i.f3)($t);const o=(0,i.Fl)((()=>{const n=(0,r.SU)(t.to);return e.resolve(n)})),s=(0,i.Fl)((()=>{const{matched:t}=o.value,{length:e}=t,i=t[e-1],r=n.matched;if(!i||!r.length)return-1;const s=r.findIndex(j.bind(null,i));if(s>-1)return s;const a=Kt(t[e-2]);return e>1&&Kt(i)===a&&r[r.length-1].path!==a?r.findIndex(j.bind(null,t[e-2])):s})),a=(0,i.Fl)((()=>s.value>-1&&Jt(n.params,o.value.params))),l=(0,i.Fl)((()=>s.value>-1&&s.value===n.matched.length-1&&H(n.params,o.value.params)));function c(n={}){if(Qt(n)){const n=e[(0,r.SU)(t.replace)?"replace":"push"]((0,r.SU)(t.to)).catch(u);return t.viewTransition&&"undefined"!==typeof document&&"startViewTransition"in document&&document.startViewTransition((()=>n)),n}return Promise.resolve()}return{route:o,href:(0,i.Fl)((()=>o.value.href)),isActive:a,isExactActive:l,navigate:c}}function Xt(t){return 1===t.length?t[0]:t}const Gt=(0,i.aZ)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:qt,setup(t,{slots:e}){const n=(0,r.qj)(qt(t)),{options:o}=(0,i.f3)(Wt),s=(0,i.Fl)((()=>({[te(t.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[te(t.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const r=e.default&&Xt(e.default(n));return t.custom?r:(0,i.h)("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),Zt=Gt;function Qt(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Jt(t,e){for(const n in e){const i=e[n],r=t[n];if("string"===typeof i){if(i!==r)return!1}else if(!h(r)||r.length!==i.length||i.some(((t,e)=>t!==r[e])))return!1}return!0}function Kt(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const te=(t,e,n)=>null!=t?t:null!=e?e:n,ee=(0,i.aZ)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const o=(0,i.f3)(Bt),s=(0,i.Fl)((()=>t.route||o.value)),a=(0,i.f3)(Ht,0),c=(0,i.Fl)((()=>{let t=(0,r.SU)(a);const{matched:e}=s.value;let n;while((n=e[t])&&!n.components)t++;return t})),u=(0,i.Fl)((()=>s.value.matched[c.value]));(0,i.JJ)(Ht,(0,i.Fl)((()=>c.value+1))),(0,i.JJ)(jt,u),(0,i.JJ)(Bt,s);const h=(0,r.iH)();return(0,i.YP)((()=>[h.value,u.value,t.name]),(([t,e,n],[i,r,o])=>{e&&(e.instances[n]=t,r&&r!==e&&t&&t===i&&(e.leaveGuards.size||(e.leaveGuards=r.leaveGuards),e.updateGuards.size||(e.updateGuards=r.updateGuards))),!t||!e||r&&j(e,r)&&i||(e.enterCallbacks[n]||[]).forEach((e=>e(t)))}),{flush:"post"}),()=>{const r=s.value,o=t.name,a=u.value,c=a&&a.components[o];if(!c)return ne(n.default,{Component:c,route:r});const d=a.props[o],f=d?!0===d?r.params:"function"===typeof d?d(r):d:null,p=t=>{t.component.isUnmounted&&(a.instances[o]=null)},g=(0,i.h)(c,l({},f,e,{onVnodeUnmounted:p,ref:h}));return ne(n.default,{Component:g,route:r})||g}}});function ne(t,e){if(!t)return null;const n=t(e);return 1===n.length?n[0]:n}const ie=ee;function re(t){const e=Tt(t.routes,t),n=t.parseQuery||zt,s=t.stringifyQuery||Nt,a=t.history;const d=Yt(),f=Yt(),p=Yt(),g=(0,r.XI)(Y);let m=Y;o&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const b=c.bind(null,(t=>""+t)),x=c.bind(null,P),y=c.bind(null,E);function v(t,n){let i,r;return ut(t)?(i=e.getRecordMatcher(t),r=n):r=t,e.addRoute(r,i)}function w(t){const n=e.getRecordMatcher(t);n&&e.removeRoute(n)}function k(){return e.getRoutes().map((t=>t.record))}function _(t){return!!e.getRecordMatcher(t)}function M(t,i){if(i=l({},i||g.value),"string"===typeof t){const r=L(n,t,i.path),o=e.resolve({path:r.path},i),s=a.createHref(r.fullPath);return l(r,o,{params:y(o.params),hash:E(r.hash),redirectedFrom:void 0,href:s})}let r;if(null!=t.path)r=l({},t,{path:L(n,t.path,i.path).path});else{const e=l({},t.params);for(const t in e)null==e[t]&&delete e[t];r=l({},t,{params:x(e)}),i.params=x(i.params)}const o=e.resolve(r,i),c=t.hash||"";o.params=b(y(o.params));const u=z(s,l({},t,{hash:D(c),path:o.path})),h=a.createHref(u);return l({fullPath:u,hash:c,query:s===Nt?Ft(t.query):t.query||{}},o,{redirectedFrom:void 0,href:h})}function S(t){return"string"===typeof t?L(n,t,g.value.path):l({},t)}function T(t,e){if(m!==t)return ft(8,{from:e,to:t})}function C(t){return R(t)}function A(t){return C(l(S(t),{replace:!0}))}function O(t){const e=t.matched[t.matched.length-1];if(e&&e.redirect){const{redirect:n}=e;let i="function"===typeof n?n(t):n;return"string"===typeof i&&(i=i.includes("?")||i.includes("#")?i=S(i):{path:i},i.params={}),l({query:t.query,hash:t.hash,params:null!=i.path?{}:t.params},i)}}function R(t,e){const n=m=M(t),i=g.value,r=t.state,o=t.force,a=!0===t.replace,c=O(n);if(c)return R(l(S(c),{state:"object"===typeof c?l({},r,c.state):r,force:o,replace:a}),e||n);const u=n;let h;return u.redirectedFrom=e,!o&&F(s,i,n)&&(h=ft(16,{to:u,from:i}),it(i,i,!0,!1)),(h?Promise.resolve(h):j(u,i)).catch((t=>pt(t)?pt(t,2)?t:tt(t):G(t,u,i))).then((t=>{if(t){if(pt(t,2))return R(l({replace:a},S(t.to),{state:"object"===typeof t.to?l({},r,t.to.state):r,force:o}),e||u)}else t=W(u,i,!0,a,r);return H(u,i,t),t}))}function I(t,e){const n=T(t,e);return n?Promise.reject(n):Promise.resolve()}function N(t){const e=st.values().next().value;return e&&"function"===typeof e.runWithContext?e.runWithContext(t):t()}function j(t,e){let n;const[i,r,o]=oe(t,e);n=Ut(i.reverse(),"beforeRouteLeave",t,e);for(const a of i)a.leaveGuards.forEach((i=>{n.push(Vt(i,t,e))}));const s=I.bind(null,t,e);return n.push(s),lt(n).then((()=>{n=[];for(const i of d.list())n.push(Vt(i,t,e));return n.push(s),lt(n)})).then((()=>{n=Ut(r,"beforeRouteUpdate",t,e);for(const i of r)i.updateGuards.forEach((i=>{n.push(Vt(i,t,e))}));return n.push(s),lt(n)})).then((()=>{n=[];for(const i of o)if(i.beforeEnter)if(h(i.beforeEnter))for(const r of i.beforeEnter)n.push(Vt(r,t,e));else n.push(Vt(i.beforeEnter,t,e));return n.push(s),lt(n)})).then((()=>(t.matched.forEach((t=>t.enterCallbacks={})),n=Ut(o,"beforeRouteEnter",t,e,N),n.push(s),lt(n)))).then((()=>{n=[];for(const i of f.list())n.push(Vt(i,t,e));return n.push(s),lt(n)})).catch((t=>pt(t,8)?t:Promise.reject(t)))}function H(t,e,n){p.list().forEach((i=>N((()=>i(t,e,n)))))}function W(t,e,n,i,r){const s=T(t,e);if(s)return s;const c=e===Y,u=o?history.state:{};n&&(i||c?a.replace(t.fullPath,l({scroll:c&&u&&u.scroll},r)):a.push(t.fullPath,r)),g.value=t,it(t,e,n,c),tt()}let $;function B(){$||($=a.listen(((t,e,n)=>{if(!at.listening)return;const i=M(t),r=O(i);if(r)return void R(l(r,{replace:!0,force:!0}),i).catch(u);m=i;const s=g.value;o&&et(K(s.fullPath,n.delta),Q()),j(i,s).catch((t=>pt(t,12)?t:pt(t,2)?(R(l(S(t.to),{force:!0}),i).then((t=>{pt(t,20)&&!n.delta&&n.type===V.pop&&a.go(-1,!1)})).catch(u),Promise.reject()):(n.delta&&a.go(-n.delta,!1),G(t,i,s)))).then((t=>{t=t||W(i,s,!1),t&&(n.delta&&!pt(t,8)?a.go(-n.delta,!1):n.type===V.pop&&pt(t,20)&&a.go(-1,!1)),H(i,s,t)})).catch(u)})))}let U,q=Yt(),X=Yt();function G(t,e,n){tt(t);const i=X.list();return i.length?i.forEach((i=>i(t,e,n))):console.error(t),Promise.reject(t)}function Z(){return U&&g.value!==Y?Promise.resolve():new Promise(((t,e)=>{q.add([t,e])}))}function tt(t){return U||(U=!t,B(),q.list().forEach((([e,n])=>t?n(t):e())),q.reset()),t}function it(e,n,r,s){const{scrollBehavior:a}=t;if(!o||!a)return Promise.resolve();const l=!r&&nt(K(e.fullPath,0))||(s||!r)&&history.state&&history.state.scroll||null;return(0,i.Y3)().then((()=>a(e,n,l))).then((t=>t&&J(t))).catch((t=>G(t,e,n)))}const rt=t=>a.go(t);let ot;const st=new Set,at={currentRoute:g,listening:!0,addRoute:v,removeRoute:w,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:k,resolve:M,options:t,push:C,replace:A,go:rt,back:()=>rt(-1),forward:()=>rt(1),beforeEach:d.add,beforeResolve:f.add,afterEach:p.add,onError:X.add,isReady:Z,install(t){const e=this;t.component("RouterLink",Zt),t.component("RouterView",ie),t.config.globalProperties.$router=e,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,r.SU)(g)}),o&&!ot&&g.value===Y&&(ot=!0,C(a.location).catch((t=>{0})));const n={};for(const r in Y)Object.defineProperty(n,r,{get:()=>g.value[r],enumerable:!0});t.provide(Wt,e),t.provide($t,(0,r.Um)(n)),t.provide(Bt,g);const i=t.unmount;st.add(t),t.unmount=function(){st.delete(t),st.size<1&&(m=Y,$&&$(),$=null,g.value=Y,ot=!1,U=!1),i()}}};function lt(t){return t.reduce(((t,e)=>t.then((()=>N(e)))),Promise.resolve())}return at}function oe(t,e){const n=[],i=[],r=[],o=Math.max(e.matched.length,t.matched.length);for(let s=0;sj(t,o)))?i.push(o):n.push(o));const a=t.matched[s];a&&(e.matched.find((t=>j(t,a)))||r.push(a))}return[n,i,r]}function se(){return(0,i.f3)(Wt)}function ae(t){return(0,i.f3)($t)}}}]); \ No newline at end of file +const o="undefined"!==typeof document;function s(t){return"object"===typeof t||"displayName"in t||"props"in t||"__vccOpts"in t}function a(t){return t.__esModule||"Module"===t[Symbol.toStringTag]||t.default&&s(t.default)}const l=Object.assign;function c(t,e){const n={};for(const i in e){const r=e[i];n[i]=h(r)?r.map(t):t(r)}return n}const u=()=>{},h=Array.isArray;const d=/#/g,f=/&/g,p=/\//g,g=/=/g,m=/\?/g,b=/\+/g,y=/%5B/g,x=/%5D/g,v=/%5E/g,w=/%60/g,k=/%7B/g,_=/%7C/g,M=/%7D/g,S=/%20/g;function T(t){return encodeURI(""+t).replace(_,"|").replace(y,"[").replace(x,"]")}function D(t){return T(t).replace(k,"{").replace(M,"}").replace(v,"^")}function C(t){return T(t).replace(b,"%2B").replace(S,"+").replace(d,"%23").replace(f,"%26").replace(w,"`").replace(k,"{").replace(M,"}").replace(v,"^")}function A(t){return C(t).replace(g,"%3D")}function O(t){return T(t).replace(d,"%23").replace(m,"%3F")}function P(t){return null==t?"":O(t).replace(p,"%2F")}function E(t){try{return decodeURIComponent(""+t)}catch(e){}return""+t}const R=/\/$/,I=t=>t.replace(R,"");function L(t,e,n="/"){let i,r={},o="",s="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),r=t(o)),a>-1&&(i=i||e.slice(0,a),s=e.slice(a,e.length)),i=B(null!=i?i:e,n),{fullPath:i+(o&&"?")+o+s,path:i,query:r,hash:E(s)}}function z(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function N(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function F(t,e,n){const i=e.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&j(e.matched[i],n.matched[r])&&H(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function j(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function H(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!W(t[n],e[n]))return!1;return!0}function W(t,e){return h(t)?$(t,e):h(e)?$(e,t):t===e}function $(t,e){return h(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):1===t.length&&t[0]===e}function B(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),r=i[i.length-1];".."!==r&&"."!==r||i.push("");let o,s,a=n.length-1;for(o=0;o1&&a--}return n.slice(0,a).join("/")+"/"+i.slice(o).join("/")}const Y={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var V,U;(function(t){t["pop"]="pop",t["push"]="push"})(V||(V={})),function(t){t["back"]="back",t["forward"]="forward",t["unknown"]=""}(U||(U={}));function q(t){if(!t)if(o){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return"/"!==t[0]&&"#"!==t[0]&&(t="/"+t),I(t)}const X=/^[^#]+#/;function G(t,e){return t.replace(X,"#")+e}function Z(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const Q=()=>({left:window.scrollX,top:window.scrollY});function J(t){let e;if("el"in t){const n=t.el,i="string"===typeof n&&n.startsWith("#");0;const r="string"===typeof n?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;e=Z(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.scrollX,null!=e.top?e.top:window.scrollY)}function K(t,e){const n=history.state?history.state.position-e:-1;return n+t}const tt=new Map;function et(t,e){tt.set(t,e)}function nt(t){const e=tt.get(t);return tt.delete(t),e}let it=()=>location.protocol+"//"+location.host;function rt(t,e){const{pathname:n,search:i,hash:r}=e,o=t.indexOf("#");if(o>-1){let e=r.includes(t.slice(o))?t.slice(o).length:1,n=r.slice(e);return"/"!==n[0]&&(n="/"+n),N(n,"")}const s=N(n,t);return s+i+r}function ot(t,e,n,i){let r=[],o=[],s=null;const a=({state:o})=>{const a=rt(t,location),l=n.value,c=e.value;let u=0;if(o){if(n.value=a,e.value=o,s&&s===l)return void(s=null);u=c?o.position-c.position:0}else i(a);r.forEach((t=>{t(n.value,l,{delta:u,type:V.pop,direction:u?u>0?U.forward:U.back:U.unknown})}))};function c(){s=n.value}function u(t){r.push(t);const e=()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)};return o.push(e),e}function h(){const{history:t}=window;t.state&&t.replaceState(l({},t.state,{scroll:Q()}),"")}function d(){for(const t of o)t();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:c,listen:u,destroy:d}}function st(t,e,n,i=!1,r=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:r?Q():null}}function at(t){const{history:e,location:n}=window,i={value:rt(t,n)},r={value:e.state};function o(i,o,s){const a=t.indexOf("#"),l=a>-1?(n.host&&document.querySelector("base")?t:t.slice(a))+i:it()+t+i;try{e[s?"replaceState":"pushState"](o,"",l),r.value=o}catch(c){console.error(c),n[s?"replace":"assign"](l)}}function s(t,n){const s=l({},e.state,st(r.value.back,t,r.value.forward,!0),n,{position:r.value.position});o(t,s,!0),i.value=t}function a(t,n){const s=l({},r.value,e.state,{forward:t,scroll:Q()});o(s.current,s,!0);const a=l({},st(i.value,t,null),{position:s.position+1},n);o(t,a,!1),i.value=t}return r.value||o(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:i,state:r,push:a,replace:s}}function lt(t){t=q(t);const e=at(t),n=ot(t,e.state,e.location,e.replace);function i(t,e=!0){e||n.pauseListeners(),history.go(t)}const r=l({location:"",base:t,go:i,createHref:G.bind(null,t)},e,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function ct(t){return"string"===typeof t||t&&"object"===typeof t}function ut(t){return"string"===typeof t||"symbol"===typeof t}const ht=Symbol("");var dt;(function(t){t[t["aborted"]=4]="aborted",t[t["cancelled"]=8]="cancelled",t[t["duplicated"]=16]="duplicated"})(dt||(dt={}));function ft(t,e){return l(new Error,{type:t,[ht]:!0},e)}function pt(t,e){return t instanceof Error&&ht in t&&(null==e||!!(t.type&e))}const gt="[^/]+?",mt={sensitive:!1,strict:!1,start:!0,end:!0},bt=/[.+*?^${}()[\]/\\]/g;function yt(t,e){const n=l({},mt,e),i=[];let r=n.start?"^":"";const o=[];for(const l of t){const t=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let e=0;ee.length?1===e.length&&80===e[0]?1:-1:0}function vt(t,e){let n=0;const i=t.score,r=e.score;while(n0&&e[e.length-1]<0}const kt={type:0,value:""},_t=/[a-zA-Z0-9_]/;function Mt(t){if(!t)return[[]];if("/"===t)return[[kt]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(t){throw new Error(`ERR (${n})/"${c}": ${t}`)}let n=0,i=n;const r=[];let o;function s(){o&&r.push(o),o=[]}let a,l=0,c="",u="";function h(){c&&(0===n?o.push({type:0,value:c}):1===n||2===n||3===n?(o.length>1&&("*"===a||"+"===a)&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):e("Invalid state to consume buffer"),c="")}function d(){c+=a}while(l{s(p)}:u}function s(t){if(ut(t)){const e=i.get(t);e&&(i.delete(t),n.splice(n.indexOf(e),1),e.children.forEach(s),e.alias.forEach(s))}else{const e=n.indexOf(t);e>-1&&(n.splice(e,1),t.record.name&&i.delete(t.record.name),t.children.forEach(s),t.alias.forEach(s))}}function a(){return n}function c(t){const e=Rt(t,n);n.splice(e,0,t),t.record.name&&!Ot(t)&&i.set(t.record.name,t)}function h(t,e){let r,o,s,a={};if("name"in t&&t.name){if(r=i.get(t.name),!r)throw ft(1,{location:t});0,s=r.record.name,a=l(Dt(e.params,r.keys.filter((t=>!t.optional)).concat(r.parent?r.parent.keys.filter((t=>t.optional)):[]).map((t=>t.name))),t.params&&Dt(t.params,r.keys.map((t=>t.name)))),o=r.stringify(a)}else if(null!=t.path)o=t.path,r=n.find((t=>t.re.test(o))),r&&(a=r.parse(o),s=r.record.name);else{if(r=e.name?i.get(e.name):n.find((t=>t.re.test(e.path))),!r)throw ft(1,{location:t,currentLocation:e});s=r.record.name,a=l({},e.params,t.params),o=r.stringify(a)}const c=[];let u=r;while(u)c.unshift(u.record),u=u.parent;return{name:s,path:o,params:a,matched:c,meta:Pt(c)}}function d(){n.length=0,i.clear()}return e=Et({strict:!1,end:!0,sensitive:!1},e),t.forEach((t=>o(t))),{addRoute:o,resolve:h,removeRoute:s,clearRoutes:d,getRoutes:a,getRecordMatcher:r}}function Dt(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function Ct(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:At(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function At(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]="object"===typeof n?n[i]:n;return e}function Ot(t){while(t){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Pt(t){return t.reduce(((t,e)=>l(t,e.meta)),{})}function Et(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function Rt(t,e){let n=0,i=e.length;while(n!==i){const r=n+i>>1,o=vt(t,e[r]);o<0?i=r:n=r+1}const r=It(t);return r&&(i=e.lastIndexOf(r,i-1)),i}function It(t){let e=t;while(e=e.parent)if(Lt(e)&&0===vt(t,e))return e}function Lt({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function zt(t){const e={};if(""===t||"?"===t)return e;const n="?"===t[0],i=(n?t.slice(1):t).split("&");for(let r=0;rt&&C(t))):[i&&C(i)];r.forEach((t=>{void 0!==t&&(e+=(e.length?"&":"")+n,null!=t&&(e+="="+t))}))}return e}function Ft(t){const e={};for(const n in t){const i=t[n];void 0!==i&&(e[n]=h(i)?i.map((t=>null==t?null:""+t)):null==i?i:""+i)}return e}const jt=Symbol(""),Ht=Symbol(""),Wt=Symbol(""),$t=Symbol(""),Bt=Symbol("");function Yt(){let t=[];function e(e){return t.push(e),()=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Vt(t,e,n,i,r,o=(t=>t())){const s=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise(((a,l)=>{const c=t=>{!1===t?l(ft(4,{from:n,to:e})):t instanceof Error?l(t):ct(t)?l(ft(2,{from:e,to:t})):(s&&i.enterCallbacks[r]===s&&"function"===typeof t&&s.push(t),a())},u=o((()=>t.call(i&&i.instances[r],e,n,c)));let h=Promise.resolve(u);t.length<3&&(h=h.then(c)),h.catch((t=>l(t)))}))}function Ut(t,e,n,i,r=(t=>t())){const o=[];for(const l of t){0;for(const t in l.components){let c=l.components[t];if("beforeRouteEnter"===e||l.instances[t])if(s(c)){const s=c.__vccOpts||c,a=s[e];a&&o.push(Vt(a,n,i,l,t,r))}else{let s=c();0,o.push((()=>s.then((o=>{if(!o)throw new Error(`Couldn't resolve component "${t}" at "${l.path}"`);const s=a(o)?o.default:o;l.mods[t]=o,l.components[t]=s;const c=s.__vccOpts||s,u=c[e];return u&&Vt(u,n,i,l,t,r)()}))))}}}return o}function qt(t){const e=(0,i.f3)(Wt),n=(0,i.f3)($t);const o=(0,i.Fl)((()=>{const n=(0,r.SU)(t.to);return e.resolve(n)})),s=(0,i.Fl)((()=>{const{matched:t}=o.value,{length:e}=t,i=t[e-1],r=n.matched;if(!i||!r.length)return-1;const s=r.findIndex(j.bind(null,i));if(s>-1)return s;const a=Kt(t[e-2]);return e>1&&Kt(i)===a&&r[r.length-1].path!==a?r.findIndex(j.bind(null,t[e-2])):s})),a=(0,i.Fl)((()=>s.value>-1&&Jt(n.params,o.value.params))),l=(0,i.Fl)((()=>s.value>-1&&s.value===n.matched.length-1&&H(n.params,o.value.params)));function c(n={}){if(Qt(n)){const n=e[(0,r.SU)(t.replace)?"replace":"push"]((0,r.SU)(t.to)).catch(u);return t.viewTransition&&"undefined"!==typeof document&&"startViewTransition"in document&&document.startViewTransition((()=>n)),n}return Promise.resolve()}return{route:o,href:(0,i.Fl)((()=>o.value.href)),isActive:a,isExactActive:l,navigate:c}}function Xt(t){return 1===t.length?t[0]:t}const Gt=(0,i.aZ)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:qt,setup(t,{slots:e}){const n=(0,r.qj)(qt(t)),{options:o}=(0,i.f3)(Wt),s=(0,i.Fl)((()=>({[te(t.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[te(t.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const r=e.default&&Xt(e.default(n));return t.custom?r:(0,i.h)("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),Zt=Gt;function Qt(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Jt(t,e){for(const n in e){const i=e[n],r=t[n];if("string"===typeof i){if(i!==r)return!1}else if(!h(r)||r.length!==i.length||i.some(((t,e)=>t!==r[e])))return!1}return!0}function Kt(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const te=(t,e,n)=>null!=t?t:null!=e?e:n,ee=(0,i.aZ)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const o=(0,i.f3)(Bt),s=(0,i.Fl)((()=>t.route||o.value)),a=(0,i.f3)(Ht,0),c=(0,i.Fl)((()=>{let t=(0,r.SU)(a);const{matched:e}=s.value;let n;while((n=e[t])&&!n.components)t++;return t})),u=(0,i.Fl)((()=>s.value.matched[c.value]));(0,i.JJ)(Ht,(0,i.Fl)((()=>c.value+1))),(0,i.JJ)(jt,u),(0,i.JJ)(Bt,s);const h=(0,r.iH)();return(0,i.YP)((()=>[h.value,u.value,t.name]),(([t,e,n],[i,r,o])=>{e&&(e.instances[n]=t,r&&r!==e&&t&&t===i&&(e.leaveGuards.size||(e.leaveGuards=r.leaveGuards),e.updateGuards.size||(e.updateGuards=r.updateGuards))),!t||!e||r&&j(e,r)&&i||(e.enterCallbacks[n]||[]).forEach((e=>e(t)))}),{flush:"post"}),()=>{const r=s.value,o=t.name,a=u.value,c=a&&a.components[o];if(!c)return ne(n.default,{Component:c,route:r});const d=a.props[o],f=d?!0===d?r.params:"function"===typeof d?d(r):d:null,p=t=>{t.component.isUnmounted&&(a.instances[o]=null)},g=(0,i.h)(c,l({},f,e,{onVnodeUnmounted:p,ref:h}));return ne(n.default,{Component:g,route:r})||g}}});function ne(t,e){if(!t)return null;const n=t(e);return 1===n.length?n[0]:n}const ie=ee;function re(t){const e=Tt(t.routes,t),n=t.parseQuery||zt,s=t.stringifyQuery||Nt,a=t.history;const d=Yt(),f=Yt(),p=Yt(),g=(0,r.XI)(Y);let m=Y;o&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const b=c.bind(null,(t=>""+t)),y=c.bind(null,P),x=c.bind(null,E);function v(t,n){let i,r;return ut(t)?(i=e.getRecordMatcher(t),r=n):r=t,e.addRoute(r,i)}function w(t){const n=e.getRecordMatcher(t);n&&e.removeRoute(n)}function k(){return e.getRoutes().map((t=>t.record))}function _(t){return!!e.getRecordMatcher(t)}function M(t,i){if(i=l({},i||g.value),"string"===typeof t){const r=L(n,t,i.path),o=e.resolve({path:r.path},i),s=a.createHref(r.fullPath);return l(r,o,{params:x(o.params),hash:E(r.hash),redirectedFrom:void 0,href:s})}let r;if(null!=t.path)r=l({},t,{path:L(n,t.path,i.path).path});else{const e=l({},t.params);for(const t in e)null==e[t]&&delete e[t];r=l({},t,{params:y(e)}),i.params=y(i.params)}const o=e.resolve(r,i),c=t.hash||"";o.params=b(x(o.params));const u=z(s,l({},t,{hash:D(c),path:o.path})),h=a.createHref(u);return l({fullPath:u,hash:c,query:s===Nt?Ft(t.query):t.query||{}},o,{redirectedFrom:void 0,href:h})}function S(t){return"string"===typeof t?L(n,t,g.value.path):l({},t)}function T(t,e){if(m!==t)return ft(8,{from:e,to:t})}function C(t){return R(t)}function A(t){return C(l(S(t),{replace:!0}))}function O(t){const e=t.matched[t.matched.length-1];if(e&&e.redirect){const{redirect:n}=e;let i="function"===typeof n?n(t):n;return"string"===typeof i&&(i=i.includes("?")||i.includes("#")?i=S(i):{path:i},i.params={}),l({query:t.query,hash:t.hash,params:null!=i.path?{}:t.params},i)}}function R(t,e){const n=m=M(t),i=g.value,r=t.state,o=t.force,a=!0===t.replace,c=O(n);if(c)return R(l(S(c),{state:"object"===typeof c?l({},r,c.state):r,force:o,replace:a}),e||n);const u=n;let h;return u.redirectedFrom=e,!o&&F(s,i,n)&&(h=ft(16,{to:u,from:i}),it(i,i,!0,!1)),(h?Promise.resolve(h):j(u,i)).catch((t=>pt(t)?pt(t,2)?t:tt(t):G(t,u,i))).then((t=>{if(t){if(pt(t,2))return R(l({replace:a},S(t.to),{state:"object"===typeof t.to?l({},r,t.to.state):r,force:o}),e||u)}else t=W(u,i,!0,a,r);return H(u,i,t),t}))}function I(t,e){const n=T(t,e);return n?Promise.reject(n):Promise.resolve()}function N(t){const e=st.values().next().value;return e&&"function"===typeof e.runWithContext?e.runWithContext(t):t()}function j(t,e){let n;const[i,r,o]=oe(t,e);n=Ut(i.reverse(),"beforeRouteLeave",t,e);for(const a of i)a.leaveGuards.forEach((i=>{n.push(Vt(i,t,e))}));const s=I.bind(null,t,e);return n.push(s),lt(n).then((()=>{n=[];for(const i of d.list())n.push(Vt(i,t,e));return n.push(s),lt(n)})).then((()=>{n=Ut(r,"beforeRouteUpdate",t,e);for(const i of r)i.updateGuards.forEach((i=>{n.push(Vt(i,t,e))}));return n.push(s),lt(n)})).then((()=>{n=[];for(const i of o)if(i.beforeEnter)if(h(i.beforeEnter))for(const r of i.beforeEnter)n.push(Vt(r,t,e));else n.push(Vt(i.beforeEnter,t,e));return n.push(s),lt(n)})).then((()=>(t.matched.forEach((t=>t.enterCallbacks={})),n=Ut(o,"beforeRouteEnter",t,e,N),n.push(s),lt(n)))).then((()=>{n=[];for(const i of f.list())n.push(Vt(i,t,e));return n.push(s),lt(n)})).catch((t=>pt(t,8)?t:Promise.reject(t)))}function H(t,e,n){p.list().forEach((i=>N((()=>i(t,e,n)))))}function W(t,e,n,i,r){const s=T(t,e);if(s)return s;const c=e===Y,u=o?history.state:{};n&&(i||c?a.replace(t.fullPath,l({scroll:c&&u&&u.scroll},r)):a.push(t.fullPath,r)),g.value=t,it(t,e,n,c),tt()}let $;function B(){$||($=a.listen(((t,e,n)=>{if(!at.listening)return;const i=M(t),r=O(i);if(r)return void R(l(r,{replace:!0,force:!0}),i).catch(u);m=i;const s=g.value;o&&et(K(s.fullPath,n.delta),Q()),j(i,s).catch((t=>pt(t,12)?t:pt(t,2)?(R(l(S(t.to),{force:!0}),i).then((t=>{pt(t,20)&&!n.delta&&n.type===V.pop&&a.go(-1,!1)})).catch(u),Promise.reject()):(n.delta&&a.go(-n.delta,!1),G(t,i,s)))).then((t=>{t=t||W(i,s,!1),t&&(n.delta&&!pt(t,8)?a.go(-n.delta,!1):n.type===V.pop&&pt(t,20)&&a.go(-1,!1)),H(i,s,t)})).catch(u)})))}let U,q=Yt(),X=Yt();function G(t,e,n){tt(t);const i=X.list();return i.length?i.forEach((i=>i(t,e,n))):console.error(t),Promise.reject(t)}function Z(){return U&&g.value!==Y?Promise.resolve():new Promise(((t,e)=>{q.add([t,e])}))}function tt(t){return U||(U=!t,B(),q.list().forEach((([e,n])=>t?n(t):e())),q.reset()),t}function it(e,n,r,s){const{scrollBehavior:a}=t;if(!o||!a)return Promise.resolve();const l=!r&&nt(K(e.fullPath,0))||(s||!r)&&history.state&&history.state.scroll||null;return(0,i.Y3)().then((()=>a(e,n,l))).then((t=>t&&J(t))).catch((t=>G(t,e,n)))}const rt=t=>a.go(t);let ot;const st=new Set,at={currentRoute:g,listening:!0,addRoute:v,removeRoute:w,clearRoutes:e.clearRoutes,hasRoute:_,getRoutes:k,resolve:M,options:t,push:C,replace:A,go:rt,back:()=>rt(-1),forward:()=>rt(1),beforeEach:d.add,beforeResolve:f.add,afterEach:p.add,onError:X.add,isReady:Z,install(t){const e=this;t.component("RouterLink",Zt),t.component("RouterView",ie),t.config.globalProperties.$router=e,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,r.SU)(g)}),o&&!ot&&g.value===Y&&(ot=!0,C(a.location).catch((t=>{0})));const n={};for(const r in Y)Object.defineProperty(n,r,{get:()=>g.value[r],enumerable:!0});t.provide(Wt,e),t.provide($t,(0,r.Um)(n)),t.provide(Bt,g);const i=t.unmount;st.add(t),t.unmount=function(){st.delete(t),st.size<1&&(m=Y,$&&$(),$=null,g.value=Y,ot=!1,U=!1),i()}}};function lt(t){return t.reduce(((t,e)=>t.then((()=>N(e)))),Promise.resolve())}return at}function oe(t,e){const n=[],i=[],r=[],o=Math.max(e.matched.length,t.matched.length);for(let s=0;sj(t,o)))?i.push(o):n.push(o));const a=t.matched[s];a&&(e.matched.find((t=>j(t,a)))||r.push(a))}return[n,i,r]}function se(){return(0,i.f3)(Wt)}function ae(t){return(0,i.f3)($t)}}}]); \ No newline at end of file